Possibility to reject events with pileup according to SPD
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Jun 2011 13:53:06 +0000 (13:53 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Jun 2011 13:53:06 +0000 (13:53 +0000)
PWG1/ITS/AliAnalysisTaskITSTrackingCheck.cxx
PWG1/ITS/AliAnalysisTaskITSTrackingCheck.h

index b1179b3..d3cc9b2 100644 (file)
@@ -67,6 +67,7 @@ fReadRPLabels(kFALSE),
 fFillNtuples(kFALSE),
 fUseITSSAforNtuples(kFALSE),
 fUsePhysSel(kFALSE),
+fRejPileupSPD(kFALSE),
 fESD(0), 
 fMinMult(0),
 fMaxMult(1000000),
@@ -314,6 +315,7 @@ fReadRPLabels(kFALSE),
 fFillNtuples(kFALSE),
 fUseITSSAforNtuples(kFALSE),
 fUsePhysSel(kFALSE),
+fRejPileupSPD(kFALSE),
 fESD(0), 
 fMinMult(0),
 fMaxMult(1000000),
@@ -1833,6 +1835,8 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
   }
   //spdv->Print();
 
+  if(fRejPileupSPD) if(fESD->IsPileupFromSPD()) return;
+
   //
   // Tracks vertex
   const AliESDVertex *vertexESD = fESD->GetPrimaryVertexTracks();
index 0086036..ddd1a63 100644 (file)
@@ -35,6 +35,7 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   Bool_t         GetReadMC() const { return fReadMC; }
   void           SetReadMC(Bool_t flag=kTRUE) { fReadMC=flag; }
   void           SetUsePhysSel() { fUsePhysSel=kTRUE; }
+  void           SetRejPileupSPD() { fRejPileupSPD=kTRUE; }
   void           SetReadRPLabels(Bool_t flag=kTRUE) { fReadRPLabels=flag; }
   void           SetFillNtuples(Bool_t flag=kTRUE) { fFillNtuples=flag; }
   void           SetUseITSSAforNtuples(Bool_t flag=kTRUE) { fUseITSSAforNtuples=flag; }
@@ -48,6 +49,7 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   Bool_t       fFillNtuples; // fill expert ntuples
   Bool_t       fUseITSSAforNtuples; // fill expert ntuples with ITSSA tracks
   Bool_t       fUsePhysSel; // use AliPhysicsSelection
+  Bool_t       fRejPileupSPD; // reject pileup events based on SPD vertex
   AliESDEvent  *fESD;    // ESD object
   Int_t        fMinMult; // minimum multiplicity
   Int_t        fMaxMult; // maximum multiplicity
@@ -297,7 +299,7 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   Bool_t IsSelectedCentrality() const;
   void FillNClustersModuleMap();
 
-  ClassDef(AliAnalysisTaskITSTrackingCheck,12); // ITS tracks analysis
+  ClassDef(AliAnalysisTaskITSTrackingCheck,13); // ITS tracks analysis
 };
 
 #endif