2 // This cut selects the AliRsnDaughter objects pointing
3 // to tracks with a well defined true particle species,
4 // defined through its PDG code or species according the
5 // enumeration defined in AliRsnDaughter class.
7 // Using this cut on data results in no tracks passing it.
10 #include "AliRsnCutTrue.h"
12 ClassImp(AliRsnCutTrue)
14 //__________________________________________________________________________________________________
15 AliRsnCutTrue::AliRsnCutTrue(const char *name, Int_t pdg) :
16 AliRsnCut(name, AliRsnTarget::kDaughter, pdg)
19 // Constructor version #1:
20 // pass directly the PDG code
24 //__________________________________________________________________________________________________
25 AliRsnCutTrue::AliRsnCutTrue(const char *name, AliRsnDaughter::ESpecies species) :
26 AliRsnCut(name, AliRsnTarget::kDaughter, AliRsnDaughter::SpeciesPDG(species))
29 // Constructor version #2:
30 // pass the species from AliRsnDaughter enum, which is converted into PDG code
34 //__________________________________________________________________________________________________
35 AliRsnCutTrue::AliRsnCutTrue(const AliRsnCutTrue ©) :
43 //__________________________________________________________________________________________________
44 AliRsnCutTrue &AliRsnCutTrue::operator=(const AliRsnCutTrue ©)
47 // Assignment operator
50 AliRsnCut::operator=(copy);
54 //__________________________________________________________________________________________________
55 Bool_t AliRsnCutTrue::IsSelected(TObject *obj)
59 // if the MC reference is present, recover PDG
60 // and check if it matches the required one, in absolute value.
64 if (!TargetOK(obj)) return kFALSE;
66 // check if MC is present
67 if (!fDaughter->GetRefMC()) {
68 AliError("Cannot check cut 'AliRsnCutTrue' without MC information");
73 fCutValueI = fDaughter->GetPDGAbs();