Skip to content

Commit

Permalink
Use trackmap instead
Browse files Browse the repository at this point in the history
  • Loading branch information
EinarElen committed Apr 5, 2024
1 parent e57d33e commit b117e6a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Biasing/src/Biasing/Utility/StepPrinter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@ void StepPrinter::stepping(const G4Step* step) {

// This could be a negated condition, but it is easier to read this way
//
if (trackID == trackID_ || // We are the track of interest
isDescendent(track) || // We are a descendent of the track of interest
processName == processName_ // The parent process was the process of interest
auto trackMap{simcore::g4user::TrackingAction::get()->getTrackMap()};
auto found{isDescendent(track)};
if (trackID == trackID_ || // We are the track of interest
trackMap.isDescendant(
trackID, trackID_,
depth_) || // We are a descendent of the track of interest
processName ==
processName_ // The parent process was the process of interest
) {
// This is an interesting track -> Carry on processing
} else {
} else {
return;
}
// Get the particle name.
Expand Down

0 comments on commit b117e6a

Please sign in to comment.