46 void runEEmcPi0( Int_t nevents =-1,
47 Char_t *name =
"st_physics_adc_7136033_raw_1060001.MuDst.root",
48 Char_t *ofile=
"test.root ",
49 Char_t *path =
"/star/institutions/iucf/hew/2006ppLongRuns/7136033/",
55 TString pathname = path;
67 mChain =
new StChain(
"eemcAnalysisChain");
73 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);
102 gMessMgr -> SwitchOff(
"D");
103 gMessMgr -> SwitchOn(
"I");
124 mEEanalysis->
source(
"MuDst",1);
168 mEEmixer -> mudst(
"MuDst");
169 mEEmixer -> analysis(
"AandE");
170 mEEmixer -> points(
"mEEpoints");
171 for ( Int_t i=0;i<12;i++ )
178 mEEpi0analysis->trigger(trigID);
179 mEEpi0analysis->minbias(117001);
180 mEEpi0analysis->mudst(
"MuDst");
181 mEEpi0analysis->points(
"mEEpoints");
182 mEEpi0analysis->mixer(
"mEEmixer");
183 mEEpi0analysis->analysis(
"AandE");
184 mEEpi0analysis->spin(
"mSpinDb");
207 int Tnumsmdu=0,Tnumsmdv=0,Tnumpoints=0,Tnumpairs=0,Tnumfp=0,n2clusteru=0,n2clusterv=0,n2point=0,j=0;
209 while ( stat == 0 ) {
215 if ( count++ >= nevents && nevents>0 )
break;
226 stat = mChain ->
Make();
231 if ( (count%prescale)==0 )
233 std::cout <<
"------------------------------------------------";
234 std::cout <<
"event=" << count << std::endl;
239 Int_t nhits[]={0,0,0,0,0,0};
240 float umeandiff=0,vmeandiff;
241 for (
int i = 0; i < 4; i++ ) {
251 for ( Int_t sec=0;sec<12;sec++ )
263 Int_t ncl[6]={0,0,0,0,0,0};
264 for ( Int_t i=0;i<12;i++ )
284 mEEmcDatabase = (
StEEmcDb*)mChain->GetDataSet(
"StEEmcDb");
285 if (mEEmcDatabase) mEEmcDatabase->exportAscii(
"dbdump.dat");
296 TFile *file=
new TFile(ofile,
"RECREATE");
301 mEEclusters -> GetHistList() ->
Write();
302 mEEpoints -> GetHistList() ->
Write();
303 mEEpi0analysis->GetHistList()->Write();
319 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
320 loadSharedLibraries();
322 gSystem->Load(
"StDbLib");
323 gSystem->Load(
"StDbBroker");
324 gSystem->Load(
"St_db_Maker");
325 gSystem->Load(
"StEEmcUtil");
326 gSystem->Load(
"StEEmcDbMaker");
327 gSystem->Load(
"StEEmcSimulatorMaker");
328 gSystem->Load(
"StEEmcA2EMaker");
330 gSystem->Load(
"StEEmcIUPi0");
332 gSystem->Load(
"StMaxStripPi0");
334 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 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.
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.
A cluster maker for the EEMC.
void analysis(const Char_t *name)
Set the name of the ADC–>E maker.
Int_t numberOfHitTowers(Int_t layer) const
void threshold(Float_t cut, Int_t layer)
void analysis(const Char_t *name)
Set adc to energy maker.
virtual void ls(Option_t *option="") const
void trigger(Int_t trigger)
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.
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.