5 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
8 TFile *
ff =
new TFile(
"simulation.root");
9 TTree *
cbmsim = ff->Get(
"cbmsim");
10 cbmsim->AddFriend(
"cbmsim",
"reconstruction.root");
13 TClonesArray *
mcTrackArray =
new TClonesArray(
"PndMCTrack");
14 cbmsim->SetBranchAddress(
"MCTrack", &mcTrackArray);
15 TClonesArray *rcTrackArray =
new TClonesArray(
"PndPidCandidate");
16 cbmsim->SetBranchAddress(
"PidChargedCand", &rcTrackArray);
21 int nEvents = cbmsim->GetEntries();
22 for(
unsigned ev=0; ev<
nEvents; ev++) {
26 for(
unsigned rc=0; rc<rcTrackArray->GetEntriesFast(); rc++) {
34 printf(
"%2d (REC) -> V: %7.3f %7.3f %7.3f [cm] & P: %7.3f %7.3f %7.3f [GeV/c]\n",
35 ih, rcpos.X(), rcpos.Y(), rcpos.Z(), rcmom.X(), rcmom.Y(), rcmom.Z());
36 printf(
" ( MC) %7.3f %7.3f %7.3f & %7.3f %7.3f %7.3f\n\n",
37 mcpos.X(), mcpos.Y(), mcpos.Z(), mcmom.X(), mcmom.Y(), mcmom.Z());
41 TVector3 plxx(0.0, 0.0, 150.0), plnx(0.0, 0.0, 1.0);
48 printf(
" (REC) -> V: %7.3f %7.3f %7.3f [cm] & P: %7.3f %7.3f %7.3f [GeV/c]\n",
49 rcpos.X(), rcpos.Y(), rcpos.Z(), rcmom.X(), rcmom.Y(), rcmom.Z());
50 printf(
" ( MC) %7.3f %7.3f %7.3f & %7.3f %7.3f %7.3f\n\n",
51 mcpos.X(), mcpos.Y(), mcpos.Z(), mcmom.X(), mcmom.Y(), mcmom.Z());
55 printf(
" ---> No hits!\n");