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