]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HBTAN/AliHBTWeightTheorFctn.cxx
Consistent treatment of Post/Clean
[u/mrichter/AliRoot.git] / HBTAN / AliHBTWeightTheorFctn.cxx
CommitLineData
604034d8 1/* $Id$ */
2
eb828ce0 3//_____________________________________________________________________________
4///////////////////////////////////////////////////////////////////////////////
5//
6// class AliHBTWeightTheorQInvFctn
7//
8// This function allows to obtain Q_inv correlation function with weights
9// calculated by Lednicky's alghorithm.
10// Numerator is filled with weighted events. Weights are attributed to simulated particles.
11// Weights are calculated with corresponding simulated particles momenta.
12// Denominator is filled with mixing unweighted simulated particles.
13// One needs only simulated pairs, so
14// this function is of class AliHBTOnePairFctn1D.
604034d8 15//-----------------------------------------------------------
16// This class introduces the weights calculated according
17// with functions of efficiency of identification (TPC+TOF)
18// (calculated by B.V. Batyunia).
19// Author: Ludmila Malinina, JINR (malinina@sunhe.jinr.ru)
20//-----------------------------------------------------------
a6e49985 21
dd82cadc 22#include "AliHBTWeightTheorFctn.h"
a6e49985 23
dd82cadc 24//--for test--AliHBTWeightQInvFctn* yyy= new AliHBTWeightQInvFctn();
9714a029 25/*************************************************************/
26/*************************************************************/
27/*************************************************************/
a6e49985 28
dd82cadc 29ClassImp(AliHBTWeightTheorQInvFctn)
a6e49985 30/*************************************************************/
31
dd82cadc 32AliHBTWeightTheorQInvFctn::AliHBTWeightTheorQInvFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
604034d8 33 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
a6e49985 34{
604034d8 35 //ctor
9714a029 36 fWriteNumAndDen = kTRUE;//change default behaviour
37 Rename("wqinvtheorcf","Q_{inv} Weight Theoretical Correlation Function");
a6e49985 38}
39/****************************************************************/
dd82cadc 40void AliHBTWeightTheorQInvFctn::ProcessSameEventParticles(AliHBTPair* partpair)
a6e49985 41{
dd82cadc 42 //Processes Particles and tracks Same different event
a6e49985 43 partpair = CheckPair(partpair);
ce5d39b1 44 if (partpair == 0x0) return;
dd82cadc 45 Double_t weight = partpair->GetWeight();
a6e49985 46 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQInv(),weight);
47}
48
49/**************************************************************/
dd82cadc 50TH1* AliHBTWeightTheorQInvFctn::GetResult()
a6e49985 51{
604034d8 52 //returns ratio of numerator and denominator
53 return GetRatio(Scale());
a6e49985 54}
55
9714a029 56/*************************************************************/
57/*************************************************************/
58/*************************************************************/
59
dd82cadc 60ClassImp(AliHBTWeightTheorQOutFctn)
9714a029 61/*************************************************************/
62
dd82cadc 63AliHBTWeightTheorQOutFctn::AliHBTWeightTheorQOutFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
9714a029 64 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
65{
66 //ctor
67 fWriteNumAndDen = kTRUE;//change default behaviour
68 Rename("wqouttheorcf","Q_{out} Weight Theoretical Correlation Function");
69}
70/****************************************************************/
dd82cadc 71void AliHBTWeightTheorQOutFctn::ProcessSameEventParticles(AliHBTPair* partpair)
9714a029 72{
73 //Processes Particles and tracks Same different even
74 partpair = CheckPair(partpair);
ce5d39b1 75 if (partpair == 0x0) return;
dd82cadc 76 Double_t weight = partpair->GetWeight();
9714a029 77 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQOutCMSLC(),weight);
78}
79
80/**************************************************************/
dd82cadc 81TH1* AliHBTWeightTheorQOutFctn::GetResult()
9714a029 82{
83 //returns ratio of numerator and denominator
84 return GetRatio(Scale());
85}
86
87/*************************************************************/
88/*************************************************************/
89/*************************************************************/
90
dd82cadc 91ClassImp(AliHBTWeightTheorQSideFctn)
9714a029 92/*************************************************************/
93
dd82cadc 94AliHBTWeightTheorQSideFctn::AliHBTWeightTheorQSideFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
9714a029 95 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
96{
97 //ctor
98 fWriteNumAndDen = kTRUE;//change default behaviour
99 Rename("wqsidetheorcf","Q_{side} Weight Theoretical Correlation Function");
100}
101/****************************************************************/
dd82cadc 102void AliHBTWeightTheorQSideFctn::ProcessSameEventParticles(AliHBTPair* partpair)
9714a029 103{
104 //Processes Particles and tracks Same different even
105 partpair = CheckPair(partpair);
ce5d39b1 106 if (partpair == 0x0) return;
dd82cadc 107 Double_t weight = partpair->GetWeight();
9714a029 108 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQSideCMSLC(),weight);
109}
110
111/**************************************************************/
dd82cadc 112TH1* AliHBTWeightTheorQSideFctn::GetResult()
9714a029 113{
114 //returns ratio of numerator and denominator
115 return GetRatio(Scale());
116}
117
118/*************************************************************/
119/*************************************************************/
120/*************************************************************/
121
dd82cadc 122ClassImp(AliHBTWeightTheorQLongFctn)
9714a029 123/*************************************************************/
124
dd82cadc 125AliHBTWeightTheorQLongFctn::AliHBTWeightTheorQLongFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
9714a029 126 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
127{
128 //ctor
129 fWriteNumAndDen = kTRUE;//change default behaviour
130 Rename("wqlongtheorcf","Q_{long} Weight Theoretical Correlation Function");
131}
132/****************************************************************/
dd82cadc 133void AliHBTWeightTheorQLongFctn::ProcessSameEventParticles(AliHBTPair* partpair)
9714a029 134{
135 //Processes Particles and tracks Same different even
136 partpair = CheckPair(partpair);
ce5d39b1 137 if (partpair == 0x0) return;
dd82cadc 138 Double_t weight = partpair->GetWeight();
9714a029 139 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQLongCMSLC(),weight);
140}
141
142/**************************************************************/
dd82cadc 143TH1* AliHBTWeightTheorQLongFctn::GetResult()
144{
145 //returns ratio of numerator and denominator
146 return GetRatio(Scale());
147}
148
149/*************************************************************/
150/*************************************************************/
151/*************************************************************/
152
153ClassImp(AliHBTWeightTheorOSLFctn)
154
155AliHBTWeightTheorOSLFctn::AliHBTWeightTheorOSLFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
156 Int_t nYbins, Double_t maxYval, Double_t minYval,
157 Int_t nZbins, Double_t maxZval, Double_t minZval):
158 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
159{
160 fWriteNumAndDen = kTRUE;//change default behaviour
161 Rename("wqosltheorcf","Q_{out}-Q_{side}-Q_{long} Weight Theoretical Correlation Fctn");
162}
163/*************************************************************/
164
165void AliHBTWeightTheorOSLFctn::ProcessSameEventParticles(AliHBTPair* partpair)
166{
167//Fills numerator
168 partpair = CheckPair(partpair);
169 if (partpair == 0x0) return;
170 Double_t weight = partpair->GetWeight();
171 Double_t out = TMath::Abs(partpair->GetQOutCMSLC());
172 Double_t side = TMath::Abs(partpair->GetQSideCMSLC());
173 Double_t lon = TMath::Abs(partpair->GetQLongCMSLC());
174 fNumerator->Fill(out,side,lon,weight);
175}
176/*************************************************************/
177
178TH1* AliHBTWeightTheorOSLFctn::GetResult()
9714a029 179{
180 //returns ratio of numerator and denominator
181 return GetRatio(Scale());
182}