]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/macros/runFlowAnalysis.C
updates for running LYZ in both sum and product mode
[u/mrichter/AliRoot.git] / PWG2 / FLOW / macros / runFlowAnalysis.C
CommitLineData
334e3256 1#include "TStopwatch.h"
2#include "TObjArray"
3#include "Riostream.h"
26c4cbb9 4#include "TFile.h"
334e3256 5
03a02aca 6//--------------------------------------------------------------------------------------
7// RUN SETTINGS
334e3256 8//flow analysis method can be: (set to kTRUE or kFALSE)
c741f5d0 9Bool_t SP = kTRUE;
10Bool_t LYZ1SUM = kFALSE;
11Bool_t LYZ1PROD = kFALSE;
12Bool_t LYZ2SUM = kFALSE;
13Bool_t LYZ2PROD = kFALSE;
14Bool_t LYZEP = kTRUE;
15Bool_t GFC = kTRUE;
16Bool_t QC = kTRUE;
17Bool_t FQD = kTRUE;
18Bool_t MCEP = kTRUE; //does not work yet 24/12/08
03a02aca 19//--------------------------------------------------------------------------------------
334e3256 20
20e52807 21// Weights
22// Use weights for Q vector
23Bool_t usePhiWeights = kFALSE; //Phi (correction for non-uniform azimuthal acceptance)
24Bool_t usePtWeights = kFALSE; //v'(pt) (differential flow in pt)
25Bool_t useEtaWeights = kFALSE; //v'(eta) (differential flow in eta)
26
03a02aca 27//--------------------------------------------------------------------------------------
28// CUT SETTINGS
334e3256 29//integrated selection
30Double_t ptMaxInt = 10.;
31Double_t ptMinInt = 0.;
32Double_t etaMaxInt = 1.;
33Double_t etaMinInt = -1.;
34Double_t phiMaxInt = 7.5;
35Double_t phiMinInt = 0.;
36Int_t PIDInt = 211;
37
38//differential selection
39Double_t ptMaxDiff = 10.;
40Double_t ptMinDiff = 0.;
41Double_t etaMaxDiff = 1.;
42Double_t etaMinDiff = -1.;
43Double_t phiMaxDiff = 7.5;
44Double_t phiMinDiff = 0.;
45Int_t PIDDiff = 211;
c741f5d0 46/*
03a02aca 47//--------------------------------------------------------------------------------------
33314629 48// FLOW SETTINGS (R.Rietkerk)
49Int_t nLoops=1; // Number of times to use the same particle (nonflow).
c741f5d0 50Double_t xEllipticFlowValue=0.1;// Add Elliptic Flow. Must be in range [0,1].
51Int_t nMultiplicityOfEvent=500; // Set Average Multiplicity.
33314629 52Double_t xSigmaFlow=0.00; // Add Elliptic Flow. Must be in range [0,1].
c741f5d0 53Int_t nSigmaMult=50; // Set Average Multiplicity.
33314629 54//--------------------------------------------------------------------------------------
c741f5d0 55*/
26c4cbb9 56
fdd8c18f 57enum anaModes {mLocal,mLocalSource,mLocalPAR,};
58//mLocal: Analyze data on your computer using aliroot
59//mLocalPAR: Analyze data on your computer using root + PAR files
60//mLocalSource: Analyze data on your computer using root + source files
61
26c4cbb9 62Int_t offset = 0;
63
c741f5d0 64int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 10, const char*
65 dir="/data/alice1/kolk/KineOnly3/")
66 // dir="/Users/snelling/alice_data/KineOnly3/")
33314629 67 // dir="/Users/snelling/alice_data/stoomboot/5b/")
334e3256 68{
69 TStopwatch timer;
70 timer.Start();
71
c741f5d0 72 if (LYZ1SUM && LYZ2SUM) {cout<<"WARNING: you cannot run LYZ1 and LYZ2 at the same time! LYZ2 needs the output from LYZ1."<<endl; exit(); }
73 if (LYZ1PROD && LYZ2PROD) {cout<<"WARNING: you cannot run LYZ1 and LYZ2 at the same time! LYZ2 needs the output from LYZ1."<<endl; exit(); }
74 if (LYZ2SUM && LYZEP) {cout<<"WARNING: you cannot run LYZ2 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); }
75 if (LYZ1SUM && LYZEP) {cout<<"WARNING: you cannot run LYZ1 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); }
334e3256 76
77
78 cout<<endl;
79 cout<<" ---- BEGIN ANALYSIS ---- "<<endl;
80 cout<<endl;
81
fdd8c18f 82 LoadLibraries(mode);
2a413443 83
33314629 84 TRandom3 random3Temp; //init for manual settings (R.Rietkerk)
85 TTimeStamp dt;
86 Int_t sseed = dt.GetNanoSec()/1000;
87 random3Temp.SetSeed(sseed);
88
fdd8c18f 89 if (mode == mLocal || mode == mLocalPAR) {
90 // AliFlow event in aliroot or with pars
91 AliFlowEventSimpleMaker* fEventMaker = new AliFlowEventSimpleMaker();
92 }
93 else if (mode == mLocalSource) {
94 // flow event in source mode
95 FlowEventSimpleMaker* fEventMaker = new FlowEventSimpleMaker();
96 }
97 else{
98 cout << "No supported running mode selected!" << endl;
99 break;
100 }
2a413443 101
2a413443 102
334e3256 103 //------------------------------------------------------------------------
e085f1a9 104 //cuts:
334e3256 105 AliFlowTrackSimpleCuts* cutsInt = new AliFlowTrackSimpleCuts();
106 cutsInt->SetPtMax(ptMaxInt);
107 cutsInt->SetPtMin(ptMinInt);
108 cutsInt->SetEtaMax(etaMaxInt);
109 cutsInt->SetEtaMin(etaMinInt);
110 cutsInt->SetPhiMax(phiMaxInt);
111 cutsInt->SetPhiMin(phiMinInt);
112 cutsInt->SetPID(PIDInt);
113
114 AliFlowTrackSimpleCuts* cutsDiff = new AliFlowTrackSimpleCuts();
115 cutsDiff->SetPtMax(ptMaxDiff);
116 cutsDiff->SetPtMin(ptMinDiff);
117 cutsDiff->SetEtaMax(etaMaxDiff);
118 cutsDiff->SetEtaMin(etaMinDiff);
119 cutsDiff->SetPhiMax(phiMaxDiff);
120 cutsDiff->SetPhiMin(phiMinDiff);
121 cutsDiff->SetPID(PIDDiff);
122
03a02aca 123 //if the weights are used:
124 TFile *fileWithWeights = NULL;
125 TList *listWithWeights = NULL;
334e3256 126
14db9c04 127 if(usePhiWeights||usePtWeights||useEtaWeights) {
128 fileWithWeights = TFile::Open("weights.root","READ");
129 if(fileWithWeights) {
130 listWithWeights = (TList*)fileWithWeights->Get("weights");
131 }
132 else
133 {cout << " WARNING: the file <weights.root> with weights from the previous run was not found."<<endl;
134 break;
135 }
e085f1a9 136 }
137
138 //flow methods:
c741f5d0 139 AliFlowAnalysisWithQCumulants *qc = NULL;
140 AliFlowAnalysisWithCumulants *gfc = NULL;
141 AliFittingQDistribution *fqd = NULL;
142 AliFlowAnalysisWithLeeYangZeros *lyz1sum = NULL;
143 AliFlowAnalysisWithLeeYangZeros *lyz1prod = NULL;
144 AliFlowAnalysisWithLeeYangZeros *lyz2sum = NULL;
145 AliFlowAnalysisWithLeeYangZeros *lyz2prod = NULL;
146 AliFlowAnalysisWithLYZEventPlane *lyzep = NULL;
147 AliFlowAnalysisWithScalarProduct *sp = NULL;
148 AliFlowAnalysisWithMCEventPlane *mcep = NULL;
deebd72f 149
334e3256 150 //MCEP = monte carlo event plane
deebd72f 151 if (MCEP) {
152 AliFlowAnalysisWithMCEventPlane *mcep = new AliFlowAnalysisWithMCEventPlane();
153 mcep->Init();
154 }
334e3256 155
156 //QC = Q-cumulants
deebd72f 157 if(QC) {
158 AliFlowAnalysisWithQCumulants* qc = new AliFlowAnalysisWithQCumulants();
e085f1a9 159 qc->Init();
03a02aca 160 if(listWithWeights) qc->SetWeightsList(listWithWeights);
161 if(usePhiWeights) qc->SetUsePhiWeights(usePhiWeights);
162 if(usePtWeights) qc->SetUsePtWeights(usePtWeights);
163 if(useEtaWeights) qc->SetUseEtaWeights(useEtaWeights);
deebd72f 164 }
334e3256 165
166 //GFC = Generating Function Cumulants
deebd72f 167 if(GFC) {
168 AliFlowAnalysisWithCumulants* gfc = new AliFlowAnalysisWithCumulants();
e5e75b58 169 gfc->Init();
170 if(listWithWeights) gfc->SetWeightsList(listWithWeights);
171 if(usePhiWeights) gfc->SetUsePhiWeights(usePhiWeights);
172 if(usePtWeights) gfc->SetUsePtWeights(usePtWeights);
173 if(useEtaWeights) gfc->SetUseEtaWeights(useEtaWeights);
deebd72f 174 }
334e3256 175
176 //FQD = Fitting q-distribution
deebd72f 177 if(FQD) {
178 AliFittingQDistribution* fqd = new AliFittingQDistribution();
14db9c04 179 fqd->Init();
180 if(listWithWeights) fqd->SetWeightsList(listWithWeights);
181 if(usePhiWeights) fqd->SetUsePhiWeights(usePhiWeights);
deebd72f 182 }
60ec66fb 183
184 //SP = Scalar Product
185 if(SP) {
186 AliFlowAnalysisWithScalarProduct* sp = new AliFlowAnalysisWithScalarProduct();
187 sp->Init();
188 }
189
334e3256 190 //LYZ1 = Lee-Yang Zeroes first run
c741f5d0 191 if(LYZ1SUM) {
192 AliFlowAnalysisWithLeeYangZeros* lyz1sum = new AliFlowAnalysisWithLeeYangZeros();
193 lyz1sum->SetFirstRun(kTRUE);
194 lyz1sum->SetUseSum(kTRUE);
195 lyz1sum->Init();
196 }
197 if(LYZ1PROD) {
198 AliFlowAnalysisWithLeeYangZeros* lyz1prod = new AliFlowAnalysisWithLeeYangZeros();
199 lyz1prod->SetFirstRun(kTRUE);
200 lyz1prod->SetUseSum(kFALSE);
201 lyz1prod->Init();
deebd72f 202 }
334e3256 203 //LYZ2 = Lee-Yang Zeroes second run
c741f5d0 204 if(LYZ2SUM) {
205 AliFlowAnalysisWithLeeYangZeros* lyz2sum = new AliFlowAnalysisWithLeeYangZeros();
deebd72f 206 // read the input file from the first run
c741f5d0 207 TString inputFileNameLYZ2SUM = "outputLYZ1SUManalysis.root" ;
208 TFile* inputFileLYZ2SUM = new TFile(inputFileNameLYZ2SUM.Data(),"READ");
209 if(!inputFileLYZ2SUM || inputFileLYZ2SUM->IsZombie()) {
210 cerr << " ERROR: NO First Run SUM file... " << endl ;
ce78b98c 211 break;
deebd72f 212 }
213 else {
c741f5d0 214 TList* inputListLYZ2SUM = (TList*)inputFileLYZ2SUM->Get("cobjLYZ1SUM");
215 if (!inputListLYZ2SUM) {cout<<"SUM Input list is NULL pointer!"<<endl; break;}
deebd72f 216 else {
c741f5d0 217 cout<<"LYZ2SUM input file/list read..."<<endl;
218 lyz2sum->SetFirstRunList(inputListLYZ2SUM);
219 lyz2sum->SetFirstRun(kFALSE);
220 lyz2sum->SetUseSum(kTRUE);
221 lyz2sum->Init();
222 }
223 }
224 }
225 if(LYZ2PROD) {
226 AliFlowAnalysisWithLeeYangZeros* lyz2prod = new AliFlowAnalysisWithLeeYangZeros();
227 // read the input file from the first run
228 TString inputFileNameLYZ2PROD = "outputLYZ1PRODanalysis.root" ;
229 TFile* inputFileLYZ2PROD = new TFile(inputFileNameLYZ2PROD.Data(),"READ");
230 if(!inputFileLYZ2PROD || inputFileLYZ2PROD->IsZombie()) {
231 cerr << " ERROR: NO First Run PROD file... " << endl ;
232 break;
233 }
234 else {
235 TList* inputListLYZ2PROD = (TList*)inputFileLYZ2PROD->Get("cobjLYZ1PROD");
236 if (!inputListLYZ2PROD) {cout<<"PROD Input list is NULL pointer!"<<endl; break;}
237 else {
238 cout<<"LYZ2PROD input file/list read..."<<endl;
239 lyz2prod->SetFirstRunList(inputListLYZ2PROD);
240 lyz2prod->SetFirstRun(kFALSE);
241 lyz2prod->SetUseSum(kTRUE);
242 lyz2prod->Init();
334e3256 243 }
244 }
deebd72f 245 }
334e3256 246 //LYZEP = Lee-Yang Zeroes event plane
deebd72f 247 if(LYZEP) {
248 AliFlowLYZEventPlane* ep = new AliFlowLYZEventPlane() ;
249 AliFlowAnalysisWithLYZEventPlane* lyzep = new AliFlowAnalysisWithLYZEventPlane();
250 // read the input file from the second lyz run
c741f5d0 251 TString inputFileNameLYZEP = "outputLYZ2SUManalysis.root" ;
deebd72f 252 TFile* inputFileLYZEP = new TFile(inputFileNameLYZEP.Data(),"READ");
253 if(!inputFileLYZEP || inputFileLYZEP->IsZombie()) {
ce78b98c 254 cerr << " ERROR: NO Second Run file... " << endl ;
255 break;
256 }
deebd72f 257 else {
c741f5d0 258 TList* inputListLYZEP = (TList*)inputFileLYZEP->Get("cobjLYZ2SUM");
ace38bad 259 if (!inputListLYZEP) {cout<<"Input list is NULL pointer!"<<endl; break;}
deebd72f 260 else {
261 cout<<"LYZEP input file/list read..."<<endl;
262 ep ->SetSecondRunList(inputListLYZEP);
263 lyzep->SetSecondRunList(inputListLYZEP);
264 ep ->Init();
265 lyzep->Init();
334e3256 266 }
267 }
deebd72f 268 }
334e3256 269 //------------------------------------------------------------------------
270
26c4cbb9 271
b25cc698 272 //standard code to read files in directory
334e3256 273 Int_t fCount = 0;
274 TString execDir(gSystem->pwd());
275 TString targetDir(dir);
276 TSystemDirectory* baseDir = new TSystemDirectory(".", dir);
277 TList* dirList = baseDir->GetListOfFiles();
278 if (!dirList) {
279 cout << endl << "No input files in: " << targetDir.Data() << endl;
280 break;
281 }
282 Int_t nDirs = dirList->GetEntries();
283 cout<<endl;
284 cout<<"Int_t nDirs = "<<nDirs<<endl;
285 gSystem->cd(execDir);
286
287 for(Int_t iDir=0;iDir<nDirs;++iDir)
288 {
289 TSystemFile* presentDir = (TSystemFile*)dirList->At(iDir);
290 if(!presentDir || !presentDir->IsDirectory() ||
291 strcmp(presentDir->GetName(), ".") == 0 ||
292 strcmp(presentDir->GetName(), "..") == 0)
293 {
294 cout << endl;
295 cout << "Directory (" << iDir << "): " << presentDir->GetName() <<
296 " - Skipping ... " << endl;
297 continue ;
298 }
299
300 if(offset > 0) { --offset ; continue ; }
301 if((aRuns > 0) && (fCount >= aRuns)) { break ; }
302
303 TString presentDirName(dir); // aDataDir
304 presentDirName += presentDir->GetName();
305 presentDirName += "/";
306 //cerr<<" presentDirName = "<<presentDirName<<endl;
307
308 TString fileName = presentDirName;
309 fileName += "galice.root";
310 Long_t *id, *size, *flags, *modtime;
311 if(gSystem->GetPathInfo(fileName.Data(),id,size,flags,modtime))
312 {
313 cout << " File : " << fileName << " does NOT exist ! - Skipping ... "
314 << endl;
315 continue;
316 }
deebd72f 317 // cout << endl ; cout << "Directory (" << iDir << "): " << presentDirName << " ... " << endl;
334e3256 318
319 //loop (simulations in the present dir)
320 TSystemDirectory* evtsDir = new TSystemDirectory(".",
321 presentDirName.Data());
322 TList* fileList = evtsDir->GetListOfFiles();
323 Int_t nFiles = fileList->GetEntries();
deebd72f 324 //cout<<" Int_t nFiles = "<<nFiles<<endl;
334e3256 325 gSystem->cd(execDir);
326 for(Int_t iFiles=0; iFiles<nFiles; ++iFiles)
327 {
328 TSystemFile* presentFile = (TSystemFile*) fileList->At(iFiles);
329 TString presentFileName(presentDirName);
330 presentFileName += presentFile->GetName();
331
332 if(!(presentFileName.Contains("Kinematics") &&
333 presentFileName.Contains("root"))) { continue ; }
334
deebd72f 335 //cout << " found: " << presentFileName.Data() << endl;
334e3256 336
337 TFile* kineFile = new TFile(presentFileName.Data(), "READ");
338 // kineFile->ls();
339 Int_t nEvts = kineFile->GetNkeys() ;
deebd72f 340 //cout << " . found: " << nEvts << " KineTree(s) in " << presentFileName.Data() << endl;
334e3256 341 TList* kineEventsList = (TList*)kineFile->GetListOfKeys();
342 TTree* kTree;
343 TIter next(kineEventsList);
344 TKey* key;
33314629 345
346 Double_t xRPAngle;
334e3256 347 //loop over the events
348 while( key=(TKey *)next() )
349 {
350 TDirectory* tDir = (TDirectory*)key->ReadObj();
351 if(!tDir) break;
352
353 TString evtDir(tDir->GetName());
deebd72f 354 //cout << " . . found: " << tDir->GetName() << endl;
334e3256 355
356 kTree = (TTree *)tDir->Get("TreeK");
357 if(!kTree) break;
358
359 Int_t nPart = kTree->GetEntries();
deebd72f 360 //cout << " . . . kTree " << fCount << " has " << nPart << " particles " << endl;
334e3256 361
362 //-----------------------------------------------------------
26c4cbb9 363 //fill and save the flow event
33314629 364
c741f5d0 365 /*
33314629 366 Int_t nNewMultOfEvent = random3Temp.Gaus(nMultiplicityOfEvent,nSigmaMult);
367 cout << "new multiplicity: " << nNewMultOfEvent << endl;
368 Double_t xNewFlowValue = random3Temp.Gaus(xEllipticFlowValue,xSigmaFlow);
369 cout << "new flow value: " << xNewFlowValue << endl;
370 fEventMaker->SetNoOfLoops(nLoops);
371 fEventMaker->SetEllipticFlowValue(xNewFlowValue);
372 fEventMaker->SetMultiplicityOfEvent(nNewMultOfEvent);
373 xRPAngle=TMath::TwoPi()*random3Temp.Rndm();
374 fEventMaker->SetMCReactionPlaneAngle(xRPAngle);
c741f5d0 375 */
33314629 376
26c4cbb9 377 AliFlowEventSimple *fEvent = fEventMaker->FillTracks(kTree, cutsInt, cutsDiff);
378
b25cc698 379 // do flow analysis for various methods
c741f5d0 380 if(MCEP) mcep->Make(fEvent);
381 if(QC) qc->Make(fEvent);
382 if(GFC) gfc->Make(fEvent);
383 if(FQD) fqd->Make(fEvent);
384 if(LYZ1SUM) lyz1sum->Make(fEvent);
385 if(LYZ1PROD)lyz1prod->Make(fEvent);
386 if(LYZ2SUM) lyz2sum->Make(fEvent);
387 if(LYZ2PROD)lyz2prod->Make(fEvent);
388 if(LYZEP) lyzep->Make(fEvent,ep);
389 if(SP) sp->Make(fEvent);
334e3256 390 //-----------------------------------------------------------
334e3256 391 fCount++;
951817d5 392 //cout << "# " << fCount << " events processed" << endl;
334e3256 393 delete kTree;
394 delete fEvent;
395 }
396 delete kineFile ;
397 }
398 delete evtsDir ;
399 }
400
401 //--------------------------------------------------------------
402 //calculating and storing the final results of flow analysis
c741f5d0 403 if(MCEP) {mcep->Finish(); mcep->WriteHistograms("outputMCEPanalysis.root");}
404 if(SP) {sp->Finish(); sp->WriteHistograms("outputSPanalysis.root");}
405 if(QC) {qc->Finish(); qc->WriteHistograms("outputQCanalysis.root");}
406 if(GFC) {gfc->Finish(); gfc->WriteHistograms("outputGFCanalysis.root");}
407 if(FQD) {fqd->Finish(); fqd->WriteHistograms("outputFQDanalysis.root");}
408 if(LYZ1SUM) {lyz1sum->Finish(); lyz1sum->WriteHistograms("outputLYZ1SUManalysis.root");}
409 if(LYZ1PROD){lyz1prod->Finish();lyz1prod->WriteHistograms("outputLYZ1PRODanalysis.root");}
410 if(LYZ2SUM) {lyz2sum->Finish(); lyz2sum->WriteHistograms("outputLYZ2SUManalysis.root");}
411 if(LYZ2PROD){lyz2prod->Finish();lyz2prod->WriteHistograms("outputLYZ2PRODanalysis.root");}
412 if(LYZEP) {lyzep->Finish(); lyzep->WriteHistograms("outputLYZEPanalysis.root");}
ace38bad 413
334e3256 414 //--------------------------------------------------------------
415
416 cout << endl;
ace38bad 417 cout << " Fini ... " << endl;
334e3256 418 cout << endl;
419
420 timer.Stop();
421 cout << endl;
422 timer.Print();
423}
21e694dd 424
425void SetupPar(char* pararchivename)
426{
427 //Load par files, create analysis libraries
428 //For testing, if par file already decompressed and modified
429 //classes then do not decompress.
430
431 TString cdir(Form("%s", gSystem->WorkingDirectory() )) ;
432 TString parpar(Form("%s.par", pararchivename)) ;
433 if ( gSystem->AccessPathName(parpar.Data()) ) {
434 gSystem->ChangeDirectory(gSystem->Getenv("ALICE_ROOT")) ;
435 TString processline(Form(".! make %s", parpar.Data())) ;
436 gROOT->ProcessLine(processline.Data()) ;
437 gSystem->ChangeDirectory(cdir) ;
438 processline = Form(".! mv /tmp/%s .", parpar.Data()) ;
439 gROOT->ProcessLine(processline.Data()) ;
440 }
441 if ( gSystem->AccessPathName(pararchivename) ) {
442 TString processline = Form(".! tar xvzf %s",parpar.Data()) ;
443 gROOT->ProcessLine(processline.Data());
444 }
445
446 TString ocwd = gSystem->WorkingDirectory();
447 gSystem->ChangeDirectory(pararchivename);
448
449 // check for BUILD.sh and execute
450 if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
451 printf("*******************************\n");
452 printf("*** Building PAR archive ***\n");
453 cout<<pararchivename<<endl;
454 printf("*******************************\n");
455
456 if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
457 Error("runProcess","Cannot Build the PAR Archive! - Abort!");
458 return -1;
459 }
460 }
461 // check for SETUP.C and execute
462 if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
463 printf("*******************************\n");
464 printf("*** Setup PAR archive ***\n");
465 cout<<pararchivename<<endl;
466 printf("*******************************\n");
467 gROOT->Macro("PROOF-INF/SETUP.C");
468 }
469
470 gSystem->ChangeDirectory(ocwd.Data());
471 printf("Current dir: %s\n", ocwd.Data());
472}
473
fdd8c18f 474void LoadLibraries(const anaModes mode) {
475
476 //--------------------------------------
477 // Load the needed libraries most of them already loaded by aliroot
478 //--------------------------------------
479 gSystem->Load("libTree.so");
480 gSystem->Load("libGeom.so");
481 gSystem->Load("libVMC.so");
482 gSystem->Load("libXMLIO.so");
483 gSystem->Load("libPhysics.so");
484
485 //----------------------------------------------------------
486 // >>>>>>>>>>> Local mode <<<<<<<<<<<<<<
487 //----------------------------------------------------------
488 if (mode==mLocal) {
489 //--------------------------------------------------------
490 // If you want to use already compiled libraries
491 // in the aliroot distribution
492 //--------------------------------------------------------
493 gSystem->Load("libSTEERBase");
494 gSystem->Load("libESD");
495 gSystem->Load("libAOD");
496 gSystem->Load("libANALYSIS");
497 gSystem->Load("libANALYSISalice");
498 gSystem->Load("libCORRFW.so");
499 cerr<<"libCORRFW.so loaded..."<<endl;
500 gSystem->Load("libPWG2flowCommon.so");
501 cerr<<"libPWG2flowCommon.so loaded..."<<endl;
502 gSystem->Load("libPWG2flowTasks.so");
503 cerr<<"libPWG2flowTasks.so loaded..."<<endl;
504 }
505
506 else if (mode == mLocalPAR) {
507 //--------------------------------------------------------
508 //If you want to use root and par files from aliroot
509 //--------------------------------------------------------
510 //If you want to use root and par files from aliroot
511 //--------------------------------------------------------
512 SetupPar("STEERBase");
513 SetupPar("ESD");
514 SetupPar("AOD");
515 SetupPar("ANALYSIS");
516 SetupPar("ANALYSISalice");
517 SetupPar("PWG2AOD");
518 SetupPar("CORRFW");
519 SetupPar("PWG2flowCommon");
520 cerr<<"PWG2flowCommon.par loaded..."<<endl;
521 SetupPar("PWG2flowTasks");
522 cerr<<"PWG2flowTasks.par loaded..."<<endl;
523 }
524
525 //---------------------------------------------------------
526 // <<<<<<<<<< Source mode >>>>>>>>>>>>
527 //---------------------------------------------------------
528 else if (mode==mLocalSource) {
529
530 // In root inline compile
531
532
533 // Constants
534 gROOT->LoadMacro("AliFlowCommon/AliFlowCommonConstants.cxx+");
535 gROOT->LoadMacro("AliFlowCommon/AliFlowLYZConstants.cxx+");
536 gROOT->LoadMacro("AliFlowCommon/AliFlowCumuConstants.cxx+");
537
538 // Flow event
539 gROOT->LoadMacro("AliFlowCommon/AliFlowVector.cxx+");
540 gROOT->LoadMacro("AliFlowCommon/AliFlowTrackSimple.cxx+");
541 gROOT->LoadMacro("AliFlowCommon/AliFlowEventSimple.cxx+");
542
543 // Cuts
544 gROOT->LoadMacro("AliFlowCommon/AliFlowTrackSimpleCuts.cxx+");
545
546 // Output histosgrams
547 gROOT->LoadMacro("AliFlowCommon/AliFlowCommonHist.cxx+");
548 gROOT->LoadMacro("AliFlowCommon/AliFlowCommonHistResults.cxx+");
549 gROOT->LoadMacro("AliFlowCommon/AliFlowLYZHist1.cxx+");
550 gROOT->LoadMacro("AliFlowCommon/AliFlowLYZHist2.cxx+");
551
552 // Functions needed for various methods
553 gROOT->LoadMacro("AliFlowCommon/AliCumulantsFunctions.cxx+");
fdd8c18f 554 gROOT->LoadMacro("AliFlowCommon/AliFittingFunctionsForQDistribution.cxx+");
555 gROOT->LoadMacro("AliFlowCommon/AliFlowLYZEventPlane.cxx+");
556
557 // Flow Analysis code for various methods
558 gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx+");
559 gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithScalarProduct.cxx+");
560 gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx+");
561 gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithLeeYangZeros.cxx+");
562 gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithCumulants.cxx+");
563 gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithQCumulants.cxx+");
564 gROOT->LoadMacro("AliFlowCommon/AliFittingQDistribution.cxx+");
565
566 // Class to fill the FlowEvent without aliroot dependence
567 // can be found in the directory FlowEventMakers
568 gROOT->LoadMacro("FlowEventMakers/FlowEventSimpleMaker.cxx+");
569
570 cout << "finished loading macros!" << endl;
571
572 }
573
574}
575
576