16 #include <Geant4/G4DynamicParticle.hh>
17 #include <Geant4/G4ParticleDefinition.hh>
18 #include <Geant4/G4PrimaryParticle.hh>
19 #include <Geant4/G4SystemOfUnits.hh>
20 #include <Geant4/G4ThreeVector.hh>
21 #include <Geant4/G4Track.hh>
22 #include <Geant4/G4TrackVector.hh>
23 #include <Geant4/G4TrackingManager.hh>
24 #include <Geant4/G4VUserTrackInformation.hh>
35 : m_EventAction(eventAction)
36 , m_TruthInfoList(nullptr)
100 pp->GetShower()->add_g4particle_id(trackid);
101 pp->GetShower()->add_g4vertex_id(vtxindex);
130 trackid =
p->GetUserTrackId();
131 primaryid =
p->GetUserPrimaryId();
132 shower =
p->GetShower();
138 for (
size_t i = 0; i < secondaries->size(); ++i)
140 G4Track* secondary = (*secondaries)[i];
152 int trackid =
p->GetUserTrackId();
187 bool keep_curr_track = p && p->
GetKeep() ?
true :
false;
190 while (keep_curr_track && stack_iter !=
m_G4ParticleStack.rend() && stack_iter->g4track_id < 0)
192 stack_iter->g4track_id *= -1;
200 m_TruthInfoList = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");
205 std::cout <<
"PHG4TruthEventAction::SetInterfacePointers - unable to find G4TruthInfo" << std::endl;
244 double ptot = sqrt(ke * ke + 2.0 * m * ke);
283 auto [iter, inserted] =
m_VertexMap.insert(std::make_pair(v, vtxindex));
288 return truth.
GetVtxMap().find(iter->second)->second;
293 return truth.
AddVertex(vtxindex, vtxpt)->second;