3 //_____________________________________________________________________________
4 ///////////////////////////////////////////////////////////////////////////////
6 // class AliHBTWeightTheorQInvFctn
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.
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 //-----------------------------------------------------------
22 #include "AliHBTWeightTheorFctn.h"
24 //--for test--AliHBTWeightQInvFctn* yyy= new AliHBTWeightQInvFctn();
25 /*************************************************************/
26 /*************************************************************/
27 /*************************************************************/
29 ClassImp(AliHBTWeightTheorQInvFctn)
30 /*************************************************************/
32 AliHBTWeightTheorQInvFctn::AliHBTWeightTheorQInvFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
33 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
36 fWriteNumAndDen = kTRUE;//change default behaviour
37 Rename("wqinvtheorcf","Q_{inv} Weight Theoretical Correlation Function");
39 /**************************************************************/
41 void AliHBTWeightTheorQInvFctn::ProcessSameEventParticles(AliHBTPair* partpair)
43 //Processes Particles and tracks Same different event
44 partpair = CheckPair(partpair);
45 if (partpair == 0x0) return;
46 Double_t weight = partpair->GetWeight();
47 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQInv(),weight);
49 /**************************************************************/
51 TH1* AliHBTWeightTheorQInvFctn::GetResult()
53 //returns the scaled ratio
55 fRatio = GetRatio(Scale());
59 /*************************************************************/
60 /*************************************************************/
61 /*************************************************************/
63 ClassImp(AliHBTWeightTheorQOutFctn)
64 /*************************************************************/
66 AliHBTWeightTheorQOutFctn::AliHBTWeightTheorQOutFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
67 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
70 fWriteNumAndDen = kTRUE;//change default behaviour
71 Rename("wqouttheorcf","Q_{out} Weight Theoretical Correlation Function");
73 /****************************************************************/
75 void AliHBTWeightTheorQOutFctn::ProcessSameEventParticles(AliHBTPair* partpair)
77 //Processes Particles and tracks Same different even
78 partpair = CheckPair(partpair);
79 if (partpair == 0x0) return;
80 Double_t weight = partpair->GetWeight();
81 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQOutLCMS(),weight);
84 /**************************************************************/
85 TH1* AliHBTWeightTheorQOutFctn::GetResult()
87 //returns the scaled ratio
89 fRatio = GetRatio(Scale());
93 /*************************************************************/
94 /*************************************************************/
95 /*************************************************************/
97 ClassImp(AliHBTWeightTheorQSideFctn)
98 /*************************************************************/
100 AliHBTWeightTheorQSideFctn::AliHBTWeightTheorQSideFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
101 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
104 fWriteNumAndDen = kTRUE;//change default behaviour
105 Rename("wqsidetheorcf","Q_{side} Weight Theoretical Correlation Function");
107 /****************************************************************/
109 void AliHBTWeightTheorQSideFctn::ProcessSameEventParticles(AliHBTPair* partpair)
111 //Processes Particles and tracks Same different even
112 partpair = CheckPair(partpair);
113 if (partpair == 0x0) return;
114 Double_t weight = partpair->GetWeight();
115 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQSideLCMS(),weight);
117 /**************************************************************/
119 TH1* AliHBTWeightTheorQSideFctn::GetResult()
121 //returns the scaled ratio
123 fRatio = GetRatio(Scale());
127 /*************************************************************/
128 /*************************************************************/
129 /*************************************************************/
131 ClassImp(AliHBTWeightTheorQLongFctn)
132 /*************************************************************/
134 AliHBTWeightTheorQLongFctn::AliHBTWeightTheorQLongFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
135 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
138 fWriteNumAndDen = kTRUE;//change default behaviour
139 Rename("wqlongtheorcf","Q_{long} Weight Theoretical Correlation Function");
141 /****************************************************************/
143 void AliHBTWeightTheorQLongFctn::ProcessSameEventParticles(AliHBTPair* partpair)
145 //Processes Particles and tracks Same different even
146 partpair = CheckPair(partpair);
147 if (partpair == 0x0) return;
148 Double_t weight = partpair->GetWeight();
149 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQLongLCMS(),weight);
151 /**************************************************************/
153 TH1* AliHBTWeightTheorQLongFctn::GetResult()
155 //returns the scaled ratio
157 fRatio = GetRatio(Scale());
161 /*************************************************************/
162 /*************************************************************/
163 /*************************************************************/
165 ClassImp(AliHBTWeightTheorQtFctn)
166 /*************************************************************/
168 AliHBTWeightTheorQtFctn::AliHBTWeightTheorQtFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
169 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
172 fWriteNumAndDen = kTRUE;//change default behaviour
173 Rename("wqttheorcf","Q_{t} Weight Theoretical Correlation Function");
175 /****************************************************************/
177 void AliHBTWeightTheorQtFctn::ProcessSameEventParticles(AliHBTPair* partpair)
179 //Processes Particles and tracks Same different even
180 partpair = CheckPair(partpair);
181 if (partpair == 0x0) return;
182 Double_t weight = partpair->GetWeight();
183 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQt(),weight);
185 /**************************************************************/
187 TH1* AliHBTWeightTheorQtFctn::GetResult()
189 //returns the scaled ratio
191 fRatio = GetRatio(Scale());
195 /*************************************************************/
196 /*************************************************************/
197 /*************************************************************/
199 ClassImp(AliHBTWeightTheorOSLFctn)
201 AliHBTWeightTheorOSLFctn::AliHBTWeightTheorOSLFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
202 Int_t nYbins, Double_t maxYval, Double_t minYval,
203 Int_t nZbins, Double_t maxZval, Double_t minZval):
204 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
207 fWriteNumAndDen = kTRUE;//change default behaviour
208 Rename("wqosltheorcf","Q_{out}-Q_{side}-Q_{long} Weight Theoretical Correlation Fctn");
211 /*************************************************************/
213 void AliHBTWeightTheorOSLFctn::GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const
215 //returns values of a functions for a given pair of particles
216 x=pair->GetQOutLCMS();
217 y=pair->GetQSideLCMS();
218 z=pair->GetQLongLCMS();
229 void AliHBTWeightTheorOSLFctn::ProcessSameEventParticles(AliHBTPair* partpair)
232 partpair = CheckPair(partpair);
233 if (partpair == 0x0) return;
234 Double_t weight = partpair->GetWeight();
235 Double_t out, side, lon;
237 GetValues(partpair, out, side, lon);
244 Info("TheorOSL Num","================================================================");
245 Info("TheorOSL Num","o:%f, s:%f, l:%f, w%f",out,side,lon,weight);
246 Info("TheorOSL Num","First");
247 partpair->Particle1()->Print();
248 Info("TheorOSL Num","Second");
249 partpair->Particle2()->Print();
253 fNumerator->Fill(out,side,lon,weight);
255 /*************************************************************/
257 TH1* AliHBTWeightTheorOSLFctn::GetResult()
259 //returns the scaled ratio
261 fRatio = GetRatio(Scale());