]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - HBTAN/AliHBTWeightTheorFctn.cxx
PairCut stuff moved from AliHBTAnalysis to AliAnalysis
[u/mrichter/AliRoot.git] / HBTAN / AliHBTWeightTheorFctn.cxx
... / ...
CommitLineData
1/* $Id$ */
2
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.
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//-----------------------------------------------------------
21
22#include "AliHBTWeightTheorFctn.h"
23
24//--for test--AliHBTWeightQInvFctn* yyy= new AliHBTWeightQInvFctn();
25/*************************************************************/
26/*************************************************************/
27/*************************************************************/
28
29ClassImp(AliHBTWeightTheorQInvFctn)
30/*************************************************************/
31
32AliHBTWeightTheorQInvFctn::AliHBTWeightTheorQInvFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
33 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
34{
35 //ctor
36 fWriteNumAndDen = kTRUE;//change default behaviour
37 Rename("wqinvtheorcf","Q_{inv} Weight Theoretical Correlation Function");
38}
39/**************************************************************/
40
41void AliHBTWeightTheorQInvFctn::ProcessSameEventParticles(AliHBTPair* partpair)
42{
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);
48}
49/**************************************************************/
50
51TH1* AliHBTWeightTheorQInvFctn::GetResult()
52{
53 //returns the scaled ratio
54 delete fRatio;
55 fRatio = GetRatio(Scale());
56 return fRatio;
57}
58
59/*************************************************************/
60/*************************************************************/
61/*************************************************************/
62
63ClassImp(AliHBTWeightTheorQOutFctn)
64/*************************************************************/
65
66AliHBTWeightTheorQOutFctn::AliHBTWeightTheorQOutFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
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/****************************************************************/
74
75void AliHBTWeightTheorQOutFctn::ProcessSameEventParticles(AliHBTPair* partpair)
76{
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);
82}
83
84/**************************************************************/
85TH1* AliHBTWeightTheorQOutFctn::GetResult()
86{
87 //returns the scaled ratio
88 delete fRatio;
89 fRatio = GetRatio(Scale());
90 return fRatio;
91}
92
93/*************************************************************/
94/*************************************************************/
95/*************************************************************/
96
97ClassImp(AliHBTWeightTheorQSideFctn)
98/*************************************************************/
99
100AliHBTWeightTheorQSideFctn::AliHBTWeightTheorQSideFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
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/****************************************************************/
108
109void AliHBTWeightTheorQSideFctn::ProcessSameEventParticles(AliHBTPair* partpair)
110{
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);
116}
117/**************************************************************/
118
119TH1* AliHBTWeightTheorQSideFctn::GetResult()
120{
121 //returns the scaled ratio
122 delete fRatio;
123 fRatio = GetRatio(Scale());
124 return fRatio;
125}
126
127/*************************************************************/
128/*************************************************************/
129/*************************************************************/
130
131ClassImp(AliHBTWeightTheorQLongFctn)
132/*************************************************************/
133
134AliHBTWeightTheorQLongFctn::AliHBTWeightTheorQLongFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
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/****************************************************************/
142
143void AliHBTWeightTheorQLongFctn::ProcessSameEventParticles(AliHBTPair* partpair)
144{
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);
150}
151/**************************************************************/
152
153TH1* AliHBTWeightTheorQLongFctn::GetResult()
154{
155 //returns the scaled ratio
156 delete fRatio;
157 fRatio = GetRatio(Scale());
158 return fRatio;
159}
160
161/*************************************************************/
162/*************************************************************/
163/*************************************************************/
164
165ClassImp(AliHBTWeightTheorOSLFctn)
166
167AliHBTWeightTheorOSLFctn::AliHBTWeightTheorOSLFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
168 Int_t nYbins, Double_t maxYval, Double_t minYval,
169 Int_t nZbins, Double_t maxZval, Double_t minZval):
170 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
171{
172 //ctor
173 fWriteNumAndDen = kTRUE;//change default behaviour
174 Rename("wqosltheorcf","Q_{out}-Q_{side}-Q_{long} Weight Theoretical Correlation Fctn");
175}
176
177/*************************************************************/
178
179void AliHBTWeightTheorOSLFctn::ProcessSameEventParticles(AliHBTPair* partpair)
180{
181//Fills numerator
182 partpair = CheckPair(partpair);
183 if (partpair == 0x0) return;
184 Double_t weight = partpair->GetWeight();
185 Double_t out = TMath::Abs(partpair->GetQOutLCMS());
186 Double_t side = TMath::Abs(partpair->GetQSideLCMS());
187 Double_t lon = TMath::Abs(partpair->GetQLongLCMS());
188
189/*
190 if (out < 0.01)
191 if (side < 0.01)
192 if (lon < 0.01)
193 {
194 Info("TheorOSL Num","================================================================");
195 Info("TheorOSL Num","o:%f, s:%f, l:%f, w%f",out,side,lon,weight);
196 Info("TheorOSL Num","First");
197 partpair->Particle1()->Print();
198 Info("TheorOSL Num","Second");
199 partpair->Particle2()->Print();
200 fflush(0);
201 }
202*/
203 fNumerator->Fill(out,side,lon,weight);
204}
205/*************************************************************/
206
207TH1* AliHBTWeightTheorOSLFctn::GetResult()
208{
209 //returns the scaled ratio
210 delete fRatio;
211 fRatio = GetRatio(Scale());
212 return fRatio;
213}