SetDisplayInfo added
[u/mrichter/AliRoot.git] / HBTAN / AliHBTMonitorFunction.h
CommitLineData
a57afe91 1//Zbigniew.Chajecki@cern.ch
2
3#ifndef ALIMONITORFUNCTION_H
4#define ALIMONITORFUNCTION_H
5
6#include "AliHBTParticleCut.h"
7#include "AliHBTParticle.h"
8
9#include <TH2.h>
10#include <TH3.h>
11
12//class AliHBTAnalysis;
13
14class AliHBTMonitorFunction: public TNamed
15//Abstract base class for HBT functions
16{
17 public:
18 AliHBTMonitorFunction();
19 AliHBTMonitorFunction(const char* name,const char* title);
20 virtual ~AliHBTMonitorFunction();
21
22 virtual TH1* GetResult() = 0;
23
24 virtual void Write();
e4f2b1da 25 virtual void Init(){}
a57afe91 26 void Rename(const Char_t * name);
27 void Rename(const Char_t * name, const Char_t * title);
28
29 void SetParticleCut(AliHBTParticleCut*);
30
31 virtual AliHBTParticle* CheckParticle(AliHBTParticle* particle);
32
33 protected:
34 AliHBTParticleCut* fParticleCut;
35
36 public:
37 ClassDef(AliHBTMonitorFunction,1)
38};
39/******************************************************************/
40/******************************************************************/
41inline AliHBTParticle* AliHBTMonitorFunction::CheckParticle(AliHBTParticle* particle)
42{
43 //check if particle meets the cut criteria
44 if(fParticleCut->Pass(particle)) //if the particle is BAD
45 {
46 return 0x0;//it is BAD as well - so return
47 }
48 return particle;
49}
50
51/******************************************************************/
52/******************************************************************/
53/******************************************************************/
54
55class AliHBTMonOneParticleFctn: public AliHBTMonitorFunction
56{
57 public:
58 AliHBTMonOneParticleFctn(){}
59 AliHBTMonOneParticleFctn(const Char_t *name, const Char_t *title):AliHBTMonitorFunction(name,title){}
60 virtual ~AliHBTMonOneParticleFctn(){}
61
e4f2b1da 62 virtual void Process(AliHBTParticle* particle) = 0;
a57afe91 63
64 protected:
65 public:
66 ClassDef(AliHBTMonOneParticleFctn,1)
67
68};
69/******************************************************************/
70class AliHBTMonOneParticleFctn1D: public AliHBTMonOneParticleFctn
71{
72 public:
73 AliHBTMonOneParticleFctn1D();
74 AliHBTMonOneParticleFctn1D(Int_t nbins, Double_t maxXval, Double_t minXval);
75 AliHBTMonOneParticleFctn1D(const Char_t *name, const Char_t *title,
76 Int_t nbins = 100, Double_t maxXval = 1.4, Double_t minXval = 0.0);
77 virtual ~AliHBTMonOneParticleFctn1D();
78
79 TH1* GetResult(){return fResult;}
80
e4f2b1da 81 void Process(AliHBTParticle* particle);
a57afe91 82
83 protected:
84 virtual Double_t GetValue(AliHBTParticle* particle) = 0;
85
86 TH1D* fResult;
87
88 public:
89 ClassDef(AliHBTMonOneParticleFctn1D,2)
90};
91/******************************************************************/
92
93class AliHBTMonOneParticleFctn2D: public AliHBTMonOneParticleFctn
94{
95 public:
96 AliHBTMonOneParticleFctn2D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
97 Int_t nYbins = 200, Double_t maxYval = 1.5, Double_t minYval =-0.1);
8961c985 98 virtual ~AliHBTMonOneParticleFctn2D();
a57afe91 99
100 TH1* GetResult(){return fResult;}
101
e4f2b1da 102 void Process(AliHBTParticle* particle);
a57afe91 103
104 protected:
105 virtual void GetValues(AliHBTParticle* particle, Double_t&, Double_t&) = 0;
106
107 TH2D* fResult;
108
109 public:
110 ClassDef(AliHBTMonOneParticleFctn2D,1)
111};
112/******************************************************************/
113/******************************************************************/
114/******************************************************************/
115
116class AliHBTMonOneParticleFctn3D: public AliHBTMonOneParticleFctn
117{
118 public:
119 AliHBTMonOneParticleFctn3D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
120 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15,
121 Int_t nZbins = 200, Double_t maxZval = .15, Double_t minZval =-0.15);
122
123 virtual ~AliHBTMonOneParticleFctn3D();
124
125 TH1* GetResult(){return fResult;}
126
127 protected:
128 TH3D* fResult;
129
130 public:
131 ClassDef(AliHBTMonOneParticleFctn3D,1)
132};
133/******************************************************************/
134/******************************************************************/
135class AliHBTMonTwoParticleFctn: public AliHBTMonitorFunction
136{
137 public:
138 AliHBTMonTwoParticleFctn(){};
139 AliHBTMonTwoParticleFctn(const Char_t *name, const Char_t *title):AliHBTMonitorFunction(name,title){}
140 virtual ~AliHBTMonTwoParticleFctn(){};
141
142 virtual void
e4f2b1da 143 Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle) = 0;
a57afe91 144
145 protected:
146 public:
147 ClassDef(AliHBTMonTwoParticleFctn,1)
148
149};
150/******************************************************************/
151
152class AliHBTMonTwoParticleFctn1D: public AliHBTMonTwoParticleFctn
153{
154 public:
155 AliHBTMonTwoParticleFctn1D(Int_t nbins = 200, Double_t maxval = 1.5, Double_t minval = 0.0);
156 AliHBTMonTwoParticleFctn1D(const char*,const char*,
157 Int_t nbins = 200, Double_t maxval = 1.5, Double_t minval = 0.0);
8961c985 158 virtual ~AliHBTMonTwoParticleFctn1D();
a57afe91 159
160 TH1* GetResult(){return fResult;}
161
e4f2b1da 162 void Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle);
a57afe91 163
164 protected:
165 virtual Double_t GetValue(AliHBTParticle* trackparticle, AliHBTParticle* partparticle) = 0;
166
167 TH1D* fResult;
168
169 public:
170 ClassDef(AliHBTMonTwoParticleFctn1D,1)
171};
172/******************************************************************/
173class AliHBTMonTwoParticleFctn2D: public AliHBTMonTwoParticleFctn
174{
175 public:
176 AliHBTMonTwoParticleFctn2D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
177 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15);
178 virtual ~AliHBTMonTwoParticleFctn2D();
179
180 TH1* GetResult(){return fResult;}
181
e4f2b1da 182 void Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle);
a57afe91 183
184 protected:
185 virtual void GetValues(AliHBTParticle*,AliHBTParticle*, Double_t&, Double_t&) = 0;
186
187 TH2D* fResult;
188
189 public:
190 ClassDef(AliHBTMonTwoParticleFctn2D,1)
191};
192
193
194/******************************************************************/
195class AliHBTMonTwoParticleFctn3D: public AliHBTMonTwoParticleFctn
196{
197 public:
198 AliHBTMonTwoParticleFctn3D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
199 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15,
200 Int_t nZbins = 200, Double_t maxZval = .15, Double_t minZval =-0.15){}
201 virtual ~AliHBTMonTwoParticleFctn3D(){}
202
203 TH1* GetResult(){return fResult;}
204
e4f2b1da 205 void Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle);
206
a57afe91 207 protected:
208 virtual void GetValues(AliHBTParticle*,AliHBTParticle*, Double_t&, Double_t&,Double_t&) = 0;
209
210 TH3D* fResult;
211
212 public:
213 ClassDef(AliHBTMonTwoParticleFctn3D,1)
214};
215
216/******************************************************************/
217/******************************************************************/
218/******************************************************************/
219/******************************************************************/
220
221#endif