From 0b14d0f4eb09d42784b7daf498963d6d7290a06a Mon Sep 17 00:00:00 2001 From: snelling Date: Tue, 5 Apr 2011 15:20:57 +0000 Subject: [PATCH] add electron rejection --- PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx | 17 ++++++++++++++--- PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx index 79ebfdace45..cdd3789d380 100644 --- a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx +++ b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx @@ -120,7 +120,8 @@ AliFlowTrackCuts::AliFlowTrackCuts(): fParticleID(AliPID::kUnknown), fParticleProbability(.9), fAllowTOFmismatchFlag(kFALSE), - fRequireStrictTOFTPCagreement(kFALSE) + fRequireStrictTOFTPCagreement(kFALSE), + fCutRejectElectronsWithTPCpid(kFALSE) { //io constructor for ( Int_t i=0; i<5; i++ ) { fProbBayes[i]=0.0; } @@ -189,7 +190,8 @@ AliFlowTrackCuts::AliFlowTrackCuts(const char* name): fParticleID(AliPID::kUnknown), fParticleProbability(.9), fAllowTOFmismatchFlag(kFALSE), - fRequireStrictTOFTPCagreement(kFALSE) + fRequireStrictTOFTPCagreement(kFALSE), + fCutRejectElectronsWithTPCpid(kFALSE) { //constructor SetName(name); @@ -266,7 +268,8 @@ AliFlowTrackCuts::AliFlowTrackCuts(const AliFlowTrackCuts& that): fParticleID(that.fParticleID), fParticleProbability(that.fParticleProbability), fAllowTOFmismatchFlag(that.fAllowTOFmismatchFlag), - fRequireStrictTOFTPCagreement(that.fRequireStrictTOFTPCagreement) + fRequireStrictTOFTPCagreement(that.fRequireStrictTOFTPCagreement), + fCutRejectElectronsWithTPCpid(that.fCutRejectElectronsWithTPCpid) { //copy constructor if (that.fTPCpidCuts) fTPCpidCuts = new TMatrixF(*(that.fTPCpidCuts)); @@ -355,6 +358,7 @@ AliFlowTrackCuts& AliFlowTrackCuts::operator=(const AliFlowTrackCuts& that) fParticleProbability=that.fParticleProbability; fAllowTOFmismatchFlag=that.fAllowTOFmismatchFlag; fRequireStrictTOFTPCagreement=that.fRequireStrictTOFTPCagreement; + fCutRejectElectronsWithTPCpid=that.fCutRejectElectronsWithTPCpid; memcpy(fProbBayes,that.fProbBayes,sizeof(fProbBayes)); return *this; @@ -764,6 +768,13 @@ Bool_t AliFlowTrackCuts::PassesESDcuts(AliESDtrack* track) break; } } + if (fCutRejectElectronsWithTPCpid) + { + //reject electrons using standard TPC pid + Double_t pidTPC[AliPID::kSPECIES]; + track->GetTPCpid(pidTPC); + if (pidTPC[AliPID::kElectron]Fill(track->GetP(),beta); diff --git a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h index 7b8328d9e1f..7c1115cd6d2 100644 --- a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h +++ b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h @@ -190,6 +190,7 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts { Bool_t GetAllowTOFmismatchFlag() const {return fAllowTOFmismatchFlag;} void SetRequireStrictTOFTPCagreement(Bool_t b=kTRUE) {fRequireStrictTOFTPCagreement=b;} Bool_t GetRequireStrictTOFTPCagreement() const {return fRequireStrictTOFTPCagreement;} + void SetRejectElectronsWithTPCpid(Bool_t b=kTRUE) {fCutRejectElectronsWithTPCpid=b;} //these should maybe be protected Bool_t PassesCuts(AliVParticle* track); @@ -293,6 +294,7 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts { Double_t fParticleProbability; //desired prob for a particle type Bool_t fAllowTOFmismatchFlag; //allow TOFmismatch flag=1 in ESD Bool_t fRequireStrictTOFTPCagreement; //require stricter than TOFmismatch flag TOF-TPC agreement + Bool_t fCutRejectElectronsWithTPCpid; //reject electrons with TPC pid // part added by F. Noferini static const Int_t fgkPIDptBin = 20; // pT bins for priors -- 2.39.3