AliHBTFunction destructor moved to cxx
[u/mrichter/AliRoot.git] / HBTAN / AliHBTFunction.h
CommitLineData
1b446896 1//Piotr Skowronski@cern.ch
2
3#ifndef ALIHBTFUNCTION_H
4#define ALIHBTFUNCTION_H
5
6#include "AliHBTParticleCut.h"
7#include "AliHBTPairCut.h"
8#include "AliHBTPair.h"
9
10#include <TH2.h>
11#include <TH3.h>
12
13
14class AliHBTAnalysis;
15
16class AliHBTFunction: public TNamed
17//Abstract base class for HBT functions
18{
19 public:
20 AliHBTFunction();
856180e9 21 virtual ~AliHBTFunction();
1b446896 22
23 virtual TH1* GetNumerator() =0;
24 virtual TH1* GetDenominator() =0;
25 virtual TH1* GetResult() = 0;
976183fd 26
1b446896 27 virtual void Write();
28
29 TH1* GetRatio(Double_t normfactor = 1.0);
30 void Rename(const Char_t * name); //renames the function and histograms ==title is the same that name
31 void Rename(const Char_t * name, const Char_t * title); //renames and retitle the function and histograms
32
33 void SetPairCut(AliHBTPairCut*);
34
35 virtual AliHBTPair* CheckPair(AliHBTPair* pair);
36
37 protected:
38
39 AliHBTPairCut* fPairCut;
40
41 public:
42 ClassDef(AliHBTFunction,1)
43};
976183fd 44/******************************************************************/
1b446896 45inline AliHBTPair* AliHBTFunction::CheckPair(AliHBTPair* pair)
46{
47 //check if pair and both particles meets the cut criteria
48 if(fPairCut->Pass(pair)) //if the pair is BAD
49 {//it is BAD
50 pair = pair->GetSwapedPair();
51 if(fPairCut->Pass(pair)) //so try reverse combination
52 {
53 return 0x0;//it is BAD as well - so return
54 }
55 }
56 return pair;
57}
58
1b446896 59/******************************************************************/
60/******************************************************************/
61/******************************************************************/
62class AliHBTTwoPartFctn: public AliHBTFunction
63{
64 public:
65 AliHBTTwoPartFctn(){}
66 virtual ~AliHBTTwoPartFctn(){}
67
68 virtual void ProcessSameEventParticles(AliHBTPair* pair) = 0;
69 virtual void ProcessDiffEventParticles(AliHBTPair* pair) = 0;
976183fd 70
71
1b446896 72
73 protected:
74 public:
75 ClassDef(AliHBTTwoPartFctn,1)
76
77};
78/******************************************************************/
79/******************************************************************/
80/******************************************************************/
81class AliHBTFourPartFctn: public AliHBTFunction
82{
83 public:
84 AliHBTFourPartFctn(){};
85 virtual ~AliHBTFourPartFctn(){};
86
87 virtual void
88 ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
89 virtual void
90 ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
976183fd 91
1b446896 92
93 protected:
94 public:
95 ClassDef(AliHBTFourPartFctn,1)
96
97};
98/******************************************************************/
99/******************************************************************/
100/******************************************************************/
101
102
103class AliHBTTwoPartFctn1D: public AliHBTTwoPartFctn
104{
105 public:
106 AliHBTTwoPartFctn1D(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
107 virtual ~AliHBTTwoPartFctn1D();
108
109
110 TH1* GetNumerator(){return fNumerator;}
111 TH1* GetDenominator(){return fDenominator;}
112
113 void ProcessSameEventParticles(AliHBTPair* pair);
114 void ProcessDiffEventParticles(AliHBTPair* pair);
976183fd 115 Double_t Scale();
116 void SetNumberOfBinsToScale();
1b446896 117 protected:
118 //retruns velue to be histogrammed
119 virtual Double_t GetValue(AliHBTPair* pair) = 0;
976183fd 120
1b446896 121 TH1D* fNumerator;
122 TH1D* fDenominator;
976183fd 123 Int_t fNBinsToScale;
1b446896 124
125 public:
976183fd 126 ClassDef(AliHBTTwoPartFctn1D,2)
1b446896 127};
128
1b446896 129/******************************************************************/
130/******************************************************************/
131/******************************************************************/
132
133class AliHBTTwoPartFctn2D: public AliHBTTwoPartFctn
134{
135 public:
136 AliHBTTwoPartFctn2D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
137 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15);
138 ~AliHBTTwoPartFctn2D();
139
140 TH1* GetNumerator(){return fNumerator;}
141 TH1* GetDenominator(){return fDenominator;}
142
143 void ProcessSameEventParticles(AliHBTPair* pair);
144 void ProcessDiffEventParticles(AliHBTPair* pair);
145
976183fd 146
1b446896 147 protected:
976183fd 148 virtual void GetValues(AliHBTPair* pair, Double_t&, Double_t&) = 0;
149
1b446896 150 TH2D* fNumerator;
151 TH2D* fDenominator;
152
153 public:
154 ClassDef(AliHBTTwoPartFctn2D,1)
155};
156/******************************************************************/
157/******************************************************************/
158/******************************************************************/
159
160class AliHBTTwoPartFctn3D: public AliHBTTwoPartFctn
161{
162 public:
163 AliHBTTwoPartFctn3D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
164 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15,
165 Int_t nZbins = 200, Double_t maxZval = .15, Double_t minZval =-0.15);
166
167 virtual ~AliHBTTwoPartFctn3D();
168
169 TH1* GetNumerator(){return fNumerator;}
170 TH1* GetDenominator(){return fDenominator;}
171
172 protected:
173 TH3D* fNumerator;
174 TH3D* fDenominator;
175 public:
176 ClassDef(AliHBTTwoPartFctn3D,1)
177};
178/******************************************************************/
179/******************************************************************/
180/******************************************************************/
181
182
183
184/******************************************************************/
185/******************************************************************/
186/******************************************************************/
187class AliHBTFourPartFctn2D: public AliHBTFourPartFctn
188{
189 public:
190 AliHBTFourPartFctn2D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
191 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15);
192 ~AliHBTFourPartFctn2D();
193
194 TH1* GetNumerator(){return fNumerator;}
195 TH1* GetDenominator(){return fDenominator;}
196
197 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
198 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
199
1b446896 200
201 protected:
976183fd 202 virtual void GetValues(AliHBTPair*,AliHBTPair*, Double_t&, Double_t&) = 0;
203
1b446896 204 TH2D* fNumerator;
205 TH2D* fDenominator;
206
207 public:
208 ClassDef(AliHBTFourPartFctn2D,1)
209};
210
211
212/******************************************************************/
213/******************************************************************/
214/******************************************************************/
215
216/******************************************************************/
217/******************************************************************/
218/******************************************************************/
219
220
221
222#endif