11 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
14 TFile *
ff =
new TFile(
"simulation.root");
15 TTree *
cbmsim = ff->Get(
"cbmsim");
16 cbmsim->AddFriend(
"cbmsim",
"reconstruction.root");
19 TClonesArray *
mcTrackArray =
new TClonesArray(
"PndMCTrack");
20 cbmsim->SetBranchAddress(
"MCTrack", &mcTrackArray);
21 TClonesArray *rcTrackArray =
new TClonesArray(
"PndPidCandidate");
22 cbmsim->SetBranchAddress(
"PidChargedCand", &rcTrackArray);
28 int nEvents = cbmsim->GetEntries();
29 for(
unsigned ev=0; ev<
nEvents; ev++) {
33 for(
unsigned rc=0; rc<rcTrackArray->GetEntriesFast(); rc++) {
59 TVector3 plxx(0.0, 0.0, 105.0), plnx(0.0, 0.0, 1.0);
66 printf(
" (REC) -> V: %7.3f %7.3f %7.3f [cm] & P: %7.3f %7.3f %7.3f [GeV/c]\n",
67 rcpos.X(), rcpos.Y(), rcpos.Z(), rcmom.X(), rcmom.Y(), rcmom.Z());
68 printf(
" ( MC) %7.3f %7.3f %7.3f & %7.3f %7.3f %7.3f\n\n",
69 mcpos.X(), mcpos.Y(), mcpos.Z(), mcmom.X(), mcmom.Y(), mcmom.Z());
73 printf(
" ---> No hits!\n");