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