add debug print
[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
344100c4 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 Int_t isHeavyIon = 0;
29 // ================== GetAnalysisManager ===============================
30 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
31 if (!mgr) {
32 Error(Form("AddTask_GammaConvV1_%i",trainConfig), "No analysis manager found.");
33 return ;
34 }
33bbd991 35
344100c4 36 // ================== GetInputEventHandler =============================
37 AliVEventHandler *inputHandler=mgr->GetInputEventHandler();
38
39 //========= Add PID Reponse to ANALYSIS manager ====
40 if(!(AliPIDResponse*)mgr->GetTask("PIDResponseTask")){
41 gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
42 AddTaskPIDResponse(isMC);
43 }
44
45 //========= Set Cutnumber for V0Reader ================================
46 TString cutnumberPhoton = "002084000002200000000";
47 TString cutnumberEvent = "0000000";
48 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
49
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);
33bbd991 57
344100c4 58 if (!mgr) {
59 Error("AddTask_V0ReaderV1", "No analysis manager found.");
60 return;
61 }
33bbd991 62
344100c4 63 AliConvEventCuts *fEventCuts=NULL;
64 if(cutnumberEvent!=""){
65 fEventCuts= new AliConvEventCuts(cutnumberEvent.Data(),cutnumberEvent.Data());
66 fEventCuts->SetPreSelectionCutFlag(kTRUE);
67 if(fEventCuts->InitializeCutsFromCutString(cutnumberEvent.Data())){
68 fV0ReaderV1->SetEventCuts(fEventCuts);
69 fEventCuts->SetFillCutHistograms("",kTRUE);
70 }
71 }
33bbd991 72
344100c4 73 // Set AnalysisCut Number
74 AliConversionPhotonCuts *fCuts=NULL;
75 if(cutnumberPhoton!=""){
76 fCuts= new AliConversionPhotonCuts(cutnumberPhoton.Data(),cutnumberPhoton.Data());
77 fCuts->SetPreSelectionCutFlag(kTRUE);
78 fCuts->SetIsHeavyIon(isHeavyIon);
79 if(fCuts->InitializeCutsFromCutString(cutnumberPhoton.Data())){
80 fV0ReaderV1->SetConversionCuts(fCuts);
81 fCuts->SetFillCutHistograms("",kTRUE);
82 }
83 }
84 if(inputHandler->IsA()==AliAODInputHandler::Class()){
85 // AOD mode
86 fV0ReaderV1->SetDeltaAODBranchName(Form("GammaConv_%s_gamma",cutnumberAODBranch.Data()));
87 }
88 fV0ReaderV1->Init();
33bbd991 89
344100c4 90 AliLog::SetGlobalLogLevel(AliLog::kInfo);
33bbd991 91
344100c4 92 //connect input V0Reader
93 mgr->AddTask(fV0ReaderV1);
94 mgr->ConnectInput(fV0ReaderV1,0,cinput);
95
96 }
33bbd991 97
344100c4 98 //================================================
99 //========= Add task to the ANALYSIS manager =====
100 // find input container
101 AliAnalysisTaskGammaConvV1 *task=NULL;
102 task= new AliAnalysisTaskGammaConvV1(Form("GammaConvV1_%i",trainConfig));
103 task->SetIsHeavyIon(isHeavyIon);
104 task->SetIsMC(isMC);
105 // Cut Numbers to use in Analysis
106 Int_t numberOfCuts = 4;
33bbd991 107
344100c4 108 TString *eventCutArray = new TString[numberOfCuts];
109 TString *photonCutArray = new TString[numberOfCuts];
110 TString *mesonCutArray = new TString[numberOfCuts];
33bbd991 111
344100c4 112 if(trainConfig == 1){
113 eventCutArray[ 0] = "0000012"; photonCutArray[ 0] = "002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , only boxes
114 eventCutArray[ 1] = "0001012"; photonCutArray[ 1] = "002093663003800000000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD, V0AND , only boxes
115 eventCutArray[ 2] = "0000012"; photonCutArray[ 2] = "002093260003800000000"; mesonCutArray[2] = "01631031009000"; //standard cut Gamma pp 2-76TeV , only boxes
116 eventCutArray[ 3] = "0000012"; photonCutArray[ 3] = "002093260003800000000"; mesonCutArray[3] = "01631031009000"; //standard cut Gamma pp 2-76TeV , only boxes
117 } else if (trainConfig == 2) {
118 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , only Minbias MC
119 eventCutArray[ 1] = "0001011"; photonCutArray[ 1] = "002093663003800000000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD, V0AND
120 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002093260003800000000"; mesonCutArray[2] = "01631031009000"; //standard cut Gamma pp 2-76TeV
121 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "002093260003800000000"; mesonCutArray[3] = "01631031009000"; //standard cut Gamma pp 2-76TeV
122 } else if (trainConfig == 3) {
123 eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , only Minbias MC
124 eventCutArray[ 1] = "0003011"; photonCutArray[ 1] = "002093663003800000000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD, V0AND , only Minbias MC
125 eventCutArray[ 2] = "0002012"; photonCutArray[ 2] = "002093663003800000000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , only Boxes MC
126 eventCutArray[ 3] = "0003012"; photonCutArray[ 3] = "002093663003800000000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD, V0AND, only Boxes MC
127 } else if (trainConfig == 4) {
128 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , all photon qualities
129 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002093663003800020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 1
130 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002093663003800030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 2
131 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "002093663003800040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 3
132 } else if (trainConfig == 5) {
133 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "007093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , all photon qualities, min R = 35 cm
134 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "007093663003800020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 1, min R = 35 cm
135 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "007093663003800030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 2, min R = 35 cm
136 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "007093663003800040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV without SDD , photon quality 3, min R = 35 cm
137 } else if (trainConfig == 6) {
138 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002083663003200000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, all photon qualities
139 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002083663003200020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 1
140 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002083663003200030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 2
141 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "002083663003200040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 3
142 } else if (trainConfig == 7) {
143 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "007083663003200000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, all photon qualities, min R = 35 cm
144 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "007083663003200020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 1, min R = 35 cm
145 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "007083663003200030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 2, min R = 35 cm
146 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "007083663003200040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 7TeV, with qt cut 0.05, photon quality 3, min R = 35 cm
147 } else if (trainConfig == 8) {
148 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002083663000200000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 7TeV, all photon qualities
149 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002083663000200020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 1
150 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002083663000200030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 2
151 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "002083663000200040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 3
152 } else if (trainConfig == 9) {
153 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "007083663000200000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 7TeV, all photon qualities, min R = 35 cm
154 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "007083663000200020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 1, min R = 35 cm
155 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "007083663000200030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 2, min R = 35 cm
156 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "007083663000200040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 7TeV, photon quality 3, min R = 35 cm
157 } else if (trainConfig == 10) {
158 eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "002093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , all photon qualities
159 eventCutArray[ 1] = "0002011"; photonCutArray[ 1] = "002093663003800020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 1
160 eventCutArray[ 2] = "0002011"; photonCutArray[ 2] = "002093663003800030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 2
161 eventCutArray[ 3] = "0002011"; photonCutArray[ 3] = "002093663003800040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 3
162 } else if (trainConfig == 11) {
163 eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "007093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , all photon qualities, min R = 35 cm
164 eventCutArray[ 1] = "0002011"; photonCutArray[ 1] = "007093663003800020000"; mesonCutArray[1] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 1, min R = 35 cm
165 eventCutArray[ 2] = "0002011"; photonCutArray[ 2] = "007093663003800030000"; mesonCutArray[2] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 2, min R = 35 cm
166 eventCutArray[ 3] = "0002011"; photonCutArray[ 3] = "007093663003800040000"; mesonCutArray[3] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , photon quality 3, min R = 35 cm
167 } else if (trainConfig == 12) {
168 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; //standard cut LHC11h pp 2.76TeV
169 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "032092970028250400000"; mesonCutArray[1] = "01525065000000"; //variation eta 0.65
170 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "042092970028250400000"; mesonCutArray[2] = "01525065000000"; //variation eta 0.75
171 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "002092950028250400000"; mesonCutArray[3] = "01525065000000"; //variation pion p dEdx 0.3-5.
172 } else if (trainConfig == 13) { //added signals
173 eventCutArray[ 0] = "0000012"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; //standard cut LHC11h pp 2.76TeV
174 eventCutArray[ 1] = "0000012"; photonCutArray[ 1] = "032092970028250400000"; mesonCutArray[1] = "01525065000000"; //variation eta 0.65
175 eventCutArray[ 2] = "0000012"; photonCutArray[ 2] = "042092970028250400000"; mesonCutArray[2] = "01525065000000"; //variation eta 0.75
176 eventCutArray[ 3] = "0000012"; photonCutArray[ 3] = "002092950028250400000"; mesonCutArray[3] = "01525065000000"; //variation pion p dEdx 0.3-5.
8ce39d2b 177 } else if (trainConfig == 14) {
344100c4 178 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002492970028250400000"; mesonCutArray[0] = "01525065000000"; //variation pt 0.075
179 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002192970028250400000"; mesonCutArray[1] = "01525065000000"; //variation pt 0.1
180 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002062970028250400000"; mesonCutArray[2] = "01525065000000"; //variation TPC cls 0.7
181 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "002082970028250400000"; mesonCutArray[3] = "01525065000000"; //variation TPC cls 0.35
8ce39d2b 182 } else if (trainConfig == 15) { //added signals
344100c4 183 eventCutArray[ 0] = "0000012"; photonCutArray[ 0] = "002492970028250400000"; mesonCutArray[0] = "01525065000000"; //variation pt 0.075
184 eventCutArray[ 1] = "0000012"; photonCutArray[ 1] = "002192970028250400000"; mesonCutArray[1] = "01525065000000"; //variation pt 0.1
185 eventCutArray[ 2] = "0000012"; photonCutArray[ 2] = "002062970028250400000"; mesonCutArray[2] = "01525065000000"; //variation TPC cls 0.7
186 eventCutArray[ 3] = "0000012"; photonCutArray[ 3] = "002082970028250400000"; mesonCutArray[3] = "01525065000000"; //variation TPC cls 0.35
8ce39d2b 187 } else if (trainConfig == 16) {
344100c4 188 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002093970028250400000"; mesonCutArray[0] = "01525065000000"; //variation edEdx -4,5
189 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002096970028250400000"; mesonCutArray[1] = "01525065000000"; //variation edEdx -2.5,4
190 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002092970038250400000"; mesonCutArray[2] = "01525065000000"; //variation TOF el. PID -3,5
191 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "002092970048250400000"; mesonCutArray[3] = "01525065000000"; //variation TOF el. PID -2,3
8ce39d2b 192 } else if (trainConfig == 17) { //added signals
344100c4 193 eventCutArray[ 0] = "0000012"; photonCutArray[ 0] = "002093970028250400000"; mesonCutArray[0] = "01525065000000"; //variation edEdx -4,5
194 eventCutArray[ 1] = "0000012"; photonCutArray[ 1] = "002096970028250400000"; mesonCutArray[1] = "01525065000000"; //variation edEdx -2.5,4
195 eventCutArray[ 2] = "0000012"; photonCutArray[ 2] = "002092970038250400000"; mesonCutArray[2] = "01525065000000"; //variation TOF el. PID -3,5
196 eventCutArray[ 3] = "0000012"; photonCutArray[ 3] = "002092970048250400000"; mesonCutArray[3] = "01525065000000"; //variation TOF el. PID -2,3
8ce39d2b 197 } else if (trainConfig == 18) {
344100c4 198 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002092970029250400000"; mesonCutArray[0] = "01525065000000"; //variation qt 0.03
199 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002092970022250400000"; mesonCutArray[1] = "01525065000000"; //variation qt 0.07 no2D
200 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002092970028150400000"; mesonCutArray[2] = "01525065000000"; //variation chi2 50.
201 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "002092970028850400000"; mesonCutArray[3] = "01525065000000"; //variation chi2 20.
8ce39d2b 202 } else if (trainConfig == 19) { //added signals
344100c4 203 eventCutArray[ 0] = "0000012"; photonCutArray[ 0] = "002092970029250400000"; mesonCutArray[0] = "01525065000000"; //variation qt 0.03
204 eventCutArray[ 1] = "0000012"; photonCutArray[ 1] = "002092970022250400000"; mesonCutArray[1] = "01525065000000"; //variation qt 0.07 no2D
205 eventCutArray[ 2] = "0000012"; photonCutArray[ 2] = "002092970028150400000"; mesonCutArray[2] = "01525065000000"; //variation chi2 50.
206 eventCutArray[ 3] = "0000012"; photonCutArray[ 3] = "002092970028850400000"; mesonCutArray[3] = "01525065000000"; //variation chi2 20.
8ce39d2b 207 } else if (trainConfig == 20) {
344100c4 208 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002092970028260400000"; mesonCutArray[0] = "01525065000000"; //variation psi pair 0.05
209 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002092970028280400000"; mesonCutArray[1] = "01525065000000"; //variation psi pair 0.2
210 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002092970028250000000"; mesonCutArray[2] = "01525065000000"; //variation cosPA -1
211 eventCutArray[ 3] = "0000011"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525055000000"; //variation alpha 0.75
8ce39d2b 212 } else if (trainConfig == 21) { //added signals
344100c4 213 eventCutArray[ 0] = "0000012"; photonCutArray[ 0] = "002092970028260400000"; mesonCutArray[0] = "01525065000000"; //variation psi pair 0.05
214 eventCutArray[ 1] = "0000012"; photonCutArray[ 1] = "002092970028280400000"; mesonCutArray[1] = "01525065000000"; //variation psi pair 0.2
215 eventCutArray[ 2] = "0000012"; photonCutArray[ 2] = "002092970028250000000"; mesonCutArray[2] = "01525065000000"; //variation cosPA -1
216 eventCutArray[ 3] = "0000012"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525055000000"; //variation alpha 0.75
a28cef74 217 } else if (trainConfig == 22) {
344100c4 218 eventCutArray[ 0] = "0004011"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kTRD
219 eventCutArray[ 1] = "0005011"; photonCutArray[ 1] = "002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMC
220 eventCutArray[ 2] = "0006011"; photonCutArray[ 2] = "002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kPHI
221 eventCutArray[ 3] = "0007011"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kHighMult
a28cef74 222 } else if (trainConfig == 23) {
344100c4 223 eventCutArray[ 0] = "0008011"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMCEGA
224 eventCutArray[ 1] = "0009011"; photonCutArray[ 1] = "002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMCEJE
225 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002092970028250400000"; mesonCutArray[2] = "01525065000000"; // minimum bias
226 eventCutArray[ 3] = "0001111"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kINT8
2f9f4b34 227 } else if (trainConfig == 24) {
344100c4 228 eventCutArray[ 0] = "0004211"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kTRD CINT8 HEE
229 eventCutArray[ 1] = "0004411"; photonCutArray[ 1] = "002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kTRD CINT8 HSE
230 eventCutArray[ 2] = "0004611"; photonCutArray[ 2] = "002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kTRD CINT8 HJE
231 eventCutArray[ 3] = "0004811"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kTRD CINT8 HQU
2f9f4b34 232 } else if (trainConfig == 25) {
344100c4 233 eventCutArray[ 0] = "0004111"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kTRD CINT7 HEE
234 eventCutArray[ 1] = "0004311"; photonCutArray[ 1] = "002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kTRD CINT7 HSE
235 eventCutArray[ 2] = "0004511"; photonCutArray[ 2] = "002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kTRD CINT7 HJE
236 eventCutArray[ 3] = "0004711"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kTRD CINT7 HQU
2f9f4b34 237 } else if (trainConfig == 26) {
344100c4 238 eventCutArray[ 0] = "0005211"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMC7
239 eventCutArray[ 1] = "0005311"; photonCutArray[ 1] = "002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMC8
240 eventCutArray[ 2] = "0006211"; photonCutArray[ 2] = "002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kPHI7
241 eventCutArray[ 3] = "0006311"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kPHI8
2f9f4b34 242 } else if (trainConfig == 27) {
344100c4 243 eventCutArray[ 0] = "0005111"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMC1
244 eventCutArray[ 1] = "0007111"; photonCutArray[ 1] = "002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kSHM1
245 eventCutArray[ 2] = "0007211"; photonCutArray[ 2] = "002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kSHM7
246 eventCutArray[ 3] = "0007311"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kSHM8
2f9f4b34 247 } else if (trainConfig == 28) {
344100c4 248 eventCutArray[ 0] = "0008111"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMCEGA + CINT7
249 eventCutArray[ 1] = "0008211"; photonCutArray[ 1] = "002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMCEGA + CINT8
250 eventCutArray[ 2] = "0008311"; photonCutArray[ 2] = "002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kEMCEG1 + CINT7
251 eventCutArray[ 3] = "0008411"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kEMCEG1 + CINT8
2f9f4b34 252 } else if (trainConfig == 29) {
344100c4 253 eventCutArray[ 0] = "0008511"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMCEG2 + CINT7
254 eventCutArray[ 1] = "0008611"; photonCutArray[ 1] = "002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMCEG2 + CINT8
255 eventCutArray[ 2] = "0009111"; photonCutArray[ 2] = "002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kEMCEJE + CINT7
256 eventCutArray[ 3] = "0009211"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kEMCEJE + CINT8
2f9f4b34 257 } else if (trainConfig == 30) {
344100c4 258 eventCutArray[ 0] = "0009311"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; // trigger kEMCEJ1 + CINT7
259 eventCutArray[ 1] = "0009411"; photonCutArray[ 1] = "002092970028250400000"; mesonCutArray[1] = "01525065000000"; // trigger kEMCEJ1 + CINT8
260 eventCutArray[ 2] = "0009511"; photonCutArray[ 2] = "002092970028250400000"; mesonCutArray[2] = "01525065000000"; // trigger kEMCEJ2 + CINT7
261 eventCutArray[ 3] = "0009611"; photonCutArray[ 3] = "002092970028250400000"; mesonCutArray[3] = "01525065000000"; // trigger kEMCEJ2 + CINT8
8ce39d2b 262 } else {
344100c4 263 Error(Form("GammaConvV1_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration");
264 return;
265 }
33bbd991 266
344100c4 267 TList *EventCutList = new TList();
a28cef74 268 TList *ConvCutList = new TList();
269 TList *MesonCutList = new TList();
33bbd991 270
a28cef74 271 TList *HeaderList = new TList();
272 TObjString *Header2 = new TObjString("BOX");
273 HeaderList->Add(Header2);
33bbd991 274
344100c4 275 EventCutList->SetOwner(kTRUE);
276 AliConvEventCuts **analysisEventCuts = new AliConvEventCuts*[numberOfCuts];
a28cef74 277 ConvCutList->SetOwner(kTRUE);
344100c4 278 AliConversionPhotonCuts **analysisCuts = new AliConversionPhotonCuts*[numberOfCuts];
a28cef74 279 MesonCutList->SetOwner(kTRUE);
280 AliConversionMesonCuts **analysisMesonCuts = new AliConversionMesonCuts*[numberOfCuts];
33bbd991 281
282
a28cef74 283 for(Int_t i = 0; i<numberOfCuts; i++){
344100c4 284 analysisEventCuts[i] = new AliConvEventCuts();
285 analysisEventCuts[i]->InitializeCutsFromCutString(eventCutArray[i].Data());
286 EventCutList->Add(analysisEventCuts[i]);
287 analysisEventCuts[i]->SetFillCutHistograms("",kFALSE);
a28cef74 288
344100c4 289 analysisCuts[i] = new AliConversionPhotonCuts();
290 analysisCuts[i]->InitializeCutsFromCutString(photonCutArray[i].Data());
291 ConvCutList->Add(analysisCuts[i]);
a28cef74 292 analysisCuts[i]->SetFillCutHistograms("",kFALSE);
344100c4 293
a28cef74 294 analysisMesonCuts[i] = new AliConversionMesonCuts();
295 analysisMesonCuts[i]->InitializeCutsFromCutString(mesonCutArray[i].Data());
296 MesonCutList->Add(analysisMesonCuts[i]);
297 analysisMesonCuts[i]->SetFillCutHistograms("");
a28cef74 298
344100c4 299 analysisEventCuts[i]->SetAcceptedHeader(HeaderList);
a28cef74 300 }
33bbd991 301
344100c4 302 task->SetEventCutList(numberOfCuts,EventCutList);
a28cef74 303 task->SetConversionCutList(numberOfCuts,ConvCutList);
304 task->SetMesonCutList(numberOfCuts,MesonCutList);
305 task->SetMoveParticleAccordingToVertex(kTRUE);
306 task->SetDoMesonAnalysis(kTRUE);
307 task->SetDoMesonQA(enableQAMesonTask); //Attention new switch for Pi0 QA
308 task->SetDoPhotonQA(enableQAPhotonTask); //Attention new switch small for Photon QA
33bbd991 309
a28cef74 310 //connect containers
311 AliAnalysisDataContainer *coutput =
312 mgr->CreateContainer(Form("GammaConvV1_%i",trainConfig), TList::Class(),
313 AliAnalysisManager::kOutputContainer,Form("GammaConvV1_%i.root",trainConfig));
33bbd991 314
a28cef74 315 mgr->AddTask(task);
316 mgr->ConnectInput(task,0,cinput);
317 mgr->ConnectOutput(task,1,coutput);
33bbd991 318
a28cef74 319 return;
33bbd991 320
321}