9 void pi0nsweeper(
int nEve = 10,
10 char *file =
"/star/data04/sim/MuDst/minbias_pp200_pythia6.203_2003_hadronicon_trsic/rcf1200_2576_2000evts.MuDst.root",
13 char *dbFlavor =
"NONE",
14 char *outfile =
"pi0ns.hist.root",
15 float scaleFactor = 0.8
19 std::cout <<
"Running EEMC Tower Only pi0 Finder" << std::endl;
20 std::cout <<
"Processing: " << nEve <<
" events" << std::endl;
21 std::cout <<
"Input file: " << file << std::endl;
22 std::cout <<
"DB Flavor: " << dbFlavor << std::endl;
23 std::cout <<
"Output file: " << outfile << std::endl;
24 std::cout <<
"scaleFactor: " << scaleFactor << std::endl;
25 std::cout << std::flush;
34 TH1F *nclust =
new TH1F(
"nclust",
"Number of clusters",10,0,10);
41 std::cout <<
"Instantiating muDstMk: " << file << std::endl;
51 if ( dbFlavor !=
"NONE" &&
52 dbFlavor !=
"none" ) {
58 dbMk -> setTimeStampDay(20030516);
64 StMuEETowerClusterMaker
65 *muEEClusterMaker =
new StMuEETowerClusterMaker(
"muEEClusterMaker",
"MuDst");
69 muEEClusterMaker -> setSeedThreshold(0.6);
70 muEEClusterMaker -> setScaleFactor(scaleFactor);
86 StMuEETowerPi0nMaker *muPi0nMaker =
87 new StMuEETowerPi0nMaker(
"muPi0nMaker",
"MuDst",
"muEEClusterMaker");
96 eemcDb -> setSectors(5,8);
98 eemcDb -> setPreferedFlavor( dbFlavor,
"eemcPMTcal" );
106 if(eventCounter>=nEve)
break;
109 std::cout <<
"Processing event number " << eventCounter << std::endl;
110 stat = chain->
Make();
113 nclust -> Fill( muEEClusterMaker -> getNClusters() );
118 if ( muEEClusterMaker -> getNClusters() > 1 ) {
119 muEEClusterMaker -> Print();
120 muPi0nMaker -> Print();
128 if ( stat != 0 ) std::cout <<
"Loop terminated w/ stat = " << stat << std::endl;
130 TFile f( outfile,
"RECREATE" );
135 muPi0nMaker -> GetHistList() -> FindObject(
"mEventStats") ->
Write();
136 muPi0nMaker -> GetHistList() -> FindObject(
"mMass_real_int") ->
Write();
137 muPi0nMaker -> GetHistList() -> FindObject(
"mMass_mixed_int") ->
Write();
138 muPi0nMaker -> GetHistList() -> FindObject(
"mEnergy_real_int") ->
Write();
139 muPi0nMaker -> GetHistList() -> FindObject(
"mEnergy_mixed_int") ->
Write();
140 muPi0nMaker -> GetHistList() -> FindObject(
"mZ_real_int") ->
Write();
141 muPi0nMaker -> GetHistList() -> FindObject(
"mZ_mixed_int") ->
Write();
152 std::cout <<
"Loading libraries" << std::endl;
154 if (gClassTable->GetID(
"TTable") < 0)
155 gSystem->Load(
"libStar");
156 gSystem->Load(
"St_base");
157 gSystem->Load(
"StChain");
158 gSystem->Load(
"St_Tables");
159 gSystem->Load(
"StMagF");
160 gSystem->Load(
"StUtilities");
161 gSystem->Load(
"StTreeMaker");
162 gSystem->Load(
"StIOMaker");
163 gSystem->Load(
"StarClassLibrary");
164 gSystem->Load(
"StTpcDb");
165 gSystem->Load(
"StDbUtilities");
166 gSystem->Load(
"StEvent");
167 gSystem->Load(
"StEventUtilities");
168 gSystem->Load(
"StMcEvent");
169 gSystem->Load(
"StMcEventMaker");
170 gSystem->Load(
"StAssociationMaker");
171 gSystem->Load(
"StMcAnalysisMaker");
172 gSystem->Load(
"StStrangeMuDstMaker");
173 gSystem->Load(
"StDbLib");
174 gSystem->Load(
"StDbBroker");
175 gSystem->Load(
"St_db_Maker");
176 gSystem->Load(
"libgeometry_Tables");
177 gSystem->Load(
"StDaqLib");
178 gSystem->Load(
"StEmcUtil");
179 gSystem->Load(
"StEmcADCtoEMaker");
180 gSystem->Load(
"StPreEclMaker");
181 gSystem->Load(
"StEpcMaker");
183 assert(gSystem->Load(
"StMuDSTMaker")==0);
184 assert(gSystem->Load(
"StEEmcUtil")==0);
185 assert(gSystem->Load(
"StEEmcPoolmuDst")==0 );
186 assert(gSystem->Load(
"StEEmcPoolTowerOnly")==0 );
virtual void Clear(Option_t *option="")
User defined functions.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
virtual void ls(Option_t *option="") const