23 void makeEEmcTreePartMC( Long_t neventsIn = -1,
24 const Char_t *inputFileName =
"",
25 const Char_t *outputFileName =
"McEEmcTree.root",
26 Int_t displayFreq = 1000 ){
30 std::cout <<
"***** Loading libraries *****" << endl;
32 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
33 loadSharedLibraries();
34 assert( !gSystem->Load(
"StEEmcUtil"));
35 assert( !gSystem->Load(
"StMcEvent"));
36 assert( !gSystem->Load(
"StMcEventMaker"));
37 assert( !gSystem->Load(
"StSpinDbMaker") );
38 assert( !gSystem->Load(
"StEEmcPoolEEmcTreeContainers") );
39 assert( !gSystem->Load(
"StEEmcPointMap") );
40 assert( !gSystem->Load(
"StEEmcTreeMaker") );
44 std::cout <<
"***** Done loading libraries *****" << endl;
45 std::cout <<
"***** Instanciating all the classes *****" << endl;
50 analysisChain =
new StChain(
"eemcAnalysisChain");
58 TString geantFileName = inputFileName;
59 geantFileName.ReplaceAll(
"MuDst",
"geant");
60 ioMaker->SetFile(geantFileName);
63 ioMaker->SetBranch(
"*",0,
"1");
64 ioMaker->SetBranch(
"geantBranch",0,
"r");
65 ioMaker->SetBranch(
"minimcBranch",0,
"r");
72 muDstMaker =
new StMuDstMaker( 0, 0,
"", inputFileName,
"MuDst", nfiles );
75 muDstMaker->
SetStatus(
"PrimaryVertices",1);
82 mcEventMaker->doPrintEventInfo =
false;
89 gMessMgr->SwitchOff(
"D");
90 gMessMgr->SwitchOff(
"I");
95 mcTreeMakerPtr->setEnergyThreshold( 0.0 );
96 mcTreeMakerPtr->addTrigger( -999 );
97 mcTreeMakerPtr->
setTreeStatus( StMcEEmcTreeMaker_t::WRITE, outputFileName );
100 std::cout <<
"***** Done instanciating all the classes *****" << endl;
101 analysisChain->
ls(3);
107 std::cout <<
"***** Initializing all makers in the analysis chain *****" << std::endl;
109 analysisChain->Init();
111 std::cout <<
"***** Initialization done *****" << std::endl;
124 for( ; nevents <= neventsIn && !ierr; ++nevents ){
126 analysisChain->
Clear();
129 ierr = analysisChain->
Make();
132 if( (nevents+1) % displayFreq == 1 )
133 std::cout <<
"***** finished event number " << nevents <<
" *****" << std::endl;
136 std::cout <<
"***** ERROR FLAG " << ierr <<
" on event number " << nevents <<
" *****" << endl;
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
void setTreeStatus(iostatus_t iostatus, const Char_t *fileName)
modifiers
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
StMcEEmcTreeMaker_t(const Char_t *myName)
constructor
virtual void ls(Option_t *option="") const
Bool_t doPrintMemoryInfo
lots of screen output
void SetStatus(const char *arrType, int status)