15 void doEStruct2ptAuAu(
const char* fileListFile,
const char* outputDir,
const char* cutFile,
const char* jobName=0,
int cutBinMode=0,
int maxNumEvents=0){
18 gROOT->LoadMacro(
"load2ptLibs.C");
20 gROOT->LoadMacro(
"getOutFileName.C");
21 gROOT->LoadMacro(
"support.C");
33 const char* evtCutFile=cutFile;
35 const char* trackCutFile=evtCutFile;
36 const char* pairCutFile =evtCutFile;
42 const double temp[6]={4,30,100,200,400,2000};
43 cent->setCentralities(temp,6);
44 int nset=cent->numCentralities()-1;
46 char** datadirs=getDirNames(
"data",nset);
47 char** cutdirs=getDirNames(
"cuts",nset);
51 cb->setMode(cutBinMode);
60 char** outputFile =
new char*[nset];
68 bool* skipMake=
new bool[nset];
70 for(
int i=1;i<nset;i++)skipMake[i]=
true;
75 for(
int i=0;i<nset;i++){
77 outputFile[i]=getOutFileName(outputDir,jobName,datadirs[i]);
79 analysis[i]->setCutFile(pairCutFile);
80 analysis[i]->setOutputFileName(outputFile[i]);
84 int min=floor(cent->minCentrality(i));
85 int max=floor(cent->maxCentrality(i));
86 char** tmp=getNumTracksStrings(min,max);
87 ecuts[i]->loadBaseCuts(
"numTracks",tmp,2);
91 estructMaker->SetReaderAnalysisPair(readers[i],analysis[i]);
96 doTheWork(estructMaker,maxNumEvents);
99 char* statsFileName=getOutFileName(outputDir,jobName,
"stats");
100 ofstream ofs(statsFileName);
103 estructMaker->logAnalysisTime(ofs);
104 estructMaker->logInputEvents(ofs);
105 estructMaker->logOutputEvents(ofs);
106 estructMaker->logOutputRate(ofs);
107 estructMaker->logAnalysisStats(ofs);
109 for(
int i=0;i<nset;i++){
110 ofs<<
" *************** ";
111 ofs<<
" Cut Stats for Analysis Number = "<<i;
112 ofs<<
" *************** "<<endl;
113 ecuts[i]->printCuts(ofs);
114 tcuts[i]->printCuts(ofs);
118 pcuts=&analysis[i]->getPairCuts();
119 pcuts->printCuts(ofs);
123 char* rootCutFile=getOutFileName(outputDir,jobName,cutdirs[i]);
124 TFile* tf=
new TFile(rootCutFile,
"RECREATE");
125 ecuts[i]->writeCutHists(tf);
126 tcuts[i]->writeCutHists(tf);
127 if(pcuts)pcuts->writeCutHists(tf);