]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - HBTAN/AliHBTFunction.h
Updates needed to be in synch with TDPMjet.
[u/mrichter/AliRoot.git] / HBTAN / AliHBTFunction.h
... / ...
CommitLineData
1#ifndef ALIHBTFUNCTION_H
2#define ALIHBTFUNCTION_H
3
4/* Id: $ */
5
6///////////////////////////////////////////////////////
7// //
8// AliHBTFunction //
9// //
10// Abstract Base Calss for all the function classes //
11// //
12// Piotr.Skowronski@cern.ch //
13// http://aliweb.cern.ch/people/skowron/analyzer //
14// //
15///////////////////////////////////////////////////////
16
17#include <TH1.h>
18#include <TH2D.h>
19#include <TH3D.h>
20
21#include "AliAODPairCut.h"
22#include "AliHBTPair.h"
23
24
25class AliHBTAnalysis;
26class AliVAODParticleCut;
27
28class AliHBTFunction: public TNamed
29{
30 public:
31 AliHBTFunction();
32 AliHBTFunction(const char* name, const char* title);
33 AliHBTFunction(const AliHBTFunction & source);
34
35 virtual ~AliHBTFunction();
36
37 AliHBTFunction & operator= (const AliHBTFunction & source);
38
39 virtual TH1* GetNumerator() const = 0;
40 virtual TH1* GetDenominator() const = 0;
41 virtual TH1* GetResult() = 0;
42
43 virtual Int_t WriteFunction();
44 virtual void InitFunction();
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
50 void SetPairCut(AliAODPairCut* cut);
51 void UseAbsoluteValues(Bool_t flag){fAbs = flag;}
52
53 virtual AliHBTPair* CheckPair(AliHBTPair* pair);
54 void SetWriteNumAndDen(Bool_t flag = kFALSE){fWriteNumAndDen = flag;}
55 protected:
56 virtual void BuildHistos() = 0;//builds default histograms
57 AliAODPairCut* fPairCut; //pair cut
58 Bool_t fWriteNumAndDen; //flag indicating whether numerator and denominator should be writted together with a result
59 Bool_t fAbs;//flag indicating if absolute values of qout, qside and qlong should be histogrammed
60
61 ClassDef(AliHBTFunction,3)
62};
63/******************************************************************/
64inline AliHBTPair* AliHBTFunction::CheckPair(AliHBTPair* pair)
65{
66 //check if pair and both particles meets the cut criteria
67 if(fPairCut->Rejected(pair)) return 0x0; //if the pair is BAD
68
69// It is not allowed to change the order here beacause analysis enforce the order
70
71// {//it is BAD
72// pair = pair->GetSwappedPair();
73// if(pair)
74// if(fPairCut->Rejected(pair)) //so try reverse combination
75// {
76// return 0x0;//it is BAD as well - so return
77// }
78// }
79
80 return pair;
81}
82
83/******************************************************************/
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/******************************************************************/
102/******************************************************************/
103/******************************************************************/
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 //
114// http://aliweb.cern.ch/people/skowron/analyzer //
115// //
116///////////////////////////////////////////////////////
117
118class AliHBTOnePairFctn
119{
120 public:
121 AliHBTOnePairFctn(){}
122 virtual ~AliHBTOnePairFctn(){}
123
124 virtual void ProcessSameEventParticles(AliHBTPair* pair) = 0;
125 virtual void ProcessDiffEventParticles(AliHBTPair* pair) = 0;
126
127 virtual void Init() = 0;
128 virtual Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0) = 0;
129 virtual const char* Name() = 0;
130
131 ClassDef(AliHBTOnePairFctn,2)
132};
133/******************************************************************/
134/******************************************************************/
135/******************************************************************/
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 //
150// http://aliweb.cern.ch/people/skowron/analyzer //
151// //
152///////////////////////////////////////////////////////
153
154class AliHBTTwoPairFctn
155{
156 public:
157 AliHBTTwoPairFctn(){};
158 virtual ~AliHBTTwoPairFctn(){};
159
160 virtual void
161 ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
162 virtual void
163 ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
164
165 virtual void Init() = 0;
166 virtual Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0) = 0;
167 virtual const char* Name() = 0;
168
169 ClassDef(AliHBTTwoPairFctn,2)
170
171};
172/******************************************************************/
173/******************************************************************/
174/******************************************************************/
175
176//____________________
177///////////////////////////////////////////////////////
178// //
179// AliHBTFunction1D //
180// //
181// Base Calss for 1-dimensinal Functions //
182// //
183// Piotr.Skowronski@cern.ch //
184// http://aliweb.cern.ch/people/skowron/analyzer //
185// //
186///////////////////////////////////////////////////////
187
188
189class AliHBTFunction1D: public AliHBTFunction
190{
191 public:
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);
197
198 AliHBTFunction1D(const AliHBTFunction1D & source);
199 AliHBTFunction1D & operator= (const AliHBTFunction1D& /*source*/);
200
201 virtual ~AliHBTFunction1D();
202
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;}
208
209 protected:
210 //returns value to be histogrammed
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
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
225
226 ClassDef(AliHBTFunction1D,2)
227};
228
229/******************************************************************/
230/******************************************************************/
231/******************************************************************/
232
233//____________________
234///////////////////////////////////////////////////////
235// //
236// AliHBTFunction2D //
237// //
238// Base Calss for 2-dimensinal Functions //
239// //
240// Piotr.Skowronski@cern.ch //
241// http://aliweb.cern.ch/people/skowron/analyzer //
242// //
243///////////////////////////////////////////////////////
244
245class AliHBTFunction2D: public AliHBTFunction
246{
247 public:
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
259 AliHBTFunction2D(const AliHBTFunction2D & source);
260
261 AliHBTFunction2D & operator= (const AliHBTFunction2D & /*source*/);
262
263 virtual ~AliHBTFunction2D();
264
265 TH1* GetNumerator() const {return fNumerator;}
266 TH1* GetDenominator() const {return fDenominator;}
267
268 void SetNumberOfBinsToScale(UInt_t xn = fgkDefaultNBinsToScaleX,
269 UInt_t yn = fgkDefaultNBinsToScaleY);
270
271 Double_t Scale();
272 protected:
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
277 TH2D* fNumerator; // Numerator histogram
278 TH2D* fDenominator; // Denominator histogram
279
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
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
297 ClassDef(AliHBTFunction2D,2)
298};
299/******************************************************************/
300/******************************************************************/
301/******************************************************************/
302
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 //
312// http://aliweb.cern.ch/people/skowron/analyzer //
313// //
314///////////////////////////////////////////////////////
315
316class AliHBTFunction3D: public AliHBTFunction
317{
318 public:
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);
331
332 AliHBTFunction3D(const AliHBTFunction3D & source);
333 AliHBTFunction3D & operator= (const AliHBTFunction3D & /*source*/);
334
335 virtual ~AliHBTFunction3D();//destructor
336
337 TH1* GetNumerator() const {return fNumerator;}
338 TH1* GetDenominator() const {return fDenominator;}
339
340
341 void SetNumberOfBinsToScale(UInt_t xn = fgkDefaultNBinsToScaleX,
342 UInt_t yn = fgkDefaultNBinsToScaleY,
343 UInt_t zn = fgkDefaultNBinsToScaleZ);
344
345 Double_t Scale();
346
347 protected:
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
353 TH3F* fNumerator; // Numerator histogram
354 TH3F* fDenominator; // Denominator histogram
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
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
378 ClassDef(AliHBTFunction3D,2)
379};
380/******************************************************************/
381/******************************************************************/
382/******************************************************************/
383
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 //
393// http://aliweb.cern.ch/people/skowron/analyzer //
394// //
395///////////////////////////////////////////////////////
396
397class AliHBTOnePairFctn1D: public AliHBTOnePairFctn, public AliHBTFunction1D
398{
399 public:
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);
409 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
410 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
411 void Init(){InitFunction();}
412 const char* Name(){return GetName();}
413
414 protected:
415 //retruns velue to be histogrammed
416 virtual Double_t GetValue(AliHBTPair* pair) const = 0;
417 ClassDef(AliHBTOnePairFctn1D,2)
418};
419/******************************************************************/
420/******************************************************************/
421/******************************************************************/
422
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 //
432// http://aliweb.cern.ch/people/skowron/analyzer //
433// //
434///////////////////////////////////////////////////////
435
436class AliHBTOnePairFctn2D: public AliHBTOnePairFctn, public AliHBTFunction2D
437{
438 public:
439 AliHBTOnePairFctn2D(){}
440
441 AliHBTOnePairFctn2D(const Char_t *name, const Char_t *title);
442
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);
454 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
455 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
456 void Init(){InitFunction();}
457 const char* Name(){return GetName();}
458 protected:
459 virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y) const = 0;
460 ClassDef(AliHBTOnePairFctn2D,2)
461};
462/******************************************************************/
463/******************************************************************/
464/******************************************************************/
465
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 //
475// http://aliweb.cern.ch/people/skowron/analyzer //
476// //
477///////////////////////////////////////////////////////
478
479class AliHBTOnePairFctn3D: public AliHBTOnePairFctn, public AliHBTFunction3D
480{
481 public:
482 AliHBTOnePairFctn3D(){}
483
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);
499 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
500 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
501 void Init(){InitFunction();}
502 const char* Name(){return GetName();}
503 protected:
504 virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const = 0;
505 ClassDef(AliHBTOnePairFctn3D,2)
506};
507/******************************************************************/
508/******************************************************************/
509/******************************************************************/
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 //
521// http://aliweb.cern.ch/people/skowron/analyzer //
522// //
523///////////////////////////////////////////////////////
524
525class AliHBTTwoPairFctn1D: public AliHBTTwoPairFctn, public AliHBTFunction1D
526{
527 public:
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
535 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
536 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
537 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
538 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
539 void Init(){InitFunction();}
540 const char* Name(){return GetName();}
541
542 protected:
543 virtual Double_t GetValue(AliHBTPair* trackpair, AliHBTPair* partpair) const = 0;
544
545 ClassDef(AliHBTTwoPairFctn1D,2)
546};
547/******************************************************************/
548/******************************************************************/
549/******************************************************************/
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 //
561// http://aliweb.cern.ch/people/skowron/analyzer //
562// //
563///////////////////////////////////////////////////////
564
565class AliHBTTwoPairFctn2D: public AliHBTTwoPairFctn, public AliHBTFunction2D
566{
567 public:
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(){}
580
581 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
582 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
583 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
584 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
585 void Init(){InitFunction();}
586 const char* Name(){return GetName();}
587
588 protected:
589 virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y) const = 0;
590
591 ClassDef(AliHBTTwoPairFctn2D,2)
592};
593/******************************************************************/
594/******************************************************************/
595/******************************************************************/
596
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 //
607// http://aliweb.cern.ch/people/skowron/analyzer //
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
628
629 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
630 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
631 Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
632 Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
633 void Init(){InitFunction();}
634 const char* Name(){return GetName();}
635
636 protected:
637 virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y, Double_t& z) const = 0;
638
639 ClassDef(AliHBTTwoPairFctn3D,2)
640};
641
642#endif