+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
#include "AliHBTPIDPurityFctns.h"
+#include "AliLog.h"
+
//_______________________________________________________________________________
/////////////////////////////////////////////////////////////////////////////////
//
//
// file: AliHBTPIDPurityFctns.cxx AliHBTPIDPurityFctns.h
//
-// Caution: On 2D plots on X axis in simulated values
-// That is contrary to two-particle resolutions where it is reconstructed one
+// Classes for calculating PID purity, efficiency and other things connected with PID
+// xxx
+// xxx
//
// added by Piotr.Skowronski@cern.ch
-//
//
//////////////////////////////////////////////////////////////////////////////////
/******************************************************************/
/******************************************************************/
/******************************************************************/
-AliHBTQInvCorrelFctnPerfectPID f;
ClassImp(AliHBTMonPIDPurityVsPtFctn)
}
/******************************************************************/
+AliHBTMonPIDPurityVsPtFctn::AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn& /*in*/):
+ AliHBTMonTwoParticleFctn1D(),
+ AliHBTCorrelFunction(),
+ fGood(0x0),
+ fAll(0x0)
+{
+ //cpy constructor
+ Error("AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn&",
+ "Functions can not be copied because of histogram names clashes");
+}
+
+/******************************************************************/
+
AliHBTMonPIDPurityVsPtFctn::~AliHBTMonPIDPurityVsPtFctn()
{
//dtor
delete fAll;
}
/******************************************************************/
-void AliHBTMonPIDPurityVsPtFctn::Write()
+
+AliHBTMonPIDPurityVsPtFctn& AliHBTMonPIDPurityVsPtFctn::operator=
+ (const AliHBTMonPIDPurityVsPtFctn& /*in*/)
{
+//assigment operator
+ Error("operator=","Functions can not be copied because of histogram names clashes");
+ return *this;
+}
+/******************************************************************/
+
+Int_t AliHBTMonPIDPurityVsPtFctn::Write(const char*,Int_t, Int_t)
+{
+//Writes a fucntion results
AliHBTMonitorFunction::Write();
fGood->Write();
fAll->Write();
+ return 0;
}
/******************************************************************/
void AliHBTMonPIDPurityVsPtFctn::Init()
{
//Initializes fuction
- if (AliHBTParticle::GetDebug()>0) Info("Init","%s",GetName());
+ AliDebug(1,"Entering");
if (fResult == 0x0)
{
- Warning("Init","Function has NULL result histogram!");
+ AliWarning("Function has NULL result histogram!");
return;
}
fAll->SetDirectory(0x0);
fAll->Sumw2();
- if (AliHBTParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
+ AliDebug(1,"Done");
}
/******************************************************************/
}
/******************************************************************/
-void AliHBTMonPIDPurityVsPtFctn::Process(AliHBTParticle * track,AliHBTParticle * part)
+void AliHBTMonPIDPurityVsPtFctn::Process(AliVAODParticle * track,AliVAODParticle * part)
{
//process the particle/track
Double_t pt = part->Pt();
}
/******************************************************************/
+AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn
+ (const AliHBTMonPIDContaminationVsPtFctn& /*in*/):
+ AliHBTMonTwoParticleFctn1D(),
+ AliHBTCorrelFunction(),
+ fWrong(0x0),
+ fAll(0x0)
+{
+ //cpy constructor
+ Error("AliHBTMonPIDContaminationVsPtFctn(const AliHBTMonPIDContaminationVsPtFctn&",
+ "Functions can not be copied because of histogram names clashes");
+}
+
+/******************************************************************/
+
AliHBTMonPIDContaminationVsPtFctn::~AliHBTMonPIDContaminationVsPtFctn()
{
//dtor
}
/******************************************************************/
-void AliHBTMonPIDContaminationVsPtFctn::Write()
+AliHBTMonPIDContaminationVsPtFctn& AliHBTMonPIDContaminationVsPtFctn::operator=
+ (const AliHBTMonPIDContaminationVsPtFctn& /*in*/)
+{
+//assigment operator
+ Error("operator=","Functions can not be copied because of histogram names clashes");
+ return *this;
+}
+/******************************************************************/
+
+Int_t AliHBTMonPIDContaminationVsPtFctn::Write(const char*,Int_t, Int_t)
{
//Writes the function results
AliHBTMonitorFunction::Write();
fWrong->Write();
fAll->Write();
+ return 0;
}
/******************************************************************/
void AliHBTMonPIDContaminationVsPtFctn::Init()
{
//Initializes fuction
- if (AliHBTParticle::GetDebug()>0) Info("Init","%s",GetName());
+ AliDebug(1,"Entering");
if (fResult == 0x0)
{
- Warning("Init","Function has NULL result histogram!");
+ AliWarning("Function has NULL result histogram!");
return;
}
fAll->SetDirectory(0x0);
fAll->Sumw2();
- if (AliHBTParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
+ AliDebug(1,"Done");
}
/******************************************************************/
}
/******************************************************************/
-void AliHBTMonPIDContaminationVsPtFctn::Process(AliHBTParticle * track, AliHBTParticle * part)
+void AliHBTMonPIDContaminationVsPtFctn::Process(AliVAODParticle * track, AliVAODParticle * part)
{
//process the particle/track
Double_t pt = part->Pt();
void AliHBTQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
fNumerator->Fill(trackpair->GetQInv());
void AliHBTQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
fDenominator->Fill(trackpair->GetQInv());
void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
fNumerator->Fill(trackpair->GetQInv(),partpair->GetWeight());
void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
fDenominator->Fill(trackpair->GetQInv());
void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
+
Double_t weight = partpair->GetWeight();
- Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
- Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
- Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+ Double_t out = trackpair->GetQOutLCMS();
+ Double_t side = trackpair->GetQSideLCMS();
+ Double_t lon = trackpair->GetQLongLCMS();
+
+ if (fAbs)
+ {
+ out = TMath::Abs(out);
+ side = TMath::Abs(side);
+ lon = TMath::Abs(lon);
+ }
fNumerator->Fill(out,side,lon,weight);
}
/*************************************************************/
void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
- Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
- Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
- Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+ Double_t out = trackpair->GetQOutLCMS();
+ Double_t side = trackpair->GetQSideLCMS();
+ Double_t lon = trackpair->GetQLongLCMS();
+
+ if (fAbs)
+ {
+ out = TMath::Abs(out);
+ side = TMath::Abs(side);
+ lon = TMath::Abs(lon);
+ }
fDenominator->Fill(out,side,lon);
}
/******************************************************************/
void AliHBTQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
- Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
- Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
- Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+ Double_t out = trackpair->GetQOutLCMS();
+ Double_t side = trackpair->GetQSideLCMS();
+ Double_t lon = trackpair->GetQLongLCMS();
+
+ if (fAbs)
+ {
+ out = TMath::Abs(out);
+ side = TMath::Abs(side);
+ lon = TMath::Abs(lon);
+ }
fNumerator->Fill(out,side,lon);
}
/*************************************************************/
void AliHBTQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
- Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
- Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
- Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+ Double_t out = trackpair->GetQOutLCMS();
+ Double_t side = trackpair->GetQSideLCMS();
+ Double_t lon = trackpair->GetQLongLCMS();
+
+ if (fAbs)
+ {
+ out = TMath::Abs(out);
+ side = TMath::Abs(side);
+ lon = TMath::Abs(lon);
+ }
fDenominator->Fill(out,side,lon);
}
/******************************************************************/
pair = CheckPair(pair);
if (pair == 0x0) return;
Double_t weight = pair->GetPIDProb();
- Double_t out = TMath::Abs(pair->GetQOutCMSLC());
- Double_t side = TMath::Abs(pair->GetQSideCMSLC());
- Double_t lon = TMath::Abs(pair->GetQLongCMSLC());
+ Double_t out = pair->GetQOutLCMS();
+ Double_t side = pair->GetQSideLCMS();
+ Double_t lon = pair->GetQLongLCMS();
+
+ if (fAbs)
+ {
+ out = TMath::Abs(out);
+ side = TMath::Abs(side);
+ lon = TMath::Abs(lon);
+ }
+
fNumerator->Fill(out,side,lon,weight);
}
/*************************************************************/
pair = CheckPair(pair);
if (pair == 0x0) return;
Double_t weight = pair->GetPIDProb();
- Double_t out = TMath::Abs(pair->GetQOutCMSLC());
- Double_t side = TMath::Abs(pair->GetQSideCMSLC());
- Double_t lon = TMath::Abs(pair->GetQLongCMSLC());
+ Double_t out = pair->GetQOutLCMS();
+ Double_t side = pair->GetQSideLCMS();
+ Double_t lon = pair->GetQLongLCMS();
+
+ if (fAbs)
+ {
+ out = TMath::Abs(out);
+ side = TMath::Abs(side);
+ lon = TMath::Abs(lon);
+ }
+
fDenominator->Fill(out,side,lon,weight);
}
/*************************************************************/
//ctor
//Set Axis Title
fWriteNumAndDen = kTRUE;
- Rename("tteffptthetaphi","P_{t} \\theta \\phi Two Track Efficiency Function");
+ Rename("tteffptthetaphipfctPID","P_{t} \\theta \\phi Two Track Efficiency Function");
if(fNumerator)
{
fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
Double_t x = TMath::Abs(trackpair->GetDeltaPt());
void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//Fills numerator
- if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
- if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+ if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+ if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
trackpair = CheckPair(trackpair);
if (trackpair == 0x0) return;
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if (partpair == 0x0) return;
Double_t x = TMath::Abs(trackpair->GetDeltaPt());
{
//ctor
fWriteNumAndDen = kTRUE;//change default behaviour
- Rename("qptthetaphipidpur","Pair PID Probablilty .vs. \\Delta P_{t}-\\Delta \\theta-\\Delta \\phi Fctn");
+ Rename("ptthetaphipidpur","Pair PID Probablilty .vs. \\Delta P_{t}-\\Delta \\theta-\\Delta \\phi Fctn");
if(fNumerator)
{
fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");