20 _cmdDir =
new G4UIdirectory(
"/GGS/userActions/lostEnergyAction/");
21 _cmdDir->SetGuidance(
"Commands for lost energy info action.");
23 _outBaseCmd =
new G4UIcmdWithAString(
"/GGS/userActions/lostEnergyAction/fileBase",
this);
24 _outBaseCmd->SetGuidance(
"Sets the base name for ROOT output file");
25 _outBaseCmd->SetGuidance(
" Can be with or without extension (.root will be used automatically)");
26 _outBaseCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
28 _outTreeCmd =
new G4UIcmdWithAString(
"/GGS/userActions/lostEnergyAction/treeName",
this);
29 _outTreeCmd->SetGuidance(
"Set the name of the TTree object in the ROOT output file.");
30 _outTreeCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
32 _energyTypeCmd =
new G4UIcmdWithAString(
"/GGS/userActions/lostEnergyAction/energyType",
this);
33 _energyTypeCmd->SetGuidance(
"Set the type of lost energy.");
34 _energyTypeCmd->SetCandidates(
"kinetic total");
35 _energyTypeCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
51 if (command == _outBaseCmd)
54 if (command == _outTreeCmd)
57 if (command == _energyTypeCmd) {
58 if (newValue ==
"kinetic")
60 if (newValue ==
"total")
void SetKineticAsLostEnergy()
Sets the kinetic energy as lost energy.
void SetOutputFileBase(const std::string &outFileBase)
Sets the output file base name.
void SetNewValue(G4UIcommand *command, G4String newValue)
Override of SetNewValue method.
~GGSLostEnergyMessenger()
Destructor.
void SetOutputTreeName(const std::string &outTreeName)
Sets the output tree name.
GGSLostEnergyMessenger(GGSLostEnergyAction *action)
Constructor.
void SetTotalAsLostEnergy()
Sets the total energy as lost energy.
Computes the lost energy due to particles escaping the world volume.