]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
add electron rejection
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Apr 2011 15:20:57 +0000 (15:20 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Apr 2011 15:20:57 +0000 (15:20 +0000)
PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx
PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h

index 79ebfdace4512067b28bb063a18d78d3fadcff40..cdd3789d3803b1504ce6ffa3bef944c3b993804b 100644 (file)
@@ -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]<fParticleProbability) pass=kFALSE;
+  }
   if (fQA)
   {
     if (pass) QAafter(0)->Fill(track->GetP(),beta);
index 7b8328d9e1f9e53db9321a1d1e70c4ac816ef9bb..7c1115cd6d2e363c838173844b39e402d95fc60b 100644 (file)
@@ -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