]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HBTAN/AliHBTWeightTheorFctn.cxx
Add the possibiloity to save cut settings in the ROOT file
[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}
fc13079c 39/**************************************************************/
40
dd82cadc 41void AliHBTWeightTheorQInvFctn::ProcessSameEventParticles(AliHBTPair* partpair)
a6e49985 42{
dd82cadc 43 //Processes Particles and tracks Same different event
a6e49985 44 partpair = CheckPair(partpair);
ce5d39b1 45 if (partpair == 0x0) return;
dd82cadc 46 Double_t weight = partpair->GetWeight();
a6e49985 47 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQInv(),weight);
48}
a6e49985 49/**************************************************************/
fc13079c 50
dd82cadc 51TH1* AliHBTWeightTheorQInvFctn::GetResult()
a6e49985 52{
fc13079c 53 //returns the scaled ratio
54 delete fRatio;
55 fRatio = GetRatio(Scale());
56 return fRatio;
a6e49985 57}
58
9714a029 59/*************************************************************/
60/*************************************************************/
61/*************************************************************/
62
dd82cadc 63ClassImp(AliHBTWeightTheorQOutFctn)
9714a029 64/*************************************************************/
65
dd82cadc 66AliHBTWeightTheorQOutFctn::AliHBTWeightTheorQOutFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
9714a029 67 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
68{
69 //ctor
70 fWriteNumAndDen = kTRUE;//change default behaviour
71 Rename("wqouttheorcf","Q_{out} Weight Theoretical Correlation Function");
72}
73/****************************************************************/
fc13079c 74
dd82cadc 75void AliHBTWeightTheorQOutFctn::ProcessSameEventParticles(AliHBTPair* partpair)
9714a029 76{
77 //Processes Particles and tracks Same different even
78 partpair = CheckPair(partpair);
ce5d39b1 79 if (partpair == 0x0) return;
dd82cadc 80 Double_t weight = partpair->GetWeight();
78d7c6d3 81 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQOutLCMS(),weight);
9714a029 82}
83
84/**************************************************************/
dd82cadc 85TH1* AliHBTWeightTheorQOutFctn::GetResult()
9714a029 86{
fc13079c 87 //returns the scaled ratio
88 delete fRatio;
89 fRatio = GetRatio(Scale());
90 return fRatio;
9714a029 91}
92
93/*************************************************************/
94/*************************************************************/
95/*************************************************************/
96
dd82cadc 97ClassImp(AliHBTWeightTheorQSideFctn)
9714a029 98/*************************************************************/
99
dd82cadc 100AliHBTWeightTheorQSideFctn::AliHBTWeightTheorQSideFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
9714a029 101 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
102{
103 //ctor
104 fWriteNumAndDen = kTRUE;//change default behaviour
105 Rename("wqsidetheorcf","Q_{side} Weight Theoretical Correlation Function");
106}
107/****************************************************************/
fc13079c 108
dd82cadc 109void AliHBTWeightTheorQSideFctn::ProcessSameEventParticles(AliHBTPair* partpair)
9714a029 110{
111 //Processes Particles and tracks Same different even
112 partpair = CheckPair(partpair);
ce5d39b1 113 if (partpair == 0x0) return;
dd82cadc 114 Double_t weight = partpair->GetWeight();
78d7c6d3 115 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQSideLCMS(),weight);
9714a029 116}
9714a029 117/**************************************************************/
fc13079c 118
dd82cadc 119TH1* AliHBTWeightTheorQSideFctn::GetResult()
9714a029 120{
fc13079c 121 //returns the scaled ratio
122 delete fRatio;
123 fRatio = GetRatio(Scale());
124 return fRatio;
9714a029 125}
126
127/*************************************************************/
128/*************************************************************/
129/*************************************************************/
130
dd82cadc 131ClassImp(AliHBTWeightTheorQLongFctn)
9714a029 132/*************************************************************/
133
dd82cadc 134AliHBTWeightTheorQLongFctn::AliHBTWeightTheorQLongFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
9714a029 135 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
136{
137 //ctor
138 fWriteNumAndDen = kTRUE;//change default behaviour
139 Rename("wqlongtheorcf","Q_{long} Weight Theoretical Correlation Function");
140}
141/****************************************************************/
fc13079c 142
dd82cadc 143void AliHBTWeightTheorQLongFctn::ProcessSameEventParticles(AliHBTPair* partpair)
9714a029 144{
145 //Processes Particles and tracks Same different even
146 partpair = CheckPair(partpair);
ce5d39b1 147 if (partpair == 0x0) return;
dd82cadc 148 Double_t weight = partpair->GetWeight();
78d7c6d3 149 if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQLongLCMS(),weight);
9714a029 150}
9714a029 151/**************************************************************/
fc13079c 152
dd82cadc 153TH1* AliHBTWeightTheorQLongFctn::GetResult()
dc0241b8 154{
155 //returns the scaled ratio
156 delete fRatio;
157 fRatio = GetRatio(Scale());
158 return fRatio;
159}
160
161/*************************************************************/
162/*************************************************************/
163/*************************************************************/
164
165ClassImp(AliHBTWeightTheorQtFctn)
166/*************************************************************/
167
168AliHBTWeightTheorQtFctn::AliHBTWeightTheorQtFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
169 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
170{
171 //ctor
172 fWriteNumAndDen = kTRUE;//change default behaviour
173 Rename("wqttheorcf","Q_{t} Weight Theoretical Correlation Function");
174}
175/****************************************************************/
176
177void AliHBTWeightTheorQtFctn::ProcessSameEventParticles(AliHBTPair* partpair)
178{
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);
184}
185/**************************************************************/
186
187TH1* AliHBTWeightTheorQtFctn::GetResult()
dd82cadc 188{
fc13079c 189 //returns the scaled ratio
190 delete fRatio;
191 fRatio = GetRatio(Scale());
192 return fRatio;
dd82cadc 193}
194
195/*************************************************************/
196/*************************************************************/
197/*************************************************************/
198
199ClassImp(AliHBTWeightTheorOSLFctn)
200
201AliHBTWeightTheorOSLFctn::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)
205{
f78d233e 206 //ctor
dd82cadc 207 fWriteNumAndDen = kTRUE;//change default behaviour
208 Rename("wqosltheorcf","Q_{out}-Q_{side}-Q_{long} Weight Theoretical Correlation Fctn");
209}
f78d233e 210
dd82cadc 211/*************************************************************/
212
a296aa84 213void AliHBTWeightTheorOSLFctn::GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const
214{
215//returns values of a functions for a given pair of particles
216 x=pair->GetQOutLCMS();
217 y=pair->GetQSideLCMS();
218 z=pair->GetQLongLCMS();
219
220 if (fAbs)
221 {
222 x = TMath::Abs(x);
223 y = TMath::Abs(y);
224 z = TMath::Abs(z);
225 }
226
227}
228
dd82cadc 229void AliHBTWeightTheorOSLFctn::ProcessSameEventParticles(AliHBTPair* partpair)
230{
231//Fills numerator
232 partpair = CheckPair(partpair);
233 if (partpair == 0x0) return;
234 Double_t weight = partpair->GetWeight();
a296aa84 235 Double_t out, side, lon;
236
237 GetValues(partpair, out, side, lon);
92d472ba 238
239/*
240 if (out < 0.01)
241 if (side < 0.01)
242 if (lon < 0.01)
243 {
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();
250 fflush(0);
251 }
252*/
dd82cadc 253 fNumerator->Fill(out,side,lon,weight);
254}
255/*************************************************************/
256
257TH1* AliHBTWeightTheorOSLFctn::GetResult()
9714a029 258{
fc13079c 259 //returns the scaled ratio
260 delete fRatio;
261 fRatio = GetRatio(Scale());
262 return fRatio;
9714a029 263}