20#include <G4UIcmdWithABool.hh>
21#include <G4UIcmdWithADouble.hh>
22#include <G4UIcmdWithAString.hh>
23#include <G4UIcmdWithAnInteger.hh>
24#include <G4UIdirectory.hh>
28 : fRegionsManager(regionsManager)
37 : fRegionsManager2(regionsManager)
75 fDirectory->SetGuidance(
"TGeant4 regions commands.");
77 fSetCheckCmd =
new G4UIcmdWithABool(
"/mcRegions/check",
this);
79 "Switch on|off check if region properties are consistent");
80 fSetCheckCmd->SetGuidance(
"with energy cuts defined in limits");
82 fSetCheckCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle, G4State_EventProc);
84 fSetPrintCmd =
new G4UIcmdWithABool(
"/mcRegions/print",
this);
85 fSetPrintCmd->SetGuidance(
"Switch on|off printing of all regions properties");
87 fSetPrintCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle, G4State_EventProc);
89 fSetSaveCmd =
new G4UIcmdWithABool(
"/mcRegions/save",
this);
90 fSetSaveCmd->SetGuidance(
"Switch on|off saving of all regions properties in a file");
92 fSetSaveCmd->AvailableForStates(G4State_PreInit, G4State_Init);
94 fSetFileNameCmd =
new G4UIcmdWithAString(
"/mcRegions/setFileName",
this);
100 new G4UIcmdWithAnInteger(
"/mcRegions/setRangePrecision",
this);
102 "Set the precision for calculating ranges");
112 new G4UIcmdWithABool(
"/mcRegions/applyForElectron",
this);
118 new G4UIcmdWithABool(
"/mcRegions/applyForPositron",
this);
125 "Switch on|off applying range cuts for protons");
131 fDumpRegionCmd =
new G4UIcmdWithAString(
"/mcRegions/dumpRegion",
this);
135 fDumpRegionCmd->AvailableForStates(G4State_Idle, G4State_EventProc);
138 new G4UIcmdWithADouble(
"/mcRegions/setEnergyTolerance",
this);
140 "Set the tolerance (relative) for comparing energy cut values");
144 fSetLoadCmd =
new G4UIcmdWithABool(
"/mcRegions/load",
this);
145 fSetLoadCmd->SetGuidance(
"Switch on|off loading of all regions cuts & ranges from a file");
147 fSetLoadCmd->AvailableForStates(G4State_PreInit, G4State_Init);
150 fSetFromG4TableCmd->SetGuidance(
"Switch on|off printing or saving regions properties\n"
151 "from production cuts table.\n"
152 "Must be called before \"print\" or \"save\" command.");
206 "/mcRegions/setRangePrecision has no effect"
207 " when production cuts are set by energy.");
Definition of the TG4Globals class and basic container types.
Definition of the TG4RegionsManager2 class.
Definition of the TG4RegionsManager class.
Definition of the TG4RegionsMessenger class.
static void Warning(const TString &className, const TString &methodName, const TString &text)
Manager class for setting VMC cuts in energy in G4 regions.
Manager class for converting VMC cuts in energy in G4 regions.
void SetLoad(G4bool isLoad)
void SetEnergyTolerance(G4double tolerance)
Set the tolerance (relative) for comparing energy cut values.
void SetFromG4Table(G4bool isG4Table)
Set the option to print/save cuts from G4 table.
void SetRangePrecision(G4int precision)
Set the precision for calculating ranges.
G4UIcmdWithAString * fSetFileNameCmd
command: /mcRegions/setFileName fileName
TG4RegionsManager * fRegionsManager
associated class
G4UIcmdWithABool * fApplyForPositronCmd
command: /mcRegions/applyForPositron true|false
G4UIcmdWithADouble * fSetEnergyToleranceCmd
command: /mcRegions/setEnergyTolerance value
G4UIcmdWithABool * fSetPrintCmd
command: /mcRegions/print [true|false]
G4UIcmdWithAnInteger * fSetRangePrecisionCmd
command: /mcRegions/setRangePrecision value
G4UIcmdWithAString * fDumpRegionCmd
command: /mcRegions/dump [lvName]
G4UIdirectory * fDirectory
command directory
G4UIcmdWithABool * fApplyForElectronCmd
command: /mcRegions/applyForElectron true|false
G4UIcmdWithABool * fSetSaveCmd
command: /mcRegions/save [true|false]
G4UIcmdWithABool * fApplyForProtonCmd
command: /mcRegions/applyForProton true|false
TG4RegionsMessenger()=delete
G4UIcmdWithABool * fApplyForGammaCmd
command: /mcRegions/applyForGamma true|false
G4UIcmdWithABool * fSetLoadCmd
command: /mcRegions/load [true|false]
TG4RegionsManager2 * fRegionsManager2
associated class
virtual void SetNewValue(G4UIcommand *command, G4String string)
G4UIcmdWithABool * fSetFromG4TableCmd
command: /mcRegions/fromG4Table [true|false]
G4UIcmdWithABool * fSetCheckCmd
command: /mcRegions/check [true|false]
virtual ~TG4RegionsMessenger()
void SetPrint(G4bool isPrint)
Set the option to print all regions.
void SetApplyForGamma(G4bool applyForGamma)
Set the option to apply range cuts for gamma (default is true)
void SetApplyForPositron(G4bool applyForPositron)
Set the option to apply range cuts for e+ (default is true)
void SetApplyForProton(G4bool applyForProton)
Set the option to apply range cuts for proton (default is true)
void SetCheck(G4bool isCheck)
Set the option to perform consistency check (by default false)
void SetFileName(const G4String &fileName)
Set the file name for regions output.
void SetApplyForElectron(G4bool applyForElectron)
Set the option to apply range cuts for e- (default is true)
void SetSave(G4bool isSave)
Set the option to save all regions in a file.