4 int rdGeant(
int maxEve=2){
6 TString geantFile =
"/star/data26/reco/pp200/pythia_6.203/default/minbias/year2003/hadronic_on/trs_ic/rcf1200_2723_2000evts.geant.root";
9 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
10 loadSharedLibraries();
11 cout <<
" loading done " << endl;
23 IOMk->SetBranch(
"*",0,
"0");
24 IOMk->SetBranch(
"geantBranch",0,
"r");
33 printf(
" requested maxEve=%d\n",maxEve);
37 if(eventCounter >maxEve)
break;
39 int stat = chain->
Make();
49 St_g2t_event *Pg2t_event=(St_g2t_event *) geantDstI(
"g2t_event");
51 g2t_event_st *g2t_event1=Pg2t_event->GetTable();
52 printf(
"nr=%d %p\n",Pg2t_event->GetNRows(),g2t_event1);
53 int k1= g2t_event1->eg_label;
54 int k2= g2t_event1->n_event;
55 int k3= g2t_event1->subprocess_id;
57 printf(
"eg_label=%d n_event=%d subprocess_id=%d\n", k1,k2,k3);
61 St_particle *particleTabPtr = (St_particle *) geantDstI(
"particle");
62 particle_st* particleTable = particleTabPtr->GetTable();
64 for (
int i=0; i<particleTabPtr->GetNRows();++i) {
66 cout <<
"track " << i << endl;
67 cout <<
" id = " << particleTable[i].idhep << endl;
68 cout <<
" px = " << particleTable[i].phep[0] << endl;
69 cout <<
" py = " << particleTable[i].phep[1] << endl;
70 cout <<
" pz = " << particleTable[i].phep[2] << endl;
71 cout <<
" e = " << particleTable[i].phep[3] << endl;
72 cout <<
" m = " << particleTable[i].phep[4] << endl;
73 cout <<
" moth1 = " << particleTable[i].jmohep[0] << endl;
74 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