61 paiCmd =
new G4UIcommand(
"/process/em/AddPAIRegion",
this);
62 paiCmd->
SetGuidance(
"Activate PAI in the G4Region.");
63 paiCmd->
SetGuidance(
" partName : particle name (default - all)");
77 ptype->SetParameterCandidates(
"pai PAI PAIphoton");
79 mscoCmd =
new G4UIcommand(
"/process/em/AddEmRegion",
this);
80 mscoCmd->
SetGuidance(
"Add optional EM configuration for a G4Region.");
82 mscoCmd->
SetGuidance(
" emType : G4EmStandard, G4EmStandard_opt1, ...");
91 mtype->SetParameterCandidates(
"G4EmStandard G4EmStandard_opt1 G4EmStandard_opt2 G4EmStandard_opt3 G4EmStandard_opt4 G4EmStandardGS G4EmStandardSS G4EmLivermore G4EmPenelope G4RadioactiveDecay");
94 SubSecCmd->
SetGuidance(
"Enable subcut generation per region.");
99 StepFuncCmd =
new G4UIcommand(
"/process/eLoss/StepFunction",
this);
100 StepFuncCmd->
SetGuidance(
"Set the energy loss step limitation parameters for e+-.");
101 StepFuncCmd->
SetGuidance(
" dRoverR : max Range variation per step");
102 StepFuncCmd->
SetGuidance(
" finalRange: range for final step");
103 StepFuncCmd->
SetGuidance(
" unit : unit of finalRange");
108 dRoverRPrm->SetParameterRange(
"dRoverR>0. && dRoverR<=1.");
111 auto finalRangePrm =
new G4UIparameter(
"finalRange",
'd',
false);
112 finalRangePrm->SetParameterRange(
"finalRange>0.");
116 unitPrm->SetDefaultUnit(
"mm");
119 StepFuncCmd1 =
new G4UIcommand(
"/process/eLoss/StepFunctionMuHad",
this);
120 StepFuncCmd1->
SetGuidance(
"Set the energy loss step limitation parameters for muon/hadron.");
121 StepFuncCmd1->
SetGuidance(
" dRoverR : max Range variation per step");
122 StepFuncCmd1->
SetGuidance(
" finalRange: range for final step");
126 auto dRoverRPrm1 =
new G4UIparameter(
"dRoverRMuHad",
'd',
false);
127 dRoverRPrm1->SetParameterRange(
"dRoverRMuHad>0. && dRoverRMuHad<=1.");
130 auto finalRangePrm1 =
new G4UIparameter(
"finalRangeMuHad",
'd',
false);
131 finalRangePrm1->SetParameterRange(
"finalRangeMuHad>0.");
135 unitPrm1->SetDefaultValue(
"mm");
138 StepFuncCmd2 =
new G4UIcommand(
"/process/eLoss/StepFunctionLightIons",
this);
139 StepFuncCmd2->
SetGuidance(
"Set the energy loss step limitation parameters for light ions.");
140 StepFuncCmd2->
SetGuidance(
" dRoverR : max Range variation per step");
141 StepFuncCmd2->
SetGuidance(
" finalRange: range for final step");
145 auto dRoverRPrm2 =
new G4UIparameter(
"dRoverRLIons",
'd',
false);
146 dRoverRPrm2->SetParameterRange(
"dRoverRLIons>0. && dRoverRLIons<=1.");
149 auto finalRangePrm2 =
new G4UIparameter(
"finalRangeLIons",
'd',
false);
150 finalRangePrm2->SetParameterRange(
"finalRangeLIons>0.");
154 unitPrm2->SetDefaultValue(
"mm");
157 StepFuncCmd3 =
new G4UIcommand(
"/process/eLoss/StepFunctionIons",
this);
158 StepFuncCmd3->
SetGuidance(
"Set the energy loss step limitation parameters for ions.");
159 StepFuncCmd3->
SetGuidance(
" dRoverR : max Range variation per step");
160 StepFuncCmd3->
SetGuidance(
" finalRange: range for final step");
164 auto dRoverRPrm3 =
new G4UIparameter(
"dRoverRIons",
'd',
false);
165 dRoverRPrm3->SetParameterRange(
"dRoverRIons>0. && dRoverRIons<=1.");
168 auto finalRangePrm3 =
new G4UIparameter(
"finalRangeIons",
'd',
false);
169 finalRangePrm3->SetParameterRange(
"finalRangeIons>0.");
173 unitPrm3->SetDefaultValue(
"mm");
176 bfCmd =
new G4UIcommand(
"/process/em/setBiasingFactor",
this);
177 bfCmd->
SetGuidance(
"Set factor for the process cross section.");
180 bfCmd->
SetGuidance(
" flagFact : flag to change weight");
193 fiCmd =
new G4UIcommand(
"/process/em/setForcedInteraction",
this);
194 fiCmd->
SetGuidance(
"Set factor for the process cross section.");
197 fiCmd->
SetGuidance(
" tlength : fixed target length");
199 fiCmd->
SetGuidance(
" tflag : flag to change weight");
210 tlength->SetParameterRange(
"tlength>0");
214 unitT->SetDefaultUnit(
"mm");
218 flagT->SetDefaultValue(
true);
221 bsCmd =
new G4UIcommand(
"/process/em/setSecBiasing",
this);
222 bsCmd->
SetGuidance(
"Set bremsstrahlung or delta-e- splitting/Russian roulette per region.");
225 bsCmd->
SetGuidance(
" bFactor : number of split gamma or probability of Russian roulette");
226 bsCmd->
SetGuidance(
" bEnergy : max energy of a secondary for this biasing method");
244 bUnit->SetDefaultUnit(
"MeV");
247 dirSplitCmd =
new G4UIcmdWithABool(
"/process/em/setDirectionalSplitting",
this);
248 dirSplitCmd->
SetGuidance(
"Enable directional brem splitting");
258 dirSplitTargetCmd->
SetGuidance(
"Position of arget for directional splitting");
262 dirSplitRadiusCmd->
SetGuidance(
"Radius of target for directional splitting");
292 G4bool physicsModified =
false;
294 if (command == paiCmd) {
296 std::istringstream is(newValue);
297 is >> s1 >> s2 >> s3;
299 }
else if (command == mscoCmd) {
301 std::istringstream is(newValue);
304 }
else if (command == StepFuncCmd || command == StepFuncCmd1 || command == StepFuncCmd2 || command == StepFuncCmd3) {
307 std::istringstream is(newValue);
308 is >> v1 >> v2 >> unt;
310 if(command == StepFuncCmd) {
312 }
else if(command == StepFuncCmd1) {
314 }
else if(command == StepFuncCmd2) {
319 physicsModified =
true;
320 }
else if (command == SubSecCmd) {
322 }
else if (command == bfCmd) {
325 std::istringstream is(newValue);
326 is >> s0 >> v1 >> s1;
328 if(s1 ==
"true") { yes =
true; }
330 physicsModified =
true;
331 }
else if (command == fiCmd) {
333 G4String s1(
""),s2(
""),s3(
""),unt(
"mm");
334 std::istringstream is(newValue);
335 is >> s1 >> s2 >> v1 >> unt >> s3;
337 if(s3 ==
"true") { yes =
true; }
340 physicsModified =
true;
341 }
else if (command == bsCmd) {
344 std::istringstream is(newValue);
345 is >> s1 >> s2 >> fb >> en >> unt;
348 physicsModified =
true;
349 }
else if (command == qeCmd) {
351 }
else if (command == dirSplitCmd) {
354 physicsModified =
true;
355 }
else if (command == dirSplitTargetCmd) {
358 physicsModified =
true;
359 }
else if (command == dirSplitRadiusCmd) {
362 physicsModified =
true;
365 if(physicsModified) {