]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/macros/lego_train/AddRsnCommonEventCuts.C
First version of macros for lego_train
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / macros / lego_train / AddRsnCommonEventCuts.C
1 AliRsnCutSet *AddRsnCommonEventCuts(AliAnalysisTaskSE *task=0,Bool_t isPP=kTRUE) {
2
3 //    return 0;
4    // primary vertex:
5    // - 2nd argument --> |Vz| range
6    // - 3rd argument --> minimum required number of contributors
7    // - 4th argument --> tells if TPC stand-alone vertexes must be accepted
8    // we switch on the check for pileup
9    AliRsnCutPrimaryVertex *cutVertex = new AliRsnCutPrimaryVertex("cutVertex", 10.0, 0, kFALSE);
10    if (isPP) cutVertex->SetCheckPileUp(kTRUE);
11
12    // primary vertex is always used
13    AliRsnCutSet *commonEventCuts = new AliRsnCutSet("commonEventCuts", AliRsnTarget::kEvent);
14    commonEventCuts->AddCut(cutVertex);
15    commonEventCuts->SetCutScheme(cutVertex->GetName());
16
17    // if task is mini
18
19    if (gRsnUseMiniPackage) {
20       AliRsnMiniAnalysisTask *taskRsn = (AliRsnMiniAnalysisTask *)task;
21       taskRsn->SetEventCuts(commonEventCuts);
22    }
23
24    return commonEventCuts;
25 }