5 #include <G4VTrajectory.hh> 6 #include <G4VTrajectoryPoint.hh> 7 #include <G4ThreeVector.hh> 18 int trackId = traj->GetTrackID();
23 int currentId = trackId;
24 int parentId = trackId;
26 for (loopCount=0;loopCount<10000;++loopCount) {
27 G4VTrajectory*
t =
Get(currentId);
29 parentId = t->GetParentID();
31 G4VTrajectory*
p =
Get(parentId);
41 if (parentId == 0)
break;
45 EDepSimLog(
"Infinite Loop in EDepSim::TrajectoryMap::FindPrimaryId(): " 46 <<
"Track Id: " << trackId);
54 if (t ==
fMap.end()) {
#define EDepSimLog(outStream)
static int FindPrimaryId(int trackId)
#define EDepSimThrow(message)
Print an error message, and then throw an exception.
static std::map< int, G4VTrajectory * > fMap
G4String GetProcessName() const
Get the interaction process that created the trajectory.
static void Add(G4VTrajectory *traj)
Add a trajectory to the map.
static G4VTrajectory * Get(int trackId)
Provide a map between the track id and the trajectory object.