From 6839b65914a54fe2758467b44b2b5d5269ebd884 Mon Sep 17 00:00:00 2001 From: zampolli Date: Tue, 18 Nov 2014 18:19:53 +0100 Subject: [PATCH] Flag added to allow to switch off the new feature of TOF mismatch in the probability computation (F. Noferini) --- STEER/STEERBase/AliPIDResponse.cxx | 9 ++++++--- STEER/STEERBase/AliPIDResponse.h | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/STEER/STEERBase/AliPIDResponse.cxx b/STEER/STEERBase/AliPIDResponse.cxx index 5c8e5a4c220..cfd7ef88db6 100644 --- a/STEER/STEERBase/AliPIDResponse.cxx +++ b/STEER/STEERBase/AliPIDResponse.cxx @@ -98,7 +98,8 @@ fHMPIDPIDParams(NULL), fEMCALPIDParams(NULL), fCurrentEvent(NULL), fCurrCentrality(0.0), -fBeamTypeNum(kPP) +fBeamTypeNum(kPP), +fNoTOFmism(kFALSE) { // // default ctor @@ -165,7 +166,8 @@ fHMPIDPIDParams(NULL), fEMCALPIDParams(NULL), fCurrentEvent(NULL), fCurrCentrality(0.0), -fBeamTypeNum(kPP) +fBeamTypeNum(kPP), +fNoTOFmism(other.fNoTOFmism) { // // copy ctor @@ -222,6 +224,7 @@ AliPIDResponse& AliPIDResponse::operator=(const AliPIDResponse &other) fTOFPIDParams=NULL; fHMPIDPIDParams=NULL; fCurrentEvent=other.fCurrentEvent; + fNoTOFmism = other.fNoTOFmism; } return *this; @@ -2412,7 +2415,7 @@ AliPIDResponse::EDetPidStatus AliPIDResponse::GetComputeTOFProbability (const A // isMC --> fIsMC Float_t pt = track->Pt(); Float_t mismPropagationFactor[10] = {1.,1.,1.,1.,1.,1.,1.,1.,1.,1.}; - if(! kNoMism){ // this flag allows to disable mismatch for iterative procedure to get priors + if(! (kNoMism | fNoTOFmism)){ // this flag allows to disable mismatch for iterative procedure to get priors mismPropagationFactor[3] = 1 + TMath::Exp(1 - 1.12*pt);// it has to be alligned with the one in AliPIDCombined mismPropagationFactor[4] = 1 + 1./(4.71114 - 5.72372*pt + 2.94715*pt*pt);// it has to be alligned with the one in AliPIDCombined diff --git a/STEER/STEERBase/AliPIDResponse.h b/STEER/STEERBase/AliPIDResponse.h index 89acd222b0e..130820a2e37 100644 --- a/STEER/STEERBase/AliPIDResponse.h +++ b/STEER/STEERBase/AliPIDResponse.h @@ -189,6 +189,7 @@ public: EBeamType GetBeamType() const {return fBeamTypeNum;}; + void SetNoTOFmism(Bool_t value=kTRUE){fNoTOFmism=value;}; protected: AliITSPIDResponse fITSResponse; //PID response function of the ITS @@ -259,6 +260,8 @@ private: EBeamType fBeamTypeNum; //! beam type enum + Bool_t fNoTOFmism; //! flag to switch off the TOF mismatch in the TOF weights (to check with old aliroot version) + void ExecNewRun(); // @@ -341,7 +344,7 @@ private: EDetPidStatus GetPHOSPIDStatus(const AliVTrack *track) const; EDetPidStatus GetEMCALPIDStatus(const AliVTrack *track) const; - ClassDef(AliPIDResponse, 13); //PID response handling + ClassDef(AliPIDResponse, 14); //PID response handling }; #endif -- 2.43.0