56 matDir->SetGuidance(
"Commands for materials");
59 verCmd->SetGuidance(
"Set verbose level.");
61 verCmd->SetToBeBroadcasted(
false);
64 nistDir->SetGuidance(
"Commands for the nist dataBase");
67 prtElmCmd->SetGuidance(
"print element(s) in dataBase.");
68 prtElmCmd->SetGuidance(
"symbol = element.");
69 prtElmCmd->SetGuidance(
"all = all elements.");
70 prtElmCmd->SetParameterName(
"symbol",
true);
71 prtElmCmd->SetDefaultValue(
"all");
73 prtElmCmd->SetToBeBroadcasted(
false);
76 przElmCmd->SetGuidance(
"print element Z in dataBase.");
77 przElmCmd->SetGuidance(
"0 = all elements.");
78 przElmCmd->SetParameterName(
"Z",
true);
79 przElmCmd->SetDefaultValue(0);
80 przElmCmd->SetRange(
"0<=Z && Z<108");
82 przElmCmd->SetToBeBroadcasted(
false);
85 lisMatCmd->SetGuidance(
"Materials in Geant4 dataBase.");
86 lisMatCmd->SetGuidance(
"simple - simple NIST materials.");
87 lisMatCmd->SetGuidance(
"compound - compound NIST materials.");
88 lisMatCmd->SetGuidance(
"hep - HEP materials.");
89 lisMatCmd->SetGuidance(
"bio - biomedical materials.");
90 lisMatCmd->SetGuidance(
"all - list of all Geant4 materials.");
91 lisMatCmd->SetParameterName(
"matlist",
true);
93 lisMatCmd->SetDefaultValue(
"all");
95 lisMatCmd->SetToBeBroadcasted(
false);
98 g4Dir->SetGuidance(
"Commands for G4MaterialTable");
101 g4ElmCmd->SetGuidance(
"print Element from G4ElementTable.");
102 g4ElmCmd->SetGuidance(
"all - all elements.");
103 g4ElmCmd->SetParameterName(
"elm",
true);
104 g4ElmCmd->SetDefaultValue(
"all");
107 g4MatCmd->SetGuidance(
"print Material from G4MaterialTable.");
108 g4MatCmd->SetGuidance(
"all - all materials");
109 g4MatCmd->SetParameterName(
"pmat",
true);
110 g4MatCmd->SetDefaultValue(
"all");
112 g4MatCmd->SetToBeBroadcasted(
false);
115 g4DensCmd->SetGuidance(
"print Material from G4DensityEffectData.");
116 g4DensCmd->SetGuidance(
"all - all materials");
117 g4DensCmd->SetParameterName(
"dmat",
true);
118 g4DensCmd->SetDefaultValue(
"all");
120 g4DensCmd->SetToBeBroadcasted(
false);
123 densCmd->SetGuidance(
"enable accurate computation of density effect.");
124 densCmd->SetGuidance(
"all - all materials.");
125 densCmd->SetParameterName(
"dens",
true);
126 densCmd->SetDefaultValue(
"all");
128 lisMatCmd->SetToBeBroadcasted(
false);
131 adensCmd->SetGuidance(
"disable accurate computation of density effect.");
132 adensCmd->SetGuidance(
"all - all materials.");
133 adensCmd->SetParameterName(
"dens",
true);
134 adensCmd->SetDefaultValue(
"all");
136 adensCmd->SetToBeBroadcasted(
false);
138 fPosiCmd =
new G4UIcommand(
"/material/g4/ortoPositroniumFraction",
this);
139 fPosiCmd->SetGuidance(
"defined orto-positronium fraction for positron annihilation AtRest.");
140 fPosiCmd->SetGuidance(
"via material name, all - all materials.");
142 fPosiCmd->SetToBeBroadcasted(
false);
145 fPosiCmd->SetParameter(p1);
148 p2->SetParameterRange(
"fraction>=0. && fraction <=1.");
149 fPosiCmd->SetParameter(p2);
178 if (command == verCmd) {
179 manager->SetVerbose(verCmd->GetNewIntValue(newValue));
181 else if (command == prtElmCmd) {
182 manager->PrintElement(newValue);
184 else if (command == przElmCmd) {
185 G4int Z = przElmCmd->GetNewIntValue(newValue);
186 if (Z >= 0 && Z < 108) {
187 manager->PrintElement(Z);
190 else if (command == lisMatCmd) {
191 manager->ListMaterials(newValue);
193 else if (command == g4ElmCmd) {
194 manager->PrintG4Element(newValue);
196 else if (command == g4MatCmd) {
197 manager->PrintG4Material(newValue);
199 else if (command == g4DensCmd) {
202 else if (command == densCmd) {
203 manager->SetDensityEffectCalculatorFlag(newValue,
true);
205 else if (command == adensCmd) {
206 manager->SetDensityEffectCalculatorFlag(newValue,
false);
208 else if (command == fPosiCmd) {
211 std::istringstream ss(newValue);
214 if (mnam ==
"all" || mnam ==
"none") {
215 if (mnam ==
"none" || f < 0.0) { f = 0.0; }
217 for (
auto const & mat : *mtable ) {
218 mat->GetIonisation()->SetOrtoPositroniumFraction(f);
222 auto mat = manager->FindOrBuildMaterial(mnam,
true);
223 if (
nullptr != mat) {
224 mat->GetIonisation()->SetOrtoPositroniumFraction(f);