]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutTrue.cxx
Added first version of cut monitoring + style format applied
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutTrue.cxx
CommitLineData
b63357a0 1//
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.
6// ---
7// Using this cut on data results in no tracks passing it.
8//
9
10#include "AliRsnCutTrue.h"
11
12ClassImp(AliRsnCutTrue)
13
14//__________________________________________________________________________________________________
15AliRsnCutTrue::AliRsnCutTrue(const char *name, Int_t pdg) :
16 AliRsnCut(name, AliRsnTarget::kDaughter, pdg)
17{
18//
19// Constructor version #1:
20// pass directly the PDG code
21//
22}
23
24//__________________________________________________________________________________________________
25AliRsnCutTrue::AliRsnCutTrue(const char *name, AliRsnDaughter::ESpecies species) :
26 AliRsnCut(name, AliRsnTarget::kDaughter, AliRsnDaughter::SpeciesPDG(species))
27{
28//
29// Constructor version #2:
30// pass the species from AliRsnDaughter enum, which is converted into PDG code
31//
32}
33
34//__________________________________________________________________________________________________
35AliRsnCutTrue::AliRsnCutTrue(const AliRsnCutTrue &copy) :
36 AliRsnCut(copy)
37{
38//
39// Copy constructor
40//
41}
42
43//__________________________________________________________________________________________________
61f275d1 44AliRsnCutTrue &AliRsnCutTrue::operator=(const AliRsnCutTrue &copy)
b63357a0 45{
46//
47// Assignment operator
48//
49
50 AliRsnCut::operator=(copy);
51 return (*this);
52}
53
54//__________________________________________________________________________________________________
55Bool_t AliRsnCutTrue::IsSelected(TObject *obj)
56{
57//
58// Check:
59// if the MC reference is present, recover PDG
60// and check if it matches the required one, in absolute value.
61//
62
63 // convert target
64 if (!TargetOK(obj)) return kFALSE;
61f275d1 65
b63357a0 66 // check if MC is present
67 if (!fDaughter->GetRefMC()) {
68 AliError("Cannot check cut 'AliRsnCutTrue' without MC information");
69 return kFALSE;
70 }
61f275d1 71
b63357a0 72 // compare PDG
73 fCutValueI = fDaughter->GetPDGAbs();
74 return OkValueI();
75}
76
61f275d1 77
78