44 fMaterialsManager(exrdmMat),
52 fMaterialDir->
SetGuidance(
" Controls for defining geometry materials" );
54 fAddCmd =
new G4UIcommand(
"/geometry/material/add",
this);
56 " add a mateial by name, composition formula and density");
58 fAddCmd->
SetGuidance(
" formula (e.g. H2-O for water");
59 fAddCmd->
SetGuidance(
" density (in units of g/cm3) : den>0.");
75 StatePrm->
SetGuidance(
"state of the material (optional): gas | solid");
80 TempPrm->
SetGuidance(
"temperature of the material in Kelvin (optional)");
85 PresPrm->
SetGuidance(
"pressure of the gas material in Pascal (optional)");
90 fDeleteIntCmd->
SetGuidance(
"Delete material by its index");
92 fDeleteIntCmd->
SetRange(
"matIdx>=0 && matIdx<100");
96 fDeleteNameCmd->
SetGuidance(
"Delete material by its name.");
101 fListCmd->
SetGuidance(
"List the materials defined");
110 delete fDeleteIntCmd;
111 delete fDeleteNameCmd;
119 if (command == fDeleteIntCmd) {
122 }
else if (command == fDeleteNameCmd) {
125 }
else if (command == fListCmd) {
128 }
else if (command == fAddCmd) {
131 char mat[80], form[80], stat[10];
134 const char* t = newValue;
135 std::istringstream is(t);
136 is >>mat >>form >>den >>stat >> tem >> pres ;
146 fMaterialsManager->
AddMaterial(material,formula,den*
g/
cm3,state,tem,pres);
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameter(G4UIparameter *const newParameter)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetParameterRange(const char *theRange)
Definition of the exrdmMaterialMessenger class.
exrdmMaterialMessenger(exrdmMaterial *)
virtual ~exrdmMaterialMessenger()
void AddMaterial(G4String, G4String, G4double, G4String, G4double tem=CLHEP::STP_Temperature, G4double pres=CLHEP::STP_Pressure)
Definition of the exrdmMaterial class.
void DeleteMaterial(G4int)
void SetRange(const char *rs)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)
void SetGuidance(const char *theGuidance)
virtual void SetNewValue(G4UIcommand *, G4String)