including a setter to turn on pile-up rejection with one of the SPD methods (not...
authormcosenti <mcosenti@cern.ch>
Fri, 12 Sep 2014 13:37:34 +0000 (10:37 -0300)
committermcosenti <mcosenti@cern.ch>
Fri, 12 Sep 2014 13:39:05 +0000 (10:39 -0300)
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.h

index db5e577..6fc8afe 100644 (file)
@@ -90,6 +90,7 @@ AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton() :
   fNCuts(5),
   fTrCoreRem(kFALSE),
   fClusTDiff(30e-9),
+  fPileUpRejSPD(kFALSE),
   fESD(0),
   fAOD(0),
   fVEvent(0),
@@ -197,6 +198,7 @@ AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton(const char *name) :
   fNCuts(5),
   fTrCoreRem(kFALSE),
   fClusTDiff(30e-9),
+  fPileUpRejSPD(kFALSE),
   fESD(0),
   fAOD(0),
   fVEvent(0),
@@ -541,6 +543,11 @@ void AliAnalysisTaskEMCALIsoPhoton::UserExec(Option_t *)
     printf("passed vertex cut\n");
 
   fEvtSel->Fill(1);
+  if(fVEvent->IsPileupFromSPD(3, 0.8, 3., 2., 5.) && fPileUpRejSPD){
+    if(fDebug)
+      printf("Event is SPD pile-up!***\n");
+    return;
+  }
   if(fESD)
     fTracks = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("Tracks"));
   if(fAOD)
index 9605a74..4df15e4 100644 (file)
@@ -75,6 +75,7 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   void                  SetMinIsoClusE(Double_t emin)           { fMinIsoClusE        = emin;    }
   void                  SetTrCoreRemoval(Bool_t b)              { fTrCoreRem          = b;       }
   void                  SetClusTDiff(Double_t diff)             { fClusTDiff          = diff;    }
+  void                  SetPileUpRejSPD()                       { fPileUpRejSPD       = kTRUE;  }
  protected:
   TObjArray             *fESDClusters;           //!pointer to EMCal clusters
   TObjArray             *fAODClusters;           //!pointer to EMCal clusters
@@ -121,6 +122,7 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   Int_t                  fNCuts;                 // number of cuts (QA purposes)
   Bool_t                 fTrCoreRem;             // flag to set the removal of the core in track isolation (true removes it, default)
   Double_t               fClusTDiff;             // variable to hold the time diff between the candidate cluster and the isolation clusters
+  Bool_t                 fPileUpRejSPD;          // flag to set pile-up rejection via SPD (multiple vertices)
   
  private:
   AliESDEvent *fESD;      //! ESD object