1 #ifndef ALIAODPARTICLECUT_H
2 #define ALIAODPARTICLECUT_H
3 //__________________________________________________________________________
4 ////////////////////////////////////////////////////////////////////////////
6 // class AliAODParticleCut //
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 //
16 // User should create (and also destroy) cuts himself //
17 // and then pass them to the Analysis And Function by a proper method //
20 // more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html //
21 // responsible: Piotr Skowronski@cern.ch //
23 ////////////////////////////////////////////////////////////////////////////
27 #include "AliVAODParticle.h"
28 #include "AliAODParticleBaseCut.h"
31 class AliAODParticleEmptyCut;
32 class AliAODParticleCut;
33 class AliAODParticleBaseCut;
36 /******************************************************************/
37 /******************************************************************/
38 /******************************************************************/
40 /******************************************************************/
41 /******************************************************************/
42 /******************************************************************/
44 class AliAODParticleCut: public TObject
46 //Class describing cut on particle
50 AliAODParticleCut(const AliAODParticleCut& in);
51 virtual ~AliAODParticleCut();
52 AliAODParticleCut& operator = (const AliAODParticleCut& in);
54 virtual Bool_t Rejected(AliVAODParticle* p) const;
55 Bool_t IsEmpty() const {return kFALSE;}
57 void AddBasePartCut(AliAODParticleBaseCut* basecut);
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);
77 void Print(void) const;
80 AliAODParticleBaseCut* FindCut(AliAODParticleBaseCut::EAODCutProperty property);
82 AliAODParticleBaseCut ** fCuts;//! Array with cuts
83 Int_t fNCuts; //number of base cuts stored in fCuts
85 Int_t fPID; //particle PID - if=0 (rootino) all pids are accepted
88 static const Int_t fgkMaxCuts; //Size of the fCuts array
90 ClassDef(AliAODParticleCut,1)
92 /******************************************************************/
93 /******************************************************************/
94 /******************************************************************/
96 class AliAODParticleEmptyCut: public AliAODParticleCut
98 //Empty - it passes possitively all particles - it means returns always False
99 //Class describing cut on particles
101 AliAODParticleEmptyCut(){};
102 virtual ~AliAODParticleEmptyCut(){};
104 Bool_t Rejected(AliVAODParticle*) const {return kFALSE;} //accept everything
105 Bool_t IsEmpty() const {return kTRUE;}
107 ClassDef(AliAODParticleEmptyCut,1)
111 /******************************************************************/
112 /******************************************************************/
113 /******************************************************************/