1 #include "AliHBTPIDPurityFctns.h"
2 //_______________________________________________________________________________
3 /////////////////////////////////////////////////////////////////////////////////
5 // class AliHBTMonPhiResolutionVsPtFctn;
6 // class AliHBTMonThetaResolutionVsPtFctn;
8 // file: AliHBTPIDPurityFctns.cxx AliHBTPIDPurityFctns.h
10 // Classes for calculating PID purity, efficiency and other things connected with PID
14 // added by Piotr.Skowronski@cern.ch
16 //////////////////////////////////////////////////////////////////////////////////
19 /******************************************************************/
20 /******************************************************************/
21 /******************************************************************/
23 ClassImp(AliHBTMonPIDPurityVsPtFctn)
25 AliHBTMonPIDPurityVsPtFctn::AliHBTMonPIDPurityVsPtFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
26 AliHBTMonTwoParticleFctn1D(nbins,maxXval,minXval),
31 Rename("pidpurityvspt","PIDPurityVsPt");
34 /******************************************************************/
36 AliHBTMonPIDPurityVsPtFctn::AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn& /*in*/):
37 AliHBTMonTwoParticleFctn1D(),
38 AliHBTCorrelFunction(),
43 Error("AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn&",
44 "Functions can not be copied because of histogram names clashes");
47 /******************************************************************/
49 AliHBTMonPIDPurityVsPtFctn::~AliHBTMonPIDPurityVsPtFctn()
55 /******************************************************************/
57 AliHBTMonPIDPurityVsPtFctn& AliHBTMonPIDPurityVsPtFctn::operator=
58 (const AliHBTMonPIDPurityVsPtFctn& /*in*/)
61 Error("operator=","Functions can not be copied because of histogram names clashes");
64 /******************************************************************/
66 void AliHBTMonPIDPurityVsPtFctn::Write()
68 //Writes a fucntion results
69 AliHBTMonitorFunction::Write();
73 /******************************************************************/
75 void AliHBTMonPIDPurityVsPtFctn::Init()
78 if (AliVAODParticle::GetDebug()>0) Info("Init","%s",GetName());
82 Warning("Init","Function has NULL result histogram!");
88 TString numstr = fName + " Good"; //title and name of the
90 TAxis* xax = fResult->GetXaxis();
91 fGood = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
96 TString numstr = fName + " All"; //title and name of the
98 TAxis* xax = fResult->GetXaxis();
99 fAll = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
103 fResult->SetDirectory(0x0);
106 fGood->SetDirectory(0x0);
109 fAll->SetDirectory(0x0);
112 if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
115 /******************************************************************/
117 void AliHBTMonPIDPurityVsPtFctn::Rename(const Char_t * name)
119 //Rename fuctions and all histograms belonging to it
125 TString numstr = fName + " Result"; //title and name of the result histogram
126 fResult->SetName(numstr);
127 fResult->SetTitle(numstr);
132 TString numstr = fName + " Good";
133 fGood->SetName(numstr);
134 fGood->SetTitle(numstr);
139 TString numstr = fName + " All";
140 fAll->SetName(numstr);
141 fAll->SetTitle(numstr);
144 /******************************************************************/
146 void AliHBTMonPIDPurityVsPtFctn::Rename(const Char_t * name, const Char_t * title)
148 //renames and retitle the function and histograms
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);
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);
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);
177 /******************************************************************/
179 TH1* AliHBTMonPIDPurityVsPtFctn::GetResult()
181 //Returns the result of the fuction
182 //that is histogram with effciency and contamination
184 fResult->Divide(fGood,fAll);
187 /******************************************************************/
189 void AliHBTMonPIDPurityVsPtFctn::Process(AliVAODParticle * track,AliVAODParticle * part)
191 //process the particle/track
192 Double_t pt = part->Pt();
194 if (track->GetPdgCode() == part->GetPdgCode())
200 // Info("Process","Catched pid impurity ...");
204 /******************************************************************/
205 /******************************************************************/
206 /******************************************************************/
208 ClassImp(AliHBTMonPIDContaminationVsPtFctn)
210 AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
211 AliHBTMonTwoParticleFctn1D(nbins,maxXval,minXval),
216 Rename("pidcontaminationvspt","PIDContaminationVsPt");
218 /******************************************************************/
220 AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn
221 (const AliHBTMonPIDContaminationVsPtFctn& /*in*/):
222 AliHBTMonTwoParticleFctn1D(),
223 AliHBTCorrelFunction(),
228 Error("AliHBTMonPIDContaminationVsPtFctn(const AliHBTMonPIDContaminationVsPtFctn&",
229 "Functions can not be copied because of histogram names clashes");
232 /******************************************************************/
234 AliHBTMonPIDContaminationVsPtFctn::~AliHBTMonPIDContaminationVsPtFctn()
240 /******************************************************************/
242 AliHBTMonPIDContaminationVsPtFctn& AliHBTMonPIDContaminationVsPtFctn::operator=
243 (const AliHBTMonPIDContaminationVsPtFctn& /*in*/)
246 Error("operator=","Functions can not be copied because of histogram names clashes");
249 /******************************************************************/
251 void AliHBTMonPIDContaminationVsPtFctn::Write()
253 //Writes the function results
254 AliHBTMonitorFunction::Write();
258 /******************************************************************/
260 void AliHBTMonPIDContaminationVsPtFctn::Init()
262 //Initializes fuction
263 if (AliVAODParticle::GetDebug()>0) Info("Init","%s",GetName());
267 Warning("Init","Function has NULL result histogram!");
273 TString numstr = fName + " Wrong"; //title and name of the
275 TAxis* xax = fResult->GetXaxis();
276 fWrong = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
281 TString numstr = fName + " All"; //title and name of the
283 TAxis* xax = fResult->GetXaxis();
284 fAll = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
287 fResult->SetDirectory(0x0);
290 fWrong->SetDirectory(0x0);
293 fAll->SetDirectory(0x0);
296 if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
299 /******************************************************************/
301 void AliHBTMonPIDContaminationVsPtFctn::Rename(const Char_t * name)
303 //Rename fuctions and all histograms belonging to it
309 TString numstr = fName + " Result"; //title and name of the result histogram
310 fResult->SetName(numstr);
311 fResult->SetTitle(numstr);
315 TString numstr = fName + " Wrong";
316 fWrong->SetName(numstr);
317 fWrong->SetTitle(numstr);
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);
328 /******************************************************************/
330 void AliHBTMonPIDContaminationVsPtFctn::Rename(const Char_t * name, const Char_t * title)
332 //renames and retitle the function and histograms
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);
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);
354 TString numstr = fName + " All";
355 fAll->SetName(numstr);
356 fAll->SetTitle(numstr);
360 /******************************************************************/
362 TH1* AliHBTMonPIDContaminationVsPtFctn::GetResult()
364 //Returns the result of the fuction
365 //that is histogram with effciency and contamination
367 fResult->Divide(fWrong,fAll);
370 /******************************************************************/
372 void AliHBTMonPIDContaminationVsPtFctn::Process(AliVAODParticle * track, AliVAODParticle * part)
374 //process the particle/track
375 Double_t pt = part->Pt();
378 if (track->GetPdgCode() != part->GetPdgCode())
380 // Info("Process","Catched contamination");
381 // track->Print();part->Print();
386 /******************************************************************/
387 /******************************************************************/
388 /******************************************************************/
389 ClassImp(AliHBTQInvCorrelFctnPerfectPID)
391 AliHBTQInvCorrelFctnPerfectPID::AliHBTQInvCorrelFctnPerfectPID(Int_t nbins, Double_t maxXval, Double_t minXval):
392 AliHBTTwoPairFctn1D(nbins,maxXval,minXval)
395 fWriteNumAndDen = kTRUE;//change default behaviour
396 Rename("qinvcfprfctpid","Q_{inv} Correlation Function Perfect PID");
398 /*************************************************************/
400 void AliHBTQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
403 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
404 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
406 trackpair = CheckPair(trackpair);
407 if (trackpair == 0x0) return;
408 // partpair = CheckPair(partpair);
409 if (partpair == 0x0) return;
411 fNumerator->Fill(trackpair->GetQInv());
414 /*************************************************************/
415 void AliHBTQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
418 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
419 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
421 trackpair = CheckPair(trackpair);
422 if (trackpair == 0x0) return;
423 // partpair = CheckPair(partpair);
424 if (partpair == 0x0) return;
426 fDenominator->Fill(trackpair->GetQInv());
428 /*************************************************************/
430 TH1* AliHBTQInvCorrelFctnPerfectPID::GetResult()
432 //returns the scaled ratio
435 fRatio = GetRatio(Scale());
438 /*************************************************************/
439 /******************************************************************/
440 /******************************************************************/
441 /******************************************************************/
443 ClassImp(AliHBTWeightQInvCorrelFctnPerfectPID)
445 AliHBTWeightQInvCorrelFctnPerfectPID::AliHBTWeightQInvCorrelFctnPerfectPID(Int_t nbins, Double_t maxXval, Double_t minXval):
446 AliHBTTwoPairFctn1D(nbins,maxXval,minXval)
449 fWriteNumAndDen = kTRUE;//change default behaviour
450 Rename("wqinvcfprfctpid","Q_{inv} Weight Correlation Function Perfect PID");
452 /*************************************************************/
454 void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
457 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
458 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
460 trackpair = CheckPair(trackpair);
461 if (trackpair == 0x0) return;
462 // partpair = CheckPair(partpair);
463 if (partpair == 0x0) return;
465 fNumerator->Fill(trackpair->GetQInv(),partpair->GetWeight());
468 /*************************************************************/
469 void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
472 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
473 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
475 trackpair = CheckPair(trackpair);
476 if (trackpair == 0x0) return;
477 // partpair = CheckPair(partpair);
478 if (partpair == 0x0) return;
480 fDenominator->Fill(trackpair->GetQInv());
482 /*************************************************************/
484 TH1* AliHBTWeightQInvCorrelFctnPerfectPID::GetResult()
486 //returns the scaled ratio
489 fRatio = GetRatio(Scale());
494 /******************************************************************/
495 /******************************************************************/
496 /******************************************************************/
498 ClassImp(AliHBTWeightQOutSQideQLongFctnPerfectPID)
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)
507 fWriteNumAndDen = kTRUE;//change default behaviour
508 Rename("wqoslprfctpid","Q_{out}-Q_{side}-Q_{long} Weight Fctn with perfect PID");
510 /*************************************************************/
512 void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
515 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
516 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
518 trackpair = CheckPair(trackpair);
519 if (trackpair == 0x0) return;
520 // partpair = CheckPair(partpair);
521 if (partpair == 0x0) return;
524 Double_t weight = partpair->GetWeight();
525 Double_t out = trackpair->GetQOutLCMS();
526 Double_t side = trackpair->GetQSideLCMS();
527 Double_t lon = trackpair->GetQLongLCMS();
531 out = TMath::Abs(out);
532 side = TMath::Abs(side);
533 lon = TMath::Abs(lon);
535 fNumerator->Fill(out,side,lon,weight);
537 /*************************************************************/
539 void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
542 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
543 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
545 trackpair = CheckPair(trackpair);
546 if (trackpair == 0x0) return;
547 // partpair = CheckPair(partpair);
548 if (partpair == 0x0) return;
550 Double_t out = trackpair->GetQOutLCMS();
551 Double_t side = trackpair->GetQSideLCMS();
552 Double_t lon = trackpair->GetQLongLCMS();
556 out = TMath::Abs(out);
557 side = TMath::Abs(side);
558 lon = TMath::Abs(lon);
560 fDenominator->Fill(out,side,lon);
562 /******************************************************************/
564 TH1* AliHBTWeightQOutSQideQLongFctnPerfectPID::GetResult()
566 //returns the scaled ratio
568 fRatio = GetRatio(Scale());
573 /******************************************************************/
574 /******************************************************************/
575 /******************************************************************/
577 ClassImp(AliHBTQOutSQideQLongFctnPerfectPID)
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)
586 fWriteNumAndDen = kTRUE;//change default behaviour
587 Rename("qoslprfctpid","Q_{out}-Q_{side}-Q_{long} Fctn with perfect PID");
589 /*************************************************************/
591 void AliHBTQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
594 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
595 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
597 trackpair = CheckPair(trackpair);
598 if (trackpair == 0x0) return;
599 // partpair = CheckPair(partpair);
600 if (partpair == 0x0) return;
602 Double_t out = trackpair->GetQOutLCMS();
603 Double_t side = trackpair->GetQSideLCMS();
604 Double_t lon = trackpair->GetQLongLCMS();
608 out = TMath::Abs(out);
609 side = TMath::Abs(side);
610 lon = TMath::Abs(lon);
612 fNumerator->Fill(out,side,lon);
614 /*************************************************************/
616 void AliHBTQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
619 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
620 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
622 trackpair = CheckPair(trackpair);
623 if (trackpair == 0x0) return;
624 // partpair = CheckPair(partpair);
625 if (partpair == 0x0) return;
627 Double_t out = trackpair->GetQOutLCMS();
628 Double_t side = trackpair->GetQSideLCMS();
629 Double_t lon = trackpair->GetQLongLCMS();
633 out = TMath::Abs(out);
634 side = TMath::Abs(side);
635 lon = TMath::Abs(lon);
637 fDenominator->Fill(out,side,lon);
639 /******************************************************************/
641 TH1* AliHBTQOutSQideQLongFctnPerfectPID::GetResult()
643 //returns the scaled ratio
645 fRatio = GetRatio(Scale());
649 /******************************************************************/
650 /******************************************************************/
651 /******************************************************************/
655 ClassImp(AliHBTPairPIDProbVsQInvFctn)
657 AliHBTPairPIDProbVsQInvFctn::AliHBTPairPIDProbVsQInvFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
658 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
660 fWriteNumAndDen = kTRUE;//change default behaviour
661 Rename("qinvpidpur","Q_{inv} Function");
663 /******************************************************************/
665 TH1* AliHBTPairPIDProbVsQInvFctn::GetResult()
667 //returns the scaled ratio
669 fRatio = GetRatio(Scale());
672 /******************************************************************/
674 void AliHBTPairPIDProbVsQInvFctn::ProcessSameEventParticles(AliHBTPair* pair)
676 //Fills the numerator using pair from the same event
677 pair = CheckPair(pair);
678 if(pair) fNumerator->Fill(pair->GetQInv(),pair->GetPIDProb());
680 /******************************************************************/
682 void AliHBTPairPIDProbVsQInvFctn::ProcessDiffEventParticles(AliHBTPair* pair)
684 //Fills the denumerator using mixed pairs
685 pair = CheckPair(pair);
686 if(pair) fDenominator->Fill(pair->GetQInv(),pair->GetPIDProb());
689 /******************************************************************/
690 /******************************************************************/
691 /******************************************************************/
693 ClassImp(AliHBTPairPIDProbVsQOutSQideQLongFctn)
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)
701 fWriteNumAndDen = kTRUE;//change default behaviour
702 Rename("qoslpidpur","Pair PID Probablilty .vs. Q_{out}-Q_{side}-Q_{long} Fctn");
704 /*************************************************************/
706 void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessSameEventParticles(AliHBTPair* pair)
709 pair = CheckPair(pair);
710 if (pair == 0x0) return;
711 Double_t weight = pair->GetPIDProb();
712 Double_t out = pair->GetQOutLCMS();
713 Double_t side = pair->GetQSideLCMS();
714 Double_t lon = pair->GetQLongLCMS();
718 out = TMath::Abs(out);
719 side = TMath::Abs(side);
720 lon = TMath::Abs(lon);
723 fNumerator->Fill(out,side,lon,weight);
725 /*************************************************************/
727 void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair* pair)
730 pair = CheckPair(pair);
731 if (pair == 0x0) return;
732 Double_t weight = pair->GetPIDProb();
733 Double_t out = pair->GetQOutLCMS();
734 Double_t side = pair->GetQSideLCMS();
735 Double_t lon = pair->GetQLongLCMS();
739 out = TMath::Abs(out);
740 side = TMath::Abs(side);
741 lon = TMath::Abs(lon);
744 fDenominator->Fill(out,side,lon,weight);
746 /*************************************************************/
748 TH1* AliHBTPairPIDProbVsQOutSQideQLongFctn::GetResult()
750 //returns the scaled ratio
753 fRatio = GetRatio(Scale());
757 /******************************************************************/
758 /******************************************************************/
759 /******************************************************************/
761 ClassImp(AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID)
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)
770 fWriteNumAndDen = kTRUE;
771 Rename("tteffptthetaphipfctPID","P_{t} \\theta \\phi Two Track Efficiency Function");
774 fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
775 fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
776 fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
781 fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
782 fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
783 fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
786 /******************************************************************/
788 void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
791 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
792 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
794 trackpair = CheckPair(trackpair);
795 if (trackpair == 0x0) return;
796 // partpair = CheckPair(partpair);
797 if (partpair == 0x0) return;
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);
804 /******************************************************************/
806 void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
809 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
810 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
812 trackpair = CheckPair(trackpair);
813 if (trackpair == 0x0) return;
814 // partpair = CheckPair(partpair);
815 if (partpair == 0x0) return;
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);
822 /******************************************************************/
824 TH1* AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::GetResult()
826 //returns ratio of numerator and denominator
828 fRatio = GetRatio(Scale());
831 fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
832 fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
833 fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
837 /******************************************************************/
838 /******************************************************************/
839 /******************************************************************/
841 ClassImp(AliHBTPairPIDProbVsPtThetaPhiFctn)
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)
849 fWriteNumAndDen = kTRUE;//change default behaviour
850 Rename("ptthetaphipidpur","Pair PID Probablilty .vs. \\Delta P_{t}-\\Delta \\theta-\\Delta \\phi Fctn");
853 fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
854 fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
855 fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
860 fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
861 fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
862 fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
866 /*************************************************************/
868 void AliHBTPairPIDProbVsPtThetaPhiFctn::ProcessSameEventParticles(AliHBTPair* pair)
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);
879 /*************************************************************/
881 void AliHBTPairPIDProbVsPtThetaPhiFctn::ProcessDiffEventParticles(AliHBTPair* pair)
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);
892 /*************************************************************/
894 TH1* AliHBTPairPIDProbVsPtThetaPhiFctn::GetResult()
896 //returns the scaled ratio
899 fRatio = GetRatio(Scale());
902 fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
903 fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
904 fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]");