Skip to content

Commit

Permalink
Merge pull request #37216 from civanch/extended_geant4_exception
Browse files Browse the repository at this point in the history
Extended handling of geometry exceptions for SIM
  • Loading branch information
cmsbuild authored Mar 12, 2022
2 parents 8838c53 + 35e8145 commit a41f340
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SimG4Core/Application/src/ExceptionHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bool ExceptionHandler::Notify(const char* exceptionOrigin,
static const G4String ws_banner = "\n-------- WWWW ------- G4Exception-START -------- WWWW -------\n";
static const G4String we_banner = "\n-------- WWWW -------- G4Exception-END --------- WWWW -------\n";

const G4Track* track = G4EventManager::GetEventManager()->GetTrackingManager()->GetTrack();
G4Track* track = G4EventManager::GetEventManager()->GetTrackingManager()->GetTrack();
double ekin = m_eth;

std::stringstream message;
Expand Down Expand Up @@ -61,8 +61,10 @@ bool ExceptionHandler::Notify(const char* exceptionOrigin,
G4String code;
mescode >> code;

// track is killed
if (ekin < m_eth && code == "GeomNav0003") {
localSeverity = JustWarning;
track->SetTrackStatus(fStopAndKill);
}

bool res = false;
Expand Down

0 comments on commit a41f340

Please sign in to comment.