]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
extra AOD cuts
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Jan 2011 20:12:30 +0000 (20:12 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Jan 2011 20:12:30 +0000 (20:12 +0000)
PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx
PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h

index 36982630d5d514d645c1388ae0b48b136aaa2788..d600c979a731bc8bb177c1cf29cdab91ecf4fd77 100644 (file)
@@ -85,6 +85,8 @@ AliFlowTrackCuts::AliFlowTrackCuts():
   fCutNClustersITS(kFALSE),
   fNClustersITSMax(INT_MAX),
   fNClustersITSMin(INT_MIN),  
+  fUseAODFilterBit(kFALSE),
+  fAODFilterBit(0),
   fParamType(kGlobal),
   fParamMix(kPure),
   fTrack(NULL),
@@ -136,7 +138,9 @@ AliFlowTrackCuts::AliFlowTrackCuts(const char* name):
   fNClustersTPCMin(INT_MIN),  
   fCutNClustersITS(kFALSE),
   fNClustersITSMax(INT_MAX),
-  fNClustersITSMin(INT_MIN),  
+  fNClustersITSMin(INT_MIN),
+  fUseAODFilterBit(kFALSE),
+  fAODFilterBit(0),
   fParamType(kGlobal),
   fParamMix(kPure),
   fTrack(NULL),
@@ -197,6 +201,8 @@ AliFlowTrackCuts::AliFlowTrackCuts(const AliFlowTrackCuts& that):
   fCutNClustersITS(that.fCutNClustersITS),
   fNClustersITSMax(that.fNClustersITSMax),
   fNClustersITSMin(that.fNClustersITSMin),
+  fUseAODFilterBit(that.fUseAODFilterBit),
+  fAODFilterBit(that.fAODFilterBit),
   fParamType(that.fParamType),
   fParamMix(that.fParamMix),
   fTrack(NULL),
@@ -522,6 +528,20 @@ Bool_t AliFlowTrackCuts::PassesAODcuts(AliAODTrack* track)
     Int_t nitscls = track->GetITSNcls();
     if (nitscls < fNClustersITSMin || nitscls > fNClustersITSMax) pass=kFALSE;
   }
+  
+   if (fCutChi2PerClusterTPC)
+  {
+    Double_t chi2tpc = track->Chi2perNDF();
+    if (chi2tpc < fMinChi2PerClusterTPC || chi2tpc > fMaxChi2PerClusterTPC) pass=kFALSE;
+  }
+  
+  if (GetRequireTPCRefit() && !(track->GetStatus() & AliESDtrack::kTPCrefit) ) pass=kFALSE;
+  if (GetRequireITSRefit() && !(track->GetStatus() & AliESDtrack::kITSrefit) ) pass=kFALSE;
+  
+  if (fUseAODFilterBit && !track->TestFilterBit(fAODFilterBit)) pass=kFALSE;
+  
+  if (GetMaxDCAToVertexXY() && track->DCA()>GetMaxDCAToVertexXY()) pass=kFALSE;
+    
 
   return pass;
 }
index 7b0c1da2d6501cab636ef12092d4403b44e72f48..ce44a875538ecaf490c45e59c727c44f304aada7 100644 (file)
@@ -71,7 +71,9 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts {
   void SetSPDtrackletDeltaPhiMin( Double_t m ) {fSPDtrackletDeltaPhiMin=m; fCutSPDtrackletDeltaPhi=kTRUE;}
   void SetIgnoreSignInPID( Bool_t b ) {fIgnoreSignInPID=b;}
   void SetIgnoreTPCzRange( Double_t min, Double_t max ) 
-                         { fIgnoreTPCzRange=kTRUE; fIgnoreTPCzRangeMin=min; fIgnoreTPCzRangeMax=max; } 
+                         { fIgnoreTPCzRange=kTRUE; fIgnoreTPCzRangeMin=min; fIgnoreTPCzRangeMax=max; }
+  void SetAODfilterBit( UInt_t a ) {fAODFilterBit = a; fUseAODFilterBit = kTRUE;}                                               
+                                                
 
   Int_t GetMinNClustersTPC() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMinNClusterTPC();}
   Int_t GetMinNClustersITS() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMinNClustersITS();}
@@ -96,7 +98,8 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts {
   Bool_t GetFakesAreOK() const {return fFakesAreOK;}
   Double_t GetSPDtrackletDeltaPhiMax() const {return fSPDtrackletDeltaPhiMax;}
   Double_t GetSPDtrackletDeltaPhiMin() const {return fSPDtrackletDeltaPhiMin;}
-
+  UInt_t GetAODFilterBit() const {if (!fUseAODFilterBit) return 0; return fAODFilterBit;}
   void SetQA(const char* dirname);
   TObjArray* GetQA() const {return fQA;}
 
@@ -188,6 +191,8 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts {
   Bool_t fCutNClustersITS;       //cut on clusters?
   Int_t fNClustersITSMax;        //max tpc ncls
   Int_t fNClustersITSMin;        //min tpc clusters  
+  Bool_t fUseAODFilterBit;       //use AOD filter bit selection?
+  UInt_t fAODFilterBit;          //AOD filter bit to select
 
   trackParameterType fParamType;     //parameter type tu cut on
   trackParameterMix fParamMix;       //parameter mixing
@@ -220,4 +225,3 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts {
 
 #endif
 
-