Qinv calculation corrected
[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
18 kHbtPairCutPropNone
19 };
20
21class AliHBTPairCut: public TObject
22{
23 public:
24 AliHBTPairCut();
25 AliHBTPairCut(const AliHBTPairCut&);
26
27 virtual ~AliHBTPairCut();
28 virtual Bool_t Pass(AliHBTPair*);
29
30 void SetFirstPartCut(AliHBTParticleCut*); //sets the cut on the first particle
31 void SetSecondPartCut(AliHBTParticleCut*); //sets the cut on the first particle
32
33 void SetPartCut(AliHBTParticleCut*);//sets the the same cut on both particles
34
35 void AddBasePairCut(AliHbtBasePairCut*);
36
37 void SetQInvRange(Double_t min, Double_t max);
38
39 protected:
40 AliHBTParticleCut* fFirstPartCut;
41 AliHBTParticleCut* fSecondPartCut;
42
43 AliHbtBasePairCut** fCuts; //!
44 Int_t fNCuts;
45
46
47 AliHbtBasePairCut* FindCut(AliHBTPairCutProperty);
48 private:
49 static const Int_t fkgMaxCuts;
50 public:
51 ClassDef(AliHBTPairCut,1)
52
53};
54/******************************************************************/
55/******************************************************************/
56/******************************************************************/
57
58class AliHBTEmptyPairCut: public AliHBTPairCut
59{
60//Empty - it passes possitively all particles - it means returns always False
61//Class describing cut on pairs of particles
62 public:
63 AliHBTEmptyPairCut(){};
64 AliHBTEmptyPairCut(const AliHBTEmptyPairCut&){};
65 virtual ~AliHBTEmptyPairCut(){};
66
67 Bool_t Pass(AliHBTPair*) {return kFALSE;} //accpept everything
68
69 ClassDef(AliHBTEmptyPairCut,1)
70
71};
72
73
74
75/******************************************************************/
76/******************************************************************/
77/******************************************************************/
78
79class AliHbtBasePairCut: public TObject
80 {
81 //This class defines the range of some property - pure virtual
82 //Property is coded by AliHBTCutTypes type
83
84 public:
85
86 AliHbtBasePairCut(Double_t min = 0.0, Double_t max = 0.0, AliHBTPairCutProperty prop= kHbtPairCutPropNone):
87 fMin(min),fMax(max),fProperty(prop){}
88
89 virtual ~AliHbtBasePairCut(){}
90
91 Bool_t Pass(AliHBTPair*);
92
93 void SetRange(Double_t min, Double_t max){fMin = min; fMax = max;}
94
95 void SetMinimum(Double_t min){fMin = min;}
96 void SetMaximum(Double_t max){fMax = max;}
97
98 Double_t GetMinimum() const {return fMin;}
99 Double_t GetMaximum() const {return fMax;}
100
101 AliHBTPairCutProperty GetProperty() const {return fProperty;}
102
103 protected:
104 virtual Double_t GetValue(AliHBTPair*) = 0;
105
106 Double_t fMin;
107 Double_t fMax;
108
109 AliHBTPairCutProperty fProperty;
110
111 private:
112 public:
113 ClassDef(AliHbtBasePairCut,1)
114
115 };
116
117inline Bool_t
118AliHbtBasePairCut::Pass(AliHBTPair* pair)
119 {
120 Double_t value = GetValue(pair);
121 if ( (value > fMin) && (value <fMax ) ) return kFALSE; //accepted
122 else return kTRUE; //rejected
123 }
124/******************************************************************/
125/******************************************************************/
126/******************************************************************/
127class AliHBTQInvCut: public AliHbtBasePairCut
128 {
129 public:
130 AliHBTQInvCut(Double_t min = 0.0, Double_t max = 0.0):AliHbtBasePairCut(min,max,kHbtPairCutPropQInv){}
131 virtual ~AliHBTQInvCut(){}
132 protected:
133 virtual Double_t GetValue(AliHBTPair* pair){return pair->GetQInv();}
134 private:
135 public:
136 ClassDef(AliHBTQInvCut,1)
137 };
138
139#endif