48 void runEEmcMcPi0( Int_t nevents = 1000,
49 Char_t *name =
"dipi0_10000evts.MuDst.root",
51 Char_t *ofile=
"test.root",
52 Char_t *path =
"/star/u/hew/pi0finder/ezGames/backyard/multiphoton/",
58 TString pathname = path;
61 fileG.ReplaceAll(
"MuDst",
"geant");
69 gSystem->Load(
"StMcEvent");
70 gSystem->Load(
"StMcEventMaker");
77 mChain =
new StChain(
"eemcAnalysisChain");
81 printf(
"%s\n",fileG.Data());
82 ioMaker->SetFile(fileG);
85 ioMaker->SetBranch(
"*",0,
"1");
86 ioMaker->SetBranch(
"geantBranch",0,
"r");
87 ioMaker->SetBranch(
"minimcBranch",0,
"r");
93 mMuDstMaker =
new StMuDstMaker(0,0,path,name,
"MuDst",nfiles);
99 mcEventMaker->doPrintEventInfo =
false;
105 mStarDatabase =
new St_db_Maker(
"StarDb",
"MySQL:StarDb");
113 mStarDatabase->SetFlavor(
"sim",
"eemcPMTcal");
114 mStarDatabase->SetFlavor(
"sim",
"eemcPIXcal");
115 mStarDatabase->SetFlavor(
"sim",
"eemcPMTped");
116 mStarDatabase->SetFlavor(
"sim",
"eemcPMTstat");
117 mStarDatabase->SetFlavor(
"sim",
"eemcPMTname");
118 mStarDatabase->SetFlavor(
"sim",
"eemcADCconf");
119 mStarDatabase->SetDateTime(20050101,0);
127 gMessMgr -> SwitchOff(
"D");
128 gMessMgr -> SwitchOn(
"I");
151 mEEanalysis->
source(
"MuDst",1);
158 mEEanalysis->
scale(1.3);
166 eemcQA->
mudst(
"MuDst");
208 mEEmixer -> mudst(
"MuDst");
209 mEEmixer -> analysis(
"AandE");
210 mEEmixer -> points(
"mEEpoints");
211 for ( Int_t i=0;i<12;i++ )
222 mEEpi0analysis->mudst(
"MuDst");
223 mEEpi0analysis->points(
"mEEpoints");
224 mEEpi0analysis->mixer(
"mEEmixer");
225 mEEpi0analysis->analysis(
"AandE");
226 mEEpi0analysis->spin(
"mSpinDb");
250 int TTnumsmdu=0,TTnumsmdv=0,Tnumsmdu=0,Tnumsmdv=0,Tnumpoints=0,Tnumpairs=0,Tnumfp=0,n2clusteru=0,n2clusterv=0,n2point=0,j=0;
252 while ( stat == 0 ) {
258 if ( count++ >= nevents && nevents>0 )
break;
269 stat = mChain ->
Make();
274 if ( (count%prescale)==0 )
276 std::cout <<
"------------------------------------------------";
277 std::cout <<
"event=" << count << std::endl;
282 Int_t nhits[]={0,0,0,0,0,0};
283 float umeandiff=0,vmeandiff;
284 for (
int i = 0; i < 4; i++ ) {
294 for ( Int_t sec=0;sec<12;sec++ )
306 Int_t ncl[8]={0,0,0,0,0,0,0,0};
307 for ( Int_t i=0;i<12;i++ )
315 ncl[6]+=mEEclusters->TnumberOfSmdClusters(i,0);
316 ncl[7]+=mEEclusters->TnumberOfSmdClusters(i,1);
323 if(ncl[4]==2) n2clusteru+=1;
324 if(ncl[5]==2) n2clusterv+=1;
333 Tnumpairs+=mEEmixer -> numberOfCandidates();
336 std::cout <<
"total number of cluster in smdu=" << Tnumsmdu << std::endl;
337 std::cout <<
"total number of cluster in smdv=" << Tnumsmdv << std::endl;
338 std::cout <<
"temp total number of cluster in smdu=" << TTnumsmdu << std::endl;
339 std::cout <<
"temp total number of cluster in smdv=" << TTnumsmdv << std::endl;
340 std::cout <<
"total number of points =" << Tnumpoints << std::endl;
341 std::cout <<
"number of 2cluster/event in Vplane" << n2clusterv << std::endl;
342 std::cout <<
"total number of pairs =" << Tnumpairs << std::endl;
343 std::cout <<
"number of 2cluster/event in Uplane" << n2clusteru << std::endl;
344 std::cout <<
"number of 2point /event " << n2point << std::endl;
353 mEEmcDatabase = (
StEEmcDb*)mChain->GetDataSet(
"StEEmcDb");
354 if (mEEmcDatabase) mEEmcDatabase->exportAscii(
"dbdump.dat");
365 TFile *file=
new TFile(ofile,
"RECREATE");
367 mEEclusters -> GetHistList() ->
Write();
368 mEEpoints -> GetHistList() ->
Write();
369 mEEanalysis->GetHistList()->Write();
370 mEEpi0analysis->GetHistList()->Write();
371 mySputMk->GetHistList()->Write();
372 mEEmixer->GetHistList()->Write();
388 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
389 loadSharedLibraries();
391 gSystem->Load(
"StDbLib");
392 gSystem->Load(
"StDbBroker");
393 gSystem->Load(
"St_db_Maker");
394 gSystem->Load(
"StEEmcUtil");
395 gSystem->Load(
"StEEmcDbMaker");
396 gSystem->Load(
"StEEmcSimulatorMaker");
397 gSystem->Load(
"StEEmcA2EMaker");
399 gSystem->Load(
"StEEmcIUPi0");
401 gSystem->Load(
"StMaxStripPi0");
403 gSystem->Load(
"StSpinDbMaker");
EEmc ADC –> energy maker.
void setMaxExtent(Int_t m)
Maximum distance around seed strip to cluster smd strips.
A class for mixing pi0 candidates.
void mudst(const Char_t *name)
sets pointer to the muDst maker
void fixedVertex(Float_t x, Float_t y, Float_t z)
Fix vertex for simple MC.
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
void source(const Char_t *, Int_t=0)
void setAddPed(Bool_t a=true)
Add pedestal offsets from DB.
virtual void Clear(Option_t *option="")
User defined functions.
void analysis(const Char_t *name)
sets pointer to adc–>energy maker
A maker for creating pi0 histograms \Weihong He The StEEmcIUPi0Analysis takes as input the list of pi...
Int_t numberOfSmdClusters(Int_t sec, Int_t plane)
Return number of smd clusters for a given sector, plane.
Int_t numberOfHitStrips(Int_t sector, Int_t plane) const
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Class for building points from smd clusters.
Int_t numberOfPoints()
Return number of points.
A cluster maker for the EEMC.
void SetHList(TObjArray *x)
output histo access point
void analysis(const Char_t *name)
Set the name of the ADC–>E maker.
Int_t numberOfHitTowers(Int_t layer) const
void setNpePerMipSmd(Int_t strip, Float_t npe)
void threshold(Float_t cut, Int_t layer)
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
void analysis(const Char_t *name)
Set adc to energy maker.
virtual void ls(Option_t *option="") const
Bool_t doPrintMemoryInfo
lots of screen output
void setOverwrite(Bool_t o=true)
Overwrite the muDst values.
Int_t numberOfClusters(Int_t sec, Int_t layer)
Return number of clusters for a given sector, layer.
void setDropBad(Bool_t d=true)
Drop bad channels marked as "fail" in DB.
StSpinDbMaker(const char *name="SpinDbMaker")
experts only
void setEnergyMode(Int_t mode)
void setSeedFloor(Float_t f=2.0)
void clusters(const Char_t *name)
Set cluster maker.
Example of QA histograming using the StEEmcA2EMaker.
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)
void database(const Char_t *)
Set the name of the EEMC database, init obtains pointer.
void setLimit(Int_t l)
Number of iterations for tower-shape mode.
Int_t nVertexMax
Cuts on primary vertex (see constructor for defaults)