21 _cmdDir =
new G4UIdirectory(
"/GGS/userActions/lostEnergyAction/");
22 _cmdDir->SetGuidance(
"Commands for lost energy info action.");
24 _outBaseCmd =
new G4UIcmdWithAString(
"/GGS/userActions/lostEnergyAction/fileBase",
this);
25 _outBaseCmd->SetGuidance(
"Sets the base name for ROOT output file");
26 _outBaseCmd->SetGuidance(
" Can be with or without extension (.root will be used automatically)");
27 _outBaseCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
29 _outTreeCmd =
new G4UIcmdWithAString(
"/GGS/userActions/lostEnergyAction/treeName",
this);
30 _outTreeCmd->SetGuidance(
"Set the name of the TTree object in the ROOT output file.");
31 _outTreeCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
33 _energyTypeCmd =
new G4UIcmdWithAString(
"/GGS/userActions/lostEnergyAction/energyType",
this);
34 _energyTypeCmd->SetGuidance(
"Set the type of lost energy.");
35 _energyTypeCmd->SetCandidates(
"kinetic total");
36 _energyTypeCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
53 if (command == _outBaseCmd)
56 if (command == _outTreeCmd)
59 if (command == _energyTypeCmd) {
60 if (newValue ==
"kinetic")
62 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.