40#include "G4UIcmdWithADouble.hh"
41#include "G4UIcmdWithADoubleAndUnit.hh"
42#include "G4UIcommand.hh"
43#include "G4UIdirectory.hh"
58 G4UIparameter* qmag =
new G4UIparameter(
"qmag",
'd',
false);
59 qmag->SetGuidance(
"Magnetic charge");
60 qmag->SetDefaultValue(
"1");
63 G4UIparameter* q =
new G4UIparameter(
"qelec",
'd',
false);
64 q->SetGuidance(
"Electric charge charge");
65 q->SetDefaultValue(
"0");
68 G4UIparameter* mass =
new G4UIparameter(
"mass",
'd',
false);
69 mass->SetGuidance(
"mass");
70 mass->SetParameterRange(
"mass>0.");
71 qmag->SetDefaultValue(
"100");
74 G4UIparameter* unit =
new G4UIparameter(
"unit",
's',
false);
76 qmag->SetDefaultValue(
"GeV");
79 fMCmd =
new G4UIcmdWithADouble(
"/monopole/magCharge",
this);
80 fMCmd->SetGuidance(
"Set monopole magnetic charge number");
81 fMCmd->SetParameterName(
"Qmag",
false);
82 fMCmd->AvailableForStates(G4State_PreInit);
84 fZCmd =
new G4UIcmdWithADouble(
"/monopole/elCharge",
this);
85 fZCmd->SetGuidance(
"Set monopole electric charge number");
86 fZCmd->SetParameterName(
"Qel",
false);
87 fZCmd->AvailableForStates(G4State_PreInit);
89 fMassCmd =
new G4UIcmdWithADoubleAndUnit(
"/monopole/Mass",
this);
90 fMassCmd->SetGuidance(
"Set monopole fMass");
91 fMassCmd->SetParameterName(
"Mass",
false);
94 fMassCmd->AvailableForStates(G4State_PreInit);
117 std::istringstream is(newValue);
118 is >> m >> q >> mass >> unts;
119 G4String unit = unts;
120 G4double vUnit = G4UIcommand::ValueOf(unit);
125 if (command ==
fMCmd) {
128 if (command ==
fZCmd) {
Definition of the G4MonopolePhysicsMessenger class.
Definition of the G4MonopolePhysics class.
G4MonopolePhysics * fPhys
G4UIcmdWithADouble * fMCmd
G4UIcmdWithADoubleAndUnit * fMassCmd
virtual void SetNewValue(G4UIcommand *, G4String)
G4UIdirectory * fPhysicsDir
G4UIcmdWithADouble * fZCmd
G4MonopolePhysicsMessenger(G4MonopolePhysics *)
~G4MonopolePhysicsMessenger()
G4UIcommand * fPhysicsCmd
void SetMonopoleMass(G4double)
void SetElectricCharge(G4double)
void SetMagneticCharge(G4double)