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 =
"PPFluct";
27 const double mbBins[] = {5, 24, 69, 156, 297, 513, 911};
28 int mbNBins = 1+1+1+1+1+1+1;
29 cent->setCentralities(mbBins,mbNBins);
31 const double ptCut[] = {0.15, 0.5, 2.0};
34 const double ptMultCut[] = {0.0, 6.0, 8.6, 10.6, 12.4, 14.0, 20.0};
35 int mbNPtBins = 1+1+1+1+1+1+1;;
36 cent->setPts(ptCut,mbNPts,ptMultCut,mbNPtBins);
38 int numberOfAnalyses=1;
40 char *analysisType =
"StEStructFluctuation";
53 estructMaker->SetEventReader(reader);
59 for(
int i=0;i<numberOfAnalyses;i++){
61 if(numberOfAnalyses==1)ic=-1;
63 analysis[i]->initStructures(tcuts);
64 analysis[i]->setPairCuts(pcuts);
65 analysis[i]->setOutputFileName(getOutFileName(outputDir,scratchDir,
"data",ic));
68 estructMaker->SetAnalyses(analysis,numberOfAnalyses);
73 estructMaker->startTimer();
75 int counter=0, istat=0, i=0;
78 istat=estructMaker->
Make();
82 cout<<
"doing event ="<<i<<endl;
85 if ( maxNumEvents!=0 && i>=maxNumEvents ) {
89 estructMaker->stopTimer();
92 ofstream ofs(getOutFileName(outputDir,scratchDir,
"stats"));
93 estructMaker->logAllStats(ofs);
94 ecuts->printCuts(ofs);
95 tcuts->printCuts(ofs);
101 TFile* tf=
new TFile(getOutFileName(outputDir,scratchDir,
"cuts"),
"RECREATE");
102 ecuts->writeCutHists(tf);
103 tcuts->writeCutHists(tf);
107 estructMaker->writeQAHists(getOutFileName(outputDir,scratchDir,
"QA"));