6 int rdMuDst_Geant2print(
int maxEve=2){
7 char * muDstPath=
"/star/data26/reco/pp200/pythia_6.203/default/minbias/year2003/hadronic_on/trs_ic/";
8 char * muDstFile=
"rcf1200_2723_2000evts.MuDst.root";
10 TString geantFile =
"/star/data26/reco/pp200/pythia_6.203/default/minbias/year2003/hadronic_on/trs_ic/rcf1200_2723_2000evts.geant.root";
13 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
14 loadSharedLibraries();
15 cout <<
" loading done " << endl;
27 IOMk->SetBranch(
"*",0,
"0");
28 IOMk->SetBranch(
"geantBranch",0,
"r");
32 muMk =
new StMuDstMaker(0,0,muDstPath,muDstFile,
"MuDst.root",maxList);
41 printf(
" requested maxEve=%d\n",maxEve);
45 if(eventCounter >maxEve)
break;
47 int stat = chain->
Make();
55 printf(
"eve=%d Nprim=%d ID=%d\n",eventCounter,n,info.id());
65 St_g2t_event *Pg2t_event=(St_g2t_event *) geantDstI(
"g2t_event");
67 g2t_event_st *g2t_event1=Pg2t_event->GetTable();
68 printf(
"nr=%d %p\n",Pg2t_event->GetNRows(),g2t_event1);
69 int k1= g2t_event1->eg_label;
70 int k2= g2t_event1->n_event;
71 int k3= g2t_event1->subprocess_id;
73 printf(
"eg_label=%d n_event=%d subprocess_id=%d\n", k1,k2,k3);
74 assert(info.id()==g2t_event1->n_event);
78 St_particle *particleTabPtr = (St_particle *) geantDstI(
"particle");
79 particle_st* particleTable = particleTabPtr->GetTable();
81 for (
int i=0; i<particleTabPtr->GetNRows();++i) {
83 cout <<
"track " << i << endl;
84 cout <<
" id = " << particleTable[i].idhep << endl;
85 cout <<
" px = " << particleTable[i].phep[0] << endl;
86 cout <<
" py = " << particleTable[i].phep[1] << endl;
87 cout <<
" pz = " << particleTable[i].phep[2] << endl;
88 cout <<
" e = " << particleTable[i].phep[3] << endl;
89 cout <<
" m = " << particleTable[i].phep[4] << endl;
90 cout <<
" moth1 = " << particleTable[i].jmohep[0] << endl;
91 cout <<
" moth2 = " << particleTable[i].jmohep[1] << endl;
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
virtual void ls(Option_t *option="") const
static TObjArray * primaryTracks()
returns pointer to a list of tracks belonging to the selected primary vertex
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)