TENDER becomes Tender, removing .so
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / macros / AddTask_GammaConvDalitzQAV1_pPb.C
CommitLineData
34fc0eec 1void AddTask_GammaConvDalitzQAV1_pPb( Int_t trainConfig = 1,
2 Bool_t isMC = kFALSE, //run MC
3 Bool_t enableQAMesonTask = kTRUE, //enable QA in AliAnalysisTaskGammaConvDalitzV1
4 Bool_t enableDoMesonChic = kFALSE, // enable additional Chic analysis
2d49ea4c 5 Bool_t enableSetProdVtxVGamma = kTRUE,
34fc0eec 6 TString fileNameInputForWeighting = "MCSpectraInput.root", // path to file for weigting input
7 Bool_t doWeighting = kFALSE, //enable Weighting
8 TString generatorName = "DPMJET",
9 TString cutnumberAODBranch = "0000000060084001001500000"
10 ) {
11
12
13
14 cout<<"*********Parameters*******"<<endl;
15 cout<<"trainConfig: "<<trainConfig<<endl;
16 cout<<"isMC: "<<isMC<<endl;
17 cout<<"enableQAMesonTask: "<<enableQAMesonTask<<endl;
18 cout<<"enableDoMesonChic: "<<enableDoMesonChic<<endl;
2d49ea4c 19 cout<<"enableSetProdVtxVGamma: "<<enableSetProdVtxVGamma<<endl;
34fc0eec 20 cout<<"fileNameInputForWeighting: "<<fileNameInputForWeighting.Data()<<endl;
21 cout<<"doWeighting: "<<doWeighting<<endl;
22 cout<<"generatorName: "<<generatorName.Data()<<endl;
23 cout<<"cutnumberAODBranch: "<<cutnumberAODBranch.Data()<<endl;
24
25 // ================= Load Librariers =================================
230b7aff 26 gSystem->Load("libCore");
27 gSystem->Load("libTree");
28 gSystem->Load("libGeom");
29 gSystem->Load("libVMC");
30 gSystem->Load("libPhysics");
34fc0eec 31 gSystem->Load("libMinuit");
32 gSystem->Load("libSTEERBase");
33 gSystem->Load("libESD");
34 gSystem->Load("libAOD");
35 gSystem->Load("libANALYSIS");
36 gSystem->Load("libANALYSISalice");
230b7aff 37 gSystem->Load("libPWGGAGammaConv");
38 gSystem->Load("libCDB");
39 gSystem->Load("libSTEER");
40 gSystem->Load("libSTEERBase");
41 gSystem->Load("libTender");
42 gSystem->Load("libTenderSupplies");
7b3733f6 43
58326f11 44
2d49ea4c 45
46
4fac3e9a 47 Int_t isHeavyIon = 2;
34fc0eec 48
49 cout<<"Entro 0"<<endl;
50
51 // ================== GetAnalysisManager ===============================
52 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
53 if (!mgr) {
54 Error(Form("AddTask_GammaConvDalitzV1_pPb_%i",trainConfig), "No analysis manager found.");
55 return ;
56 }
57
58 // ================== GetInputEventHandler =============================
59 AliVEventHandler *inputHandler=mgr->GetInputEventHandler();
60
61 //========= Add PID Reponse to ANALYSIS manager ====
62 if(!(AliPIDResponse*)mgr->GetTask("PIDResponseTask")){
63 gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
64 AddTaskPIDResponse(isMC);
65 }
66
67 //========= Set Cutnumber for V0Reader ================================
4fac3e9a 68
69 TString cutnumberEvent = "8000000";
70
71 TString cutnumberPhoton="";
f47b2bb5 72
73 if(trainConfig == 9 || trainConfig == 10 ){
3013611f 74 cutnumberPhoton = "160000084001001500000000"; //Offline V0 finder
7417dc50 75 } else if ( trainConfig >= 54 && trainConfig <= 60 ){ // Warning!!! Those trains must run in stand-alone mode
3013611f 76 cutnumberPhoton = "000000700040000500000000";
01d3a373 77 } else {
3013611f 78 cutnumberPhoton = "060000084001000500000000"; //Online V0 finder //change
f47b2bb5 79 }
80
30b9a400 81 TString ElecCuts = "90005400000002000000"; //Electron Cuts
34fc0eec 82 Bool_t doEtaShift = kFALSE;
83
84
85
86 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
87
88 //========= Add V0 Reader to ANALYSIS manager if not yet existent =====
4fac3e9a 89 //========= Add V0 Reader to ANALYSIS manager if not yet existent =====
90 if( !(AliV0ReaderV1*)mgr->GetTask("V0ReaderV1") ){
91 AliV0ReaderV1 *fV0ReaderV1 = new AliV0ReaderV1("V0ReaderV1");
92
93 fV0ReaderV1->SetUseOwnXYZCalculation(kTRUE);
94 fV0ReaderV1->SetCreateAODs(kFALSE);// AOD Output
95 fV0ReaderV1->SetUseAODConversionPhoton(kTRUE);
96
97 if (!mgr) {
98 Error("AddTask_V0ReaderV1", "No analysis manager found.");
99 return;
100 }
101
102 AliConvEventCuts *fEventCuts=NULL;
103 if(cutnumberEvent!=""){
104 fEventCuts= new AliConvEventCuts(cutnumberEvent.Data(),cutnumberEvent.Data());
105 fEventCuts->SetPreSelectionCutFlag(kTRUE);
106 if(fEventCuts->InitializeCutsFromCutString(cutnumberEvent.Data())){
107 fEventCuts->DoEtaShift(doEtaShift);
108 fV0ReaderV1->SetEventCuts(fEventCuts);
109 fEventCuts->SetFillCutHistograms("",kTRUE);
110 }
111 }
112
113 // Set AnalysisCut Number
114 AliConversionPhotonCuts *fCuts=NULL;
115 if(cutnumberPhoton!=""){
116 fCuts= new AliConversionPhotonCuts(cutnumberPhoton.Data(),cutnumberPhoton.Data());
117 fCuts->SetPreSelectionCutFlag(kTRUE);
118 fCuts->SetIsHeavyIon(isHeavyIon);
119 if(fCuts->InitializeCutsFromCutString(cutnumberPhoton.Data())){
120 fV0ReaderV1->SetConversionCuts(fCuts);
121 fCuts->SetFillCutHistograms("",kTRUE);
122 }
123 }
124 if(inputHandler->IsA()==AliAODInputHandler::Class()){
125 // AOD mode
126 cout << "AOD handler: adding " << cutnumberAODBranch.Data() << " as conversion branch" << endl;
127 fV0ReaderV1->SetDeltaAODBranchName(Form("GammaConv_%s_gamma",cutnumberAODBranch.Data()));
128 }
129 fV0ReaderV1->Init();
130
131 AliLog::SetGlobalLogLevel(AliLog::kInfo);
132
133 //connect input V0Reader
134 mgr->AddTask(fV0ReaderV1);
135 mgr->ConnectInput(fV0ReaderV1,0,cinput);
136
137 }
34fc0eec 138 //================================================
139 //========= Add Electron Selector ================
140
141
142 if( !(AliDalitzElectronSelector*)mgr->GetTask("ElectronSelector") ){
143
144 AliDalitzElectronSelector *fElectronSelector = new AliDalitzElectronSelector("ElectronSelector");
145
146 // Set AnalysisCut Number
147
148 AliDalitzElectronCuts *fElecCuts=0;
149
150 //ElecCuts = "900054000000020000";
151
152 if( ElecCuts!=""){
153
154 fElecCuts= new AliDalitzElectronCuts(ElecCuts.Data(),ElecCuts.Data());
155
156 if(fElecCuts->InitializeCutsFromCutString(ElecCuts.Data())){
157
158 fElectronSelector->SetDalitzElectronCuts(fElecCuts);
159
160 fElecCuts->SetFillCutHistograms("",kTRUE);
161
162 }
163 }
164
165 fElectronSelector->Init();
166 mgr->AddTask(fElectronSelector);
167
168 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
169
170 //connect input V0Reader
171
172 mgr->ConnectInput (fElectronSelector,0,cinput1);
173
174 }
175
176
177
178 cout<<"Entro"<<endl;
179 //================================================
180 //========= Add task to the ANALYSIS manager =====
181 //================================================
182 // find input container
183
184
185
186 AliAnalysisTaskGammaConvDalitzV1 *task=NULL;
187
188 task= new AliAnalysisTaskGammaConvDalitzV1(Form("GammaConvDalitzV1_%i",trainConfig));
189
190 task->SetIsHeavyIon(2);
191 task->SetIsMC(isMC);
192
193
194
195 // Cut Numbers to use in Analysis
196 Int_t numberOfCuts = 1;
4fac3e9a 197
198 TString *eventCutArray = new TString[numberOfCuts];
34fc0eec 199
4fac3e9a 200 TString *photonCutArray = new TString[numberOfCuts];
34fc0eec 201
4fac3e9a 202 TString *ElecCutarray = new TString[numberOfCuts];
34fc0eec 203
4fac3e9a 204 TString *MesonCutarray = new TString[numberOfCuts];
34fc0eec 205
206 Bool_t doEtaShiftIndCuts = kFALSE;
207 TString stringShift = "";
208
209 // Shifting in pPb direction
210
211 doEtaShiftIndCuts = kFALSE;
212 stringShift = "pPb";
213
214
215
216
217if( trainConfig == 1 ) { // No eta shift |Y| < 0.8
30b9a400 218
3013611f 219 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011
34fc0eec 220
221} else if( trainConfig == 2 ) { // No eta shift |Y| < 0.8
222
3013611f 223 eventCutArray[0]="8000011"; photonCutArray[0] = "032000093603007200000000"; ElecCutarray[0] = "90475400239102623710"; MesonCutarray[0] = "01033035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + |Y| < 0.6 and |Gamma_eta| < 0.65 and |e+_eta| < 0.65 and |e-_eta| < 0.65
34fc0eec 224
225} else if( trainConfig == 3 ) { // No eta shift |Y| < 0.8
226
3013611f 227 eventCutArray[0]="8000011"; photonCutArray[0] = "042000093603007200000000"; ElecCutarray[0] = "90475400235102623710"; MesonCutarray[0] = "01032035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + |Y| < 0.7 and |Gamma_eta| < 0.75 and |e+_eta| < 0.75 and |e-_eta| < 0.75
34fc0eec 228
229} else if( trainConfig == 4 ) { // No eta shift |Y| < 0.8
230
3013611f 231 eventCutArray[0]="8000011"; photonCutArray[0] = "012000093603007200000000"; ElecCutarray[0] = "90475400236102623710"; MesonCutarray[0] = "01034035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + |Y| < 0.5 and |Gamma_eta| < 0.60 and |e+_eta| < 0.60 and |e-_eta| < 0.60
34fc0eec 232
258b4572 233} else if ( trainConfig == 5 ) {
234
3013611f 235 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102623310"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011
258b4572 236
78cea1d2 237} else if ( trainConfig == 6 ) { // No eta shift |Y| < 0.8
238
3013611f 239 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102643710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011
78cea1d2 240
241} else if ( trainConfig == 7 ) {
242
3013611f 243 eventCutArray[0]="8000012"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011
78cea1d2 244
245} else if ( trainConfig == 8 ) { // No eta shift |Y| < 0.8
246
3013611f 247 eventCutArray[0]="8000012"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102643710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011
78cea1d2 248
f47b2bb5 249} else if ( trainConfig == 9 ) {
250
3013611f 251 eventCutArray[0]="8000011"; photonCutArray[0] = "102000093603007200000000"; ElecCutarray[0] = "90475400233102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011
f47b2bb5 252
253} else if ( trainConfig == 10 ) {
254
3013611f 255 eventCutArray[0]="8000012"; photonCutArray[0] = "102000093603007200000000"; ElecCutarray[0] = "90475400233102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011
f47b2bb5 256
f4d5bd23 257} else if ( trainConfig == 11 ) {
258
3013611f 259 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102623010"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011
f4d5bd23 260
261} else if ( trainConfig == 12 ) {
262
3013611f 263 eventCutArray[0]="8000012"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102623010"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011
f4d5bd23 264
2d49ea4c 265} else if ( trainConfig == 13 ) {
266
3013611f 267 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400533102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + 4 ITScls
2d49ea4c 268
269} else if ( trainConfig == 14 ) {
270
3013611f 271 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400733102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + 4 ITScls no Any
2d49ea4c 272
273} else if ( trainConfig == 15 ) {
34fc0eec 274
3013611f 275 eventCutArray[0]="8000012"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400533102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + 4 ITScls
2d49ea4c 276
277} else if ( trainConfig == 16 ) {
278
3013611f 279 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400833002623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + No psipair
c04202fb 280
8fa2d145 281} else if ( trainConfig == 17 ) {
282
3013611f 283 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400833102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth
8fa2d145 284
285} else if ( trainConfig == 18 ) {
34fc0eec 286
3013611f 287 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400933102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + 4ITS cls
8fa2d145 288
289} else if ( trainConfig == 19 ) {
290
3013611f 291 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400133102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kFirts
8fa2d145 292
2055a442 293} else if ( trainConfig == 20 ) {
294
3013611f 295 eventCutArray[0]="8000011"; photonCutArray[0] = "002000092170008260400000"; ElecCutarray[0] = "90475400233102623710"; MesonCutarray[0] = "01621035009000"; // standard cut Annika analysis:
2055a442 296
297} else if ( trainConfig == 21 ) {
298
3013611f 299 eventCutArray[0]="8000011"; photonCutArray[0] = "002000092170008260400000"; ElecCutarray[0] = "90475400133102623710"; MesonCutarray[0] = "01621035009000"; // standard cut Annika analysis: + kFirst
58326f11 300
301} else if ( trainConfig == 22 ){
302
3013611f 303 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400153102621710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 + Old Standard 2010 + kFirtst
58326f11 304
305} else if ( trainConfig == 23 ) {
306
3013611f 307 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400853102621710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 + Old Standard 2010 + kBoth
58326f11 308
309} else if ( trainConfig == 24 ){
310
3013611f 311 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400153102621700"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 + Old Standard 2010 + kFirtst No weights
58326f11 312
313} else if ( trainConfig == 25 ) {
314
3013611f 315 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400853102621700"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 + Old Standard 2010 + kBoth No weights
58326f11 316
317} else if ( trainConfig == 26 ) {
318
3013611f 319 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400133102623700"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kFirts + No weights
58326f11 320
321} else if ( trainConfig == 27 ) {
322
3013611f 323 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400833102623700"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + No weights
58326f11 324
325} else if ( trainConfig == 28 ) {
326
3013611f 327 eventCutArray[0]="8000011"; photonCutArray[0] = "002000493603007200000000"; ElecCutarray[0] = "90475400233102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + Pt > 0.075
58326f11 328
329} else if ( trainConfig == 29 ) {
330
3013611f 331 eventCutArray[0]="8000011"; photonCutArray[0] = "002000193603007200000000"; ElecCutarray[0] = "90475400233102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + Pt > 0.100
58326f11 332
333} else if ( trainConfig == 30 ) {
334
3013611f 335 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102633710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + Pt{e} > 0.150
58326f11 336
337} else if ( trainConfig == 31 ) {
338
3013611f 339 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102653710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + Pt{e} > 0.175
eb0c35dc 340
341} else if ( trainConfig == 32 ) {
342
3013611f 343 eventCutArray[0]="8000011"; photonCutArray[0] = "007000093603007200000000"; ElecCutarray[0] = "90475400233102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + Photon R > 35 cm
eb0c35dc 344
345} else if ( trainConfig == 33 ) {
346
3013611f 347 eventCutArray[0]="8000011"; photonCutArray[0] = "007000093603007200000000"; ElecCutarray[0] = "90475400833102623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + Photon R > 35 cm
ef514340 348
349} else if ( trainConfig == 34 ) {
350
3013611f 351 eventCutArray[0]="8000011"; photonCutArray[0] = "007000093603007200000000"; ElecCutarray[0] = "90475400833102623700"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + Photon R > 35 cm + No weights
7b3733f6 352
353} else if ( trainConfig == 35 ) {
354
3013611f 355 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400833002623700"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + NoPsiPair + No weights
7b3733f6 356
357} else if ( trainConfig == 36 ) {
358
3013611f 359 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102623700"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny no Weights
58326f11 360
30b9a400 361} else if ( trainConfig == 37 ) {
362
3013611f 363 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400833102623711"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + smearing photon virtual
58326f11 364
30b9a400 365} else if ( trainConfig == 38 ) {
366
3013611f 367 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400133102623711"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kFirts + smearing photon virtual
30b9a400 368
369} else if( trainConfig == 39 ) {
370
3013611f 371 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102623711"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + smearing photon virtual
58326f11 372
7ab8e97e 373} else if ( trainConfig == 40 ) {
374
3013611f 375 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400833102623712"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + smearing photon virtual electrons
7ab8e97e 376
377} else if ( trainConfig == 41 ) {
378
3013611f 379 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400133102623712"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kFirts + smearing photon virtual electrons
7ab8e97e 380
381} else if( trainConfig == 42 ) {
382
3013611f 383 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233102623712"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + smearing photon virtual electrons
7ab8e97e 384
26b5002e 385} else if( trainConfig == 43 ) {
7ab8e97e 386
3013611f 387 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400833202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + New psi pair cut fPsiPairCut = 0.60; fDeltaPhiCutMin = 0.0; fDeltaPhiCutMax = 0.12;
7ab8e97e 388
26b5002e 389} else if( trainConfig == 44 ) {
390
3013611f 391 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400833502623712"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kBoth + New psi pair cut fPsiPairCut = 0.60; fDeltaPhiCutMin = 0.0; fDeltaPhiCutMax = 0.12; + Electron Smearing
26b5002e 392
39f6cfbc 393} else if( trainConfig == 45 ) {
26b5002e 394
3013611f 395 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + New psi pair cut + New psi pair cut fPsiPairCut = 0.60 fDeltaPhiCutMin = 0.0 fDeltaPhiCutMax = 0.12
26b5002e 396
39f6cfbc 397} else if( trainConfig == 46 ) {
26b5002e 398
3013611f 399 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233202623712"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + New psi pair cut + New psi pair cut fPsiPairCut = 0.60; fDeltaPhiCutMin = 0.0; fDeltaPhiCutMax = 0.12; + photon virtual electrons
39f6cfbc 400
401} else if( trainConfig == 47 ) {
402
3013611f 403 eventCutArray[0]="8000011"; photonCutArray[0] = "005000093603007200000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut + gammaR > 10cm
39f6cfbc 404
405} else if( trainConfig == 48 ){
406
3013611f 407 eventCutArray[0]="8000011"; photonCutArray[0] = "008000093603007200000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut + gammaR > 12.5cm
39f6cfbc 408
409} else if( trainConfig == 49 ){
410
3013611f 411 eventCutArray[0]="8000011"; photonCutArray[0] = "006000093603007200000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut + gammaR > 20 cm
39f6cfbc 412
413} else if( trainConfig == 50 ){
414
3013611f 415 eventCutArray[0]="8000011"; photonCutArray[0] = "007000093603007200000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut + gammaR > 35 cm
39f6cfbc 416
417} else if( trainConfig == 51 ){
418
3013611f 419 eventCutArray[0]="8000011"; photonCutArray[0] = "009000093603007200000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut + gammaR > 7.5 cm
d734058d 420
421} else if( trainConfig == 52 ){
422
3013611f 423 eventCutArray[0]="8000011"; photonCutArray[0] = "000000093603007200000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut + gammaR > 0 cm
d734058d 424
425} else if( trainConfig == 53 ) {
426
3013611f 427 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233202623700"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + New psi pair cut + New psi pair cut fPsiPairCut = 0.60 fDeltaPhiCutMin = 0.0 fDeltaPhiCutMax = 0.12
d734058d 428
01d3a373 429} else if( trainConfig == 53 ) {
430
3013611f 431 eventCutArray[0]="8000011"; photonCutArray[0] = "002000093603007200000000"; ElecCutarray[0] = "90475400233202623700"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + New psi pair cut + New psi pair cut fPsiPairCut = 0.60 fDeltaPhiCutMin = 0.0 fDeltaPhiCutMax = 0.12
01d3a373 432
433} else if( trainConfig == 54 ) {
434
3013611f 435 eventCutArray[0]="8000011"; photonCutArray[0] = "000000000040000500000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut 0.60, 0.0 0.12 + 0 cm < Rconv < 180 cm //open cuts
01d3a373 436
7417dc50 437} else if( trainConfig == 55 ) {
438
3013611f 439 eventCutArray[0]="8000011"; photonCutArray[0] = "002000000040000500000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut 0.60, 0.0 0.12 + Rconv > 5 cm
7417dc50 440
441} else if( trainConfig == 56 ) {
442
3013611f 443 eventCutArray[0]="8000011"; photonCutArray[0] = "009000000040000500000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut 0.60, 0.0 0.12 + Rconv > 7.5 cm
7417dc50 444
445} else if( trainConfig == 57 ) {
446
3013611f 447 eventCutArray[0]="8000011"; photonCutArray[0] = "005000000040000500000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut 0.60, 0.0 0.12 + Rconv > 10 cm
7417dc50 448
449} else if( trainConfig == 58 ) {
450
3013611f 451 eventCutArray[0]="8000011"; photonCutArray[0] = "008000000040000500000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut 0.60, 0.0 0.12 + Rconv > 12.5 cm
7417dc50 452
453} else if( trainConfig == 59 ) {
454
3013611f 455 eventCutArray[0]="8000011"; photonCutArray[0] = "006000000040000500000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut 0.60, 0.0 0.12 + Rconv > 20 cm
7417dc50 456
457} else if( trainConfig == 60 ) {
458
3013611f 459 eventCutArray[0]="8000011"; photonCutArray[0] = "007000000040000500000000"; ElecCutarray[0] = "90475400233202623710"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100 //Tracks 2011 + kAny + new psiPair Cut 0.60, 0.0 0.12 + Rconv > 35 cm
7417dc50 460
39f6cfbc 461}
462
463
464
465
7ab8e97e 466
58326f11 467
4fac3e9a 468 TList *EventCutList = new TList();
34fc0eec 469 TList *ConvCutList = new TList();
470 TList *MesonCutList = new TList();
471 TList *ElecCutList = new TList();
30b9a400 472
34fc0eec 473
474 TList *HeaderList = new TList();
475 TObjString *Header1 = new TObjString("pi0_1");
476 HeaderList->Add(Header1);
477 TObjString *Header3 = new TObjString("eta_2");
478 HeaderList->Add(Header3);
479
30b9a400 480
4fac3e9a 481 EventCutList->SetOwner(kTRUE);
482 AliConvEventCuts **analysisEventCuts = new AliConvEventCuts*[numberOfCuts];
483
484
34fc0eec 485 ConvCutList->SetOwner(kTRUE);
4fac3e9a 486 AliConversionPhotonCuts **analysisCuts = new AliConversionPhotonCuts*[numberOfCuts];
487
488
34fc0eec 489 MesonCutList->SetOwner(kTRUE);
490 AliConversionMesonCuts **analysisMesonCuts = new AliConversionMesonCuts*[numberOfCuts];
4fac3e9a 491
492
34fc0eec 493 ElecCutList->SetOwner(kTRUE);
494 AliDalitzElectronCuts **analysisElecCuts = new AliDalitzElectronCuts*[numberOfCuts];
495
496
497
498 for(Int_t i = 0; i<numberOfCuts; i++){
499
500
4fac3e9a 501 analysisEventCuts[i] = new AliConvEventCuts();
2d49ea4c 502
34fc0eec 503
30b9a400 504 if ( ( trainConfig >= 1 && trainConfig <= 6 ) || trainConfig == 9 || trainConfig == 11 || trainConfig == 13 || trainConfig == 14 || trainConfig == 16 || trainConfig == 17 || trainConfig == 18 || trainConfig == 19 || trainConfig == 20 || trainConfig == 21 || trainConfig == 22 || trainConfig == 23 ||
26b5002e 505 trainConfig == 28 || trainConfig == 29 || trainConfig == 30 || trainConfig == 31 || trainConfig == 32 || trainConfig == 33 || trainConfig == 37 || trainConfig == 38 || trainConfig == 39 || trainConfig == 40 || trainConfig == 41 || trainConfig == 41 || trainConfig == 43 || trainConfig == 44 ||
7417dc50 506 trainConfig == 45 || trainConfig == 46 || trainConfig == 47 || trainConfig == 48 || trainConfig == 49 || trainConfig == 50 || trainConfig == 51 || trainConfig == 52 || trainConfig == 54 || trainConfig == 55 || trainConfig == 56 || trainConfig == 57 || trainConfig == 58 || trainConfig == 59 ||
507 trainConfig == 60 ) {
34fc0eec 508
509 if (doWeighting){
510 if (generatorName.CompareTo("DPMJET")==0){
4fac3e9a 511 analysisEventCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kTRUE, kFALSE, fileNameInputForWeighting, "Pi0_DPMJET_LHC13b2_efix_pPb_5023GeV_MBV0A", "Eta_DPMJET_LHC13b2_efix_pPb_5023GeV_MBV0A", "","Pi0_Fit_Data_pPb_5023GeV_MBV0A","Eta_Fit_Data_pPb_5023GeV_MBV0A");
34fc0eec 512 } else if (generatorName.CompareTo("HIJING")==0){
4fac3e9a 513 analysisEventCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kTRUE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13e7_pPb_5023GeV_MBV0A", "Eta_Hijing_LHC13e7_pPb_5023GeV_MBV0A", "","Pi0_Fit_Data_pPb_5023GeV_MBV0A","Eta_Fit_Data_pPb_5023GeV_MBV0A");
34fc0eec 514 }
515 }
c04202fb 516 } else if ( trainConfig == 7 || trainConfig == 8 || trainConfig == 10 || trainConfig == 12 || trainConfig == 15 ){
78cea1d2 517
2d49ea4c 518 if (doWeighting){
4fac3e9a 519 analysisEventCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kTRUE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13e7_addSig_pPb_5023GeV_MBV0A", "Eta_Hijing_LHC13e7_addSig_pPb_5023GeV_MBV0A", "","Pi0_Fit_Data_pPb_5023GeV_MBV0A","Eta_Fit_Data_pPb_5023GeV_MBV0A");
2d49ea4c 520 }
34fc0eec 521 }
4fac3e9a 522
78cea1d2 523
34fc0eec 524
4fac3e9a 525 if( ! analysisEventCuts[i]->InitializeCutsFromCutString(eventCutArray[i].Data()) ){
526 cout<<"ERROR: analysisEventCuts [ " << i <<" ] "<<endl;
527 return 0;
528 }
529
530 if (doEtaShiftIndCuts) {
531 analysisEventCuts[i]->DoEtaShift(doEtaShiftIndCuts);
532 analysisEventCuts[i]->SetEtaShift(stringShift);
533 }
534
535 EventCutList->Add(analysisEventCuts[i]);
536 analysisEventCuts[i]->SetFillCutHistograms("",kFALSE);
537 analysisEventCuts[i]->SetAcceptedHeader(HeaderList);
538
539
540
541 analysisCuts[i] = new AliConversionPhotonCuts();
542
543 if( ! analysisCuts[i]->InitializeCutsFromCutString(photonCutArray[i].Data()) ) {
544 cout<<"ERROR: analysisCuts [ " << i <<" ] "<<endl;
545 return 0;
546 }
547 analysisCuts[i]->SetIsHeavyIon(isHeavyIon);
548 ConvCutList->Add(analysisCuts[i]);
549 analysisCuts[i]->SetFillCutHistograms("",kFALSE);
34fc0eec 550
4fac3e9a 551 analysisMesonCuts[i] = new AliConversionMesonCuts();
34fc0eec 552
4fac3e9a 553 if( ! analysisMesonCuts[i]->InitializeCutsFromCutString(MesonCutarray[i].Data()) ) {
34fc0eec 554 cout<<"ERROR: analysisMesonCuts [ " <<i<<" ] "<<endl;
555 return 0;
4fac3e9a 556 }
557 MesonCutList->Add(analysisMesonCuts[i]);
558 analysisMesonCuts[i]->SetFillCutHistograms("");
559
34fc0eec 560
c524a081 561 //TString cutName( Form("%s_%s_%s_%s",eventCutArray[i].Data(), photonCutArray[i].Data(),ElecCutarray[i].Data(),MesonCutarray[i].Data() ) );
34fc0eec 562
563
4fac3e9a 564 analysisElecCuts[i] = new AliDalitzElectronCuts();
565 if( !analysisElecCuts[i]->InitializeCutsFromCutString(ElecCutarray[i].Data())) {
34fc0eec 566
567 cout<< "ERROR: analysisElecCuts [ " <<i<<" ] "<<endl;
568 return 0;
4fac3e9a 569 }
570
571 ElecCutList->Add(analysisElecCuts[i]);
c524a081 572 analysisElecCuts[i]->SetFillCutHistograms("",kFALSE,ElecCutarray[i].Data());
4fac3e9a 573
34fc0eec 574
575 }
576
4fac3e9a 577
578
579
580 task->SetEventCutList(numberOfCuts,EventCutList);
34fc0eec 581 task->SetConversionCutList(numberOfCuts,ConvCutList);
582 task->SetMesonCutList(MesonCutList);
583 task->SetElectronCutList(ElecCutList);
584
585 task->SetMoveParticleAccordingToVertex(kTRUE);
2d49ea4c 586
587 if(enableSetProdVtxVGamma) task->SetProductionVertextoVGamma(kTRUE);
34fc0eec 588 if(enableQAMesonTask) task->SetDoMesonQA(kTRUE);
589 if(enableDoMesonChic) task->SetDoChicAnalysis(kTRUE);
590
591 //connect containers
592 AliAnalysisDataContainer *coutput =
593 mgr->CreateContainer(Form("GammaConvDalitzV1_%i",trainConfig), TList::Class(),
594 AliAnalysisManager::kOutputContainer,Form("GammaConvV1Dalitz_%i.root",trainConfig));
595
596 mgr->AddTask(task);
597 mgr->ConnectInput(task,0,cinput);
598 mgr->ConnectOutput(task,1,coutput);
599
600 return;
601
602}