39 void runEEmcClusterMaker( Int_t nevents = -1,
42 Char_t *name=
"test.MuDst.root",
43 Char_t *ofile=
"mc.root",
51 TString pathname = path;
62 mChain =
new StChain(
"eemcAnalysisChain");
67 mMuDstMaker =
new StMuDstMaker(0,0,path,name,
"MuDst",nfiles);
75 mStarDatabase =
new St_db_Maker(
"StarDb",
"MySQL:StarDb");
83 mStarDatabase->SetFlavor(
"sim",
"eemcPMTcal");
84 mStarDatabase->SetFlavor(
"sim",
"eemcPIXcal");
85 mStarDatabase->SetFlavor(
"sim",
"eemcPMTped");
86 mStarDatabase->SetFlavor(
"sim",
"eemcPMTstat");
87 mStarDatabase->SetFlavor(
"sim",
"eemcPMTname");
88 mStarDatabase->SetFlavor(
"sim",
"eemcADCconf");
89 mStarDatabase->SetDateTime(20050101,0);
99 gMessMgr -> SwitchOff(
"D");
100 gMessMgr -> SwitchOn(
"I");
128 mEEanalysis->
source(
"MuDst",1);
136 mEEanalysis->
scale(1.2);
183 while ( stat == 0 ) {
186 printf(
"event=%d\n",count);
191 if ( count++ >= nevents )
if ( nevents > 0 )
break;
202 stat = mChain ->
Make();
209 std::cout <<
"------------------------------------------------";
210 std::cout <<
"event=" << count << std::endl;
215 Int_t nhits[]={0,0,0,0,0,0};
216 for (
int i = 0; i < 4; i++ ) {
226 for ( Int_t sec=0;sec<12;sec++ )
238 Int_t ncl[6]={0,0,0,0,0,0};
246 const Char_t *lay[]={
"tower:",
"pre1: ",
"pre2: ",
"post: ",
"smdu: ",
"smdv: "};
247 for ( Int_t i=0;i<6;i++ )
250 printf(
"%s nhits=%2i nclusters=%2i\n",lay[i],nhits[i],ncl[i]);
259 for ( Int_t sector = 0; sector < 12; sector++ )
263 for ( Int_t ic=0;ic<nclusters;ic++ )
266 Float_t pt = cluster.
momentum().Perp();
267 Float_t old = gamma_candidate.
momentum().Perp();
270 gamma_candidate = cluster;
276 if ( gamma_candidate.key() >= 0 )
277 gamma_candidate.
print();
279 std::cout <<
"no gamma candidate found" << std::endl;
286 std::cout <<
"Number of matching u=" << nu <<
" v=" << nv << std::endl;
287 for ( Int_t iu=0;iu<nu;iu++ )
292 for ( Int_t iv=0;iv<nv;iv++ )
311 mEEmcDatabase = (
StEEmcDb*)mChain->GetDataSet(
"StEEmcDb");
312 if (mEEmcDatabase) mEEmcDatabase->exportAscii(
"dbdump.dat");
326 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
327 loadSharedLibraries();
329 gSystem->Load(
"StDbLib");
330 gSystem->Load(
"StDbBroker");
331 gSystem->Load(
"St_db_Maker");
332 gSystem->Load(
"StEEmcUtil");
333 gSystem->Load(
"StEEmcDbMaker");
334 gSystem->Load(
"StEEmcSimulatorMaker");
336 gSystem->Load(
"StEEmcA2EMaker");
337 gSystem->Load(
"StEEmcClusterMaker");
TVector3 momentum() const
void Clear(Option_t *opts="")
User defined functions.
EEmc ADC –> energy maker.
StEEmcGenericClusterMaker * mEEclusters
void source(const Char_t *, Int_t=0)
void setAddPed(Bool_t a=true)
Add pedestal offsets from DB.
StEEmcA2EMaker * mEEanalysis
Int_t numberOfMatchingSmdClusters(const StEEmcCluster &cluster, Int_t plane) const
A maker for creating pi0 histograms.
Int_t numberOfHitStrips(Int_t sector, Int_t plane) const
void print() const
Prints cluster data.
Int_t numberOfHitTowers(Int_t layer) const
Int_t numberOfClusters(Int_t sector, Int_t layer) const
void threshold(Float_t cut, Int_t layer)
virtual void ls(Option_t *option="") const
StEEmcSmdCluster & matchingSmdCluster(const StEEmcCluster &cluster, Int_t plane, Int_t index)
void setOverwrite(Bool_t o=true)
Overwrite the muDst values.
void setDropBad(Bool_t d=true)
Drop bad channels marked as "fail" in DB.
A base class for representing clusters of EEMC smd strips.
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.
A base class for describing clusters of EEMC towers.
A class for mixing pi0 candidates.
void database(const Char_t *)
Set the name of the EEMC database, init obtains pointer.
StEEmcCluster & cluster(Int_t sector, Int_t layer, Int_t index)