MC changes to evsel for debugging
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / macros / AddTask_GammaConvV1_pp.C
CommitLineData
33bbd991 1void AddTask_GammaConvV1_pp( Int_t trainConfig = 1, //change different set of cuts
2 Bool_t isMC = kFALSE, //run MC
ae4f2cfb 3 Int_t enableQAMesonTask = 0, //enable QA in AliAnalysisTaskGammaConvV1
4 Int_t enableQAPhotonTask = 0, // enable additional QA task
a7f0b705 5 TString fileNameInputForWeighting = "MCSpectraInput.root", // path to file for weigting input
6 TString cutnumberAODBranch = "0000000060084001001500000" // cutnumber for AOD branch
33bbd991 7 ) {
8
9 // ================= Load Librariers =================================
10 gSystem->Load("libCore.so");
11 gSystem->Load("libTree.so");
12 gSystem->Load("libGeom.so");
13 gSystem->Load("libVMC.so");
14 gSystem->Load("libPhysics.so");
15 gSystem->Load("libMinuit");
16 gSystem->Load("libSTEERBase");
17 gSystem->Load("libESD");
18 gSystem->Load("libAOD");
19 gSystem->Load("libANALYSIS");
20 gSystem->Load("libANALYSISalice");
21 gSystem->Load("libPWGGAGammaConv.so");
22 gSystem->Load("libCDB.so");
23 gSystem->Load("libSTEER.so");
24 gSystem->Load("libSTEERBase.so");
25 gSystem->Load("libTENDER.so");
26 gSystem->Load("libTENDERSupplies.so");
27
28 // ================== GetAnalysisManager ===============================
29 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
30 if (!mgr) {
31 Error(Form("AddTask_GammaConvV1_%i",trainConfig), "No analysis manager found.");
32 return ;
33 }
34
35 // ================== GetInputEventHandler =============================
36 AliVEventHandler *inputHandler=mgr->GetInputEventHandler();
37
38 //========= Add PID Reponse to ANALYSIS manager ====
39 if(!(AliPIDResponse*)mgr->GetTask("PIDResponseTask")){
40 gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
41 AddTaskPIDResponse(isMC);
42 }
43
44 //========= Set Cutnumber for V0Reader ================================
ae4f2cfb 45 TString cutnumber = "0000000002084000002200000000";
b0e0bc89 46 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
33bbd991 47
48 //========= Add V0 Reader to ANALYSIS manager if not yet existent =====
49 if( !(AliV0ReaderV1*)mgr->GetTask("V0ReaderV1") ){
50 AliV0ReaderV1 *fV0ReaderV1 = new AliV0ReaderV1("V0ReaderV1");
51
52 fV0ReaderV1->SetUseOwnXYZCalculation(kTRUE);
53 fV0ReaderV1->SetCreateAODs(kFALSE);// AOD Output
54 fV0ReaderV1->SetUseAODConversionPhoton(kTRUE);
55
56 if (!mgr) {
57 Error("AddTask_V0ReaderV1", "No analysis manager found.");
58 return;
59 }
60
61 // Set AnalysisCut Number
62 AliConversionCuts *fCuts=NULL;
63 if(cutnumber!=""){
64 fCuts= new AliConversionCuts(cutnumber.Data(),cutnumber.Data());
65 fCuts->SetPreSelectionCutFlag(kTRUE);
66 if(fCuts->InitializeCutsFromCutString(cutnumber.Data())){
67 fV0ReaderV1->SetConversionCuts(fCuts);
68 fCuts->SetFillCutHistograms("",kTRUE);
69 }
70 }
a7f0b705 71 if(inputHandler->IsA()==AliAODInputHandler::Class()){
72 // AOD mode
73 fV0ReaderV1->SetDeltaAODBranchName(Form("GammaConv_%s_gamma",cutnumberAODBranch.Data()));
74 }
33bbd991 75 fV0ReaderV1->Init();
76
77 AliLog::SetGlobalLogLevel(AliLog::kInfo);
78
33bbd991 79 //connect input V0Reader
80 mgr->AddTask(fV0ReaderV1);
81 mgr->ConnectInput(fV0ReaderV1,0,cinput);
82
83 }
84
85 //================================================
86 //========= Add task to the ANALYSIS manager =====
33bbd991 87 // find input container
88 AliAnalysisTaskGammaConvV1 *task=NULL;
89 task= new AliAnalysisTaskGammaConvV1(Form("GammaConvV1_%i",trainConfig));
90 task->SetIsHeavyIon(0);
91 task->SetIsMC(isMC);
92 // Cut Numbers to use in Analysis
93 Int_t numberOfCuts = 4;
94
95 TString *cutarray = new TString[numberOfCuts];
96 TString *mesonCutArray = new TString[numberOfCuts];
97
b0e0bc89 98 if(trainConfig == 1){
ae4f2cfb 99 cutarray[ 0] = "0000012002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , only boxes
100 cutarray[ 1] = "0001012002093663003800000000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD, V0AND , only boxes
101 cutarray[ 2] = "0000012002093260003800000000"; mesonCutArray[2] = "01631031009000"; //standard cut Gamma pp 2-76TeV , only boxes
102 cutarray[ 3] = "0000012002093260003800000000"; mesonCutArray[3] = "01631031009000"; //standard cut Gamma pp 2-76TeV , only boxes
33bbd991 103 } else if (trainConfig == 2) {
ae4f2cfb 104 cutarray[ 0] = "0000011002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , only Minbias MC
105 cutarray[ 1] = "0001011002093663003800000000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD, V0AND
106 cutarray[ 2] = "0000011002093260003800000000"; mesonCutArray[2] = "01631031009000"; //standard cut Gamma pp 2-76TeV
072021d3 107 cutarray[ 3] = "0000011002093260003800000000"; mesonCutArray[3] = "01631031009000"; //standard cut Gamma pp 2-76TeV
33bbd991 108 } else if (trainConfig == 3) {
ae4f2cfb 109 cutarray[ 0] = "0002011002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , only Minbias MC
110 cutarray[ 1] = "0003011002093663003800000000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD, V0AND , only Minbias MC
111 cutarray[ 2] = "0002012002093663003800000000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , only Boxes MC
112 cutarray[ 3] = "0003012002093663003800000000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD, V0AND, only Boxes MC
072021d3 113 } else if (trainConfig == 4) {
114 cutarray[ 0] = "0000011002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , all photon qualities
115 cutarray[ 1] = "0000011002093663003800020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 1
116 cutarray[ 2] = "0000011002093663003800030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 2
88202ecb 117 cutarray[ 3] = "0000011002093663003800040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 3
072021d3 118 } else if (trainConfig == 5) {
119 cutarray[ 0] = "0000011007093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , all photon qualities, min R = 35 cm
120 cutarray[ 1] = "0000011007093663003800020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 1, min R = 35 cm
121 cutarray[ 2] = "0000011007093663003800030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 2, min R = 35 cm
122 cutarray[ 3] = "0000011007093663003800040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 3, min R = 35 cm
e260262f 123 } else if (trainConfig == 6) {
072021d3 124 cutarray[ 0] = "0000011002083663003200000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, all photon qualities
125 cutarray[ 1] = "0000011002083663003200020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 1
126 cutarray[ 2] = "0000011002083663003200030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 2
127 cutarray[ 3] = "0000011002083663003200040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 3
e260262f 128 } else if (trainConfig == 7) {
072021d3 129 cutarray[ 0] = "0000011007083663003200000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, all photon qualities, min R = 35 cm
130 cutarray[ 1] = "0000011007083663003200020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 1, min R = 35 cm
131 cutarray[ 2] = "0000011007083663003200030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 2, min R = 35 cm
132 cutarray[ 3] = "0000011007083663003200040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 3, min R = 35 cm
e260262f 133 } else if (trainConfig == 8) {
072021d3 134 cutarray[ 0] = "0000011002083663000200000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 7TeV, all photon qualities
135 cutarray[ 1] = "0000011002083663000200020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 1
136 cutarray[ 2] = "0000011002083663000200030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 2
137 cutarray[ 3] = "0000011002083663000200040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 3
e260262f 138 } else if (trainConfig == 9) {
072021d3 139 cutarray[ 0] = "0000011007083663000200000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 7TeV, all photon qualities, min R = 35 cm
140 cutarray[ 1] = "0000011007083663000200020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 1, min R = 35 cm
141 cutarray[ 2] = "0000011007083663000200030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 2, min R = 35 cm
142 cutarray[ 3] = "0000011007083663000200040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 3, min R = 35 cm
048db199 143 } else if (trainConfig == 10) {
144 cutarray[ 0] = "0002011002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , all photon qualities
145 cutarray[ 1] = "0002011002093663003800020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 1
146 cutarray[ 2] = "0002011002093663003800030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 2
88202ecb 147 cutarray[ 3] = "0002011002093663003800040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 3
048db199 148 } else if (trainConfig == 11) {
149 cutarray[ 0] = "0002011007093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , all photon qualities, min R = 35 cm
150 cutarray[ 1] = "0002011007093663003800020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 1, min R = 35 cm
151 cutarray[ 2] = "0002011007093663003800030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 2, min R = 35 cm
88202ecb 152 cutarray[ 3] = "0002011007093663003800040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 3, min R = 35 cm
153 } else if (trainConfig == 12) {
8ce39d2b 154 cutarray[ 0] = "0000011002092970028250400000"; mesonCutArray[0] = "01525065000000"; //standard cut LHC11h pp 2.76TeV
60ade4a1 155 cutarray[ 1] = "0000011032092970028250400000"; mesonCutArray[1] = "01525065000000"; //variation eta 0.65
8ce39d2b 156 cutarray[ 2] = "0000011042092970028250400000"; mesonCutArray[2] = "01525065000000"; //variation eta 0.75
157 cutarray[ 3] = "0000011002092950028250400000"; mesonCutArray[3] = "01525065000000"; //variation pion p dEdx 0.3-5.
158 } else if (trainConfig == 13) { //added signals
159 cutarray[ 0] = "0000012002092970028250400000"; mesonCutArray[0] = "01525065000000"; //standard cut LHC11h pp 2.76TeV
60ade4a1 160 cutarray[ 1] = "0000012032092970028250400000"; mesonCutArray[1] = "01525065000000"; //variation eta 0.65
8ce39d2b 161 cutarray[ 2] = "0000012042092970028250400000"; mesonCutArray[2] = "01525065000000"; //variation eta 0.75
162 cutarray[ 3] = "0000012002092950028250400000"; mesonCutArray[3] = "01525065000000"; //variation pion p dEdx 0.3-5.
163 } else if (trainConfig == 14) {
164 cutarray[ 0] = "0000011002492970028250400000"; mesonCutArray[0] = "01525065000000"; //variation pt 0.075
60ade4a1 165 cutarray[ 1] = "0000011002192970028250400000"; mesonCutArray[1] = "01525065000000"; //variation pt 0.1
8ce39d2b 166 cutarray[ 2] = "0000011002062970028250400000"; mesonCutArray[2] = "01525065000000"; //variation TPC cls 0.7
167 cutarray[ 3] = "0000011002082970028250400000"; mesonCutArray[3] = "01525065000000"; //variation TPC cls 0.35
168 } else if (trainConfig == 15) { //added signals
169 cutarray[ 0] = "0000012002492970028250400000"; mesonCutArray[0] = "01525065000000"; //variation pt 0.075
60ade4a1 170 cutarray[ 1] = "0000012002192970028250400000"; mesonCutArray[1] = "01525065000000"; //variation pt 0.1
8ce39d2b 171 cutarray[ 2] = "0000012002062970028250400000"; mesonCutArray[2] = "01525065000000"; //variation TPC cls 0.7
172 cutarray[ 3] = "0000012002082970028250400000"; mesonCutArray[3] = "01525065000000"; //variation TPC cls 0.35
173 } else if (trainConfig == 16) {
174 cutarray[ 0] = "0000011002093970028250400000"; mesonCutArray[0] = "01525065000000"; //variation edEdx -4,5
60ade4a1 175 cutarray[ 1] = "0000011002096970028250400000"; mesonCutArray[1] = "01525065000000"; //variation edEdx -2.5,4
8ce39d2b 176 cutarray[ 2] = "0000011002092970038250400000"; mesonCutArray[2] = "01525065000000"; //variation TOF el. PID -3,5
177 cutarray[ 3] = "0000011002092970048250400000"; mesonCutArray[3] = "01525065000000"; //variation TOF el. PID -2,3
178 } else if (trainConfig == 17) { //added signals
179 cutarray[ 0] = "0000012002093970028250400000"; mesonCutArray[0] = "01525065000000"; //variation edEdx -4,5
60ade4a1 180 cutarray[ 1] = "0000012002096970028250400000"; mesonCutArray[1] = "01525065000000"; //variation edEdx -2.5,4
8ce39d2b 181 cutarray[ 2] = "0000012002092970038250400000"; mesonCutArray[2] = "01525065000000"; //variation TOF el. PID -3,5
182 cutarray[ 3] = "0000012002092970048250400000"; mesonCutArray[3] = "01525065000000"; //variation TOF el. PID -2,3
183 } else if (trainConfig == 18) {
184 cutarray[ 0] = "0000011002092970029250400000"; mesonCutArray[0] = "01525065000000"; //variation qt 0.03
60ade4a1 185 cutarray[ 1] = "0000011002092970022250400000"; mesonCutArray[1] = "01525065000000"; //variation qt 0.07 no2D
8ce39d2b 186 cutarray[ 2] = "0000011002092970028150400000"; mesonCutArray[2] = "01525065000000"; //variation chi2 50.
187 cutarray[ 3] = "0000011002092970028850400000"; mesonCutArray[3] = "01525065000000"; //variation chi2 20.
188 } else if (trainConfig == 19) { //added signals
189 cutarray[ 0] = "0000012002092970029250400000"; mesonCutArray[0] = "01525065000000"; //variation qt 0.03
60ade4a1 190 cutarray[ 1] = "0000012002092970022250400000"; mesonCutArray[1] = "01525065000000"; //variation qt 0.07 no2D
8ce39d2b 191 cutarray[ 2] = "0000012002092970028150400000"; mesonCutArray[2] = "01525065000000"; //variation chi2 50.
192 cutarray[ 3] = "0000012002092970028850400000"; mesonCutArray[3] = "01525065000000"; //variation chi2 20.
193 } else if (trainConfig == 20) {
194 cutarray[ 0] = "0000011002092970028260400000"; mesonCutArray[0] = "01525065000000"; //variation psi pair 0.05
60ade4a1 195 cutarray[ 1] = "0000011002092970028280400000"; mesonCutArray[1] = "01525065000000"; //variation psi pair 0.2
8ce39d2b 196 cutarray[ 2] = "0000011002092970028250000000"; mesonCutArray[2] = "01525065000000"; //variation cosPA -1
197 cutarray[ 3] = "0000011002092970028250400000"; mesonCutArray[3] = "01525055000000"; //variation alpha 0.75
198 } else if (trainConfig == 21) { //added signals
199 cutarray[ 0] = "0000012002092970028260400000"; mesonCutArray[0] = "01525065000000"; //variation psi pair 0.05
60ade4a1 200 cutarray[ 1] = "0000012002092970028280400000"; mesonCutArray[1] = "01525065000000"; //variation psi pair 0.2
8ce39d2b 201 cutarray[ 2] = "0000012002092970028250000000"; mesonCutArray[2] = "01525065000000"; //variation cosPA -1
202 cutarray[ 3] = "0000012002092970028250400000"; mesonCutArray[3] = "01525055000000"; //variation alpha 0.75
a28cef74 203 } else if (trainConfig == 22) {
204 cutarray[ 0] = "0004011002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kTRD
2f9f4b34 205 cutarray[ 1] = "0005011002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMC
206 cutarray[ 2] = "0006011002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kPHI
207 cutarray[ 3] = "0007011002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kHighMult
a28cef74 208 } else if (trainConfig == 23) {
2f9f4b34 209 cutarray[ 0] = "0008011002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMCEGA
210 cutarray[ 1] = "0009011002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMCEJE
a28cef74 211 cutarray[ 2] = "0000011002092970028250400000"; mesonCutArray[2] = "01525065000000"; // minimum bias
2f9f4b34 212 cutarray[ 3] = "0001111002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kINT8
213 } else if (trainConfig == 24) {
214 cutarray[ 0] = "0004211002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kTRD CINT8 HEE
215 cutarray[ 1] = "0004411002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kTRD CINT8 HSE
216 cutarray[ 2] = "0004611002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kTRD CINT8 HJE
217 cutarray[ 3] = "0004811002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kTRD CINT8 HQU
218 } else if (trainConfig == 25) {
219 cutarray[ 0] = "0004111002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kTRD CINT7 HEE
220 cutarray[ 1] = "0004311002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kTRD CINT7 HSE
221 cutarray[ 2] = "0004511002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kTRD CINT7 HJE
222 cutarray[ 3] = "0004711002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kTRD CINT7 HQU
223 } else if (trainConfig == 26) {
224 cutarray[ 0] = "0005211002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMC7
225 cutarray[ 1] = "0005311002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMC8
226 cutarray[ 2] = "0006211002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kPHI7
227 cutarray[ 3] = "0006311002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kPHI8
228 } else if (trainConfig == 27) {
229 cutarray[ 0] = "0005111002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMC1
230 cutarray[ 1] = "0007111002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kSHM1
231 cutarray[ 2] = "0007211002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kSHM7
232 cutarray[ 3] = "0007311002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kSHM8
233 } else if (trainConfig == 28) {
234 cutarray[ 0] = "0008111002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMCEGA + CINT7
235 cutarray[ 1] = "0008211002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMCEGA + CINT8
236 cutarray[ 2] = "0008311002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kEMCEG1 + CINT7
237 cutarray[ 3] = "0008411002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kEMCEG1 + CINT8
238 } else if (trainConfig == 29) {
239 cutarray[ 0] = "0008511002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMCEG2 + CINT7
240 cutarray[ 1] = "0008611002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMCEG2 + CINT8
241 cutarray[ 2] = "0009111002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kEMCEJE + CINT7
242 cutarray[ 3] = "0009211002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kEMCEJE + CINT8
243 } else if (trainConfig == 30) {
244 cutarray[ 0] = "0009311002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMCEJ1 + CINT7
245 cutarray[ 1] = "0009411002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMCEJ1 + CINT8
246 cutarray[ 2] = "0009511002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kEMCEJ2 + CINT7
247 cutarray[ 3] = "0009611002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kEMCEJ2 + CINT8
8ce39d2b 248 } else {
072021d3 249 Error(Form("GammaConvV1_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration");
250 return;
33bbd991 251 }
252
a28cef74 253 TList *ConvCutList = new TList();
254 TList *MesonCutList = new TList();
33bbd991 255
a28cef74 256 TList *HeaderList = new TList();
257 TObjString *Header2 = new TObjString("BOX");
258 HeaderList->Add(Header2);
33bbd991 259
a28cef74 260 ConvCutList->SetOwner(kTRUE);
261 AliConversionCuts **analysisCuts = new AliConversionCuts*[numberOfCuts];
262 MesonCutList->SetOwner(kTRUE);
263 AliConversionMesonCuts **analysisMesonCuts = new AliConversionMesonCuts*[numberOfCuts];
33bbd991 264
265
a28cef74 266 for(Int_t i = 0; i<numberOfCuts; i++){
267 analysisCuts[i] = new AliConversionCuts();
268 analysisCuts[i]->InitializeCutsFromCutString(cutarray[i].Data());
a28cef74 269 ConvCutList->Add(analysisCuts[i]);
270
271 analysisCuts[i]->SetFillCutHistograms("",kFALSE);
272
273 analysisMesonCuts[i] = new AliConversionMesonCuts();
274 analysisMesonCuts[i]->InitializeCutsFromCutString(mesonCutArray[i].Data());
275 MesonCutList->Add(analysisMesonCuts[i]);
276 analysisMesonCuts[i]->SetFillCutHistograms("");
277 analysisCuts[i]->SetAcceptedHeader(HeaderList);
278
279 }
33bbd991 280
a28cef74 281 task->SetConversionCutList(numberOfCuts,ConvCutList);
282 task->SetMesonCutList(numberOfCuts,MesonCutList);
283 task->SetMoveParticleAccordingToVertex(kTRUE);
284 task->SetDoMesonAnalysis(kTRUE);
285 task->SetDoMesonQA(enableQAMesonTask); //Attention new switch for Pi0 QA
286 task->SetDoPhotonQA(enableQAPhotonTask); //Attention new switch small for Photon QA
33bbd991 287
a28cef74 288 //connect containers
289 AliAnalysisDataContainer *coutput =
290 mgr->CreateContainer(Form("GammaConvV1_%i",trainConfig), TList::Class(),
291 AliAnalysisManager::kOutputContainer,Form("GammaConvV1_%i.root",trainConfig));
33bbd991 292
a28cef74 293 mgr->AddTask(task);
294 mgr->ConnectInput(task,0,cinput);
295 mgr->ConnectOutput(task,1,coutput);
33bbd991 296
a28cef74 297 return;
33bbd991 298
299}