]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliAODParticleCut.h
Base Particle Cuts moved to the separate file. Property eneum defined namespace of...
[u/mrichter/AliRoot.git] / ANALYSIS / AliAODParticleCut.h
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   //
21 // responsible: Piotr Skowronski@cern.ch                                   //
22 //                                                                        //
23 ////////////////////////////////////////////////////////////////////////////
24
25
26 #include <TObject.h>
27 #include "AliVAODParticle.h"
28 #include "AliAODParticleBaseCut.h"
29
30
31 class AliAODParticleEmptyCut;
32 class AliAODParticleCut;
33 class AliAODParticleBaseCut;
34
35
36 /******************************************************************/
37 /******************************************************************/
38 /******************************************************************/
39
40 /******************************************************************/
41 /******************************************************************/
42 /******************************************************************/
43
44 class AliAODParticleCut: public TObject
45 {
46 //Class describing cut on particle
47   public:
48
49     AliAODParticleCut();
50     AliAODParticleCut(const AliAODParticleCut& in);
51     virtual ~AliAODParticleCut();
52     AliAODParticleCut& operator = (const AliAODParticleCut& in);
53     
54     virtual Bool_t Rejected(AliVAODParticle* p) const;
55     Bool_t IsEmpty() const {return kFALSE;}
56     
57     void AddBasePartCut(AliAODParticleBaseCut* basecut);
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      
80     AliAODParticleBaseCut* FindCut(AliAODParticleBaseCut::EAODCutProperty property);
81
82     AliAODParticleBaseCut ** fCuts;//! Array with cuts
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
96 class AliAODParticleEmptyCut:  public AliAODParticleCut
97 {
98 //Empty - it passes possitively all particles - it means returns always False
99 //Class describing cut on particles
100   public:
101     AliAODParticleEmptyCut(){};
102     virtual ~AliAODParticleEmptyCut(){};
103     
104     Bool_t Rejected(AliVAODParticle*) const {return kFALSE;} //accept everything
105     Bool_t IsEmpty() const {return kTRUE;}
106
107     ClassDef(AliAODParticleEmptyCut,1)
108  
109 };
110
111 /******************************************************************/
112 /******************************************************************/
113 /******************************************************************/
114
115
116 #endif