48 void runEEmcPi0Analysis( Int_t nevents = -1,
49 Char_t *name =
"test.lis",
50 Char_t *ofile=
"test.root",
56 TString pathname = path;
68 mChain =
new StChain(
"eemcAnalysisChain");
74 mMuDstMaker =
new StMuDstMaker(0,0,path,name,
"MuDst",nfiles);
83 mStarDatabase =
new St_db_Maker(
"StarDb",
"MySQL:StarDb");
90 mStarDatabase->SetFlavor(
"sim",
"eemcPMTcal");
91 mStarDatabase->SetFlavor(
"sim",
"eemcPIXcal");
92 mStarDatabase->SetFlavor(
"sim",
"eemcPMTped");
93 mStarDatabase->SetFlavor(
"sim",
"eemcPMTstat");
94 mStarDatabase->SetFlavor(
"sim",
"eemcPMTname");
95 mStarDatabase->SetFlavor(
"sim",
"eemcADCconf");
96 mStarDatabase->SetDateTime(20050101,0);
104 gMessMgr -> SwitchOff(
"D");
105 gMessMgr -> SwitchOn(
"I");
131 mEEanalysis->
source(
"MuDst",1);
150 eemcQA->
mudst(
"MuDst");
154 eemcQA->softTrigger(3.36);
185 mEEmixer -> mudst(
"MuDst");
186 mEEmixer -> analysis(
"AandE");
187 mEEmixer -> points(
"mEEpoints");
188 for ( Int_t i=0;i<12;i++ )
193 mEEpi0analysis->trigger(96261);
194 mEEpi0analysis->minbias(96011);
195 mEEpi0analysis->mudst(
"MuDst");
196 mEEpi0analysis->points(
"mEEpoints");
197 mEEpi0analysis->mixer(
"mEEmixer");
198 mEEpi0analysis->analysis(
"AandE");
199 mEEpi0analysis->spin(
"mSpinDb");
202 mEEmixer2 -> mudst(
"MuDst");
203 mEEmixer2 -> analysis(
"AandE");
204 mEEmixer2 -> points(
"mEEpoints");
205 for ( Int_t i=0;i<12;i++ )
206 mEEmixer2->sector(i);
207 mEEmixer2->trigger(96251);
210 mEEpi0analysis2->trigger(96251);
211 mEEpi0analysis2->minbias(96011);
212 mEEpi0analysis2->mudst(
"MuDst");
213 mEEpi0analysis2->points(
"mEEpoints");
214 mEEpi0analysis2->mixer(
"mEEmixer");
215 mEEpi0analysis2->analysis(
"AandE");
216 mEEpi0analysis2->spin(
"mSpinDb");
220 mEEmixer3 -> mudst(
"MuDst");
221 mEEmixer3 -> analysis(
"AandE");
222 mEEmixer3 -> points(
"mEEpoints");
223 for ( Int_t i=0;i<12;i++ )
224 mEEmixer3->sector(i);
225 mEEmixer3->trigger(96282);
228 mEEpi0analysis3->trigger(96282);
229 mEEpi0analysis3->minbias(96011);
230 mEEpi0analysis3->mudst(
"MuDst");
231 mEEpi0analysis3->points(
"mEEpoints");
232 mEEpi0analysis3->mixer(
"mEEmixer");
233 mEEpi0analysis3->analysis(
"AandE");
234 mEEpi0analysis3->spin(
"mSpinDb");
235 mEEpi0analysis3->cuts()->setTowerCut(0.0);
238 mEEmixer4 -> mudst(
"MuDst");
239 mEEmixer4 -> analysis(
"AandE");
240 mEEmixer4 -> points(
"mEEpoints");
241 for ( Int_t i=0;i<12;i++ )
242 mEEmixer4->sector(i);
243 mEEmixer4->trigger(96272);
246 mEEpi0analysis4->trigger(96272);
247 mEEpi0analysis4->minbias(96011);
248 mEEpi0analysis4->mudst(
"MuDst");
249 mEEpi0analysis4->points(
"mEEpoints");
250 mEEpi0analysis4->mixer(
"mEEmixer");
251 mEEpi0analysis4->analysis(
"AandE");
252 mEEpi0analysis4->spin(
"mSpinDb");
253 mEEpi0analysis4->cuts()->setTowerCut(0.0);
267 while ( stat == 0 ) {
273 if ( count++ >= nevents )
if ( nevents > 0 )
break;
284 stat = mChain ->
Make();
289 if ( (count%prescale) )
continue;
291 std::cout <<
"------------------------------------------------";
292 std::cout <<
"event=" << count << std::endl;
297 Int_t nhits[]={0,0,0,0,0,0};
298 for (
int i = 0; i < 4; i++ ) {
308 for ( Int_t sec=0;sec<12;sec++ )
320 Int_t ncl[6]={0,0,0,0,0,0};
321 for ( Int_t i=0;i<12;i++ )
331 const Char_t *lay[]={
"tower:",
"pre1: ",
"pre2: ",
"post: ",
"smdu: ",
"smdv: "};
332 for ( Int_t i=0;i<6;i++ )
334 std::cout << lay[i] <<
" " << nhits[i] <<
" " << ncl[i] << std::endl;
338 std::cout <<
"number of pairs: " << mEEmixer -> numberOfCandidates() << std::endl;
351 mEEmcDatabase = (
StEEmcDb*)mChain->GetDataSet(
"StEEmcDb");
352 if (mEEmcDatabase) mEEmcDatabase->exportAscii(
"dbdump.dat");
363 TFile *file=
new TFile(ofile,
"RECREATE");
366 eemcQA -> GetHistList() ->
Write();
369 mEEpi0analysis->GetHistList()->Write();
373 mEEpi0analysis2->GetHistList()->Write();
377 mEEpi0analysis3->GetHistList()->Write();
381 mEEpi0analysis4->GetHistList()->Write();
395 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
396 loadSharedLibraries();
398 gSystem->Load(
"StDbLib");
399 gSystem->Load(
"StDbBroker");
400 gSystem->Load(
"St_db_Maker");
401 gSystem->Load(
"StEEmcUtil");
402 gSystem->Load(
"StEEmcDbMaker");
403 gSystem->Load(
"StEEmcSimulatorMaker");
406 gSystem->Load(
"StEEmcA2EMaker");
407 gSystem->Load(
"StEEmcClusterMaker");
408 gSystem->Load(
"StEEmcPointMaker");
409 gSystem->Load(
"StEEmcPi0Mixer");
411 gSystem->Load(
"StMaxStripPi0");
414 gSystem->Load(
"StSpinDbMaker");
void analysis(const Char_t *name)
Set the name of the ADC–>E maker.
EEmc ADC –> energy maker.
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
Int_t numberOfSmdClusters(Int_t sec, Int_t plane) const
Return number of smd clusters for a given sector, plane.
A maker for creating pi0 histograms.
void source(const Char_t *, Int_t=0)
void trigger(Int_t t)
add a trigger to the trigger list
void setAddPed(Bool_t a=true)
Add pedestal offsets from DB.
virtual void Clear(Option_t *option="")
User defined functions.
void trigger(Int_t trigger)
void setMaxExtent(Int_t m)
Maximum distance around seed strip to cluster smd strips.
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.
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)
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.
StSpinDbMaker(const char *name="SpinDbMaker")
experts only
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.
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.