#include <EDepSimTrajectoryMap.hh>
|
static G4VTrajectory * | Get (int trackId) |
| Provide a map between the track id and the trajectory object. More...
|
|
static void | Add (G4VTrajectory *traj) |
| Add a trajectory to the map. More...
|
|
static void | Clear () |
|
static int | FindPrimaryId (int trackId) |
|
|
static std::map< int, G4VTrajectory * > | fMap |
|
Definition at line 15 of file EDepSimTrajectoryMap.hh.
EDepSim::TrajectoryMap::~TrajectoryMap |
( |
| ) |
|
|
inline |
EDepSim::TrajectoryMap::TrajectoryMap |
( |
| ) |
|
|
inlineprivate |
The constructor is private so that it can only be created using the static get method.
Definition at line 42 of file EDepSimTrajectoryMap.hh.
void EDepSim::TrajectoryMap::Add |
( |
G4VTrajectory * |
traj | ) |
|
|
static |
Add a trajectory to the map.
Definition at line 17 of file EDepSimTrajectoryMap.cc.
18 int trackId = traj->GetTrackID();
static std::map< int, G4VTrajectory * > fMap
void EDepSim::TrajectoryMap::Clear |
( |
| ) |
|
|
static |
int EDepSim::TrajectoryMap::FindPrimaryId |
( |
int |
trackId | ) |
|
|
static |
Find the primary track ID for the current track. This is the primary that is the ultimate parent of the current track.
Definition at line 22 of file EDepSimTrajectoryMap.cc.
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);
#define EDepSimLog(outStream)
#define EDepSimThrow(message)
Print an error message, and then throw an exception.
G4String GetProcessName() const
Get the interaction process that created the trajectory.
static G4VTrajectory * Get(int trackId)
Provide a map between the track id and the trajectory object.
G4VTrajectory * EDepSim::TrajectoryMap::Get |
( |
int |
trackId | ) |
|
|
static |
Provide a map between the track id and the trajectory object.
Definition at line 52 of file EDepSimTrajectoryMap.cc.
54 if (t ==
fMap.end()) {
static std::map< int, G4VTrajectory * > fMap
std::map< int, G4VTrajectory * > EDepSim::TrajectoryMap::fMap |
|
staticprivate |
A map to the trajectories information indexed the the track id. Be careful since the trajectory information is owned by the event, so if you try to use this after a trajectory has been deleted... bad things will happen.
Definition at line 38 of file EDepSimTrajectoryMap.hh.
The documentation for this class was generated from the following files: