1 #include "AliRsnCutTOFMatch.h"
3 ClassImp(AliRsnCutTOFMatch)
5 AliRsnCutTOFMatch::AliRsnCutTOFMatch() :
6 AliRsnCut("cut", AliRsnTarget::kDaughter)
11 //_________________________________________________________________________________________________
12 AliRsnCutTOFMatch::AliRsnCutTOFMatch(const char *name) :
13 AliRsnCut(name, AliRsnTarget::kDaughter)
18 //_________________________________________________________________________________________________
19 Bool_t AliRsnCutTOFMatch::IsSelected(TObject *object)
22 // Checks if the track has the status flags required for the TPC-TOF matching
24 Bool_t accept = kFALSE;
25 if (!TargetOK(object)) return accept;
27 AliVTrack *vtrack = fDaughter->Ref2Vtrack();
29 AliError("Referenced daughter is not a track");
32 if (MatchTOF(vtrack)) accept = kTRUE;
36 //-----------------------------------------------------
37 inline Bool_t AliRsnCutTOFMatch::MatchTOF(const AliVTrack *vtrack) const
40 // Checks if the track has matched the TOF detector
43 AliWarning("NULL argument: impossible to check status");
46 if ((vtrack->GetStatus() & AliESDtrack::kTOFout) == 0) return kFALSE;
47 if ((vtrack->GetStatus() & AliESDtrack::kTIME ) == 0) return kFALSE;