1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 #include "AliHBTPIDPurityFctns.h"
21 //_______________________________________________________________________________
22 /////////////////////////////////////////////////////////////////////////////////
24 // class AliHBTMonPhiResolutionVsPtFctn;
25 // class AliHBTMonThetaResolutionVsPtFctn;
27 // file: AliHBTPIDPurityFctns.cxx AliHBTPIDPurityFctns.h
29 // Classes for calculating PID purity, efficiency and other things connected with PID
33 // added by Piotr.Skowronski@cern.ch
35 //////////////////////////////////////////////////////////////////////////////////
38 /******************************************************************/
39 /******************************************************************/
40 /******************************************************************/
42 ClassImp(AliHBTMonPIDPurityVsPtFctn)
44 AliHBTMonPIDPurityVsPtFctn::AliHBTMonPIDPurityVsPtFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
45 AliHBTMonTwoParticleFctn1D(nbins,maxXval,minXval),
50 Rename("pidpurityvspt","PIDPurityVsPt");
53 /******************************************************************/
55 AliHBTMonPIDPurityVsPtFctn::AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn& /*in*/):
56 AliHBTMonTwoParticleFctn1D(),
57 AliHBTCorrelFunction(),
62 Error("AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn&",
63 "Functions can not be copied because of histogram names clashes");
66 /******************************************************************/
68 AliHBTMonPIDPurityVsPtFctn::~AliHBTMonPIDPurityVsPtFctn()
74 /******************************************************************/
76 AliHBTMonPIDPurityVsPtFctn& AliHBTMonPIDPurityVsPtFctn::operator=
77 (const AliHBTMonPIDPurityVsPtFctn& /*in*/)
80 Error("operator=","Functions can not be copied because of histogram names clashes");
83 /******************************************************************/
85 void AliHBTMonPIDPurityVsPtFctn::Write()
87 //Writes a fucntion results
88 AliHBTMonitorFunction::Write();
92 /******************************************************************/
94 void AliHBTMonPIDPurityVsPtFctn::Init()
97 AliDebug(1,"Entering");
101 AliWarning("Function has NULL result histogram!");
107 TString numstr = fName + " Good"; //title and name of the
109 TAxis* xax = fResult->GetXaxis();
110 fGood = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
115 TString numstr = fName + " All"; //title and name of the
117 TAxis* xax = fResult->GetXaxis();
118 fAll = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
122 fResult->SetDirectory(0x0);
125 fGood->SetDirectory(0x0);
128 fAll->SetDirectory(0x0);
134 /******************************************************************/
136 void AliHBTMonPIDPurityVsPtFctn::Rename(const Char_t * name)
138 //Rename fuctions and all histograms belonging to it
144 TString numstr = fName + " Result"; //title and name of the result histogram
145 fResult->SetName(numstr);
146 fResult->SetTitle(numstr);
151 TString numstr = fName + " Good";
152 fGood->SetName(numstr);
153 fGood->SetTitle(numstr);
158 TString numstr = fName + " All";
159 fAll->SetName(numstr);
160 fAll->SetTitle(numstr);
163 /******************************************************************/
165 void AliHBTMonPIDPurityVsPtFctn::Rename(const Char_t * name, const Char_t * title)
167 //renames and retitle the function and histograms
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);
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);
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);
196 /******************************************************************/
198 TH1* AliHBTMonPIDPurityVsPtFctn::GetResult()
200 //Returns the result of the fuction
201 //that is histogram with effciency and contamination
203 fResult->Divide(fGood,fAll);
206 /******************************************************************/
208 void AliHBTMonPIDPurityVsPtFctn::Process(AliVAODParticle * track,AliVAODParticle * part)
210 //process the particle/track
211 Double_t pt = part->Pt();
213 if (track->GetPdgCode() == part->GetPdgCode())
219 // Info("Process","Catched pid impurity ...");
223 /******************************************************************/
224 /******************************************************************/
225 /******************************************************************/
227 ClassImp(AliHBTMonPIDContaminationVsPtFctn)
229 AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
230 AliHBTMonTwoParticleFctn1D(nbins,maxXval,minXval),
235 Rename("pidcontaminationvspt","PIDContaminationVsPt");
237 /******************************************************************/
239 AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn
240 (const AliHBTMonPIDContaminationVsPtFctn& /*in*/):
241 AliHBTMonTwoParticleFctn1D(),
242 AliHBTCorrelFunction(),
247 Error("AliHBTMonPIDContaminationVsPtFctn(const AliHBTMonPIDContaminationVsPtFctn&",
248 "Functions can not be copied because of histogram names clashes");
251 /******************************************************************/
253 AliHBTMonPIDContaminationVsPtFctn::~AliHBTMonPIDContaminationVsPtFctn()
259 /******************************************************************/
261 AliHBTMonPIDContaminationVsPtFctn& AliHBTMonPIDContaminationVsPtFctn::operator=
262 (const AliHBTMonPIDContaminationVsPtFctn& /*in*/)
265 Error("operator=","Functions can not be copied because of histogram names clashes");
268 /******************************************************************/
270 void AliHBTMonPIDContaminationVsPtFctn::Write()
272 //Writes the function results
273 AliHBTMonitorFunction::Write();
277 /******************************************************************/
279 void AliHBTMonPIDContaminationVsPtFctn::Init()
281 //Initializes fuction
282 AliDebug(1,"Entering");
286 AliWarning("Function has NULL result histogram!");
292 TString numstr = fName + " Wrong"; //title and name of the
294 TAxis* xax = fResult->GetXaxis();
295 fWrong = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
300 TString numstr = fName + " All"; //title and name of the
302 TAxis* xax = fResult->GetXaxis();
303 fAll = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
306 fResult->SetDirectory(0x0);
309 fWrong->SetDirectory(0x0);
312 fAll->SetDirectory(0x0);
318 /******************************************************************/
320 void AliHBTMonPIDContaminationVsPtFctn::Rename(const Char_t * name)
322 //Rename fuctions and all histograms belonging to it
328 TString numstr = fName + " Result"; //title and name of the result histogram
329 fResult->SetName(numstr);
330 fResult->SetTitle(numstr);
334 TString numstr = fName + " Wrong";
335 fWrong->SetName(numstr);
336 fWrong->SetTitle(numstr);
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);
347 /******************************************************************/
349 void AliHBTMonPIDContaminationVsPtFctn::Rename(const Char_t * name, const Char_t * title)
351 //renames and retitle the function and histograms
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);
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);
373 TString numstr = fName + " All";
374 fAll->SetName(numstr);
375 fAll->SetTitle(numstr);
379 /******************************************************************/
381 TH1* AliHBTMonPIDContaminationVsPtFctn::GetResult()
383 //Returns the result of the fuction
384 //that is histogram with effciency and contamination
386 fResult->Divide(fWrong,fAll);
389 /******************************************************************/
391 void AliHBTMonPIDContaminationVsPtFctn::Process(AliVAODParticle * track, AliVAODParticle * part)
393 //process the particle/track
394 Double_t pt = part->Pt();
397 if (track->GetPdgCode() != part->GetPdgCode())
399 // Info("Process","Catched contamination");
400 // track->Print();part->Print();
405 /******************************************************************/
406 /******************************************************************/
407 /******************************************************************/
408 ClassImp(AliHBTQInvCorrelFctnPerfectPID)
410 AliHBTQInvCorrelFctnPerfectPID::AliHBTQInvCorrelFctnPerfectPID(Int_t nbins, Double_t maxXval, Double_t minXval):
411 AliHBTTwoPairFctn1D(nbins,maxXval,minXval)
414 fWriteNumAndDen = kTRUE;//change default behaviour
415 Rename("qinvcfprfctpid","Q_{inv} Correlation Function Perfect PID");
417 /*************************************************************/
419 void AliHBTQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
422 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
423 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
425 trackpair = CheckPair(trackpair);
426 if (trackpair == 0x0) return;
427 // partpair = CheckPair(partpair);
428 if (partpair == 0x0) return;
430 fNumerator->Fill(trackpair->GetQInv());
433 /*************************************************************/
434 void AliHBTQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
437 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
438 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
440 trackpair = CheckPair(trackpair);
441 if (trackpair == 0x0) return;
442 // partpair = CheckPair(partpair);
443 if (partpair == 0x0) return;
445 fDenominator->Fill(trackpair->GetQInv());
447 /*************************************************************/
449 TH1* AliHBTQInvCorrelFctnPerfectPID::GetResult()
451 //returns the scaled ratio
454 fRatio = GetRatio(Scale());
457 /*************************************************************/
458 /******************************************************************/
459 /******************************************************************/
460 /******************************************************************/
462 ClassImp(AliHBTWeightQInvCorrelFctnPerfectPID)
464 AliHBTWeightQInvCorrelFctnPerfectPID::AliHBTWeightQInvCorrelFctnPerfectPID(Int_t nbins, Double_t maxXval, Double_t minXval):
465 AliHBTTwoPairFctn1D(nbins,maxXval,minXval)
468 fWriteNumAndDen = kTRUE;//change default behaviour
469 Rename("wqinvcfprfctpid","Q_{inv} Weight Correlation Function Perfect PID");
471 /*************************************************************/
473 void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
476 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
477 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
479 trackpair = CheckPair(trackpair);
480 if (trackpair == 0x0) return;
481 // partpair = CheckPair(partpair);
482 if (partpair == 0x0) return;
484 fNumerator->Fill(trackpair->GetQInv(),partpair->GetWeight());
487 /*************************************************************/
488 void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
491 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
492 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
494 trackpair = CheckPair(trackpair);
495 if (trackpair == 0x0) return;
496 // partpair = CheckPair(partpair);
497 if (partpair == 0x0) return;
499 fDenominator->Fill(trackpair->GetQInv());
501 /*************************************************************/
503 TH1* AliHBTWeightQInvCorrelFctnPerfectPID::GetResult()
505 //returns the scaled ratio
508 fRatio = GetRatio(Scale());
513 /******************************************************************/
514 /******************************************************************/
515 /******************************************************************/
517 ClassImp(AliHBTWeightQOutSQideQLongFctnPerfectPID)
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)
526 fWriteNumAndDen = kTRUE;//change default behaviour
527 Rename("wqoslprfctpid","Q_{out}-Q_{side}-Q_{long} Weight Fctn with perfect PID");
529 /*************************************************************/
531 void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
534 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
535 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
537 trackpair = CheckPair(trackpair);
538 if (trackpair == 0x0) return;
539 // partpair = CheckPair(partpair);
540 if (partpair == 0x0) return;
543 Double_t weight = partpair->GetWeight();
544 Double_t out = trackpair->GetQOutLCMS();
545 Double_t side = trackpair->GetQSideLCMS();
546 Double_t lon = trackpair->GetQLongLCMS();
550 out = TMath::Abs(out);
551 side = TMath::Abs(side);
552 lon = TMath::Abs(lon);
554 fNumerator->Fill(out,side,lon,weight);
556 /*************************************************************/
558 void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
561 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
562 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
564 trackpair = CheckPair(trackpair);
565 if (trackpair == 0x0) return;
566 // partpair = CheckPair(partpair);
567 if (partpair == 0x0) return;
569 Double_t out = trackpair->GetQOutLCMS();
570 Double_t side = trackpair->GetQSideLCMS();
571 Double_t lon = trackpair->GetQLongLCMS();
575 out = TMath::Abs(out);
576 side = TMath::Abs(side);
577 lon = TMath::Abs(lon);
579 fDenominator->Fill(out,side,lon);
581 /******************************************************************/
583 TH1* AliHBTWeightQOutSQideQLongFctnPerfectPID::GetResult()
585 //returns the scaled ratio
587 fRatio = GetRatio(Scale());
592 /******************************************************************/
593 /******************************************************************/
594 /******************************************************************/
596 ClassImp(AliHBTQOutSQideQLongFctnPerfectPID)
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)
605 fWriteNumAndDen = kTRUE;//change default behaviour
606 Rename("qoslprfctpid","Q_{out}-Q_{side}-Q_{long} Fctn with perfect PID");
608 /*************************************************************/
610 void AliHBTQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
613 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
614 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
616 trackpair = CheckPair(trackpair);
617 if (trackpair == 0x0) return;
618 // partpair = CheckPair(partpair);
619 if (partpair == 0x0) return;
621 Double_t out = trackpair->GetQOutLCMS();
622 Double_t side = trackpair->GetQSideLCMS();
623 Double_t lon = trackpair->GetQLongLCMS();
627 out = TMath::Abs(out);
628 side = TMath::Abs(side);
629 lon = TMath::Abs(lon);
631 fNumerator->Fill(out,side,lon);
633 /*************************************************************/
635 void AliHBTQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
638 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
639 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
641 trackpair = CheckPair(trackpair);
642 if (trackpair == 0x0) return;
643 // partpair = CheckPair(partpair);
644 if (partpair == 0x0) return;
646 Double_t out = trackpair->GetQOutLCMS();
647 Double_t side = trackpair->GetQSideLCMS();
648 Double_t lon = trackpair->GetQLongLCMS();
652 out = TMath::Abs(out);
653 side = TMath::Abs(side);
654 lon = TMath::Abs(lon);
656 fDenominator->Fill(out,side,lon);
658 /******************************************************************/
660 TH1* AliHBTQOutSQideQLongFctnPerfectPID::GetResult()
662 //returns the scaled ratio
664 fRatio = GetRatio(Scale());
668 /******************************************************************/
669 /******************************************************************/
670 /******************************************************************/
674 ClassImp(AliHBTPairPIDProbVsQInvFctn)
676 AliHBTPairPIDProbVsQInvFctn::AliHBTPairPIDProbVsQInvFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
677 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
679 fWriteNumAndDen = kTRUE;//change default behaviour
680 Rename("qinvpidpur","Q_{inv} Function");
682 /******************************************************************/
684 TH1* AliHBTPairPIDProbVsQInvFctn::GetResult()
686 //returns the scaled ratio
688 fRatio = GetRatio(Scale());
691 /******************************************************************/
693 void AliHBTPairPIDProbVsQInvFctn::ProcessSameEventParticles(AliHBTPair* pair)
695 //Fills the numerator using pair from the same event
696 pair = CheckPair(pair);
697 if(pair) fNumerator->Fill(pair->GetQInv(),pair->GetPIDProb());
699 /******************************************************************/
701 void AliHBTPairPIDProbVsQInvFctn::ProcessDiffEventParticles(AliHBTPair* pair)
703 //Fills the denumerator using mixed pairs
704 pair = CheckPair(pair);
705 if(pair) fDenominator->Fill(pair->GetQInv(),pair->GetPIDProb());
708 /******************************************************************/
709 /******************************************************************/
710 /******************************************************************/
712 ClassImp(AliHBTPairPIDProbVsQOutSQideQLongFctn)
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)
720 fWriteNumAndDen = kTRUE;//change default behaviour
721 Rename("qoslpidpur","Pair PID Probablilty .vs. Q_{out}-Q_{side}-Q_{long} Fctn");
723 /*************************************************************/
725 void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessSameEventParticles(AliHBTPair* pair)
728 pair = CheckPair(pair);
729 if (pair == 0x0) return;
730 Double_t weight = pair->GetPIDProb();
731 Double_t out = pair->GetQOutLCMS();
732 Double_t side = pair->GetQSideLCMS();
733 Double_t lon = pair->GetQLongLCMS();
737 out = TMath::Abs(out);
738 side = TMath::Abs(side);
739 lon = TMath::Abs(lon);
742 fNumerator->Fill(out,side,lon,weight);
744 /*************************************************************/
746 void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair* pair)
749 pair = CheckPair(pair);
750 if (pair == 0x0) return;
751 Double_t weight = pair->GetPIDProb();
752 Double_t out = pair->GetQOutLCMS();
753 Double_t side = pair->GetQSideLCMS();
754 Double_t lon = pair->GetQLongLCMS();
758 out = TMath::Abs(out);
759 side = TMath::Abs(side);
760 lon = TMath::Abs(lon);
763 fDenominator->Fill(out,side,lon,weight);
765 /*************************************************************/
767 TH1* AliHBTPairPIDProbVsQOutSQideQLongFctn::GetResult()
769 //returns the scaled ratio
772 fRatio = GetRatio(Scale());
776 /******************************************************************/
777 /******************************************************************/
778 /******************************************************************/
780 ClassImp(AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID)
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)
789 fWriteNumAndDen = kTRUE;
790 Rename("tteffptthetaphipfctPID","P_{t} \\theta \\phi Two Track Efficiency Function");
793 fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
794 fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
795 fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
800 fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
801 fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
802 fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
805 /******************************************************************/
807 void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
810 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
811 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
813 trackpair = CheckPair(trackpair);
814 if (trackpair == 0x0) return;
815 // partpair = CheckPair(partpair);
816 if (partpair == 0x0) return;
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);
823 /******************************************************************/
825 void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
828 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
829 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
831 trackpair = CheckPair(trackpair);
832 if (trackpair == 0x0) return;
833 // partpair = CheckPair(partpair);
834 if (partpair == 0x0) return;
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);
841 /******************************************************************/
843 TH1* AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::GetResult()
845 //returns ratio of numerator and denominator
847 fRatio = GetRatio(Scale());
850 fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
851 fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
852 fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
856 /******************************************************************/
857 /******************************************************************/
858 /******************************************************************/
860 ClassImp(AliHBTPairPIDProbVsPtThetaPhiFctn)
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)
868 fWriteNumAndDen = kTRUE;//change default behaviour
869 Rename("ptthetaphipidpur","Pair PID Probablilty .vs. \\Delta P_{t}-\\Delta \\theta-\\Delta \\phi Fctn");
872 fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
873 fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
874 fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
879 fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
880 fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
881 fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
885 /*************************************************************/
887 void AliHBTPairPIDProbVsPtThetaPhiFctn::ProcessSameEventParticles(AliHBTPair* pair)
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);
898 /*************************************************************/
900 void AliHBTPairPIDProbVsPtThetaPhiFctn::ProcessDiffEventParticles(AliHBTPair* pair)
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);
911 /*************************************************************/
913 TH1* AliHBTPairPIDProbVsPtThetaPhiFctn::GetResult()
915 //returns the scaled ratio
918 fRatio = GetRatio(Scale());
921 fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
922 fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
923 fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]");