TENDER becomes Tender, removing .so
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / macros / AddTask_GammaConvCalo_pp.C
CommitLineData
8bdca7f1 1void AddTask_GammaConvCalo_pp( Int_t trainConfig = 1, //change different set of cuts
2 Bool_t isMC = kFALSE, //run MC
3 Int_t enableQAMesonTask = 1, //enable QA in AliAnalysisTaskGammaConvV1
4 Int_t enableQAPhotonTask = 1, // enable additional QA task
5 TString fileNameInputForWeighting = "MCSpectraInput.root", // path to file for weigting input
4e8dcc76 6 TString cutnumberAODBranch = "0000000060084001001500000",
7 Bool_t enableExtendedMatching = kFALSE //enable or disable extended matching histograms for conversion electrons <-> cluster
8bdca7f1 8 ) {
9
10 // ================= Load Librariers =================================
230b7aff 11 gSystem->Load("libCore");
12 gSystem->Load("libTree");
13 gSystem->Load("libGeom");
14 gSystem->Load("libVMC");
15 gSystem->Load("libPhysics");
8bdca7f1 16 gSystem->Load("libMinuit");
17 gSystem->Load("libSTEERBase");
18 gSystem->Load("libESD");
19 gSystem->Load("libAOD");
20 gSystem->Load("libANALYSIS");
21 gSystem->Load("libANALYSISalice");
230b7aff 22 gSystem->Load("libCDB");
23 gSystem->Load("libSTEER");
24 gSystem->Load("libSTEERBase");
25 gSystem->Load("libTender");
26 gSystem->Load("libTenderSupplies");
27 gSystem->Load("libPWGflowBase");
28 gSystem->Load("libPWGflowTasks");
29 gSystem->Load("libPWGGAGammaConv");
4e1b9acf 30
344100c4 31 Int_t isHeavyIon = 0;
32
8bdca7f1 33 // ================== GetAnalysisManager ===============================
34 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
35 if (!mgr) {
36 Error(Form("AddTask_GammaConvV1_%i",trainConfig), "No analysis manager found.");
37 return ;
38 }
39
40 // ================== GetInputEventHandler =============================
41 AliVEventHandler *inputHandler=mgr->GetInputEventHandler();
42
43 //========= Add PID Reponse to ANALYSIS manager ====
44 if(!(AliPIDResponse*)mgr->GetTask("PIDResponseTask")){
45 gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
344100c4 46 AddTaskPIDResponse(isMC);
8bdca7f1 47 }
48
ed8bc1ca 49 Printf("here \n");
50
8bdca7f1 51 //========= Set Cutnumber for V0Reader ================================
3013611f 52 TString cutnumberPhoton = "060000084001001500000000";
344100c4 53 TString cutnumberEvent = "0000000";
ed8bc1ca 54 Bool_t doEtaShift = kFALSE;
8bdca7f1 55 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
56
57 //========= Add V0 Reader to ANALYSIS manager if not yet existent =====
58 if( !(AliV0ReaderV1*)mgr->GetTask("V0ReaderV1") ){
59 AliV0ReaderV1 *fV0ReaderV1 = new AliV0ReaderV1("V0ReaderV1");
60
61 fV0ReaderV1->SetUseOwnXYZCalculation(kTRUE);
62 fV0ReaderV1->SetCreateAODs(kFALSE);// AOD Output
63 fV0ReaderV1->SetUseAODConversionPhoton(kTRUE);
64
65 if (!mgr) {
66 Error("AddTask_V0ReaderV1", "No analysis manager found.");
67 return;
68 }
69
344100c4 70 AliConvEventCuts *fEventCuts=NULL;
71 if(cutnumberEvent!=""){
72 fEventCuts= new AliConvEventCuts(cutnumberEvent.Data(),cutnumberEvent.Data());
73 fEventCuts->SetPreSelectionCutFlag(kTRUE);
74 if(fEventCuts->InitializeCutsFromCutString(cutnumberEvent.Data())){
ed8bc1ca 75 fEventCuts->DoEtaShift(doEtaShift);
344100c4 76 fV0ReaderV1->SetEventCuts(fEventCuts);
77 fEventCuts->SetFillCutHistograms("",kTRUE);
78 }
79 }
80
8bdca7f1 81 // Set AnalysisCut Number
344100c4 82 AliConversionPhotonCuts *fCuts=NULL;
83 if(cutnumberPhoton!=""){
84 fCuts= new AliConversionPhotonCuts(cutnumberPhoton.Data(),cutnumberPhoton.Data());
8bdca7f1 85 fCuts->SetPreSelectionCutFlag(kTRUE);
344100c4 86 fCuts->SetIsHeavyIon(isHeavyIon);
87 if(fCuts->InitializeCutsFromCutString(cutnumberPhoton.Data())){
8bdca7f1 88 fV0ReaderV1->SetConversionCuts(fCuts);
89 fCuts->SetFillCutHistograms("",kTRUE);
90 }
91 }
92 if(inputHandler->IsA()==AliAODInputHandler::Class()){
93 // AOD mode
94 fV0ReaderV1->SetDeltaAODBranchName(Form("GammaConv_%s_gamma",cutnumberAODBranch.Data()));
95 }
96 fV0ReaderV1->Init();
97
98 AliLog::SetGlobalLogLevel(AliLog::kFatal);
99
100 //connect input V0Reader
101 mgr->AddTask(fV0ReaderV1);
102 mgr->ConnectInput(fV0ReaderV1,0,cinput);
103
104 }
105
106 //================================================
107 //========= Add task to the ANALYSIS manager =====
108 //================================================
109 AliAnalysisTaskGammaConvCalo *task=NULL;
110 task= new AliAnalysisTaskGammaConvCalo(Form("GammaConvCalo_%i",trainConfig));
ed8bc1ca 111 task->SetIsHeavyIon(isHeavyIon);
8bdca7f1 112 task->SetIsMC(isMC);
113 // Cut Numbers to use in Analysis
0e006b2c 114 Int_t numberOfCuts = 2;
f1018ee5 115 if (trainConfig==2 || trainConfig==3 || trainConfig==4 || trainConfig==5 || trainConfig==6 || trainConfig==7 ){ numberOfCuts =5;}
0106c7c5 116 if (trainConfig==8 || trainConfig==10){ numberOfCuts =4;}
117 if (trainConfig==11 || trainConfig==31 || trainConfig==32 ){ numberOfCuts =6;}
0e006b2c 118
344100c4 119 TString *eventCutArray = new TString[numberOfCuts];
120 TString *photonCutArray = new TString[numberOfCuts];
121 TString *clusterCutArray = new TString[numberOfCuts];
8bdca7f1 122 TString *mesonCutArray = new TString[numberOfCuts];
123
ed8bc1ca 124 // cluster cuts
125 // 0 "ClusterType", 1 "EtaMin", 2 "EtaMax", 3 "PhiMin", 4 "PhiMax", 5 "DistanceToBadChannel", 6 "Timing", 7 "TrackMatching", 8 "ExoticCell",
126 // 9 "MinEnergy", 10 "MinNCells", 11 "MinM02", 12 "MaxM02", 13 "MinM20", 14 "MaxM20", 15 "MaximumDispersion", 16 "NLM"
0e006b2c 127
128 // ************************************* EMCAL cuts ****************************************************
129 // LHC11a
130 if (trainConfig == 1){ // EMCAL clusters 2.76 TeV LHC11a, with SDD (0), kEMC1 (1)
3013611f 131 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002000093270008250400000"; clusterCutArray[0] = "10000042032030000"; mesonCutArray[0] = "01631031000000"; // 400 MeV cluster min energy
132 eventCutArray[ 1] = "0005111"; photonCutArray[ 1] = "002000093270008250400000"; clusterCutArray[1] = "10000042032030000"; mesonCutArray[1] = "01631031000000"; // 400 MeV cluster min energy
0e006b2c 133 } else if (trainConfig == 2){ //EMCAL minEnergy variation
3013611f 134 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002000093270008250400000"; clusterCutArray[0] = "10000042012030000"; mesonCutArray[0] = "01631031000000"; //0.2 GeV/c
135 eventCutArray[ 1] = "0000311"; photonCutArray[ 1] = "002000093270008250400000"; clusterCutArray[1] = "10000042022030000"; mesonCutArray[1] = "01631031000000"; //0.3 GeV/c
136 eventCutArray[ 2] = "0000311"; photonCutArray[ 2] = "002000093270008250400000"; clusterCutArray[2] = "10000042032030000"; mesonCutArray[2] = "01631031000000"; //0.4 GeV/c default
137 eventCutArray[ 3] = "0000311"; photonCutArray[ 3] = "002000093270008250400000"; clusterCutArray[3] = "10000042042030000"; mesonCutArray[3] = "01631031000000"; //0.5 GeV/c
138 eventCutArray[ 4] = "0000311"; photonCutArray[ 4] = "002000093270008250400000"; clusterCutArray[4] = "10000042052030000"; mesonCutArray[4] = "01631031000000"; //0.6 GeV/c
0e006b2c 139 } else if (trainConfig == 3){ //EMCAL minNCells variation
3013611f 140 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002000093270008250400000"; clusterCutArray[0] = "10000042031030000"; mesonCutArray[0] = "01631031000000"; //n cells >= 1
141 eventCutArray[ 1] = "0000311"; photonCutArray[ 1] = "002000093270008250400000"; clusterCutArray[1] = "10000042033030000"; mesonCutArray[1] = "01631031000000"; //n cells >= 3
142 eventCutArray[ 2] = "0000311"; photonCutArray[ 2] = "002000093270008250400000"; clusterCutArray[2] = "10000042032000000"; mesonCutArray[2] = "01631031000000"; //no M02 cut
143 eventCutArray[ 3] = "0000311"; photonCutArray[ 3] = "002000093270008250400000"; clusterCutArray[3] = "10031042032030000"; mesonCutArray[3] = "01631031000000"; //only modules with TRD infront
144 eventCutArray[ 4] = "0000311"; photonCutArray[ 4] = "002000093270008250400000"; clusterCutArray[4] = "10012042032030000"; mesonCutArray[4] = "01631031000000"; //no modules with TRD infront
0e006b2c 145 } else if (trainConfig == 4){ // EMCAL track matching variations
3013611f 146 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002000093270008250400000"; clusterCutArray[0] = "10000041032030000"; mesonCutArray[0] = "01631031000000"; //
147 eventCutArray[ 1] = "0000311"; photonCutArray[ 1] = "002000093270008250400000"; clusterCutArray[1] = "10000042032030000"; mesonCutArray[1] = "01631031000000"; //
148 eventCutArray[ 2] = "0000311"; photonCutArray[ 2] = "002000093270008250400000"; clusterCutArray[2] = "10000043032030000"; mesonCutArray[2] = "01631031000000"; //
149 eventCutArray[ 3] = "0000311"; photonCutArray[ 3] = "002000093270008250400000"; clusterCutArray[3] = "10000044032030000"; mesonCutArray[3] = "01631031000000"; //
150 eventCutArray[ 4] = "0000311"; photonCutArray[ 4] = "002000093270008250400000"; clusterCutArray[4] = "10000045032030000"; mesonCutArray[4] = "01631031000000"; //
f1018ee5 151 } else if (trainConfig == 5){ // PCM variations
3013611f 152 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002000092270008250400000"; clusterCutArray[0] = "10000042032030000"; mesonCutArray[0] = "01631031000000"; // dEdx e -3, 5
153 eventCutArray[ 1] = "0000311"; photonCutArray[ 1] = "002000091270008250400000"; clusterCutArray[1] = "10000042032030000"; mesonCutArray[1] = "01631031000000"; // dEdx e -5, 5
154 eventCutArray[ 2] = "0000311"; photonCutArray[ 2] = "002000093570008250400000"; clusterCutArray[2] = "10000042032030000"; mesonCutArray[2] = "01631031000000"; // dEdx pi 2
155 eventCutArray[ 3] = "0000311"; photonCutArray[ 3] = "002000093170008250400000"; clusterCutArray[3] = "10000042032030000"; mesonCutArray[3] = "01631031000000"; // dEdx pi 0
156 eventCutArray[ 4] = "0000311"; photonCutArray[ 4] = "002000093873008250400000"; clusterCutArray[4] = "10000042032030000"; mesonCutArray[4] = "01631031000000"; // dEdx pi 2 high 1 (> 3.5 GeV)
f1018ee5 157 } else if (trainConfig == 6){ // PCM variations
3013611f 158 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002000093270009250400000"; clusterCutArray[0] = "10000042032030000"; mesonCutArray[0] = "01631031000000"; // qt 2D 0.03
159 eventCutArray[ 1] = "0000311"; photonCutArray[ 1] = "002000093270003250400000"; clusterCutArray[1] = "10000042032030000"; mesonCutArray[1] = "01631031000000"; // qt 1D 0.05
160 eventCutArray[ 2] = "0000311"; photonCutArray[ 2] = "002000093270002250400000"; clusterCutArray[2] = "10000042032030000"; mesonCutArray[2] = "01631031000000"; // qt 1D 0.07
161 eventCutArray[ 3] = "0000311"; photonCutArray[ 3] = "002000493270008250400000"; clusterCutArray[3] = "10000042032030000"; mesonCutArray[3] = "01631031000000"; // single pt > 0.075
162 eventCutArray[ 4] = "0000311"; photonCutArray[ 4] = "002000193270008250400000"; clusterCutArray[4] = "10000042032030000"; mesonCutArray[4] = "01631031000000"; // single pt > 0.1
f1018ee5 163 } else if (trainConfig == 7){ // PCM variations
3013611f 164 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002000093270008850400000"; clusterCutArray[0] = "10000042032030000"; mesonCutArray[0] = "01631031000000"; // 2D psi pair chi2 var
165 eventCutArray[ 1] = "0000311"; photonCutArray[ 1] = "002000093270008260400000"; clusterCutArray[1] = "10000042032030000"; mesonCutArray[1] = "01631031000000"; // 2D psi pair chi2 var
166 eventCutArray[ 2] = "0000311"; photonCutArray[ 2] = "002000093270008860400000"; clusterCutArray[2] = "10000042032030000"; mesonCutArray[2] = "01631031000000"; // 2D psi pair chi2 var
167 eventCutArray[ 3] = "0000311"; photonCutArray[ 3] = "002000093270008280400000"; clusterCutArray[3] = "10000042032030000"; mesonCutArray[3] = "01631031000000"; // 2D psi pair chi2 var
168 eventCutArray[ 4] = "0000311"; photonCutArray[ 4] = "002000093270008880400000"; clusterCutArray[4] = "10000042032030000"; mesonCutArray[4] = "01631031000000"; // 2D psi pair chi2 var
f1018ee5 169 } else if (trainConfig == 8){ // PCM variations
3013611f 170 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002000063270008250400000"; clusterCutArray[0] = "10000042032030000"; mesonCutArray[0] = "01631031000000"; // min TPC cl > 0.7
171 eventCutArray[ 1] = "0000311"; photonCutArray[ 1] = "002000083270008250400000"; clusterCutArray[1] = "10000042032030000"; mesonCutArray[1] = "01631031000000"; // min TPC cl > 0.35
172 eventCutArray[ 2] = "0000311"; photonCutArray[ 2] = "002000093270008250400000"; clusterCutArray[2] = "10000042032030000"; mesonCutArray[2] = "01631061000000"; // alpha < 0.8
173 eventCutArray[ 3] = "0000311"; photonCutArray[ 3] = "002000093270008250400000"; clusterCutArray[3] = "10000042032030000"; mesonCutArray[3] = "01631051000000"; // alpha < 0.75
04013150 174 } else if (trainConfig == 9){ // PCM variations
175 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002022093270008250400000"; clusterCutArray[0] = "10000042032030000"; mesonCutArray[0] = "01631031000000"; // restrict acceptance to EMCAL loose
176 eventCutArray[ 1] = "0000311"; photonCutArray[ 1] = "002044093270008250400000"; clusterCutArray[1] = "10000042032030000"; mesonCutArray[1] = "01631031000000"; // restrict acceptance to EMCAL tight
0106c7c5 177 } else if (trainConfig == 10){ // EMCAL clusters 2.76 TeV LHC11a, with SDD (0), kEMC1 (1)
178 eventCutArray[ 0] = "0005111"; photonCutArray[ 0] = "002000093270008250400000"; clusterCutArray[0] = "10000042062030000"; mesonCutArray[0] = "01631031000000"; // min Energy cluster = 4.5 GeV
179 eventCutArray[ 1] = "0005111"; photonCutArray[ 1] = "002000093270008250400000"; clusterCutArray[1] = "10000042072030000"; mesonCutArray[1] = "01631031000000"; // min Energy cluster = 5.0 GeV
180 eventCutArray[ 2] = "0005111"; photonCutArray[ 2] = "002000093270008250400000"; clusterCutArray[2] = "10000042082030000"; mesonCutArray[2] = "01631031000000"; // min Energy cluster = 5.5 GeV
181 eventCutArray[ 3] = "0005111"; photonCutArray[ 3] = "002000093270008250400000"; clusterCutArray[3] = "10000042092030000"; mesonCutArray[3] = "01631031000000"; // min Energy cluster = 6.0 GeV
f1018ee5 182 // LHC13g
0106c7c5 183 } else if (trainConfig == 11){ // EMCAL clusters, EMCEGA triggers, track matching 0.035
3013611f 184 eventCutArray[ 0] = "0008311"; photonCutArray[ 0] = "002000093270008250400000"; clusterCutArray[0] = "10000042032030000"; mesonCutArray[0] = "01631031000000"; // EMCEG1,
185 eventCutArray[ 1] = "0008511"; photonCutArray[ 1] = "002000093270008250400000"; clusterCutArray[1] = "10000042032030000"; mesonCutArray[1] = "01631031000000"; // EMCEG2,
186 eventCutArray[ 2] = "0009311"; photonCutArray[ 2] = "002000093270008250400000"; clusterCutArray[2] = "10000042032030000"; mesonCutArray[2] = "01631031000000"; // EMCEJ1,
187 eventCutArray[ 3] = "0009511"; photonCutArray[ 3] = "002000093270008250400000"; clusterCutArray[3] = "10000042032030000"; mesonCutArray[3] = "01631031000000"; // EMCEJ2,
188 eventCutArray[ 4] = "0000011"; photonCutArray[ 4] = "002000093270008250400000"; clusterCutArray[4] = "10000042032030000"; mesonCutArray[4] = "01631031000000"; // INT7
189 eventCutArray[ 5] = "0005211"; photonCutArray[ 5] = "002000093270008250400000"; clusterCutArray[5] = "10000042032030000"; mesonCutArray[5] = "01631031000000"; // EMC7
0e006b2c 190
191 // ************************************* PHOS cuts ****************************************************
192 // LHC11a
193 } else if (trainConfig == 31) { //PHOS clusters
3013611f 194 eventCutArray[ 0] = "0000311"; photonCutArray[ 0] = "002000093270008250400000"; clusterCutArray[0] = "20000041033200000"; mesonCutArray[0] = "01631031000000";
195 eventCutArray[ 1] = "0000311"; photonCutArray[ 1] = "002000093270008250400000"; clusterCutArray[1] = "20000042033200000"; mesonCutArray[1] = "01631031000000";
196 eventCutArray[ 2] = "0000311"; photonCutArray[ 2] = "002000093270008250400000"; clusterCutArray[2] = "20000043033200000"; mesonCutArray[2] = "01631031000000";
197 eventCutArray[ 3] = "0006111"; photonCutArray[ 3] = "002000093270008250400000"; clusterCutArray[3] = "20000041033200000"; mesonCutArray[3] = "01631031000000";
198 eventCutArray[ 4] = "0006111"; photonCutArray[ 4] = "002000093270008250400000"; clusterCutArray[4] = "20000042033200000"; mesonCutArray[4] = "01631031000000";
199 eventCutArray[ 5] = "0006111"; photonCutArray[ 5] = "002000093270008250400000"; clusterCutArray[5] = "20000043033200000"; mesonCutArray[5] = "01631031000000";
0e006b2c 200 // LHC13g & LHC12x
201 } else if (trainConfig == 32) { //PHOS clusters
3013611f 202 eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002000093270008250400000"; clusterCutArray[0] = "20000041033200000"; mesonCutArray[0] = "01631031000000";
203 eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002000093270008250400000"; clusterCutArray[1] = "20000042033200000"; mesonCutArray[1] = "01631031000000";
204 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002000093270008250400000"; clusterCutArray[2] = "20000043033200000"; mesonCutArray[2] = "01631031000000";
205 eventCutArray[ 3] = "0006211"; photonCutArray[ 3] = "002000093270008250400000"; clusterCutArray[3] = "20000041033200000"; mesonCutArray[3] = "01631031000000";
206 eventCutArray[ 4] = "0006211"; photonCutArray[ 4] = "002000093270008250400000"; clusterCutArray[4] = "20000042033200000"; mesonCutArray[4] = "01631031000000";
207 eventCutArray[ 5] = "0006211"; photonCutArray[ 5] = "002000093270008250400000"; clusterCutArray[5] = "20000043033200000"; mesonCutArray[5] = "01631031000000";
8bdca7f1 208 } else {
209 Error(Form("GammaConvCalo_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration");
210 return;
211 }
212
344100c4 213 TList *EventCutList = new TList();
8bdca7f1 214 TList *ConvCutList = new TList();
135c1186 215 TList *ClusterCutList = new TList();
8bdca7f1 216 TList *MesonCutList = new TList();
217
ed8bc1ca 218// TList *HeaderList = new TList();
219// if (doWeightingPart==1) {
220// TObjString *Header1 = new TObjString("pi0_1");
221// HeaderList->Add(Header1);
222// }
223// if (doWeightingPart==2){
224// TObjString *Header3 = new TObjString("eta_2");
225// HeaderList->Add(Header3);
226// }
227// if (doWeightingPart==3) {
228// TObjString *Header1 = new TObjString("pi0_1");
229// HeaderList->Add(Header1);
230// TObjString *Header3 = new TObjString("eta_2");
231// HeaderList->Add(Header3);
232// }
8bdca7f1 233
344100c4 234 EventCutList->SetOwner(kTRUE);
235 AliConvEventCuts **analysisEventCuts = new AliConvEventCuts*[numberOfCuts];
8bdca7f1 236 ConvCutList->SetOwner(kTRUE);
344100c4 237 AliConversionPhotonCuts **analysisCuts = new AliConversionPhotonCuts*[numberOfCuts];
8bdca7f1 238 ClusterCutList->SetOwner(kTRUE);
239 AliCaloPhotonCuts **analysisClusterCuts = new AliCaloPhotonCuts*[numberOfCuts];
240 MesonCutList->SetOwner(kTRUE);
241 AliConversionMesonCuts **analysisMesonCuts = new AliConversionMesonCuts*[numberOfCuts];
242
243 for(Int_t i = 0; i<numberOfCuts; i++){
ed8bc1ca 244 analysisEventCuts[i] = new AliConvEventCuts();
344100c4 245 analysisEventCuts[i]->InitializeCutsFromCutString(eventCutArray[i].Data());
246 EventCutList->Add(analysisEventCuts[i]);
247 analysisEventCuts[i]->SetFillCutHistograms("",kFALSE);
ed8bc1ca 248
344100c4 249 analysisCuts[i] = new AliConversionPhotonCuts();
250 analysisCuts[i]->InitializeCutsFromCutString(photonCutArray[i].Data());
ed8bc1ca 251 analysisCuts[i]->SetIsHeavyIon(isHeavyIon);
8bdca7f1 252 ConvCutList->Add(analysisCuts[i]);
253 analysisCuts[i]->SetFillCutHistograms("",kFALSE);
ed8bc1ca 254
8bdca7f1 255 analysisClusterCuts[i] = new AliCaloPhotonCuts();
344100c4 256 analysisClusterCuts[i]->InitializeCutsFromCutString(clusterCutArray[i].Data());
8bdca7f1 257 ClusterCutList->Add(analysisClusterCuts[i]);
4e8dcc76 258 analysisClusterCuts[i]->SetExtendedMatching(enableExtendedMatching);
8bdca7f1 259 analysisClusterCuts[i]->SetFillCutHistograms("");
ed8bc1ca 260
8bdca7f1 261 analysisMesonCuts[i] = new AliConversionMesonCuts();
262 analysisMesonCuts[i]->InitializeCutsFromCutString(mesonCutArray[i].Data());
263 MesonCutList->Add(analysisMesonCuts[i]);
264 analysisMesonCuts[i]->SetFillCutHistograms("");
ed8bc1ca 265// analysisEventCuts[i]->SetAcceptedHeader(HeaderList);
8bdca7f1 266 }
267
344100c4 268 task->SetEventCutList(numberOfCuts,EventCutList);
8bdca7f1 269 task->SetConversionCutList(numberOfCuts,ConvCutList);
270 task->SetCaloCutList(numberOfCuts,ClusterCutList);
271 task->SetMesonCutList(numberOfCuts,MesonCutList);
272 task->SetMoveParticleAccordingToVertex(kTRUE);
273 task->SetDoMesonAnalysis(kTRUE);
274 task->SetDoMesonQA(enableQAMesonTask); //Attention new switch for Pi0 QA
275 task->SetDoPhotonQA(enableQAPhotonTask); //Attention new switch small for Photon QA
fd94f234 276 task->SetDoClusterQA(1); //Attention new switch small for Cluster QA
ed8bc1ca 277
8bdca7f1 278 //connect containers
279 AliAnalysisDataContainer *coutput =
280 mgr->CreateContainer(Form("GammaConvCalo_%i",trainConfig), TList::Class(),
281 AliAnalysisManager::kOutputContainer,Form("GammaConvCalo_%i.root",trainConfig));
282
283 mgr->AddTask(task);
284 mgr->ConnectInput(task,0,cinput);
285 mgr->ConnectOutput(task,1,coutput);
286
287 return;
288
289}