15 void doEStruct2ptDst(
const char* fileListFile,
const char* outputDir,
const char* cutFile,
const char* jobName=0,
int nset=3,
int maxNumEvents=0){
18 gROOT->LoadMacro(
"load2ptLibs.C");
20 gROOT->LoadMacro(
"getOutFileName.C");
21 gROOT->LoadMacro(
"support.C");
24 char* evtCutFile=cutFile;
25 char* trackCutFile=evtCutFile;
26 char* pairCutFile =evtCutFile;
28 char** datadirs=getDirNames(
"data",nset);
29 char** cutdirs=getDirNames(
"cuts",nset);
34 const double temp[4]={0,4,7,50};
35 cent->setCentralities(temp,4);
39 mk->setInputFileList(fileListFile);
45 char** outputFile =
new char*[nset];
53 bool* skipMake=
new bool[nset];
55 for(
int i=1;i<nset;i++)skipMake[i]=
true;
61 for(
int i=0;i<nset;i++){
63 outputFile[i]=getOutFileName(outputDir,jobName,datadirs[i]);
65 analysis[i]->setCutFile(pairCutFile);
66 analysis[i]->setOutputFileName(outputFile[i]);
70 int min=floor(cent->minCentrality(i));
71 int max=floor(cent->maxCentrality(i));
72 char** tmp=getNumTracksStrings(min,max);
73 ecuts[i]->loadBaseCuts(
"numTracks",tmp,2);
77 estructMaker->SetReaderAnalysisPair(readers[i],analysis[i]);
81 doTheWork(estructMaker,maxNumEvents);
84 char* statsFileName=getOutFileName(outputDir,jobName,
"stats");
85 ofstream ofs(statsFileName);
88 estructMaker->logAnalysisTime(ofs);
89 estructMaker->logInputEvents(ofs);
90 estructMaker->logOutputEvents(ofs);
91 estructMaker->logOutputRate(ofs);
92 estructMaker->logAnalysisStats(ofs);
97 for(
int i=0;i<nset;i++){
98 ofs<<
" *************** ";
99 ofs<<
" Cut Stats for Analysis Number = "<<i;
100 ofs<<
" *************** "<<endl;
101 ecuts[i]->printCuts(ofs);
102 tcuts[i]->printCuts(ofs);
104 pcuts.printCuts(ofs);
109 char* rootCutFile=getOutFileName(outputDir,jobName,cutdirs[i]);
110 TFile* tf=
new TFile(rootCutFile,
"RECREATE");
111 ecuts[i]->writeCutHists(tf);
112 tcuts[i]->writeCutHists(tf);
113 pcuts.writeCutHists(tf);