41 :fMaterialsManager(exrdmMat)
44 fMaterialDir->
SetGuidance(
" Controls for defining geometry materials" );
46 fAddCmd =
new G4UIcommand(
"/geometry/material/add",
this);
48 " add a mateial by name, composition formula and density");
50 fAddCmd->
SetGuidance(
" formula (e.g. H2-O for water");
51 fAddCmd->
SetGuidance(
" density (in units of g/cm3) : den>0.");
67 StatePrm->
SetGuidance(
"state of the material (optional): gas | solid");
72 TempPrm->
SetGuidance(
"temperature of the material in Kelvin (optional)");
77 PresPrm->
SetGuidance(
"pressure of the gas material in Pascal (optional)");
82 fDeleteIntCmd->
SetGuidance(
"Delete material by its index");
84 fDeleteIntCmd->
SetRange(
"matIdx>=0 && matIdx<100");
88 fDeleteNameCmd->
SetGuidance(
"Delete material by its name.");
93 fListCmd->
SetGuidance(
"List the materials defined");
102 delete fDeleteIntCmd;
103 delete fDeleteNameCmd;
111 if (command == fDeleteIntCmd) {
114 }
else if (command == fDeleteNameCmd) {
117 }
else if (command == fListCmd) {
120 }
else if (command == fAddCmd) {
123 char mat[80], form[80], stat[10];
126 const char* t = newValue;
127 std::istringstream is(t);
128 is >>mat >>form >>den >>stat >> tem >> pres ;
138 fMaterialsManager->
AddMaterial(material,formula,den*
g/
cm3,state,tem,pres);