]>
Commit | Line | Data |
---|---|---|
becde6ce | 1 | #include "AliHBTPIDPurityFctns.h" |
2 | //_______________________________________________________________________________ | |
3 | ///////////////////////////////////////////////////////////////////////////////// | |
4 | // | |
5 | // class AliHBTMonPhiResolutionVsPtFctn; | |
6 | // class AliHBTMonThetaResolutionVsPtFctn; | |
7 | // | |
8 | // file: AliHBTPIDPurityFctns.cxx AliHBTPIDPurityFctns.h | |
9 | // | |
2b31c209 | 10 | // Classes for calculating PID purity, efficiency and other things connected with PID |
11 | // xxx | |
12 | // xxx | |
becde6ce | 13 | // |
14 | // added by Piotr.Skowronski@cern.ch | |
becde6ce | 15 | // |
16 | ////////////////////////////////////////////////////////////////////////////////// | |
17 | ||
18 | ||
a22a56ec | 19 | /******************************************************************/ |
becde6ce | 20 | /******************************************************************/ |
21 | /******************************************************************/ | |
22 | ||
23 | ClassImp(AliHBTMonPIDPurityVsPtFctn) | |
24 | ||
25 | AliHBTMonPIDPurityVsPtFctn::AliHBTMonPIDPurityVsPtFctn(Int_t nbins, Double_t maxXval, Double_t minXval): | |
26 | AliHBTMonTwoParticleFctn1D(nbins,maxXval,minXval), | |
81b40753 | 27 | fGood(0x0), |
28 | fAll(0x0) | |
becde6ce | 29 | { |
30 | //ctor | |
31 | Rename("pidpurityvspt","PIDPurityVsPt"); | |
32 | ||
33 | } | |
34 | /******************************************************************/ | |
35 | ||
2b31c209 | 36 | AliHBTMonPIDPurityVsPtFctn::AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn& /*in*/): |
37 | AliHBTMonTwoParticleFctn1D(), | |
38 | AliHBTCorrelFunction(), | |
39 | fGood(0x0), | |
40 | fAll(0x0) | |
41 | { | |
42 | //cpy constructor | |
43 | Error("AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn&", | |
44 | "Functions can not be copied because of histogram names clashes"); | |
45 | } | |
46 | ||
47 | /******************************************************************/ | |
48 | ||
becde6ce | 49 | AliHBTMonPIDPurityVsPtFctn::~AliHBTMonPIDPurityVsPtFctn() |
50 | { | |
51 | //dtor | |
52 | delete fGood; | |
81b40753 | 53 | delete fAll; |
becde6ce | 54 | } |
55 | /******************************************************************/ | |
2b31c209 | 56 | |
57 | AliHBTMonPIDPurityVsPtFctn& AliHBTMonPIDPurityVsPtFctn::operator= | |
58 | (const AliHBTMonPIDPurityVsPtFctn& /*in*/) | |
59 | { | |
60 | //assigment operator | |
61 | Error("operator=","Functions can not be copied because of histogram names clashes"); | |
62 | return *this; | |
63 | } | |
64 | /******************************************************************/ | |
65 | ||
becde6ce | 66 | void AliHBTMonPIDPurityVsPtFctn::Write() |
67 | { | |
2b31c209 | 68 | //Writes a fucntion results |
becde6ce | 69 | AliHBTMonitorFunction::Write(); |
70 | fGood->Write(); | |
81b40753 | 71 | fAll->Write(); |
becde6ce | 72 | } |
73 | /******************************************************************/ | |
74 | ||
75 | void AliHBTMonPIDPurityVsPtFctn::Init() | |
76 | { | |
77 | //Initializes fuction | |
78d7c6d3 | 78 | if (AliVAODParticle::GetDebug()>0) Info("Init","%s",GetName()); |
becde6ce | 79 | |
80 | if (fResult == 0x0) | |
81 | { | |
82 | Warning("Init","Function has NULL result histogram!"); | |
83 | return; | |
84 | } | |
85 | ||
86 | if (fGood == 0x0) | |
87 | { | |
88 | TString numstr = fName + " Good"; //title and name of the | |
89 | //result histogram | |
90 | TAxis* xax = fResult->GetXaxis(); | |
91 | fGood = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax()); | |
92 | } | |
93 | ||
81b40753 | 94 | if (fAll == 0x0) |
95 | { | |
96 | TString numstr = fName + " All"; //title and name of the | |
97 | //result histogram | |
98 | TAxis* xax = fResult->GetXaxis(); | |
99 | fAll = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax()); | |
100 | } | |
101 | ||
becde6ce | 102 | fResult->Reset(); |
103 | fResult->SetDirectory(0x0); | |
81b40753 | 104 | fResult->Sumw2(); |
becde6ce | 105 | fGood->Reset(); |
106 | fGood->SetDirectory(0x0); | |
81b40753 | 107 | fGood->Sumw2(); |
108 | fAll->Reset(); | |
109 | fAll->SetDirectory(0x0); | |
110 | fAll->Sumw2(); | |
becde6ce | 111 | |
78d7c6d3 | 112 | if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName()); |
becde6ce | 113 | } |
114 | ||
115 | /******************************************************************/ | |
116 | ||
117 | void AliHBTMonPIDPurityVsPtFctn::Rename(const Char_t * name) | |
118 | { | |
119 | //Rename fuctions and all histograms belonging to it | |
120 | SetName(name); | |
121 | SetTitle(name); | |
122 | ||
123 | if (fResult) | |
124 | { | |
125 | TString numstr = fName + " Result"; //title and name of the result histogram | |
126 | fResult->SetName(numstr); | |
127 | fResult->SetTitle(numstr); | |
128 | } | |
61763057 | 129 | |
becde6ce | 130 | if (fGood) |
131 | { | |
132 | TString numstr = fName + " Good"; | |
133 | fGood->SetName(numstr); | |
134 | fGood->SetTitle(numstr); | |
135 | } | |
81b40753 | 136 | |
137 | if (fAll) | |
138 | { | |
139 | TString numstr = fName + " All"; | |
140 | fAll->SetName(numstr); | |
141 | fAll->SetTitle(numstr); | |
142 | } | |
becde6ce | 143 | } |
144 | /******************************************************************/ | |
145 | ||
146 | void AliHBTMonPIDPurityVsPtFctn::Rename(const Char_t * name, const Char_t * title) | |
147 | { | |
148 | //renames and retitle the function and histograms | |
149 | ||
150 | SetName(name); | |
151 | SetTitle(title); | |
152 | ||
153 | if (fResult) | |
154 | { | |
155 | TString numstrn = fName + " Result"; //name of the result histogram | |
156 | TString numstrt = fTitle + " Result"; //title of the result histogram | |
157 | fResult->SetName(numstrn); | |
158 | fResult->SetTitle(numstrt); | |
159 | } | |
160 | if (fGood) | |
161 | { | |
162 | TString numstrn = fName + " Good"; //name of the Good histogram | |
163 | TString numstrt = fTitle + " Good"; //title of the Good histogram | |
164 | fGood->SetName(numstrn); | |
165 | fGood->SetTitle(numstrt); | |
166 | } | |
167 | ||
81b40753 | 168 | if (fAll) |
169 | { | |
170 | TString numstrn = fName + " All"; //name of the All histogram | |
171 | TString numstrt = fTitle + " All"; //title of the All histogram | |
172 | fAll->SetName(numstrn); | |
173 | fAll->SetTitle(numstrt); | |
174 | } | |
175 | ||
becde6ce | 176 | } |
177 | /******************************************************************/ | |
178 | ||
179 | TH1* AliHBTMonPIDPurityVsPtFctn::GetResult() | |
180 | { | |
181 | //Returns the result of the fuction | |
182 | //that is histogram with effciency and contamination | |
183 | ||
81b40753 | 184 | fResult->Divide(fGood,fAll); |
becde6ce | 185 | return fResult; |
186 | } | |
187 | /******************************************************************/ | |
188 | ||
78d7c6d3 | 189 | void AliHBTMonPIDPurityVsPtFctn::Process(AliVAODParticle * track,AliVAODParticle * part) |
becde6ce | 190 | { |
191 | //process the particle/track | |
192 | Double_t pt = part->Pt(); | |
81b40753 | 193 | fAll->Fill(pt); |
becde6ce | 194 | if (track->GetPdgCode() == part->GetPdgCode()) |
195 | { | |
196 | fGood->Fill(pt); | |
197 | } | |
198 | // else | |
199 | // { | |
200 | // Info("Process","Catched pid impurity ..."); | |
201 | // } | |
202 | } | |
203 | ||
204 | /******************************************************************/ | |
205 | /******************************************************************/ | |
206 | /******************************************************************/ | |
207 | ||
208 | ClassImp(AliHBTMonPIDContaminationVsPtFctn) | |
209 | ||
210 | AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn(Int_t nbins, Double_t maxXval, Double_t minXval): | |
211 | AliHBTMonTwoParticleFctn1D(nbins,maxXval,minXval), | |
81b40753 | 212 | fWrong(0x0), |
213 | fAll(0x0) | |
becde6ce | 214 | { |
215 | //ctor | |
216 | Rename("pidcontaminationvspt","PIDContaminationVsPt"); | |
217 | } | |
218 | /******************************************************************/ | |
219 | ||
2b31c209 | 220 | AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn |
221 | (const AliHBTMonPIDContaminationVsPtFctn& /*in*/): | |
222 | AliHBTMonTwoParticleFctn1D(), | |
223 | AliHBTCorrelFunction(), | |
224 | fWrong(0x0), | |
225 | fAll(0x0) | |
226 | { | |
227 | //cpy constructor | |
228 | Error("AliHBTMonPIDContaminationVsPtFctn(const AliHBTMonPIDContaminationVsPtFctn&", | |
229 | "Functions can not be copied because of histogram names clashes"); | |
230 | } | |
231 | ||
232 | /******************************************************************/ | |
233 | ||
becde6ce | 234 | AliHBTMonPIDContaminationVsPtFctn::~AliHBTMonPIDContaminationVsPtFctn() |
235 | { | |
236 | //dtor | |
237 | delete fWrong; | |
81b40753 | 238 | delete fAll; |
becde6ce | 239 | } |
240 | /******************************************************************/ | |
241 | ||
2b31c209 | 242 | AliHBTMonPIDContaminationVsPtFctn& AliHBTMonPIDContaminationVsPtFctn::operator= |
243 | (const AliHBTMonPIDContaminationVsPtFctn& /*in*/) | |
244 | { | |
245 | //assigment operator | |
246 | Error("operator=","Functions can not be copied because of histogram names clashes"); | |
247 | return *this; | |
248 | } | |
249 | /******************************************************************/ | |
250 | ||
becde6ce | 251 | void AliHBTMonPIDContaminationVsPtFctn::Write() |
252 | { | |
253 | //Writes the function results | |
254 | AliHBTMonitorFunction::Write(); | |
255 | fWrong->Write(); | |
81b40753 | 256 | fAll->Write(); |
becde6ce | 257 | } |
258 | /******************************************************************/ | |
259 | ||
260 | void AliHBTMonPIDContaminationVsPtFctn::Init() | |
261 | { | |
262 | //Initializes fuction | |
78d7c6d3 | 263 | if (AliVAODParticle::GetDebug()>0) Info("Init","%s",GetName()); |
becde6ce | 264 | |
265 | if (fResult == 0x0) | |
266 | { | |
267 | Warning("Init","Function has NULL result histogram!"); | |
268 | return; | |
269 | } | |
270 | ||
271 | if (fWrong == 0x0) | |
272 | { | |
273 | TString numstr = fName + " Wrong"; //title and name of the | |
274 | //result histogram | |
275 | TAxis* xax = fResult->GetXaxis(); | |
276 | fWrong = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax()); | |
277 | } | |
278 | ||
81b40753 | 279 | if (fAll == 0x0) |
280 | { | |
281 | TString numstr = fName + " All"; //title and name of the | |
282 | //result histogram | |
283 | TAxis* xax = fResult->GetXaxis(); | |
284 | fAll = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax()); | |
285 | } | |
becde6ce | 286 | fResult->Reset(); |
287 | fResult->SetDirectory(0x0); | |
81b40753 | 288 | fResult->Sumw2(); |
becde6ce | 289 | fWrong->Reset(); |
290 | fWrong->SetDirectory(0x0); | |
81b40753 | 291 | fWrong->Sumw2(); |
292 | fAll->Reset(); | |
293 | fAll->SetDirectory(0x0); | |
294 | fAll->Sumw2(); | |
295 | ||
78d7c6d3 | 296 | if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName()); |
becde6ce | 297 | } |
298 | ||
299 | /******************************************************************/ | |
300 | ||
301 | void AliHBTMonPIDContaminationVsPtFctn::Rename(const Char_t * name) | |
302 | { | |
303 | //Rename fuctions and all histograms belonging to it | |
304 | SetName(name); | |
305 | SetTitle(name); | |
306 | ||
307 | if (fResult) | |
308 | { | |
309 | TString numstr = fName + " Result"; //title and name of the result histogram | |
310 | fResult->SetName(numstr); | |
311 | fResult->SetTitle(numstr); | |
312 | } | |
313 | if (fWrong) | |
314 | { | |
315 | TString numstr = fName + " Wrong"; | |
316 | fWrong->SetName(numstr); | |
317 | fWrong->SetTitle(numstr); | |
318 | } | |
81b40753 | 319 | |
320 | if (fAll) | |
321 | { | |
322 | TString numstrn = fName + " All"; //name of the All histogram | |
323 | TString numstrt = fTitle + " All"; //title of the All histogram | |
324 | fAll->SetName(numstrn); | |
325 | fAll->SetTitle(numstrt); | |
326 | } | |
becde6ce | 327 | } |
328 | /******************************************************************/ | |
329 | ||
330 | void AliHBTMonPIDContaminationVsPtFctn::Rename(const Char_t * name, const Char_t * title) | |
331 | { | |
332 | //renames and retitle the function and histograms | |
333 | ||
334 | SetName(name); | |
335 | SetTitle(title); | |
336 | ||
337 | if (fResult) | |
338 | { | |
339 | TString numstrn = fName + " Result"; //name of the result histogram | |
340 | TString numstrt = fTitle + " Result"; //title of the result histogram | |
341 | fResult->SetName(numstrn); | |
342 | fResult->SetTitle(numstrt); | |
343 | } | |
344 | if (fWrong) | |
345 | { | |
346 | TString numstrn = fName + " Wrong"; //name of the Wrong histogram | |
347 | TString numstrt = fTitle + " Wrong"; //title of the Wrong histogram | |
348 | fWrong->SetName(numstrn); | |
349 | fWrong->SetTitle(numstrt); | |
350 | } | |
81b40753 | 351 | |
352 | if (fAll) | |
353 | { | |
354 | TString numstr = fName + " All"; | |
355 | fAll->SetName(numstr); | |
356 | fAll->SetTitle(numstr); | |
357 | } | |
358 | ||
becde6ce | 359 | } |
360 | /******************************************************************/ | |
361 | ||
362 | TH1* AliHBTMonPIDContaminationVsPtFctn::GetResult() | |
363 | { | |
364 | //Returns the result of the fuction | |
365 | //that is histogram with effciency and contamination | |
366 | ||
81b40753 | 367 | fResult->Divide(fWrong,fAll); |
becde6ce | 368 | return fResult; |
369 | } | |
370 | /******************************************************************/ | |
371 | ||
78d7c6d3 | 372 | void AliHBTMonPIDContaminationVsPtFctn::Process(AliVAODParticle * track, AliVAODParticle * part) |
becde6ce | 373 | { |
374 | //process the particle/track | |
375 | Double_t pt = part->Pt(); | |
81b40753 | 376 | fAll->Fill(pt); |
becde6ce | 377 | |
378 | if (track->GetPdgCode() != part->GetPdgCode()) | |
379 | { | |
380 | // Info("Process","Catched contamination"); | |
381 | // track->Print();part->Print(); | |
382 | fWrong->Fill(pt); | |
383 | } | |
384 | } | |
385 | ||
386 | /******************************************************************/ | |
a22a56ec | 387 | /******************************************************************/ |
388 | /******************************************************************/ | |
61763057 | 389 | ClassImp(AliHBTQInvCorrelFctnPerfectPID) |
390 | ||
391 | AliHBTQInvCorrelFctnPerfectPID::AliHBTQInvCorrelFctnPerfectPID(Int_t nbins, Double_t maxXval, Double_t minXval): | |
392 | AliHBTTwoPairFctn1D(nbins,maxXval,minXval) | |
393 | { | |
394 | //ctor | |
395 | fWriteNumAndDen = kTRUE;//change default behaviour | |
396 | Rename("qinvcfprfctpid","Q_{inv} Correlation Function Perfect PID"); | |
397 | } | |
398 | /*************************************************************/ | |
399 | ||
400 | void AliHBTQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
401 | { | |
402 | //Fills numerator | |
78d7c6d3 | 403 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
404 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
61763057 | 405 | |
406 | trackpair = CheckPair(trackpair); | |
407 | if (trackpair == 0x0) return; | |
55d46048 | 408 | // partpair = CheckPair(partpair); |
61763057 | 409 | if (partpair == 0x0) return; |
410 | ||
411 | fNumerator->Fill(trackpair->GetQInv()); | |
412 | } | |
413 | ||
414 | /*************************************************************/ | |
415 | void AliHBTQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
416 | { | |
417 | //Fills numerator | |
78d7c6d3 | 418 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
419 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
61763057 | 420 | |
421 | trackpair = CheckPair(trackpair); | |
422 | if (trackpair == 0x0) return; | |
55d46048 | 423 | // partpair = CheckPair(partpair); |
61763057 | 424 | if (partpair == 0x0) return; |
425 | ||
426 | fDenominator->Fill(trackpair->GetQInv()); | |
427 | } | |
428 | /*************************************************************/ | |
429 | ||
430 | TH1* AliHBTQInvCorrelFctnPerfectPID::GetResult() | |
431 | { | |
432 | //returns the scaled ratio | |
433 | ||
434 | delete fRatio; | |
435 | fRatio = GetRatio(Scale()); | |
436 | return fRatio; | |
437 | } | |
438 | /*************************************************************/ | |
439 | /******************************************************************/ | |
440 | /******************************************************************/ | |
441 | /******************************************************************/ | |
442 | ||
443 | ClassImp(AliHBTWeightQInvCorrelFctnPerfectPID) | |
444 | ||
445 | AliHBTWeightQInvCorrelFctnPerfectPID::AliHBTWeightQInvCorrelFctnPerfectPID(Int_t nbins, Double_t maxXval, Double_t minXval): | |
446 | AliHBTTwoPairFctn1D(nbins,maxXval,minXval) | |
447 | { | |
448 | //ctor | |
449 | fWriteNumAndDen = kTRUE;//change default behaviour | |
450 | Rename("wqinvcfprfctpid","Q_{inv} Weight Correlation Function Perfect PID"); | |
451 | } | |
452 | /*************************************************************/ | |
453 | ||
454 | void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
455 | { | |
456 | //Fills numerator | |
78d7c6d3 | 457 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
458 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
61763057 | 459 | |
460 | trackpair = CheckPair(trackpair); | |
461 | if (trackpair == 0x0) return; | |
55d46048 | 462 | // partpair = CheckPair(partpair); |
61763057 | 463 | if (partpair == 0x0) return; |
464 | ||
465 | fNumerator->Fill(trackpair->GetQInv(),partpair->GetWeight()); | |
466 | } | |
467 | ||
468 | /*************************************************************/ | |
469 | void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
470 | { | |
471 | //Fills numerator | |
78d7c6d3 | 472 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
473 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
61763057 | 474 | |
475 | trackpair = CheckPair(trackpair); | |
476 | if (trackpair == 0x0) return; | |
55d46048 | 477 | // partpair = CheckPair(partpair); |
61763057 | 478 | if (partpair == 0x0) return; |
479 | ||
480 | fDenominator->Fill(trackpair->GetQInv()); | |
481 | } | |
482 | /*************************************************************/ | |
483 | ||
484 | TH1* AliHBTWeightQInvCorrelFctnPerfectPID::GetResult() | |
485 | { | |
486 | //returns the scaled ratio | |
487 | ||
488 | delete fRatio; | |
489 | fRatio = GetRatio(Scale()); | |
490 | return fRatio; | |
491 | } | |
492 | ||
493 | ||
494 | /******************************************************************/ | |
495 | /******************************************************************/ | |
496 | /******************************************************************/ | |
497 | ||
498 | ClassImp(AliHBTWeightQOutSQideQLongFctnPerfectPID) | |
499 | ||
500 | AliHBTWeightQOutSQideQLongFctnPerfectPID::AliHBTWeightQOutSQideQLongFctnPerfectPID | |
501 | (Int_t nXbins, Double_t maxXval, Double_t minXval, | |
502 | Int_t nYbins, Double_t maxYval, Double_t minYval, | |
503 | Int_t nZbins, Double_t maxZval, Double_t minZval): | |
504 | AliHBTTwoPairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval) | |
505 | { | |
506 | //ctor | |
507 | fWriteNumAndDen = kTRUE;//change default behaviour | |
508 | Rename("wqoslprfctpid","Q_{out}-Q_{side}-Q_{long} Weight Fctn with perfect PID"); | |
509 | } | |
510 | /*************************************************************/ | |
511 | ||
512 | void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
513 | { | |
514 | //Fills numerator | |
78d7c6d3 | 515 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
516 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
61763057 | 517 | |
518 | trackpair = CheckPair(trackpair); | |
519 | if (trackpair == 0x0) return; | |
55d46048 | 520 | // partpair = CheckPair(partpair); |
61763057 | 521 | if (partpair == 0x0) return; |
522 | ||
a296aa84 | 523 | |
61763057 | 524 | Double_t weight = partpair->GetWeight(); |
a296aa84 | 525 | Double_t out = trackpair->GetQOutLCMS(); |
526 | Double_t side = trackpair->GetQSideLCMS(); | |
527 | Double_t lon = trackpair->GetQLongLCMS(); | |
528 | ||
529 | if (fAbs) | |
530 | { | |
531 | out = TMath::Abs(out); | |
532 | side = TMath::Abs(side); | |
533 | lon = TMath::Abs(lon); | |
534 | } | |
61763057 | 535 | fNumerator->Fill(out,side,lon,weight); |
536 | } | |
537 | /*************************************************************/ | |
538 | ||
539 | void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
540 | { | |
541 | //Fills numerator | |
78d7c6d3 | 542 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
543 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
61763057 | 544 | |
545 | trackpair = CheckPair(trackpair); | |
546 | if (trackpair == 0x0) return; | |
55d46048 | 547 | // partpair = CheckPair(partpair); |
61763057 | 548 | if (partpair == 0x0) return; |
549 | ||
a296aa84 | 550 | Double_t out = trackpair->GetQOutLCMS(); |
551 | Double_t side = trackpair->GetQSideLCMS(); | |
552 | Double_t lon = trackpair->GetQLongLCMS(); | |
553 | ||
554 | if (fAbs) | |
555 | { | |
556 | out = TMath::Abs(out); | |
557 | side = TMath::Abs(side); | |
558 | lon = TMath::Abs(lon); | |
559 | } | |
61763057 | 560 | fDenominator->Fill(out,side,lon); |
561 | } | |
562 | /******************************************************************/ | |
563 | ||
564 | TH1* AliHBTWeightQOutSQideQLongFctnPerfectPID::GetResult() | |
565 | { | |
566 | //returns the scaled ratio | |
567 | delete fRatio; | |
568 | fRatio = GetRatio(Scale()); | |
569 | return fRatio; | |
570 | } | |
571 | ||
572 | ||
573 | /******************************************************************/ | |
574 | /******************************************************************/ | |
575 | /******************************************************************/ | |
576 | ||
577 | ClassImp(AliHBTQOutSQideQLongFctnPerfectPID) | |
578 | ||
579 | AliHBTQOutSQideQLongFctnPerfectPID::AliHBTQOutSQideQLongFctnPerfectPID | |
580 | (Int_t nXbins, Double_t maxXval, Double_t minXval, | |
581 | Int_t nYbins, Double_t maxYval, Double_t minYval, | |
582 | Int_t nZbins, Double_t maxZval, Double_t minZval): | |
583 | AliHBTTwoPairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval) | |
584 | { | |
585 | //ctor | |
586 | fWriteNumAndDen = kTRUE;//change default behaviour | |
587 | Rename("qoslprfctpid","Q_{out}-Q_{side}-Q_{long} Fctn with perfect PID"); | |
588 | } | |
589 | /*************************************************************/ | |
590 | ||
591 | void AliHBTQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
592 | { | |
593 | //Fills numerator | |
78d7c6d3 | 594 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
595 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
61763057 | 596 | |
597 | trackpair = CheckPair(trackpair); | |
598 | if (trackpair == 0x0) return; | |
55d46048 | 599 | // partpair = CheckPair(partpair); |
61763057 | 600 | if (partpair == 0x0) return; |
601 | ||
a296aa84 | 602 | Double_t out = trackpair->GetQOutLCMS(); |
603 | Double_t side = trackpair->GetQSideLCMS(); | |
604 | Double_t lon = trackpair->GetQLongLCMS(); | |
605 | ||
606 | if (fAbs) | |
607 | { | |
608 | out = TMath::Abs(out); | |
609 | side = TMath::Abs(side); | |
610 | lon = TMath::Abs(lon); | |
611 | } | |
61763057 | 612 | fNumerator->Fill(out,side,lon); |
613 | } | |
614 | /*************************************************************/ | |
615 | ||
616 | void AliHBTQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
617 | { | |
618 | //Fills numerator | |
78d7c6d3 | 619 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
620 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
61763057 | 621 | |
622 | trackpair = CheckPair(trackpair); | |
623 | if (trackpair == 0x0) return; | |
55d46048 | 624 | // partpair = CheckPair(partpair); |
61763057 | 625 | if (partpair == 0x0) return; |
626 | ||
a296aa84 | 627 | Double_t out = trackpair->GetQOutLCMS(); |
628 | Double_t side = trackpair->GetQSideLCMS(); | |
629 | Double_t lon = trackpair->GetQLongLCMS(); | |
630 | ||
631 | if (fAbs) | |
632 | { | |
633 | out = TMath::Abs(out); | |
634 | side = TMath::Abs(side); | |
635 | lon = TMath::Abs(lon); | |
636 | } | |
61763057 | 637 | fDenominator->Fill(out,side,lon); |
638 | } | |
639 | /******************************************************************/ | |
640 | ||
641 | TH1* AliHBTQOutSQideQLongFctnPerfectPID::GetResult() | |
642 | { | |
643 | //returns the scaled ratio | |
644 | delete fRatio; | |
645 | fRatio = GetRatio(Scale()); | |
646 | return fRatio; | |
647 | } | |
648 | ||
649 | /******************************************************************/ | |
650 | /******************************************************************/ | |
651 | /******************************************************************/ | |
652 | ||
653 | ||
a22a56ec | 654 | |
becde6ce | 655 | ClassImp(AliHBTPairPIDProbVsQInvFctn) |
656 | ||
657 | AliHBTPairPIDProbVsQInvFctn::AliHBTPairPIDProbVsQInvFctn(Int_t nbins, Double_t maxXval, Double_t minXval): | |
658 | AliHBTOnePairFctn1D(nbins,maxXval,minXval) | |
659 | { | |
660 | fWriteNumAndDen = kTRUE;//change default behaviour | |
661 | Rename("qinvpidpur","Q_{inv} Function"); | |
662 | } | |
663 | /******************************************************************/ | |
664 | ||
665 | TH1* AliHBTPairPIDProbVsQInvFctn::GetResult() | |
666 | { | |
667 | //returns the scaled ratio | |
668 | delete fRatio; | |
669 | fRatio = GetRatio(Scale()); | |
670 | return fRatio; | |
671 | } | |
672 | /******************************************************************/ | |
673 | ||
674 | void AliHBTPairPIDProbVsQInvFctn::ProcessSameEventParticles(AliHBTPair* pair) | |
675 | { | |
676 | //Fills the numerator using pair from the same event | |
677 | pair = CheckPair(pair); | |
678 | if(pair) fNumerator->Fill(pair->GetQInv(),pair->GetPIDProb()); | |
679 | } | |
680 | /******************************************************************/ | |
681 | ||
682 | void AliHBTPairPIDProbVsQInvFctn::ProcessDiffEventParticles(AliHBTPair* pair) | |
683 | { | |
684 | //Fills the denumerator using mixed pairs | |
685 | pair = CheckPair(pair); | |
686 | if(pair) fDenominator->Fill(pair->GetQInv(),pair->GetPIDProb()); | |
687 | } | |
688 | ||
a22a56ec | 689 | /******************************************************************/ |
690 | /******************************************************************/ | |
691 | /******************************************************************/ | |
becde6ce | 692 | |
693 | ClassImp(AliHBTPairPIDProbVsQOutSQideQLongFctn) | |
694 | ||
695 | AliHBTPairPIDProbVsQOutSQideQLongFctn::AliHBTPairPIDProbVsQOutSQideQLongFctn(Int_t nXbins, Double_t maxXval, Double_t minXval, | |
696 | Int_t nYbins, Double_t maxYval, Double_t minYval, | |
697 | Int_t nZbins, Double_t maxZval, Double_t minZval): | |
698 | AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval) | |
699 | { | |
700 | //ctor | |
701 | fWriteNumAndDen = kTRUE;//change default behaviour | |
702 | Rename("qoslpidpur","Pair PID Probablilty .vs. Q_{out}-Q_{side}-Q_{long} Fctn"); | |
703 | } | |
61763057 | 704 | /*************************************************************/ |
becde6ce | 705 | |
706 | void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessSameEventParticles(AliHBTPair* pair) | |
707 | { | |
708 | //Fills numerator | |
709 | pair = CheckPair(pair); | |
710 | if (pair == 0x0) return; | |
711 | Double_t weight = pair->GetPIDProb(); | |
a296aa84 | 712 | Double_t out = pair->GetQOutLCMS(); |
713 | Double_t side = pair->GetQSideLCMS(); | |
714 | Double_t lon = pair->GetQLongLCMS(); | |
715 | ||
716 | if (fAbs) | |
717 | { | |
718 | out = TMath::Abs(out); | |
719 | side = TMath::Abs(side); | |
720 | lon = TMath::Abs(lon); | |
721 | } | |
722 | ||
becde6ce | 723 | fNumerator->Fill(out,side,lon,weight); |
724 | } | |
725 | /*************************************************************/ | |
726 | ||
727 | void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair* pair) | |
728 | { | |
729 | //Fills numerator | |
730 | pair = CheckPair(pair); | |
731 | if (pair == 0x0) return; | |
732 | Double_t weight = pair->GetPIDProb(); | |
a296aa84 | 733 | Double_t out = pair->GetQOutLCMS(); |
734 | Double_t side = pair->GetQSideLCMS(); | |
735 | Double_t lon = pair->GetQLongLCMS(); | |
736 | ||
737 | if (fAbs) | |
738 | { | |
739 | out = TMath::Abs(out); | |
740 | side = TMath::Abs(side); | |
741 | lon = TMath::Abs(lon); | |
742 | } | |
743 | ||
becde6ce | 744 | fDenominator->Fill(out,side,lon,weight); |
745 | } | |
746 | /*************************************************************/ | |
747 | ||
748 | TH1* AliHBTPairPIDProbVsQOutSQideQLongFctn::GetResult() | |
749 | { | |
750 | //returns the scaled ratio | |
a22a56ec | 751 | |
becde6ce | 752 | delete fRatio; |
753 | fRatio = GetRatio(Scale()); | |
754 | return fRatio; | |
755 | } | |
1f4ef2d2 | 756 | |
757 | /******************************************************************/ | |
758 | /******************************************************************/ | |
759 | /******************************************************************/ | |
760 | ||
761 | ClassImp(AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID) | |
762 | ||
763 | AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID(Int_t nXbins, Double_t maxXval, Double_t minXval, | |
764 | Int_t nYbins, Double_t maxYval, Double_t minYval, | |
765 | Int_t nZbins, Double_t maxZval, Double_t minZval): | |
766 | AliHBTTwoPairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval) | |
767 | { | |
768 | //ctor | |
769 | //Set Axis Title | |
770 | fWriteNumAndDen = kTRUE; | |
4800ed2d | 771 | Rename("tteffptthetaphipfctPID","P_{t} \\theta \\phi Two Track Efficiency Function"); |
1f4ef2d2 | 772 | if(fNumerator) |
773 | { | |
774 | fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]"); | |
775 | fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]"); | |
776 | fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]"); | |
777 | } | |
778 | ||
779 | if(fDenominator) | |
780 | { | |
781 | fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]"); | |
782 | fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]"); | |
783 | fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]"); | |
784 | } | |
785 | } | |
786 | /******************************************************************/ | |
787 | ||
788 | void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
789 | { | |
790 | //Fills numerator | |
78d7c6d3 | 791 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
792 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
1f4ef2d2 | 793 | |
794 | trackpair = CheckPair(trackpair); | |
795 | if (trackpair == 0x0) return; | |
55d46048 | 796 | // partpair = CheckPair(partpair); |
1f4ef2d2 | 797 | if (partpair == 0x0) return; |
798 | ||
799 | Double_t x = TMath::Abs(trackpair->GetDeltaPt()); | |
800 | Double_t y = TMath::Abs(trackpair->GetDeltaTheta()); | |
801 | Double_t z = TMath::Abs(trackpair->GetDeltaPhi()); | |
802 | fNumerator->Fill(x,y,z); | |
803 | } | |
804 | /******************************************************************/ | |
805 | ||
806 | void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) | |
807 | { | |
808 | //Fills numerator | |
78d7c6d3 | 809 | if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return; |
810 | if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return; | |
1f4ef2d2 | 811 | |
812 | trackpair = CheckPair(trackpair); | |
813 | if (trackpair == 0x0) return; | |
55d46048 | 814 | // partpair = CheckPair(partpair); |
1f4ef2d2 | 815 | if (partpair == 0x0) return; |
816 | ||
817 | Double_t x = TMath::Abs(trackpair->GetDeltaPt()); | |
818 | Double_t y = TMath::Abs(trackpair->GetDeltaTheta()); | |
819 | Double_t z = TMath::Abs(trackpair->GetDeltaPhi()); | |
820 | fDenominator->Fill(x,y,z); | |
821 | } | |
822 | /******************************************************************/ | |
823 | ||
824 | TH1* AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::GetResult() | |
825 | { | |
826 | //returns ratio of numerator and denominator | |
827 | delete fRatio; | |
828 | fRatio = GetRatio(Scale()); | |
829 | if(fRatio) | |
830 | { | |
831 | fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]"); | |
832 | fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]"); | |
833 | fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]"); | |
834 | } | |
835 | return fRatio; | |
836 | } | |
837 | /******************************************************************/ | |
838 | /******************************************************************/ | |
839 | /******************************************************************/ | |
840 | ||
841 | ClassImp(AliHBTPairPIDProbVsPtThetaPhiFctn) | |
842 | ||
843 | AliHBTPairPIDProbVsPtThetaPhiFctn::AliHBTPairPIDProbVsPtThetaPhiFctn(Int_t nXbins, Double_t maxXval, Double_t minXval, | |
844 | Int_t nYbins, Double_t maxYval, Double_t minYval, | |
845 | Int_t nZbins, Double_t maxZval, Double_t minZval): | |
846 | AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval) | |
847 | { | |
848 | //ctor | |
849 | fWriteNumAndDen = kTRUE;//change default behaviour | |
4800ed2d | 850 | Rename("ptthetaphipidpur","Pair PID Probablilty .vs. \\Delta P_{t}-\\Delta \\theta-\\Delta \\phi Fctn"); |
1f4ef2d2 | 851 | if(fNumerator) |
852 | { | |
853 | fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]"); | |
854 | fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]"); | |
855 | fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]"); | |
856 | } | |
857 | ||
858 | if(fDenominator) | |
859 | { | |
860 | fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]"); | |
861 | fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]"); | |
862 | fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]"); | |
863 | } | |
864 | ||
865 | } | |
866 | /*************************************************************/ | |
867 | ||
868 | void AliHBTPairPIDProbVsPtThetaPhiFctn::ProcessSameEventParticles(AliHBTPair* pair) | |
869 | { | |
870 | //Fills numerator | |
871 | pair = CheckPair(pair); | |
872 | if (pair == 0x0) return; | |
873 | Double_t weight = pair->GetPIDProb(); | |
874 | Double_t pt = TMath::Abs(pair->GetDeltaPt()); | |
875 | Double_t theta = TMath::Abs(pair->GetDeltaTheta()); | |
876 | Double_t phi = TMath::Abs(pair->GetDeltaPhi()); | |
877 | fNumerator->Fill(pt,theta,phi,weight); | |
878 | } | |
879 | /*************************************************************/ | |
880 | ||
881 | void AliHBTPairPIDProbVsPtThetaPhiFctn::ProcessDiffEventParticles(AliHBTPair* pair) | |
882 | { | |
883 | //Fills numerator | |
884 | pair = CheckPair(pair); | |
885 | if (pair == 0x0) return; | |
886 | Double_t weight = pair->GetPIDProb(); | |
887 | Double_t pt = TMath::Abs(pair->GetDeltaPt()); | |
888 | Double_t phi = TMath::Abs(pair->GetDeltaTheta()); | |
889 | Double_t theta = TMath::Abs(pair->GetDeltaPhi()); | |
890 | fDenominator->Fill(pt,theta,phi,weight); | |
891 | } | |
892 | /*************************************************************/ | |
893 | ||
894 | TH1* AliHBTPairPIDProbVsPtThetaPhiFctn::GetResult() | |
895 | { | |
896 | //returns the scaled ratio | |
897 | ||
898 | delete fRatio; | |
899 | fRatio = GetRatio(Scale()); | |
900 | if(fRatio) | |
901 | { | |
902 | fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]"); | |
903 | fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]"); | |
904 | fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]"); | |
905 | } | |
906 | return fRatio; | |
907 | } | |
908 |