]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HBTAN/AliHBTCorrFitFctn.cxx
Retrofit from Release developement
[u/mrichter/AliRoot.git] / HBTAN / AliHBTCorrFitFctn.cxx
CommitLineData
8bcc1321 1#include "AliHBTCorrFitFctn.h"
2//____________________________________________________________
3///////////////////////////////////////////////////////////////
4// //
5// class AliHBTCorrFitFctn //
6// //
7// //
8///////////////////////////////////////////////////////////////
9
8bcc1321 10ClassImp(AliHBTCorrFitFctn)
11
12/*****************************************************************/
13
14AliHBTCorrFitFctn::AliHBTCorrFitFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
15 AliHBTTwoPairFctn1D(nbins,maxXval,minXval),
16 fNtuple(new TNtuple("pair", "pair", "px1:py1:pz1:e1:px2:py2:pz2:e2")),
17 fNPairsFitArea(0),
18 fNPairsNormArea(0)
19{
20//ctor
21 fWriteNumAndDen = kTRUE;//change default behaviour
22 Rename("wqinvcfCorrFit","Lednicky Weught Theoretical Q_{inv} Correlation Function");
23}
24/*****************************************************************/
25
26void AliHBTCorrFitFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
27{
28 //Fills the numerator using pair from the same event
55d46048 29// partpair = CheckPair(partpair);
8bcc1321 30 if(partpair == 0x0) return;
0bb07108 31 trackpair = CheckPair(trackpair);
32 if(trackpair == 0x0) return;
8bcc1321 33
34 Double_t q = trackpair->GetQInv();
8bcc1321 35
dd82cadc 36 Double_t weight = partpair->GetWeight();
0bb07108 37 fNumerator->Fill(q,weight);
38
8bcc1321 39
8bcc1321 40}
41/****************************************************************/
42
43void AliHBTCorrFitFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
44{
45 // Fills the denominator using mixed pairs
46 trackpair = CheckPair(trackpair);
55d46048 47// partpair = CheckPair(partpair);
8bcc1321 48 if ( trackpair && partpair)
387dd2d0 49 {
50 Double_t q = trackpair->GetQInv();
51
52 Bool_t fill = kFALSE;
53
54 if ( (q < 0.15) && (fNPairsFitArea < 2.e+5))
55 {
56 fNPairsFitArea++;
57 fill = kTRUE;
58 }
59
60 if ( (q > 0.15) && (q < 0.3) && (fNPairsFitArea < 1.e+5))
61 {
62 fNPairsNormArea++;
63 fill = kTRUE;
64 }
65
66 if (fill)
67 {
68 const AliVAODParticle& p1 = *(trackpair->Particle1());
69 const AliVAODParticle& p2 = *(trackpair->Particle2());
70 fNtuple->Fill(p1.Px(),p1.Py(),p1.Pz(),p1.E(),
71 p2.Px(),p2.Py(),p2.Pz(),p2.E());
72 }
73
74 fDenominator->Fill(q);
75 }
8bcc1321 76}
77/*****************************************************************/
78
79TH1* AliHBTCorrFitFctn::GetResult()
80{
81//returns ratio of numerator and denominator
82 return GetRatio(Scale());
83}
84/**************************************************************/
85
86void AliHBTCorrFitFctn::WriteFunction()
87{
88 //writes a function
89 AliHBTFunction::WriteFunction();
90 fNtuple->Write(0,TObject::kOverwrite);
91}