From 3a8ffe2a2c8389624124182d6f61c1d02688a103 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 07:46:14 +0000 Subject: [PATCH] style: pre-commit fixes --- src/RMGSteppingAction.cc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/RMGSteppingAction.cc b/src/RMGSteppingAction.cc index 98b8645..cfe4aa1 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")