45 void runEEmcMcPi0Mixer( Int_t nevents = 50,
46 Char_t *name =
"mcpi0_5000_06TC05_15.MuDst.root",
47 Char_t *ofile=
"mcpi0_5000_06TC05_15.root",
48 Char_t *path =
"/star/data04/sim/jwebb/MonteCarlo/single_gamma/",
53 TString pathname = path;
65 mChain =
new StChain(
"eemcAnalysisChain");
71 mMuDstMaker =
new StMuDstMaker(0,0,path,name,
"MuDst",nfiles);
80 mStarDatabase =
new St_db_Maker(
"StarDb",
"MySQL:StarDb");
87 mStarDatabase->SetFlavor(
"sim",
"eemcPMTcal");
88 mStarDatabase->SetFlavor(
"sim",
"eemcPIXcal");
89 mStarDatabase->SetFlavor(
"sim",
"eemcPMTped");
90 mStarDatabase->SetFlavor(
"sim",
"eemcPMTstat");
91 mStarDatabase->SetFlavor(
"sim",
"eemcPMTname");
92 mStarDatabase->SetFlavor(
"sim",
"eemcADCconf");
93 mStarDatabase->SetDateTime(20050101,0);
100 gMessMgr -> SwitchOff(
"D");
101 gMessMgr -> SwitchOn(
"I");
122 mEEanalysis->
source(
"MuDst",1);
129 mEEanalysis->
scale(1.2);
137 eemcQA->
mudst(
"MuDst");
175 mEEmixer -> mudst(
"MuDst");
176 mEEmixer -> analysis(
"AandE");
177 mEEmixer ->
points(
"mEEpoints");
178 for ( Int_t i=0;i<12;i++ )
187 mEEmixqa ->
mixer(
"mEEmixer", 0.1, 0.18 );
188 mEEmixqa ->
points(
"mEEpoints" );
205 while ( stat == 0 ) {
211 if ( count++ >= nevents )
if ( nevents > 0 )
break;
222 stat = mChain ->
Make();
227 if ( (count%prescale) )
continue;
229 std::cout <<
"------------------------------------------------";
230 std::cout <<
"event=" << count << std::endl;
235 Int_t nhits[]={0,0,0,0,0,0};
236 for (
int i = 0; i < 4; i++ ) {
246 for ( Int_t sec=0;sec<12;sec++ )
258 Int_t ncl[6]={0,0,0,0,0,0};
259 for ( Int_t i=0;i<12;i++ )
269 const Char_t *lay[]={
"tower:",
"pre1: ",
"pre2: ",
"post: ",
"smdu: ",
"smdv: "};
270 for ( Int_t i=0;i<6;i++ )
272 std::cout << lay[i] <<
" " << nhits[i] <<
" " << ncl[i] << std::endl;
275 std::cout <<
"number of points: " << mEEpoints -> numberOfPoints() << std::endl;
276 std::cout <<
"number of pairs: " << mEEmixer -> numberOfCandidates() << std::endl;
289 mEEmcDatabase = (
StEEmcDb*)mChain->GetDataSet(
"StEEmcDb");
290 if (mEEmcDatabase) mEEmcDatabase->exportAscii(
"dbdump.dat");
301 TFile *file=
new TFile(ofile,
"RECREATE");
304 eemcQA -> GetHistList() ->
Write();
306 file->mkdir(
"pions");
308 mEEmixqa -> GetHistList() ->
Write();
321 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
322 loadSharedLibraries();
324 gSystem->Load(
"StDbLib");
325 gSystem->Load(
"StDbBroker");
326 gSystem->Load(
"St_db_Maker");
327 gSystem->Load(
"StEEmcUtil");
328 gSystem->Load(
"StEEmcDbMaker");
329 gSystem->Load(
"StEEmcSimulatorMaker");
332 gSystem->Load(
"StEEmcA2EMaker");
333 gSystem->Load(
"StEEmcClusterMaker");
334 gSystem->Load(
"StEEmcPointMaker");
335 gSystem->Load(
"StEEmcPi0Mixer");
337 gSystem->Load(
"StMaxStripPi0");
void analysis(const Char_t *name)
Set the name of the ADC–>E maker.
EEmc ADC –> energy maker.
StEEmcMixMaker * mEEmixer
Pointer to the pi0 mixer.
void fixedVertex(Float_t x, Float_t y, Float_t z)
Fix vertex for simple MC.
void setSeedFloor(Float_t f=2.0)
Int_t numberOfClusters(Int_t sec, Int_t layer) const
Return number of clusters for a given sector, layer.
void mudst(const Char_t *name)
sets pointer to the muDst maker
void mixer(const Char_t *name, Float_t min=0., Float_t max=999.)
Int_t numberOfSmdClusters(Int_t sec, Int_t plane) const
Return number of smd clusters for a given sector, plane.
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.
Int_t Make()
processes a single event
void analysis(const Char_t *name)
sets pointer to adc–>energy maker
void analysis(const Char_t *name)
Set adc to energy maker.
A maker for creating pi0 histograms.
StEEmcPointMaker * mEEpoints
pointer to the point maker
Int_t numberOfHitStrips(Int_t sector, Int_t plane) const
void sector(Int_t sector)
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
void Clear(Option_t *opts="")
clears the maker
Class for building points from smd clusters.
Int_t numberOfHitTowers(Int_t layer) const
void threshold(Float_t cut, Int_t layer)
void setEnergyMode(Int_t mode)
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.
void points(const Char_t *name)
specifies the name of the point maker
void clusters(const Char_t *name)
Set cluster maker.
Example of QA histograming using the StEEmcA2EMaker.
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.
StEEmcMixQAMaker(const Char_t *name)
constructor
void seedEnergy(Float_t energy, Int_t layer=0)
A class for mixing pi0 candidates.
void database(const Char_t *)
Set the name of the EEMC database, init obtains pointer.
Int_t nVertexMax
Cuts on primary vertex (see constructor for defaults)
A cluster maker for the EEMC.