Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move upper setting the length of the step before the interactions as some (like the XTR) might need it. #112

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion G4HepEm/G4HepEm/src/G4HepEmTrackingManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,10 @@ void G4HepEmTrackingManager::TrackElectron(G4Track *aTrack) {
// For the XTR process (if any)
G4VParticleChange* particleChangeXTR = nullptr;

// Set the true (possible accumulated) step length here as some G4 processes
// (e.g. XTR) might need below in their DoIt
step.SetStepLength(totalTruePathLength);

const G4VProcess *proc = nullptr;
if (stopped) {
// call annihilation for e+ !!!
Expand Down Expand Up @@ -559,7 +563,6 @@ void G4HepEmTrackingManager::TrackElectron(G4Track *aTrack) {
}

postStepPoint.SetProcessDefinedStep(proc);
step.SetStepLength(totalTruePathLength);

// energy, e-depo and status
const double ekin = thePrimaryTrack->GetEKin();
Expand Down
Loading