Moved old macros for lego_train into lego_train/old folder
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / macros / lego_train / old / AddRsnCommonEventCuts.C
CommitLineData
900e06e4 1AliRsnCutSet *AddRsnCommonEventCuts(AliAnalysisTaskSE *task=0,Bool_t isPP=kTRUE) {
2
3// return 0;
dc8dd82a 4
5 Bool_t valid;
6 Double_t eventCutVertex = AliAnalysisManager::GetGlobalDbl("rsnEventCutVertex",valid);
7
900e06e4 8 // primary vertex:
9 // - 2nd argument --> |Vz| range
10 // - 3rd argument --> minimum required number of contributors
11 // - 4th argument --> tells if TPC stand-alone vertexes must be accepted
12 // we switch on the check for pileup
dc8dd82a 13 AliRsnCutPrimaryVertex *cutVertex = new AliRsnCutPrimaryVertex("cutVertex", eventCutVertex, 0, kFALSE);
900e06e4 14 if (isPP) cutVertex->SetCheckPileUp(kTRUE);
15
16 // primary vertex is always used
17 AliRsnCutSet *commonEventCuts = new AliRsnCutSet("commonEventCuts", AliRsnTarget::kEvent);
18 commonEventCuts->AddCut(cutVertex);
19 commonEventCuts->SetCutScheme(cutVertex->GetName());
20
21 // if task is mini
547e2d97 22 Bool_t valid;
23 Int_t isRsnMini = AliAnalysisManager::GetGlobalInt("rsnUseMiniPackage",valid);
24 if (isRsnMini) {
900e06e4 25 AliRsnMiniAnalysisTask *taskRsn = (AliRsnMiniAnalysisTask *)task;
26 taskRsn->SetEventCuts(commonEventCuts);
27 }
900e06e4 28 return commonEventCuts;
29}