38 Int_t max_zero_count = 100;
41 void runEEmcTiming( Int_t nevents = 30000,
42 Char_t *name =
"8095104.list",
43 Char_t *ofile=
"8095104.root",
44 Float_t tower_delay=19.,
45 Float_t mapmt_delay=65.,
51 TString pathname = path;
63 mChain =
new StChain(
"eemcAnalysisChain");
69 mMuDstMaker =
new StMuDstMaker(0,0,path,name,
"MuDst",nfiles);
78 mStarDatabase =
new St_db_Maker(
"StarDb",
"MySQL:StarDb");
86 gMessMgr -> SwitchOff(
"D");
87 gMessMgr -> SwitchOn(
"I");
97 mEEanalysis->
source(
"MuDst",1);
99 for (
int ii=0;ii<6;ii++ ) mEEanalysis->
threshold(-300.0,ii);
104 timing->setRunNumber( atoi( name ) );
105 timing->setTiming( tower_delay, mapmt_delay );
106 timing->setTowerCuts( 25, 75 );
107 timing->setMapmtCuts( 50, 150 );
121 while ( stat == 0 ) {
127 if ( count++ >= nevents )
if ( nevents > 0 )
break;
138 stat = mChain ->
Make();
145 for ( Int_t i=0;i<720;i++ )
151 if ( nzeros > max_zero_count ) {
152 std::cout <<
"ADC sum for EEMC zero for > max events" << std::endl;
159 if ( (count%100) )
continue;
162 std::cout <<
"------------------------------------------------";
163 std::cout <<
"event=" << count << std::endl;
169 for ( Int_t i=0;i<720;i++ )
172 std::cout << t.
raw() <<
" ";
173 if ( !((i+1)%24) ) std::cout << std::endl;
175 std::cout << std::endl;
188 mEEmcDatabase = (
StEEmcDb*)mChain->GetDataSet(
"StEEmcDb");
189 if (mEEmcDatabase) mEEmcDatabase->exportAscii(
"dbdump.dat");
196 TString psfile=ofile;psfile.ReplaceAll(
"root",
"ps");
197 TString dtfile=ofile;dtfile.ReplaceAll(
"root",
"dat");
200 timing->dumpAsciiFile(dtfile);
205 gSystem->mkdir(
"timing_files/");
206 TString myofile=
"timing_files/";
207 TFile *file=
new TFile(myofile+ofile,
"RECREATE");
208 timing->GetHistList()->Write();
220 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
221 loadSharedLibraries();
223 gSystem->Load(
"StDbLib");
224 gSystem->Load(
"StDbBroker");
225 gSystem->Load(
"St_db_Maker");
226 gSystem->Load(
"StEEmcUtil");
227 gSystem->Load(
"StEEmcDbMaker");
228 gSystem->Load(
"StEEmcSimulatorMaker");
230 gSystem->Load(
"StEEmcA2EMaker");
231 gSystem->Load(
"StEEmcTimingMaker");
EEmc ADC –> energy maker.
void source(const Char_t *, Int_t=0)
void raw(Float_t r)
Set the raw ADC for this element.
void threshold(Float_t cut, Int_t layer)
virtual void ls(Option_t *option="") const
Base class for representing tower, preshower and postshower elements.
void SetStatus(const char *arrType, int status)
StEEmcTower & tower(Int_t index, Int_t layer=0)
void Clear(Option_t *opts="")
User defined functions.
void database(const Char_t *)
Set the name of the EEMC database, init obtains pointer.