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