]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIEVENTBASECUT_H | |
2 | #define ALIEVENTBASECUT_H | |
3 | //________________________________ | |
4 | /////////////////////////////////////////////////////////// | |
5 | // | |
6 | // class AliEventBaseCut | |
7 | // | |
8 | // Base class for cauts that checks only one event property | |
9 | // | |
10 | // Piotr.Skowronski@cern.ch | |
11 | // | |
12 | /////////////////////////////////////////////////////////// | |
13 | ||
14 | #include "TObject.h" | |
15 | ||
16 | class AliAOD; | |
17 | ||
18 | class AliEventBaseCut: public TObject | |
19 | { | |
20 | public: | |
21 | enum EEventCutProperty { | |
22 | kPrimVertexXCut,kPrimVertexYCut,kPrimVertexZCut, | |
23 | kNChargedCut,kNone | |
24 | }; | |
25 | ||
26 | AliEventBaseCut(); | |
27 | AliEventBaseCut(Double_t min,Double_t max, EEventCutProperty prop = kNone); | |
28 | virtual ~AliEventBaseCut(){} | |
29 | virtual Bool_t Rejected(AliAOD* aod) const;//returns kTRUE if rejected | |
30 | virtual void SetRange(Double_t min, Double_t max){fMin = min; fMax = max;} | |
31 | ||
32 | virtual EEventCutProperty GetProperty()const{return fProperty;} | |
33 | ||
34 | protected: | |
35 | virtual Double_t GetValue(AliAOD* aod) const = 0; | |
36 | ||
37 | Double_t fMin;//Minimum value | |
38 | Double_t fMax;//Maximum value | |
39 | EEventCutProperty fProperty;//Defines the type of the cut - used by the setters cut | |
40 | ||
41 | private: | |
42 | ClassDef(AliEventBaseCut,1) | |
43 | }; | |
44 | ||
45 | /************************************************************/ | |
46 | ||
47 | class AliPrimVertexXCut: public AliEventBaseCut | |
48 | { | |
49 | public: | |
50 | AliPrimVertexXCut():AliEventBaseCut(0,0,kPrimVertexXCut){} | |
51 | AliPrimVertexXCut(Double_t min,Double_t max):AliEventBaseCut(min,max,kPrimVertexXCut){} | |
52 | virtual ~AliPrimVertexXCut(){} | |
53 | protected: | |
54 | Double_t GetValue(AliAOD* aod) const; | |
55 | ||
56 | private: | |
57 | ClassDef(AliPrimVertexXCut,1) | |
58 | }; | |
59 | /************************************************************/ | |
60 | ||
61 | class AliPrimVertexYCut: public AliEventBaseCut | |
62 | { | |
63 | public: | |
64 | AliPrimVertexYCut():AliEventBaseCut(0,0,kPrimVertexYCut){} | |
65 | AliPrimVertexYCut(Double_t min,Double_t max):AliEventBaseCut(min,max,kPrimVertexYCut){} | |
66 | virtual ~AliPrimVertexYCut(){} | |
67 | ||
68 | protected: | |
69 | Double_t GetValue(AliAOD* aod) const; | |
70 | ||
71 | private: | |
72 | ClassDef(AliPrimVertexYCut,1) | |
73 | }; | |
74 | /************************************************************/ | |
75 | ||
76 | class AliPrimVertexZCut: public AliEventBaseCut | |
77 | { | |
78 | public: | |
79 | AliPrimVertexZCut():AliEventBaseCut(0,0,kPrimVertexZCut){} | |
80 | AliPrimVertexZCut(Double_t min,Double_t max):AliEventBaseCut(min,max,kPrimVertexZCut){} | |
81 | virtual ~AliPrimVertexZCut(){} | |
82 | protected: | |
83 | Double_t GetValue(AliAOD* aod) const; | |
84 | ||
85 | private: | |
86 | ClassDef(AliPrimVertexZCut,1) | |
87 | }; | |
88 | ||
89 | ||
90 | /************************************************************/ | |
91 | ||
92 | class AliNChargedCut: public AliEventBaseCut | |
93 | { | |
94 | public: | |
95 | AliNChargedCut():AliEventBaseCut(0,0,kNChargedCut){} | |
96 | AliNChargedCut(Double_t min, Double_t max, Double_t etamin = -10.0, Double_t etamax = 10.0): | |
97 | AliEventBaseCut(min,max,kNChargedCut),fEtaMin(etamin),fEtaMax(etamax){} | |
98 | virtual ~AliNChargedCut(){} | |
99 | ||
100 | void SetEtaRange(Double_t min,Double_t max){fEtaMin = min;fEtaMax = max;} | |
101 | protected: | |
102 | Double_t GetValue(AliAOD* aod) const; | |
103 | Double_t fEtaMin;//Defines max of eta range where mult is caclulated | |
104 | Double_t fEtaMax;//Defines min of eta range where mult is caclulated | |
105 | ||
106 | private: | |
107 | ClassDef(AliNChargedCut,1) | |
108 | }; | |
109 | ||
110 | ||
111 | #endif |