CbmRoot
CbmHasTofTrackCut.cxx
Go to the documentation of this file.
1 /*
2  * CbmTofTrackCut.cxx
3  *
4  * Created on: 17 lip 2019
5  * Author: Daniel Wielanek
6  * E-mail: daniel.wielanek@gmail.com
7  * Warsaw University of Technology, Faculty of Physics
8  */
9 #include "CbmHasTofTrackCut.h"
10 
11 #include "NicaCbmTrack.h"
13 
14 Bool_t CbmHasTofTrackCut::Init(Int_t format_id) {
15  fInit = kTRUE;
16  if (FormatInhertis("NicaCbmEvent", format_id)) { return kTRUE; }
17  return kFALSE;
18 }
19 
20 Bool_t CbmHasTofTrackCut::Pass(NicaTrack* track) {
21  NicaCbmTrack* tr = (NicaCbmTrack*) track;
22  CbmTofHit* tof = tr->GetTofTrack();
23  if (tof == NULL) {
24  SetValue(0);
25  return ForcedUpdate(kFALSE);
26  } else {
27  SetValue(1);
28  return ForcedUpdate(kTRUE);
29  }
30 }
31 
33  // TODO Auto-generated destructor stub
34 }
NicaCbmTrack::GetTofTrack
CbmTofHit * GetTofTrack() const
Definition: NicaCbmTrack.h:38
NicaCbmTrack
Definition: NicaCbmTrack.h:20
CbmHasTofTrackCut::Init
virtual Bool_t Init(Int_t format_id=0)
Definition: CbmHasTofTrackCut.cxx:14
CbmHasTofTrackCut::~CbmHasTofTrackCut
virtual ~CbmHasTofTrackCut()
Definition: CbmHasTofTrackCut.cxx:32
CbmHasTofTrackCut.h
CbmHasTofTrackCut::CbmHasTofTrackCut
CbmHasTofTrackCut()
Definition: CbmHasTofTrackCut.cxx:12
NicaCbmTrack.h
CbmTofHit
Definition: core/data/tof/CbmTofHit.h:26
CbmHasTofTrackCut::Pass
virtual Bool_t Pass(NicaTrack *track)
Definition: CbmHasTofTrackCut.cxx:20