cuts on Q out, side, long added
[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);
a37908e0 43 void SetQOutCMSLRange(Double_t min, Double_t max);
44 void SetQSideCMSLRange(Double_t min, Double_t max);
45 void SetQLongCMSLRange(Double_t min, Double_t max);
46
1b446896 47 protected:
48 AliHBTParticleCut* fFirstPartCut;
49 AliHBTParticleCut* fSecondPartCut;
50
51 AliHbtBasePairCut** fCuts; //!
52 Int_t fNCuts;
53
54
55 AliHbtBasePairCut* FindCut(AliHBTPairCutProperty);
56 private:
57 static const Int_t fkgMaxCuts;
58 public:
59 ClassDef(AliHBTPairCut,1)
60
61};
62/******************************************************************/
63/******************************************************************/
64/******************************************************************/
65
66class AliHBTEmptyPairCut: public AliHBTPairCut
67{
68//Empty - it passes possitively all particles - it means returns always False
69//Class describing cut on pairs of particles
70 public:
71 AliHBTEmptyPairCut(){};
72 AliHBTEmptyPairCut(const AliHBTEmptyPairCut&){};
73 virtual ~AliHBTEmptyPairCut(){};
74
75 Bool_t Pass(AliHBTPair*) {return kFALSE;} //accpept everything
76
77 ClassDef(AliHBTEmptyPairCut,1)
78
79};
80
81
82
83/******************************************************************/
84/******************************************************************/
85/******************************************************************/
86
87class AliHbtBasePairCut: public TObject
88 {
89 //This class defines the range of some property - pure virtual
90 //Property is coded by AliHBTCutTypes type
91
92 public:
93
94 AliHbtBasePairCut(Double_t min = 0.0, Double_t max = 0.0, AliHBTPairCutProperty prop= kHbtPairCutPropNone):
95 fMin(min),fMax(max),fProperty(prop){}
96
97 virtual ~AliHbtBasePairCut(){}
98
99 Bool_t Pass(AliHBTPair*);
100
101 void SetRange(Double_t min, Double_t max){fMin = min; fMax = max;}
102
103 void SetMinimum(Double_t min){fMin = min;}
104 void SetMaximum(Double_t max){fMax = max;}
105
106 Double_t GetMinimum() const {return fMin;}
107 Double_t GetMaximum() const {return fMax;}
108
109 AliHBTPairCutProperty GetProperty() const {return fProperty;}
110
111 protected:
112 virtual Double_t GetValue(AliHBTPair*) = 0;
113
114 Double_t fMin;
115 Double_t fMax;
116
117 AliHBTPairCutProperty fProperty;
118
119 private:
120 public:
121 ClassDef(AliHbtBasePairCut,1)
122
123 };
124
125inline Bool_t
126AliHbtBasePairCut::Pass(AliHBTPair* pair)
127 {
128 Double_t value = GetValue(pair);
129 if ( (value > fMin) && (value <fMax ) ) return kFALSE; //accepted
130 else return kTRUE; //rejected
131 }
132/******************************************************************/
133/******************************************************************/
134/******************************************************************/
135class AliHBTQInvCut: public AliHbtBasePairCut
136 {
137 public:
138 AliHBTQInvCut(Double_t min = 0.0, Double_t max = 0.0):AliHbtBasePairCut(min,max,kHbtPairCutPropQInv){}
139 virtual ~AliHBTQInvCut(){}
140 protected:
141 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetQInv();}
142 private:
143 public:
144 ClassDef(AliHBTQInvCut,1)
145 };
146
bce80f3b 147
148class AliHBTKtCut: public AliHbtBasePairCut
149 {
150 public:
151 AliHBTKtCut(Double_t min = 0.0, Double_t max = 0.0):AliHbtBasePairCut(min,max,kHbtPairCutPropKt){}
152 virtual ~AliHBTKtCut(){}
153 protected:
154 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetKt();}
155 private:
156 public:
157 ClassDef(AliHBTKtCut,1)
158 };
159
2d5d4d7d 160
161class AliHBTQSideCMSLCCut: public AliHbtBasePairCut
162 {
163 public:
164 AliHBTQSideCMSLCCut(Double_t min = 0.0, Double_t max = 0.0):
165 AliHbtBasePairCut(min,max,kHbtPairCutPropQSideCMSLC){}
166 virtual ~AliHBTQSideCMSLCCut(){}
167 protected:
168 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetQSideCMSLC();}
169 private:
170 public:
171 ClassDef(AliHBTQSideCMSLCCut,1)
172 };
173
174
175class AliHBTQOutCMSLCCut: public AliHbtBasePairCut
176 {
177 public:
178 AliHBTQOutCMSLCCut(Double_t min = 0.0, Double_t max = 0.0):
179 AliHbtBasePairCut(min,max,kHbtPairCutPropQOutCMSLC){}
180 virtual ~AliHBTQOutCMSLCCut(){}
181 protected:
182 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetQOutCMSLC();}
183 private:
184 public:
185 ClassDef(AliHBTQOutCMSLCCut,1)
186 };
187
188class AliHBTQLongCMSLCCut: public AliHbtBasePairCut
189 {
190 public:
191 AliHBTQLongCMSLCCut(Double_t min = 0.0, Double_t max = 0.0):
192 AliHbtBasePairCut(min,max,kHbtPairCutPropQLongCMSLC){}
193 virtual ~AliHBTQLongCMSLCCut(){}
194 protected:
195 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetQLongCMSLC();}
196 private:
197 public:
198 ClassDef(AliHBTQLongCMSLCCut,1)
199 };
200
1b446896 201#endif