]>
Commit | Line | Data |
---|---|---|
900e06e4 | 1 | #ifndef __CINT__ |
2 | #include <ANALYSIS/AliAnalysisTaskSE.h> | |
3 | #include <PWG2/RESONANCES/AliRsnCutSet.h> | |
4 | #include <PWG2/RESONANCES/AliRsnInputHandler.h> | |
5 | #include <PWG2/RESONANCES/AliRsnCutKaonForPhi2010.h> | |
6 | #include <PWG2/RESONANCES/AliRsnMiniAnalysisTask.h> | |
7 | #include <PWG2/RESONANCES/AliRsnAnalysisTask.h> | |
8 | #endif | |
9 | Int_t AddRsnDaughterCutsPhi2010(AliPID::EParticleType type1,AliPID::EParticleType type2,TString opt,Bool_t isRsnMini=kFALSE,AliRsnInputHandler *rsnIH=0,AliAnalysisTaskSE *task=0) | |
10 | { | |
11 | ||
12 | if (!rsnIH) return 0; | |
13 | ||
14 | // === USER HAS TO SET CORRECT NUMBER OF CUTS SETS ===== | |
15 | Int_t numberOfCuts = 1; | |
16 | ||
17 | //--------------------------------------------- | |
18 | // Define single cuts | |
19 | //--------------------------------------------- | |
20 | ||
21 | Printf("AddRsnDaughterCutsPhi2010 Option : %s",opt.Data()); | |
22 | ||
23 | AliRsnCutKaonForPhi2010 *cut = new AliRsnCutKaonForPhi2010("cutKaonPhi2010"); | |
24 | if (!opt.CompareTo("qualityonly")) cut->SetMode(AliRsnCutKaonForPhi2010::kQuality); | |
25 | ||
26 | if (opt.Contains("tpconly")) { | |
27 | cut->SetMode(AliRsnCutKaonForPhi2010::kOnlyTPC); | |
28 | if (opt.Contains("sigma1")) cut->SetCutTPC(1.0); | |
29 | if (opt.Contains("sigma2")) cut->SetCutTPC(2.0); | |
30 | if (opt.Contains("sigma3")) cut->SetCutTPC(3.0); | |
31 | } | |
32 | ||
33 | if (opt.Contains("tofonly")) { | |
34 | cut->SetMode(AliRsnCutKaonForPhi2010::kOnlyTOF); | |
35 | if (opt.Contains("sigma1")) cut->SetCutTOF(1.0); | |
36 | if (opt.Contains("sigma2")) cut->SetCutTOF(2.0); | |
37 | if (opt.Contains("sigma3")) cut->SetCutTOF(3.0); | |
38 | } | |
39 | ||
40 | //--------------------------------------------- | |
41 | // Combine cuts | |
42 | //--------------------------------------------- | |
43 | TString cutname = "kaonPhi2010"; | |
44 | if (!opt.IsNull()) cutname += Form("_%s",opt.Data()); | |
45 | AliRsnCutSet *cuts = new AliRsnCutSet(cutname.Data(), AliRsnTarget::kDaughter); | |
46 | cuts->AddCut(cut); | |
47 | cuts->SetCutScheme(cut->GetName()); | |
48 | ||
49 | if (opt.Contains("mon")) { | |
547e2d97 | 50 | AddMonitorOutput(cuts->GetMonitorOutput()); |
900e06e4 | 51 | } |
52 | if (isRsnMini) { | |
53 | AliRsnMiniAnalysisTask *taskRsnMini = dynamic_cast<AliRsnMiniAnalysisTask *>(task); | |
54 | if (taskRsnMini) { | |
55 | taskRsnMini->AddTrackCuts(cuts); | |
56 | } | |
57 | } else { | |
58 | AliRsnDaughterSelector *sel = rsnIH->GetSelector(); | |
59 | sel->Add(cuts, kTRUE); | |
60 | } | |
61 | return numberOfCuts; | |
62 | ||
63 | } |