StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
geant.C
1 // $Id: geant.C,v 1.14 2001/05/30 18:24:59 perev Exp $
2 //=======================================================================
3 // owner: Pavel Nevski
4 // what it does:
5 //=======================================================================
6 //
7 //#define gtrack
8 TBrowser *b = 0;
9 class St_geant_Maker;
10 St_geant_Maker *geant=0;
11 void geant(const Int_t Nevents=1,
12  const Char_t *fzfile ="/star/rcf/simu/cocktail/hadronic/default/lowdensity/year_1h/half_field/hadronic_on/Gstardata/hc_lowdensity.400_evts.fz")
13 {
14  gROOT->LoadMacro("bfc.C");
15  bfc(0,"fzin sim_T globT gen_T",fzfile);
16  Int_t i=0;
17  for (Int_t i =1; i <= Nevents; i++){
18  chain->Clear();
19  if (chain->Make(i)>=kStEOF) break;
20  St_g2t_track *track = (St_g2t_track *) chain->FindObject("g2t_track");
21  g2t_track_st *trk = track->GetTable();
22  for (Int_t j = 0; j < track->GetNRows(); j++,trk++) {
23  if (TMath::Abs(trk->charge) < 0.5) continue;
24  if (! trk->eg_label) continue;
25  if (trk->n_tpc_hit < 26) continue;
26  hyp = -1;
27  if (trk->ge_pid == 2 || trk->ge_pid == 3) hyp = 3;
28  if (trk->ge_pid == 8 || trk->ge_pid == 9) hyp = 2;
29  if (trk->ge_pid ==11 || trk->ge_pid ==12) hyp = 1;
30  if (trk->ge_pid ==14 || trk->ge_pid ==15) hyp = 0;
31  Double_t pT = trk->charge*trk->pt;
32  Double_t Eta = trk->eta;
33  printf("eg: %d ge: %d pT %f eta %f Ntpc %d\n",
34  trk->eg_label,trk->ge_pid,pT,Eta,trk->n_tpc_hit);
35  }
36  printf ("=========================================== Done with Event no. %d\n",i);
37  }
38 }
virtual void Clear(Option_t *option="")
User defined functions.
Definition: StChain.cxx:77
Definition: Stypes.h:43
virtual Int_t Make()
Definition: StChain.cxx:110