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