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