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