]>
Commit | Line | Data |
---|---|---|
a5556ea5 | 1 | #ifndef ALIAODPARTICLECUT_H |
2 | #define ALIAODPARTICLECUT_H | |
3 | //__________________________________________________________________________ | |
4 | //////////////////////////////////////////////////////////////////////////// | |
5 | // // | |
6 | // class AliAODParticleCut // | |
7 | // // | |
7112e775 | 8 | // Classes for single particle cuts. // |
9 | // User should use mainly AliAODParticleCut interface methods, // | |
10 | // eventually EmptyCut which passes all particles. // | |
11 | // // | |
a5556ea5 | 12 | // There is all interface for setting cuts on all particle properties // |
7112e775 | 13 | // The main method is Rejected - which returns // |
a5556ea5 | 14 | // True to reject particle // |
15 | // False in case it meets all the criteria of the given cut // | |
16 | // // | |
7112e775 | 17 | // This class has the list of base particle cuts that perform check on // |
18 | // single property. Particle is rejected if any of cuts rejects it. // | |
19 | // There are implemented logical base cuts that perform logical // | |
20 | // operations on results of two other base cuts. Using them user can // | |
21 | // create a tree structure of a base cuts that performs sophisticated // | |
22 | // cut. // | |
23 | // // | |
24 | // User can also implement a base cut that performs complicated // | |
25 | // calculations, if it is only more convenient and/or efficint. // | |
a5556ea5 | 26 | // // |
7112e775 | 27 | // User should delete created cuts himself // |
28 | // because when setting a cut, other objects (functions,analyses, // | |
29 | // readers, other cuts) make their own copy of a cut. // | |
a5556ea5 | 30 | // // |
7112e775 | 31 | // more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html // |
32 | // responsible: Piotr Skowronski@cern.ch // | |
a5556ea5 | 33 | // // |
34 | //////////////////////////////////////////////////////////////////////////// | |
35 | ||
a5556ea5 | 36 | #include <TObject.h> |
afa8b37b | 37 | #include "AliVAODParticle.h" |
f9f11a4b | 38 | #include "AliAODParticleBaseCut.h" |
a5556ea5 | 39 | |
40 | ||
b4fb427e | 41 | class AliAODParticleEmptyCut; |
a5556ea5 | 42 | class AliAODParticleCut; |
b4fb427e | 43 | class AliAODParticleBaseCut; |
a5556ea5 | 44 | |
45 | ||
46 | /******************************************************************/ | |
47 | /******************************************************************/ | |
48 | /******************************************************************/ | |
49 | ||
a5556ea5 | 50 | /******************************************************************/ |
51 | /******************************************************************/ | |
52 | /******************************************************************/ | |
53 | ||
54 | class AliAODParticleCut: public TObject | |
55 | { | |
56 | //Class describing cut on particle | |
57 | public: | |
f9f11a4b | 58 | |
a5556ea5 | 59 | AliAODParticleCut(); |
60 | AliAODParticleCut(const AliAODParticleCut& in); | |
61 | virtual ~AliAODParticleCut(); | |
62 | AliAODParticleCut& operator = (const AliAODParticleCut& in); | |
63 | ||
cea0a066 | 64 | virtual Bool_t Rejected(AliVAODParticle* p) const; |
a5556ea5 | 65 | Bool_t IsEmpty() const {return kFALSE;} |
66 | ||
b4fb427e | 67 | void AddBasePartCut(AliAODParticleBaseCut* basecut); |
a5556ea5 | 68 | |
69 | Int_t GetPID() const { return fPID;} | |
70 | void SetPID(Int_t pid){fPID=pid;} | |
71 | void SetMomentumRange(Double_t min, Double_t max); | |
72 | void SetPRange(Double_t min, Double_t max){SetMomentumRange(min,max);} | |
73 | void SetPtRange(Double_t min, Double_t max); | |
74 | void SetEnergyRange(Double_t min, Double_t max); | |
75 | void SetRapidityRange(Double_t min, Double_t max); | |
76 | void SetYRange(Double_t min, Double_t max){SetRapidityRange(min,max);} | |
77 | void SetPseudoRapidityRange(Double_t min, Double_t max); | |
78 | void SetPxRange(Double_t min, Double_t max); | |
79 | void SetPyRange(Double_t min, Double_t max); | |
80 | void SetPzRange(Double_t min, Double_t max); | |
81 | void SetPhiRange(Double_t min, Double_t max); | |
82 | void SetThetaRange(Double_t min, Double_t max); | |
83 | void SetVxRange(Double_t min, Double_t max); | |
84 | void SetVyRange(Double_t min, Double_t max); | |
85 | void SetVzRange(Double_t min, Double_t max); | |
86 | ||
201c7e13 | 87 | void Print(const Option_t * opt = "") const; |
a5556ea5 | 88 | protected: |
89 | ||
f9f11a4b | 90 | AliAODParticleBaseCut* FindCut(AliAODParticleBaseCut::EAODCutProperty property); |
a5556ea5 | 91 | |
b4fb427e | 92 | AliAODParticleBaseCut ** fCuts;//! Array with cuts |
a5556ea5 | 93 | Int_t fNCuts; //number of base cuts stored in fCuts |
94 | ||
95 | Int_t fPID; //particle PID - if=0 (rootino) all pids are accepted | |
96 | ||
97 | private: | |
98 | static const Int_t fgkMaxCuts; //Size of the fCuts array | |
99 | ||
100 | ClassDef(AliAODParticleCut,1) | |
101 | }; | |
102 | /******************************************************************/ | |
103 | /******************************************************************/ | |
104 | /******************************************************************/ | |
105 | ||
b4fb427e | 106 | class AliAODParticleEmptyCut: public AliAODParticleCut |
a5556ea5 | 107 | { |
108 | //Empty - it passes possitively all particles - it means returns always False | |
109 | //Class describing cut on particles | |
110 | public: | |
b4fb427e | 111 | AliAODParticleEmptyCut(){}; |
112 | virtual ~AliAODParticleEmptyCut(){}; | |
a5556ea5 | 113 | |
cea0a066 | 114 | Bool_t Rejected(AliVAODParticle*) const {return kFALSE;} //accept everything |
a5556ea5 | 115 | Bool_t IsEmpty() const {return kTRUE;} |
116 | ||
b4fb427e | 117 | ClassDef(AliAODParticleEmptyCut,1) |
a5556ea5 | 118 | |
119 | }; | |
120 | ||
121 | /******************************************************************/ | |
122 | /******************************************************************/ | |
123 | /******************************************************************/ | |
124 | ||
a5556ea5 | 125 | |
126 | #endif |