diff --git a/src/RMGSteppingAction.cc b/src/RMGSteppingAction.cc index 98b8645e..cfe4aa15 100644 --- a/src/RMGSteppingAction.cc +++ b/src/RMGSteppingAction.cc @@ -16,11 +16,11 @@ #include "RMGSteppingAction.hh" #include "G4GenericMessenger.hh" -#include "G4Step.hh" #include "G4Ions.hh" +#include "G4Step.hh" -#include "RMGLog.hh" #include "RMGEventAction.hh" +#include "RMGLog.hh" RMGSteppingAction::RMGSteppingAction(RMGEventAction* eventaction) : fEventAction(eventaction) { @@ -36,7 +36,8 @@ void RMGSteppingAction::UserSteppingAction(const G4Step* step) { auto track = step->GetTrack(); auto particle_type = track->GetDefinition()->GetParticleType(); - if (particle_type == "nucleus" && track->GetParentID() > 0 && track->GetKineticEnergy() < 0.1*CLHEP::keV) { + if (particle_type == "nucleus" && track->GetParentID() > 0 && + track->GetKineticEnergy() < 0.1 * CLHEP::keV) { auto ion = static_cast(track->GetDefinition()); double lifetime = ion->GetPDGLifeTime(); double excitation = ion->GetExcitationEnergy(); @@ -44,7 +45,7 @@ void RMGSteppingAction::UserSteppingAction(const G4Step* step) { // inspired by G4RadioactiveDecay::IsApplicable if (lifetime > fDaughterKillLifetime && excitation <= 0) { RMGLog::OutFormat(RMGLog::debug, "Killing daughter nucleus {} (lifetime={} us)", - ion->GetParticleName(), lifetime/CLHEP::us); + ion->GetParticleName(), lifetime / CLHEP::us); // note: UserSteppingAction is not called after step 0. Secondaries might be generated if // RadioactiveDecay takes place at step 1. @@ -60,8 +61,8 @@ void RMGSteppingAction::SetDaughterKillLifetime(double max_lifetime) { fDaughterKillLifetime = max_lifetime; if (fDaughterKillLifetime > 0) { RMGLog::OutFormat(RMGLog::summary, - "Enabled killing of daughter nuclei with a lifetime longer than {} us.", - fDaughterKillLifetime/CLHEP::us); + "Enabled killing of daughter nuclei with a lifetime longer than {} us.", + fDaughterKillLifetime / CLHEP::us); } } @@ -70,9 +71,13 @@ void RMGSteppingAction::DefineCommands() { fMessenger = std::make_unique(this, "/RMG/Processes/Stepping/", "Commands for controlling physics processes"); - fMessenger->DeclareMethodWithUnit("DaughterNucleusMaxLifetime", "us", &RMGSteppingAction::SetDaughterKillLifetime) - .SetGuidance("Determines which unstable daughter nuclei will be killed, if they are at rest, depending on their lifetime.") - .SetGuidance("This applies to the defined lifetime of the nucleus, and not on the sampled actual halflife of the simulated particle.") + fMessenger + ->DeclareMethodWithUnit("DaughterNucleusMaxLifetime", "us", + &RMGSteppingAction::SetDaughterKillLifetime) + .SetGuidance("Determines which unstable daughter nuclei will be killed, if they are at rest, " + "depending on their lifetime.") + .SetGuidance("This applies to the defined lifetime of the nucleus, and not on the sampled " + "actual halflife of the simulated particle.") .SetGuidance("Set to -1 to disable this feature.") .SetParameterName("max_lifetime", false) .SetDefaultValue("-1")