extra trigger cut
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Nov 2010 13:54:06 +0000 (13:54 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Nov 2010 13:54:06 +0000 (13:54 +0000)
PWG2/FLOW/AliFlowTasks/AliFlowEventCuts.cxx
PWG2/FLOW/AliFlowTasks/AliFlowEventCuts.h

index 5772078..1dc9e2a 100644 (file)
@@ -61,7 +61,8 @@ AliFlowEventCuts::AliFlowEventCuts():
   fNContributorsMin(INT_MIN),
   fCutMeanPt(kFALSE),
   fMeanPtMax(-DBL_MAX),
-  fMeanPtMin(DBL_MAX)
+  fMeanPtMin(DBL_MAX),
+  fCutSPDvertexerAnomaly(kTRUE)
 {
   //constructor 
 }
@@ -92,7 +93,8 @@ AliFlowEventCuts::AliFlowEventCuts(const char* name, const char* title):
   fNContributorsMin(INT_MIN),
   fCutMeanPt(kFALSE),
   fMeanPtMax(-DBL_MAX),
-  fMeanPtMin(DBL_MAX)
+  fMeanPtMin(DBL_MAX),
+  fCutSPDvertexerAnomaly(kTRUE)
 {
   //constructor 
 }
@@ -123,7 +125,8 @@ AliFlowEventCuts::AliFlowEventCuts(const AliFlowEventCuts& that):
   fNContributorsMin(that.fNContributorsMin),
   fCutMeanPt(that.fCutMeanPt),
   fMeanPtMax(that.fMeanPtMax),
-  fMeanPtMin(that.fMeanPtMin)
+  fMeanPtMin(that.fMeanPtMin),
+  fCutSPDvertexerAnomaly(that.fCutSPDvertexerAnomaly)
 {
   //copy constructor 
   if (that.fRefMultCuts)
@@ -166,6 +169,7 @@ AliFlowEventCuts& AliFlowEventCuts::operator=(const AliFlowEventCuts& that)
   fCutMeanPt=that.fCutMeanPt;
   fMeanPtMax=that.fMeanPtMax;
   fMeanPtMin=that.fMeanPtMin;
+  fCutSPDvertexerAnomaly=that.fCutSPDvertexerAnomaly;
   return *this;
 }
 
@@ -234,6 +238,19 @@ Bool_t AliFlowEventCuts::PassesCuts(const AliVEvent *event)
     meanpt=meanpt/nselected;
     if (meanpt<fMeanPtMin || meanpt >= fMeanPtMax) return kFALSE;
   }
+  const AliESDEvent* esdevent = dynamic_cast<const AliESDEvent*>(event);
+  if (fCutSPDvertexerAnomaly&&esdevent)
+  {
+    const AliESDVertex* sdpvertex = esdevent->GetPrimaryVertexSPD();
+    if (sdpvertex->GetNContributors()<1) return kFALSE;
+    if (sdpvertex->GetDispersion()>0.04) return kFALSE;
+    if (sdpvertex->GetZRes()>0.25) return kFALSE;
+    const AliESDVertex* tpcvertex = esdevent->GetPrimaryVertexTPC();
+    if (tpcvertex->GetNContributors()<1) return kFALSE;
+    const AliMultiplicity* tracklets = esdevent->GetMultiplicity();
+    if (tpcvertex->GetNContributors()<(-10.0+0.25*tracklets->GetNumberOfITSClusters(0)))
+      return kFALSE;
+  }
   return kTRUE;
 }
 
@@ -271,8 +288,7 @@ Int_t AliFlowEventCuts::RefMult(const AliVEvent* event)
         if (!esdevent) return 0;
         vzero=esdevent->GetVZEROData();
         if (!vzero) return 0;
-        refmult += TMath::Nint(vzero->GetMTotV0A());
-        refmult += TMath::Nint(vzero->GetMTotV0C());
+        refmult = TMath::Nint(vzero->GetMTotV0A()+vzero->GetMTotV0C());
         return refmult;
       case kSPD1clusters:
         if (!mult) return 0;
index 833f16c..ea33645 100644 (file)
@@ -48,6 +48,7 @@ class AliFlowEventCuts : public TNamed {
   void SetNContributorsRange(Int_t min, Int_t max=INT_MAX) 
        {fCutNContributors=kTRUE; fNContributorsMin=min; fNContributorsMax=max;}
   void SetMeanPtRange(Double_t min, Double_t max) {fCutMeanPt=kTRUE; fMeanPtMax=max; fMeanPtMin=min;}
+  void SetCutSPDvertexerAnomaly(Bool_t b) {fCutSPDvertexerAnomaly=b;}
 
   Int_t GetNumberOfTracksMax() const {return fNumberOfTracksMax;}
   Int_t GetNumberOfTracksMin() const {return fNumberOfTracksMin;}
@@ -88,6 +89,7 @@ class AliFlowEventCuts : public TNamed {
   Bool_t fCutMeanPt; //cut on mean pt
   Double_t fMeanPtMax; //max mean pt
   Double_t fMeanPtMin; //min mean pt
+  Bool_t fCutSPDvertexerAnomaly; //cut on the spd vertexer anomaly
 
 
   ClassDef(AliFlowEventCuts,2)