46 void makeEEmcDisplay( Int_t nevents = -1,
47 Char_t *name=
"mc.list",
48 Char_t *ofile=
"mc.root",
56 TString pathname = path;
59 std::cout <<
"------------ blah ----------------" << std::endl;
69 mChain =
new StChain(
"eemcAnalysisChain");
74 mMuDstMaker =
new StMuDstMaker(0,0,path,name,
"MuDst",nfiles);
82 mStarDatabase =
new St_db_Maker(
"StarDb",
"MySQL:StarDb");
89 mStarDatabase->SetFlavor(
"sim",
"eemcPMTcal");
90 mStarDatabase->SetFlavor(
"sim",
"eemcPIXcal");
91 mStarDatabase->SetFlavor(
"sim",
"eemcPMTped");
92 mStarDatabase->SetFlavor(
"sim",
"eemcPMTstat");
93 mStarDatabase->SetFlavor(
"sim",
"eemcPMTname");
94 mStarDatabase->SetFlavor(
"sim",
"eemcADCconf");
95 mStarDatabase->SetDateTime(20050101,0);
105 gMessMgr -> SwitchOff(
"D");
106 gMessMgr -> SwitchOn(
"I");
135 mEEanalysis->
source(
"MuDst",1);
143 mEEanalysis->
scale(1.2);
171 mEEpoints=
new StMyPointMaker(
"mEEpoints",mEEanalysis,mEEclusters);
185 mEEdisplay->
points(mEEpoints);
191 file=
new TFile(ofile,
"RECREATE");
214 while ( stat == 0 ) {
217 printf(
"event=%d\n",count);
222 if ( count++ >= nevents )
if ( nevents > 0 )
break;
233 stat = mChain ->
Make();
241 std::cout <<
"------------------------------------------------";
242 std::cout <<
"event=" << count << std::endl;
247 Int_t nhits[]={0,0,0,0,0,0};
248 for (
int i = 0; i < 4; i++ ) {
258 for ( Int_t sec=0;sec<12;sec++ )
270 Int_t ncl[6]={0,0,0,0,0,0};
278 const Char_t *lay[]={
"tower:",
"pre1: ",
"pre2: ",
"post: ",
"smdu: ",
"smdv: "};
279 for ( Int_t i=0;i<6;i++ )
281 std::cout << lay[i] <<
" " << nhits[i] <<
" " << ncl[i] << std::endl;
284 std::cout <<
"number of points: " << mEEpoints -> numberOfPoints() << std::endl;
303 mEEmcDatabase = (
StEEmcDb*)mChain->GetDataSet(
"StEEmcDb");
304 if (mEEmcDatabase) mEEmcDatabase->exportAscii(
"dbdump.dat");
318 mEEdisplay->
tree()->Write();
330 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
331 loadSharedLibraries();
333 gSystem->Load(
"StDbLib");
334 gSystem->Load(
"StDbBroker");
335 gSystem->Load(
"St_db_Maker");
336 gSystem->Load(
"StEEmcUtil");
337 gSystem->Load(
"StEEmcDbMaker");
338 gSystem->Load(
"StEEmcSimulatorMaker");
340 gSystem->Load(
"StEEmcA2EMaker");
341 gSystem->Load(
"StEEmcClusterMaker");
342 gSystem->Load(
"StEEmcPointMaker");
343 gSystem->Load(
"StEEmcPi0Mixer");
344 gSystem->Load(
"StEEmcDisplayMaker");
346 gSystem->Load(
"StSpinDbMaker");
TFile * setFile(TFile *file)
EEmc ADC –> energy maker.
void adc2energy(StEEmcA2EMaker *a)
void source(const Char_t *, Int_t=0)
StEEmcGenericPointMaker * mEEpoints
void setAddPed(Bool_t a=true)
Add pedestal offsets from DB.
void Clear(Option_t *opts="")
User defined functions.
A maker for creating pi0 histograms.
Int_t numberOfHitStrips(Int_t sector, Int_t plane) const
Int_t numberOfHitTowers(Int_t layer) const
StEEmcA2EMaker * mEEanalysis
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
StEEmcGenericClusterMaker * mEEclusters
void setOverwrite(Bool_t o=true)
Overwrite the muDst values.
void clusters(StEEmcGenericClusterMaker *c)
void setDropBad(Bool_t d=true)
Drop bad channels marked as "fail" in DB.
void points(StEEmcGenericPointMaker *p)
A class for finding EEMC points.
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.
void setCheckTrigger(Bool_t c=true)