Removing dependences on AliDAQ class (in raw)
[u/mrichter/AliRoot.git] / HBTAN / AliHBTMonitorFunction.h
CommitLineData
20527eee 1#ifndef ALIHBTMONITORFUNCTION_H
2#define ALIHBTMONITORFUNCTION_H
89c60e9f 3//__________________________________________________________________
4////////////////////////////////////////////////////////////////////
5//
20527eee 6// class AliHBTMonitorFunction
7//
8// class AliHBTMonOneParticleFctn
9// class AliHBTMonTwoParticleFctn
10//
11// class AliHBTMonOneParticleFctn1D
12// class AliHBTMonOneParticleFctn2D
13// class AliHBTMonOneParticleFctn3D
14//
15// class AliHBTMonTwoParticleFctn1D
16// class AliHBTMonTwoParticleFctn2D
17// class AliHBTMonTwoParticleFctn3D
18//
19// Base Classes for monitoring functions
20// author: chajecki@if.pw.edu.pl
21//
89c60e9f 22/******************************************************************/
23/*
24Base classes for monitor functions
25
26 monitor function
27 / \
28 / \
29 / \
30 / \
31 / \
32 / \
33 / \
34 one particle two particle
35 / | \ / | \
36 / | \ / | \
37 1D 2D 3D 1D 2D 3D
38
39Zbigniew.Chajecki@cern.ch
40
41*/
20527eee 42///////////////////////////////////////////////////////////////////////
a57afe91 43
78d7c6d3 44#include "AliAODParticleCut.h"
a57afe91 45
b98bda8e 46#include <TH2.h>
47#include <TH3.h>
a57afe91 48
78d7c6d3 49class AliVAODParticle;
a57afe91 50
51class AliHBTMonitorFunction: public TNamed
52//Abstract base class for HBT functions
53{
b98bda8e 54 public:
55 AliHBTMonitorFunction();
56 AliHBTMonitorFunction(const char* name,const char* title);
89c60e9f 57 AliHBTMonitorFunction(const AliHBTMonitorFunction& /*in*/);
b98bda8e 58 virtual ~AliHBTMonitorFunction();
a57afe91 59
34914285 60 AliHBTMonitorFunction& operator=(const AliHBTMonitorFunction& /*in*/);
89c60e9f 61
62
b98bda8e 63 virtual TH1* GetResult() = 0;
604034d8 64
3c1edb34 65 Int_t Write(const char* /*x1*/ = "",Int_t /*x2*/ = 0, Int_t /*x3*/ = 0);
66 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
d289329c 67 virtual void Init();
90520373 68 virtual const char* Name(){return GetName();}
b98bda8e 69 void Rename(const Char_t * name);
70 void Rename(const Char_t * name, const Char_t * title);
71
78d7c6d3 72 void SetParticleCut(AliAODParticleCut* cut);
b98bda8e 73
78d7c6d3 74 virtual AliVAODParticle* CheckParticle(AliVAODParticle* particle) const;
b98bda8e 75
76 protected:
78d7c6d3 77 AliAODParticleCut* fParticleCut;//Particle cut
b98bda8e 78
89c60e9f 79 private:
b98bda8e 80 ClassDef(AliHBTMonitorFunction,1)
81};
82/******************************************************************/
a57afe91 83/******************************************************************/
78d7c6d3 84inline AliVAODParticle* AliHBTMonitorFunction::CheckParticle(AliVAODParticle* particle) const
a57afe91 85{
86 //check if particle meets the cut criteria
cea0a066 87 if(fParticleCut->Rejected(particle)) //if the particle is BAD
89c60e9f 88 {
89 return 0x0;//it is BAD as well - so return
90 }
a57afe91 91 return particle;
92}
93
94/******************************************************************/
b98bda8e 95/******************************************************************/
96/******************************************************************/
97
a57afe91 98class AliHBTMonOneParticleFctn: public AliHBTMonitorFunction
99{
b98bda8e 100 public:
101 AliHBTMonOneParticleFctn(){}
102 AliHBTMonOneParticleFctn(const Char_t *name, const Char_t *title):AliHBTMonitorFunction(name,title){}
20527eee 103 AliHBTMonOneParticleFctn(const AliHBTMonOneParticleFctn& in):AliHBTMonitorFunction(in){MayNotUse("Cpy Ctor");}
b98bda8e 104 virtual ~AliHBTMonOneParticleFctn(){}
a57afe91 105
34914285 106 AliHBTMonOneParticleFctn& operator=(const AliHBTMonOneParticleFctn& /*in*/){MayNotUse("operator=");return *this;}
20527eee 107
78d7c6d3 108 virtual void Process(AliVAODParticle* particle) = 0;
a57afe91 109
b98bda8e 110 protected:
89c60e9f 111 private:
b98bda8e 112 ClassDef(AliHBTMonOneParticleFctn,1)
a57afe91 113
114};
115/******************************************************************/
116class AliHBTMonOneParticleFctn1D: public AliHBTMonOneParticleFctn
117{
118 public:
119 AliHBTMonOneParticleFctn1D();
120 AliHBTMonOneParticleFctn1D(Int_t nbins, Double_t maxXval, Double_t minXval);
121 AliHBTMonOneParticleFctn1D(const Char_t *name, const Char_t *title,
b98bda8e 122 Int_t nbins = 100, Double_t maxXval = 1.4, Double_t minXval = 0.0);
20527eee 123 AliHBTMonOneParticleFctn1D(const AliHBTMonOneParticleFctn1D& in):
124 AliHBTMonOneParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
125
a57afe91 126 virtual ~AliHBTMonOneParticleFctn1D();
127
34914285 128 AliHBTMonOneParticleFctn1D& operator=(const AliHBTMonOneParticleFctn1D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 129 TH1* GetResult(){return this->fResult;}
a57afe91 130
78d7c6d3 131 void Process(AliVAODParticle* particle);
a57afe91 132
133 protected:
78d7c6d3 134 virtual Double_t GetValue(AliVAODParticle* particle) const = 0;
89c60e9f 135 TH1D* fResult;//histogram to be filled
89c60e9f 136 private:
a57afe91 137 ClassDef(AliHBTMonOneParticleFctn1D,2)
138};
b98bda8e 139/******************************************************************/
140
a57afe91 141class AliHBTMonOneParticleFctn2D: public AliHBTMonOneParticleFctn
142{
143 public:
144 AliHBTMonOneParticleFctn2D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
b98bda8e 145 Int_t nYbins = 200, Double_t maxYval = 1.5, Double_t minYval =-0.1);
20527eee 146 AliHBTMonOneParticleFctn2D(const AliHBTMonOneParticleFctn2D& in):
147 AliHBTMonOneParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
8961c985 148 virtual ~AliHBTMonOneParticleFctn2D();
a57afe91 149
34914285 150 AliHBTMonOneParticleFctn2D& operator=(const AliHBTMonOneParticleFctn2D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 151 TH1* GetResult(){return this->fResult;}
a57afe91 152
78d7c6d3 153 void Process(AliVAODParticle* particle);
b98bda8e 154
a57afe91 155 protected:
78d7c6d3 156 virtual void GetValues(AliVAODParticle* particle, Double_t&, Double_t&) const = 0;
a57afe91 157
89c60e9f 158 TH2D* fResult;//histogram to be filled
a57afe91 159
89c60e9f 160 private:
a57afe91 161 ClassDef(AliHBTMonOneParticleFctn2D,1)
162};
604034d8 163/******************************************************************/
b98bda8e 164/******************************************************************/
165/******************************************************************/
166
a57afe91 167class AliHBTMonOneParticleFctn3D: public AliHBTMonOneParticleFctn
168{
169 public:
170 AliHBTMonOneParticleFctn3D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
b98bda8e 171 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15,
172 Int_t nZbins = 200, Double_t maxZval = .15, Double_t minZval =-0.15);
20527eee 173 AliHBTMonOneParticleFctn3D(const AliHBTMonOneParticleFctn3D& in):
174 AliHBTMonOneParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
a57afe91 175
176 virtual ~AliHBTMonOneParticleFctn3D();
177
34914285 178 AliHBTMonOneParticleFctn3D& operator=(const AliHBTMonOneParticleFctn3D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 179 TH1* GetResult(){return this->fResult;}
a57afe91 180
181 protected:
89c60e9f 182 TH3D* fResult;//histogram to be filled
a57afe91 183
89c60e9f 184 private:
a57afe91 185 ClassDef(AliHBTMonOneParticleFctn3D,1)
186};
b98bda8e 187/******************************************************************/
a57afe91 188/******************************************************************/
189class AliHBTMonTwoParticleFctn: public AliHBTMonitorFunction
190{
b98bda8e 191 public:
192 AliHBTMonTwoParticleFctn(){};
193 AliHBTMonTwoParticleFctn(const Char_t *name, const Char_t *title):AliHBTMonitorFunction(name,title){}
20527eee 194 AliHBTMonTwoParticleFctn(const AliHBTMonTwoParticleFctn& in):AliHBTMonitorFunction(in){MayNotUse("Cpy Ctor");}
b98bda8e 195 virtual ~AliHBTMonTwoParticleFctn(){};
34914285 196 AliHBTMonTwoParticleFctn& operator=(const AliHBTMonTwoParticleFctn& /*in*/){MayNotUse("operator=");return *this;}
b98bda8e 197
198 virtual void
78d7c6d3 199 Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle) = 0;
b98bda8e 200
201 protected:
89c60e9f 202 private:
b98bda8e 203 ClassDef(AliHBTMonTwoParticleFctn,1)
a57afe91 204
205};
604034d8 206/******************************************************************/
b98bda8e 207
a57afe91 208class AliHBTMonTwoParticleFctn1D: public AliHBTMonTwoParticleFctn
209{
210 public:
211 AliHBTMonTwoParticleFctn1D(Int_t nbins = 200, Double_t maxval = 1.5, Double_t minval = 0.0);
89c60e9f 212 AliHBTMonTwoParticleFctn1D(const char* name,const char* title,
b98bda8e 213 Int_t nbins = 200, Double_t maxval = 1.5, Double_t minval = 0.0);
20527eee 214 AliHBTMonTwoParticleFctn1D(const AliHBTMonTwoParticleFctn1D& in):
215 AliHBTMonTwoParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
8961c985 216 virtual ~AliHBTMonTwoParticleFctn1D();
a57afe91 217
34914285 218 AliHBTMonTwoParticleFctn1D& operator=(const AliHBTMonTwoParticleFctn1D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 219 TH1* GetResult(){return this->fResult;}
a57afe91 220
78d7c6d3 221 void Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle);
a57afe91 222
223 protected:
78d7c6d3 224 virtual Double_t GetValue(AliVAODParticle* trackparticle, AliVAODParticle* partparticle) const = 0;
a57afe91 225
89c60e9f 226 TH1D* fResult;//histogram to be filled
a57afe91 227
89c60e9f 228 private:
a57afe91 229 ClassDef(AliHBTMonTwoParticleFctn1D,1)
230};
231/******************************************************************/
232class AliHBTMonTwoParticleFctn2D: public AliHBTMonTwoParticleFctn
233{
234 public:
235 AliHBTMonTwoParticleFctn2D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
b98bda8e 236 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15);
20527eee 237 AliHBTMonTwoParticleFctn2D(const AliHBTMonTwoParticleFctn2D& in):
238 AliHBTMonTwoParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
a57afe91 239 virtual ~AliHBTMonTwoParticleFctn2D();
240
34914285 241 AliHBTMonTwoParticleFctn2D& operator=(const AliHBTMonTwoParticleFctn2D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 242 TH1* GetResult(){return this->fResult;}
a57afe91 243
78d7c6d3 244 void Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle);
a57afe91 245
246 protected:
78d7c6d3 247 virtual void GetValues(AliVAODParticle*,AliVAODParticle*, Double_t&, Double_t&) const = 0;
a57afe91 248
89c60e9f 249 TH2D* fResult;//histogram to be filled
a57afe91 250
89c60e9f 251 private:
a57afe91 252 ClassDef(AliHBTMonTwoParticleFctn2D,1)
253};
254
b98bda8e 255
a57afe91 256/******************************************************************/
257class AliHBTMonTwoParticleFctn3D: public AliHBTMonTwoParticleFctn
258{
259 public:
4c57c771 260 AliHBTMonTwoParticleFctn3D(Int_t /*nXbins = 200*/, Double_t /*maxXval = 1.5*/, Double_t /*minXval = 0.0*/,
261 Int_t /*nYbins = 200*/, Double_t /*maxYval = .15*/, Double_t /*minYval =-0.15*/,
262 Int_t /*nZbins = 200*/, Double_t /*maxZval = .15*/, Double_t /*minZval =-0.15*/){}
20527eee 263 AliHBTMonTwoParticleFctn3D(const AliHBTMonTwoParticleFctn3D& in):
264 AliHBTMonTwoParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
a57afe91 265 virtual ~AliHBTMonTwoParticleFctn3D(){}
266
34914285 267 AliHBTMonTwoParticleFctn3D& operator=(const AliHBTMonTwoParticleFctn3D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 268 TH1* GetResult(){return this->fResult;}
a57afe91 269
78d7c6d3 270 void Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle);
e4f2b1da 271
a57afe91 272 protected:
78d7c6d3 273 virtual void GetValues(AliVAODParticle*,AliVAODParticle*, Double_t&, Double_t&,Double_t&) const = 0;
a57afe91 274
89c60e9f 275 TH3D* fResult; //histogram to be filled
a57afe91 276
89c60e9f 277 private:
a57afe91 278 ClassDef(AliHBTMonTwoParticleFctn3D,1)
279};
280
b98bda8e 281/******************************************************************/
282/******************************************************************/
283/******************************************************************/
284/******************************************************************/
285
a57afe91 286#endif