Skip to content

Commit

Permalink
Merge pull request #23004 from Luzhiyongg/master
Browse files Browse the repository at this point in the history
[PAG-Flow] add PileUp cuts in NUA
  • Loading branch information
alibuild authored Dec 1, 2023
2 parents 4c7237f + 0711311 commit 9c0a1ac
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand All @@ -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)
Expand Down Expand Up @@ -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 *)
{
Expand Down
5 changes: 5 additions & 0 deletions PWGCF/FLOW/GF/AliAnalysisTaskCreateNUAFinerBin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9c0a1ac

Please sign in to comment.