Updated to the new way AOD stores particles
[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
b98bda8e 65 virtual void Write();
d289329c 66 virtual void Init();
90520373 67 virtual const char* Name(){return GetName();}
b98bda8e 68 void Rename(const Char_t * name);
69 void Rename(const Char_t * name, const Char_t * title);
70
78d7c6d3 71 void SetParticleCut(AliAODParticleCut* cut);
b98bda8e 72
78d7c6d3 73 virtual AliVAODParticle* CheckParticle(AliVAODParticle* particle) const;
b98bda8e 74
75 protected:
78d7c6d3 76 AliAODParticleCut* fParticleCut;//Particle cut
b98bda8e 77
89c60e9f 78 private:
b98bda8e 79 ClassDef(AliHBTMonitorFunction,1)
80};
81/******************************************************************/
a57afe91 82/******************************************************************/
78d7c6d3 83inline AliVAODParticle* AliHBTMonitorFunction::CheckParticle(AliVAODParticle* particle) const
a57afe91 84{
85 //check if particle meets the cut criteria
cea0a066 86 if(fParticleCut->Rejected(particle)) //if the particle is BAD
89c60e9f 87 {
88 return 0x0;//it is BAD as well - so return
89 }
a57afe91 90 return particle;
91}
92
93/******************************************************************/
b98bda8e 94/******************************************************************/
95/******************************************************************/
96
a57afe91 97class AliHBTMonOneParticleFctn: public AliHBTMonitorFunction
98{
b98bda8e 99 public:
100 AliHBTMonOneParticleFctn(){}
101 AliHBTMonOneParticleFctn(const Char_t *name, const Char_t *title):AliHBTMonitorFunction(name,title){}
20527eee 102 AliHBTMonOneParticleFctn(const AliHBTMonOneParticleFctn& in):AliHBTMonitorFunction(in){MayNotUse("Cpy Ctor");}
b98bda8e 103 virtual ~AliHBTMonOneParticleFctn(){}
a57afe91 104
34914285 105 AliHBTMonOneParticleFctn& operator=(const AliHBTMonOneParticleFctn& /*in*/){MayNotUse("operator=");return *this;}
20527eee 106
78d7c6d3 107 virtual void Process(AliVAODParticle* particle) = 0;
a57afe91 108
b98bda8e 109 protected:
89c60e9f 110 private:
b98bda8e 111 ClassDef(AliHBTMonOneParticleFctn,1)
a57afe91 112
113};
114/******************************************************************/
115class AliHBTMonOneParticleFctn1D: public AliHBTMonOneParticleFctn
116{
117 public:
118 AliHBTMonOneParticleFctn1D();
119 AliHBTMonOneParticleFctn1D(Int_t nbins, Double_t maxXval, Double_t minXval);
120 AliHBTMonOneParticleFctn1D(const Char_t *name, const Char_t *title,
b98bda8e 121 Int_t nbins = 100, Double_t maxXval = 1.4, Double_t minXval = 0.0);
20527eee 122 AliHBTMonOneParticleFctn1D(const AliHBTMonOneParticleFctn1D& in):
123 AliHBTMonOneParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
124
a57afe91 125 virtual ~AliHBTMonOneParticleFctn1D();
126
34914285 127 AliHBTMonOneParticleFctn1D& operator=(const AliHBTMonOneParticleFctn1D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 128 TH1* GetResult(){return this->fResult;}
a57afe91 129
78d7c6d3 130 void Process(AliVAODParticle* particle);
a57afe91 131
132 protected:
78d7c6d3 133 virtual Double_t GetValue(AliVAODParticle* particle) const = 0;
89c60e9f 134 TH1D* fResult;//histogram to be filled
89c60e9f 135 private:
a57afe91 136 ClassDef(AliHBTMonOneParticleFctn1D,2)
137};
b98bda8e 138/******************************************************************/
139
a57afe91 140class AliHBTMonOneParticleFctn2D: public AliHBTMonOneParticleFctn
141{
142 public:
143 AliHBTMonOneParticleFctn2D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
b98bda8e 144 Int_t nYbins = 200, Double_t maxYval = 1.5, Double_t minYval =-0.1);
20527eee 145 AliHBTMonOneParticleFctn2D(const AliHBTMonOneParticleFctn2D& in):
146 AliHBTMonOneParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
8961c985 147 virtual ~AliHBTMonOneParticleFctn2D();
a57afe91 148
34914285 149 AliHBTMonOneParticleFctn2D& operator=(const AliHBTMonOneParticleFctn2D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 150 TH1* GetResult(){return this->fResult;}
a57afe91 151
78d7c6d3 152 void Process(AliVAODParticle* particle);
b98bda8e 153
a57afe91 154 protected:
78d7c6d3 155 virtual void GetValues(AliVAODParticle* particle, Double_t&, Double_t&) const = 0;
a57afe91 156
89c60e9f 157 TH2D* fResult;//histogram to be filled
a57afe91 158
89c60e9f 159 private:
a57afe91 160 ClassDef(AliHBTMonOneParticleFctn2D,1)
161};
604034d8 162/******************************************************************/
b98bda8e 163/******************************************************************/
164/******************************************************************/
165
a57afe91 166class AliHBTMonOneParticleFctn3D: public AliHBTMonOneParticleFctn
167{
168 public:
169 AliHBTMonOneParticleFctn3D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
b98bda8e 170 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15,
171 Int_t nZbins = 200, Double_t maxZval = .15, Double_t minZval =-0.15);
20527eee 172 AliHBTMonOneParticleFctn3D(const AliHBTMonOneParticleFctn3D& in):
173 AliHBTMonOneParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
a57afe91 174
175 virtual ~AliHBTMonOneParticleFctn3D();
176
34914285 177 AliHBTMonOneParticleFctn3D& operator=(const AliHBTMonOneParticleFctn3D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 178 TH1* GetResult(){return this->fResult;}
a57afe91 179
180 protected:
89c60e9f 181 TH3D* fResult;//histogram to be filled
a57afe91 182
89c60e9f 183 private:
a57afe91 184 ClassDef(AliHBTMonOneParticleFctn3D,1)
185};
b98bda8e 186/******************************************************************/
a57afe91 187/******************************************************************/
188class AliHBTMonTwoParticleFctn: public AliHBTMonitorFunction
189{
b98bda8e 190 public:
191 AliHBTMonTwoParticleFctn(){};
192 AliHBTMonTwoParticleFctn(const Char_t *name, const Char_t *title):AliHBTMonitorFunction(name,title){}
20527eee 193 AliHBTMonTwoParticleFctn(const AliHBTMonTwoParticleFctn& in):AliHBTMonitorFunction(in){MayNotUse("Cpy Ctor");}
b98bda8e 194 virtual ~AliHBTMonTwoParticleFctn(){};
34914285 195 AliHBTMonTwoParticleFctn& operator=(const AliHBTMonTwoParticleFctn& /*in*/){MayNotUse("operator=");return *this;}
b98bda8e 196
197 virtual void
78d7c6d3 198 Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle) = 0;
b98bda8e 199
200 protected:
89c60e9f 201 private:
b98bda8e 202 ClassDef(AliHBTMonTwoParticleFctn,1)
a57afe91 203
204};
604034d8 205/******************************************************************/
b98bda8e 206
a57afe91 207class AliHBTMonTwoParticleFctn1D: public AliHBTMonTwoParticleFctn
208{
209 public:
210 AliHBTMonTwoParticleFctn1D(Int_t nbins = 200, Double_t maxval = 1.5, Double_t minval = 0.0);
89c60e9f 211 AliHBTMonTwoParticleFctn1D(const char* name,const char* title,
b98bda8e 212 Int_t nbins = 200, Double_t maxval = 1.5, Double_t minval = 0.0);
20527eee 213 AliHBTMonTwoParticleFctn1D(const AliHBTMonTwoParticleFctn1D& in):
214 AliHBTMonTwoParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
8961c985 215 virtual ~AliHBTMonTwoParticleFctn1D();
a57afe91 216
34914285 217 AliHBTMonTwoParticleFctn1D& operator=(const AliHBTMonTwoParticleFctn1D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 218 TH1* GetResult(){return this->fResult;}
a57afe91 219
78d7c6d3 220 void Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle);
a57afe91 221
222 protected:
78d7c6d3 223 virtual Double_t GetValue(AliVAODParticle* trackparticle, AliVAODParticle* partparticle) const = 0;
a57afe91 224
89c60e9f 225 TH1D* fResult;//histogram to be filled
a57afe91 226
89c60e9f 227 private:
a57afe91 228 ClassDef(AliHBTMonTwoParticleFctn1D,1)
229};
230/******************************************************************/
231class AliHBTMonTwoParticleFctn2D: public AliHBTMonTwoParticleFctn
232{
233 public:
234 AliHBTMonTwoParticleFctn2D(Int_t nXbins = 200, Double_t maxXval = 1.5, Double_t minXval = 0.0,
b98bda8e 235 Int_t nYbins = 200, Double_t maxYval = .15, Double_t minYval =-0.15);
20527eee 236 AliHBTMonTwoParticleFctn2D(const AliHBTMonTwoParticleFctn2D& in):
237 AliHBTMonTwoParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
a57afe91 238 virtual ~AliHBTMonTwoParticleFctn2D();
239
34914285 240 AliHBTMonTwoParticleFctn2D& operator=(const AliHBTMonTwoParticleFctn2D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 241 TH1* GetResult(){return this->fResult;}
a57afe91 242
78d7c6d3 243 void Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle);
a57afe91 244
245 protected:
78d7c6d3 246 virtual void GetValues(AliVAODParticle*,AliVAODParticle*, Double_t&, Double_t&) const = 0;
a57afe91 247
89c60e9f 248 TH2D* fResult;//histogram to be filled
a57afe91 249
89c60e9f 250 private:
a57afe91 251 ClassDef(AliHBTMonTwoParticleFctn2D,1)
252};
253
b98bda8e 254
a57afe91 255/******************************************************************/
256class AliHBTMonTwoParticleFctn3D: public AliHBTMonTwoParticleFctn
257{
258 public:
4c57c771 259 AliHBTMonTwoParticleFctn3D(Int_t /*nXbins = 200*/, Double_t /*maxXval = 1.5*/, Double_t /*minXval = 0.0*/,
260 Int_t /*nYbins = 200*/, Double_t /*maxYval = .15*/, Double_t /*minYval =-0.15*/,
261 Int_t /*nZbins = 200*/, Double_t /*maxZval = .15*/, Double_t /*minZval =-0.15*/){}
20527eee 262 AliHBTMonTwoParticleFctn3D(const AliHBTMonTwoParticleFctn3D& in):
263 AliHBTMonTwoParticleFctn(in),fResult(0x0){MayNotUse("Cpy Ctor");}
a57afe91 264 virtual ~AliHBTMonTwoParticleFctn3D(){}
265
34914285 266 AliHBTMonTwoParticleFctn3D& operator=(const AliHBTMonTwoParticleFctn3D& /*in*/){MayNotUse("operator=");return *this;}
a22a56ec 267 TH1* GetResult(){return this->fResult;}
a57afe91 268
78d7c6d3 269 void Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle);
e4f2b1da 270
a57afe91 271 protected:
78d7c6d3 272 virtual void GetValues(AliVAODParticle*,AliVAODParticle*, Double_t&, Double_t&,Double_t&) const = 0;
a57afe91 273
89c60e9f 274 TH3D* fResult; //histogram to be filled
a57afe91 275
89c60e9f 276 private:
a57afe91 277 ClassDef(AliHBTMonTwoParticleFctn3D,1)
278};
279
b98bda8e 280/******************************************************************/
281/******************************************************************/
282/******************************************************************/
283/******************************************************************/
284
a57afe91 285#endif