 |
Belle II Software
release-05-01-25
|
11 #include <simulation/kernel/ExtMessenger.h>
12 #include <simulation/kernel/ExtStepLengthLimitProcess.h>
13 #include <simulation/kernel/ExtMagFieldLimitProcess.h>
14 #include <simulation/kernel/ExtEnergyLoss.h>
16 #include <G4UIdirectory.hh>
17 #include <G4UIcmdWithADoubleAndUnit.hh>
18 #include <G4UIcmdWithADouble.hh>
20 #include <framework/logging/Logger.h>
24 using namespace Belle2::Simulation;
27 m_stepLengthAction(lAct),
28 m_magFieldAction(mAct),
29 m_energyLossAction(eAct)
32 m_dir =
new G4UIdirectory(
"/geant4e/");
33 m_dir->SetGuidance(
"GEANT4e control commands");
34 m_dirLimits =
new G4UIdirectory(
"/geant4e/limits/");
35 m_dirLimits->SetGuidance(
"GEANT4e commands to limit the step");
40 m_stepLengthLimitCmd->AvailableForStates(G4State_PreInit, G4State_Idle, G4State_GeomClosed, G4State_EventProc);
44 m_magFieldLimitCmd->AvailableForStates(G4State_PreInit, G4State_Idle, G4State_GeomClosed, G4State_EventProc);
46 m_energyLossCmd =
new G4UIcmdWithADouble(
"/geant4e/limits/energyLoss",
this);
47 m_energyLossCmd->SetGuidance(
"Limit the length of a step (fractional KE loss)");
48 m_energyLossCmd->AvailableForStates(G4State_PreInit, G4State_Idle, G4State_GeomClosed, G4State_EventProc);
51 G4UIcommand* command =
nullptr;
69 B2DEBUG(200,
"ExtMessenger::SetNewValue() StepLengthAction SetStepLimit "
73 B2DEBUG(200,
"ExtMessenger::SetNewValue() MagFieldAction SetStepLimit "
77 B2DEBUG(200,
"ExtMessenger::SetNewValue() EnergyLossAction SetStepLimit "
void SetNewValue(G4UIcommand *, G4String)
Process a geant4 UI command.
G4UIcmdWithADouble * m_energyLossCmd
defines UI command "/geant4e/limits/energyLoss" to limit step length
Define physics process to calculate energy loss without fluctuations.
~ExtMessenger()
destructor
G4UIcmdWithADoubleAndUnit * m_stepLengthLimitCmd
Defines UI command "/geant4e/limits/stepLength" to limit step length.
void SetStepLimit(G4double val)
Sets the step limit.
Defines the physics process that avoids hit invocation in sensitive volumes.
Defines the physics process that avoids hit invocation in sensitive volumes.
Abstract base class for different kinds of events.
void SetStepLimit(G4double val)
Sets the step limit.
G4UIcmdWithADouble * m_magFieldLimitCmd
Defines UI command "/geant4e/limits/magField" to limit step length.
G4UIdirectory * m_dirLimits
Defines UI directory for "/geant4e/limits/" commands.
void SetStepLimit(G4double)
Sets the step limit for this process.
ExtMagFieldLimitProcess * m_magFieldAction
Process that limits the geant4e step length in magnetic field.
ExtStepLengthLimitProcess * m_stepLengthAction
Process that limits the geant4e step length.
G4UIdirectory * m_dir
Defines UI directory for "/geant4e/" commands.
ExtEnergyLoss * m_energyLossAction
Process that limits the geant4e step length due to energy loss.