1 #ifndef ALIAODPARTICLECUT_H
2 #define ALIAODPARTICLECUT_H
3 //__________________________________________________________________________
4 ////////////////////////////////////////////////////////////////////////////
6 // class AliAODParticleCut //
8 // Classes for single particle cuts. //
9 // User should use mainly AliAODParticleCut interface methods, //
10 // eventually EmptyCut which passes all particles. //
12 // There is all interface for setting cuts on all particle properties //
13 // The main method is Rejected - which returns //
14 // True to reject particle //
15 // False in case it meets all the criteria of the given cut //
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 //
24 // User can also implement a base cut that performs complicated //
25 // calculations, if it is only more convenient and/or efficint. //
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. //
31 // more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html //
32 // responsible: Piotr Skowronski@cern.ch //
34 ////////////////////////////////////////////////////////////////////////////
37 #include "AliVAODParticle.h"
38 #include "AliAODParticleBaseCut.h"
41 class AliAODParticleEmptyCut;
42 class AliAODParticleCut;
43 class AliAODParticleBaseCut;
46 /******************************************************************/
47 /******************************************************************/
48 /******************************************************************/
50 /******************************************************************/
51 /******************************************************************/
52 /******************************************************************/
54 class AliAODParticleCut: public TObject
56 //Class describing cut on particle
60 AliAODParticleCut(const AliAODParticleCut& in);
61 virtual ~AliAODParticleCut();
62 AliAODParticleCut& operator = (const AliAODParticleCut& in);
64 virtual Bool_t Rejected(AliVAODParticle* p) const;
65 Bool_t IsEmpty() const {return kFALSE;}
67 void AddBasePartCut(AliAODParticleBaseCut* basecut);
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);
87 void Print(const Option_t * opt = "") const;
90 AliAODParticleBaseCut* FindCut(AliAODParticleBaseCut::EAODCutProperty property);
92 AliAODParticleBaseCut ** fCuts;//! Array with cuts
93 Int_t fNCuts; //number of base cuts stored in fCuts
95 Int_t fPID; //particle PID - if=0 (rootino) all pids are accepted
98 static const Int_t fgkMaxCuts; //Size of the fCuts array
100 ClassDef(AliAODParticleCut,1)
102 /******************************************************************/
103 /******************************************************************/
104 /******************************************************************/
106 class AliAODParticleEmptyCut: public AliAODParticleCut
108 //Empty - it passes possitively all particles - it means returns always False
109 //Class describing cut on particles
111 AliAODParticleEmptyCut(){};
112 virtual ~AliAODParticleEmptyCut(){};
114 Bool_t Rejected(AliVAODParticle*) const {return kFALSE;} //accept everything
115 Bool_t IsEmpty() const {return kTRUE;}
117 ClassDef(AliAODParticleEmptyCut,1)
121 /******************************************************************/
122 /******************************************************************/
123 /******************************************************************/