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