Protecting if the events are not there
[u/mrichter/AliRoot.git] / HBTAN / AliHBTFunction.h
CommitLineData
1b446896 1#ifndef ALIHBTFUNCTION_H
2#define ALIHBTFUNCTION_H
6e8d850a 3
4/* Id: $ */
5
26f1270c 6///////////////////////////////////////////////////////
7// //
8// AliHBTFunction //
9// //
10// Abstract Base Calss for all the function classes //
11// //
12// Piotr.Skowronski@cern.ch //
13// http://alisoft.cern.ch/people/skowron/analyzer //
14// //
15///////////////////////////////////////////////////////
16
2dc7203b 17#include <TH1.h>
4e4af325 18#include <TH2D.h>
19#include <TH3D.h>
2dc7203b 20
21#include "AliHBTPairCut.h"
22#include "AliHBTPair.h"
23
2dc7203b 24
25class AliHBTAnalysis;
26class AliHBTParticleCut;
27
1b446896 28class AliHBTFunction: public TNamed
1b446896 29{
30 public:
31 AliHBTFunction();
ba95ae3f 32 AliHBTFunction(const char* name,const char* title);
856180e9 33 virtual ~AliHBTFunction();
1b446896 34
6e8d850a 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
26f1270c 47 virtual TH1* GetNumerator() const = 0;
48 virtual TH1* GetDenominator() const = 0;
1b446896 49 virtual TH1* GetResult() = 0;
976183fd 50
c41732dc 51 virtual void WriteFunction();
52 virtual void InitFunction();
1b446896 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
2dc7203b 58 void SetPairCut(AliHBTPairCut* cut);
1b446896 59
60 virtual AliHBTPair* CheckPair(AliHBTPair* pair);
61
62 protected:
26f1270c 63 virtual void BuildHistos() = 0;//builds default histograms
2dc7203b 64 AliHBTPairCut* fPairCut; //pair cut
1b446896 65
26f1270c 66 ClassDef(AliHBTFunction,2)
1b446896 67};
976183fd 68/******************************************************************/
1b446896 69inline 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();
89bacf42 75 if(pair)
76 if(fPairCut->Pass(pair)) //so try reverse combination
77 {
78 return 0x0;//it is BAD as well - so return
79 }
1b446896 80 }
81 return pair;
82}
83
1b446896 84/******************************************************************/
85/******************************************************************/
86/******************************************************************/
26f1270c 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
101class AliHBTOnePairFctn
1b446896 102{
103 public:
27b3fe5d 104 AliHBTOnePairFctn(){}
105 virtual ~AliHBTOnePairFctn(){}
1b446896 106
107 virtual void ProcessSameEventParticles(AliHBTPair* pair) = 0;
108 virtual void ProcessDiffEventParticles(AliHBTPair* pair) = 0;
976183fd 109
26f1270c 110 virtual void Init() = 0;
111 virtual void Write() = 0;
1b446896 112
26f1270c 113 ClassDef(AliHBTOnePairFctn,2)
1b446896 114};
115/******************************************************************/
116/******************************************************************/
117/******************************************************************/
26f1270c 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
136class AliHBTTwoPairFctn
1b446896 137{
138 public:
27b3fe5d 139 AliHBTTwoPairFctn(){};
140 virtual ~AliHBTTwoPairFctn(){};
1b446896 141
142 virtual void
143 ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
144 virtual void
145 ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
26f1270c 146
147 virtual void Init() = 0;
148 virtual void Write() = 0;
1b446896 149
26f1270c 150 ClassDef(AliHBTTwoPairFctn,2)
1b446896 151
152};
153/******************************************************************/
154/******************************************************************/
155/******************************************************************/
156
26f1270c 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///////////////////////////////////////////////////////
1b446896 168
26f1270c 169
170class AliHBTFunction1D: public AliHBTFunction
1b446896 171{
172 public:
26f1270c 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);
6e8d850a 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
26f1270c 189 virtual ~AliHBTFunction1D();
1b446896 190
26f1270c 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;}
1b446896 196
1b446896 197 protected:
6e8d850a 198 //returns value to be histogrammed
26f1270c 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
6e8d850a 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
26f1270c 213
26f1270c 214 ClassDef(AliHBTFunction1D,2)
1b446896 215};
216
1b446896 217/******************************************************************/
218/******************************************************************/
219/******************************************************************/
26f1270c 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///////////////////////////////////////////////////////
ba95ae3f 232
26f1270c 233class AliHBTFunction2D: public AliHBTFunction
1b446896 234{
235 public:
26f1270c 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
6e8d850a 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
26f1270c 259 virtual ~AliHBTFunction2D();
1b446896 260
26f1270c 261 TH1* GetNumerator() const {return fNumerator;}
262 TH1* GetDenominator() const {return fDenominator;}
1b446896 263
26f1270c 264 void SetNumberOfBinsToScale(UInt_t xn = fgkDefaultNBinsToScaleX,
265 UInt_t yn = fgkDefaultNBinsToScaleY);
266
267 Double_t Scale();
1b446896 268 protected:
26f1270c 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
6e8d850a 273 TH2D* fNumerator; // Numerator histogram
274 TH2D* fDenominator; // Denominator histogram
1b446896 275
26f1270c 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
6e8d850a 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
26f1270c 293 ClassDef(AliHBTFunction2D,2)
1b446896 294};
295/******************************************************************/
296/******************************************************************/
297/******************************************************************/
298
26f1270c 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
312class AliHBTFunction3D: public AliHBTFunction
1b446896 313{
314 public:
26f1270c 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);
6e8d850a 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
26f1270c 340 virtual ~AliHBTFunction3D();//destructor
341
342 TH1* GetNumerator() const {return fNumerator;}
343 TH1* GetDenominator() const {return fDenominator;}
1b446896 344
26f1270c 345
346 void SetNumberOfBinsToScale(UInt_t xn = fgkDefaultNBinsToScaleX,
347 UInt_t yn = fgkDefaultNBinsToScaleY,
348 UInt_t zn = fgkDefaultNBinsToScaleZ);
349
350 Double_t Scale();
1b446896 351
352 protected:
26f1270c 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
6e8d850a 358 TH3D* fNumerator; // Numerator histogram
359 TH3D* fDenominator; // Denominator histogram
26f1270c 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
6e8d850a 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
26f1270c 383 ClassDef(AliHBTFunction3D,2)
1b446896 384};
385/******************************************************************/
386/******************************************************************/
387/******************************************************************/
388
26f1270c 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
402class AliHBTOnePairFctn1D: public AliHBTOnePairFctn, public AliHBTFunction1D
ba95ae3f 403{
404 public:
26f1270c 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);
c41732dc 414 void Write(){WriteFunction();}
415 void Init(){InitFunction();}
ba95ae3f 416 protected:
26f1270c 417 //retruns velue to be histogrammed
418 virtual Double_t GetValue(AliHBTPair* pair) = 0;
419 ClassDef(AliHBTOnePairFctn1D,2)
420};
421/******************************************************************/
422/******************************************************************/
423/******************************************************************/
ba95ae3f 424
26f1270c 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
438class AliHBTOnePairFctn2D: public AliHBTOnePairFctn, public AliHBTFunction2D
439{
440 public:
441 AliHBTOnePairFctn2D(){}
4e871a8a 442
26f1270c 443 AliHBTOnePairFctn2D(const Char_t *name, const Char_t *title);
4e871a8a 444
26f1270c 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);
c41732dc 456 void Write(){WriteFunction();}
457 void Init(){InitFunction();}
26f1270c 458 protected:
459 virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y) = 0;
460 ClassDef(AliHBTOnePairFctn2D,2)
ba95ae3f 461};
26f1270c 462/******************************************************************/
463/******************************************************************/
464/******************************************************************/
1b446896 465
26f1270c 466//____________________
467///////////////////////////////////////////////////////
468// //
469// AliHBTOnePairFctn3D //
470// //
471// Base Calss for 3-dimensinal Functions that need //
472// one pair to fill function //
473// //
474// Piotr.Skowronski@cern.ch //
475// http://alisoft.cern.ch/people/skowron/analyzer //
476// //
477///////////////////////////////////////////////////////
478
479class AliHBTOnePairFctn3D: public AliHBTOnePairFctn, public AliHBTFunction3D
480{
481 public:
482 AliHBTOnePairFctn3D(){}
1b446896 483
26f1270c 484 AliHBTOnePairFctn3D(const Char_t *name, const Char_t *title);
485
486 AliHBTOnePairFctn3D(Int_t nXbins, Double_t maxXval, Double_t minXval,
487 Int_t nYbins, Double_t maxYval, Double_t minYval,
488 Int_t nZbins, Double_t maxZval, Double_t minZval);
489
490 AliHBTOnePairFctn3D(const Char_t *name, const Char_t *title,
491 Int_t nXbins, Double_t maxXval, Double_t minXval,
492 Int_t nYbins, Double_t maxYval, Double_t minYval,
493 Int_t nZbins, Double_t maxZval, Double_t minZval);
494
495 virtual ~AliHBTOnePairFctn3D(){}//destructor
496
497 void ProcessSameEventParticles(AliHBTPair* pair);
498 void ProcessDiffEventParticles(AliHBTPair* pair);
c41732dc 499 void Write(){WriteFunction();}
500 void Init(){InitFunction();}
26f1270c 501 protected:
502 virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) = 0;
503 ClassDef(AliHBTOnePairFctn3D,2)
504};
1b446896 505/******************************************************************/
506/******************************************************************/
507/******************************************************************/
26f1270c 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
523class AliHBTTwoPairFctn1D: public AliHBTTwoPairFctn, public AliHBTFunction1D
1b446896 524{
525 public:
26f1270c 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
1b446896 533 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
534 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
c41732dc 535 void Write(){WriteFunction();}
536 void Init(){InitFunction();}
537
1b446896 538 protected:
26f1270c 539 virtual Double_t GetValue(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
6e8d850a 540
26f1270c 541 ClassDef(AliHBTTwoPairFctn1D,2)
1b446896 542};
1b446896 543/******************************************************************/
544/******************************************************************/
545/******************************************************************/
26f1270c 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
561class AliHBTTwoPairFctn2D: public AliHBTTwoPairFctn, public AliHBTFunction2D
ba95ae3f 562{
563 public:
26f1270c 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(){}
ba95ae3f 576
577 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
578 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
c41732dc 579 void Write(){WriteFunction();}
580 void Init(){InitFunction();}
26f1270c 581
ba95ae3f 582 protected:
26f1270c 583 virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y) = 0;
ba95ae3f 584
26f1270c 585 ClassDef(AliHBTTwoPairFctn2D,2)
ba95ae3f 586};
1b446896 587/******************************************************************/
588/******************************************************************/
589/******************************************************************/
590
26f1270c 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
605class 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
1b446896 622
26f1270c 623 void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
624 void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
c41732dc 625 void Write(){WriteFunction();}
626 void Init(){InitFunction();}
26f1270c 627
628 protected:
629 virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y, Double_t& z) = 0;
630
26f1270c 631 ClassDef(AliHBTTwoPairFctn3D,2)
632};
1b446896 633
634#endif