Temporary: do not link AliHLTMUON.so
[u/mrichter/AliRoot.git] / ANALYSIS / AliAODPairBaseCut.h
CommitLineData
073745bc 1#ifndef ALIAODPAIRBASECUT_H
2#define ALIAODPAIRBASECUT_H
0206ddfb 3// Base class AliAODPairBaseCut:
4// This class defines the range of some property - pure virtual
5// Property is coded by AliAODCutTypes type
6// Derived classes:
7// AliAODQInvCut
8// AliAODKtCut
9// AliAODKStarCut
10// AliAODKStarOutCut
11// AliAODKStarSideCut
12// AliAODKStarLongCut
13// AliAODQSideLCMSCut
14// AliAODQOutLCMSCut
15// AliAODQLongLCMSCut
16// AliAODDeltaECut
17// AliAODDeltaPCut
18// AliAODDeltaPvectorCut
19// AliAODDeltaPhiCut
20// AliAODDeltaThetaCut
21// AliAODCluterOverlapCut
22// AliAODAvSeparationCut
23// AliAODSeparationCut
24// AliAODITSSeparationCut
25// AliAODOutSideSameSignCut
26// AliAODOutSideDiffSignCut
27// AliAODLogicalOperPairCut
28// AliAODOrPairCut
29// AliAODAndPairCut
073745bc 30
0206ddfb 31#include <TObject.h>
073745bc 32#include "AliAODPair.h"
33
34
35class AliAODPairBaseCut: public TObject
36{
073745bc 37 public:
38
39 enum EAODPairCutProperty
40 {
41 kHbtPairCutPropQInv, //Q invariant
42 kHbtPairCutPropKt,
43 kHbtPairCutPropKStar,
fe3f2f54 44 kHbtPairCutPropKStarOut,
45 kHbtPairCutPropKStarSide,
46 kHbtPairCutPropKStarLong,
073745bc 47 kHbtPairCutPropQSideLCMS,
48 kHbtPairCutPropQOutLCMS,
49 kHbtPairCutPropQLongLCMS,
50 kHbtPairCutPropDeltaPhi,
51 kHbtPairCutPropDeltaTheta,
b327f095 52 kHbtPairCutPropDeltaE,
53 kHbtPairCutPropDeltaP,//scalar difference
54 kHbtPairCutPropDeltaPvector,//legth of the momenta difference vector
073745bc 55 kHbtPairCutPropDeltaPt,
56 kHbtPairCutPropAvSepar,
57 kHbtPairCutPropSepar,
58 kHbtPairCutPropClOverlap,
59 kHbtPairCutPropPixelSepar,
60 kHbtPairCutPropNone
61 };
62
63 AliAODPairBaseCut(Double_t min = 0.0, Double_t max = 0.0, EAODPairCutProperty prop= kHbtPairCutPropNone):
64 fMin(min),fMax(max),fProperty(prop){}
65
66 virtual ~AliAODPairBaseCut(){}
67
68 virtual Bool_t Rejected(AliAODPair* pair) const;
69
70 void SetRange(Double_t min, Double_t max){fMin = min; fMax = max;}
71
72 void SetMinimum(Double_t min){fMin = min;}
73 void SetMaximum(Double_t max){fMax = max;}
74
75 Double_t GetMinimum() const {return fMin;}
76 Double_t GetMaximum() const {return fMax;}
77
78 EAODPairCutProperty GetProperty() const {return fProperty;}
79
80 protected:
81 virtual Double_t GetValue(AliAODPair* pair) const = 0;
82
83 Double_t fMin; // Lower boundary of the range
84 Double_t fMax; // Upper boundary of the range
85
86 EAODPairCutProperty fProperty; // The property itself
87
88 ClassDef(AliAODPairBaseCut,1)
89
90 };
91/******************************************************************/
92
93inline Bool_t AliAODPairBaseCut::Rejected(AliAODPair* pair) const
94{
95 //checks if pair proprty is in range
96 //null pointer check is made by AliAODPairCut, so here is unnecesary
97
98 Double_t value = GetValue(pair);
99 if ( (value > fMin) && (value <fMax ) ) return kFALSE; //accepted
100 else return kTRUE; //rejected
101}
102/******************************************************************/
103/******************************************************************/
104/******************************************************************/
105
106class AliAODQInvCut: public AliAODPairBaseCut
107{
108 public:
109 AliAODQInvCut(Double_t min = 0.0, Double_t max = 0.0):AliAODPairBaseCut(min,max,kHbtPairCutPropQInv){}
110 virtual ~AliAODQInvCut(){}
111 protected:
112 virtual Double_t GetValue(AliAODPair* pair) const {return pair->GetQInv();}
113
114 ClassDef(AliAODQInvCut,1)
115 };
116/******************************************************************/
117
118class AliAODKtCut: public AliAODPairBaseCut {
119 public:
120 AliAODKtCut(Double_t min = 0.0, Double_t max = 0.0):AliAODPairBaseCut(min,max,kHbtPairCutPropKt){}
121 virtual ~AliAODKtCut(){}
122 protected:
123 virtual Double_t GetValue(AliAODPair* pair) const {return pair->GetKt();}
124
125 ClassDef(AliAODKtCut,1)
126 };
127/******************************************************************/
128
129class AliAODKStarCut: public AliAODPairBaseCut
130{
131 public:
132 AliAODKStarCut(Double_t min = 0.0, Double_t max = 0.0):AliAODPairBaseCut(min,max,kHbtPairCutPropKStar){}
133 virtual ~AliAODKStarCut(){}
134 protected:
135 virtual Double_t GetValue(AliAODPair* pair) const {return pair->GetKStar();}
136
137 ClassDef(AliAODKStarCut,1)
138};
139/******************************************************************/
140
fe3f2f54 141class AliAODKStarOutCut: public AliAODPairBaseCut
142{
143 public:
144 AliAODKStarOutCut(Double_t min = 0.0, Double_t max = 0.0):AliAODPairBaseCut(min,max,kHbtPairCutPropKStarOut){}
145 virtual ~AliAODKStarOutCut(){}
146 protected:
147 virtual Double_t GetValue(AliAODPair* pair) const {return pair->GetKStarOut();}
148
149 ClassDef(AliAODKStarOutCut,1)
150};
151/******************************************************************/
152class AliAODKStarSideCut: public AliAODPairBaseCut
153{
154 public:
155 AliAODKStarSideCut(Double_t min = 0.0, Double_t max = 0.0):AliAODPairBaseCut(min,max,kHbtPairCutPropKStarSide){}
156 virtual ~AliAODKStarSideCut(){}
157 protected:
158 virtual Double_t GetValue(AliAODPair* pair) const {return pair->GetKStarSide();}
159
160 ClassDef(AliAODKStarSideCut,1)
161};
162
163/******************************************************************/
164
165class AliAODKStarLongCut: public AliAODPairBaseCut
166{
167 public:
168 AliAODKStarLongCut(Double_t min = 0.0, Double_t max = 0.0):AliAODPairBaseCut(min,max,kHbtPairCutPropKStarLong){}
169 virtual ~AliAODKStarLongCut(){}
170 protected:
171 virtual Double_t GetValue(AliAODPair* pair) const {return pair->GetKStarLong();}
172
173 ClassDef(AliAODKStarLongCut,1)
174};
175/******************************************************************/
176
073745bc 177class AliAODQSideLCMSCut: public AliAODPairBaseCut
178{
179 public:
180 AliAODQSideLCMSCut(Double_t min = 0.0, Double_t max = 0.0):
181 AliAODPairBaseCut(min,max,kHbtPairCutPropQSideLCMS){}
182 virtual ~AliAODQSideLCMSCut(){}
183 protected:
184 virtual Double_t GetValue(AliAODPair* pair) const
185 {return pair->GetQSideLCMS();}
186
187 ClassDef(AliAODQSideLCMSCut,1)
188};
189/******************************************************************/
190
191
192class AliAODQOutLCMSCut: public AliAODPairBaseCut
193{
194 public:
195 AliAODQOutLCMSCut(Double_t min = 0.0, Double_t max = 0.0):
196 AliAODPairBaseCut(min,max,kHbtPairCutPropQOutLCMS){}
197 virtual ~AliAODQOutLCMSCut(){}
198 protected:
199 virtual Double_t GetValue(AliAODPair* pair) const
200 {return pair->GetQOutLCMS();}
201
202 ClassDef(AliAODQOutLCMSCut,1)
203};
204/******************************************************************/
205
206class AliAODQLongLCMSCut: public AliAODPairBaseCut
207{
208 public:
209 AliAODQLongLCMSCut(Double_t min = 0.0, Double_t max = 0.0):
210 AliAODPairBaseCut(min,max,kHbtPairCutPropQLongLCMS){}
211 virtual ~AliAODQLongLCMSCut(){}
212 protected:
213 virtual Double_t GetValue(AliAODPair* pair) const
214 {return pair->GetQLongLCMS();}
215
216 ClassDef(AliAODQLongLCMSCut,1)
217};
218/******************************************************************/
219
b327f095 220class AliAODDeltaECut: public AliAODPairBaseCut
221{
222 public:
223 AliAODDeltaECut(Double_t min = 0.0, Double_t max = 0.0):
224 AliAODPairBaseCut(min,max,kHbtPairCutPropDeltaE){}
225 virtual ~AliAODDeltaECut(){}
226 protected:
227 virtual Double_t GetValue(AliAODPair* pair) const
228 {return pair->GetDeltaE();}
229
230 ClassDef(AliAODDeltaECut,1)
231};
232/******************************************************************/
233
234class AliAODDeltaPCut: public AliAODPairBaseCut
235{
236 public:
237 AliAODDeltaPCut(Double_t min = 0.0, Double_t max = 0.0):
238 AliAODPairBaseCut(min,max,kHbtPairCutPropDeltaP){}
239 virtual ~AliAODDeltaPCut(){}
240 protected:
241 virtual Double_t GetValue(AliAODPair* pair) const
242 {return pair->GetDeltaP();}
243
244 ClassDef(AliAODDeltaPCut,1)
245};
246/******************************************************************/
247
248class AliAODDeltaPvectorCut: public AliAODPairBaseCut
249{
250 public:
251 AliAODDeltaPvectorCut(Double_t min = 0.0, Double_t max = 0.0):
252 AliAODPairBaseCut(min,max,kHbtPairCutPropDeltaPvector){}
253 virtual ~AliAODDeltaPvectorCut(){}
254 protected:
255 virtual Double_t GetValue(AliAODPair* pair) const
256 {return pair->GetDeltaPvector();}
257
258 ClassDef(AliAODDeltaPvectorCut,1)
259};
260/******************************************************************/
261
073745bc 262class AliAODDeltaPhiCut: public AliAODPairBaseCut
263{
264 public:
265 AliAODDeltaPhiCut(Double_t min = 0.0, Double_t max = 0.0):
266 AliAODPairBaseCut(min,max,kHbtPairCutPropDeltaPhi){}
267 virtual ~AliAODDeltaPhiCut(){}
268 protected:
269 virtual Double_t GetValue(AliAODPair* pair) const
270 {return TMath::Abs(pair->GetDeltaPhi());}
271
272 ClassDef(AliAODDeltaPhiCut,1)
273};
274/******************************************************************/
275
276class AliAODDeltaThetaCut: public AliAODPairBaseCut
277{
278 public:
279 AliAODDeltaThetaCut(Double_t min = 0.0, Double_t max = 0.0):
280 AliAODPairBaseCut(min,max,kHbtPairCutPropDeltaTheta){}
281 virtual ~AliAODDeltaThetaCut(){}
282 protected:
283 virtual Double_t GetValue(AliAODPair* pair) const
284 {return TMath::Abs(pair->GetDeltaTheta());}
285
286 ClassDef(AliAODDeltaThetaCut,1)
287};
288/******************************************************************/
289
290class AliAODCluterOverlapCut: public AliAODPairBaseCut
291{
292 public:
293 AliAODCluterOverlapCut(Double_t min = 0.0, Double_t max = 1e5):
294 AliAODPairBaseCut(min,max,kHbtPairCutPropClOverlap){}
295 virtual ~AliAODCluterOverlapCut(){}
296
297 protected:
298 virtual Double_t GetValue(AliAODPair* pair) const;
299 ClassDef(AliAODCluterOverlapCut,1)
300};
301/******************************************************************/
302
303class AliAODAvSeparationCut: public AliAODPairBaseCut
304{
305 public:
306 AliAODAvSeparationCut(Double_t min = 0.0, Double_t max = 1e5):
307 AliAODPairBaseCut(min,max,kHbtPairCutPropAvSepar){}
308 virtual ~AliAODAvSeparationCut(){}
309
310 protected:
311 virtual Double_t GetValue(AliAODPair* pair) const;
312 ClassDef(AliAODAvSeparationCut,1)
313};
314/******************************************************************/
315
316class AliAODSeparationCut: public AliAODPairBaseCut
317{
318 public:
319 AliAODSeparationCut(Double_t min = 0.0, Double_t max = 1e5, Int_t point = 0):
320 AliAODPairBaseCut(min,max,kHbtPairCutPropSepar),fPoint(point){}
321 virtual ~AliAODSeparationCut(){}
322
323 protected:
324 Int_t fPoint;//index of the point that distance should be measured
325 virtual Double_t GetValue(AliAODPair* pair) const;
326 ClassDef(AliAODSeparationCut,1)
327};
328/******************************************************************/
329
330class AliAODITSSeparationCut: public AliAODPairBaseCut
331{
332//Anti merging cut for the first layer of pixels
333 public:
334 AliAODITSSeparationCut(Int_t layer = 0, Double_t deltarphi = 0.01, Double_t deltaz = 0.08):
335 AliAODPairBaseCut(deltarphi,deltaz,kHbtPairCutPropPixelSepar),fLayer(layer){}
336 virtual ~AliAODITSSeparationCut(){}
337 Bool_t Rejected(AliAODPair* pair) const;
338 Int_t GetLayer() const {return fLayer;}
339 protected:
340 Int_t fLayer;//index of the layer that distance should be measured 0: 1st pixels
341 virtual Double_t GetValue(AliAODPair* /*pair*/) const {return 0.0;}//not used
342 ClassDef(AliAODITSSeparationCut,1)
343};
344/******************************************************************/
345
346class AliAODOutSideSameSignCut: public AliAODPairBaseCut
347{
348 public:
349 AliAODOutSideSameSignCut(){}
350 virtual ~AliAODOutSideSameSignCut(){}
351 virtual Bool_t Rejected(AliAODPair *p) const;
352 protected:
353 virtual Double_t GetValue(AliAODPair* /*pair*/) const {return 0.0;}
354 ClassDef(AliAODOutSideSameSignCut,1)
355};
356/******************************************************************/
357
358class AliAODOutSideDiffSignCut: public AliAODPairBaseCut
359{
360 public:
361 AliAODOutSideDiffSignCut(){}
362 virtual ~AliAODOutSideDiffSignCut(){}
363 virtual Bool_t Rejected(AliAODPair *p) const;
364 protected:
365 virtual Double_t GetValue(AliAODPair* /*pair*/) const {return 0.0;}
366 ClassDef(AliAODOutSideDiffSignCut,1)
367};
368/******************************************************************/
369
370class AliAODLogicalOperPairCut: public AliAODPairBaseCut
371 {
372 public:
373 AliAODLogicalOperPairCut();
374 AliAODLogicalOperPairCut(AliAODPairBaseCut* first, AliAODPairBaseCut* second);
375 virtual ~AliAODLogicalOperPairCut();
376 protected:
377 Double_t GetValue(AliAODPair * /*pair*/) const {MayNotUse("GetValue");return 0.0;}
378
379 AliAODPairBaseCut* fFirst; //second cut
380 AliAODPairBaseCut* fSecond; //first cut
381 private:
af250cbf 382 AliAODLogicalOperPairCut(const AliAODLogicalOperPairCut & src);
383 AliAODLogicalOperPairCut & operator=(const AliAODLogicalOperPairCut & src);
073745bc 384 class AliAODDummyBasePairCut: public AliAODPairBaseCut
385 {
386 Double_t GetValue(AliAODPair* /*pair*/) const {return 0.0;}
387 Bool_t Rejected(AliAODPair* /*pair*/) const;
388 };
389
390 ClassDef(AliAODLogicalOperPairCut,1)
391 };
392/******************************************************************/
393
394class AliAODOrPairCut: public AliAODLogicalOperPairCut
395{
396 public:
397 AliAODOrPairCut(){}
398 AliAODOrPairCut(AliAODPairBaseCut* first, AliAODPairBaseCut* second):AliAODLogicalOperPairCut(first,second){}
399 virtual ~AliAODOrPairCut(){}
400 Bool_t Rejected(AliAODPair *p) const;
401 ClassDef(AliAODOrPairCut,1)
402};
403/******************************************************************/
404
405class AliAODAndPairCut: public AliAODLogicalOperPairCut
406{
407 public:
408 AliAODAndPairCut(){}
409 AliAODAndPairCut(AliAODPairBaseCut* first, AliAODPairBaseCut* second):AliAODLogicalOperPairCut(first,second){}
410 virtual ~AliAODAndPairCut(){}
411 Bool_t Rejected(AliAODPair *p) const;
412 ClassDef(AliAODAndPairCut,1)
413};
414
415#endif