25 void runEEmcPi0Maker( Int_t nevents = 5000,
26 Char_t *name =
"mcpi0_5000_06TC05_10.MuDst.root",
27 Char_t *ofile=
"mcpi0_5000_06TC05_10.pi0tree.root",
28 Char_t *path =
"/star/data04/sim/jwebb/MonteCarlo/single_gamma/",
35 TString pathname = path;
38 gROOT->LoadMacro(
"StRoot/StEEmcPool/StMaxStripPi0/macros/loadlibs.C");
46 mChain =
new StChain(
"eemcAnalysisChain");
49 mMuDstMaker =
new StMuDstMaker(0,0,path,name,
"MuDst",nfiles);
55 mStarDatabase =
new St_db_Maker(
"StarDb",
"MySQL:StarDb");
58 #ifdef MONTE_CARLO // flags for M-C events
59 TDatime *time =
new TDatime();
60 mStarDatabase -> SetDateTime( time -> GetDate(), time -> GetTime() );
61 mStarDatabase->SetDateTime(20031120,0);
62 mStarDatabase->SetFlavor(
"sim",
"eemcPMTcal");
63 mStarDatabase->SetFlavor(
"sim",
"eemcPIXcal");
64 mStarDatabase->SetFlavor(
"sim",
"eemcPMTped");
65 mStarDatabase->SetFlavor(
"sim",
"eemcPMTstat");
66 mStarDatabase->SetFlavor(
"sim",
"eemcPMTname");
67 mStarDatabase->SetFlavor(
"sim",
"eemcADCconf");
72 gMessMgr -> SwitchOff(
"D");
73 gMessMgr -> SwitchOn(
"I");
90 mEEmcA2E->
source(
"MuDst",1);
114 mEEpoints->analysis(
"AandE");
115 mEEpoints->clusters(
"mEEclusters");
121 mEEmixer->setFilename( ofile );
122 mEEmixer->
mudst(
"MuDst");
124 mEEmixer->
points(
"mEEpoints");
133 mEEmixer2->mudst(
"MuDst");
134 mEEmixer2->analysis(
"AandE");
135 mEEmixer2->points(
"mEEpoints");
136 mEEmixer2->sector(4);
137 mEEmixer2->sector(5);
138 mEEmixer2->sector(6);
139 mEEmixer2->sector(7);
140 mEEmixer2->trigger(45203);
154 while ( stat == 0 ) {
157 if ( count++ >= nevents )
158 if ( nevents > 0 )
break;
165 stat = mChain ->
Make();
167 if ( (count%100) )
continue;
169 std::cout <<
"------------------------------------------------";
170 std::cout <<
"event=" << count << std::endl;
171 for (
int i = 0; i < 4; i++ ) {
172 std::cout <<
" layer=" << i <<
" nhits=" << mEEmcA2E->
numberOfHitTowers(i) << std::endl;
183 oo.ReplaceAll(
"pi0tree",
"pi0hist");
184 TFile *f=
new TFile(oo,
"recreate");
186 mEEmixer2->GetHistList()->Write();
199 gSystem->Load(
"StDbLib");
200 gSystem->Load(
"StDbBroker");
201 gSystem->Load(
"St_db_Maker");
202 gSystem->Load(
"StEEmcUtil");
203 gSystem->Load(
"StEEmcDbMaker");
205 gSystem->Load(
"StEEmcBFC2005");
207 gSystem->Load(
"StEEmcSimulatorMaker");
213 void testNeighborhood()
216 for ( Int_t i = 0; i < 720; i++ ) {
221 std::cout <<
"+ number of neighbors=" << num << std::endl;
223 for ( Int_t j = 0; j < num; j++ ) {
226 Int_t nn =mEEmcA2E->
tower(i).neighborIndex(j);
virtual void Clear(Option_t *opts="")
Clear clusters for next event.
void analysis(const Char_t *name)
Set the name of the ADC–>E maker.
Int_t numberOfNeighbors() const
get the number of neighboring towers
EEmc ADC –> energy maker.
void setSeedFloor(Float_t f=2.0)
StEEmcClusterMaker(const Char_t *name="mEEclusters")
void source(const Char_t *, Int_t=0)
void setAddPed(Bool_t a=true)
Add pedestal offsets from DB.
void setMaxExtent(Int_t m)
Maximum distance around seed strip to cluster smd strips.
Class for building points from smd clusters.
Int_t numberOfHitTowers(Int_t layer) const
void threshold(Float_t cut, Int_t layer)
void print() const
Print a summary of this tower.
virtual void ls(Option_t *option="") const
void trigger(Int_t trigger)
void setOverwrite(Bool_t o=true)
Overwrite the muDst values.
void mudst(const Char_t *name)
sets the name of the muDst maker
void setDropBad(Bool_t d=true)
Drop bad channels marked as "fail" in DB.
void analysis(const Char_t *name)
sets the name of the adc–>energy maker
virtual Int_t Make()
Make clusters for this event.
void points(const Char_t *name)
sets the name of the point maker
void sector(Int_t sector)
void SetStatus(const char *arrType, int status)
void setSmearPed(Bool_t s=true)
Smear the pedestal with sigma from DB.
void seedEnergy(Float_t energy, Int_t layer=0)
StEEmcTower & tower(Int_t index, Int_t layer=0)
void database(const Char_t *)
Set the name of the EEMC database, init obtains pointer.
A cluster maker for the EEMC.