]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/macros/lego_train/AddRsnDaughterCutsPhi2010KaonFromKStar.C
Migration of PWG2/RESONANCES -> PWGLF/RESONANCES
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / macros / lego_train / AddRsnDaughterCutsPhi2010KaonFromKStar.C
1 #ifndef __CINT__
2 #include <PWG2/RESONANCES/AliRsnInputHandler.h>
3 #include <PWG2/RESONANCES/AliRsnCutKaonForPhi2010.h>
4
5 #endif
6 Int_t AddRsnDaughterCutsPhi2010KaonFromKStar(AliPID::EParticleType type1,AliPID::EParticleType type2,TString opt,Bool_t isRsnMini=kFALSE,AliRsnInputHandler *rsnIH=0,AliAnalysisTaskSE *task=0)
7 {
8
9    if (!rsnIH) return 0;
10
11    // === USER HAS TO SET CORRECT NUMBER OF CUTS SETS =====
12    Int_t numberOfCuts = 1;
13
14    Printf("Option : %s",opt.Data());
15
16    //---------------------------------------------
17    //  Define single cuts
18    //---------------------------------------------
19
20    AliRsnCutDaughterKStar2010PP *cutK = new AliRsnCutDaughterKStar2010PP("cutPhiKaonForKStar", AliPID::kKaon);
21    // cut set
22    AliRsnCutSet *cutSetK = new AliRsnCutSet("PhiKaonForKStar", AliRsnTarget::kDaughter);
23    cutSetK->AddCut(cutK);
24    cutSetK->SetCutScheme(cutK->GetName());
25    if (opt.Contains("mon")) {
26       AddMonitorOutput(cuts->GetMonitorOutput());
27    }
28    if (isRsnMini) {
29       AliRsnMiniAnalysisTask *taskRsnMini = dynamic_cast<AliRsnMiniAnalysisTask *>(task);
30       if (taskRsnMini) {
31          taskRsnMini->AddTrackCuts(cutSetK);
32       }
33    } else {
34       AliRsnDaughterSelector *sel = rsnIH->GetSelector();
35       sel->Add(cutSetK, kTRUE);
36    }
37
38
39    return numberOfCuts;
40
41 }