670f595752bd175e78e43ec03419f577eb6173dc
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / macros / lego_train / RsnManager.C
1 TList *RsnManager() {
2
3    Int_t isPP           = 1; // in GRID case it will be overwriten
4    Int_t useRsnMini     = 1;
5
6    Int_t useMixing      = 0;
7    Int_t numMix         = 10;
8
9    Int_t fullOutput     = 1;
10    Int_t mcMomentum     = 0;
11    Int_t mcMon          = 0;
12
13    Int_t useEventMixPar = 0;
14    Int_t useRsnPar      = 0;
15
16    TString rootver = "v5-30-06-1";
17    TString alirootver = "";
18    //   alirootver = "v5-02-17-AN";
19
20    TString legoTrainPath = "$ALICE_ROOT/PWGLF/RESONANCES/macros/lego_train";
21 //    legoTrainPath = "$HOME/git/AliRsn/PWGLF/RESONANCES/macros/lego_train";
22
23
24    TList *listRsn = new TList();
25
26    // This will use AddRsnPairs<Name>.C
27    // and for cuts AddRsnDaughterCuts<CutName>.C
28    // and <opt> string is passed to AddRsnDaughterCuts<CutName>.C
29    // so you can control different cut settings
30    // string "<Name>:mon" means that it will add monitoring histograms from cuts
31    // Note : for now you have to set gRsnUseMiniPackage = 0 to have mon histograms
32    //    listRsn->Add(new TNamed("<Name>:mon","<CutName>:<opt>"));
33
34    TString commonCutOption="";
35 //    commonCutOption="mon_eta";
36
37    listRsn->Add(new TNamed("Phi","Phi2010"));
38 //    listRsn->Add(new TNamed("Phi","Phi2010:pdg"));
39 //
40 //    listRsn->Add(new TNamed("Phi","Phi2010:trackPtMax18"));
41 //    listRsn->Add(new TNamed("Phi","Phi2010:trackPtMax18_pdg"));
42 //
43 //    listRsn->Add(new TNamed("Phi","Phi2010:usePP"));
44 //    listRsn->Add(new TNamed("Phi","Phi2010:usePP_pdg"));
45 //
46 //    listRsn->Add(new TNamed("Phi","Phi2010:usePP_trackPtMax18"));
47 //    listRsn->Add(new TNamed("Phi","Phi2010:usePP_trackPtMax18_pdg"));
48 //
49 // //   listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma1"));
50 // //   listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma2"));
51 //    listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma3"));
52 //    listRsn->Add(new TNamed("Phi","Phi2010:tpconly_TPCsigma3_pdg"));
53 // //   listRsn->Add(new TNamed("Phi","Phi2010:tofonly_TOFsigma1"));
54 // //   listRsn->Add(new TNamed("Phi","Phi2010:tofonly_TOCsigma2"));
55 //    listRsn->Add(new TNamed("Phi","Phi2010:tofonly_TOCsigma3"));
56 //    listRsn->Add(new TNamed("Phi","Phi2010:tofonly_TOCsigma3_pdg"));
57 //    listRsn->Add(new TNamed("Phi","Phi2010:tofonly_TOCsigma3_trackPtMax18"));
58 //    listRsn->Add(new TNamed("Phi","Phi2010:tofonly_TOCsigma3_trackPtMax18_pdg"));
59 //
60 //
61 // //   listRsn->Add(new TNamed("Phi","BPID"));
62 //    listRsn->Add(new TNamed("Phi","Phi2010:qualityonly"));
63 // //   listRsn->Add(new TNamed("Phi","Phi2010:tpcptMax05"));
64 // //   listRsn->Add(new TNamed("Phi","Phi2010:tpcptMax06"));
65 // //   listRsn->Add(new TNamed("Phi","Phi2010:tpcptMax07"));
66 // //   listRsn->Add(new TNamed("Phi","Phi2010:tpcptMax08"));
67 // //   listRsn->Add(new TNamed("Phi","Phi2010:TPCsigma1_tpcptMax06"));
68 // //   listRsn->Add(new TNamed("Phi","Phi2010:TPCsigma1_tpcptMax08"));
69 //
70 //    //
71 //    //    // in case you have MC
72 //    //   listRsn->Add(new TNamed("Phi","PDG"));
73 //    listRsn->Add(new TNamed("Phi","PDG:NoTOFSIGMA"));
74 //    //
75 //    //    listRsn->Add(new TNamed("KStar","KStar2010:mon"));
76 //    //    listRsn->Add(new TNamed("KStar","BPID:mon"));
77 //
78 //    //    listRsn->Add(new TNamed("KStar","KStar:mon"));
79 //    //    listRsn->Add(new TNamed("KStar","KStar:TPCTOFpidDefaultKstarPP2010_mon"));
80 //    //    listRsn->Add(new TNamed("KStar","KStar:FastTPCpid1point5sigma_mon"));
81 //    //    listRsn->Add(new TNamed("KStar","KStar:FastTPCpid2sigma_mon"));
82
83
84    //============= ONLY for GRID ====================
85    TString dsConfig;
86
87    //   isPP = 0;
88    //   dsConfig = "datasets-grid/LHC10h_p2_ESD.txt";
89    //   dsConfig = "datasets-grid/LHC10h_p2_AOD049.txt";
90    //   dsConfig = "datasets-grid/LHC10h_p2_AOD073.txt";
91
92    //   dsConfig = "datasets-grid/LHC11a10b_AOD080.txt";
93
94    //      isPP = 1;
95    //      dsConfig = "datasets-grid/LHC10b_p2_ESD.txt";
96    //      dsConfig = "datasets-grid/LHC10b_p2_AOD038.txt";
97
98    // pp 2.76 TeV data
99    isPP = 1;
100    // data
101    dsConfig = "datasets-grid/LHC11a_AOD072.txt";
102    // mc
103    dsConfig = "datasets-grid/LHC11h5b_AOD079.txt";
104    dsConfig = "datasets-grid/LHC11e3a_AOD074.txt";
105
106
107
108    //================================================
109
110    ///////////////////////////////////////////
111    // don't edit next lines (EXPERTS ONLY)
112    ///////////////////////////////////////////
113
114    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
115    if (!mgr) {
116       Printf("Error[RsnManager] mgr is null !!!");
117       return 0;
118    }
119
120    AliAnalysisManager::SetGlobalStr("rsnLegoTrainPath",legoTrainPath.Data());
121
122    AliAnalysisManager::SetGlobalInt("rsnIsPP",isPP);
123
124    // use parfiles instead of libs
125    AliAnalysisManager::SetGlobalInt("rsnUseEventMixingPar",useEventMixPar);
126    AliAnalysisManager::SetGlobalInt("rsnUseRSNPar",useRsnPar);
127
128    // common options
129    AliAnalysisManager::SetGlobalInt("rsnUsePhysSel",0);
130    AliAnalysisManager::SetGlobalInt("rsnUsePIDResponse",1);
131    // rsn options
132
133    if (useRsnMini) {
134       AliAnalysisManager::SetGlobalInt("rsnUseMiniPackage",1);
135       AliAnalysisManager::SetGlobalInt("rsnUseRsnInputHandler",0);
136       AliAnalysisManager::SetGlobalInt("rsnSplitMgrByTasks",1);
137       AliAnalysisManager::SetGlobalInt("rsnUseMixing",useMixing);
138
139    } else  {
140       AliAnalysisManager::SetGlobalInt("rsnUseMiniPackage",0);
141       AliAnalysisManager::SetGlobalInt("rsnUseRsnInputHandler",1);
142       AliAnalysisManager::SetGlobalInt("rsnSplitMgrByTasks",0);
143       AliAnalysisManager::SetGlobalInt("rsnUseMixing",0);
144    }
145
146    // mixing setting
147    AliAnalysisManager::SetGlobalInt("rsnNumMix",numMix);
148
149    // oputput settings
150    AliAnalysisManager::SetGlobalInt("rsnOutputFull",fullOutput);
151    AliAnalysisManager::SetGlobalInt("rsnUseMCMomentum",mcMomentum);
152    AliAnalysisManager::SetGlobalInt("rsnUseMCMonitoring",mcMon);
153
154
155    // expert options (don't change)
156    AliAnalysisManager::SetGlobalInt("rsnMixPrintRefresh",-1);
157
158    // RSN train settings for GRID
159    AliAnalysisManager::SetGlobalStr("rsnTrainDSConfig",dsConfig.Data());
160
161    // root and aliroot version
162    AliAnalysisManager::SetGlobalStr("rsnLegoTrainROOTversion",rootver.Data());
163    AliAnalysisManager::SetGlobalStr("rsnLegoTrainAliROOTversion",alirootver.Data());
164
165
166    AliAnalysisManager::SetGlobalStr("rsnLegoTrainCommonCutOption",commonCutOption.Data());
167
168
169    return listRsn;
170 }