17 void doEStruct2pt(
const char* filelist,
18 const char* outputDir,
19 const char* scriptDir,
20 int maxNumEvents = 0 ) {
23 gROOT->LoadMacro(
"load2ptLibs.C");
27 sprintf(cutFile,
"%s/CutsFile.txt",scriptDir);
29 gROOT->LoadMacro(
"getOutFileName.C");
30 const char* scratchDir =
"PPData_01";
34 const double mbBins[]={2,3,4,6,8,11,14,99};
35 int mbNBins=1+1+1+1+1+1+1+1;
36 cent->setCentralities(mbBins,mbNBins);
37 int numberOfAnalyses=mbNBins-1;
42 cb->setMode(cutBinMode);
43 int mbNCutBins = cb->getNumBins();
60 estructMaker->SetEventReader(reader);
65 qaHists->initHistograms();
66 estructMaker->SetQAHists(qaHists);
73 for(
int i=0;i<numberOfAnalyses;i++){
75 if(numberOfAnalyses==1)ic=-1;
77 analysis[i]->setOutputFileName(getOutFileName(outputDir,scratchDir,
"data",ic));
78 analysis[i]->setQAHists(qaHists);
79 analysis[i]->setZBuffLimits(ecuts);
80 analysis[i]->setAnalysisIndex(i);
82 estructMaker->SetAnalyses(analysis,numberOfAnalyses);
87 estructMaker->startTimer();
89 int counter=0, istat=0, i=0;
93 istat=estructMaker->
Make();
97 cout<<
"doing event ="<<i<<endl;
99 estructMaker->writeDiagnostics(0);
101 if ( maxNumEvents!=0 && i>=maxNumEvents ) {
105 estructMaker->stopTimer();
108 ofstream ofs(getOutFileName(outputDir,scratchDir,
"stats"));
109 estructMaker->logAllStats(ofs);
110 ecuts->printCuts(ofs);
111 tcuts->printCuts(ofs);
112 pcuts->printCuts(ofs);
117 TFile* tf=
new TFile(getOutFileName(outputDir,scratchDir,
"cuts"),
"RECREATE");
118 ecuts->writeCutHists(tf);
119 tcuts->writeCutHists(tf);
123 estructMaker->writeQAHists(getOutFileName(outputDir,scratchDir,
"QA"));