]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HBTAN/AliHBTFunction.h
Fix for possible use of AliCFManager without containers, just cuts.
[u/mrichter/AliRoot.git] / HBTAN / AliHBTFunction.h
CommitLineData
1b446896 1#ifndef ALIHBTFUNCTION_H
2#define ALIHBTFUNCTION_H
6f1c277c 3
6e8d850a 4/* Id: $ */
5
26f1270c 6///////////////////////////////////////////////////////
7// //
8// AliHBTFunction //
9// //
10// Abstract Base Calss for all the function classes //
11// //
12// Piotr.Skowronski@cern.ch //
c7ffd78f 13// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 14// //
15///////////////////////////////////////////////////////
16
2dc7203b 17#include <TH1.h>
4e4af325 18#include <TH2D.h>
19#include <TH3D.h>
2dc7203b 20
78d7c6d3 21#include "AliAODPairCut.h"
2dc7203b 22#include "AliHBTPair.h"
23
2dc7203b 24
25class AliHBTAnalysis;
78d7c6d3 26class AliVAODParticleCut;
2dc7203b 27
1b446896 28class AliHBTFunction: public TNamed
1b446896 29{
30 public:
31 AliHBTFunction();
28cf76fa 32 AliHBTFunction(const char* name, const char* title);
33 AliHBTFunction(const AliHBTFunction & source);
34
856180e9 35 virtual ~AliHBTFunction();
1b446896 36
28cf76fa 37 AliHBTFunction & operator= (const AliHBTFunction & source);
6e8d850a 38
26f1270c 39 virtual TH1* GetNumerator() const = 0;
40 virtual TH1* GetDenominator() const = 0;
1b446896 41 virtual TH1* GetResult() = 0;
976183fd 42
6f1c277c 43 virtual Int_t WriteFunction();
c41732dc 44 virtual void InitFunction();
1b446896 45
46 TH1* GetRatio(Double_t normfactor = 1.0);
47 void Rename(const Char_t * name); //renames the function and histograms ==title is the same that name
48 void Rename(const Char_t * name, const Char_t * title); //renames and retitle the function and histograms
49
78d7c6d3 50 void SetPairCut(AliAODPairCut* cut);
a296aa84 51 void UseAbsoluteValues(Bool_t flag){fAbs = flag;}
1b446896 52
53 virtual AliHBTPair* CheckPair(AliHBTPair* pair);
e6e21fa2 54 void SetWriteNumAndDen(Bool_t flag = kFALSE){fWriteNumAndDen = flag;}
1b446896 55 protected:
26f1270c 56 virtual void BuildHistos() = 0;//builds default histograms
78d7c6d3 57 AliAODPairCut* fPairCut; //pair cut
e6e21fa2 58 Bool_t fWriteNumAndDen; //flag indicating whether numerator and denominator should be writted together with a result
a296aa84 59 Bool_t fAbs;//flag indicating if absolute values of qout, qside and qlong should be histogrammed
60
e6e21fa2 61 ClassDef(AliHBTFunction,3)
1b446896 62};
976183fd 63/******************************************************************/
1b446896 64inline AliHBTPair* AliHBTFunction::CheckPair(AliHBTPair* pair)
65{
66 //check if pair and both particles meets the cut criteria
cea0a066 67 if(fPairCut->Rejected(pair)) return 0x0; //if the pair is BAD
7423906b 68
55d46048 69// It is not allowed to change the order here beacause analysis enforce the order
7423906b 70
71// {//it is BAD
78d7c6d3 72// pair = pair->GetSwappedPair();
7423906b 73// if(pair)
cea0a066 74// if(fPairCut->Rejected(pair)) //so try reverse combination
7423906b 75// {
76// return 0x0;//it is BAD as well - so return
77// }
78// }
79
1b446896 80 return pair;
81}
82
1b446896 83/******************************************************************/
fc13079c 84/******************************************************************/
85/******************************************************************/
86class AliHBTCorrelFunction
87{
88 public:
89 AliHBTCorrelFunction():fRatio(0x0){}
90 AliHBTCorrelFunction(const AliHBTCorrelFunction& in):fRatio((in.fRatio)?(TH1*)in.fRatio->Clone():0x0){}
91 virtual ~AliHBTCorrelFunction(){delete fRatio;}
92
93 AliHBTCorrelFunction& operator=(const AliHBTCorrelFunction& in);
94
95 protected:
96 TH1* fRatio;//!pointer to the ratio(result)
97
98 ClassDef(AliHBTCorrelFunction,1)
99};
100
101/******************************************************************/
1b446896 102/******************************************************************/
103/******************************************************************/
26f1270c 104
105//____________________
106///////////////////////////////////////////////////////
107// //
108// AliHBTOnePairFctn //
109// //
110// Abstract Base Calss for Functions that need //
111// one pair to fill function //
112// //
113// Piotr.Skowronski@cern.ch //
c7ffd78f 114// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 115// //
116///////////////////////////////////////////////////////
117
118class AliHBTOnePairFctn
1b446896 119{
120 public:
27b3fe5d 121 AliHBTOnePairFctn(){}
122 virtual ~AliHBTOnePairFctn(){}
1b446896 123
124 virtual void ProcessSameEventParticles(AliHBTPair* pair) = 0;
125 virtual void ProcessDiffEventParticles(AliHBTPair* pair) = 0;
976183fd 126
26f1270c 127 virtual void Init() = 0;
6f1c277c 128 virtual Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0) = 0;
8f0a515e 129 virtual const char* Name() = 0;
1b446896 130
26f1270c 131 ClassDef(AliHBTOnePairFctn,2)
1b446896 132};
133/******************************************************************/
134/******************************************************************/
135/******************************************************************/
26f1270c 136
137//____________________
138///////////////////////////////////////////////////////
139// //
140// AliHBTTwoPairFctn //
141// //
142// Abstract Base Calss for Functions that need //
143// two pairs to fill function, //
144// one reconstructed track and corresponding //
145// simulated pair //
146// Basically resolution functions //
147// Lednicky's algorithm uses that as well //
148// //
149// Piotr.Skowronski@cern.ch //
c7ffd78f 150// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 151// //
152///////////////////////////////////////////////////////
153
154class AliHBTTwoPairFctn
1b446896 155{
156 public:
27b3fe5d 157 AliHBTTwoPairFctn(){};
158 virtual ~AliHBTTwoPairFctn(){};
1b446896 159
160 virtual void
161 ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
162 virtual void
163 ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
26f1270c 164
165 virtual void Init() = 0;
6f1c277c 166 virtual Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0) = 0;
8f0a515e 167 virtual const char* Name() = 0;
1b446896 168
26f1270c 169 ClassDef(AliHBTTwoPairFctn,2)
1b446896 170
171};
172/******************************************************************/
173/******************************************************************/
174/******************************************************************/
175
26f1270c 176//____________________
177///////////////////////////////////////////////////////
178// //
179// AliHBTFunction1D //
180// //
181// Base Calss for 1-dimensinal Functions //
182// //
183// Piotr.Skowronski@cern.ch //
c7ffd78f 184// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 185// //
186///////////////////////////////////////////////////////
1b446896 187
26f1270c 188
189class AliHBTFunction1D: public AliHBTFunction
1b446896 190{
191 public:
26f1270c 192 AliHBTFunction1D();//default conmstructor
193 AliHBTFunction1D(Int_t nbins, Float_t maxXval, Float_t minXval);
194 AliHBTFunction1D(const Char_t *name, const Char_t *title);
195 AliHBTFunction1D(const Char_t *name, const Char_t *title,
196 Int_t nbins, Float_t maxXval, Float_t minXval);
28cf76fa 197
198 AliHBTFunction1D(const AliHBTFunction1D & source);
199 AliHBTFunction1D & operator= (const AliHBTFunction1D& /*source*/);
6e8d850a 200
26f1270c 201 virtual ~AliHBTFunction1D();
1b446896 202
26f1270c 203 TH1* GetNumerator() const {return fNumerator;}//returns numerator histogram
204 TH1* GetDenominator() const {return fDenominator;}//returns denominator histogram
205
206 Double_t Scale();
207 void SetNumberOfBinsToScale(Int_t n = fgkDefaultNBinsToScale){fNBinsToScale = n;}
1b446896 208
1b446896 209 protected:
6e8d850a 210 //returns value to be histogrammed
26f1270c 211 virtual void BuildHistos(Int_t nbins, Float_t max, Float_t min);
212 virtual void BuildHistos();
213 Double_t Scale(TH1D* num,TH1D* den);
214
6e8d850a 215 TH1D* fNumerator; // Numerator histogram
216 TH1D* fDenominator; // Denumerator histogram
217 UInt_t fNBinsToScale; // Number of bins to scale
218
219 private:
220 //this must be declared before constructors because they are used as a default arguments
221 static const Int_t fgkDefaultNBins;//default number of Bins in histograms
222 static const Float_t fgkDefaultMin;//Default min value of histograms
223 static const Float_t fgkDefaultMax;//Default max value of histograms
224 static const UInt_t fgkDefaultNBinsToScale;//Default number of bins used for scaling to tale
26f1270c 225
26f1270c 226 ClassDef(AliHBTFunction1D,2)
1b446896 227};
228
1b446896 229/******************************************************************/
230/******************************************************************/
231/******************************************************************/
26f1270c 232
233//____________________
234///////////////////////////////////////////////////////
235// //
236// AliHBTFunction2D //
237// //
238// Base Calss for 2-dimensinal Functions //
239// //
240// Piotr.Skowronski@cern.ch //
c7ffd78f 241// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 242// //
243///////////////////////////////////////////////////////
ba95ae3f 244
26f1270c 245class AliHBTFunction2D: public AliHBTFunction
1b446896 246{
247 public:
26f1270c 248 AliHBTFunction2D();
249
250 AliHBTFunction2D(const Char_t *name, const Char_t *title);
251
252 AliHBTFunction2D(Int_t nXbins, Double_t maxXval, Double_t minXval,
253 Int_t nYbins, Double_t maxYval, Double_t minYval);
254
255 AliHBTFunction2D(const Char_t *name, const Char_t *title,
256 Int_t nXbins, Double_t maxXval, Double_t minXval,
257 Int_t nYbins, Double_t maxYval, Double_t minYval);
258
28cf76fa 259 AliHBTFunction2D(const AliHBTFunction2D & source);
260
261 AliHBTFunction2D & operator= (const AliHBTFunction2D & /*source*/);
6e8d850a 262
26f1270c 263 virtual ~AliHBTFunction2D();
1b446896 264
26f1270c 265 TH1* GetNumerator() const {return fNumerator;}
266 TH1* GetDenominator() const {return fDenominator;}
1b446896 267
26f1270c 268 void SetNumberOfBinsToScale(UInt_t xn = fgkDefaultNBinsToScaleX,
269 UInt_t yn = fgkDefaultNBinsToScaleY);
270
271 Double_t Scale();
1b446896 272 protected:
26f1270c 273 virtual void BuildHistos(Int_t nxbins, Float_t xmax, Float_t xmin,
274 Int_t nybins, Float_t ymax, Float_t ymin);
275 virtual void BuildHistos();
276
6e8d850a 277 TH2D* fNumerator; // Numerator histogram
278 TH2D* fDenominator; // Denominator histogram
1b446896 279
26f1270c 280 //definition of area used for scaling -> Scale is calculated this
281 //way that after division tale is on 1
282 UInt_t fNBinsToScaleX;//number of bins on X axis
283 UInt_t fNBinsToScaleY;//number of bins on Y axis
284
6e8d850a 285 private:
286 //this must be declared before constructors because they are used as a default arguments
287 static const Int_t fgkDefaultNBinsX;//default number of Bins in X axis in histograms
288 static const Float_t fgkDefaultMinX;//Default min value of X axis in histograms
289 static const Float_t fgkDefaultMaxX;//Default max value of X axis inhistograms
290 static const Int_t fgkDefaultNBinsY;//default number of Bins in histograms
291 static const Float_t fgkDefaultMinY;//Default min value of histograms
292 static const Float_t fgkDefaultMaxY;//Default max value of histograms
293
294 static const UInt_t fgkDefaultNBinsToScaleX;//Default number of X bins used for scaling to tale
295 static const UInt_t fgkDefaultNBinsToScaleY;//Default number of bins used for scaling to tale
296
26f1270c 297 ClassDef(AliHBTFunction2D,2)
1b446896 298};
299/******************************************************************/
300/******************************************************************/
301/******************************************************************/
302
26f1270c 303//____________________
304///////////////////////////////////////////////////////
305// //
306// AliHBTFunction3D //
307// //
308// Base Calss for 3-dimensinal Functions that need //
309// one pair to fill function //
310// //
311// Piotr.Skowronski@cern.ch //
c7ffd78f 312// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 313// //
314///////////////////////////////////////////////////////
315
316class AliHBTFunction3D: public AliHBTFunction
1b446896 317{
318 public:
26f1270c 319 AliHBTFunction3D();
320
321 AliHBTFunction3D(const Char_t *name, const Char_t *title);
322
323 AliHBTFunction3D(Int_t nXbins, Double_t maxXval, Double_t minXval,
324 Int_t nYbins, Double_t maxYval, Double_t minYval,
325 Int_t nZbins, Double_t maxZval, Double_t minZval);
326
327 AliHBTFunction3D(const Char_t *name, const Char_t *title,
328 Int_t nXbins, Double_t maxXval, Double_t minXval,
329 Int_t nYbins, Double_t maxYval, Double_t minYval,
330 Int_t nZbins, Double_t maxZval, Double_t minZval);
6e8d850a 331
28cf76fa 332 AliHBTFunction3D(const AliHBTFunction3D & source);
333 AliHBTFunction3D & operator= (const AliHBTFunction3D & /*source*/);
6e8d850a 334
26f1270c 335 virtual ~AliHBTFunction3D();//destructor
336
337 TH1* GetNumerator() const {return fNumerator;}
338 TH1* GetDenominator() const {return fDenominator;}
1b446896 339
26f1270c 340
341 void SetNumberOfBinsToScale(UInt_t xn = fgkDefaultNBinsToScaleX,
342 UInt_t yn = fgkDefaultNBinsToScaleY,
343 UInt_t zn = fgkDefaultNBinsToScaleZ);
344
345 Double_t Scale();
1b446896 346
347 protected:
26f1270c 348 virtual void BuildHistos(Int_t nxbins, Float_t xmax, Float_t xmin,
349 Int_t nybins, Float_t ymax, Float_t ymin,
350 Int_t nzbins, Float_t zmax, Float_t zmin);
351 virtual void BuildHistos();
352
dd82cadc 353 TH3F* fNumerator; // Numerator histogram
354 TH3F* fDenominator; // Denominator histogram
26f1270c 355
356 //definition of area used for scaling -> Scale is calculated this
357 //way that after division tale is on 1
358 UInt_t fNBinsToScaleX;//number of bins on X axis
359 UInt_t fNBinsToScaleY;//number of bins on Y axis
360 UInt_t fNBinsToScaleZ;//number of bins on Z axis
361
6e8d850a 362 private:
363 //this must be declared before constructors because they are used as a default arguments
364 static const Int_t fgkDefaultNBinsX;//default number of Bins in X axis in histograms
365 static const Float_t fgkDefaultMinX;//Default min value of X axis in histograms
366 static const Float_t fgkDefaultMaxX;//Default max value of X axis inhistograms
367 static const Int_t fgkDefaultNBinsY;//default number of Bins in Y axis in histograms
368 static const Float_t fgkDefaultMinY;//Default min value of Y axis in histograms
369 static const Float_t fgkDefaultMaxY;//Default max value of Y axis inhistograms
370 static const Int_t fgkDefaultNBinsZ;//default number of Bins in Z axis in histograms
371 static const Float_t fgkDefaultMinZ;//Default min value of Z axis in histograms
372 static const Float_t fgkDefaultMaxZ;//Default max value of Z axis inhistograms
373
374 static const UInt_t fgkDefaultNBinsToScaleX;//Default number of X bins used for scaling to tale
375 static const UInt_t fgkDefaultNBinsToScaleY;//Default number of Y bins used for scaling to tale
376 static const UInt_t fgkDefaultNBinsToScaleZ;//Default number of Z bins used for scaling to tale
377
26f1270c 378 ClassDef(AliHBTFunction3D,2)
1b446896 379};
380/******************************************************************/
381/******************************************************************/
382/******************************************************************/
383
26f1270c 384//____________________
385///////////////////////////////////////////////////////
386// //
387// AliHBTOnePairFctn1D //
388// //
389// Base Calss for 1-dimensinal Functions that need //
390// one pair to fill function //
391// //
392// Piotr.Skowronski@cern.ch //
c7ffd78f 393// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 394// //
395///////////////////////////////////////////////////////
396
397class AliHBTOnePairFctn1D: public AliHBTOnePairFctn, public AliHBTFunction1D
ba95ae3f 398{
399 public:
26f1270c 400 AliHBTOnePairFctn1D(){}//default conmstructor
401 AliHBTOnePairFctn1D(Int_t nbins, Float_t maxXval, Float_t minXval);
402 AliHBTOnePairFctn1D(const Char_t *name, const Char_t *title);
403 AliHBTOnePairFctn1D(const Char_t *name, const Char_t *title,
404 Int_t nbins, Float_t maxXval, Float_t minXval);
405 virtual ~AliHBTOnePairFctn1D(){}
406
407 void ProcessSameEventParticles(AliHBTPair* pair);
408 void ProcessDiffEventParticles(AliHBTPair* pair);
6f1c277c 409 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
3c1edb34 410 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
c41732dc 411 void Init(){InitFunction();}
8f0a515e 412 const char* Name(){return GetName();}
413
ba95ae3f 414 protected:
26f1270c 415 //retruns velue to be histogrammed
a22a56ec 416 virtual Double_t GetValue(AliHBTPair* pair) const = 0;
26f1270c 417 ClassDef(AliHBTOnePairFctn1D,2)
418};
419/******************************************************************/
420/******************************************************************/
421/******************************************************************/
ba95ae3f 422
26f1270c 423//____________________
424///////////////////////////////////////////////////////
425// //
426// AliHBTOnePairFctn2D //
427// //
428// Base Calss for 2-dimensinal Functions that need //
429// one pair to fill function //
430// //
431// Piotr.Skowronski@cern.ch //
c7ffd78f 432// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 433// //
434///////////////////////////////////////////////////////
435
436class AliHBTOnePairFctn2D: public AliHBTOnePairFctn, public AliHBTFunction2D
437{
438 public:
439 AliHBTOnePairFctn2D(){}
4e871a8a 440
26f1270c 441 AliHBTOnePairFctn2D(const Char_t *name, const Char_t *title);
4e871a8a 442
26f1270c 443 AliHBTOnePairFctn2D(Int_t nXbins, Double_t maxXval, Double_t minXval,
444 Int_t nYbins, Double_t maxYval, Double_t minYval);
445
446 AliHBTOnePairFctn2D(const Char_t *name, const Char_t *title,
447 Int_t nXbins, Double_t maxXval, Double_t minXval,
448 Int_t nYbins, Double_t maxYval, Double_t minYval);
449
450 virtual ~AliHBTOnePairFctn2D(){}
451
452 void ProcessSameEventParticles(AliHBTPair* pair);
453 void ProcessDiffEventParticles(AliHBTPair* pair);
6f1c277c 454 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
3c1edb34 455 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
c41732dc 456 void Init(){InitFunction();}
8f0a515e 457 const char* Name(){return GetName();}
26f1270c 458 protected:
a22a56ec 459 virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y) const = 0;
26f1270c 460 ClassDef(AliHBTOnePairFctn2D,2)
ba95ae3f 461};
26f1270c 462/******************************************************************/
463/******************************************************************/
464/******************************************************************/
1b446896 465
26f1270c 466//____________________
467///////////////////////////////////////////////////////
468// //
469// AliHBTOnePairFctn3D //
470// //
471// Base Calss for 3-dimensinal Functions that need //
472// one pair to fill function //
473// //
474// Piotr.Skowronski@cern.ch //
c7ffd78f 475// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 476// //
477///////////////////////////////////////////////////////
478
479class AliHBTOnePairFctn3D: public AliHBTOnePairFctn, public AliHBTFunction3D
480{
481 public:
482 AliHBTOnePairFctn3D(){}
1b446896 483
26f1270c 484 AliHBTOnePairFctn3D(const Char_t *name, const Char_t *title);
485
486 AliHBTOnePairFctn3D(Int_t nXbins, Double_t maxXval, Double_t minXval,
487 Int_t nYbins, Double_t maxYval, Double_t minYval,
488 Int_t nZbins, Double_t maxZval, Double_t minZval);
489
490 AliHBTOnePairFctn3D(const Char_t *name, const Char_t *title,
491 Int_t nXbins, Double_t maxXval, Double_t minXval,
492 Int_t nYbins, Double_t maxYval, Double_t minYval,
493 Int_t nZbins, Double_t maxZval, Double_t minZval);
494
495 virtual ~AliHBTOnePairFctn3D(){}//destructor
496
497 void ProcessSameEventParticles(AliHBTPair* pair);
498 void ProcessDiffEventParticles(AliHBTPair* pair);
6f1c277c 499 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
3c1edb34 500 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
c41732dc 501 void Init(){InitFunction();}
8f0a515e 502 const char* Name(){return GetName();}
26f1270c 503 protected:
a22a56ec 504 virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const = 0;
26f1270c 505 ClassDef(AliHBTOnePairFctn3D,2)
506};
1b446896 507/******************************************************************/
508/******************************************************************/
509/******************************************************************/
26f1270c 510
511//____________________
512///////////////////////////////////////////////////////
513// //
514// AliHBTTwoPairFctn1D //
515// //
516// Base Calss for 1-dimensinal Functions that need //
517// two pair (simulated and reconstructed) //
518// to fill function //
519// //
520// Piotr.Skowronski@cern.ch //
c7ffd78f 521// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 522// //
523///////////////////////////////////////////////////////
524
525class AliHBTTwoPairFctn1D: public AliHBTTwoPairFctn, public AliHBTFunction1D
1b446896 526{
527 public:
26f1270c 528 AliHBTTwoPairFctn1D(){}//default conmstructor
529 AliHBTTwoPairFctn1D(Int_t nbins, Float_t maxXval, Float_t minXval);
530 AliHBTTwoPairFctn1D(const Char_t *name, const Char_t *title);
531 AliHBTTwoPairFctn1D(const Char_t *name, const Char_t *title,
532 Int_t nbins, Float_t maxXval, Float_t minXval);
533 virtual ~AliHBTTwoPairFctn1D(){}
534
1b446896 535 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
536 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
6f1c277c 537 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
3c1edb34 538 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
c41732dc 539 void Init(){InitFunction();}
8f0a515e 540 const char* Name(){return GetName();}
c41732dc 541
1b446896 542 protected:
a22a56ec 543 virtual Double_t GetValue(AliHBTPair* trackpair, AliHBTPair* partpair) const = 0;
6e8d850a 544
26f1270c 545 ClassDef(AliHBTTwoPairFctn1D,2)
1b446896 546};
1b446896 547/******************************************************************/
548/******************************************************************/
549/******************************************************************/
26f1270c 550
551//____________________
552///////////////////////////////////////////////////////
553// //
554// AliHBTTwoPairFctn2D //
555// //
556// Base Calss for 2-dimensinal Functions that need //
557// two pair (simulated and reconstructed) //
558// to fill function //
559// //
560// Piotr.Skowronski@cern.ch //
c7ffd78f 561// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 562// //
563///////////////////////////////////////////////////////
564
565class AliHBTTwoPairFctn2D: public AliHBTTwoPairFctn, public AliHBTFunction2D
ba95ae3f 566{
567 public:
26f1270c 568 AliHBTTwoPairFctn2D(){}
569
570 AliHBTTwoPairFctn2D(const Char_t *name, const Char_t *title);
571
572 AliHBTTwoPairFctn2D(Int_t nXbins, Double_t maxXval, Double_t minXval,
573 Int_t nYbins, Double_t maxYval, Double_t minYval);
574
575 AliHBTTwoPairFctn2D(const Char_t *name, const Char_t *title,
576 Int_t nXbins, Double_t maxXval, Double_t minXval,
577 Int_t nYbins, Double_t maxYval, Double_t minYval);
578
579 virtual ~AliHBTTwoPairFctn2D(){}
ba95ae3f 580
581 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
582 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
6f1c277c 583 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
3c1edb34 584 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
c41732dc 585 void Init(){InitFunction();}
8f0a515e 586 const char* Name(){return GetName();}
26f1270c 587
ba95ae3f 588 protected:
a22a56ec 589 virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y) const = 0;
ba95ae3f 590
26f1270c 591 ClassDef(AliHBTTwoPairFctn2D,2)
ba95ae3f 592};
1b446896 593/******************************************************************/
594/******************************************************************/
595/******************************************************************/
596
26f1270c 597//____________________
598///////////////////////////////////////////////////////
599// //
600// AliHBTTwoPairFctn3D //
601// //
602// Base Calss for 3-dimensinal Functions that need //
603// two pair (simulated and reconstructed) //
604// to fill function //
605// //
606// Piotr.Skowronski@cern.ch //
c7ffd78f 607// http://aliweb.cern.ch/people/skowron/analyzer //
26f1270c 608// //
609///////////////////////////////////////////////////////
610
611class AliHBTTwoPairFctn3D: public AliHBTTwoPairFctn, public AliHBTFunction3D
612{
613 public:
614 AliHBTTwoPairFctn3D(){}
615
616 AliHBTTwoPairFctn3D(const Char_t *name, const Char_t *title);
617
618 AliHBTTwoPairFctn3D(Int_t nXbins, Double_t maxXval, Double_t minXval,
619 Int_t nYbins, Double_t maxYval, Double_t minYval,
620 Int_t nZbins, Double_t maxZval, Double_t minZval);
621
622 AliHBTTwoPairFctn3D(const Char_t *name, const Char_t *title,
623 Int_t nXbins, Double_t maxXval, Double_t minXval,
624 Int_t nYbins, Double_t maxYval, Double_t minYval,
625 Int_t nZbins, Double_t maxZval, Double_t minZval);
626
627 virtual ~AliHBTTwoPairFctn3D(){}//destructor
1b446896 628
26f1270c 629 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
630 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
6f1c277c 631 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
3c1edb34 632 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
c41732dc 633 void Init(){InitFunction();}
8f0a515e 634 const char* Name(){return GetName();}
26f1270c 635
636 protected:
a22a56ec 637 virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y, Double_t& z) const = 0;
26f1270c 638
26f1270c 639 ClassDef(AliHBTTwoPairFctn3D,2)
640};
1b446896 641
642#endif