46 tree =
new TTree(
"zdchit",
"Collection of EICG4ZDC G4Hits");
48 tree->Branch(
"Nhit", &
Nhit,
"Nhit/I");
50 tree->Branch(
"layerID", &
layerID);
51 tree->Branch(
"xID", &
xID);
52 tree->Branch(
"yID", &
yID);
53 tree->Branch(
"x0", &
x0);
54 tree->Branch(
"y0", &
y0);
55 tree->Branch(
"z0", &
z0);
56 tree->Branch(
"x1", &
x1);
57 tree->Branch(
"y1", &
y1);
58 tree->Branch(
"z1", &
z1);
59 tree->Branch(
"time0", &
time0);
60 tree->Branch(
"time1", &
time1);
61 tree->Branch(
"edep", &
edep);
63 tree->Branch(
"Ntrack",&
Ntrack,
"Ntrack/I");
64 tree->Branch(
"trk_px", &
trk_px);
65 tree->Branch(
"trk_py", &
trk_py);
66 tree->Branch(
"trk_pz", &
trk_pz);
67 tree->Branch(
"trk_e", &
trk_e);
68 tree->Branch(
"trk_pid", &
trk_pid);
75 ostringstream nodename;
76 set<string>::const_iterator iter;
81 nodename <<
"G4HIT_" << *iter;
89 if(hit_iter->second->get_hit_type()<0)
continue;
90 if(hit_iter->second->get_hit_type()>5)
continue;
93 layerType.push_back(hit_iter->second->get_hit_type());
94 layerID.push_back(hit_iter->second->get_layer());
95 xID.push_back(hit_iter->second->get_index_i());
96 yID.push_back(hit_iter->second->get_index_j());
97 x0.push_back(hit_iter->second->get_x(0));
98 y0.push_back(hit_iter->second->get_y(0));
99 z0.push_back(hit_iter->second->get_z(0));
100 x1.push_back(hit_iter->second->get_x(1));
101 y1.push_back(hit_iter->second->get_y(1));
102 z1.push_back(hit_iter->second->get_z(1));
103 time0.push_back(hit_iter->second->get_t(0));
104 time1.push_back(hit_iter->second->get_t(1));
105 edep.push_back(hit_iter->second->get_edep());
111 = findNode::getClass<PHG4InEvent>(topNode,
"PHG4INEVENT");
113 if(track_truthinfo) {
117 pair<multimap<int, PHG4Particle *>::const_iterator, multimap<int, PHG4Particle *>::const_iterator > particlebegin_end = track_truthinfo->
GetParticles();
118 multimap<int,PHG4Particle *>::const_iterator particle_iter;
120 for (particle_iter = particlebegin_end.first; particle_iter != particlebegin_end.second; ++particle_iter){