new ctors
[u/mrichter/AliRoot.git] / HBTAN / AliHBTPairCut.h
CommitLineData
1b446896 1//Piotr Skowronski@cern.ch
2//Class implemnts cut on the pair of particles
3//
4//more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
5
6#ifndef ALIHBTPAIRCUT_H
7#define ALIHBTPAIRCUT_H
8
9
10#include "AliHBTParticleCut.h"
11#include "AliHBTPair.h"
12
13class AliHbtBasePairCut;
14
15enum AliHBTPairCutProperty
16 {
17 kHbtPairCutPropQInv, //Q invariant
bce80f3b 18 kHbtPairCutPropKt,
2d5d4d7d 19 kHbtPairCutPropQSideCMSLC,
20 kHbtPairCutPropQOutCMSLC,
21 kHbtPairCutPropQLongCMSLC,
1b446896 22 kHbtPairCutPropNone
23 };
24
25class AliHBTPairCut: public TObject
26{
27 public:
28 AliHBTPairCut();
29 AliHBTPairCut(const AliHBTPairCut&);
30
31 virtual ~AliHBTPairCut();
32 virtual Bool_t Pass(AliHBTPair*);
33
34 void SetFirstPartCut(AliHBTParticleCut*); //sets the cut on the first particle
35 void SetSecondPartCut(AliHBTParticleCut*); //sets the cut on the first particle
36
37 void SetPartCut(AliHBTParticleCut*);//sets the the same cut on both particles
38
39 void AddBasePairCut(AliHbtBasePairCut*);
40
41 void SetQInvRange(Double_t min, Double_t max);
bce80f3b 42 void SetKtRange(Double_t min, Double_t max);
1b446896 43 protected:
44 AliHBTParticleCut* fFirstPartCut;
45 AliHBTParticleCut* fSecondPartCut;
46
47 AliHbtBasePairCut** fCuts; //!
48 Int_t fNCuts;
49
50
51 AliHbtBasePairCut* FindCut(AliHBTPairCutProperty);
52 private:
53 static const Int_t fkgMaxCuts;
54 public:
55 ClassDef(AliHBTPairCut,1)
56
57};
58/******************************************************************/
59/******************************************************************/
60/******************************************************************/
61
62class AliHBTEmptyPairCut: public AliHBTPairCut
63{
64//Empty - it passes possitively all particles - it means returns always False
65//Class describing cut on pairs of particles
66 public:
67 AliHBTEmptyPairCut(){};
68 AliHBTEmptyPairCut(const AliHBTEmptyPairCut&){};
69 virtual ~AliHBTEmptyPairCut(){};
70
71 Bool_t Pass(AliHBTPair*) {return kFALSE;} //accpept everything
72
73 ClassDef(AliHBTEmptyPairCut,1)
74
75};
76
77
78
79/******************************************************************/
80/******************************************************************/
81/******************************************************************/
82
83class AliHbtBasePairCut: public TObject
84 {
85 //This class defines the range of some property - pure virtual
86 //Property is coded by AliHBTCutTypes type
87
88 public:
89
90 AliHbtBasePairCut(Double_t min = 0.0, Double_t max = 0.0, AliHBTPairCutProperty prop= kHbtPairCutPropNone):
91 fMin(min),fMax(max),fProperty(prop){}
92
93 virtual ~AliHbtBasePairCut(){}
94
95 Bool_t Pass(AliHBTPair*);
96
97 void SetRange(Double_t min, Double_t max){fMin = min; fMax = max;}
98
99 void SetMinimum(Double_t min){fMin = min;}
100 void SetMaximum(Double_t max){fMax = max;}
101
102 Double_t GetMinimum() const {return fMin;}
103 Double_t GetMaximum() const {return fMax;}
104
105 AliHBTPairCutProperty GetProperty() const {return fProperty;}
106
107 protected:
108 virtual Double_t GetValue(AliHBTPair*) = 0;
109
110 Double_t fMin;
111 Double_t fMax;
112
113 AliHBTPairCutProperty fProperty;
114
115 private:
116 public:
117 ClassDef(AliHbtBasePairCut,1)
118
119 };
120
121inline Bool_t
122AliHbtBasePairCut::Pass(AliHBTPair* pair)
123 {
124 Double_t value = GetValue(pair);
125 if ( (value > fMin) && (value <fMax ) ) return kFALSE; //accepted
126 else return kTRUE; //rejected
127 }
128/******************************************************************/
129/******************************************************************/
130/******************************************************************/
131class AliHBTQInvCut: public AliHbtBasePairCut
132 {
133 public:
134 AliHBTQInvCut(Double_t min = 0.0, Double_t max = 0.0):AliHbtBasePairCut(min,max,kHbtPairCutPropQInv){}
135 virtual ~AliHBTQInvCut(){}
136 protected:
137 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetQInv();}
138 private:
139 public:
140 ClassDef(AliHBTQInvCut,1)
141 };
142
bce80f3b 143
144class AliHBTKtCut: public AliHbtBasePairCut
145 {
146 public:
147 AliHBTKtCut(Double_t min = 0.0, Double_t max = 0.0):AliHbtBasePairCut(min,max,kHbtPairCutPropKt){}
148 virtual ~AliHBTKtCut(){}
149 protected:
150 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetKt();}
151 private:
152 public:
153 ClassDef(AliHBTKtCut,1)
154 };
155
2d5d4d7d 156
157class AliHBTQSideCMSLCCut: public AliHbtBasePairCut
158 {
159 public:
160 AliHBTQSideCMSLCCut(Double_t min = 0.0, Double_t max = 0.0):
161 AliHbtBasePairCut(min,max,kHbtPairCutPropQSideCMSLC){}
162 virtual ~AliHBTQSideCMSLCCut(){}
163 protected:
164 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetQSideCMSLC();}
165 private:
166 public:
167 ClassDef(AliHBTQSideCMSLCCut,1)
168 };
169
170
171class AliHBTQOutCMSLCCut: public AliHbtBasePairCut
172 {
173 public:
174 AliHBTQOutCMSLCCut(Double_t min = 0.0, Double_t max = 0.0):
175 AliHbtBasePairCut(min,max,kHbtPairCutPropQOutCMSLC){}
176 virtual ~AliHBTQOutCMSLCCut(){}
177 protected:
178 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetQOutCMSLC();}
179 private:
180 public:
181 ClassDef(AliHBTQOutCMSLCCut,1)
182 };
183
184class AliHBTQLongCMSLCCut: public AliHbtBasePairCut
185 {
186 public:
187 AliHBTQLongCMSLCCut(Double_t min = 0.0, Double_t max = 0.0):
188 AliHbtBasePairCut(min,max,kHbtPairCutPropQLongCMSLC){}
189 virtual ~AliHBTQLongCMSLCCut(){}
190 protected:
191 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetQLongCMSLC();}
192 private:
193 public:
194 ClassDef(AliHBTQLongCMSLCCut,1)
195 };
196
1b446896 197#endif