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 Int_t AliHBTMonPIDPurityVsPtFctn::Write(const char*,Int_t, Int_t)
87 //Writes a fucntion results
88 AliHBTMonitorFunction::Write();
93 /******************************************************************/
95 void AliHBTMonPIDPurityVsPtFctn::Init()
98 AliDebug(1,"Entering");
102 AliWarning("Function has NULL result histogram!");
108 TString numstr = fName + " Good"; //title and name of the
110 TAxis* xax = fResult->GetXaxis();
111 fGood = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
116 TString numstr = fName + " All"; //title and name of the
118 TAxis* xax = fResult->GetXaxis();
119 fAll = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
123 fResult->SetDirectory(0x0);
126 fGood->SetDirectory(0x0);
129 fAll->SetDirectory(0x0);
135 /******************************************************************/
137 void AliHBTMonPIDPurityVsPtFctn::Rename(const Char_t * name)
139 //Rename fuctions and all histograms belonging to it
145 TString numstr = fName + " Result"; //title and name of the result histogram
146 fResult->SetName(numstr);
147 fResult->SetTitle(numstr);
152 TString numstr = fName + " Good";
153 fGood->SetName(numstr);
154 fGood->SetTitle(numstr);
159 TString numstr = fName + " All";
160 fAll->SetName(numstr);
161 fAll->SetTitle(numstr);
164 /******************************************************************/
166 void AliHBTMonPIDPurityVsPtFctn::Rename(const Char_t * name, const Char_t * title)
168 //renames and retitle the function and histograms
175 TString numstrn = fName + " Result"; //name of the result histogram
176 TString numstrt = fTitle + " Result"; //title of the result histogram
177 fResult->SetName(numstrn);
178 fResult->SetTitle(numstrt);
182 TString numstrn = fName + " Good"; //name of the Good histogram
183 TString numstrt = fTitle + " Good"; //title of the Good histogram
184 fGood->SetName(numstrn);
185 fGood->SetTitle(numstrt);
190 TString numstrn = fName + " All"; //name of the All histogram
191 TString numstrt = fTitle + " All"; //title of the All histogram
192 fAll->SetName(numstrn);
193 fAll->SetTitle(numstrt);
197 /******************************************************************/
199 TH1* AliHBTMonPIDPurityVsPtFctn::GetResult()
201 //Returns the result of the fuction
202 //that is histogram with effciency and contamination
204 fResult->Divide(fGood,fAll);
207 /******************************************************************/
209 void AliHBTMonPIDPurityVsPtFctn::Process(AliVAODParticle * track,AliVAODParticle * part)
211 //process the particle/track
212 Double_t pt = part->Pt();
214 if (track->GetPdgCode() == part->GetPdgCode())
220 // Info("Process","Catched pid impurity ...");
224 /******************************************************************/
225 /******************************************************************/
226 /******************************************************************/
228 ClassImp(AliHBTMonPIDContaminationVsPtFctn)
230 AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
231 AliHBTMonTwoParticleFctn1D(nbins,maxXval,minXval),
236 Rename("pidcontaminationvspt","PIDContaminationVsPt");
238 /******************************************************************/
240 AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn
241 (const AliHBTMonPIDContaminationVsPtFctn& /*in*/):
242 AliHBTMonTwoParticleFctn1D(),
243 AliHBTCorrelFunction(),
248 Error("AliHBTMonPIDContaminationVsPtFctn(const AliHBTMonPIDContaminationVsPtFctn&",
249 "Functions can not be copied because of histogram names clashes");
252 /******************************************************************/
254 AliHBTMonPIDContaminationVsPtFctn::~AliHBTMonPIDContaminationVsPtFctn()
260 /******************************************************************/
262 AliHBTMonPIDContaminationVsPtFctn& AliHBTMonPIDContaminationVsPtFctn::operator=
263 (const AliHBTMonPIDContaminationVsPtFctn& /*in*/)
266 Error("operator=","Functions can not be copied because of histogram names clashes");
269 /******************************************************************/
271 Int_t AliHBTMonPIDContaminationVsPtFctn::Write(const char*,Int_t, Int_t)
273 //Writes the function results
274 AliHBTMonitorFunction::Write();
279 /******************************************************************/
281 void AliHBTMonPIDContaminationVsPtFctn::Init()
283 //Initializes fuction
284 AliDebug(1,"Entering");
288 AliWarning("Function has NULL result histogram!");
294 TString numstr = fName + " Wrong"; //title and name of the
296 TAxis* xax = fResult->GetXaxis();
297 fWrong = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
302 TString numstr = fName + " All"; //title and name of the
304 TAxis* xax = fResult->GetXaxis();
305 fAll = new TH1D(numstr,numstr,xax->GetNbins(),xax->GetXmin(),xax->GetXmax());
308 fResult->SetDirectory(0x0);
311 fWrong->SetDirectory(0x0);
314 fAll->SetDirectory(0x0);
320 /******************************************************************/
322 void AliHBTMonPIDContaminationVsPtFctn::Rename(const Char_t * name)
324 //Rename fuctions and all histograms belonging to it
330 TString numstr = fName + " Result"; //title and name of the result histogram
331 fResult->SetName(numstr);
332 fResult->SetTitle(numstr);
336 TString numstr = fName + " Wrong";
337 fWrong->SetName(numstr);
338 fWrong->SetTitle(numstr);
343 TString numstrn = fName + " All"; //name of the All histogram
344 TString numstrt = fTitle + " All"; //title of the All histogram
345 fAll->SetName(numstrn);
346 fAll->SetTitle(numstrt);
349 /******************************************************************/
351 void AliHBTMonPIDContaminationVsPtFctn::Rename(const Char_t * name, const Char_t * title)
353 //renames and retitle the function and histograms
360 TString numstrn = fName + " Result"; //name of the result histogram
361 TString numstrt = fTitle + " Result"; //title of the result histogram
362 fResult->SetName(numstrn);
363 fResult->SetTitle(numstrt);
367 TString numstrn = fName + " Wrong"; //name of the Wrong histogram
368 TString numstrt = fTitle + " Wrong"; //title of the Wrong histogram
369 fWrong->SetName(numstrn);
370 fWrong->SetTitle(numstrt);
375 TString numstr = fName + " All";
376 fAll->SetName(numstr);
377 fAll->SetTitle(numstr);
381 /******************************************************************/
383 TH1* AliHBTMonPIDContaminationVsPtFctn::GetResult()
385 //Returns the result of the fuction
386 //that is histogram with effciency and contamination
388 fResult->Divide(fWrong,fAll);
391 /******************************************************************/
393 void AliHBTMonPIDContaminationVsPtFctn::Process(AliVAODParticle * track, AliVAODParticle * part)
395 //process the particle/track
396 Double_t pt = part->Pt();
399 if (track->GetPdgCode() != part->GetPdgCode())
401 // Info("Process","Catched contamination");
402 // track->Print();part->Print();
407 /******************************************************************/
408 /******************************************************************/
409 /******************************************************************/
410 ClassImp(AliHBTQInvCorrelFctnPerfectPID)
412 AliHBTQInvCorrelFctnPerfectPID::AliHBTQInvCorrelFctnPerfectPID(Int_t nbins, Double_t maxXval, Double_t minXval):
413 AliHBTTwoPairFctn1D(nbins,maxXval,minXval)
416 fWriteNumAndDen = kTRUE;//change default behaviour
417 Rename("qinvcfprfctpid","Q_{inv} Correlation Function Perfect PID");
419 /*************************************************************/
421 void AliHBTQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
424 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
425 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
427 trackpair = CheckPair(trackpair);
428 if (trackpair == 0x0) return;
429 // partpair = CheckPair(partpair);
430 if (partpair == 0x0) return;
432 fNumerator->Fill(trackpair->GetQInv());
435 /*************************************************************/
436 void AliHBTQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
439 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
440 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
442 trackpair = CheckPair(trackpair);
443 if (trackpair == 0x0) return;
444 // partpair = CheckPair(partpair);
445 if (partpair == 0x0) return;
447 fDenominator->Fill(trackpair->GetQInv());
449 /*************************************************************/
451 TH1* AliHBTQInvCorrelFctnPerfectPID::GetResult()
453 //returns the scaled ratio
456 fRatio = GetRatio(Scale());
459 /*************************************************************/
460 /******************************************************************/
461 /******************************************************************/
462 /******************************************************************/
464 ClassImp(AliHBTWeightQInvCorrelFctnPerfectPID)
466 AliHBTWeightQInvCorrelFctnPerfectPID::AliHBTWeightQInvCorrelFctnPerfectPID(Int_t nbins, Double_t maxXval, Double_t minXval):
467 AliHBTTwoPairFctn1D(nbins,maxXval,minXval)
470 fWriteNumAndDen = kTRUE;//change default behaviour
471 Rename("wqinvcfprfctpid","Q_{inv} Weight Correlation Function Perfect PID");
473 /*************************************************************/
475 void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
478 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
479 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
481 trackpair = CheckPair(trackpair);
482 if (trackpair == 0x0) return;
483 // partpair = CheckPair(partpair);
484 if (partpair == 0x0) return;
486 fNumerator->Fill(trackpair->GetQInv(),partpair->GetWeight());
489 /*************************************************************/
490 void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
493 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
494 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
496 trackpair = CheckPair(trackpair);
497 if (trackpair == 0x0) return;
498 // partpair = CheckPair(partpair);
499 if (partpair == 0x0) return;
501 fDenominator->Fill(trackpair->GetQInv());
503 /*************************************************************/
505 TH1* AliHBTWeightQInvCorrelFctnPerfectPID::GetResult()
507 //returns the scaled ratio
510 fRatio = GetRatio(Scale());
515 /******************************************************************/
516 /******************************************************************/
517 /******************************************************************/
519 ClassImp(AliHBTWeightQOutSQideQLongFctnPerfectPID)
521 AliHBTWeightQOutSQideQLongFctnPerfectPID::AliHBTWeightQOutSQideQLongFctnPerfectPID
522 (Int_t nXbins, Double_t maxXval, Double_t minXval,
523 Int_t nYbins, Double_t maxYval, Double_t minYval,
524 Int_t nZbins, Double_t maxZval, Double_t minZval):
525 AliHBTTwoPairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
528 fWriteNumAndDen = kTRUE;//change default behaviour
529 Rename("wqoslprfctpid","Q_{out}-Q_{side}-Q_{long} Weight Fctn with perfect PID");
531 /*************************************************************/
533 void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
536 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
537 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
539 trackpair = CheckPair(trackpair);
540 if (trackpair == 0x0) return;
541 // partpair = CheckPair(partpair);
542 if (partpair == 0x0) return;
545 Double_t weight = partpair->GetWeight();
546 Double_t out = trackpair->GetQOutLCMS();
547 Double_t side = trackpair->GetQSideLCMS();
548 Double_t lon = trackpair->GetQLongLCMS();
552 out = TMath::Abs(out);
553 side = TMath::Abs(side);
554 lon = TMath::Abs(lon);
556 fNumerator->Fill(out,side,lon,weight);
558 /*************************************************************/
560 void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
563 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
564 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
566 trackpair = CheckPair(trackpair);
567 if (trackpair == 0x0) return;
568 // partpair = CheckPair(partpair);
569 if (partpair == 0x0) return;
571 Double_t out = trackpair->GetQOutLCMS();
572 Double_t side = trackpair->GetQSideLCMS();
573 Double_t lon = trackpair->GetQLongLCMS();
577 out = TMath::Abs(out);
578 side = TMath::Abs(side);
579 lon = TMath::Abs(lon);
581 fDenominator->Fill(out,side,lon);
583 /******************************************************************/
585 TH1* AliHBTWeightQOutSQideQLongFctnPerfectPID::GetResult()
587 //returns the scaled ratio
589 fRatio = GetRatio(Scale());
594 /******************************************************************/
595 /******************************************************************/
596 /******************************************************************/
598 ClassImp(AliHBTQOutSQideQLongFctnPerfectPID)
600 AliHBTQOutSQideQLongFctnPerfectPID::AliHBTQOutSQideQLongFctnPerfectPID
601 (Int_t nXbins, Double_t maxXval, Double_t minXval,
602 Int_t nYbins, Double_t maxYval, Double_t minYval,
603 Int_t nZbins, Double_t maxZval, Double_t minZval):
604 AliHBTTwoPairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
607 fWriteNumAndDen = kTRUE;//change default behaviour
608 Rename("qoslprfctpid","Q_{out}-Q_{side}-Q_{long} Fctn with perfect PID");
610 /*************************************************************/
612 void AliHBTQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
615 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
616 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
618 trackpair = CheckPair(trackpair);
619 if (trackpair == 0x0) return;
620 // partpair = CheckPair(partpair);
621 if (partpair == 0x0) return;
623 Double_t out = trackpair->GetQOutLCMS();
624 Double_t side = trackpair->GetQSideLCMS();
625 Double_t lon = trackpair->GetQLongLCMS();
629 out = TMath::Abs(out);
630 side = TMath::Abs(side);
631 lon = TMath::Abs(lon);
633 fNumerator->Fill(out,side,lon);
635 /*************************************************************/
637 void AliHBTQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
640 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
641 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
643 trackpair = CheckPair(trackpair);
644 if (trackpair == 0x0) return;
645 // partpair = CheckPair(partpair);
646 if (partpair == 0x0) return;
648 Double_t out = trackpair->GetQOutLCMS();
649 Double_t side = trackpair->GetQSideLCMS();
650 Double_t lon = trackpair->GetQLongLCMS();
654 out = TMath::Abs(out);
655 side = TMath::Abs(side);
656 lon = TMath::Abs(lon);
658 fDenominator->Fill(out,side,lon);
660 /******************************************************************/
662 TH1* AliHBTQOutSQideQLongFctnPerfectPID::GetResult()
664 //returns the scaled ratio
666 fRatio = GetRatio(Scale());
670 /******************************************************************/
671 /******************************************************************/
672 /******************************************************************/
676 ClassImp(AliHBTPairPIDProbVsQInvFctn)
678 AliHBTPairPIDProbVsQInvFctn::AliHBTPairPIDProbVsQInvFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
679 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
681 fWriteNumAndDen = kTRUE;//change default behaviour
682 Rename("qinvpidpur","Q_{inv} Function");
684 /******************************************************************/
686 TH1* AliHBTPairPIDProbVsQInvFctn::GetResult()
688 //returns the scaled ratio
690 fRatio = GetRatio(Scale());
693 /******************************************************************/
695 void AliHBTPairPIDProbVsQInvFctn::ProcessSameEventParticles(AliHBTPair* pair)
697 //Fills the numerator using pair from the same event
698 pair = CheckPair(pair);
699 if(pair) fNumerator->Fill(pair->GetQInv(),pair->GetPIDProb());
701 /******************************************************************/
703 void AliHBTPairPIDProbVsQInvFctn::ProcessDiffEventParticles(AliHBTPair* pair)
705 //Fills the denumerator using mixed pairs
706 pair = CheckPair(pair);
707 if(pair) fDenominator->Fill(pair->GetQInv(),pair->GetPIDProb());
710 /******************************************************************/
711 /******************************************************************/
712 /******************************************************************/
714 ClassImp(AliHBTPairPIDProbVsQOutSQideQLongFctn)
716 AliHBTPairPIDProbVsQOutSQideQLongFctn::AliHBTPairPIDProbVsQOutSQideQLongFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
717 Int_t nYbins, Double_t maxYval, Double_t minYval,
718 Int_t nZbins, Double_t maxZval, Double_t minZval):
719 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
722 fWriteNumAndDen = kTRUE;//change default behaviour
723 Rename("qoslpidpur","Pair PID Probablilty .vs. Q_{out}-Q_{side}-Q_{long} Fctn");
725 /*************************************************************/
727 void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessSameEventParticles(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 fNumerator->Fill(out,side,lon,weight);
746 /*************************************************************/
748 void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair* pair)
751 pair = CheckPair(pair);
752 if (pair == 0x0) return;
753 Double_t weight = pair->GetPIDProb();
754 Double_t out = pair->GetQOutLCMS();
755 Double_t side = pair->GetQSideLCMS();
756 Double_t lon = pair->GetQLongLCMS();
760 out = TMath::Abs(out);
761 side = TMath::Abs(side);
762 lon = TMath::Abs(lon);
765 fDenominator->Fill(out,side,lon,weight);
767 /*************************************************************/
769 TH1* AliHBTPairPIDProbVsQOutSQideQLongFctn::GetResult()
771 //returns the scaled ratio
774 fRatio = GetRatio(Scale());
778 /******************************************************************/
779 /******************************************************************/
780 /******************************************************************/
782 ClassImp(AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID)
784 AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID(Int_t nXbins, Double_t maxXval, Double_t minXval,
785 Int_t nYbins, Double_t maxYval, Double_t minYval,
786 Int_t nZbins, Double_t maxZval, Double_t minZval):
787 AliHBTTwoPairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
791 fWriteNumAndDen = kTRUE;
792 Rename("tteffptthetaphipfctPID","P_{t} \\theta \\phi Two Track Efficiency Function");
795 fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
796 fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
797 fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
802 fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
803 fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
804 fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
807 /******************************************************************/
809 void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
812 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
813 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
815 trackpair = CheckPair(trackpair);
816 if (trackpair == 0x0) return;
817 // partpair = CheckPair(partpair);
818 if (partpair == 0x0) return;
820 Double_t x = TMath::Abs(trackpair->GetDeltaPt());
821 Double_t y = TMath::Abs(trackpair->GetDeltaTheta());
822 Double_t z = TMath::Abs(trackpair->GetDeltaPhi());
823 fNumerator->Fill(x,y,z);
825 /******************************************************************/
827 void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
830 if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
831 if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
833 trackpair = CheckPair(trackpair);
834 if (trackpair == 0x0) return;
835 // partpair = CheckPair(partpair);
836 if (partpair == 0x0) return;
838 Double_t x = TMath::Abs(trackpair->GetDeltaPt());
839 Double_t y = TMath::Abs(trackpair->GetDeltaTheta());
840 Double_t z = TMath::Abs(trackpair->GetDeltaPhi());
841 fDenominator->Fill(x,y,z);
843 /******************************************************************/
845 TH1* AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::GetResult()
847 //returns ratio of numerator and denominator
849 fRatio = GetRatio(Scale());
852 fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
853 fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
854 fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
858 /******************************************************************/
859 /******************************************************************/
860 /******************************************************************/
862 ClassImp(AliHBTPairPIDProbVsPtThetaPhiFctn)
864 AliHBTPairPIDProbVsPtThetaPhiFctn::AliHBTPairPIDProbVsPtThetaPhiFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
865 Int_t nYbins, Double_t maxYval, Double_t minYval,
866 Int_t nZbins, Double_t maxZval, Double_t minZval):
867 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
870 fWriteNumAndDen = kTRUE;//change default behaviour
871 Rename("ptthetaphipidpur","Pair PID Probablilty .vs. \\Delta P_{t}-\\Delta \\theta-\\Delta \\phi Fctn");
874 fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
875 fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
876 fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
881 fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
882 fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
883 fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
887 /*************************************************************/
889 void AliHBTPairPIDProbVsPtThetaPhiFctn::ProcessSameEventParticles(AliHBTPair* pair)
892 pair = CheckPair(pair);
893 if (pair == 0x0) return;
894 Double_t weight = pair->GetPIDProb();
895 Double_t pt = TMath::Abs(pair->GetDeltaPt());
896 Double_t theta = TMath::Abs(pair->GetDeltaTheta());
897 Double_t phi = TMath::Abs(pair->GetDeltaPhi());
898 fNumerator->Fill(pt,theta,phi,weight);
900 /*************************************************************/
902 void AliHBTPairPIDProbVsPtThetaPhiFctn::ProcessDiffEventParticles(AliHBTPair* pair)
905 pair = CheckPair(pair);
906 if (pair == 0x0) return;
907 Double_t weight = pair->GetPIDProb();
908 Double_t pt = TMath::Abs(pair->GetDeltaPt());
909 Double_t phi = TMath::Abs(pair->GetDeltaTheta());
910 Double_t theta = TMath::Abs(pair->GetDeltaPhi());
911 fDenominator->Fill(pt,theta,phi,weight);
913 /*************************************************************/
915 TH1* AliHBTPairPIDProbVsPtThetaPhiFctn::GetResult()
917 //returns the scaled ratio
920 fRatio = GetRatio(Scale());
923 fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
924 fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
925 fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]");