1 AliRsnCutSet *AddRsnCommonEventCuts(AliAnalysisTaskSE *task=0) {
6 Int_t collisionType = AliRsnTrainManager::GetGlobalInt("IsCollisionType",valid);
7 Double_t eventCutVertex = AliRsnTrainManager::GetGlobalDbl("RsnEventCutPrimaryVertex",valid);
8 Int_t isRsnMini = AliRsnTrainManager::GetGlobalInt("IsRsnMini",valid);
11 // - 2nd argument --> |Vz| range
12 // - 3rd argument --> minimum required number of contributors
13 // - 4th argument --> tells if TPC stand-alone vertexes must be accepted
14 // we switch on the check for pileup
15 AliRsnCutPrimaryVertex *cutVertex = new AliRsnCutPrimaryVertex("cutVertex", eventCutVertex, 0, kFALSE);
16 if (collisionType==0) cutVertex->SetCheckPileUp(kTRUE);
18 // primary vertex is always used
19 AliRsnCutSet *commonEventCuts = new AliRsnCutSet("commonEventCuts", AliRsnTarget::kEvent);
20 commonEventCuts->AddCut(cutVertex);
21 commonEventCuts->SetCutScheme(cutVertex->GetName());
25 AliRsnMiniAnalysisTask *taskRsn = (AliRsnMiniAnalysisTask *)task;
26 taskRsn->SetEventCuts(commonEventCuts);
28 return commonEventCuts;