2 void doEStructRead(
const char* inputfile,
5 int maxNumEvents = 1000 ) {
8 sprintf(cutFile,
"%s/CutsFile.txt",scriptDir);
9 const char* jobName =
"ReadEStruct";
11 gROOT->LoadMacro(
"load2ptLibs.C");
13 gROOT->LoadMacro(
"getOutFileName.C");
14 gROOT->LoadMacro(
"support.C");
17 const double mbBins[] = {2, 15, 35, 68, 117, 187, 281, 401, 551, 739, 852, 1002};
19 cent->setCentralities(mbBins,mbNBins);
22 const int mkeepZBuffBins[] = {0};
25 int analysisMode = 0x60;
28 int numberOfAnalyses = mbNBins-1;
30 cb->setMode(cutBinMode);
36 char *analysisType =
"StEStructCorrelation";
42 estructMaker->SetEventReader(reader);
46 estructMaker->SetQAHists(qaHists);
50 for(
int i=0;i<numberOfAnalyses;i++) {
54 analysis[i]->setAnalysisIndex(i);
55 analysis[i]->setOutputFileName(getOutFileName(outputDir,jobName,
"data",i));
56 analysis[i]->setQAHists(qaHists);
57 if ((mNZBufs == numberOfAnalyses) && (0 != mkeepZBuffBins[i])) {
58 analysis[i]->setZBufferBinning(1);
63 estructMaker->SetAnalyses(analysis,numberOfAnalyses);
66 ecuts->setDoFillHists(
true);
67 tcuts->setDoFillHists(
true);
73 int startTime = TS.GetSec();
75 istat = estructMaker->
Make();
79 cout <<
"Analysed " << iev <<
" events in " << TS.GetSec()-startTime <<
" seconds." << endl;
81 if ((maxNumEvents> 0) && (iev >= maxNumEvents)) {
86 cout <<
"Seconds for entire event loop = " << TS.GetSec()-startTime << endl;
94 ofstream ofs(getOutFileName(outputDir,jobName,
"stats"));
95 estructMaker->logAllStats(ofs);
96 ecuts->printCuts(ofs);
97 ecuts->printCutStats(ofs);
98 tcuts->printCuts(ofs);
99 tcuts->printCutStats(ofs);
100 pcuts->printCuts(ofs);
105 char *cutsFile = getOutFileName(outputDir,jobName,
"cuts");
106 cout <<
"getOutFileName(outputDir,jobName,\"cuts\") = " << cutsFile << endl;
107 TFile *tfc =
new TFile(cutsFile,
"RECREATE");
108 ecuts->writeCutHists(tfc);
109 tcuts->writeCutHists(tfc);
113 char *qaFile = getOutFileName(outputDir,jobName,
"QA");
114 cout <<
"getOutFileName(outputDir,jobName,\"QA\") = " << qaFile << endl;
115 estructMaker->writeQAHists(qaFile);