9#include <simulation/kernel/ExtMessenger.h>
10#include <simulation/kernel/ExtStepLengthLimitProcess.h>
11#include <simulation/kernel/ExtMagFieldLimitProcess.h>
12#include <simulation/kernel/ExtEnergyLoss.h>
14#include <G4UIdirectory.hh>
15#include <G4UIcmdWithADoubleAndUnit.hh>
16#include <G4UIcmdWithADouble.hh>
18#include <framework/logging/Logger.h>
22using namespace Belle2::Simulation;
30 m_dir =
new G4UIdirectory(
"/geant4e/");
31 m_dir->SetGuidance(
"GEANT4e control commands");
32 m_dirLimits =
new G4UIdirectory(
"/geant4e/limits/");
33 m_dirLimits->SetGuidance(
"GEANT4e commands to limit the step");
38 m_stepLengthLimitCmd->AvailableForStates(G4State_PreInit, G4State_Idle, G4State_GeomClosed, G4State_EventProc);
42 m_magFieldLimitCmd->AvailableForStates(G4State_PreInit, G4State_Idle, G4State_GeomClosed, G4State_EventProc);
44 m_energyLossCmd =
new G4UIcmdWithADouble(
"/geant4e/limits/energyLoss",
this);
45 m_energyLossCmd->SetGuidance(
"Limit the length of a step (fractional KE loss)");
46 m_energyLossCmd->AvailableForStates(G4State_PreInit, G4State_Idle, G4State_GeomClosed, G4State_EventProc);
49 G4UIcommand* command =
nullptr;
67 B2DEBUG(200,
"ExtMessenger::SetNewValue() StepLengthAction SetStepLimit "
71 B2DEBUG(200,
"ExtMessenger::SetNewValue() MagFieldAction SetStepLimit "
75 B2DEBUG(200,
"ExtMessenger::SetNewValue() EnergyLossAction SetStepLimit "
Define physics process to calculate energy loss without fluctuations.
Defines the physics process that avoids hit invocation in sensitive volumes.
~ExtMessenger()
destructor
G4UIcmdWithADouble * m_magFieldLimitCmd
Defines UI command "/geant4e/limits/magField" to limit step length.
ExtMessenger(ExtStepLengthLimitProcess *, ExtMagFieldLimitProcess *, ExtEnergyLoss *)
constructor
G4UIdirectory * m_dir
Defines UI directory for "/geant4e/" commands.
G4UIcmdWithADoubleAndUnit * m_stepLengthLimitCmd
Defines UI command "/geant4e/limits/stepLength" to limit step length.
void SetNewValue(G4UIcommand *, G4String)
Process a geant4 UI command.
ExtEnergyLoss * m_energyLossAction
Process that limits the geant4e step length due to energy loss.
ExtStepLengthLimitProcess * m_stepLengthAction
Process that limits the geant4e step length.
G4UIcmdWithADouble * m_energyLossCmd
defines UI command "/geant4e/limits/energyLoss" to limit step length
ExtMagFieldLimitProcess * m_magFieldAction
Process that limits the geant4e step length in magnetic field.
G4UIdirectory * m_dirLimits
Defines UI directory for "/geant4e/limits/" commands.
Defines the physics process that avoids hit invocation in sensitive volumes.
Abstract base class for different kinds of events.