Geant4-11
G4EmLowEParametersMessenger.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// -------------------------------------------------------------------
27//
28// GEANT4 Class file
29//
30// File name: G4EmLowEParametersMessenger
31//
32// Author: Vladimir Ivanchenko
33//
34// Creation date: 07-05-2019
35//
36// -------------------------------------------------------------------
37//
38
39//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
40//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
41
43#include "G4UIcommand.hh"
44#include "G4UIparameter.hh"
45#include "G4UIcmdWithABool.hh"
47#include "G4UIcmdWithADouble.hh"
49#include "G4UIcmdWithAString.hh"
51#include "G4UImanager.hh"
52#include "G4EmLowEParameters.hh"
53
54#include <sstream>
55
56//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
57
59 : theParameters(ptr)
60{
61 deCmd = new G4UIcmdWithABool("/process/em/fluo",this);
62 deCmd->SetGuidance("Enable/disable atomic deexcitation");
63 deCmd->SetParameterName("fluoFlag",true);
64 deCmd->SetDefaultValue(false);
67
68 dirFluoCmd = new G4UIcmdWithABool("/process/em/fluoBearden",this);
69 dirFluoCmd->SetGuidance("Enable/disable usage of Bearden fluorescence files");
70 dirFluoCmd->SetParameterName("fluoBeardenFlag",true);
74
75 dirFluoCmd1 = new G4UIcmdWithABool("/process/em/fluoANSTO",this);
76 dirFluoCmd1->SetGuidance("Enable/disable usage of ANSTO fluorescence files");
77 dirFluoCmd1->SetParameterName("fluoANSTOFlag",true);
81
82 auCmd = new G4UIcmdWithABool("/process/em/auger",this);
83 auCmd->SetGuidance("Enable/disable Auger electrons production");
84 auCmd->SetParameterName("augerFlag",true);
85 auCmd->SetDefaultValue(false);
88
89 auCascadeCmd = new G4UIcmdWithABool("/process/em/augerCascade",this);
90 auCascadeCmd->SetGuidance("Enable/disable simulation of cascade of Auger electrons");
91 auCascadeCmd->SetParameterName("augerCascadeFlag",true);
95
96 pixeCmd = new G4UIcmdWithABool("/process/em/pixe",this);
97 pixeCmd->SetGuidance("Enable/disable PIXE simulation");
98 pixeCmd->SetParameterName("pixeFlag",true);
102
103 dcutCmd = new G4UIcmdWithABool("/process/em/deexcitationIgnoreCut",this);
104 dcutCmd->SetGuidance("Enable/Disable usage of cuts in de-excitation module");
105 dcutCmd->SetParameterName("deexcut",true);
106 dcutCmd->SetDefaultValue(false);
109
110 dnafCmd = new G4UIcmdWithABool("/process/dna/UseDNAFast",this);
111 dnafCmd->SetGuidance("Enable usage of fast sampling for DNA models");
112 dnafCmd->SetParameterName("dnaf",true);
113 dnafCmd->SetDefaultValue(false);
116
117 dnasCmd = new G4UIcmdWithABool("/process/dna/UseDNAStationary",this);
118 dnasCmd->SetGuidance("Enable usage of Stationary option for DNA models");
119 dnasCmd->SetParameterName("dnas",true);
120 dnasCmd->SetDefaultValue(false);
123
124 dnamscCmd = new G4UIcmdWithABool("/process/dna/UseDNAElectronMsc",this);
125 dnamscCmd->SetGuidance("Enable usage of e- msc for DNA");
126 dnamscCmd->SetParameterName("dnamsc",true);
130
131 pixeXsCmd = new G4UIcmdWithAString("/process/em/pixeXSmodel",this);
132 pixeXsCmd->SetGuidance("The name of PIXE cross section");
133 pixeXsCmd->SetParameterName("pixeXS",true);
134 pixeXsCmd->SetCandidates("ECPSSR_Analytical Empirical ECPSSR_FormFactor ECPSSR_ANSTO");
137
138 pixeeXsCmd = new G4UIcmdWithAString("/process/em/pixeElecXSmodel",this);
139 pixeeXsCmd->SetGuidance("The name of PIXE cross section for electron");
140 pixeeXsCmd->SetParameterName("pixeEXS",true);
141 pixeeXsCmd->SetCandidates("ECPSSR_Analytical Empirical Livermore Penelope");
144
145 livCmd = new G4UIcmdWithAString("/process/em/LivermoreData",this);
146 livCmd->SetGuidance("The name of Livermore data directory");
147 livCmd->SetParameterName("livDir",true);
148 livCmd->SetCandidates("livermore epics_2017");
151
152 dnaSolCmd = new G4UIcmdWithAString("/process/dna/e-SolvationSubType",this);
153 dnaSolCmd->SetGuidance("The name of e- solvation DNA model");
154 dnaSolCmd->SetParameterName("dnaSol",true);
155 dnaSolCmd->SetCandidates("Ritchie1994 Terrisol1990 Meesungnoen2002 Kreipl2009 Meesungnoen2002_amorphous");
158
159 meCmd = new G4UIcmdWithAString("/process/em/AddMicroElecRegion",this);
160 meCmd->SetGuidance("Activate MicroElec model in the G4Region");
161 meCmd->SetParameterName("MicroElec",true);
164
165 dnaCmd = new G4UIcommand("/process/em/AddDNARegion",this);
166 dnaCmd->SetGuidance("Activate DNA in a G4Region.");
167 dnaCmd->SetGuidance(" regName : G4Region name");
168 dnaCmd->SetGuidance(" dnaType : DNA_opt0, DNA_Opt2, DNA_Opt4, DNA_Opt4a, DNA_Opt6, DNA_Opt6a, DNA_Opt7");
171
172 G4UIparameter* regName = new G4UIparameter("regName",'s',false);
173 dnaCmd->SetParameter(regName);
174
175 G4UIparameter* type = new G4UIparameter("dnaType",'s',false);
176 dnaCmd->SetParameter(type);
177 type->SetParameterCandidates("DNA_Opt0 DNA_Opt2 DNA_Opt4 DNA_Opt4a DNA_Opt6 DNA_Opt6a DNA_Opt7");
178
179 deexCmd = new G4UIcommand("/process/em/deexcitation",this);
180 deexCmd->SetGuidance("Set deexcitation flags per G4Region.");
181 deexCmd->SetGuidance(" regName : G4Region name");
182 deexCmd->SetGuidance(" flagFluo : Fluorescence");
183 deexCmd->SetGuidance(" flagAuger : Auger");
184 deexCmd->SetGuidance(" flagPIXE : PIXE");
187
188 G4UIparameter* regNameD = new G4UIparameter("regName",'s',false);
189 deexCmd->SetParameter(regNameD);
190
191 G4UIparameter* flagFluo = new G4UIparameter("flagFluo",'s',false);
192 deexCmd->SetParameter(flagFluo);
193
194 G4UIparameter* flagAuger = new G4UIparameter("flagAuger",'s',false);
195 deexCmd->SetParameter(flagAuger);
196
197 G4UIparameter* flagPIXE = new G4UIparameter("flagPIXE",'s',false);
198 deexCmd->SetParameter(flagPIXE);
199
200}
201
202//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
203
205{
206 delete deCmd;
207 delete dirFluoCmd;
208 delete dirFluoCmd1;
209 delete auCmd;
210 delete auCascadeCmd;
211 delete pixeCmd;
212 delete dcutCmd;
213 delete dnafCmd;
214 delete dnasCmd;
215 delete dnamscCmd;
216 delete pixeXsCmd;
217 delete pixeeXsCmd;
218 delete livCmd;
219 delete dnaSolCmd;
220 delete meCmd;
221 delete dnaCmd;
222 delete deexCmd;
223}
224
225//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
226
228 G4String newValue)
229{
230 G4bool physicsModified = false;
231 if (command == deCmd) {
233 physicsModified = true;
234 } else if (command == dirFluoCmd) {
236 physicsModified = true;
237 } else if (command == dirFluoCmd1) {
239 physicsModified = true;
240 } else if (command == auCmd) {
242 physicsModified = true;
243 } else if (command == auCascadeCmd) {
245 physicsModified = true;
246 } else if (command == pixeCmd) {
248 physicsModified = true;
249 } else if (command == dcutCmd) {
251 physicsModified = true;
252 } else if (command == dnafCmd) {
254 } else if (command == dnasCmd) {
256 } else if (command == dnamscCmd) {
258 } else if (command == dnaSolCmd) {
260 if(newValue == "Ritchie1994") {
262 } else if(newValue == "Terrisol1990") {
264 } else if (newValue == "Meesungnoen2002") {
266 } else if (newValue == "Meesungnoen2002_amorphous") {
268 } else if (newValue == "Kreipl2009") {
270 }
272 } else if (command == pixeXsCmd) {
274 physicsModified = true;
275 } else if (command == pixeeXsCmd) {
277 physicsModified = true;
278 } else if (command == livCmd) {
280 } else if (command == meCmd) {
281 theParameters->AddMicroElec(newValue);
282 } else if (command == dnaCmd) {
283 G4String s1(""),s2("");
284 std::istringstream is(newValue);
285 is >> s1 >> s2;
286 theParameters->AddDNA(s1, s2);
287 } else if (command == deexCmd) {
288 G4String s1 (""), s2(""), s3(""), s4("");
289 G4bool b2(false), b3(false), b4(false);
290 std::istringstream is(newValue);
291 is >> s1 >> s2 >> s3 >> s4;
292 if(s2 == "true") { b2 = true; }
293 if(s3 == "true") { b3 = true; }
294 if(s4 == "true") { b4 = true; }
296 physicsModified = true;
297 }
298
299 if(physicsModified) {
300 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
301 }
302}
303
304//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@ G4State_Init
@ G4State_Idle
@ G4State_PreInit
G4DNAModelSubType
@ fMeesungnoen2002eSolvation
@ fKreipl2009eSolvation
@ fDNAUnknownModel
@ fMeesungnoensolid2002eSolvation
@ fRitchie1994eSolvation
@ fTerrisol1990eSolvation
bool G4bool
Definition: G4Types.hh:86
void SetNewValue(G4UIcommand *, G4String) override
G4EmLowEParametersMessenger(G4EmLowEParameters *)
void SetAuger(G4bool val)
void SetDeexActiveRegion(const G4String &region, G4bool fdeex, G4bool fauger, G4bool fpixe)
void SetLivermoreDataDir(const G4String &)
void SetDNAFast(G4bool val)
void SetDeexcitationIgnoreCut(G4bool val)
void SetDNAElectronMsc(G4bool val)
void SetFluo(G4bool val)
void AddDNA(const G4String &region, const G4String &type)
void SetDNAStationary(G4bool val)
void SetDNAeSolvationSubType(G4DNAModelSubType val)
void SetBeardenFluoDir(G4bool val)
void SetANSTOFluoDir(G4bool val)
void SetPIXECrossSectionModel(const G4String &)
void SetPixe(G4bool val)
void SetPIXEElectronCrossSectionModel(const G4String &)
void AddMicroElec(const G4String &region)
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:172
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:146
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:288
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:485
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
void SetParameterCandidates(const char *theString)