]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HBTAN/AliHBTFunction.cxx
effc++ warnings
[u/mrichter/AliRoot.git] / HBTAN / AliHBTFunction.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 #include "AliHBTFunction.h"
19 #include "AliLog.h"
20
21
22 //--------------------------------------------------------------------
23 //AliHBTFunction
24 //Author: Piotr Krzysztof Skowronski
25 //Piotr.Skowronski@cern.ch
26 //Base classes for HBT functions
27 /*
28  OnePairFctn       Function                  TwoPairFctn
29    | \    \        /  |   \                      /|\   
30    |  \    \      /   |    \                    / | \    
31    |   \    \   1D   2D    3D                  /  |  \    
32    |    \    \  / \   |\   | \________________/__ |   \             
33    |     \    \/   \  | \__|_____________    /   \|    \             
34    |      \    \    \_|____|__           \  /     |     \            
35    |       \ /  \___  |    |  \           \/      |\     \              
36    |        /       \ |    |   \          /\      | \     \             
37    |       / \       \|    |    \        /  \     |  \     \              
38    |      /   \      /\    |     \      /    \    |   \     |              
39    |     /     \    /  \   |      \    /      \   |    \    |               
40    |    /       \  /    \  |       \  /        \  |     \   |
41    |   /         \/      \ |        \/          \ |      \  |               
42  OnePair1D   OnePair2D  OnePair3D  TwoPair1D  TwoPair2D TwoPair3D
43
44
45  four particle functions are intendent to be resolution functions:
46  it is mecessary to have simulated particle pair corresponding to given
47  recontructed track pair in order to calculate function simualted value 
48  and recontructed value, to be further histogrammed
49 */
50 //--------------------------------------------------------------------- 
51
52 #include <TH2.h>
53 #include <TH3.h>
54
55 /******************************************************************/
56 /******************************************************************/
57
58 ClassImp( AliHBTFunction )
59
60 AliHBTFunction::AliHBTFunction():
61  fPairCut(new AliAODPairEmptyCut()), //dummy cut  
62  fWriteNumAndDen(kFALSE),
63  fAbs(kFALSE)
64 {
65 //Default constructor
66 }
67 /******************************************************************/
68
69 AliHBTFunction::AliHBTFunction(const char* name,const char* title):
70  TNamed(name,title),
71  fPairCut(new AliAODPairEmptyCut()), //dummy cut  
72  fWriteNumAndDen(kFALSE),
73  fAbs(kFALSE)
74 {
75 //Constructor  
76 }
77 /******************************************************************/
78
79 AliHBTFunction::AliHBTFunction(const AliHBTFunction & source):
80  TNamed(source),
81  fPairCut((AliAODPairCut*)source.fPairCut->Clone()),
82  fWriteNumAndDen(source.fWriteNumAndDen),
83  fAbs(source.fAbs)
84 {
85 // Copy constructor needed by the coding conventions
86 }
87 /******************************************************************/
88
89 AliHBTFunction::~AliHBTFunction()
90 {
91 //destructor  
92   AliDebug(1,"Deleting");
93   delete fPairCut;
94 }
95 /******************************************************************/
96 AliHBTFunction & AliHBTFunction::operator= (const AliHBTFunction & source)
97 {
98  // Assignment needed by the coding conventions
99   delete fPairCut;
100   fPairCut = (AliAODPairCut*)source.fPairCut->Clone();
101   fAbs = source.fAbs;
102   return * this;
103 }
104
105 Int_t AliHBTFunction::WriteFunction()
106 {
107 //writes result of the function to file
108   Int_t retval =0;
109    AliDebug(1,"Entering");
110    if (fWriteNumAndDen)
111     { 
112      AliDebug(1,"Writing Num & Den");
113      if (GetNumerator()) GetNumerator()->Write();
114      if (GetDenominator()) GetDenominator()->Write();
115      AliDebug(1,"Writing Num & Den Done");
116     } 
117    AliDebug(1,"Getting Result");
118    TH1* res = GetResult();
119    AliDebug(1,"Getting Result Done");
120    
121    if (res) 
122     { 
123       AliDebug(1,"Writing Result");
124       retval = res->Write();
125       AliDebug(1,"Writing Result Done");
126     }
127    return retval;
128 }
129 /******************************************************************/
130
131 TH1* AliHBTFunction::GetRatio(Double_t normfactor)
132  {
133  //returns ratio of numerator and denominator
134  //
135    AliDebug(1,Form("Norm. Factor is %f for %s",normfactor,GetName()));
136    
137    if (normfactor == 0.0)
138     {
139       AliError("Scaling Factor is 0. Null poiner returned");
140       return 0x0;
141     }
142    TString str = fName + " ratio";
143    TH1 *result = (TH1*)GetNumerator()->Clone(str.Data());
144    result->SetDirectory(0x0);
145    
146    result->SetTitle(str.Data());
147    
148    result->Divide(GetNumerator(),GetDenominator(),normfactor);
149    
150    return result;
151    
152  }
153 /******************************************************************/
154 void AliHBTFunction::SetPairCut(AliAODPairCut* cut)
155 {
156 //Sets new Pair Cut. Old one is deleted
157 //Note that it is created new object instead of simple pointer set
158 //I do not want to have pointer 
159 //to object created somewhere else
160 //because in that case I could not believe that 
161 //it would always exist (sb could delete it)
162 //so we have always own copy
163
164  if(!cut) 
165    {
166      AliError("argument is NULL");
167      return;
168    }
169  delete fPairCut;
170  fPairCut = (AliAODPairCut*)cut->Clone();
171  
172 }
173
174 /******************************************************************/
175
176 void AliHBTFunction::Rename(const Char_t * name)
177  {
178  //renames the function and histograms
179   SetName(name);
180   SetTitle(name);
181   
182   TString numstr = fName + " Numerator";  //title and name of the 
183                                            //numerator histogram
184   TString denstr = fName + " Denominator";//title and name of the 
185                                            //denominator histogram
186  
187   GetNumerator()->SetName(numstr.Data());
188   GetNumerator()->SetTitle(numstr.Data());
189   
190   GetDenominator()->SetName(denstr.Data());
191   GetDenominator()->SetTitle(denstr.Data());
192   
193  }
194
195 void AliHBTFunction::Rename(const Char_t * name, const Char_t * title)
196  {
197  //renames and retitle the function and histograms
198  
199   SetName(name);
200   SetTitle(title);
201   
202   TString numstrn = fName + " Numerator";  //name of the 
203                                            //numerator histogram
204
205   TString numstrt = fTitle + " Numerator";  //title of the 
206                                            //numerator histogram
207                    
208   TString denstrn = fName + " Denominator";//name of the 
209                                            //denominator histogram
210
211   TString denstrt = fTitle + " Denominator";//title of the 
212                                            //denominator histogram
213                    
214  
215   GetNumerator()->SetName(numstrn.Data());
216   GetNumerator()->SetTitle(numstrt.Data());
217   
218   GetDenominator()->SetName(denstrn.Data());
219   GetDenominator()->SetTitle(denstrt.Data());
220
221
222  }
223 /******************************************************************/
224
225 void AliHBTFunction::InitFunction()
226 {
227 //Iniotializes fctn.: Resets histograms
228 //In case histograms are not created in ctor, builds with default parameters
229   AliDebug(1,"Entering");
230   if ( !(GetNumerator()&&GetDenominator()) ) BuildHistos();
231   GetNumerator()->Reset();
232   GetDenominator()->Reset();
233
234   GetNumerator()->SetDirectory(0x0);
235   GetDenominator()->SetDirectory(0x0);
236   AliDebug(1,"Done");
237 }
238 /******************************************************************/
239 /******************************************************************/
240 /******************************************************************/
241 ClassImp(AliHBTCorrelFunction)
242 //____________________________________________
243 //////////////////////////////////////////////
244 //
245 // class AliHBTCorrelFunction
246 // 
247 // Base class for correlation fuctions, that is which returns ratio.
248 // Stores pointer the created ratio histogram and deletes it when function is deleted
249 // created in order to evoid memory leak 
250 //
251 ////////////////////////////////////////////////////////
252 AliHBTCorrelFunction& AliHBTCorrelFunction::operator=(const AliHBTCorrelFunction& in)
253 {
254  //assigment operator
255   if (&in == this) return *this;
256   delete fRatio;
257   fRatio=(in.fRatio)?(TH1*)in.fRatio->Clone():0x0;
258   fRatio->SetDirectory(0x0);
259   return *this;
260 }
261
262 /******************************************************************/
263 /******************************************************************/
264 /******************************************************************/
265
266 ClassImp( AliHBTOnePairFctn )
267
268 /******************************************************************/
269 /******************************************************************/
270 /******************************************************************/
271
272 ClassImp( AliHBTTwoPairFctn)
273
274 /******************************************************************/
275 /******************************************************************/
276 /******************************************************************/
277
278 ClassImp( AliHBTFunction1D )
279
280 const Int_t AliHBTFunction1D::fgkDefaultNBins = 100;
281 const Float_t AliHBTFunction1D::fgkDefaultMin = 0.0;
282 const Float_t AliHBTFunction1D::fgkDefaultMax = 0.15;
283 const UInt_t AliHBTFunction1D::fgkDefaultNBinsToScale = 30;
284
285
286 AliHBTFunction1D::AliHBTFunction1D():
287  fNumerator(0x0),
288  fDenominator(0x0),
289  fNBinsToScale(fgkDefaultNBinsToScale)
290 {//default constructor
291 }
292 /******************************************************************/
293
294 AliHBTFunction1D::AliHBTFunction1D(Int_t nbins, Float_t maxXval, Float_t minXval):
295  fNumerator(0x0),
296  fDenominator(0x0),
297  fNBinsToScale(fgkDefaultNBinsToScale)
298 {
299  //Constructor of Two Part One Dimentional Function 
300  // nbins: number of bins in histograms - default 100
301  // maxXval and minXval: range of histgram(s) default 0 - 0.15 (GeV)
302  BuildHistos(nbins,maxXval,minXval);
303 }
304 /******************************************************************/
305 AliHBTFunction1D::AliHBTFunction1D(const Char_t *name, const Char_t *title):
306  AliHBTFunction(name,title),
307  fNumerator(0x0),
308  fDenominator(0x0),
309  fNBinsToScale(fgkDefaultNBinsToScale)
310 {//constructor
311 }
312 /******************************************************************/
313 AliHBTFunction1D::AliHBTFunction1D(const Char_t *name, const Char_t *title,
314                                    Int_t nbins, Float_t maxXval, Float_t minXval):
315  AliHBTFunction(name,title),
316  fNumerator(0x0),
317  fDenominator(0x0),
318  fNBinsToScale(fgkDefaultNBinsToScale)
319 {
320 //constructor
321   BuildHistos(nbins,maxXval,minXval);
322 }
323 /******************************************************************/
324
325 AliHBTFunction1D::AliHBTFunction1D(const AliHBTFunction1D& source):
326   AliHBTFunction(source),
327   fNumerator(0x0),
328   fDenominator(0x0),
329   fNBinsToScale(0x0)
330 {
331 // Copy constructor needed by the coding conventions byt not used
332   Fatal("AliHBTFunction1D(const AliHBTFunction1D&)","Cpy ctor not usable.");
333 }
334 /******************************************************************/
335
336 AliHBTFunction1D& AliHBTFunction1D::operator= (const AliHBTFunction1D & /*source*/) 
337 {
338 // Assignment needed by the coding conventions byt not used
339   Fatal("Assignment operator","not implemented");
340   return * this;
341  }
342 /******************************************************************/
343
344 AliHBTFunction1D::~AliHBTFunction1D()
345 {
346 //destructor
347   delete fNumerator;
348   delete fDenominator;
349 }
350 /******************************************************************/
351 void AliHBTFunction1D::BuildHistos()
352 {
353 //builds histograms with default settings
354  BuildHistos(fgkDefaultNBins,fgkDefaultMax,fgkDefaultMin);
355 }
356
357 /******************************************************************/
358
359 void AliHBTFunction1D::BuildHistos(Int_t nbins, Float_t max, Float_t min)
360 {
361 //builds numarator and denominator hitograms
362   TString numstr = fName + " Numerator";  //title and name of the 
363                                           //numerator histogram
364   TString denstr = fName + " Denominator";//title and name of the 
365                                           //denominator histogram
366   fNumerator   = new TH1D(numstr.Data(),numstr.Data(),nbins,min,max);
367   fDenominator = new TH1D(denstr.Data(),denstr.Data(),nbins,min,max);
368    
369   fNumerator->Sumw2();
370   fDenominator->Sumw2();
371 }
372 /******************************************************************/
373
374 Double_t AliHBTFunction1D::Scale()
375 {
376  //Calculates the factor that should be used to scale 
377  //quatience of fNumerator and fDenominator to 1 at tail
378  return Scale(fNumerator,fDenominator);
379 }
380 /******************************************************************/
381
382 Double_t AliHBTFunction1D::Scale(TH1D* num,TH1D* den)
383 {
384  //Calculates the factor that should be used to scale 
385  //quatience of num and den to 1 at tail
386  
387   AliDebug(1,"Entered");
388   if(!num) 
389    {
390      AliError("No numerator");
391      return 0.0;
392    }
393   if(!den) 
394    {
395      AliError("No denominator");
396      return 0.0;
397    }
398   
399   if(fNBinsToScale < 1) 
400    {
401     AliError("Number of bins for scaling is smaller than 1");
402     return 0.0;
403    }
404   UInt_t nbins = num->GetNbinsX();
405   if (fNBinsToScale > nbins) 
406    {
407     AliError("Number of bins for scaling is bigger thnan number of bins in histograms");
408     return 0.0;
409    }
410   AliDebug(1,"No errors detected");
411
412   Double_t densum = 0.0;
413   Double_t numsum = 0.0;
414   
415   Int_t offset = nbins - fNBinsToScale - 1; 
416
417   for (UInt_t i = offset; i< nbins; i++)
418    {
419     if ( num->GetBinContent(i) > 0.0 )
420      {
421        densum += den->GetBinContent(i);
422        numsum += num->GetBinContent(i);
423      }
424    }
425   
426   AliDebug(1,Form("numsum=%f densum=%f fNBinsToScaleX=%d",numsum,densum,fNBinsToScale));
427   
428   if (numsum == 0) return 0.0;
429   Double_t ret = densum/numsum;
430
431   AliDebug(1,Form("returning %f",ret));
432   return ret;
433
434
435 /******************************************************************/
436 /******************************************************************/
437 /******************************************************************/
438
439 //____________________
440 ///////////////////////////////////////////////////////
441 //                                                   //
442 // AliHBTFunction2D                                  //
443 //                                                   //
444 // Base Calss for 2-dimensinal Functions             //
445 //                                                   //
446 // Piotr.Skowronski@cern.ch                          //
447 // http://aliweb.cern.ch/people/skowron/analyzer    //
448 //                                                   //
449 ///////////////////////////////////////////////////////
450
451 ClassImp( AliHBTFunction2D )
452
453 const Int_t AliHBTFunction2D::fgkDefaultNBinsX = 200;//default number of Bins in X axis in histograms
454 const Float_t AliHBTFunction2D::fgkDefaultMinX = 0.0;//Default min value of X axis in histograms
455 const Float_t AliHBTFunction2D::fgkDefaultMaxX = 1.5;//Default max value of X axis inhistograms
456
457 const Int_t AliHBTFunction2D::fgkDefaultNBinsY = 200;//default number of Bins in histograms
458 const Float_t AliHBTFunction2D::fgkDefaultMinY = -0.15;//Default min value of histograms
459 const Float_t AliHBTFunction2D::fgkDefaultMaxY =  0.15;//Default max value of histograms
460
461 const UInt_t AliHBTFunction2D::fgkDefaultNBinsToScaleX = 30;//Default number of X bins used for scaling to tale
462 const UInt_t AliHBTFunction2D::fgkDefaultNBinsToScaleY = 30;//Default number of bins used for scaling to tale
463
464 /******************************************************************/
465 AliHBTFunction2D::AliHBTFunction2D():
466  fNumerator(0x0),
467  fDenominator(0x0),
468  fNBinsToScaleX(fgkDefaultNBinsToScaleX), 
469  fNBinsToScaleY(fgkDefaultNBinsToScaleY)
470 {//default constructor
471 }
472 /******************************************************************/
473 AliHBTFunction2D::AliHBTFunction2D(const Char_t *name, const Char_t *title):
474  AliHBTFunction(name,title),
475  fNumerator(0x0),
476  fDenominator(0x0),
477  fNBinsToScaleX(fgkDefaultNBinsToScaleX), 
478  fNBinsToScaleY(fgkDefaultNBinsToScaleY)
479 {//constructor
480 }
481 /******************************************************************/
482
483 AliHBTFunction2D::AliHBTFunction2D(Int_t nXbins, Double_t maxXval, Double_t minXval,
484                                    Int_t nYbins, Double_t maxYval, Double_t minYval):
485  fNumerator(0x0),
486  fDenominator(0x0),
487  fNBinsToScaleX(fgkDefaultNBinsToScaleX), 
488  fNBinsToScaleY(fgkDefaultNBinsToScaleY)
489 {
490   BuildHistos(nXbins,maxXval,minXval,nYbins,maxYval,minYval);
491 }         
492 /******************************************************************/
493
494 AliHBTFunction2D::AliHBTFunction2D(const Char_t *name, const Char_t *title,
495                                    Int_t nXbins, Double_t maxXval, Double_t minXval,
496                                    Int_t nYbins, Double_t maxYval, Double_t minYval):
497  AliHBTFunction(name,title),
498  fNumerator(0x0),
499  fDenominator(0x0),
500  fNBinsToScaleX(fgkDefaultNBinsToScaleX), 
501  fNBinsToScaleY(fgkDefaultNBinsToScaleY)
502 {
503   BuildHistos(nXbins,maxXval,minXval,nYbins,maxYval,minYval);
504 }         
505 /******************************************************************/
506 AliHBTFunction2D::AliHBTFunction2D(const AliHBTFunction2D & source):
507   AliHBTFunction(source),
508   fNumerator(0x0),
509   fDenominator(0x0),
510   fNBinsToScaleX(0x0), 
511   fNBinsToScaleY(0x0)
512 {
513 // Copy constructor needed by the coding conventions byt not used
514   Fatal("AliHBTFunction2D(const AliHBTFunction2D&)","Cpy ctor not usable.");
515 }
516 /******************************************************************/
517
518 AliHBTFunction2D& AliHBTFunction2D::operator= (const AliHBTFunction2D& /*source*/) {
519 // Assignment needed by the coding conventions byt not used
520   Fatal("Assignment operator","not implemented");
521   return * this;
522 }
523 /******************************************************************/
524
525 AliHBTFunction2D::~AliHBTFunction2D()
526 {
527 //dtor
528   delete fNumerator;
529   delete fDenominator;
530 }
531 /******************************************************************/
532
533 void AliHBTFunction2D::BuildHistos()
534 {
535 //Creates default histograms
536   BuildHistos(fgkDefaultNBinsX,fgkDefaultMaxX,fgkDefaultMinX,
537               fgkDefaultNBinsY,fgkDefaultMaxY,fgkDefaultMinY);
538 }
539 /******************************************************************/
540
541 void AliHBTFunction2D::BuildHistos(Int_t nxbins, Float_t xmax, Float_t xmin,
542                                    Int_t nybins, Float_t ymax, Float_t ymin)
543 {
544 //Builds numerator and denominator histograms (2d-case)
545  TString numstr = fName + " Numerator";  //title and name of the 
546                                            //numerator histogram
547  TString denstr = fName + " Denominator";//title and name of the 
548                                            //denominator histogram
549          
550  fNumerator   = new TH2D(numstr.Data(),numstr.Data(),
551                          nxbins,xmin,xmax,nybins,ymin,ymax);
552                
553  fDenominator = new TH2D(denstr.Data(),denstr.Data(),
554                          nxbins,xmin,xmax,nybins,ymin,ymax);
555  
556  fNumerator->Sumw2();
557  fDenominator->Sumw2();
558 }
559 /******************************************************************/
560
561 void AliHBTFunction2D::SetNumberOfBinsToScale(UInt_t xn, UInt_t yn)
562 {
563 //defines area used for scaling factor calculation
564   fNBinsToScaleX = xn;
565   fNBinsToScaleY = yn;
566 }
567 /******************************************************************/
568
569 Double_t AliHBTFunction2D::Scale()
570 {
571 // Calculates the factor that should be used to scale 
572 // quatience of fNumerator and fDenominator to 1 at 
573 // given region
574   AliDebug(1,"Entered");
575   if(!fNumerator) 
576    {
577      AliError("No numerator");
578      return 0.0;
579    }
580   if(!fDenominator) 
581    {
582      AliError("No denominator");
583      return 0.0;
584    }
585   
586   if( (fNBinsToScaleX < 1) || (fNBinsToScaleY < 1) ) 
587    {
588     AliError("Number of bins for scaling is smaller thnan 1");
589     return 0.0;
590    }
591   UInt_t nbinsX = fNumerator->GetNbinsX();
592   if (fNBinsToScaleX > nbinsX) 
593    {
594     AliError("Number of X bins for scaling is bigger thnan number of bins in histograms");
595     return 0.0;
596    }
597    
598   UInt_t nbinsY = fNumerator->GetNbinsX();
599   if (fNBinsToScaleY > nbinsY) 
600    {
601     AliError("Number of Y bins for scaling is bigger thnan number of bins in histograms");
602     return 0.0;
603    }
604
605   AliDebug(1,"No errors detected");
606
607   Int_t offsetX = nbinsX - fNBinsToScaleX - 1; //bin that we start loop over bins in axis X
608   Int_t offsetY = nbinsY - fNBinsToScaleY - 1; //bin that we start loop over bins in axis X
609
610   Double_t densum = 0.0;
611   Double_t numsum = 0.0;
612   
613   for (UInt_t j = offsetY; j< nbinsY; j++)
614     for (UInt_t i = offsetX; i< nbinsX; i++)
615      {
616       if ( fNumerator->GetBinContent(i,j) > 0.0 )
617        {
618            densum += fDenominator->GetBinContent(i,j);
619            numsum += fNumerator->GetBinContent(i,j);
620        }
621      }
622   
623   AliDebug(1,Form("numsum=%f densum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d",
624                   numsum,densum,fNBinsToScaleX,fNBinsToScaleY));
625   
626   if (numsum == 0) return 0.0;
627   Double_t ret = densum/numsum;
628
629   AliDebug(1,Form("returning %f",ret));
630   return ret;
631
632
633 /******************************************************************/
634 /******************************************************************/
635 /******************************************************************/
636
637 //____________________
638 ///////////////////////////////////////////////////////
639 //                                                   //
640 // AliHBTFunction3D                                  //
641 //                                                   //
642 // Base Calss for 3-dimensinal Functions             //
643 //                                                   //
644 // Piotr.Skowronski@cern.ch                          //
645 // http://aliweb.cern.ch/people/skowron/analyzer    //
646 //                                                   //
647 ///////////////////////////////////////////////////////
648
649 ClassImp( AliHBTFunction3D)
650
651 const Int_t AliHBTFunction3D::fgkDefaultNBinsX = 200;//default number of Bins in X axis in histograms
652 const Float_t AliHBTFunction3D::fgkDefaultMinX = 0.0;//Default min value of X axis in histograms
653 const Float_t AliHBTFunction3D::fgkDefaultMaxX = 1.5;//Default max value of X axis inhistograms
654
655 const Int_t AliHBTFunction3D::fgkDefaultNBinsY = 200;//default number of Bins in histograms
656 const Float_t AliHBTFunction3D::fgkDefaultMinY = -0.15;//Default min value of histograms
657 const Float_t AliHBTFunction3D::fgkDefaultMaxY =  0.15;//Default max value of histograms
658
659 const Int_t AliHBTFunction3D::fgkDefaultNBinsZ = 200;//default number of Bins in histograms
660 const Float_t AliHBTFunction3D::fgkDefaultMinZ = -0.15;//Default min value of histograms
661 const Float_t AliHBTFunction3D::fgkDefaultMaxZ =  0.15;//Default max value of histograms
662
663 const UInt_t AliHBTFunction3D::fgkDefaultNBinsToScaleX = 30;//Default number of X bins used for scaling to tale
664 const UInt_t AliHBTFunction3D::fgkDefaultNBinsToScaleY = 30;//Default number of bins used for scaling to tale
665 const UInt_t AliHBTFunction3D::fgkDefaultNBinsToScaleZ = 30;//Default number of bins used for scaling to tale
666
667 AliHBTFunction3D::AliHBTFunction3D():
668  fNumerator(0x0),
669  fDenominator(0x0),
670  fNBinsToScaleX(fgkDefaultNBinsToScaleX), 
671  fNBinsToScaleY(fgkDefaultNBinsToScaleY),
672  fNBinsToScaleZ(fgkDefaultNBinsToScaleZ)
673 {
674  //constructor
675 }
676 /******************************************************************/
677
678 AliHBTFunction3D::AliHBTFunction3D(const Char_t *name, const Char_t *title):
679  AliHBTFunction(name,title),
680  fNumerator(0x0),
681  fDenominator(0x0),
682  fNBinsToScaleX(fgkDefaultNBinsToScaleX), 
683  fNBinsToScaleY(fgkDefaultNBinsToScaleY),
684  fNBinsToScaleZ(fgkDefaultNBinsToScaleZ)
685 {
686  //constructor
687 }  
688 /******************************************************************/
689
690 AliHBTFunction3D::AliHBTFunction3D(Int_t nXbins, Double_t maxXval, Double_t minXval, 
691                   Int_t nYbins, Double_t maxYval, Double_t minYval, 
692                   Int_t nZbins, Double_t maxZval, Double_t minZval):
693  fNumerator(0x0),
694  fDenominator(0x0),
695  fNBinsToScaleX(fgkDefaultNBinsToScaleX), 
696  fNBinsToScaleY(fgkDefaultNBinsToScaleY),
697  fNBinsToScaleZ(fgkDefaultNBinsToScaleZ)
698 {
699  //constructor
700  BuildHistos( nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval);
701 }         
702 /******************************************************************/
703
704 AliHBTFunction3D::AliHBTFunction3D(const Char_t *name, const Char_t *title,
705                  Int_t nXbins, Double_t maxXval, Double_t minXval, 
706                  Int_t nYbins, Double_t maxYval, Double_t minYval, 
707                  Int_t nZbins, Double_t maxZval, Double_t minZval):
708  AliHBTFunction(name,title),
709  fNumerator(0x0),
710  fDenominator(0x0),
711  fNBinsToScaleX(fgkDefaultNBinsToScaleX), 
712  fNBinsToScaleY(fgkDefaultNBinsToScaleY),
713  fNBinsToScaleZ(fgkDefaultNBinsToScaleZ)
714 {
715  //constructor
716  BuildHistos( nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval);
717 }         
718 /******************************************************************/
719
720 AliHBTFunction3D::AliHBTFunction3D(const AliHBTFunction3D& source):
721   AliHBTFunction(source),
722   fNumerator(0x0),
723   fDenominator(0x0),
724   fNBinsToScaleX(0x0), 
725   fNBinsToScaleY(0x0),
726   fNBinsToScaleZ(0x0)
727 {
728 // Copy constructor needed by the coding conventions byt not used
729   Fatal("AliHBTFunction3D(const AliHBTFunction3D&)","Cpy ctor not usable.");
730 }
731 /******************************************************************/
732
733 AliHBTFunction3D& AliHBTFunction3D::operator= (const AliHBTFunction3D & /*source*/) 
734 {
735 // Assignment needed by the coding conventions byt not used
736   Fatal("Assignment operator","not implemented");
737   return * this;
738  }
739 /******************************************************************/
740
741
742 AliHBTFunction3D::~AliHBTFunction3D()
743 {
744   delete fNumerator;
745   delete fDenominator;
746 }
747 /******************************************************************/
748
749 void AliHBTFunction3D::BuildHistos()
750 {
751 //Creates default histograms
752   BuildHistos(fgkDefaultNBinsX,fgkDefaultMaxX,fgkDefaultMinX,
753               fgkDefaultNBinsY,fgkDefaultMaxY,fgkDefaultMinY,
754               fgkDefaultNBinsZ,fgkDefaultMaxZ,fgkDefaultMinZ);
755 }
756 /******************************************************************/
757
758 void AliHBTFunction3D::BuildHistos(Int_t nxbins, Float_t xmax, Float_t xmin,
759                                    Int_t nybins, Float_t ymax, Float_t ymin,
760                        Int_t nzbins, Float_t zmax, Float_t zmin)
761 {
762   //Builds numerator and denominator histograms (3d-case)
763   
764    AliDebug(1,"Entered");
765    
766    if (fNumerator )
767     {
768       delete fNumerator;
769       fNumerator = 0x0;
770     }
771
772    if (fDenominator )
773     {
774       delete fDenominator;
775       fDenominator = 0x0;
776     }
777    
778    TString numstr = fName + " Numerator";  //title and name of the 
779                                            //numerator histogram
780    TString denstr = fName + " Denominator";//title and name of the 
781                                            //denominator histogram
782          
783    fNumerator   = new TH3F(numstr.Data(),numstr.Data(),
784                            nxbins,xmin,xmax,nybins,ymin,ymax,nzbins,zmin,zmax);
785                
786    fDenominator = new TH3F(denstr.Data(),denstr.Data(),
787                            nxbins,xmin,xmax,nybins,ymin,ymax,nzbins,zmin,zmax);
788    
789    fNumerator->Sumw2();
790    fDenominator->Sumw2();
791 }
792
793 /******************************************************************/
794
795 Double_t AliHBTFunction3D::Scale()
796 {
797   // Calculates the factor that should be used to scale 
798   // quatience of fNumerator and fDenominator to 1 at 
799   // given volume
800   AliDebug(1,"Entered");
801   if(!fNumerator) 
802    {
803      AliError("No numerator");
804      return 0.0;
805    }
806   if(!fDenominator) 
807    {
808      AliError("No denominator");
809      return 0.0;
810    }
811   
812   if( (fNBinsToScaleX < 1) || (fNBinsToScaleY < 1) || (fNBinsToScaleZ < 1)) 
813    {
814     AliError("Number of bins for scaling is smaller thnan 1");
815     return 0.0;
816    }
817   UInt_t nbinsX = fNumerator->GetNbinsX();
818   if (fNBinsToScaleX > nbinsX) 
819    {
820     AliError("Number of X bins for scaling is bigger thnan number of bins in histograms");
821     return 0.0;
822    }
823    
824   UInt_t nbinsY = fNumerator->GetNbinsX();
825   if (fNBinsToScaleY > nbinsY) 
826    {
827     AliError("Number of Y bins for scaling is bigger thnan number of bins in histograms");
828     return 0.0;
829    }
830
831   UInt_t nbinsZ = fNumerator->GetNbinsZ();
832   if (fNBinsToScaleZ > nbinsZ) 
833    {
834     AliError("Number of Z bins for scaling is bigger thnan number of bins in histograms");
835     return 0.0;
836    }
837
838   AliDebug(1,"No errors detected");
839
840   Int_t offsetX = nbinsX - fNBinsToScaleX - 1; //bin that we start loop over bins in axis X
841   Int_t offsetY = nbinsY - fNBinsToScaleY - 1; //bin that we start loop over bins in axis Y
842   Int_t offsetZ = nbinsZ - fNBinsToScaleZ - 1; //bin that we start loop over bins in axis Z
843
844   Double_t densum = 0.0;
845   Double_t numsum = 0.0;
846   
847   for (UInt_t k = offsetZ; k<nbinsZ; k++)
848     for (UInt_t j = offsetY; j<nbinsY; j++)
849       for (UInt_t i = offsetX; i<nbinsX; i++)
850        {
851         if ( fNumerator->GetBinContent(i,j,k) > 0.0 )
852          {
853            
854            densum += fDenominator->GetBinContent(i,j,k);
855            numsum += fNumerator->GetBinContent(i,j,k);
856          }
857        }
858   
859   AliDebug(1,Form("numsum=%f densum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d fNBinsToScaleZ=%d",
860           numsum,densum,fNBinsToScaleX,fNBinsToScaleY,fNBinsToScaleZ));
861   
862   if (numsum == 0) return 0.0;
863   Double_t ret = densum/numsum;
864
865   AliDebug(1,Form("returning %f",ret));
866   return ret;
867
868 /******************************************************************/
869
870 void AliHBTFunction3D::SetNumberOfBinsToScale(UInt_t xn, UInt_t yn,UInt_t zn)
871 {
872 //sets up the volume to be used for scaling to tail
873  fNBinsToScaleX = xn;
874  fNBinsToScaleY = yn;
875  fNBinsToScaleZ = zn;
876 }
877
878 /******************************************************************/
879 /******************************************************************/
880 /******************************************************************/
881 /******************************************************************/
882 /******************************************************************/
883 /******************************************************************/
884 /******************************************************************/
885 /******************************************************************/
886 /******************************************************************/
887
888 //____________________
889 ///////////////////////////////////////////////////////
890 //                                                   //
891 // AliHBTOnePairFctn1D                               //
892 //                                                   //
893 // Base Calss for 1-dimensinal Functions that need   //
894 // one pair to fill function                         //
895 //                                                   //
896 // Piotr.Skowronski@cern.ch                          //
897 // http://aliweb.cern.ch/people/skowron/analyzer    //
898 //                                                   //
899 ///////////////////////////////////////////////////////
900
901 ClassImp( AliHBTOnePairFctn1D )
902 /******************************************************************/
903
904 AliHBTOnePairFctn1D::AliHBTOnePairFctn1D(Int_t nbins, Float_t maxXval, Float_t minXval):
905  AliHBTFunction1D(nbins,maxXval,minXval)
906 {
907   //constructor
908 }
909 /******************************************************************/
910
911 AliHBTOnePairFctn1D::AliHBTOnePairFctn1D(const Char_t *name, const Char_t *title):
912  AliHBTFunction1D(name,title)
913 {
914
915 }
916 /******************************************************************/
917
918 AliHBTOnePairFctn1D::AliHBTOnePairFctn1D(const Char_t *name, const Char_t *title,
919                                          Int_t nbins, Float_t maxXval, Float_t minXval):
920  AliHBTFunction1D(name,title,nbins,maxXval,minXval)
921 {
922   //constructor
923 }
924 /******************************************************************/
925
926 void AliHBTOnePairFctn1D::ProcessSameEventParticles(AliHBTPair* pair)
927 {
928  //Fills the numerator using pair from the same event
929    pair = CheckPair(pair);
930    if(pair) fNumerator->Fill(GetValue(pair));
931 }
932 /******************************************************************/
933 void AliHBTOnePairFctn1D::ProcessDiffEventParticles(AliHBTPair* pair)
934  {
935   //Fills the denumerator using mixed pairs
936    pair = CheckPair(pair);
937    if(pair) fDenominator->Fill(GetValue(pair));
938   }
939
940 /******************************************************************/
941 /******************************************************************/
942 /******************************************************************/
943
944 //____________________
945 ///////////////////////////////////////////////////////
946 //                                                   //
947 // AliHBTOnePairFctn2D                               //
948 //                                                   //
949 // Base Calss for 2-dimensinal Functions that need   //
950 // one pair to fill function                         //
951 //                                                   //
952 // Piotr.Skowronski@cern.ch                          //
953 // http://aliweb.cern.ch/people/skowron/analyzer    //
954 //                                                   //
955 ///////////////////////////////////////////////////////
956
957 ClassImp( AliHBTOnePairFctn2D )
958 /******************************************************************/
959
960 AliHBTOnePairFctn2D::AliHBTOnePairFctn2D(const Char_t *name, const Char_t *title):
961  AliHBTFunction2D(name,title)
962 {
963   //constructor
964 }
965 /******************************************************************/
966
967 AliHBTOnePairFctn2D::AliHBTOnePairFctn2D(Int_t nXbins, Double_t maxXval, Double_t minXval, 
968                       Int_t nYbins, Double_t maxYval, Double_t minYval):
969  AliHBTFunction2D(nXbins, maxXval, minXval, nYbins, maxYval, minYval)
970 {
971   //constructor
972 }
973 /******************************************************************/
974
975 AliHBTOnePairFctn2D::AliHBTOnePairFctn2D(const Char_t *name, const Char_t *title,
976                       Int_t nXbins, Double_t maxXval, Double_t minXval, 
977                       Int_t nYbins, Double_t maxYval, Double_t minYval):
978  AliHBTFunction2D(name,title, nXbins, maxXval, minXval, nYbins, maxYval, minYval)
979 {
980   //constructor
981 }
982 /******************************************************************/
983
984 void AliHBTOnePairFctn2D::ProcessSameEventParticles(AliHBTPair* pair)
985 {
986   // Fills the numerator using pairs from the same event
987   pair = CheckPair(pair);
988   if(pair) 
989    { 
990      Double_t x,y;
991      GetValues(pair,x,y);
992      fNumerator->Fill(x,y);
993    }
994 }
995 /******************************************************************/
996
997 void AliHBTOnePairFctn2D::ProcessDiffEventParticles(AliHBTPair* pair)
998 {
999   // Fills the denumerator using mixed pairs
1000   pair = CheckPair(pair);
1001   if(pair) 
1002    { 
1003      Double_t x,y;
1004      GetValues(pair,x,y);
1005      fDenominator->Fill(x,y);
1006    }
1007 }
1008 /******************************************************************/
1009 /******************************************************************/
1010 /******************************************************************/
1011 /******************************************************************/
1012 //____________________
1013 ///////////////////////////////////////////////////////
1014 //                                                   //
1015 // AliHBTOnePairFctn3D                               //
1016 //                                                   //
1017 // Base Calss for 3-dimensinal Functions that need   //
1018 // one pair to fill function                         //
1019 //                                                   //
1020 // Piotr.Skowronski@cern.ch                          //
1021 // http://aliweb.cern.ch/people/skowron/analyzer    //
1022 //                                                   //
1023 ///////////////////////////////////////////////////////
1024 ClassImp( AliHBTOnePairFctn3D)
1025
1026 /******************************************************************/
1027
1028 AliHBTOnePairFctn3D::AliHBTOnePairFctn3D(const Char_t *name, const Char_t *title):
1029  AliHBTFunction3D(name,title)
1030 {
1031   //constructor
1032 }
1033 /******************************************************************/
1034
1035 AliHBTOnePairFctn3D::AliHBTOnePairFctn3D(Int_t nXbins, Double_t maxXval, Double_t minXval, 
1036                       Int_t nYbins, Double_t maxYval, Double_t minYval, 
1037                       Int_t nZbins, Double_t maxZval, Double_t minZval):
1038  AliHBTFunction3D(nXbins, maxXval, minXval, nYbins, maxYval, minYval, nZbins, maxZval, minZval)
1039 {
1040   //constructor
1041 }
1042 /******************************************************************/
1043
1044 AliHBTOnePairFctn3D::AliHBTOnePairFctn3D(const Char_t *name, const Char_t *title,
1045                       Int_t nXbins, Double_t maxXval, Double_t minXval, 
1046                       Int_t nYbins, Double_t maxYval, Double_t minYval, 
1047                       Int_t nZbins, Double_t maxZval, Double_t minZval):
1048  AliHBTFunction3D(name,title,nXbins, maxXval, minXval, nYbins, maxYval, minYval, nZbins, maxZval, minZval)
1049 {
1050   //constructor
1051 }
1052 /******************************************************************/
1053
1054 void AliHBTOnePairFctn3D::ProcessSameEventParticles(AliHBTPair* pair)
1055 {
1056 //Reacts on pair coming from same event (real pairs)
1057 //and fills numerator histogram
1058   pair  = CheckPair(pair);
1059   if( pair ) 
1060    { 
1061      Double_t x,y,z;
1062      GetValues(pair,x,y,z);
1063      fNumerator->Fill(x,y,z);
1064    }
1065 }
1066 /******************************************************************/
1067
1068 void AliHBTOnePairFctn3D::ProcessDiffEventParticles(AliHBTPair* pair)
1069 {
1070 //Reacts on pair coming from different events (mixed pairs)
1071 //and fills denominator histogram
1072   pair  = CheckPair(pair);
1073   if( pair ) 
1074    { 
1075      Double_t x,y,z;
1076      GetValues(pair,x,y,z);
1077      fDenominator->Fill(x,y,z);
1078    }
1079 }
1080
1081 /******************************************************************/
1082 /******************************************************************/
1083 /******************************************************************/
1084
1085 //____________________
1086 ///////////////////////////////////////////////////////
1087 //                                                   //
1088 // AliHBTTwoPairFctn1D                               //
1089 //                                                   //
1090 // Base Calss for 1-dimensinal Functions that need   //
1091 // two pair (simulated and reconstructed)            //
1092 // to fill function                                  //
1093 //                                                   //
1094 // Piotr.Skowronski@cern.ch                          //
1095 // http://aliweb.cern.ch/people/skowron/analyzer    //
1096 //                                                   //
1097 ///////////////////////////////////////////////////////
1098 ClassImp(AliHBTTwoPairFctn1D)
1099 /******************************************************************/
1100
1101 AliHBTTwoPairFctn1D::AliHBTTwoPairFctn1D(Int_t nbins, Float_t maxXval, Float_t minXval):
1102  AliHBTFunction1D(nbins,maxXval,minXval)
1103 {
1104   //constructor
1105 }
1106 /******************************************************************/
1107
1108 AliHBTTwoPairFctn1D::AliHBTTwoPairFctn1D(const Char_t *name, const Char_t *title):
1109  AliHBTFunction1D(name,title)
1110 {
1111   //constructor
1112 }
1113 /******************************************************************/
1114
1115 AliHBTTwoPairFctn1D::AliHBTTwoPairFctn1D(const Char_t *name, const Char_t *title,
1116                                          Int_t nbins, Float_t maxXval, Float_t minXval):
1117  AliHBTFunction1D(name,title,nbins,maxXval,minXval)
1118 {
1119   //constructor
1120 }
1121 /******************************************************************/
1122
1123 void AliHBTTwoPairFctn1D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
1124 {
1125   // Fills the numerator using pairs from the same event
1126   trackpair  = CheckPair(trackpair);
1127   if( trackpair == 0x0) return;
1128     
1129   Double_t x = GetValue(trackpair,partpair);
1130   fNumerator->Fill(x);
1131 }
1132 /******************************************************************/
1133
1134 void AliHBTTwoPairFctn1D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
1135 {
1136   // Fills the denumerator usin mixed pairs
1137   trackpair  = CheckPair(trackpair);
1138   if( trackpair == 0x0) return;
1139   
1140   Double_t x = GetValue(trackpair,partpair);
1141   fDenominator->Fill(x);
1142 }
1143 /******************************************************************/
1144 /******************************************************************/
1145 /******************************************************************/
1146
1147 //____________________
1148 ///////////////////////////////////////////////////////
1149 //                                                   //
1150 // AliHBTTwoPairFctn2D                               //
1151 //                                                   //
1152 // Base Calss for 2-dimensinal Functions that need   //
1153 // two pair (simulated and reconstructed)            //
1154 // to fill function                                  //
1155 //                                                   //
1156 // Piotr.Skowronski@cern.ch                          //
1157 // http://aliweb.cern.ch/people/skowron/analyzer    //
1158 //                                                   //
1159 ///////////////////////////////////////////////////////
1160
1161 ClassImp(AliHBTTwoPairFctn2D)
1162
1163 /******************************************************************/
1164
1165 AliHBTTwoPairFctn2D::AliHBTTwoPairFctn2D(const Char_t *name, const Char_t *title):
1166  AliHBTFunction2D(name,title)
1167 {
1168   //constructor
1169 }
1170 /******************************************************************/
1171
1172 AliHBTTwoPairFctn2D::AliHBTTwoPairFctn2D(Int_t nXbins, Double_t maxXval, Double_t minXval, 
1173                       Int_t nYbins, Double_t maxYval, Double_t minYval):
1174  AliHBTFunction2D(nXbins, maxXval, minXval, nYbins, maxYval, minYval)
1175 {
1176   //constructor
1177 }
1178 /******************************************************************/
1179
1180 AliHBTTwoPairFctn2D::AliHBTTwoPairFctn2D(const Char_t *name, const Char_t *title,
1181                       Int_t nXbins, Double_t maxXval, Double_t minXval, 
1182                       Int_t nYbins, Double_t maxYval, Double_t minYval):
1183  AliHBTFunction2D(name,title,nXbins, maxXval, minXval, nYbins, maxYval, minYval)
1184 {
1185   //constructor
1186 }
1187 /******************************************************************/
1188
1189 void AliHBTTwoPairFctn2D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
1190 {
1191 //processes pair of particles coming from a same events (real pair)
1192   trackpair  = CheckPair(trackpair);
1193   if( trackpair == 0x0) return;
1194   
1195   Double_t x,y;
1196   GetValues(trackpair,partpair,x,y);
1197   fNumerator->Fill(x,y);
1198 }
1199 /******************************************************************/
1200
1201 void AliHBTTwoPairFctn2D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
1202 {
1203 //processes pair of particles coming from a different events (mixed pair)
1204   trackpair  = CheckPair(trackpair);
1205   if( trackpair == 0x0) return;
1206   
1207   Double_t x,y;
1208   GetValues(trackpair,partpair,x,y);
1209   fDenominator->Fill(x,y);
1210 }
1211
1212 /******************************************************************/
1213 /******************************************************************/
1214 /******************************************************************/
1215
1216 //____________________
1217 ///////////////////////////////////////////////////////
1218 //                                                   //
1219 // AliHBTTwoPairFctn3D                               //
1220 //                                                   //
1221 // Base Calss for 3-dimensinal Functions that need   //
1222 // two pair (simulated and reconstructed)            //
1223 // to fill function                                  //
1224 //                                                   //
1225 // Piotr.Skowronski@cern.ch                          //
1226 // http://aliweb.cern.ch/people/skowron/analyzer    //
1227 //                                                   //
1228 ///////////////////////////////////////////////////////
1229
1230 ClassImp(AliHBTTwoPairFctn3D)
1231
1232 /******************************************************************/
1233
1234 AliHBTTwoPairFctn3D::AliHBTTwoPairFctn3D(const Char_t *name, const Char_t *title):
1235  AliHBTFunction3D(name,title)
1236 {
1237   //constructor
1238 }
1239 /******************************************************************/
1240
1241 AliHBTTwoPairFctn3D::AliHBTTwoPairFctn3D(Int_t nXbins, Double_t maxXval, Double_t minXval, 
1242                       Int_t nYbins, Double_t maxYval, Double_t minYval, 
1243                       Int_t nZbins, Double_t maxZval, Double_t minZval):
1244  AliHBTFunction3D(nXbins, maxXval, minXval, nYbins, maxYval, minYval, nZbins, maxZval, minZval)
1245 {
1246   //constructor
1247 }
1248 /******************************************************************/
1249
1250 AliHBTTwoPairFctn3D::AliHBTTwoPairFctn3D(const Char_t *name, const Char_t *title,
1251                       Int_t nXbins, Double_t maxXval, Double_t minXval, 
1252                       Int_t nYbins, Double_t maxYval, Double_t minYval, 
1253                       Int_t nZbins, Double_t maxZval, Double_t minZval):
1254  AliHBTFunction3D(name,title,nXbins, maxXval, minXval, nYbins, maxYval, minYval, nZbins, maxZval, minZval)
1255 {
1256   //constructor
1257 }
1258 /******************************************************************/
1259
1260 void AliHBTTwoPairFctn3D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
1261 {
1262   // Fills th numerator using pairs from the same event
1263   trackpair  = CheckPair(trackpair);
1264   if( trackpair == 0x0) return;
1265   
1266   Double_t x,y,z;
1267   GetValues(trackpair,partpair,x,y,z);
1268   fNumerator->Fill(x,y,z);
1269    
1270 }
1271 /******************************************************************/
1272
1273 void AliHBTTwoPairFctn3D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
1274 {
1275   // Fills the denumerator using mixed pairs
1276   trackpair  = CheckPair(trackpair);
1277   if( trackpair == 0x0) return;
1278   
1279   Double_t x,y,z;
1280   GetValues(trackpair,partpair,x,y,z);
1281   fDenominator->Fill(x,y,z);
1282 }
1283
1284 /******************************************************************/
1285 /******************************************************************/
1286 /******************************************************************/
1287