]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/macros/runProofFlow.C
Macro to calculate tracking performance for cosmic runs (Marian)
[u/mrichter/AliRoot.git] / PWG2 / FLOW / macros / runProofFlow.C
CommitLineData
a2f7afe7 1/////////////////////////////////////////////////////////////////////////////////
2//
3// HOW TO USE THIS MACRO:
4//
5// With this macro several flow analysis can be run.
6// SP = Scalar Product (for PbPb or pp)
7// LYZ1 = Lee Yang Zeroes first run (for PbPb)
8// LYZ2 = Lee Yang Zeroes second run (for PbPb)
9// LYZEP = Lee Yang Zeroes Event Plane (for PbPb)
dc691b2f 10// CUM = Cumulants (for PbPb or pp)
a2f7afe7 11// MCEP = Flow calculated from the real MC event plane (for PbPb only)
12//
13// The LYZ analysis should be done in the following order;
14// LYZ1 -> LYZ2 -> LYZEP,
15// because LYZ2 depends on the outputfile of LYZ1 and LYZEP on the outputfile
16// of LYZ2.
17//
18// The MCEP method is a reference method.
19// It can only be run when MC information (kinematics.root & galice.root file)
20// is available in which the reaction plane is stored.
21//
22// One can run on ESD, AOD or MC.
23// Additional options are ESDMC0, ESDMC1. In these options the ESD and MC
24// information is combined. Tracks are selected in the ESD, the PID information
25// is taken from the MC (perfect PID). For ESDMC0 the track kinematics is taken
26// from the ESD and for ESDMC1 it is taken from the MC information.
27//
28///////////////////////////////////////////////////////////////////////////////////
29
30
9d062fe3 31//RUN SETTINGS
32
33//Flow analysis method can be:
34// SP = Scalar Product
35// LYZ1 = Lee Yang Zeroes first run
36// LYZ2 = Lee Yang Zeroes second run
37// LYZEP = Lee Yang Zeroes Event Plane
38// CUM = Cumulants
39// MCEP = Flow calculated from the real MC event plane (only for simulated data)
dc691b2f 40const TString method = "CUM";
9d062fe3 41
42
43//analysis type can be ESD, AOD, MC, ESDMC0, ESDMC1
44const TString type = "ESD";
45
46//Bolean to fill/not fill the QA histograms
47Bool_t QA = kFALSE;
48
49//SETTING THE CUTS
50
51//for integrated flow
52const Double_t ptmin1 = 0.0;
53const Double_t ptmax1 = 1000.0;
54const Double_t ymin1 = -2.;
55const Double_t ymax1 = 2.;
56const Int_t mintrackrefsTPC1 = 2;
57const Int_t mintrackrefsITS1 = 3;
58const Int_t charge1 = 1;
59const Int_t PDG1 = 211;
60const Int_t minclustersTPC1 = 50;
61const Int_t maxnsigmatovertex1 = 3;
62
63//for differential flow
64const Double_t ptmin2 = 0.0;
65const Double_t ptmax2 = 1000.0;
66const Double_t ymin2 = -2.;
67const Double_t ymax2 = 2.;
68const Int_t mintrackrefsTPC2 = 2;
69const Int_t mintrackrefsITS2 = 3;
70const Int_t charge2 = 1;
71const Int_t PDG2 = 211;
72const Int_t minclustersTPC2 = 50;
73const Int_t maxnsigmatovertex2 = 3;
74
75//ESD (pp)
76//void runProofFlow(const Char_t* data="/COMMON/COMMON/LHC08c11_10TeV_0.5T", Int_t nRuns=-1, Int_t offset=0) {
a2f7afe7 77//ESD (therminator)
dc691b2f 78void runProofFlow(const Char_t* data="/PWG2/akisiel/Therminator_midcentral_ESD", Int_t nRuns=-1, Int_t offset=0) {
a2f7afe7 79//AOD
9d062fe3 80// void runProofFlow(const Char_t* data="/PWG2/nkolk/myDataSet", Int_t nRuns=-1, Int_t offset=0) {
81
82
83 TStopwatch timer;
84 timer.Start();
85
86 printf("*** Connect to PROOF ***\n");
87 // TProof::Open("snelling@alicecaf.cern.ch");
88 TProof::Open("snelling@localhost");
89
90
dc691b2f 91 //gProof->UploadPackage("AF-v4-15");
92 //gProof->EnablePackage("AF-v4-15");
93 gProof->UploadPackage("STEERBase.par");
94 gProof->EnablePackage("STEERBase");
95 gProof->UploadPackage("ESD.par");
96 gProof->EnablePackage("ESD");
97 gProof->UploadPackage("AOD.par");
98 gProof->EnablePackage("AOD");
99 gProof->UploadPackage("ANALYSIS.par");
100 gProof->EnablePackage("ANALYSIS");
101 gProof->UploadPackage("ANALYSISalice.par");
102 gProof->EnablePackage("ANALYSISalice");
103 gProof->UploadPackage("PWG2AOD.par");
104 gProof->EnablePackage("PWG2AOD");
105 gProof->UploadPackage("CORRFW.par");
106 gProof->EnablePackage("CORRFW");
785483a1 107 // gProof->ClearPackage("PWG2flow");
dc691b2f 108 gProof->UploadPackage("PWG2flow.par");
109 gProof->EnablePackage("PWG2flow");
9d062fe3 110
111
112//____________________________________________//
113 //Create cuts using correction framework
114
115 //Set TList for the QA histograms
116 if (QA) {
117 TList* qaInt = new TList();
118 TList* qaDiff = new TList();
119 }
120
121 //############# cuts on MC
122 AliCFTrackKineCuts* mcKineCuts1 = new AliCFTrackKineCuts("mcKineCuts1","MC-level kinematic cuts");
123 mcKineCuts1->SetPtRange(ptmin1,ptmax1);
124 mcKineCuts1->SetRapidityRange(ymin1,ymax1);
125 mcKineCuts1->SetChargeMC(charge1);
126 if (QA) { mcKineCuts1->SetQAOn(qaInt); }
127
128 AliCFTrackKineCuts* mcKineCuts2 = new AliCFTrackKineCuts("mcKineCuts2","MC-level kinematic cuts");
129 mcKineCuts2->SetPtRange(ptmin2,ptmax2);
130 mcKineCuts2->SetRapidityRange(ymin2,ymax2);
131 mcKineCuts2->SetChargeMC(charge2);
132 if (QA) { mcKineCuts2->SetQAOn(qaDiff); }
133
134 AliCFParticleGenCuts* mcGenCuts1 = new AliCFParticleGenCuts("mcGenCuts1","MC particle generation cuts");
135 mcGenCuts1->SetRequireIsPrimary();
136 mcGenCuts1->SetRequirePdgCode(PDG1);
137 if (QA) { mcGenCuts1->SetQAOn(qaInt); }
138
139 AliCFParticleGenCuts* mcGenCuts2 = new AliCFParticleGenCuts("mcGenCuts2","MC particle generation cuts");
140 mcGenCuts2->SetRequireIsPrimary();
141 mcGenCuts2->SetRequirePdgCode(PDG2);
142 if (QA) { mcGenCuts2->SetQAOn(qaDiff); }
143
144 //############# Acceptance Cuts
145 AliCFAcceptanceCuts *mcAccCuts1 = new AliCFAcceptanceCuts("mcAccCuts1","MC acceptance cuts");
146 mcAccCuts1->SetMinNHitITS(mintrackrefsITS1);
147 mcAccCuts1->SetMinNHitTPC(mintrackrefsTPC1);
148 if (QA) { mcAccCuts1->SetQAOn(qaInt); }
149
150 AliCFAcceptanceCuts *mcAccCuts2 = new AliCFAcceptanceCuts("mcAccCuts2","MC acceptance cuts");
151 mcAccCuts2->SetMinNHitITS(mintrackrefsITS2);
152 mcAccCuts2->SetMinNHitTPC(mintrackrefsTPC2);
153 if (QA) { mcAccCuts2->SetQAOn(qaDiff); }
154
155 //############# Rec-Level kinematic cuts
156 AliCFTrackKineCuts *recKineCuts1 = new AliCFTrackKineCuts("recKineCuts1","rec-level kine cuts");
157 recKineCuts1->SetPtRange(ptmin1,ptmax1);
158 recKineCuts1->SetRapidityRange(ymin1,ymax1);
159 recKineCuts1->SetChargeRec(charge1);
160 if (QA) { recKineCuts1->SetQAOn(qaInt); }
161
162 AliCFTrackKineCuts *recKineCuts2 = new AliCFTrackKineCuts("recKineCuts2","rec-level kine cuts");
163 recKineCuts2->SetPtRange(ptmin2,ptmax2);
164 recKineCuts2->SetRapidityRange(ymin2,ymax2);
165 recKineCuts2->SetChargeRec(charge2);
166 if (QA) { recKineCuts2->SetQAOn(qaDiff); }
167
168 AliCFTrackQualityCuts *recQualityCuts1 = new AliCFTrackQualityCuts("recQualityCuts1","rec-level quality cuts");
169 recQualityCuts1->SetMinNClusterTPC(minclustersTPC1);
1eda9b5e 170 recQualityCuts1->SetStatus(AliESDtrack::kITSrefit);
171 // recQualityCuts1->SetRequireITSRefit(kTRUE); //old
9d062fe3 172 if (QA) { recQualityCuts1->SetQAOn(qaInt); }
173
174 AliCFTrackQualityCuts *recQualityCuts2 = new AliCFTrackQualityCuts("recQualityCuts2","rec-level quality cuts");
175 recQualityCuts2->SetMinNClusterTPC(minclustersTPC2);
1eda9b5e 176 recQualityCuts2->SetStatus(AliESDtrack::kITSrefit);
177 // recQualityCuts2->SetRequireITSRefit(kTRUE); //old
9d062fe3 178 if (QA) { recQualityCuts2->SetQAOn(qaDiff); }
179
180 AliCFTrackIsPrimaryCuts *recIsPrimaryCuts1 = new AliCFTrackIsPrimaryCuts("recIsPrimaryCuts1","rec-level isPrimary cuts");
181 recIsPrimaryCuts1->SetMaxNSigmaToVertex(maxnsigmatovertex1);
182 if (QA) { recIsPrimaryCuts1->SetQAOn(qaInt); }
183
184 AliCFTrackIsPrimaryCuts *recIsPrimaryCuts2 = new AliCFTrackIsPrimaryCuts("recIsPrimaryCuts2","rec-level isPrimary cuts");
185 recIsPrimaryCuts2->SetMaxNSigmaToVertex(maxnsigmatovertex2);
186 if (QA) { recIsPrimaryCuts2->SetQAOn(qaDiff); }
187
188 AliCFTrackCutPid* cutPID1 = new AliCFTrackCutPid("cutPID1","ESD_PID") ;
189 AliCFTrackCutPid* cutPID2 = new AliCFTrackCutPid("cutPID2","ESD_PID") ;
190 int n_species = AliPID::kSPECIES ;
191 Double_t* prior = new Double_t[n_species];
192
193 prior[0] = 0.0244519 ;
194 prior[1] = 0.0143988 ;
195 prior[2] = 0.805747 ;
196 prior[3] = 0.0928785 ;
197 prior[4] = 0.0625243 ;
198
199 cutPID1->SetPriors(prior);
200 cutPID1->SetProbabilityCut(0.0);
201 cutPID1->SetDetectors("TPC TOF");
202 switch(TMath::Abs(PDG1)) {
203 case 11 : cutPID1->SetParticleType(AliPID::kElectron, kTRUE); break;
204 case 13 : cutPID1->SetParticleType(AliPID::kMuon , kTRUE); break;
205 case 211 : cutPID1->SetParticleType(AliPID::kPion , kTRUE); break;
206 case 321 : cutPID1->SetParticleType(AliPID::kKaon , kTRUE); break;
207 case 2212 : cutPID1->SetParticleType(AliPID::kProton , kTRUE); break;
208 default : printf("UNDEFINED PID\n"); break;
209 }
210
211 cutPID2->SetPriors(prior);
212 cutPID2->SetProbabilityCut(0.0);
213 cutPID2->SetDetectors("TPC TOF");
214 switch(TMath::Abs(PDG2)) {
215 case 11 : cutPID2->SetParticleType(AliPID::kElectron, kTRUE); break;
216 case 13 : cutPID2->SetParticleType(AliPID::kMuon , kTRUE); break;
217 case 211 : cutPID2->SetParticleType(AliPID::kPion , kTRUE); break;
218 case 321 : cutPID2->SetParticleType(AliPID::kKaon , kTRUE); break;
219 case 2212 : cutPID2->SetParticleType(AliPID::kProton , kTRUE); break;
220 default : printf("UNDEFINED PID\n"); break;
221 }
222 if (QA) { cutPID1->SetQAOn(qaInt);
223 cutPID2->SetQAOn(qaDiff); }
224
225 printf("CREATE MC KINE CUTS\n");
226 TObjArray* mcList1 = new TObjArray(0);
227 mcList1->AddLast(mcKineCuts1);
228 mcList1->AddLast(mcGenCuts1);
229
230 TObjArray* mcList2 = new TObjArray(0);
231 mcList2->AddLast(mcKineCuts2);
232 mcList2->AddLast(mcGenCuts2);
233
234 printf("CREATE ACCEPTANCE CUTS\n");
235 TObjArray* accList1 = new TObjArray(0) ;
236 accList1->AddLast(mcAccCuts1);
237
238 TObjArray* accList2 = new TObjArray(0) ;
239 accList2->AddLast(mcAccCuts2);
240
241 printf("CREATE RECONSTRUCTION CUTS\n");
242 TObjArray* recList1 = new TObjArray(0) ;
243 recList1->AddLast(recKineCuts1);
244 recList1->AddLast(recQualityCuts1);
245 recList1->AddLast(recIsPrimaryCuts1);
246
247 TObjArray* recList2 = new TObjArray(0) ;
248 recList2->AddLast(recKineCuts2);
249 recList2->AddLast(recQualityCuts2);
250 recList2->AddLast(recIsPrimaryCuts2);
251
252 printf("CREATE PID CUTS\n");
253 TObjArray* fPIDCutList1 = new TObjArray(0) ;
254 fPIDCutList1->AddLast(cutPID1);
255
256 TObjArray* fPIDCutList2 = new TObjArray(0) ;
257 fPIDCutList2->AddLast(cutPID2);
258
259 printf("CREATE INTERFACE AND CUTS\n");
260 AliCFManager* cfmgr1 = new AliCFManager();
785483a1 261 cfmgr1->SetNStepParticle(4); //05nov08
9d062fe3 262 cfmgr1->SetParticleCutsList(AliCFManager::kPartGenCuts,mcList1);
263 cfmgr1->SetParticleCutsList(AliCFManager::kPartAccCuts,accList1);
264 cfmgr1->SetParticleCutsList(AliCFManager::kPartRecCuts,recList1);
265 cfmgr1->SetParticleCutsList(AliCFManager::kPartSelCuts,fPIDCutList1);
266
267 AliCFManager* cfmgr2 = new AliCFManager();
785483a1 268 cfmgr2->SetNStepParticle(4); //05nov08
9d062fe3 269 cfmgr2->SetParticleCutsList(AliCFManager::kPartGenCuts,mcList2);
270 cfmgr2->SetParticleCutsList(AliCFManager::kPartAccCuts,accList2);
271 cfmgr2->SetParticleCutsList(AliCFManager::kPartRecCuts,recList2);
272 cfmgr2->SetParticleCutsList(AliCFManager::kPartSelCuts,fPIDCutList2);
273
274 if (method == "LYZ2"){
275 // read the input file from the first run
276 TString inputFileName = "outputLYZ1analysis" ;
277 inputFileName += type;
278 inputFileName += "_firstrun.root";
279 cout<<"The input file is "<<inputFileName.Data()<<endl;
280 TFile* fInputFile = new TFile(inputFileName.Data(),"READ");
281 if(!fInputFile || fInputFile->IsZombie()) {
282 cerr << " ERROR: NO First Run file... " << endl ; }
283 else {
284 TList* fInputList = (TList*)fInputFile->Get("cobj1");
285 if (!fInputList) {cout<<"list is NULL pointer!"<<endl;}
286 }
287 cout<<"input file/list read..."<<endl;
288 }
289
290 if (method == "LYZEP") {
291 // read the input file from the second LYZ run
292 TString inputFileName = "outputLYZ2analysis" ;
293 inputFileName += type;
294 inputFileName += "_secondrun.root";
295 cout<<"The input file is "<<inputFileName.Data()<<endl;
296 TFile* fInputFile = new TFile(inputFileName.Data(),"READ");
297 if(!fInputFile || fInputFile->IsZombie()) {
298 cerr << " ERROR: NO First Run file... " << endl ; }
299 else {
300 TList* fInputList = (TList*)fInputFile->Get("cobj1");
301 if (!fInputList) {cout<<"list is NULL pointer!"<<endl;}
302 }
303 cout<<"input file/list read..."<<endl;
304 }
305
306 //____________________________________________//
307 // Make the analysis manager
308 AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
309
310 if (type == "ESD"){
311 AliVEventHandler* esdH = new AliESDInputHandler;
312 mgr->SetInputEventHandler(esdH);
313 if (method == "MCEP") {
314 AliMCEventHandler *mc = new AliMCEventHandler();
315 mgr->SetMCtruthEventHandler(mc);} }
316
317 if (type == "AOD"){
318 AliVEventHandler* aodH = new AliAODInputHandler;
319 mgr->SetInputEventHandler(aodH);
320 if (method == "MCEP") {
321 AliMCEventHandler *mc = new AliMCEventHandler();
322 mgr->SetMCtruthEventHandler(mc);} }
323
324 if (type == "MC" || type == "ESDMC0" || type == "ESDMC1"){
325 AliVEventHandler* esdH = new AliESDInputHandler;
326 mgr->SetInputEventHandler(esdH);
327
328 AliMCEventHandler *mc = new AliMCEventHandler();
329 mgr->SetMCtruthEventHandler(mc); }
330
331 //____________________________________________//
332 // tasks
333 if (method == "SP"){
334 if (QA) { AliAnalysisTaskScalarProduct *taskSP = new AliAnalysisTaskScalarProduct("TaskScalarProduct",kTRUE); }
335 else { AliAnalysisTaskScalarProduct *taskSP = new AliAnalysisTaskScalarProduct("TaskScalarProduct",kFALSE); }
336 taskSP->SetAnalysisType(type);
337 taskSP->SetCFManager1(cfmgr1);
338 taskSP->SetCFManager2(cfmgr2);
339 if (QA) {
340 taskSP->SetQAList1(qaInt);
341 taskSP->SetQAList2(qaDiff); }
342 mgr->AddTask(taskSP);
343 }
344 else if (method == "LYZ1"){
345 if (QA) { AliAnalysisTaskLeeYangZeros *taskLYZ1 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kTRUE,kTRUE);}
346 else { AliAnalysisTaskLeeYangZeros *taskLYZ1 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kTRUE,kFALSE);}
347 taskLYZ1->SetAnalysisType(type);
348 taskLYZ1->SetFirstRunLYZ(kTRUE);
349 taskLYZ1->SetUseSumLYZ(kTRUE);
350 taskLYZ1->SetCFManager1(cfmgr1);
351 taskLYZ1->SetCFManager2(cfmgr2);
352 if (QA) {
353 taskLYZ1->SetQAList1(qaInt);
354 taskLYZ1->SetQAList2(qaDiff);}
355 mgr->AddTask(taskLYZ1);
356 }
357 else if (method == "LYZ2"){
358 if (QA) { AliAnalysisTaskLeeYangZeros *taskLYZ2 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kFALSE,kTRUE);}
359 else { AliAnalysisTaskLeeYangZeros *taskLYZ2 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kFALSE,kFALSE); }
360 taskLYZ2->SetAnalysisType(type);
361 taskLYZ2->SetFirstRunLYZ(kFALSE);
362 taskLYZ2->SetUseSumLYZ(kTRUE);
363 taskLYZ2->SetCFManager1(cfmgr1);
364 taskLYZ2->SetCFManager2(cfmgr2);
365 if (QA) {
366 taskLYZ2->SetQAList1(qaInt);
367 taskLYZ2->SetQAList2(qaDiff); }
368 mgr->AddTask(taskLYZ2);
369 }
370 else if (method == "LYZEP"){
371 if (QA) { AliAnalysisTaskLYZEventPlane *taskLYZEP = new AliAnalysisTaskLYZEventPlane("TaskLYZEventPlane",kTRUE); }
372 else { AliAnalysisTaskLYZEventPlane *taskLYZEP = new AliAnalysisTaskLYZEventPlane("TaskLYZEventPlane",kFALSE); }
373 taskLYZEP->SetAnalysisType(type);
374 taskLYZEP->SetCFManager1(cfmgr1);
375 taskLYZEP->SetCFManager2(cfmgr2);
376 if (QA) {
377 taskLYZEP->SetQAList1(qaInt);
378 taskLYZEP->SetQAList2(qaDiff); }
379 mgr->AddTask(taskLYZEP);
380 }
381 else if (method == "CUM"){
382 if (QA) { AliAnalysisTaskCumulants *taskCUM = new AliAnalysisTaskCumulants("TaskCumulants",kTRUE);}
383 else { AliAnalysisTaskCumulants *taskCUM = new AliAnalysisTaskCumulants("TaskCumulants",kFALSE);}
384 taskCUM->SetAnalysisType(type);
385 taskCUM->SetCFManager1(cfmgr1);
386 taskCUM->SetCFManager2(cfmgr2);
387 if (QA) {
388 taskCUM->SetQAList1(qaInt);
389 taskCUM->SetQAList2(qaDiff); }
390 mgr->AddTask(taskCUM);
391 }
392 else if (method == "MCEP"){
393 if (QA) { AliAnalysisTaskMCEventPlane *taskMCEP = new AliAnalysisTaskMCEventPlane("TaskMCEventPlane",kTRUE);}
394 else { AliAnalysisTaskMCEventPlane *taskMCEP = new AliAnalysisTaskMCEventPlane("TaskMCEventPlane",kFALSE);}
395 taskMCEP->SetAnalysisType(type);
396 taskMCEP->SetCFManager1(cfmgr1);
397 taskMCEP->SetCFManager2(cfmgr2);
398 if (QA) {
399 taskMCEP->SetQAList1(qaInt);
400 taskMCEP->SetQAList2(qaDiff); }
401 mgr->AddTask(taskMCEP);
402 }
403
404
405 // Create containers for input/output
406 AliAnalysisDataContainer *cinput1 =
407 mgr->CreateContainer("cchain1",TChain::Class(),AliAnalysisManager::kInputContainer);
408
409 if (method == "LYZ2" || method == "LYZEP"){
410 AliAnalysisDataContainer *cinput2 =
411 mgr->CreateContainer("cobj2",TList::Class(),AliAnalysisManager::kInputContainer); }
412
413
414 TString outputName = "output";
415 outputName+= method;
416 outputName+= "analysis";
417 outputName+= type;
418 if (method == "LYZ1") outputName+= "_firstrun";
419 if (method == "LYZ2") outputName+= "_secondrun";
420 outputName+= ".root";
421 AliAnalysisDataContainer *coutput1 =
422 mgr->CreateContainer("cobj1", TList::Class(),AliAnalysisManager::kOutputContainer,outputName);
423
424 if (QA) {
425 TString qaNameInt = "QAforInt_";
426 qaNameInt += method;
427 qaNameInt += "_";
428 qaNameInt += type;
429 qaNameInt += ".root";
430 AliAnalysisDataContainer *coutput2 =
431 mgr->CreateContainer("QAint", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameInt);
432
433 TString qaNameDiff = "QAforDiff_";
434 qaNameDiff += method;
435 qaNameDiff += "_";
436 qaNameDiff += type;
437 qaNameDiff += ".root";
438 AliAnalysisDataContainer *coutput3 =
439 mgr->CreateContainer("QAdiff", TList::Class(),AliAnalysisManager::kOutputContainer,qaNameDiff);
440 }
441
442 //____________________________________________//
443
444 if (method == "SP") {
445 mgr->ConnectInput(taskSP,0,cinput1);
446 mgr->ConnectOutput(taskSP,0,coutput1);
447 if (QA) { mgr->ConnectOutput(taskSP,1,coutput2);
448 mgr->ConnectOutput(taskSP,2,coutput3); }
449 }
450 else if (method == "LYZ1") {
451 mgr->ConnectInput(taskLYZ1,0,cinput1);
452 mgr->ConnectOutput(taskLYZ1,0,coutput1);
453 if (QA) { mgr->ConnectOutput(taskLYZ1,1,coutput2);
454 mgr->ConnectOutput(taskLYZ1,2,coutput3); }
455 }
456 else if (method == "LYZ2") {
457 mgr->ConnectInput(taskLYZ2,0,cinput1);
458 mgr->ConnectInput(taskLYZ2,1,cinput2);
459 mgr->ConnectOutput(taskLYZ2,0,coutput1);
460 if (QA) { mgr->ConnectOutput(taskLYZ2,1,coutput2);
461 mgr->ConnectOutput(taskLYZ2,2,coutput3); }
462 cinput2->SetData(fInputList);
463 }
464 else if (method == "LYZEP") {
465 mgr->ConnectInput(taskLYZEP,0,cinput1);
466 mgr->ConnectInput(taskLYZEP,1,cinput2);
467 mgr->ConnectOutput(taskLYZEP,0,coutput1);
468 if (QA) { mgr->ConnectOutput(taskLYZEP,1,coutput2);
469 mgr->ConnectOutput(taskLYZEP,2,coutput3); }
470 cinput2->SetData(fInputList);
471 }
472 else if (method == "CUM") {
473 mgr->ConnectInput(taskCUM,0,cinput1);
474 mgr->ConnectOutput(taskCUM,0,coutput1);
475 if (QA) { mgr->ConnectOutput(taskCUM,1,coutput2);
476 mgr->ConnectOutput(taskCUM,2,coutput3); }
477 }
478 else if (method == "MCEP") {
479 mgr->ConnectInput(taskMCEP,0,cinput1);
480 mgr->ConnectOutput(taskMCEP,0,coutput1);
481 if (QA) { mgr->ConnectOutput(taskMCEP,1,coutput2);
482 mgr->ConnectOutput(taskMCEP,2,coutput3); }
483 }
484
485 if (!mgr->InitAnalysis()) return;
486 mgr->PrintStatus();
487 // old way with a chain
488 // mgr->StartAnalysis("proof",chain);
489 mgr->StartAnalysis("proof",data,nRuns,offset);
490
491 timer.Stop();
492 timer.Print();
493}