39 void runEEmcPi0Maker( Int_t nevents = -1,
42 Char_t *name=
"mc.list",
43 Char_t *ofile=
"mc.root",
51 TString pathname = path;
62 mChain =
new StChain(
"eemcAnalysisChain");
67 mMuDstMaker =
new StMuDstMaker(0,0,path,name,
"MuDst",nfiles);
75 mStarDatabase =
new St_db_Maker(
"StarDb",
"MySQL:StarDb");
83 mStarDatabase->SetFlavor(
"sim",
"eemcPMTcal");
84 mStarDatabase->SetFlavor(
"sim",
"eemcPIXcal");
85 mStarDatabase->SetFlavor(
"sim",
"eemcPMTped");
86 mStarDatabase->SetFlavor(
"sim",
"eemcPMTstat");
87 mStarDatabase->SetFlavor(
"sim",
"eemcPMTname");
88 mStarDatabase->SetFlavor(
"sim",
"eemcADCconf");
89 mStarDatabase->SetDateTime(20050101,0);
99 gMessMgr -> SwitchOn(
"D");
100 gMessMgr -> SwitchOn(
"I");
129 mEEanalysis->
source(
"MuDst",1);
137 mEEanalysis->
scale(1.2);
159 mEEpoints=
new StMyPointMaker(
"mEEpoints",mEEanalysis,mEEclusters);
174 std::cout <<
"entering event loop" << std::endl;
175 printf(
"root really sux\n");
181 while ( stat == 0 ) {
184 printf(
"event=%d\n",count);
189 if ( count++ >= nevents )
if ( nevents > 0 )
break;
200 stat = mChain ->
Make();
207 std::cout <<
"------------------------------------------------";
208 std::cout <<
"event=" << count << std::endl;
213 Int_t nhits[]={0,0,0,0,0,0};
214 for (
int i = 0; i < 4; i++ ) {
224 for ( Int_t sec=0;sec<12;sec++ )
236 Int_t ncl[6]={0,0,0,0,0,0};
244 const Char_t *lay[]={
"tower:",
"pre1: ",
"pre2: ",
"post: ",
"smdu: ",
"smdv: "};
245 for ( Int_t i=0;i<6;i++ )
247 std::cout << lay[i] <<
" " << nhits[i] <<
" " << ncl[i] << std::endl;
250 std::cout <<
"number of points: " << mEEpoints -> numberOfPoints() << std::endl;
264 mEEmcDatabase = (
StEEmcDb*)mChain->GetDataSet(
"StEEmcDb");
265 if (mEEmcDatabase) mEEmcDatabase->exportAscii(
"dbdump.dat");
277 TFile *file=
new TFile(ofile,
"RECREATE");
278 mEEpi0s->GetHistList()->Write();
290 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
291 loadSharedLibraries();
293 gSystem->Load(
"StDbLib");
294 gSystem->Load(
"StDbBroker");
295 gSystem->Load(
"St_db_Maker");
296 gSystem->Load(
"StEEmcUtil");
297 gSystem->Load(
"StEEmcDbMaker");
298 gSystem->Load(
"StEEmcSimulatorMaker");
300 gSystem->Load(
"StEEmcA2EMaker");
301 gSystem->Load(
"StEEmcClusterMaker");
302 gSystem->Load(
"StEEmcPointMaker");
303 gSystem->Load(
"StEEmcPi0Mixer");
305 gSystem->Load(
"StSpinDbMaker");
void Clear(Option_t *opts="")
User defined functions.
EEmc ADC –> energy maker.
StEEmcGenericClusterMaker * mEEclusters
void source(const Char_t *, Int_t=0)
void setAddPed(Bool_t a=true)
Add pedestal offsets from DB.
StEEmcA2EMaker * mEEanalysis
A maker for creating pi0 histograms.
Int_t numberOfHitStrips(Int_t sector, Int_t plane) const
Int_t numberOfHitTowers(Int_t layer) const
Int_t numberOfClusters(Int_t sector, Int_t layer) const
void threshold(Float_t cut, Int_t layer)
virtual void ls(Option_t *option="") const
void setOverwrite(Bool_t o=true)
Overwrite the muDst values.
void setDropBad(Bool_t d=true)
Drop bad channels marked as "fail" in DB.
StEEmcGenericPointMaker * mEEpoints
A class for finding EEMC points.
void SetStatus(const char *arrType, int status)
void setSmearPed(Bool_t s=true)
Smear the pedestal with sigma from DB.
A class for mixing pi0 candidates.
void database(const Char_t *)
Set the name of the EEMC database, init obtains pointer.