Bug correction
[u/mrichter/AliRoot.git] / HBTAN / AliHBTQResolutionFctns.cxx
CommitLineData
87a97b84 1#include "AliHBTQResolutionFctns.h"
2
89c60e9f 3//__________________________________________________________________
4////////////////////////////////////////////////////////////////////
5// //
6// General Remark: //
7// CMSLC means //
8// Center of Mass System Longitudially Co-moving //
9// //
10// //
11// This class creates resolution function of Qout //
12// (difference of simulated pair Qout and recontructed pair) //
13// in function of QInv //
14// it inherits from AliHBTTwoPairFctn2D //
15// it needs two pairs to compare //
16// and is two dimentional: numerator and denominator are TH2D //
17// //
18////////////////////////////////////////////////////////////////////
19
1b446896 20
89ef84e1 21
475caf1c 22/******************************************************************/
23/******************************************************************/
24/******************************************************************/
25ClassImp( AliHBTKtResolVsQInvFctn )
26AliHBTKtResolVsQInvFctn::
27AliHBTKtResolVsQInvFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
28 Int_t nYbins, Double_t maxYval, Double_t minYval):
29 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
30{
89c60e9f 31//ctor
475caf1c 32 Rename("KtResolVsQInv","K_{t} Resolution vs. Q_{Inv}");
33}
89ef84e1 34/******************************************************************/
35/******************************************************************/
36/******************************************************************/
37ClassImp( AliHBTQInvResolVsQInvFctn )
38AliHBTQInvResolVsQInvFctn::
39AliHBTQInvResolVsQInvFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
40 Int_t nYbins, Double_t maxYval, Double_t minYval):
41 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
42{
89c60e9f 43//ctor
89ef84e1 44 Rename("QInvResolVsQInv","Q_{Inv} Resolution vs. Q_{Inv}");
45}
1b446896 46/******************************************************************/
47/******************************************************************/
48/******************************************************************/
49
89ef84e1 50ClassImp( AliHBTQOutResolVsQInvFctn )
51AliHBTQOutResolVsQInvFctn::
52AliHBTQOutResolVsQInvFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 53 Int_t nYbins, Double_t maxYval, Double_t minYval):
27b3fe5d 54 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 55{
89c60e9f 56//ctor
89ef84e1 57 Rename("QOutResolVsQInv","Q_{Out} Resolution vs. Q_{Inv}");
1b446896 58}
87a97b84 59/******************************************************************/
60
61void AliHBTQOutResolVsQInvFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
62{
63 //returns Qoutsim-Qoutrec for y
64 //returns Qinv for x
65 Double_t tqout = trackpair->GetQOutCMSLC();
66 y = partpair->GetQOutCMSLC() - tqout;
67 if (tqout < 0.0) y = -y;
68 x = partpair->GetQInv();
69}
70
1b446896 71/******************************************************************/
72/******************************************************************/
73/******************************************************************/
74
89ef84e1 75ClassImp( AliHBTQSideResolVsQInvFctn )
1b446896 76
89ef84e1 77AliHBTQSideResolVsQInvFctn::
78AliHBTQSideResolVsQInvFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 79 Int_t nYbins, Double_t maxYval, Double_t minYval):
27b3fe5d 80 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 81{
89c60e9f 82//ctor
89ef84e1 83 Rename("QSideResolVsQInv","Q_{Side} Resolution vs. Q_{Inv}");
1b446896 84}
87a97b84 85/******************************************************************/
86
87void AliHBTQSideResolVsQInvFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
88{
89 //returns Qsidesim-Qsiderec for y
90 //returns Qinv for x
91 y = partpair->GetQSideCMSLC() - trackpair->GetQSideCMSLC();
92 if (trackpair->GetQSideCMSLC() < 0.0) y = -y;
93 x = partpair->GetQInv();
94}
1b446896 95
96/******************************************************************/
97/******************************************************************/
98/******************************************************************/
99
89ef84e1 100ClassImp( AliHBTQLongResolVsQInvFctn )
1b446896 101
89ef84e1 102AliHBTQLongResolVsQInvFctn::
103AliHBTQLongResolVsQInvFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 104 Int_t nYbins, Double_t maxYval, Double_t minYval):
27b3fe5d 105 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 106{
89c60e9f 107//ctor
89ef84e1 108 Rename("QLongResolVsQInv","Q_{Long} Resolution vs. Q_{Inv}");
1b446896 109}
87a97b84 110/******************************************************************/
111
112void AliHBTQLongResolVsQInvFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
113{
114 //returns Qlongsim-Qlongrec for y
115 //returns Qinv for x
116 y = partpair->GetQLongCMSLC() - trackpair->GetQLongCMSLC();
117 if (trackpair->GetQLongCMSLC() < 0.0) y = -y;
118 x = partpair->GetQInv();
119}
1b446896 120
121/******************************************************************/
122/******************************************************************/
123/******************************************************************/
124
89ef84e1 125ClassImp( AliHBTQInvResolVsKtFctn )
1b446896 126
89ef84e1 127AliHBTQInvResolVsKtFctn::
128AliHBTQInvResolVsKtFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 129 Int_t nYbins, Double_t maxYval, Double_t minYval):
27b3fe5d 130 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 131{
89c60e9f 132//ctor
89ef84e1 133 Rename("QInvResolVsKt","Q_{Inv} Resolution vs. K_{t}");
1b446896 134}
135
136/******************************************************************/
137/******************************************************************/
138/******************************************************************/
89ef84e1 139ClassImp( AliHBTQOutResolVsKtFctn )
1b446896 140
89ef84e1 141AliHBTQOutResolVsKtFctn::
142AliHBTQOutResolVsKtFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 143 Int_t nYbins, Double_t maxYval, Double_t minYval):
27b3fe5d 144 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 145{
89c60e9f 146//ctor
89ef84e1 147 Rename("QOutResolVsKt","Q_{Out} Resolution vs. K_{t} ");
1b446896 148}
87a97b84 149/******************************************************************/
1b446896 150
87a97b84 151void AliHBTQOutResolVsKtFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
152{
153 //returns Qoutsim-Qoutrec for y
154 //returns Kt for x
155 y = partpair->GetQOutCMSLC() - trackpair->GetQOutCMSLC();
156 if (trackpair->GetQOutCMSLC() < 0.0) y = -y;
157 x = partpair->GetKt();
158}
1b446896 159
160/******************************************************************/
161/******************************************************************/
162/******************************************************************/
89ef84e1 163ClassImp( AliHBTQSideResolVsKtFctn )
1b446896 164
89ef84e1 165AliHBTQSideResolVsKtFctn::
166AliHBTQSideResolVsKtFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 167 Int_t nYbins, Double_t maxYval, Double_t minYval):
27b3fe5d 168 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 169{
89c60e9f 170//ctor
89ef84e1 171 Rename("QSideResolVsKt","Q_{Side} Resolution vs. K_{t} ");
1b446896 172}
87a97b84 173/******************************************************************/
174
175void AliHBTQSideResolVsKtFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
176{
177 //returns Qsidesim-Qsiderec for y
178 //returns Kt for x
179 y = partpair->GetQSideCMSLC() - trackpair->GetQSideCMSLC();
180 if (trackpair->GetQSideCMSLC() < 0.0) y = -y;
181 x = partpair->GetKt();
182}
1b446896 183
184/******************************************************************/
185/******************************************************************/
186/******************************************************************/
89ef84e1 187ClassImp( AliHBTQLongResolVsKtFctn )
1b446896 188
89ef84e1 189AliHBTQLongResolVsKtFctn::
190AliHBTQLongResolVsKtFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 191 Int_t nYbins, Double_t maxYval, Double_t minYval):
89ef84e1 192 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 193{
89c60e9f 194//ctor
89ef84e1 195 Rename("QLongResolVsKt","Q_{Long} Resolution vs. K_{t} ");
1b446896 196}
87a97b84 197/******************************************************************/
1b446896 198
87a97b84 199void AliHBTQLongResolVsKtFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
200{
201 //returns Qlongsim-Qlongrec for y
202 //returns Kt for x
203 y = partpair->GetQLongCMSLC() - trackpair->GetQLongCMSLC();
204 if (trackpair->GetQLongCMSLC() < 0.0) y = -y;
205 x = partpair->GetKt();
206}
1b446896 207/******************************************************************/
208/******************************************************************/
209/******************************************************************/
210
89ef84e1 211ClassImp( AliHBTQOutResolVsQOutFctn)
1b446896 212
89ef84e1 213AliHBTQOutResolVsQOutFctn::
214AliHBTQOutResolVsQOutFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 215 Int_t nYbins, Double_t maxYval, Double_t minYval):
27b3fe5d 216 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 217{
89c60e9f 218//ctor
89ef84e1 219 Rename("QOutResolVsQOut","Q_{Out} Resolution vs. Q_{Out} ");
1b446896 220}
221
222/******************************************************************/
223/******************************************************************/
224/******************************************************************/
89ef84e1 225ClassImp( AliHBTQSideResolVsQSideFctn )
1b446896 226
89ef84e1 227AliHBTQSideResolVsQSideFctn::
228AliHBTQSideResolVsQSideFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 229 Int_t nYbins, Double_t maxYval, Double_t minYval):
27b3fe5d 230 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 231{
89c60e9f 232//ctor
89ef84e1 233 Rename("QSideResolVsQSide","Q_{Side} Resolution vs. Q_{Side} ");
1b446896 234}
235
236/******************************************************************/
237/******************************************************************/
238/******************************************************************/
89ef84e1 239ClassImp( AliHBTQLongResolVsQLongFctn )
240
241AliHBTQLongResolVsQLongFctn::
242AliHBTQLongResolVsQLongFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
243 Int_t nYbins, Double_t maxYval, Double_t minYval):
244 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
245{
89c60e9f 246//ctor
89ef84e1 247 Rename("QLongResolVsQLong","Q_{Long} Resolution vs. Q_{Long} ");
248}
249
250
251
252/******************************************************************/
253/******************************************************************/
254/******************************************************************/
255
256ClassImp( AliHBTPairThetaResolVsQInvFctn )
257
258AliHBTPairThetaResolVsQInvFctn::
259AliHBTPairThetaResolVsQInvFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
260 Int_t nYbins, Double_t maxYval, Double_t minYval):
261 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
262{
89c60e9f 263//ctor
89ef84e1 264 Rename("PairThetaResolVsQInv","Pair Theta Angle Resolution vs. Q_{Inv} ");
265}
266/******************************************************************/
87a97b84 267
268void AliHBTPairThetaResolVsQInvFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
269 {
270 //returns Pair Theta sim - Pair Theta rec for y
271 //returns Qinv for x
272 Double_t partTheta = partpair->Particle1()->Theta() - partpair->Particle2()->Theta();
273 Double_t trackTheta = trackpair->Particle1()->Theta() - trackpair->Particle2()->Theta();
274 y = partTheta - trackTheta;
275 x = partpair->GetQInv();
276 }
277/******************************************************************/
89ef84e1 278/******************************************************************/
279/******************************************************************/
1b446896 280
22a9bbf4 281ClassImp( AliHBTPairThetaResolVsPairThetaFctn )
282
283AliHBTPairThetaResolVsPairThetaFctn::
284AliHBTPairThetaResolVsPairThetaFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
285 Int_t nYbins, Double_t maxYval, Double_t minYval):
286 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
287{
288//ctor
289 Rename("PairThetaResolVsPairTheta","Pair Theta Angle Resolution vs. Pair Theta ");
290}
291/******************************************************************/
f5439e69 292void AliHBTPairThetaResolVsPairThetaFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
87a97b84 293{
294 //returns Pair Theta sim - Pair Theta rec for y
295 //returns Pair Theta sim for x
296 Double_t partTheta = partpair->Particle1()->Theta() - partpair->Particle2()->Theta();
297 Double_t trackTheta = trackpair->Particle1()->Theta() - trackpair->Particle2()->Theta();
298 y = partTheta - trackTheta;
299 if (trackTheta < 0.0) y = -y;
300 x = trackTheta;
301}
302/******************************************************************/
22a9bbf4 303/******************************************************************/
304/******************************************************************/
305
89ef84e1 306ClassImp( AliHBTPairPhiResolVsQInvFctn )
307
308AliHBTPairPhiResolVsQInvFctn::
309AliHBTPairPhiResolVsQInvFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
1b446896 310 Int_t nYbins, Double_t maxYval, Double_t minYval):
27b3fe5d 311 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
1b446896 312{
89c60e9f 313//ctor
89ef84e1 314 Rename("PairPhiResolVsQInv","Pair Phi Angle Resolution vs. Q_{Inv} ");
1b446896 315}
89ef84e1 316/******************************************************************/
f5439e69 317
318void AliHBTPairPhiResolVsQInvFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
319 {
320 //returns Pair Phi sim - Pair Phi rec for y
321 //returns QInv sim for x
322 Double_t partPhi = partpair->Particle1()->Phi() - partpair->Particle2()->Phi();
323 Double_t trackPhi = trackpair->Particle1()->Phi() - trackpair->Particle2()->Phi();
324 y = partPhi - trackPhi;
325 x = partpair->GetQInv();
326 }
327
328/******************************************************************/
89ef84e1 329/******************************************************************/
330/******************************************************************/
331
332
333ClassImp( AliHBTPairThetaResolVsKtFctn )
1b446896 334
89ef84e1 335AliHBTPairThetaResolVsKtFctn::
336AliHBTPairThetaResolVsKtFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
337 Int_t nYbins, Double_t maxYval, Double_t minYval):
338 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
339{
89c60e9f 340//ctor
89ef84e1 341 Rename("PairThetaResolVsKt","Pair Theta Angle Resolution vs. K_{t} ");
342}
1b446896 343/******************************************************************/
f5439e69 344
345void AliHBTPairThetaResolVsKtFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
346{
347 //returns Pair Theta sim - Pair Theta rec for y
348 //returns Kt sim for x
349 Double_t partTheta = partpair->Particle1()->Theta() - partpair->Particle2()->Theta();
350 Double_t trackTheta = trackpair->Particle1()->Theta() - trackpair->Particle2()->Theta();
351 y = partTheta - trackTheta;
352 x = partpair->GetKt();
353}
354/******************************************************************/
1b446896 355/******************************************************************/
356/******************************************************************/
357
89ef84e1 358ClassImp( AliHBTPairPhiResolVsKtFctn )
1b446896 359
89ef84e1 360AliHBTPairPhiResolVsKtFctn::
361AliHBTPairPhiResolVsKtFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
362 Int_t nYbins, Double_t maxYval, Double_t minYval):
363 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
364{
89c60e9f 365//ctor
89ef84e1 366 Rename("PairPhiResolVsKt","Pair Phi Angle Resolution vs. K_{t} ");
367}
f5439e69 368/******************************************************************/
369
370void AliHBTPairPhiResolVsKtFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
371{
372 //returns Pair Phi sim - Pair Phi rec for y
373 //returns Kt sim for x
374 Double_t partPhi = partpair->Particle1()->Phi() - partpair->Particle2()->Phi();
375 Double_t trackPhi = trackpair->Particle1()->Phi() - trackpair->Particle2()->Phi();
376 y = partPhi - trackPhi;
377 x = partpair->GetKt();
378}
379
89ef84e1 380/******************************************************************/
381/******************************************************************/
382/******************************************************************/
1b446896 383
384
22a9bbf4 385ClassImp( AliHBTPairPhiResolVsPairPhiFctn )
386
387AliHBTPairPhiResolVsPairPhiFctn::
388AliHBTPairPhiResolVsPairPhiFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
389 Int_t nYbins, Double_t maxYval, Double_t minYval):
390 AliHBTTwoPairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
391{
392//ctor
393 Rename("PairPhiResolVsPairPhi","Pair Phi Angle Resolution vs. Pair Phi ");
394}
f5439e69 395/******************************************************************/
396
397void AliHBTPairPhiResolVsPairPhiFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y)
398{
399 //returns Pair Phi sim - Pair Phi rec for y
400 //returns Pair Phi sim for x
401 Double_t partPhi = partpair->Particle1()->Phi() - partpair->Particle2()->Phi();
402 Double_t trackPhi = trackpair->Particle1()->Phi() - trackpair->Particle2()->Phi();
403 y = partPhi - trackPhi;
404 x = trackPhi;
405}
22a9bbf4 406
407/******************************************************************/
408/******************************************************************/
409/******************************************************************/