diff --git a/PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.cxx b/PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.cxx index e51f0d8d053..2382e948547 100644 --- a/PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.cxx +++ b/PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.cxx @@ -43,6 +43,8 @@ ClassImp(AliAnalysisTaskCreateNUAFinerBin) // classimp: necessary for root Last_Position(-1), fGFWSelection(NULL), fGFWSelection15o(NULL), + fAddTPCPileupCuts(false), + fESDvsTPConlyLinearCut(15000), fMinPt(0.2), fMaxPt(3.0), hEventCount(0) { // default constructor, don't allocate memory here! @@ -56,6 +58,8 @@ AliAnalysisTaskCreateNUAFinerBin::AliAnalysisTaskCreateNUAFinerBin(const char *n Last_Position(-1), fGFWSelection(NULL), fGFWSelection15o(NULL), + fAddTPCPileupCuts(false), + fESDvsTPConlyLinearCut(15000), fMinPt(0.2), fMaxPt(3.0), hEventCount(0) @@ -306,6 +310,17 @@ void AliAnalysisTaskCreateNUAFinerBin::UserCreateOutputObjects() // fOutputList object. the manager will in the end take care of writing your output to file // so it needs to know what's in the output } + +//_________________________________________________________________ +void AliAnalysisTaskCreateNUAFinerBin::NotifyRun() { + if (fAddTPCPileupCuts) { + Bool_t dummy = fEventCuts.AcceptEvent(InputEvent()); + fEventCuts.fUseVariablesCorrelationCuts = true; + fEventCuts.SetRejectTPCPileupWithITSTPCnCluCorr(kTRUE); + fEventCuts.fESDvsTPConlyLinearCut[0] = fESDvsTPConlyLinearCut; + } +} + //_____________________________________________________________________________ void AliAnalysisTaskCreateNUAFinerBin::UserExec(Option_t *) { diff --git a/PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.h b/PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.h index 31fa3a97754..9af0bacf6c4 100644 --- a/PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.h +++ b/PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.h @@ -21,6 +21,7 @@ class AliAnalysisTaskCreateNUAFinerBin : public AliAnalysisTaskSE virtual void UserCreateOutputObjects(); virtual void UserExec(Option_t* option); + virtual void NotifyRun(); virtual void Terminate(Option_t* option); virtual void SetPeriod(TString period) { fPeriod = period; } virtual void SetSystFlag(int flag) { fCurrSystFlag = flag; } @@ -29,6 +30,8 @@ class AliAnalysisTaskCreateNUAFinerBin : public AliAnalysisTaskSE virtual void SetMaxPt(Double_t maxPt){fMaxPt = maxPt;} virtual void SetUseHM(Bool_t useHM){fUseHM = useHM;} virtual void SetUseCuts(Bool_t useCuts){fUseCuts = useCuts;} + virtual void SetAddTPCPileupCuts(Bool_t usePileupCuts){fAddTPCPileupCuts=usePileupCuts;} // use TPC pile up Cuts + virtual void SetESDvsTPConlyLinearCut(double cut = 15000) {fESDvsTPConlyLinearCut = cut;} private: AliAODEvent* fAOD; //! input event @@ -54,6 +57,8 @@ class AliAnalysisTaskCreateNUAFinerBin : public AliAnalysisTaskSE Bool_t fUseHM; // if use High Multiplicity Trigger Bool_t fUseCuts; // if use Cuts in code Bool_t fPbPb; // if use Pb-Pb dataset + Bool_t fAddTPCPileupCuts; // Pile up Cuts in TPC + Double_t fESDvsTPConlyLinearCut; // ESDvsTPConlyLinearCut : default = 15000 //Standard Cuts and Systematics AliEventCuts fEventCuts; // Event cuts