22 auto track{step->GetTrack()};
24 const auto trackID{track->GetTrackID()};
25 const auto parent{track->GetParentID()};
28 trackParents_[trackID] = parent;
31 auto process{track->GetCreatorProcess()};
32 std::string processName{process ? process->GetProcessName() :
"Primary"};
34 if (processName.find(
"biasWrapper") != std::string::npos) {
35 std::size_t pos = processName.find_first_of(
"(") + 1;
36 processName = processName.substr(pos, processName.size() - pos - 1);
43 trackMap.isDescendant(
54 const auto particleName{track->GetParticleDefinition()->GetParticleName()};
57 const auto energy{step->GetPostStepPoint()->GetTotalEnergy()};
60 auto volume{track->GetVolume()};
61 auto volumeName{volume->GetName()};
65 auto nextVolume{track->GetNextVolume() ? track->GetNextVolume()->GetName()
69 auto regionName{volume->GetLogicalVolume()->GetRegion()->GetName()};
71 std::cout <<
" Step " << track->GetCurrentStepNumber() <<
" ("
72 << track->GetParticleDefinition()->GetParticleName() <<
") {"
73 <<
" Energy: " << energy <<
" Track ID: " << track->GetTrackID()
74 <<
" Particle currently in: " << volumeName
75 <<
" Region: " << regionName <<
" Next volume: " << nextVolume
76 <<
" Weight: " << track->GetWeight() <<
" Parent: " << parent
77 <<
" (" << processName <<
") "
79 for (
auto const& child : *(step->GetSecondaryInCurrentStep())) {
80 std::cout <<
" (" << child->GetTotalEnergy()
81 <<
"): " << child->GetParticleDefinition()->GetPDGEncoding();
84 std::cout <<
" }" << std::endl;