Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4EnergyLossMessenger.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// $Id$
27//
28// -------------------------------------------------------------------
29//
30// GEANT4 Class file
31//
32// File name: G4EnergyLossMessenger
33//
34// Author: Michel Maire
35//
36// Creation date: 17-03-2011 (original version of 22-06-2000)
37//
38// Modifications:
39// 10-01-06 SetStepLimits -> SetStepFunction (V.Ivanchenko)
40// 10-01-06 PreciseRange -> CSDARange (V.Ivanchenko)
41// 10-05-06 Add command MscStepLimit (V.Ivanchenko)
42// 10-10-06 Add DEDXBinning command (V.Ivanchenko)
43// 07-02-07 Add MscLateralDisplacement command (V.Ivanchenko)
44// 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
45// 15-03-07 Send a message "/run/physicsModified" if reinitialisation
46// is needed after the command (V.Ivanchenko)
47// 16-03-07 modify /process/eLoss/minsubsec command (V.Ivanchenko)
48// 18-05-07 add /process/msc directory and commands (V.Ivanchenko)
49// 11-03-08 add /process/em directory and commands (V.Ivanchenko)
50//
51// -------------------------------------------------------------------
52//
53
54//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
56
58
59#include "G4UIdirectory.hh"
60#include "G4UIcommand.hh"
61#include "G4UIparameter.hh"
62#include "G4UIcmdWithABool.hh"
64#include "G4UIcmdWithADouble.hh"
66#include "G4UIcmdWithAString.hh"
67#include "G4EmProcessOptions.hh"
68#include "G4UImanager.hh"
69#include "G4MscStepLimitType.hh"
70#include "G4EmProcessOptions.hh"
71
72#include <sstream>
73
74//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
75
77{
78 opt = 0;
79 eLossDirectory = new G4UIdirectory("/process/eLoss/");
80 eLossDirectory->SetGuidance("Commands for EM processes.");
81 mscDirectory = new G4UIdirectory("/process/msc/");
82 mscDirectory->SetGuidance("Commands for EM scattering processes.");
83 emDirectory = new G4UIdirectory("/process/em/");
84 emDirectory->SetGuidance("General commands for EM processes.");
85
86 RndmStepCmd = new G4UIcmdWithABool("/process/eLoss/useCutAsFinalRange",this);
87 RndmStepCmd->SetGuidance("Use cut in range as a final range");
88 RndmStepCmd->SetParameterName("choice",true);
89 RndmStepCmd->SetDefaultValue(false);
91
92 EnlossFlucCmd = new G4UIcmdWithABool("/process/eLoss/fluct",this);
93 EnlossFlucCmd->SetGuidance("Switch true/false the energy loss fluctuations.");
94 EnlossFlucCmd->SetParameterName("choice",true);
95 EnlossFlucCmd->SetDefaultValue(true);
97
98 SubSecCmd = new G4UIcmdWithABool("/process/eLoss/subsec",this);
99 SubSecCmd->SetGuidance("Switch true/false the subcutoff generation.");
100 SubSecCmd->SetParameterName("choice",true);
101 SubSecCmd->SetDefaultValue(true);
103
104 MinSubSecCmd = new G4UIcmdWithADouble("/process/eLoss/minsubsec",this);
105 MinSubSecCmd->SetGuidance("Set the ratio subcut/cut ");
106 MinSubSecCmd->SetParameterName("rcmin",true);
108
109 StepFuncCmd = new G4UIcommand("/process/eLoss/StepFunction",this);
110 StepFuncCmd->SetGuidance("Set the energy loss step limitation parameters.");
111 StepFuncCmd->SetGuidance(" dRoverR : max Range variation per step");
112 StepFuncCmd->SetGuidance(" finalRange: range for final step");
113
114 G4UIparameter* dRoverRPrm = new G4UIparameter("dRoverR",'d',false);
115 dRoverRPrm->SetGuidance("max Range variation per step (fractional number)");
116 dRoverRPrm->SetParameterRange("dRoverR>0. && dRoverR<=1.");
117 StepFuncCmd->SetParameter(dRoverRPrm);
118
119 G4UIparameter* finalRangePrm = new G4UIparameter("finalRange",'d',false);
120 finalRangePrm->SetGuidance("range for final step");
121 finalRangePrm->SetParameterRange("finalRange>0.");
122 StepFuncCmd->SetParameter(finalRangePrm);
123
124 G4UIparameter* unitPrm = new G4UIparameter("unit",'s',true);
125 unitPrm->SetGuidance("unit of finalRange");
126 unitPrm->SetDefaultValue("mm");
127 G4String unitCandidates =
129 unitPrm->SetParameterCandidates(unitCandidates);
130
131 StepFuncCmd->SetParameter(unitPrm);
133
134 MinEnCmd = new G4UIcmdWithADoubleAndUnit("/process/eLoss/minKinEnergy",this);
135 MinEnCmd->SetGuidance("Set the min kinetic energy");
136 MinEnCmd->SetParameterName("emin",true);
137 MinEnCmd->SetUnitCategory("Energy");
139
140 MaxEnCmd = new G4UIcmdWithADoubleAndUnit("/process/eLoss/maxKinEnergy",this);
141 MaxEnCmd->SetGuidance("Set the max kinetic energy");
142 MaxEnCmd->SetParameterName("emax",true);
143 MaxEnCmd->SetUnitCategory("Energy");
145
146 IntegCmd = new G4UIcmdWithABool("/process/eLoss/integral",this);
147 IntegCmd->SetGuidance("Switch true/false the integral option");
148 IntegCmd->SetParameterName("integ",true);
149 IntegCmd->SetDefaultValue(true);
151
152 rangeCmd = new G4UIcmdWithABool("/process/eLoss/CSDARange",this);
153 rangeCmd->SetGuidance("Switch true/false the CSDA range calculation");
154 rangeCmd->SetParameterName("range",true);
155 rangeCmd->SetDefaultValue(true);
157
158 lpmCmd = new G4UIcmdWithABool("/process/eLoss/LPM",this);
159 lpmCmd->SetGuidance("The flag of the LPM effect calculation");
160 lpmCmd->SetParameterName("lpm",true);
161 lpmCmd->SetDefaultValue(true);
163
164 splCmd = new G4UIcmdWithABool("/process/em/spline",this);
165 splCmd->SetGuidance("The flag of usage spline for Physics Vectors");
166 splCmd->SetParameterName("spl",true);
167 splCmd->SetDefaultValue(false);
169
170 aplCmd = new G4UIcmdWithABool("/process/em/applyCuts",this);
171 aplCmd->SetGuidance("The flag to Apply Cuts for gamma processes");
172 aplCmd->SetParameterName("apl",true);
173 aplCmd->SetDefaultValue(false);
175
176 deCmd = new G4UIcmdWithABool("/process/em/fluo",this);
177 deCmd->SetGuidance("The flag to enable/disable deexcitation");
178 deCmd->SetParameterName("fluoFlag",true);
179 deCmd->SetDefaultValue(false);
181
182 auCmd = new G4UIcmdWithABool("/process/em/auger",this);
183 auCmd->SetGuidance("The flag to enable/disable Auger electrons");
184 auCmd->SetParameterName("augerFlag",true);
185 auCmd->SetDefaultValue(false);
187
188 pixeCmd = new G4UIcmdWithABool("/process/em/pixe",this);
189 pixeCmd->SetGuidance("The flag to enable/disable PIXE");
190 pixeCmd->SetParameterName("pixeFlag",true);
191 pixeCmd->SetDefaultValue(false);
193
194 pixeXsCmd = new G4UIcmdWithAString("/process/em/pixeXSmodel",this);
195 pixeXsCmd->SetGuidance("The name of PIXE cross section");
196 pixeXsCmd->SetParameterName("pixeXS",true);
198
199 pixeeXsCmd = new G4UIcmdWithAString("/process/em/pixeElecXSmodel",this);
200 pixeeXsCmd->SetGuidance("The name of PIXE cross section for electron");
201 pixeeXsCmd->SetParameterName("pixeEXS",true);
203
204 deexCmd = new G4UIcommand("/process/em/deexcitation",this);
205 deexCmd->SetGuidance("Set deexcitation flags per G4Region.");
206 deexCmd->SetGuidance(" regName : G4Region name");
207 deexCmd->SetGuidance(" flagFluo : Fluorescence");
208 deexCmd->SetGuidance(" flagAuger : Auger");
209 deexCmd->SetGuidance(" flagPIXE : PIXE");
210
211 G4UIparameter* regName = new G4UIparameter("regName",'s',false);
212 deexCmd->SetParameter(regName);
213
214 G4UIparameter* flagFluo = new G4UIparameter("flagFluo",'s',false);
215 deexCmd->SetParameter(flagFluo);
216
217 G4UIparameter* flagAuger = new G4UIparameter("flagAuger",'s',false);
218 deexCmd->SetParameter(flagAuger);
219
220 G4UIparameter* flagPIXE = new G4UIparameter("flagPIXE",'s',false);
221 deexCmd->SetParameter(flagPIXE);
222
223 dedxCmd = new G4UIcmdWithAnInteger("/process/eLoss/binsDEDX",this);
224 dedxCmd->SetGuidance("Set number of bins for DEDX tables");
225 dedxCmd->SetParameterName("binsDEDX",true);
226 dedxCmd->SetDefaultValue(77);
228
229 lamCmd = new G4UIcmdWithAnInteger("/process/eLoss/binsLambda",this);
230 lamCmd->SetGuidance("Set number of bins for Lambda tables");
231 lamCmd->SetParameterName("binsL",true);
232 lamCmd->SetDefaultValue(77);
234
235 verCmd = new G4UIcmdWithAnInteger("/process/eLoss/verbose",this);
236 verCmd->SetGuidance("Set verbose level for EM physics");
237 verCmd->SetParameterName("verb",true);
238 verCmd->SetDefaultValue(1);
240
241 ver1Cmd = new G4UIcmdWithAnInteger("/process/em/verbose",this);
242 ver1Cmd->SetGuidance("Set verbose level for EM physics");
243 ver1Cmd->SetParameterName("verb1",true);
244 ver1Cmd->SetDefaultValue(1);
246
247 lllCmd = new G4UIcmdWithADouble("/process/eLoss/linLossLimit",this);
248 lllCmd->SetGuidance("Set linearLossLimit parameter");
249 lllCmd->SetParameterName("linlim",true);
251
252 labCmd = new G4UIcmdWithADouble("/process/eLoss/LambdaFactor",this);
253 labCmd->SetGuidance("Set lambdaFactor parameter for integral option");
254 labCmd->SetParameterName("Fl",true);
256
257 mscCmd = new G4UIcmdWithAString("/process/msc/StepLimit",this);
258 mscCmd->SetGuidance("Set msc step limitation type");
259 mscCmd->SetParameterName("StepLim",true);
261
262 latCmd = new G4UIcmdWithABool("/process/msc/LateralDisplacement",this);
263 latCmd->SetGuidance("Set flag of sampling of lateral displacement");
264 latCmd->SetParameterName("lat",true);
265 latCmd->SetDefaultValue(true);
267
268 frCmd = new G4UIcmdWithADouble("/process/msc/RangeFactor",this);
269 frCmd->SetGuidance("Set RangeFactor parameter for msc processes");
270 frCmd->SetParameterName("Fr",true);
271 frCmd->SetRange("Fr>0");
272 frCmd->SetDefaultValue(0.04);
274
275 fgCmd = new G4UIcmdWithADouble("/process/msc/GeomFactor",this);
276 fgCmd->SetGuidance("Set GeomFactor parameter for msc processes");
277 fgCmd->SetParameterName("Fg",true);
278 fgCmd->SetRange("Fg>0");
279 fgCmd->SetDefaultValue(3.5);
281
282 mscfCmd = new G4UIcmdWithADouble("/process/msc/FactorForAngleLimit",this);
283 mscfCmd->SetGuidance("Set factor for computation of a limit for -t (invariant trasfer)");
284 mscfCmd->SetParameterName("Fact",true);
285 mscfCmd->SetRange("Fact>0");
286 mscfCmd->SetDefaultValue(1.);
288
289 skinCmd = new G4UIcmdWithADouble("/process/msc/Skin",this);
290 skinCmd->SetGuidance("Set skin parameter for msc processes");
291 skinCmd->SetParameterName("skin",true);
293
294 angCmd = new G4UIcmdWithADoubleAndUnit("/process/msc/ThetaLimit",this);
295 angCmd->SetGuidance("Set the limit on the polar angle for msc and single scattering");
296 angCmd->SetParameterName("theta",true);
297 angCmd->SetUnitCategory("Angle");
299
300 bfCmd = new G4UIcommand("/process/em/setBiasingFactor",this);
301 bfCmd->SetGuidance("Set factor for the process cross section.");
302 bfCmd->SetGuidance(" procName : process name");
303 bfCmd->SetGuidance(" procFact : factor");
304 bfCmd->SetGuidance(" flagFact : flag to change weight");
305
306 G4UIparameter* procName = new G4UIparameter("procName",'s',false);
307 bfCmd->SetParameter(procName);
308
309 G4UIparameter* procFact = new G4UIparameter("procFact",'d',false);
310 bfCmd->SetParameter(procFact);
311
312 G4UIparameter* flagFact = new G4UIparameter("flagFact",'s',false);
313 bfCmd->SetParameter(flagFact);
315
316 fiCmd = new G4UIcommand("/process/em/setForcedInteraction",this);
317 fiCmd->SetGuidance("Set factor for the process cross section.");
318 fiCmd->SetGuidance(" procNam : process name");
319 fiCmd->SetGuidance(" regNam : region name");
320 fiCmd->SetGuidance(" tlength : fixed target length");
321 fiCmd->SetGuidance(" tflag : flag to change weight");
322
323 G4UIparameter* procNam = new G4UIparameter("procNam",'s',false);
324 fiCmd->SetParameter(procNam);
325
326 G4UIparameter* regNam = new G4UIparameter("regNam",'s',false);
327 fiCmd->SetParameter(regNam);
328
329 G4UIparameter* tlength = new G4UIparameter("tlength",'d',false);
330 fiCmd->SetParameter(tlength);
331
332 G4UIparameter* unitT = new G4UIparameter("unitT",'s',true);
333 fiCmd->SetParameter(unitT);
334 unitT->SetGuidance("unit of tlength");
335
336 G4UIparameter* flagT = new G4UIparameter("tflag",'s',true);
337 fiCmd->SetParameter(flagT);
339
340 brCmd = new G4UIcommand("/process/em/setSecBiasing",this);
341 brCmd->SetGuidance("Set bremsstrahlung or delta-electron splitting/Russian roullette per region.");
342 brCmd->SetGuidance(" bProcNam : process name");
343 brCmd->SetGuidance(" bRegNam : region name");
344 brCmd->SetGuidance(" bFactor : number of splitted gamma or probability of Russian roulette");
345 brCmd->SetGuidance(" bEnergy : max energy of a secondary for this biasing method");
346
347 G4UIparameter* bProcNam = new G4UIparameter("bProcNam",'s',false);
348 brCmd->SetParameter(bProcNam);
349
350 G4UIparameter* bRegNam = new G4UIparameter("bRegNam",'s',false);
351 brCmd->SetParameter(bRegNam);
352
353 G4UIparameter* bFactor = new G4UIparameter("bFactor",'d',false);
354 brCmd->SetParameter(bFactor);
355
356 G4UIparameter* bEnergy = new G4UIparameter("bEnergy",'d',false);
357 brCmd->SetParameter(bEnergy);
358
359 G4UIparameter* bUnit = new G4UIparameter("bUnit",'s',true);
360 brCmd->SetParameter(bUnit);
361 brCmd->SetGuidance("unit of energy");
362
364}
365
366//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
367
369{
370 delete opt;
371 delete RndmStepCmd;
372 delete EnlossFlucCmd;
373 delete SubSecCmd;
374 delete MinSubSecCmd;
375 delete StepFuncCmd;
376 delete deexCmd;
377 delete eLossDirectory;
378 delete mscDirectory;
379 delete emDirectory;
380 delete MinEnCmd;
381 delete MaxEnCmd;
382 delete IntegCmd;
383 delete rangeCmd;
384 delete lpmCmd;
385 delete splCmd;
386 delete aplCmd;
387 delete latCmd;
388 delete verCmd;
389 delete ver1Cmd;
390 delete mscCmd;
391 delete dedxCmd;
392 delete deCmd;
393 delete auCmd;
394 delete pixeCmd;
395 delete pixeXsCmd;
396 delete pixeeXsCmd;
397 delete frCmd;
398 delete fgCmd;
399 delete lllCmd;
400 delete lamCmd;
401 delete labCmd;
402 delete skinCmd;
403 delete angCmd;
404 delete mscfCmd;
405 delete bfCmd;
406 delete fiCmd;
407 delete brCmd;
408}
409
410//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
411
413{
414 if(!opt) { opt = new G4EmProcessOptions(); }
415
416 if (command == RndmStepCmd) {
417 opt->SetRandomStep(RndmStepCmd->GetNewBoolValue(newValue));
418 } else if (command == EnlossFlucCmd) {
419 opt->SetLossFluctuations(EnlossFlucCmd->GetNewBoolValue(newValue));
420 } else if(command == SubSecCmd) {
421 opt->SetSubCutoff(SubSecCmd->GetNewBoolValue(newValue));
422 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
423 } else if (command == MinSubSecCmd) {
424 opt->SetMinSubRange(MinSubSecCmd->GetNewDoubleValue(newValue));
425 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
426 } else if (command == StepFuncCmd) {
427 G4double v1,v2;
428 G4String unt;
429 std::istringstream is(newValue);
430 is >> v1 >> v2 >> unt;
431 v2 *= G4UIcommand::ValueOf(unt);
432 opt->SetStepFunction(v1,v2);
433 } else if (command == deexCmd) {
434 G4String s1 (""), s2(""), s3(""), s4("");
435 G4bool b2(false), b3(false), b4(false);
436 std::istringstream is(newValue);
437 is >> s1 >> s2 >> s3 >> s4;
438 if(s2 == "true") { b2 = true; }
439 if(s3 == "true") { b3 = true; }
440 if(s4 == "true") { b4 = true; }
441 opt->SetDeexcitationActiveRegion(s1,b2,b3,b4);
442 } else if (command == deCmd) {
443 opt->SetFluo(deCmd->GetNewBoolValue(newValue));
444 } else if (command == auCmd) {
445 opt->SetAuger(auCmd->GetNewBoolValue(newValue));
446 } else if (command == pixeCmd) {
447 opt->SetPIXE(pixeCmd->GetNewBoolValue(newValue));
448 } else if (command == pixeXsCmd) {
449 G4String name;
450 if (newValue == "ecpssr_analytical")
451 {name = "ECPSSR_Analytical";}
452 else if (newValue == "ecpssr_interpolated")
453 {name = "ECPSSR_FormFactor";}
454 else
455 {name = newValue;}
456 opt->SetPIXECrossSectionModel(name);
457 } else if (command == pixeeXsCmd) {
459 } else if (command == mscCmd) {
460 if(newValue == "Minimal")
462
463 else if(newValue == "UseDistanceToBoundary")
465
466 else if(newValue == "UseSafety")
468
469 else {
470 G4cout << "### G4EnergyLossMessenger WARNING: StepLimit type <"
471 << newValue << "> unknown!" << G4endl;
472 return;
473 }
474 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
475 } else if (command == MinEnCmd) {
476 opt->SetMinEnergy(MinEnCmd->GetNewDoubleValue(newValue));
477 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
478 } else if (command == MaxEnCmd) {
479 opt->SetMaxEnergy(MaxEnCmd->GetNewDoubleValue(newValue));
480 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
481 } else if (command == IntegCmd) {
482 opt->SetIntegral(IntegCmd->GetNewBoolValue(newValue));
483 } else if (command == rangeCmd) {
484 opt->SetBuildCSDARange(rangeCmd->GetNewBoolValue(newValue));
485 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
486 } else if (command == lpmCmd) {
487 opt->SetLPMFlag(lpmCmd->GetNewBoolValue(newValue));
488 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
489 } else if (command == splCmd) {
490 opt->SetSplineFlag(splCmd->GetNewBoolValue(newValue));
491 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
492 } else if (command == aplCmd) {
493 opt->SetApplyCuts(aplCmd->GetNewBoolValue(newValue));
494 } else if (command == latCmd) {
495 opt->SetMscLateralDisplacement(latCmd->GetNewBoolValue(newValue));
496 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
497 } else if (command == verCmd) {
498 opt->SetVerbose(verCmd->GetNewIntValue(newValue));
499 } else if (command == ver1Cmd) {
500 opt->SetVerbose(ver1Cmd->GetNewIntValue(newValue));
501 } else if (command == lllCmd) {
502 opt->SetLinearLossLimit(lllCmd->GetNewDoubleValue(newValue));
503 } else if (command == labCmd) {
504 opt->SetLambdaFactor(labCmd->GetNewDoubleValue(newValue));
505 } else if (command == skinCmd) {
506 opt->SetSkin(skinCmd->GetNewDoubleValue(newValue));
507 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
508 } else if (command == dedxCmd) {
509 opt->SetDEDXBinning(dedxCmd->GetNewIntValue(newValue));
510 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
511 } else if (command == lamCmd) {
512 opt->SetLambdaBinning(lamCmd->GetNewIntValue(newValue));
513 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
514 } else if (command == frCmd) {
515 opt->SetMscRangeFactor(frCmd->GetNewDoubleValue(newValue));
516 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
517 } else if (command == fgCmd) {
518 opt->SetMscGeomFactor(fgCmd->GetNewDoubleValue(newValue));
519 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
520 } else if (command == mscfCmd) {
521 opt->SetFactorForAngleLimit(mscfCmd->GetNewDoubleValue(newValue));
522 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
523 } else if (command == angCmd) {
524 opt->SetPolarAngleLimit(angCmd->GetNewDoubleValue(newValue));
525 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
526 } else if (command == bfCmd) {
527 G4double v1(1.0);
528 G4String s0(""),s1("");
529 std::istringstream is(newValue);
530 is >> s0 >> v1 >> s1;
531 G4bool yes = false;
532 if(s1 == "true") { yes = true; }
533 opt->SetProcessBiasingFactor(s0,v1,yes);
534 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
535 } else if (command == fiCmd) {
536 G4double v1(0.0);
537 G4String s1(""),s2(""),s3(""),unt("mm");
538 std::istringstream is(newValue);
539 is >> s1 >> s2 >> v1 >> unt >> s3;
540 G4bool yes = false;
541 if(s3 == "true") { yes = true; }
542 v1 *= G4UIcommand::ValueOf(unt);
543 opt->ActivateForcedInteraction(s1,v1,s2,yes);
544 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
545 } else if (command == brCmd) {
546 G4double fb(1.0),en(1.e+30);
547 G4String s1(""),s2(""),unt("MeV");
548 std::istringstream is(newValue);
549 is >> s1 >> s2 >> fb >> en >> unt;
550 en *= G4UIcommand::ValueOf(unt);
551 if (s1=="phot"||s1=="compt"||s1=="conv")
552 opt->ActivateSecondaryBiasingForGamma(s1,s2,fb,en);
553 else opt->ActivateSecondaryBiasing(s1,s2,fb,en);
554 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
555 }
556}
557
558//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@ G4State_Idle
@ G4State_PreInit
@ fMinimal
@ fUseSafety
@ fUseDistanceToBoundary
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
void SetBuildCSDARange(G4bool val)
void ActivateForcedInteraction(const G4String &name, G4double length=0.0, const G4String &region="", G4bool flag=true)
void SetAuger(G4bool val)
void SetLinearLossLimit(G4double val)
void SetMaxEnergy(G4double val)
void SetMscRangeFactor(G4double val)
void SetDeexcitationActiveRegion(const G4String &rname="", G4bool valDeexcitation=true, G4bool valAuger=true, G4bool valPIXE=true)
void SetIntegral(G4bool val)
void SetDEDXBinning(G4int val)
void SetLambdaBinning(G4int val)
void SetPolarAngleLimit(G4double val)
void SetVerbose(G4int val, const G4String &name="all")
void SetPIXECrossSectionModel(const G4String &val)
void SetMinSubRange(G4double val)
void SetSkin(G4double val)
void SetPIXEElectronCrossSectionModel(const G4String &val)
void SetLPMFlag(G4bool val)
void SetMscLateralDisplacement(G4bool val)
void ActivateSecondaryBiasing(const G4String &name, const G4String &region, G4double factor, G4double energyLimit)
void SetMinEnergy(G4double val)
void SetSplineFlag(G4bool val)
void SetMscGeomFactor(G4double val)
void SetLossFluctuations(G4bool val)
void SetRandomStep(G4bool val)
void SetLambdaFactor(G4double val)
void SetPIXE(G4bool val)
void SetMscStepLimitation(G4MscStepLimitType val)
void SetFactorForAngleLimit(G4double val)
void SetApplyCuts(G4bool val)
void SetSubCutoff(G4bool val, const G4Region *r=0)
void SetStepFunction(G4double v1, G4double v2)
void ActivateSecondaryBiasingForGamma(const G4String &name, const G4String &region, G4double factor, G4double energyLimit)
void SetFluo(G4bool val)
void SetProcessBiasingFactor(const G4String &name, G4double val, G4bool flag=true)
void SetNewValue(G4UIcommand *, G4String)
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetUnitCategory(const char *unitCategory)
static G4double GetNewDoubleValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4double GetNewDoubleValue(const char *paramString)
void SetDefaultValue(G4double defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultValue(G4int defVal)
static G4String CategoryOf(const char *unitName)
Definition: G4UIcommand.cc:295
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:288
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:147
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
static G4String UnitsList(const char *unitCategory)
Definition: G4UIcommand.cc:300
void SetRange(const char *rs)
Definition: G4UIcommand.hh:120
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:219
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:369
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:51
void SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
void SetParameterRange(const char *theRange)
void SetParameterCandidates(const char *theString)