- addtask revisited
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / macros / AddTask_GammaConvV1_PbPb.C
1 void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set of cuts
2                               Bool_t isMC   = kFALSE, //run MC 
3                               Int_t enableQAMesonTask = 0, //enable QA in AliAnalysisTaskGammaConvV1
4                               Int_t enableQAPhotonTask = 0, // enable additional QA task
5                               TString fileNameInputForWeighting = "MCSpectraInput.root", // path to file for weigting input
6                               Int_t doWeightingInt = 0,  //enable Weighting
7                               TString cutnumberAODBranch = "1000000060084000001500000",
8                               TString periodName = "LHC13d2",
9                                                           Bool_t doWeighting = kFALSE
10                            ) {
11
12    // ================= Load Librariers =================================
13    gSystem->Load("libCore.so");  
14    gSystem->Load("libTree.so");
15    gSystem->Load("libGeom.so");
16    gSystem->Load("libVMC.so");
17    gSystem->Load("libPhysics.so");
18    gSystem->Load("libMinuit");
19    gSystem->Load("libSTEERBase");
20    gSystem->Load("libESD");
21    gSystem->Load("libAOD");
22    gSystem->Load("libANALYSIS");
23    gSystem->Load("libANALYSISalice");  
24    gSystem->Load("libPWGGAGammaConv.so");
25    gSystem->Load("libCDB.so");
26    gSystem->Load("libSTEER.so");
27    gSystem->Load("libSTEERBase.so");
28    gSystem->Load("libTENDER.so");
29    gSystem->Load("libTENDERSupplies.so");
30    
31    // ================== GetAnalysisManager ===============================
32    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
33    if (!mgr) {
34       Error(Form("AddTask_GammaConvV1_%i",trainConfig), "No analysis manager found.");
35       return ;
36    }
37
38    // ================== GetInputEventHandler =============================
39    AliVEventHandler *inputHandler=mgr->GetInputEventHandler();
40    
41    //========= Add PID Reponse to ANALYSIS manager ====
42    if(!(AliPIDResponse*)mgr->GetTask("PIDResponseTask")){
43       gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
44       AddTaskPIDResponse(isMC);
45    }
46    
47    //=========  Set Cutnumber for V0Reader ================================
48    TString cutnumber = "1000000000084001001500000000"; 
49    AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
50    //========= Add V0 Reader to  ANALYSIS manager if not yet existent =====
51    if( !(AliV0ReaderV1*)mgr->GetTask("V0ReaderV1") ){
52       AliV0ReaderV1 *fV0ReaderV1 = new AliV0ReaderV1("V0ReaderV1");
53       
54       fV0ReaderV1->SetUseOwnXYZCalculation(kTRUE);
55       fV0ReaderV1->SetCreateAODs(kFALSE);// AOD Output
56       fV0ReaderV1->SetUseAODConversionPhoton(kTRUE);
57
58       if (!mgr) {
59          Error("AddTask_V0ReaderV1", "No analysis manager found.");
60          return;
61       }
62
63       // Set AnalysisCut Number
64       AliConversionCuts *fCuts=NULL;
65       if(cutnumber!=""){
66          fCuts= new AliConversionCuts(cutnumber.Data(),cutnumber.Data());
67          fCuts->SetPreSelectionCutFlag(kTRUE);
68          if(fCuts->InitializeCutsFromCutString(cutnumber.Data())){
69             fV0ReaderV1->SetConversionCuts(fCuts);
70             fCuts->SetFillCutHistograms("",kTRUE);
71          }
72       }
73       
74       if(inputHandler->IsA()==AliAODInputHandler::Class()){
75       // AOD mode
76          fV0ReaderV1->SetDeltaAODBranchName(Form("GammaConv_%s_gamma",cutnumberAODBranch.Data()));
77       }
78       fV0ReaderV1->Init();
79
80       AliLog::SetGlobalLogLevel(AliLog::kInfo);
81
82       //connect input V0Reader
83       mgr->AddTask(fV0ReaderV1);
84       mgr->ConnectInput(fV0ReaderV1,0,cinput);
85
86    }
87
88    //================================================
89    //========= Add task to the ANALYSIS manager =====
90    //================================================
91    AliAnalysisTaskGammaConvV1 *task=NULL;
92    task= new AliAnalysisTaskGammaConvV1(Form("GammaConvV1_%i",trainConfig));
93    task->SetIsHeavyIon(1);
94    task->SetIsMC(isMC);
95    // Cut Numbers to use in Analysis
96    Int_t numberOfCuts = 5;
97
98    TString *cutarray = new TString[numberOfCuts];
99    TString *mesonCutArray = new TString[numberOfCuts];
100
101    if (trainConfig == 1){ // Standard cuts
102       cutarray[ 0] = "6010001042092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
103       cutarray[ 1] = "6120001042092970023220000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
104       cutarray[ 2] = "5010001042092970023220000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
105       cutarray[ 3] = "5120001042092970023220000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
106       cutarray[ 4] = "5020001042092970023220000000"; mesonCutArray[ 4] = "01522045009000"; // 0-20%
107    } else if (trainConfig == 2) { // Standard cuts
108       cutarray[ 0] = "5240001042092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
109       cutarray[ 1] = "5460001042092970023220000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
110       cutarray[ 2] = "5680001042092970023220000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
111       cutarray[ 3] = "5480001042092970023220000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
112       cutarray[ 4] = "5490001042092970023220000000"; mesonCutArray[ 4] = "01522065009000"; // 40-90%
113    } else if (trainConfig == 3) { // Standard cuts only added signals
114       cutarray[ 0] = "6010002042092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
115       cutarray[ 1] = "6120002042092970023220000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
116       cutarray[ 2] = "5010002042092970023220000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
117       cutarray[ 3] = "5120002042092970023220000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
118       cutarray[ 4] = "5020002042092970023220000000"; mesonCutArray[ 4] = "01522045009000"; // 0-20%
119    } else if (trainConfig == 4) { // Standard cuts only added signals
120       cutarray[ 0] = "5240002042092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
121       cutarray[ 1] = "5460002042092970023220000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
122       cutarray[ 2] = "5680002042092970023220000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
123       cutarray[ 3] = "5480002042092970023220000000"; mesonCutArray[ 3] = "01522065009000"; // 20-40% 
124       cutarray[ 4] = "5490002042092970023220000000"; mesonCutArray[ 4] = "01522065009000"; // 40-90%
125    } else if (trainConfig == 5){ // R-minCut 7.5 cm
126       cutarray[ 0] = "6010001049092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
127       cutarray[ 1] = "6120001049092970023220000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
128       cutarray[ 2] = "5010001049092970023220000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
129       cutarray[ 3] = "5120001049092970023220000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
130       cutarray[ 4] = "5020001049092970023220000000"; mesonCutArray[ 4] = "01522045009000"; // 0-20%
131    } else if (trainConfig == 6) { // R-minCut 7.5 cm
132       cutarray[ 0] = "5240001049092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
133       cutarray[ 1] = "5460001049092970023220000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
134       cutarray[ 2] = "5680001049092970023220000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
135       cutarray[ 3] = "5480001049092970023220000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
136       cutarray[ 4] = "5490001049092970023220000000"; mesonCutArray[ 4] = "01522065009000"; // 40-90%
137    } else if (trainConfig == 7) {// R-minCut 7.5 cm
138       cutarray[ 0] = "6010002049092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
139       cutarray[ 1] = "6120002049092970023220000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
140       cutarray[ 2] = "5010002049092970023220000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
141       cutarray[ 3] = "5120002049092970023220000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
142       cutarray[ 4] = "5020002049092970023220000000"; mesonCutArray[ 4] = "01522045009000"; // 0-20%
143    } else if (trainConfig == 8) { // R-minCut 7.5 cm
144       cutarray[ 0] = "5240002040092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
145       cutarray[ 1] = "5460002049092970023220000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
146       cutarray[ 2] = "5680002049092970023220000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
147       cutarray[ 3] = "5480002049092970023220000000"; mesonCutArray[ 3] = "01522065009000"; // 20-40% 
148       cutarray[ 4] = "5490002049092970023220000000"; mesonCutArray[ 4] = "01522065009000"; // 40-90%   
149    } else if (trainConfig == 9){ // R-minCut 12.5 cm
150       cutarray[ 0] = "6010001048092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
151       cutarray[ 1] = "6120001048092970023220000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
152       cutarray[ 2] = "5010001048092970023220000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
153       cutarray[ 3] = "5120001048092970023220000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
154       cutarray[ 4] = "5020001048092970023220000000"; mesonCutArray[ 4] = "01522045009000"; // 0-20%
155    } else if (trainConfig == 10) { // R-minCut 12.5 cm
156       cutarray[ 0] = "5240001048092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
157       cutarray[ 1] = "5460001048092970023220000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
158       cutarray[ 2] = "5680001048092970023220000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
159       cutarray[ 3] = "5480001048092970023220000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
160       cutarray[ 4] = "5490001048092970023220000000"; mesonCutArray[ 4] = "01522065009000"; // 40-90%
161    } else if (trainConfig == 11) {// R-minCut 12.5 cm
162       cutarray[ 0] = "6010002048092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
163       cutarray[ 1] = "6120002048092970023220000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
164       cutarray[ 2] = "5010002048092970023220000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
165       cutarray[ 3] = "5120002048092970023220000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
166       cutarray[ 4] = "5020002048092970023220000000"; mesonCutArray[ 4] = "01522045009000"; // 0-20%
167    } else if (trainConfig == 12) { // R-minCut 12.5 cm
168       cutarray[ 0] = "5240002040092970023220000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
169       cutarray[ 1] = "5460002048092970023220000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
170       cutarray[ 2] = "5680002048092970023220000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
171       cutarray[ 3] = "5480002048092970023220000000"; mesonCutArray[ 3] = "01522065009000"; // 20-40% 
172       cutarray[ 4] = "5490002048092970023220000000"; mesonCutArray[ 4] = "01522065009000"; // 40-90%      
173    } else  if (trainConfig == 13){ // eta 0.65 (new standard), y = 0.6 (new Standard)
174       cutarray[ 0] = "6010001032092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 0-5%
175       cutarray[ 1] = "6120001032092970023220000000"; mesonCutArray[ 1] = "01523045009000"; // 5-10%
176       cutarray[ 2] = "5010001032092970023220000000"; mesonCutArray[ 2] = "01523045009000"; // 0-10%
177       cutarray[ 3] = "5120001032092970023220000000"; mesonCutArray[ 3] = "01523045009000"; // 10-20%
178       cutarray[ 4] = "5020001032092970023220000000"; mesonCutArray[ 4] = "01523045009000"; // 0-20%
179    } else if (trainConfig == 14) {  // eta 0.65 (new standard), y = 0.6 (new Standard)
180       cutarray[ 0] = "5240001032092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 20-40%
181       cutarray[ 1] = "5460001032092970023220000000"; mesonCutArray[ 1] = "01523065009000"; // 40-60%
182       cutarray[ 2] = "5680001032092970023220000000"; mesonCutArray[ 2] = "01523065009000"; // 60-80%
183       cutarray[ 3] = "5480001032092970023220000000"; mesonCutArray[ 3] = "01523065009000"; // 40-80%
184       cutarray[ 4] = "5490001032092970023220000000"; mesonCutArray[ 4] = "01523065009000"; // 40-90%
185    } else if (trainConfig == 15) { // eta 0.65 (new standard), y = 0.6 (new Standard) cuts only added signals
186       cutarray[ 0] = "6010002032092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 0-5%
187       cutarray[ 1] = "6120002032092970023220000000"; mesonCutArray[ 1] = "01523045009000"; // 5-10%
188       cutarray[ 2] = "5010002032092970023220000000"; mesonCutArray[ 2] = "01523045009000"; // 0-10%
189       cutarray[ 3] = "5120002032092970023220000000"; mesonCutArray[ 3] = "01523045009000"; // 10-20%
190       cutarray[ 4] = "5020002032092970023220000000"; mesonCutArray[ 4] = "01523045009000"; // 0-20%
191    } else if (trainConfig == 16) { // eta 0.65 (new standard), y = 0.6 (new Standard) cuts only added signals
192       cutarray[ 0] = "5240002032092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 20-40%
193       cutarray[ 1] = "5460002032092970023220000000"; mesonCutArray[ 1] = "01523065009000"; // 40-60%
194       cutarray[ 2] = "5680002032092970023220000000"; mesonCutArray[ 2] = "01523065009000"; // 60-80%
195       cutarray[ 3] = "5480002032092970023220000000"; mesonCutArray[ 3] = "01523065009000"; // 20-40% 
196       cutarray[ 4] = "5490002032092970023220000000"; mesonCutArray[ 4] = "01523065009000"; // 40-90%
197    } else  if (trainConfig == 17){ // eta 0.6, y = 0.6 (new Standard)
198       cutarray[ 0] = "6010001012092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 0-5%
199       cutarray[ 1] = "6120001012092970023220000000"; mesonCutArray[ 1] = "01523045009000"; // 5-10%
200       cutarray[ 2] = "5010001012092970023220000000"; mesonCutArray[ 2] = "01523045009000"; // 0-10%
201       cutarray[ 3] = "5120001012092970023220000000"; mesonCutArray[ 3] = "01523045009000"; // 10-20%
202       cutarray[ 4] = "5020001012092970023220000000"; mesonCutArray[ 4] = "01523045009000"; // 0-20%
203    } else if (trainConfig == 18) {  // eta 0.6, y = 0.6 (new Standard)
204       cutarray[ 0] = "5240001012092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 20-40%
205       cutarray[ 1] = "5460001012092970023220000000"; mesonCutArray[ 1] = "01523065009000"; // 40-60%
206       cutarray[ 2] = "5680001012092970023220000000"; mesonCutArray[ 2] = "01523065009000"; // 60-80%
207       cutarray[ 3] = "5480001012092970023220000000"; mesonCutArray[ 3] = "01523065009000"; // 40-80%
208       cutarray[ 4] = "5490001012092970023220000000"; mesonCutArray[ 4] = "01523065009000"; // 40-90%
209    } else if (trainConfig == 19) { // eta 0.6, y = 0.6 (new Standard) cuts only added signals
210       cutarray[ 0] = "6010002012092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 0-5%
211       cutarray[ 1] = "6120002012092970023220000000"; mesonCutArray[ 1] = "01523045009000"; // 5-10%
212       cutarray[ 2] = "5010002012092970023220000000"; mesonCutArray[ 2] = "01523045009000"; // 0-10%
213       cutarray[ 3] = "5120002012092970023220000000"; mesonCutArray[ 3] = "01523045009000"; // 10-20%
214       cutarray[ 4] = "5020002012092970023220000000"; mesonCutArray[ 4] = "01523045009000"; // 0-20%
215    } else if (trainConfig == 20) { // eta 0.6, y = 0.6 (new Standard) cuts only added signals
216       cutarray[ 0] = "5240002012092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 20-40%
217       cutarray[ 1] = "5460002012092970023220000000"; mesonCutArray[ 1] = "01523065009000"; // 40-60%
218       cutarray[ 2] = "5680002012092970023220000000"; mesonCutArray[ 2] = "01523065009000"; // 60-80%
219       cutarray[ 3] = "5480002012092970023220000000"; mesonCutArray[ 3] = "01523065009000"; // 20-40% 
220       cutarray[ 4] = "5490002012092970023220000000"; mesonCutArray[ 4] = "01523065009000"; // 40-90%
221    } else  if (trainConfig == 21){ // eta 0.7, y = 0.6 (new Standard)
222       cutarray[ 0] = "6010001072092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 0-5%
223       cutarray[ 1] = "6120001072092970023220000000"; mesonCutArray[ 1] = "01523045009000"; // 5-10%
224       cutarray[ 2] = "5010001072092970023220000000"; mesonCutArray[ 2] = "01523045009000"; // 0-10%
225       cutarray[ 3] = "5120001072092970023220000000"; mesonCutArray[ 3] = "01523045009000"; // 10-20%
226       cutarray[ 4] = "5020001072092970023220000000"; mesonCutArray[ 4] = "01523045009000"; // 0-20%
227    } else if (trainConfig == 22) {  // eta 0.7, y = 0.6 (new Standard)
228       cutarray[ 0] = "5240001072092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 20-40%
229       cutarray[ 1] = "5460001072092970023220000000"; mesonCutArray[ 1] = "01523065009000"; // 40-60%
230       cutarray[ 2] = "5680001072092970023220000000"; mesonCutArray[ 2] = "01523065009000"; // 60-80%
231       cutarray[ 3] = "5480001072092970023220000000"; mesonCutArray[ 3] = "01523065009000"; // 40-80%
232       cutarray[ 4] = "5490001072092970023220000000"; mesonCutArray[ 4] = "01523065009000"; // 40-90%
233    } else if (trainConfig == 23) { // eta 0.7, y = 0.6 (new Standard) cuts only added signals
234       cutarray[ 0] = "6010002072092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 0-5%
235       cutarray[ 1] = "6120002072092970023220000000"; mesonCutArray[ 1] = "01523045009000"; // 5-10%
236       cutarray[ 2] = "5010002072092970023220000000"; mesonCutArray[ 2] = "01523045009000"; // 0-10%
237       cutarray[ 3] = "5120002072092970023220000000"; mesonCutArray[ 3] = "01523045009000"; // 10-20%
238       cutarray[ 4] = "5020002072092970023220000000"; mesonCutArray[ 4] = "01523045009000"; // 0-20%
239    } else if (trainConfig == 24) { // eta 0.7, y = 0.6 (new Standard) cuts only added signals
240       cutarray[ 0] = "5240002072092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 20-40%
241       cutarray[ 1] = "5460002072092970023220000000"; mesonCutArray[ 1] = "01523065009000"; // 40-60%
242       cutarray[ 2] = "5680002072092970023220000000"; mesonCutArray[ 2] = "01523065009000"; // 60-80%
243       cutarray[ 3] = "5480002072092970023220000000"; mesonCutArray[ 3] = "01523065009000"; // 20-40% 
244       cutarray[ 4] = "5490002072092970023220000000"; mesonCutArray[ 4] = "01523065009000"; // 40-90%
245    } else  if (trainConfig == 25){ // eta 0.5, y = 0.6 (new Standard)
246       cutarray[ 0] = "6010001052092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 0-5%
247       cutarray[ 1] = "6120001052092970023220000000"; mesonCutArray[ 1] = "01523045009000"; // 5-10%
248       cutarray[ 2] = "5010001052092970023220000000"; mesonCutArray[ 2] = "01523045009000"; // 0-10%
249       cutarray[ 3] = "5120001052092970023220000000"; mesonCutArray[ 3] = "01523045009000"; // 10-20%
250       cutarray[ 4] = "5020001052092970023220000000"; mesonCutArray[ 4] = "01523045009000"; // 0-20%
251    } else if (trainConfig == 26) {  // eta 0.5, y = 0.6 (new Standard)
252       cutarray[ 0] = "5240001052092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 20-40%
253       cutarray[ 1] = "5460001052092970023220000000"; mesonCutArray[ 1] = "01523065009000"; // 40-60%
254       cutarray[ 2] = "5680001052092970023220000000"; mesonCutArray[ 2] = "01523065009000"; // 60-80%
255       cutarray[ 3] = "5480001052092970023220000000"; mesonCutArray[ 3] = "01523065009000"; // 40-80%
256       cutarray[ 4] = "5490001052092970023220000000"; mesonCutArray[ 4] = "01523065009000"; // 40-90%
257    } else if (trainConfig == 27) { // eta 0.5, y = 0.6 (new Standard) cuts only added signals
258       cutarray[ 0] = "6010002052092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 0-5%
259       cutarray[ 1] = "6120002052092970023220000000"; mesonCutArray[ 1] = "01523045009000"; // 5-10%
260       cutarray[ 2] = "5010002052092970023220000000"; mesonCutArray[ 2] = "01523045009000"; // 0-10%
261       cutarray[ 3] = "5120002052092970023220000000"; mesonCutArray[ 3] = "01523045009000"; // 10-20%
262       cutarray[ 4] = "5020002052092970023220000000"; mesonCutArray[ 4] = "01523045009000"; // 0-20%
263    } else if (trainConfig == 28) { // eta 0.5, y = 0.6 (new Standard) cuts only added signals
264       cutarray[ 0] = "5240002052092970023220000000"; mesonCutArray[ 0] = "01523045009000"; // 20-40%
265       cutarray[ 1] = "5460002052092970023220000000"; mesonCutArray[ 1] = "01523065009000"; // 40-60%
266       cutarray[ 2] = "5680002052092970023220000000"; mesonCutArray[ 2] = "01523065009000"; // 60-80%
267       cutarray[ 3] = "5480002052092970023220000000"; mesonCutArray[ 3] = "01523065009000"; // 20-40% 
268       cutarray[ 4] = "5490002052092970023220000000"; mesonCutArray[ 4] = "01523065009000"; // 40-90%
269    } else  if (trainConfig == 29){ // eta 0.65 (new standard), y = 0.6 (new Standard) pt dependent alpha
270       cutarray[ 0] = "6010001032092970023220000000"; mesonCutArray[ 0] = "01523015009000"; // 0-5%
271       cutarray[ 1] = "6120001032092970023220000000"; mesonCutArray[ 1] = "01523015009000"; // 5-10%
272       cutarray[ 2] = "5010001032092970023220000000"; mesonCutArray[ 2] = "01523015009000"; // 0-10%
273       cutarray[ 3] = "5120001032092970023220000000"; mesonCutArray[ 3] = "01523015009000"; // 10-20%
274       cutarray[ 4] = "5020001032092970023220000000"; mesonCutArray[ 4] = "01523015009000"; // 0-20%
275    } else if (trainConfig == 30) {  // eta 0.65 (new standard), y = 0.6 (new Standard) pt dependent alpha
276       cutarray[ 0] = "5240001032092970023220000000"; mesonCutArray[ 0] = "01523015009000"; // 20-40%
277       cutarray[ 1] = "5460001032092970023220000000"; mesonCutArray[ 1] = "01523025009000"; // 40-60%
278       cutarray[ 2] = "5680001032092970023220000000"; mesonCutArray[ 2] = "01523025009000"; // 60-80%
279       cutarray[ 3] = "5480001032092970023220000000"; mesonCutArray[ 3] = "01523025009000"; // 40-80%
280       cutarray[ 4] = "5490001032092970023220000000"; mesonCutArray[ 4] = "01523025009000"; // 40-90%
281    } else if (trainConfig == 31) { // eta 0.65 (new standard), y = 0.6 (new Standard) cuts only added signals, pt dependent alpha
282       cutarray[ 0] = "6010002032092970023220000000"; mesonCutArray[ 0] = "01523015009000"; // 0-5%
283       cutarray[ 1] = "6120002032092970023220000000"; mesonCutArray[ 1] = "01523015009000"; // 5-10%
284       cutarray[ 2] = "5010002032092970023220000000"; mesonCutArray[ 2] = "01523015009000"; // 0-10%
285       cutarray[ 3] = "5120002032092970023220000000"; mesonCutArray[ 3] = "01523015009000"; // 10-20%
286       cutarray[ 4] = "5020002032092970023220000000"; mesonCutArray[ 4] = "01523015009000"; // 0-20%
287    } else if (trainConfig == 32) { // eta 0.65 (new standard), y = 0.6 (new Standard) cuts only added signals, pt dependent alpha
288       cutarray[ 0] = "5240002032092970023220000000"; mesonCutArray[ 0] = "01523015009000"; // 20-40%
289       cutarray[ 1] = "5460002032092970023220000000"; mesonCutArray[ 1] = "01523025009000"; // 40-60%
290       cutarray[ 2] = "5680002032092970023220000000"; mesonCutArray[ 2] = "01523025009000"; // 60-80%
291       cutarray[ 3] = "5480002032092970023220000000"; mesonCutArray[ 3] = "01523025009000"; // 20-40% 
292       cutarray[ 4] = "5490002032092970023220000000"; mesonCutArray[ 4] = "01523025009000"; // 40-90%
293    } else if (trainConfig == 33){ // Standard cuts, eta 0.9, only to be run on data
294       cutarray[ 0] = "6010001002092970023220000000"; mesonCutArray[ 0] = "01525045009000"; // 0-5%
295       cutarray[ 1] = "6120001002092970023220000000"; mesonCutArray[ 1] = "01525045009000"; // 5-10%
296       cutarray[ 2] = "5010001002092970023220000000"; mesonCutArray[ 2] = "01525045009000"; // 0-10%
297       cutarray[ 3] = "5120001002092970023220000000"; mesonCutArray[ 3] = "01525045009000"; // 10-20%
298       cutarray[ 4] = "5020001002092970023220000000"; mesonCutArray[ 4] = "01525045009000"; // 0-20%
299    } else if (trainConfig == 34) { // Standard cuts, eta 0.9, only to be run on data
300       cutarray[ 0] = "5240001002092970023220000000"; mesonCutArray[ 0] = "01525045009000"; // 20-40%
301       cutarray[ 1] = "5460001002092970023220000000"; mesonCutArray[ 1] = "01525065009000"; // 40-60%
302       cutarray[ 2] = "5680001002092970023220000000"; mesonCutArray[ 2] = "01525065009000"; // 60-80%
303       cutarray[ 3] = "5480001002092970023220000000"; mesonCutArray[ 3] = "01525065009000"; // 40-80%
304       cutarray[ 4] = "5350001002092970023220000000"; mesonCutArray[ 4] = "01525065009000"; // 40-90%   
305    } else if (trainConfig == 35){ // Standard cuts, eta 1.4, only to be run on data
306       cutarray[ 0] = "6010001022092970023220000000"; mesonCutArray[ 0] = "01520045009000"; // 0-5%
307       cutarray[ 1] = "6120001022092970023220000000"; mesonCutArray[ 1] = "01520045009000"; // 5-10%
308       cutarray[ 2] = "5010001022092970023220000000"; mesonCutArray[ 2] = "01520045009000"; // 0-10%
309       cutarray[ 3] = "5120001022092970023220000000"; mesonCutArray[ 3] = "01520045009000"; // 10-20%
310       cutarray[ 4] = "5020001022092970023220000000"; mesonCutArray[ 4] = "01520045009000"; // 0-20%
311    } else if (trainConfig == 36) { // Standard cuts, eta 1.4, only to be run on data
312       cutarray[ 0] = "5240001022092970023220000000"; mesonCutArray[ 0] = "01520045009000"; // 20-40%
313       cutarray[ 1] = "5460001022092970023220000000"; mesonCutArray[ 1] = "01520065009000"; // 40-60%
314       cutarray[ 2] = "5680001022092970023220000000"; mesonCutArray[ 2] = "01520065009000"; // 60-80%
315       cutarray[ 3] = "5480001022092970023220000000"; mesonCutArray[ 3] = "01520065009000"; // 40-80%
316       cutarray[ 4] = "5350001022092970023220000000"; mesonCutArray[ 4] = "01520065009000"; // 40-90%   
317    } else if (trainConfig == 37){ // Standard cuts, eta 0.9, only to be run on data : kMB
318       cutarray[ 0] = "6014001002092970023220000000"; mesonCutArray[ 0] = "01525045009000"; // 0-5%
319       cutarray[ 1] = "6124001002092970023220000000"; mesonCutArray[ 1] = "01525045009000"; // 5-10%
320       cutarray[ 2] = "5014001002092970023220000000"; mesonCutArray[ 2] = "01525045009000"; // 0-10%
321       cutarray[ 3] = "5124001002092970023220000000"; mesonCutArray[ 3] = "01525045009000"; // 10-20%
322       cutarray[ 4] = "5024001002092970023220000000"; mesonCutArray[ 4] = "01525045009000"; // 0-20%
323    } else if (trainConfig == 38) { // Standard cuts, eta 0.9, only to be run on data : kMB
324       cutarray[ 0] = "5244001002092970023220000000"; mesonCutArray[ 0] = "01525045009000"; // 20-40%
325       cutarray[ 1] = "5464001002092970023220000000"; mesonCutArray[ 1] = "01525065009000"; // 40-60%
326       cutarray[ 2] = "5684001002092970023220000000"; mesonCutArray[ 2] = "01525065009000"; // 60-80%
327       cutarray[ 3] = "5484001002092970023220000000"; mesonCutArray[ 3] = "01525065009000"; // 40-80%
328       cutarray[ 4] = "5354001002092970023220000000"; mesonCutArray[ 4] = "01525065009000"; // 40-90%   
329    } else if (trainConfig == 39){ // Standard cuts, eta 0.9, only to be run on data :kCentral
330       cutarray[ 0] = "6015001002092970023220000000"; mesonCutArray[ 0] = "01525045009000"; // 0-5%
331       cutarray[ 1] = "6125001002092970023220000000"; mesonCutArray[ 1] = "01525045009000"; // 5-10%
332       cutarray[ 2] = "5015001002092970023220000000"; mesonCutArray[ 2] = "01525045009000"; // 0-10%
333       cutarray[ 3] = "5125001002092970023220000000"; mesonCutArray[ 3] = "01525045009000"; // 10-20%
334       cutarray[ 4] = "5025001002092970023220000000"; mesonCutArray[ 4] = "01525045009000"; // 0-20%
335    } else if (trainConfig == 40) { // Standard cuts, eta 0.9, only to be run on data : kCentral
336       cutarray[ 0] = "5245001002092970023220000000"; mesonCutArray[ 0] = "01525045009000"; // 20-40%
337       cutarray[ 1] = "5465001002092970023220000000"; mesonCutArray[ 1] = "01525065009000"; // 40-60%
338       cutarray[ 2] = "5685001002092970023220000000"; mesonCutArray[ 2] = "01525065009000"; // 60-80%
339       cutarray[ 3] = "5485001002092970023220000000"; mesonCutArray[ 3] = "01525065009000"; // 40-80%
340       cutarray[ 4] = "5355001002092970023220000000"; mesonCutArray[ 4] = "01525065009000"; // 40-90%   
341    } else if (trainConfig == 41){ // Standard cuts, eta 0.9, only to be run on data :kSemiCentral
342       cutarray[ 0] = "6016001002092970023220000000"; mesonCutArray[ 0] = "01525045009000"; // 0-5%
343       cutarray[ 1] = "6126001002092970023220000000"; mesonCutArray[ 1] = "01525045009000"; // 5-10%
344       cutarray[ 2] = "5016001002092970023220000000"; mesonCutArray[ 2] = "01525045009000"; // 0-10%
345       cutarray[ 3] = "5126001002092970023220000000"; mesonCutArray[ 3] = "01525045009000"; // 10-20%
346       cutarray[ 4] = "5026001002092970023220000000"; mesonCutArray[ 4] = "01525045009000"; // 0-20%
347    } else if (trainConfig == 42) { // Standard cuts, eta 0.9, only to be run on data :kSemiCentral
348       cutarray[ 0] = "5236001002092970023220000000"; mesonCutArray[ 0] = "01525065009000"; 
349       cutarray[ 1] = "5346001002092970023220000000"; mesonCutArray[ 1] = "01525065009000"; 
350       cutarray[ 2] = "5456001002092970023220000000"; mesonCutArray[ 2] = "01525065009000"; 
351       cutarray[ 3] = "5566001002092970023220000000"; mesonCutArray[ 3] = "01525065009000"; 
352       cutarray[ 4] = "5676001002092970023220000000"; mesonCutArray[ 4] = "01525065009000"; 
353    } else if (trainConfig == 43){ // Standard cuts, eta 0.9, only to be run on data
354       cutarray[ 0] = "5230001002092970023220000000"; mesonCutArray[ 0] = "01525045009000"; 
355       cutarray[ 1] = "5340001002092970023220000000"; mesonCutArray[ 1] = "01525065009000"; 
356       cutarray[ 2] = "5450001002092970023220000000"; mesonCutArray[ 2] = "01525065009000"; 
357       cutarray[ 3] = "5560001002092970023220000000"; mesonCutArray[ 3] = "01525065009000"; 
358       cutarray[ 4] = "5250001002092970023220000000"; mesonCutArray[ 4] = "01525065009000"; 
359    } else if ( trainConfig == 44){ // qt elipse cut 0.05
360       cutarray[ 0] = "6010001002092970028220000000"; mesonCutArray[ 0] = "01525065009000"; // 0-5%
361       cutarray[ 1] = "6120001002092970028220000000"; mesonCutArray[ 1] = "01525065009000"; // 5-10%
362       cutarray[ 2] = "5010001002092970028220000000"; mesonCutArray[ 2] = "01525065009000"; // 0-10%
363       cutarray[ 3] = "5120001002092970028220000000"; mesonCutArray[ 3] = "01525065009000"; // 10-20%
364       cutarray[ 4] = "5020001002092970028220000000"; mesonCutArray[ 4] = "01525065009000"; // 0-20%
365    } else if ( trainConfig == 45) { // qt elipse cut 0.05
366       cutarray[ 0] = "5240001002092970028220000000"; mesonCutArray[ 0] = "01525065009000"; // 20-40%
367       cutarray[ 1] = "5460001002092970028220000000"; mesonCutArray[ 1] = "01525065009000"; // 40-60%
368       cutarray[ 2] = "5680001002092970028220000000"; mesonCutArray[ 2] = "01525065009000"; // 60-80%
369       cutarray[ 3] = "5480001002092970028220000000"; mesonCutArray[ 3] = "01525065009000"; // 40-80%
370       cutarray[ 4] = "5350001002092970028220000000"; mesonCutArray[ 4] = "01525065009000"; // 30-50%  
371    } else if ( trainConfig == 46){ // qt elipse cut 0.05
372       cutarray[ 0] = "5230001002092970028220000000"; mesonCutArray[ 0] = "01525065009000"; // 20-30% 
373       cutarray[ 1] = "5340001002092970028220000000"; mesonCutArray[ 1] = "01525065009000"; // 30-40% 
374       cutarray[ 2] = "5450001002092970028220000000"; mesonCutArray[ 2] = "01525065009000"; // 40-50% 
375       cutarray[ 3] = "5560001002092970028220000000"; mesonCutArray[ 3] = "01525065009000"; // 50-60% 
376       cutarray[ 4] = "5250001002092970028220000000"; mesonCutArray[ 4] = "01525065009000"; // 60-70% 
377    } else if ( trainConfig == 47){ // cos(theta_point) cut 0.85
378       cutarray[ 0] = "6010001002092970023220400000"; mesonCutArray[ 0] = "01525065009000"; // 0-5%
379       cutarray[ 1] = "6120001002092970023220400000"; mesonCutArray[ 1] = "01525065009000"; // 5-10%
380       cutarray[ 2] = "5010001002092970023220400000"; mesonCutArray[ 2] = "01525065009000"; // 0-10%
381       cutarray[ 3] = "5120001002092970023220400000"; mesonCutArray[ 3] = "01525065009000"; // 10-20%
382       cutarray[ 4] = "5020001002092970023220400000"; mesonCutArray[ 4] = "01525065009000"; // 0-20%
383    } else if ( trainConfig == 48) { // cos(theta_point) cut 0.85
384       cutarray[ 0] = "5240001002092970023220400000"; mesonCutArray[ 0] = "01525065009000"; // 20-40%
385       cutarray[ 1] = "5460001002092970023220400000"; mesonCutArray[ 1] = "01525065009000"; // 40-60%
386       cutarray[ 2] = "5680001002092970023220400000"; mesonCutArray[ 2] = "01525065009000"; // 60-80%
387       cutarray[ 3] = "5480001002092970023220400000"; mesonCutArray[ 3] = "01525065009000"; // 40-80%
388       cutarray[ 4] = "5350001002092970023220400000"; mesonCutArray[ 4] = "01525065009000"; // 30-50%  
389    } else if ( trainConfig == 49){ // cos(theta_point) cut 0.85
390       cutarray[ 0] = "5230001002092970023220400000"; mesonCutArray[ 0] = "01525065009000"; // 20-30% 
391       cutarray[ 1] = "5340001002092970023220400000"; mesonCutArray[ 1] = "01525065009000"; // 30-40% 
392       cutarray[ 2] = "5450001002092970023220400000"; mesonCutArray[ 2] = "01525065009000"; // 40-50% 
393       cutarray[ 3] = "5560001002092970023220400000"; mesonCutArray[ 3] = "01525065009000"; // 50-60% 
394       cutarray[ 4] = "5250001002092970023220400000"; mesonCutArray[ 4] = "01525065009000"; // 60-70% 
395    } else if ( trainConfig == 50){ // psi pair 2D 0.05
396       cutarray[ 0] = "6010001002092970023260000000"; mesonCutArray[ 0] = "01525065009000"; // 0-5%
397       cutarray[ 1] = "6120001002092970023260000000"; mesonCutArray[ 1] = "01525065009000"; // 5-10%
398       cutarray[ 2] = "5010001002092970023260000000"; mesonCutArray[ 2] = "01525065009000"; // 0-10%
399       cutarray[ 3] = "5120001002092970023260000000"; mesonCutArray[ 3] = "01525065009000"; // 10-20%
400       cutarray[ 4] = "5020001002092970023260000000"; mesonCutArray[ 4] = "01525065009000"; // 0-20%
401    } else if ( trainConfig == 51) { // psi pair 2D 0.05
402       cutarray[ 0] = "5240001002092970023260000000"; mesonCutArray[ 0] = "01525065009000"; // 20-40%
403       cutarray[ 1] = "5460001002092970023260000000"; mesonCutArray[ 1] = "01525065009000"; // 40-60%
404       cutarray[ 2] = "5680001002092970023260000000"; mesonCutArray[ 2] = "01525065009000"; // 60-80%
405       cutarray[ 3] = "5480001002092970023260000000"; mesonCutArray[ 3] = "01525065009000"; // 40-80%
406       cutarray[ 4] = "5350001002092970023260000000"; mesonCutArray[ 4] = "01525065009000"; // 30-50%  
407    } else if ( trainConfig == 52){ // psi pair 2D 0.05
408       cutarray[ 0] = "5230001002092970023260000000"; mesonCutArray[ 0] = "01525065009000"; // 20-30% 
409       cutarray[ 1] = "5340001002092970023260000000"; mesonCutArray[ 1] = "01525065009000"; // 30-40% 
410       cutarray[ 2] = "5450001002092970023260000000"; mesonCutArray[ 2] = "01525065009000"; // 40-50% 
411       cutarray[ 3] = "5560001002092970023260000000"; mesonCutArray[ 3] = "01525065009000"; // 50-60% 
412       cutarray[ 4] = "5250001002092970023260000000"; mesonCutArray[ 4] = "01525065009000"; // 60-70%       
413    } else if ( trainConfig == 53){ // psi pair 2D 0.1
414       cutarray[ 0] = "6010001002092970023250000000"; mesonCutArray[ 0] = "01525065009000"; // 0-5%
415       cutarray[ 1] = "6120001002092970023250000000"; mesonCutArray[ 1] = "01525065009000"; // 5-10%
416       cutarray[ 2] = "5010001002092970023250000000"; mesonCutArray[ 2] = "01525065009000"; // 0-10%
417       cutarray[ 3] = "5120001002092970023250000000"; mesonCutArray[ 3] = "01525065009000"; // 10-20%
418       cutarray[ 4] = "5020001002092970023250000000"; mesonCutArray[ 4] = "01525065009000"; // 0-20%
419    } else if ( trainConfig == 54) { // psi pair 2D 0.1
420       cutarray[ 0] = "5240001002092970023250000000"; mesonCutArray[ 0] = "01525065009000"; // 20-40%
421       cutarray[ 1] = "5460001002092970023250000000"; mesonCutArray[ 1] = "01525065009000"; // 40-60%
422       cutarray[ 2] = "5680001002092970023250000000"; mesonCutArray[ 2] = "01525065009000"; // 60-80%
423       cutarray[ 3] = "5480001002092970023250000000"; mesonCutArray[ 3] = "01525065009000"; // 40-80%
424       cutarray[ 4] = "5350001002092970023250000000"; mesonCutArray[ 4] = "01525065009000"; // 30-50%  
425    } else if ( trainConfig == 55){ // psi pair 2D 0.1
426       cutarray[ 0] = "5230001002092970023250000000"; mesonCutArray[ 0] = "01525065009000"; // 20-30% 
427       cutarray[ 1] = "5340001002092970023250000000"; mesonCutArray[ 1] = "01525065009000"; // 30-40% 
428       cutarray[ 2] = "5450001002092970023250000000"; mesonCutArray[ 2] = "01525065009000"; // 40-50% 
429       cutarray[ 3] = "5560001002092970023250000000"; mesonCutArray[ 3] = "01525065009000"; // 50-60% 
430       cutarray[ 4] = "5250001002092970023250000000"; mesonCutArray[ 4] = "01525065009000"; // 60-70%          
431    } else if ( trainConfig == 56){ // cleaner cuts
432       cutarray[ 0] = "6010001002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 0-5%
433       cutarray[ 1] = "6120001002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 5-10%
434       cutarray[ 2] = "5010001002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 0-10%
435       cutarray[ 3] = "5120001002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 10-20%
436       cutarray[ 4] = "5020001002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 0-20%
437    } else if ( trainConfig == 57){ // cleaner cuts added signal
438       cutarray[ 0] = "6010002002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 0-5%
439       cutarray[ 1] = "6120002002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 5-10%
440       cutarray[ 2] = "5010002002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 0-10%
441       cutarray[ 3] = "5120002002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 10-20%
442       cutarray[ 4] = "5020002002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 0-20%   
443         } else if ( trainConfig == 58) { // cleaner cuts
444       cutarray[ 0] = "5240001002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 20-40%
445       cutarray[ 1] = "5460001002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 40-60%
446       cutarray[ 2] = "5680001002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 60-80%
447       cutarray[ 3] = "5480001002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 40-80%
448       cutarray[ 4] = "5350001002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 30-50%  
449         } else if ( trainConfig == 59) { // cleaner cuts added signal
450       cutarray[ 0] = "5240002002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 20-40%
451       cutarray[ 1] = "5460002002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 40-60%
452       cutarray[ 2] = "5680002002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 60-80%
453       cutarray[ 3] = "5480002002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 40-80%
454       cutarray[ 4] = "5350002002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 30-50%            
455         } else if ( trainConfig == 60){ // cleaner cuts
456       cutarray[ 0] = "5230001002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 20-30% 
457       cutarray[ 1] = "5340001002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 30-40% 
458       cutarray[ 2] = "5450001002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 40-50% 
459       cutarray[ 3] = "5560001002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 50-60% 
460       cutarray[ 4] = "5250001002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 60-70%                
461    } else if ( trainConfig == 61){ // cleaner cuts added signal
462       cutarray[ 0] = "5230002002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 20-30% 
463       cutarray[ 1] = "5340002002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 30-40% 
464       cutarray[ 2] = "5450002002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 40-50% 
465       cutarray[ 3] = "5560002002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 50-60% 
466       cutarray[ 4] = "5670002002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 60-70%                   
467    } else if ( trainConfig == 62){ // cleaner cuts
468       cutarray[ 0] = "6230001002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 0-5%
469       cutarray[ 1] = "6340001002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 5-10%
470       cutarray[ 2] = "6450001002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 0-10%
471       cutarray[ 3] = "6560001002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 10-20%
472       cutarray[ 4] = "6670001002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 0-20%
473    } else if ( trainConfig == 63){ // cleaner cuts added signal
474       cutarray[ 0] = "6230002002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 0-5%
475       cutarray[ 1] = "6340002002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 5-10%
476       cutarray[ 2] = "6450002002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 0-10%
477       cutarray[ 3] = "6560002002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 10-20%
478       cutarray[ 4] = "6670002002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 0-20%
479    } else if ( trainConfig == 64){ // cleaner cuts
480       cutarray[ 0] = "6780001002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 0-5%
481       cutarray[ 1] = "6890001002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 5-10%
482       cutarray[ 2] = "5670001002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 0-10%
483       cutarray[ 3] = "5780001002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 10-20%
484       cutarray[ 4] = "5890001002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 0-20%
485    } else if ( trainConfig == 65){ // cleaner cuts added signal
486       cutarray[ 0] = "6780002002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 0-5%
487       cutarray[ 1] = "6890002002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 5-10%
488       cutarray[ 2] = "5670002002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 0-10%
489       cutarray[ 3] = "5780002002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 10-20%
490       cutarray[ 4] = "5890002002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 0-20%
491         } else if ( trainConfig == 66){ // cleaner cuts
492       cutarray[ 0] = "7010001002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 0-5%
493       cutarray[ 1] = "7120001002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 5-10%
494       cutarray[ 2] = "7230001002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 0-10%
495       cutarray[ 3] = "7340001002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 10-20%
496       cutarray[ 4] = "7450001002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 0-20%
497         } else if ( trainConfig == 67){ // cleaner cuts added signal
498       cutarray[ 0] = "7010002002092970028250400000"; mesonCutArray[ 0] = "01525065000000"; // 0-5%
499       cutarray[ 1] = "7120002002092970028250400000"; mesonCutArray[ 1] = "01525065000000"; // 5-10%
500       cutarray[ 2] = "7230002002092970028250400000"; mesonCutArray[ 2] = "01525065000000"; // 0-10%
501       cutarray[ 3] = "7340002002092970028250400000"; mesonCutArray[ 3] = "01525065000000"; // 10-20%
502       cutarray[ 4] = "7450002002092970028250400000"; mesonCutArray[ 4] = "01525065000000"; // 0-20%
503         } else if ( trainConfig == 68){ // cleaner cuts
504                 cutarray[ 0] = "7560001002092970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
505                 cutarray[ 1] = "7670001002092970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
506                 cutarray[ 2] = "7780001002092970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
507                 cutarray[ 3] = "7890001002092970028250400000"; mesonCutArray[3]= "01525065000000"; // 10-20%
508                 cutarray[ 4] = "7090001002092970028250400000"; mesonCutArray[4]= "01525065000000"; // 0-20%     
509    } else if ( trainConfig == 69){ // cleaner cuts added signal
510                 cutarray[ 0] = "7560002002092970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
511                 cutarray[ 1] = "7670002002092970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
512                 cutarray[ 2] = "7780002002092970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
513                 cutarray[ 3] = "7890002002092970028250400000"; mesonCutArray[3]= "01525065000000"; // 10-20%
514                 cutarray[ 4] = "7090002002092970028250400000"; mesonCutArray[4]= "01525065000000"; // 0-20%                     
515         } else if ( trainConfig == 70){ // variation eta  0.65
516                 cutarray[ 0] = "6010001032092970028250400000"; mesonCutArray[0]= "01523065000000"; // 0-5%
517                 cutarray[ 1] = "6120001032092970028250400000"; mesonCutArray[1]= "01523065000000"; // 5-10%
518                 cutarray[ 2] = "5010001032092970028250400000"; mesonCutArray[2]= "01523065000000"; // 0-10%
519                 cutarray[ 3] = "5240001032092970028250400000"; mesonCutArray[3]= "01523065000000"; // 20-40%
520                 cutarray[ 4] = "5250001032092970028250400000"; mesonCutArray[4]= "01523065000000"; // 20-50% 
521         } else if ( trainConfig == 71){ // variation eta  0.65 added signal
522                 cutarray[ 0] = "6010002032092970028250400000"; mesonCutArray[0]= "01523065000000"; // 0-5%
523                 cutarray[ 1] = "6120002032092970028250400000"; mesonCutArray[1]= "01523065000000"; // 5-10%
524                 cutarray[ 2] = "5010002032092970028250400000"; mesonCutArray[2]= "01523065000000"; // 0-10%
525                 cutarray[ 3] = "5240002032092970028250400000"; mesonCutArray[3]= "01523065000000"; // 20-40%
526                 cutarray[ 4] = "5250002032092970028250400000"; mesonCutArray[4]= "01523065000000"; // 20-50%            
527         } else if ( trainConfig == 72){ // variation eta  0.75
528                 cutarray[ 0] = "6010001072092970028250400000"; mesonCutArray[0]= "01522065000000"; // 0-5%
529                 cutarray[ 1] = "6120001072092970028250400000"; mesonCutArray[1]= "01522065000000"; // 5-10%
530                 cutarray[ 2] = "5010001072092970028250400000"; mesonCutArray[2]= "01522065000000"; // 0-10%
531                 cutarray[ 3] = "5240001072092970028250400000"; mesonCutArray[3]= "01522065000000"; // 20-40%
532                 cutarray[ 4] = "5250001072092970028250400000"; mesonCutArray[4]= "01522065000000"; // 20-50% 
533         } else if ( trainConfig == 73){ // variation eta  0.75 added signal
534                 cutarray[ 0] = "6010002072092970028250400000"; mesonCutArray[0]= "01522065000000"; // 0-5%
535                 cutarray[ 1] = "6120002072092970028250400000"; mesonCutArray[1]= "01522065000000"; // 5-10%
536                 cutarray[ 2] = "5010002072092970028250400000"; mesonCutArray[2]= "01522065000000"; // 0-10%
537                 cutarray[ 3] = "5240002072092970028250400000"; mesonCutArray[3]= "01522065000000"; // 20-40%
538                 cutarray[ 4] = "5250002072092970028250400000"; mesonCutArray[4]= "01522065000000"; // 20-50% 
539         } else if ( trainConfig == 74){ // single pt 0.075
540                 cutarray[ 0] = "6010001002492970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
541                 cutarray[ 1] = "6120001002492970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
542                 cutarray[ 2] = "5010001002492970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
543                 cutarray[ 3] = "5240001002492970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
544                 cutarray[ 4] = "5250001002492970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
545         } else if ( trainConfig == 75){ // single pt 0.075 added signal
546                 cutarray[ 0] = "6010002002492970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
547                 cutarray[ 1] = "6120002002492970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
548                 cutarray[ 2] = "5010002002492970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
549                 cutarray[ 3] = "5240002002492970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
550                 cutarray[ 4] = "5250002002492970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
551         } else if ( trainConfig == 76){ // single pt 0.1
552                 cutarray[ 0] = "6010001002192970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
553                 cutarray[ 1] = "6120001002192970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
554                 cutarray[ 2] = "5010001002192970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
555                 cutarray[ 3] = "5240001002192970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
556                 cutarray[ 4] = "5250001002192970028250400000"; mesonCutArray[4]= "01525065000000"; //20-50%
557         } else if ( trainConfig == 77){ // single pt 0.1 added signal
558                 cutarray[ 0] = "6010002002192970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
559                 cutarray[ 1] = "6120002002192970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
560                 cutarray[ 2] = "5010002002192970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
561                 cutarray[ 3] = "5240002002192970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
562                 cutarray[ 4] = "5250002002192970028250400000"; mesonCutArray[4]= "01525065000000"; //20-50%
563         } else if ( trainConfig == 78){ // variation TPC cls 0.7
564                 cutarray[ 0] = "6010001002062970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
565                 cutarray[ 1] = "6120001002062970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
566                 cutarray[ 2] = "5010001002062970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
567                 cutarray[ 3] = "5240001002062970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
568                 cutarray[ 4] = "5250001002062970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
569         } else if ( trainConfig == 79){ // variation TPC cls 0.7 added signal
570                 cutarray[ 0] = "6010001002062970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
571                 cutarray[ 1] = "6120001002062970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
572                 cutarray[ 2] = "5010001002062970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
573                 cutarray[ 3] = "5240001002062970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
574                 cutarray[ 4] = "5250001002062970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
575         } else if ( trainConfig == 80){ // variation TPC cls 0.35
576                 cutarray[ 0] = "6010001002082970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
577                 cutarray[ 1] = "6120001002082970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
578                 cutarray[ 2] = "5010001002082970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
579                 cutarray[ 0] = "5240001002082970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
580                 cutarray[ 4] = "5250001002082970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
581         } else if ( trainConfig == 81){ // variation TPC cls 0.35 added signal
582                 cutarray[ 0] = "6010002002082970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
583                 cutarray[ 1] = "6120002002082970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
584                 cutarray[ 2] = "5010002002082970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
585                 cutarray[ 0] = "5240002002082970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
586                 cutarray[ 4] = "5250002002082970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
587         } else if ( trainConfig == 82){ // variation edEdx  -4,5
588                 cutarray[ 0] = "6010001002093970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
589                 cutarray[ 1] = "6120001002093970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
590                 cutarray[ 2] = "5010001002093970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
591                 cutarray[ 3] = "5240001002093970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
592                 cutarray[ 4] = "5250001002093970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
593         } else if ( trainConfig == 83){ // variation edEdx  -4,5  added signal
594                 cutarray[ 0] = "6010002002093970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
595                 cutarray[ 1] = "6120002002093970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
596                 cutarray[ 2] = "5010002002093970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
597                 cutarray[ 3] = "5240002002093970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
598                 cutarray[ 4] = "5250002002093970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
599         } else if ( trainConfig == 84){ // variation edEdx  -2.5,4
600                 cutarray[ 0] = "6010001002096970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
601                 cutarray[ 1] = "6120001002096970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
602                 cutarray[ 2] = "5010001002096970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
603                 cutarray[ 3] = "5240001002096970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
604                 cutarray[ 4] = "5250001002096970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
605         } else if ( trainConfig == 85){ // variation edEdx  -2.5,4  added signal
606                 cutarray[ 0] = "6010002002096970028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
607                 cutarray[ 1] = "6120002002096970028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
608                 cutarray[ 2] = "5010002002096970028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
609                 cutarray[ 3] = "5240002002096970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
610                 cutarray[ 4] = "5250002002096970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
611         } else if ( trainConfig == 86){ //variation pion p dEdx 0.3-5.
612                 cutarray[ 0] = "6010001002092951028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
613                 cutarray[ 1] = "6120001002092951028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
614                 cutarray[ 2] = "5010001002092951028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
615                 cutarray[ 3] = "5240001002092951028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
616                 cutarray[ 4] = "5250001002092951028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
617         } else if ( trainConfig == 87){ //variation pion p dEdx 0.3-5.  added signal
618                 cutarray[ 0] = "6010002002092951028250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
619                 cutarray[ 1] = "6120002002092951028250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
620                 cutarray[ 2] = "5010002002092951028250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
621                 cutarray[ 3] = "5240002002092951028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
622                 cutarray[ 4] = "5250002002092951028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
623         } else if ( trainConfig == 88){ // TOF el. PID -3,5
624                 cutarray[ 0] = "6010001002092970038250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
625                 cutarray[ 1] = "6120001002092970038250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
626                 cutarray[ 2] = "5010001002092970038250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
627                 cutarray[ 3] = "5240001002092970038250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
628                 cutarray[ 4] = "5250001002092970038250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
629         } else if ( trainConfig == 89){ // TOF el. PID -3,5  added signal
630                 cutarray[ 0] = "6010002002092970038250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
631                 cutarray[ 1] = "6120002002092970038250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
632                 cutarray[ 2] = "5010002002092970038250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
633                 cutarray[ 3] = "5240002002092970038250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
634                 cutarray[ 4] = "5250002002092970038250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%            
635         } else if ( trainConfig == 90){ // TOF el. PID -2,3
636                 cutarray[ 0] = "6010001002092970048250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
637                 cutarray[ 1] = "6120001002092970048250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
638                 cutarray[ 2] = "5010001002092970048250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
639                 cutarray[ 3] = "5240001002092970048250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
640                 cutarray[ 4] = "5250001002092970048250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
641         } else if ( trainConfig == 91){ // TOF el. PID -2,3  added signal
642                 cutarray[ 0] = "6010002002092970048250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
643                 cutarray[ 1] = "6120002002092970048250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
644                 cutarray[ 2] = "5010002002092970048250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
645                 cutarray[ 3] = "5240002002092970048250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
646                 cutarray[ 4] = "5250002002092970048250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
647         } else if ( trainConfig == 92){ // qt 0.03
648                 cutarray[ 0] = "6010001002092970029250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
649                 cutarray[ 1] = "6120001002092970029250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
650                 cutarray[ 2] = "5010001002092970029250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
651                 cutarray[ 3] = "5240001002092970029250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
652                 cutarray[ 4] = "5250001002092970029250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
653         } else if ( trainConfig == 93){ // qt 0.03  added signal
654                 cutarray[ 0] = "6010002002092970029250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
655                 cutarray[ 1] = "6120002002092970029250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
656                 cutarray[ 2] = "5010002002092970029250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
657                 cutarray[ 3] = "5240002002092970029250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
658                 cutarray[ 4] = "5250002002092970029250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
659         } else if ( trainConfig == 94){ // qt 0.07 no2D
660                 cutarray[ 0] = "6010001002092970022250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
661                 cutarray[ 1] = "6120001002092970022250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
662                 cutarray[ 2] = "5010001002092970022250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
663                 cutarray[ 3] = "5240001002092970022250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
664                 cutarray[ 4] = "5250001002092970022250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
665         } else if ( trainConfig == 95){ // qt 0.07 no2D  added signal
666                 cutarray[ 0] = "6010002002092970022250400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
667                 cutarray[ 1] = "6120002002092970022250400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
668                 cutarray[ 2] = "5010002002092970022250400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
669                 cutarray[ 3] = "5240002002092970022250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
670                 cutarray[ 4] = "5250002002092970022250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
671         } else if ( trainConfig == 96){ // chi2  50.
672                 cutarray[ 0] = "6010001002092970028150400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
673                 cutarray[ 1] = "6120001002092970028150400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
674                 cutarray[ 2] = "5010001002092970028150400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
675                 cutarray[ 3] = "5240001002092970028150400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
676                 cutarray[ 4] = "5250001002092970028150400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
677         } else if ( trainConfig == 97){ // chi2  50.  added signal
678                 cutarray[ 0] = "6010002002092970028150400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
679                 cutarray[ 1] = "6120002002092970028150400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
680                 cutarray[ 2] = "5010002002092970028150400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
681                 cutarray[ 3] = "5240002002092970028150400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
682                 cutarray[ 4] = "5250002002092970028150400000"; mesonCutArray[4]= "01525065000000"; // 20-50%            
683         } else if ( trainConfig == 98){ // chi2  20.
684                 cutarray[ 0] = "6010001002092970028850400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
685                 cutarray[ 1] = "6120001002092970028850400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
686                 cutarray[ 2] = "5010001002092970028850400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
687                 cutarray[ 3] = "5240001002092970028850400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
688                 cutarray[ 4] = "5250001002092970028850400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
689         } else if ( trainConfig == 99){ // chi2  20.  added signal
690                 cutarray[ 0] = "6010002002092970028850400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
691                 cutarray[ 1] = "6120002002092970028850400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
692                 cutarray[ 2] = "5010002002092970028850400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
693                 cutarray[ 3] = "5240002002092970028850400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
694                 cutarray[ 4] = "5250002002092970028850400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
695         } else if ( trainConfig == 100){ // psi pair 0.05
696                 cutarray[ 0] = "6010001002092970028260400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
697                 cutarray[ 1] = "6120001002092970028260400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
698                 cutarray[ 2] = "5010001002092970028260400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
699                 cutarray[ 3] = "5240001002092970028260400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
700                 cutarray[ 4] = "5250001002092970028260400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
701         } else if ( trainConfig == 101){ // psi pair 0.05  added signal
702                 cutarray[ 0] = "6010002002092970028260400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
703                 cutarray[ 1] = "6120002002092970028260400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
704                 cutarray[ 2] = "5010002002092970028260400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
705                 cutarray[ 3] = "5240002002092970028260400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
706                 cutarray[ 4] = "5250002002092970028260400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
707         } else if ( trainConfig == 102){ // cosPA -1
708                 cutarray[ 0] = "6010001002092970028250000000"; mesonCutArray[0]= "01525065000000"; // 0-5%
709                 cutarray[ 1] = "6120001002092970028250000000"; mesonCutArray[1]= "01525065000000"; // 5-10%
710                 cutarray[ 2] = "5010001002092970028250000000"; mesonCutArray[2]= "01525065000000"; // 0-10%
711                 cutarray[ 3] = "5240001002092970028250000000"; mesonCutArray[3]= "01525065000000"; // 20-40%
712                 cutarray[ 4] = "5250001002092970028250000000"; mesonCutArray[4]= "01525065000000"; // 20-50%
713         } else if ( trainConfig == 103){ // cosPA -1  added signal
714                 cutarray[ 0] = "6010002002092970028250000000"; mesonCutArray[0]= "01525065000000"; // 0-5%
715                 cutarray[ 1] = "6120002002092970028250000000"; mesonCutArray[1]= "01525065000000"; // 5-10%
716                 cutarray[ 2] = "5010002002092970028250000000"; mesonCutArray[2]= "01525065000000"; // 0-10%
717                 cutarray[ 3] = "5240002002092970028250000000"; mesonCutArray[3]= "01525065000000"; // 20-40%
718                 cutarray[ 4] = "5250002002092970028250000000"; mesonCutArray[4]= "01525065000000"; // 20-50%
719         } else if ( trainConfig == 104){ // variation alpha 0.6&0.8
720                 cutarray[ 0] = "6010001002092970028250400000"; mesonCutArray[0]= "01525085000000"; // 0-5%
721                 cutarray[ 1] = "6120001002092970028250400000"; mesonCutArray[1]= "01525085000000"; // 5-10%
722                 cutarray[ 2] = "5010001002092970028250400000"; mesonCutArray[2]= "01525085000000"; // 0-10%
723                 cutarray[ 3] = "5240001002092970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
724                 cutarray[ 4] = "5250001002092970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
725         } else if ( trainConfig == 105){ // variation alpha 0.6&0.8  added signal
726                 cutarray[ 0] = "6010002002092970028250400000"; mesonCutArray[0]= "01525085000000"; // 0-5%
727                 cutarray[ 1] = "6120002002092970028250400000"; mesonCutArray[1]= "01525085000000"; // 5-10%
728                 cutarray[ 2] = "5010002002092970028250400000"; mesonCutArray[2]= "01525085000000"; // 0-10%
729                 cutarray[ 3] = "5240002002092970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
730                 cutarray[ 4] = "5250002002092970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%    
731         } else if ( trainConfig == 106){ // variation alpha 0.65&0.75
732                 cutarray[ 0] = "6010001002092970028250400000"; mesonCutArray[0]= "01525045000000"; // 0-5%
733                 cutarray[ 1] = "6120001002092970028250400000"; mesonCutArray[1]= "01525045000000"; // 5-10%
734                 cutarray[ 2] = "5010001002092970028250400000"; mesonCutArray[2]= "01525045000000"; // 0-10%
735                 cutarray[ 3] = "5240001002092970028250400000"; mesonCutArray[3]= "01525055000000"; // 20-40%
736                 cutarray[ 4] = "5250001002092970028250400000"; mesonCutArray[4]= "01525055000000"; // 20-50%
737         } else if ( trainConfig == 107){ // variation alpha 0.65&0.75  added signal
738                 cutarray[ 0] = "6010002002092970028250400000"; mesonCutArray[0]= "01525045000000"; // 0-5%
739                 cutarray[ 1] = "6120002002092970028250400000"; mesonCutArray[1]= "01525045000000"; // 5-10%
740                 cutarray[ 2] = "5010002002092970028250400000"; mesonCutArray[2]= "01525045000000"; // 0-10%
741                 cutarray[ 3] = "5240002002092970028250400000"; mesonCutArray[3]= "01525055000000"; // 20-40%
742                 cutarray[ 4] = "5250002002092970028250400000"; mesonCutArray[4]= "01525055000000"; // 20-50%
743         } else {
744       Error(Form("GammaConvV1_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration");
745       return;
746    }
747
748         TList *ConvCutList = new TList();
749         TList *MesonCutList = new TList();
750
751         TList *HeaderList = new TList();
752         if (periodName.CompareTo("LHC13d2")==0){
753                 TObjString *Header1 = new TObjString("pi0_1");
754                 HeaderList->Add(Header1);
755         //    TObjString *Header3 = new TObjString("eta_2");
756         //    HeaderList->Add(Header3);
757
758         } else if (periodName.CompareTo("LHC12a17x_fix")==0){
759                 TObjString *Header1 = new TObjString("PARAM");
760                 HeaderList->Add(Header1);
761         } else if (periodName.CompareTo("LHC14a1a")==0){
762 //              if (doWeightingInt == 1){ 
763 //                      TObjString *Header1 = new TObjString("pi0_1");
764 //                      HeaderList->Add(Header1);
765 //              } else if (doWeightingInt == 2){
766 //                      TObjString *Header1 = new TObjString("eta_2");
767 //                      HeaderList->Add(Header1);
768 //              } else {
769                         TObjString *Header1 = new TObjString("pi0_1");
770                         HeaderList->Add(Header1);
771                         TObjString *Header2 = new TObjString("eta_2");
772                         HeaderList->Add(Header2);
773 //              }  
774         } else if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0){
775                 TObjString *Header1 = new TObjString("BOX");
776                 HeaderList->Add(Header1);
777         }       
778    
779    ConvCutList->SetOwner(kTRUE);
780    AliConversionCuts **analysisCuts = new AliConversionCuts*[numberOfCuts];
781    MesonCutList->SetOwner(kTRUE);
782    AliConversionMesonCuts **analysisMesonCuts = new AliConversionMesonCuts*[numberOfCuts];
783
784         for(Int_t i = 0; i<numberOfCuts; i++){
785                 analysisCuts[i] = new AliConversionCuts();
786                 if (trainConfig == 1 ||trainConfig == 5 || trainConfig == 9 || trainConfig == 13 || trainConfig == 17 || trainConfig == 21 || trainConfig == 25 || trainConfig == 29 ){ //|| trainConfig == 33 || trainConfig == 37 || trainConfig == 41 
787                         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0005TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M");
788                         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0510TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M");
789                         if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0010TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
790                         if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_1020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
791                         if (i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0020V0M");
792                 } else if (trainConfig == 2 ||trainConfig == 6 || trainConfig == 10 || trainConfig == 14 || trainConfig == 18 || trainConfig == 22 || trainConfig == 26 || trainConfig == 30  ){ //|| trainConfig == 34 || trainConfig == 38 || trainConfig == 42
793                         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_2040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
794                         if (i == 1 && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4060TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
795                         if (i == 2 && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_6080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
796                         if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4080V0M");
797                 } else if (trainConfig == 3 ||trainConfig == 7 || trainConfig == 11 || trainConfig == 15 || trainConfig == 19 || trainConfig == 23 || trainConfig == 27 || trainConfig == 31 ){ //|| trainConfig == 35 || trainConfig == 39 || trainConfig == 43 
798                         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0005TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M");
799                         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0510TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M");
800                         if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0010TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
801                         if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_1020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
802                         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0020V0M");
803                 } else if (trainConfig == 4 ||trainConfig == 8 || trainConfig == 12 || trainConfig == 16 || trainConfig == 20 || trainConfig == 24 || trainConfig == 28 || trainConfig == 32 ){ //|| trainConfig == 36 || trainConfig == 40 || trainConfig == 44 
804                         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_2040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
805                         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4060TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
806                         if (i == 2  && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_6080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
807                         if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4080V0M");
808                 }
809
810                 if (trainConfig == 56 ){
811                         if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
812                                 if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_0005TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_0005TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M","Eta_Fit_Data_PbPb_2760GeV_0005V0M");
813                                 if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_0510TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_0510TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M","Eta_Fit_Data_PbPb_2760GeV_0510V0M");
814                                 if ( i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_0010TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_0010TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M","Eta_Fit_Data_PbPb_2760GeV_0010V0M");
815                                 if ( i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_1020TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_1020TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M","Eta_Fit_Data_PbPb_2760GeV_1020V0M");
816                                 if ( i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_0020TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_0020TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0020V0M","Eta_Fit_Data_PbPb_2760GeV_0020V0M");
817                         }       
818                 }         
819                 if (trainConfig == 57 ){
820                         if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
821                                 if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_0005TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_0005TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M","Eta_Fit_Data_PbPb_2760GeV_0005V0M");
822                                 if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_0510TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_0510TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M","Eta_Fit_Data_PbPb_2760GeV_0510V0M");
823                                 if ( i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_0010TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_0010TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M","Eta_Fit_Data_PbPb_2760GeV_0010V0M");
824                                 if ( i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_1020TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_1020TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M","Eta_Fit_Data_PbPb_2760GeV_1020V0M");
825                                 if ( i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_0020TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_0020TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0020V0M","Eta_Fit_Data_PbPb_2760GeV_0020V0M");
826                         }       
827                 }         
828                 if (trainConfig == 58 ){
829                         if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
830                                 if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_2040TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_2040TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M","Eta_Fit_Data_PbPb_2760GeV_2040V0M");
831                                 if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_4060TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_4060TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M","Eta_Fit_Data_PbPb_2760GeV_4060V0M");
832                                 if ( i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_6080TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_6080TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M","Eta_Fit_Data_PbPb_2760GeV_6080V0M");
833                                 if ( i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_4080TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_4080TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M","Eta_Fit_Data_PbPb_2760GeV_1020V0M");
834                                 if ( i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_3050TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_3050TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_3050V0M","Eta_Fit_Data_PbPb_2760GeV_3050V0M");
835                         }       
836                 }         
837                 if (trainConfig == 59 ){
838                         if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
839                                 if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_2040TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_2040TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M","Eta_Fit_Data_PbPb_2760GeV_2040V0M");
840                                 if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_4060TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_4060TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M","Eta_Fit_Data_PbPb_2760GeV_4060V0M");
841                                 if ( i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_6080TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_6080TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M","Eta_Fit_Data_PbPb_2760GeV_6080V0M");
842                                 if ( i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_4080TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_4080TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M","Eta_Fit_Data_PbPb_2760GeV_1020V0M");
843                                 if ( i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_3050TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_3050TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_3050V0M","Eta_Fit_Data_PbPb_2760GeV_3050V0M");
844                         }       
845                 }         
846         
847                 if (trainConfig == 60 ){
848                         if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
849                                 if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_2030TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_2030TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2030V0M","Eta_Fit_Data_PbPb_2760GeV_2030V0M");
850                                 if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_3040TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_3040TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_3040V0M","Eta_Fit_Data_PbPb_2760GeV_3040V0M");
851                                 if ( i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_4050TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_4050TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_4050V0M","Eta_Fit_Data_PbPb_2760GeV_4050V0M");
852                                 if ( i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_5060TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_5060TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_5060V0M","Eta_Fit_Data_PbPb_2760GeV_5060V0M");
853                                 if ( i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_2050TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_2050TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2050V0M","Eta_Fit_Data_PbPb_2760GeV_2050V0M");
854                         }       
855                 }         
856                 if (trainConfig == 61 ){
857                         if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
858                                 if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_2030TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_2030TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2030V0M","Eta_Fit_Data_PbPb_2760GeV_2030V0M");
859                                 if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_3040TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_3040TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_3040V0M","Eta_Fit_Data_PbPb_2760GeV_3040V0M");
860                                 if ( i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_4050TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_4050TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_4050V0M","Eta_Fit_Data_PbPb_2760GeV_4050V0M");
861                                 if ( i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_5060TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_5060TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_5060V0M","Eta_Fit_Data_PbPb_2760GeV_5060V0M");
862                                 if ( i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_2050TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_2050TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2050V0M","Eta_Fit_Data_PbPb_2760GeV_2050V0M");
863                         }       
864                 }         
865                 
866                 if ( trainConfig == 70 || trainConfig == 72  || trainConfig == 74  || trainConfig == 76  || trainConfig == 78  || trainConfig == 80  || trainConfig == 82  || trainConfig == 84 || trainConfig == 86  || trainConfig == 88  || trainConfig == 90 || trainConfig == 92 || trainConfig == 94 || trainConfig == 96  || trainConfig == 98  || trainConfig == 100 || trainConfig == 102  || trainConfig == 104 || trainConfig == 106 ){
867                         if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
868                                 if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_0005TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_0005TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M","Eta_Fit_Data_PbPb_2760GeV_0005V0M");
869                                 if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_0510TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_0510TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M","Eta_Fit_Data_PbPb_2760GeV_0510V0M");
870                                 if ( i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_0010TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_0010TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M","Eta_Fit_Data_PbPb_2760GeV_0010V0M");
871                                 if ( i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_2040TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_2040TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M","Eta_Fit_Data_PbPb_2760GeV_2040V0M");
872                                 if ( i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_2050TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_2050TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2050V0M","Eta_Fit_Data_PbPb_2760GeV_2050V0M");
873                         }       
874                 } 
875                 if ( trainConfig == 71 || trainConfig == 73  || trainConfig == 75  || trainConfig == 77  || trainConfig == 79  || trainConfig == 81  || trainConfig == 83  || trainConfig == 85 || trainConfig == 87  || trainConfig == 89  || trainConfig == 91 || trainConfig == 93 || trainConfig == 95 || trainConfig == 97  || trainConfig == 99  || trainConfig == 101 || trainConfig == 103  || trainConfig == 105 || trainConfig == 107 ){
876                         if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
877                                 if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_0005TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_0005TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M","Eta_Fit_Data_PbPb_2760GeV_0005V0M");
878                                 if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_0510TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_0510TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M","Eta_Fit_Data_PbPb_2760GeV_0510V0M");
879                                 if ( i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_0010TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_0010TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M","Eta_Fit_Data_PbPb_2760GeV_0010V0M");
880                                 if ( i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_2040TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_2040TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M","Eta_Fit_Data_PbPb_2760GeV_2040V0M");
881                                 if ( i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_2050TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_2050TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2050V0M","Eta_Fit_Data_PbPb_2760GeV_2050V0M");
882                         }       
883                 } 
884                 
885                 analysisCuts[i]->InitializeCutsFromCutString(cutarray[i].Data());
886                 ConvCutList->Add(analysisCuts[i]);
887
888                 if (trainConfig == 37 || trainConfig == 38){
889                         analysisCuts[i]->SelectSpecialTrigger(AliVEvent::kMB, "AliVEvent::kMB" );
890                 }
891                 if (trainConfig == 39 || trainConfig == 40){   
892                         analysisCuts[i]->SelectSpecialTrigger(AliVEvent::kCentral,"AliVEvent::kCentral" );
893                 }   
894                 if (trainConfig == 41 || trainConfig == 42){   
895                         analysisCuts[i]->SelectSpecialTrigger(AliVEvent::kSemiCentral,"AliVEvent::kSemiCentral" );
896                 }   
897                 
898                 analysisCuts[i]->SetFillCutHistograms("",kFALSE);
899                 analysisMesonCuts[i] = new AliConversionMesonCuts();
900                 analysisMesonCuts[i]->InitializeCutsFromCutString(mesonCutArray[i].Data());
901                 MesonCutList->Add(analysisMesonCuts[i]);
902                 analysisMesonCuts[i]->SetFillCutHistograms("");
903                 analysisCuts[i]->SetAcceptedHeader(HeaderList);
904         }
905
906         task->SetConversionCutList(numberOfCuts,ConvCutList);
907         task->SetMesonCutList(numberOfCuts,MesonCutList);
908         task->SetMoveParticleAccordingToVertex(kTRUE);
909         task->SetDoMesonAnalysis(kTRUE);
910         task->SetDoMesonQA(enableQAMesonTask); //Attention new switch for Pi0 QA
911         task->SetDoPhotonQA(enableQAPhotonTask);  //Attention new switch small for Photon QA
912
913         //connect containers
914         AliAnalysisDataContainer *coutput =
915                 mgr->CreateContainer(Form("GammaConvV1_%i",trainConfig), TList::Class(),
916                                                         AliAnalysisManager::kOutputContainer,Form("GammaConvV1_%i.root",trainConfig));
917
918         mgr->AddTask(task);
919         mgr->ConnectInput(task,0,cinput);
920         mgr->ConnectOutput(task,1,coutput);
921
922         return;
923
924 }