10 void doEStruct(
const char* filelist,
11 const char* outputDir,
12 const char* scriptDir,
13 int maxNumEvents = 0 ) {
16 gROOT->LoadMacro(
"load2ptLibs.C");
20 sprintf(cutFile,
"%s/CutsFile.txt",scriptDir);
22 gROOT->LoadMacro(
"getOutFileName.C");
23 const char* scratchDir =
"PPFluctHI";
26 gSystem->Load(
"THijing");
27 sprintf(buffer,
"%s/hijev.inp",scriptDir);
33 cent->setCentTypeImpact();
35 const double mbBins[] = {0.0, 6.0, 8.6, 10.6, 12.4, 14.0, 20.0};
36 int mbNBins = 1+1+1+1+1+1+1;
38 cent->setCentralities(mbBins,mbNBins);
40 const double ptCut[] = {0.15, 0.5, 2.0};
43 const double ptMultCut[] = {0.0, 6.0, 8.6, 10.6, 12.4, 14.0, 20.0};
44 int mbNPtBins = 1+1+1+1+1+1+1;;
46 cent->setPts(ptCut,mbNPts,ptMultCut,mbNPtBins);
48 int numberOfAnalyses = 1;
54 char *analysisType =
"StEStructFluctuation";
61 qaHists->initHistograms();
62 estructMaker->SetQAHists(qaHists);
68 estructMaker->SetEventReader(reader);
74 for(
int i=0;i<numberOfAnalyses;i++){
76 if(numberOfAnalyses==1)ic=-1;
78 analysis[i]->initStructures(tcuts);
79 analysis[i]->setPairCuts(pcuts);
80 analysis[i]->setOutputFileName(getOutFileName(outputDir,scratchDir,
"data",ic));
83 estructMaker->SetAnalyses(analysis,numberOfAnalyses);
86 estructMaker->startTimer();
88 int counter=0, istat=0, i=0;
91 istat=estructMaker->
Make();
95 cout<<
"doing event ="<<i<<endl;
98 if ( maxNumEvents!=0 && i>=maxNumEvents ) {
102 estructMaker->stopTimer();
106 ofstream ofs(getOutFileName(outputDir,scratchDir,
"stats"));
107 estructMaker->logAllStats(ofs);
108 ecuts->printCuts(ofs);
109 tcuts->printCuts(ofs);
115 TFile* tf=
new TFile(getOutFileName(outputDir,scratchDir,
"cuts"),
"RECREATE");
116 ecuts->writeCutHists(tf);
117 tcuts->writeCutHists(tf);
121 estructMaker->writeQAHists(getOutFileName(outputDir,scratchDir,
"QA"));