Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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 "G4EmFluoDirectory.hh"
44#include "G4UIcommand.hh"
45#include "G4UIparameter.hh"
46#include "G4UIcmdWithABool.hh"
48#include "G4UIcmdWithADouble.hh"
50#include "G4UIcmdWithAString.hh"
52#include "G4UImanager.hh"
53#include "G4EmLowEParameters.hh"
54
55#include <sstream>
56
57//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
58
60 : theParameters(ptr)
61{
62 deCmd = new G4UIcmdWithABool("/process/em/fluo",this);
63 deCmd->SetGuidance("Enable/disable atomic deexcitation");
64 deCmd->SetParameterName("fluoFlag",true);
65 deCmd->SetDefaultValue(false);
67 deCmd->SetToBeBroadcasted(false);
68
69 dirFluoCmd = new G4UIcmdWithABool("/process/em/fluoBearden",this);
70 dirFluoCmd->SetGuidance("Enable/disable usage of Bearden fluorescence files");
71 dirFluoCmd->SetParameterName("fluoBeardenFlag",true);
72 dirFluoCmd->SetDefaultValue(false);
74 dirFluoCmd->SetToBeBroadcasted(false);
75
76 dirFluoCmd1 = new G4UIcmdWithABool("/process/em/fluoANSTO",this);
77 dirFluoCmd1->SetGuidance("Enable/disable usage of ANSTO fluorescence files");
78 dirFluoCmd1->SetParameterName("fluoANSTOFlag",true);
79 dirFluoCmd1->SetDefaultValue(false);
81 dirFluoCmd1->SetToBeBroadcasted(false);
82
83 auCmd = new G4UIcmdWithABool("/process/em/auger",this);
84 auCmd->SetGuidance("Enable/disable Auger electrons production");
85 auCmd->SetParameterName("augerFlag",true);
86 auCmd->SetDefaultValue(false);
88 auCmd->SetToBeBroadcasted(false);
89
90 auCascadeCmd = new G4UIcmdWithABool("/process/em/augerCascade",this);
91 auCascadeCmd->SetGuidance("Enable/disable simulation of cascade of Auger electrons");
92 auCascadeCmd->SetParameterName("augerCascadeFlag",true);
93 auCascadeCmd->SetDefaultValue(false);
95 auCascadeCmd->SetToBeBroadcasted(false);
96
97 pixeCmd = new G4UIcmdWithABool("/process/em/pixe",this);
98 pixeCmd->SetGuidance("Enable/disable PIXE simulation");
99 pixeCmd->SetParameterName("pixeFlag",true);
100 pixeCmd->SetDefaultValue(false);
102 pixeCmd->SetToBeBroadcasted(false);
103
104 dcutCmd = new G4UIcmdWithABool("/process/em/deexcitationIgnoreCut",this);
105 dcutCmd->SetGuidance("Enable/Disable usage of cuts in de-excitation module");
106 dcutCmd->SetParameterName("deexcut",true);
107 dcutCmd->SetDefaultValue(false);
109 dcutCmd->SetToBeBroadcasted(false);
110
111 dnafCmd = new G4UIcmdWithABool("/process/dna/UseDNAFast",this);
112 dnafCmd->SetGuidance("Enable usage of fast sampling for DNA models");
113 dnafCmd->SetParameterName("dnaf",true);
114 dnafCmd->SetDefaultValue(false);
116 dnafCmd->SetToBeBroadcasted(false);
117
118 dnasCmd = new G4UIcmdWithABool("/process/dna/UseDNAStationary",this);
119 dnasCmd->SetGuidance("Enable usage of Stationary option for DNA models");
120 dnasCmd->SetParameterName("dnas",true);
121 dnasCmd->SetDefaultValue(false);
123 dnasCmd->SetToBeBroadcasted(false);
124
125 dnamscCmd = new G4UIcmdWithABool("/process/dna/UseDNAElectronMsc",this);
126 dnamscCmd->SetGuidance("Enable usage of e- msc for DNA");
127 dnamscCmd->SetParameterName("dnamsc",true);
128 dnamscCmd->SetDefaultValue(false);
130 dnamscCmd->SetToBeBroadcasted(false);
131
132 direFluoCmd = new G4UIcmdWithAString("/process/em/fluoDirectory",this);
133 direFluoCmd->SetGuidance("The name of PIXE cross section");
134 direFluoCmd->SetParameterName("fluoDirectory",true);
135 direFluoCmd->SetCandidates("Default Bearden ANSTO XDB_EADL");
137 direFluoCmd->SetToBeBroadcasted(false);
138
139 pixeXsCmd = new G4UIcmdWithAString("/process/em/pixeXSmodel",this);
140 pixeXsCmd->SetGuidance("The name of PIXE cross section");
141 pixeXsCmd->SetParameterName("pixeXS",true);
142 pixeXsCmd->SetCandidates("ECPSSR_Analytical Empirical ECPSSR_FormFactor ECPSSR_ANSTO");
144 pixeXsCmd->SetToBeBroadcasted(false);
145
146 pixeeXsCmd = new G4UIcmdWithAString("/process/em/pixeElecXSmodel",this);
147 pixeeXsCmd->SetGuidance("The name of PIXE cross section for electron");
148 pixeeXsCmd->SetParameterName("pixeEXS",true);
149 pixeeXsCmd->SetCandidates("ECPSSR_Analytical Empirical Livermore Penelope");
151 pixeeXsCmd->SetToBeBroadcasted(false);
152
153 livCmd = new G4UIcmdWithAString("/process/em/LivermoreData",this);
154 livCmd->SetGuidance("The name of Livermore data directory");
155 livCmd->SetParameterName("livDir",true);
156 livCmd->SetCandidates("livermore epics_2017");
158 livCmd->SetToBeBroadcasted(false);
159
160 dnaSolCmd = new G4UIcmdWithAString("/process/dna/e-SolvationSubType",this);
161 dnaSolCmd->SetGuidance("The name of e- solvation DNA model");
162 dnaSolCmd->SetParameterName("dnaSol",true);
163 dnaSolCmd->SetCandidates("Ritchie1994 Terrisol1990 Meesungnoen2002 Kreipl2009 Meesungnoen2002_amorphous");
165 dnaSolCmd->SetToBeBroadcasted(false);
166
167 meCmd = new G4UIcmdWithAString("/process/em/AddMicroElecRegion",this);
168 meCmd->SetGuidance("Activate MicroElec model in the G4Region");
169 meCmd->SetParameterName("MicroElec",true);
171 meCmd->SetToBeBroadcasted(false);
172
173 dnaCmd = new G4UIcommand("/process/em/AddDNARegion",this);
174 dnaCmd->SetGuidance("Activate DNA in a G4Region.");
175 dnaCmd->SetGuidance(" regName : G4Region name");
176 dnaCmd->SetGuidance(" dnaType : DNA_opt0, DNA_Opt2, DNA_Opt4, DNA_Opt4a, DNA_Opt6, DNA_Opt6a, DNA_Opt7");
178 dnaCmd->SetToBeBroadcasted(false);
179
180 auto regName = new G4UIparameter("regName",'s',false);
181 dnaCmd->SetParameter(regName);
182
183 auto type = new G4UIparameter("dnaType",'s',false);
184 dnaCmd->SetParameter(type);
185 type->SetParameterCandidates("DNA_Opt0 DNA_Opt2 DNA_Opt4 DNA_Opt4a DNA_Opt6 DNA_Opt6a DNA_Opt7");
186
187 deexCmd = new G4UIcommand("/process/em/deexcitation",this);
188 deexCmd->SetGuidance("Set deexcitation flags per G4Region.");
189 deexCmd->SetGuidance(" regName : G4Region name");
190 deexCmd->SetGuidance(" flagFluo : Fluorescence");
191 deexCmd->SetGuidance(" flagAuger : Auger");
192 deexCmd->SetGuidance(" flagPIXE : PIXE");
194 deexCmd->SetToBeBroadcasted(false);
195
196 auto regNameD = new G4UIparameter("regName",'s',false);
197 deexCmd->SetParameter(regNameD);
198
199 auto flagFluo = new G4UIparameter("flagFluo",'s',false);
200 deexCmd->SetParameter(flagFluo);
201
202 auto flagAuger = new G4UIparameter("flagAuger",'s',false);
203 deexCmd->SetParameter(flagAuger);
204
205 auto flagPIXE = new G4UIparameter("flagPIXE",'s',false);
206 deexCmd->SetParameter(flagPIXE);
207
208}
209
210//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
211
213{
214 delete deCmd;
215 delete dirFluoCmd;
216 delete dirFluoCmd1;
217 delete auCmd;
218 delete auCascadeCmd;
219 delete pixeCmd;
220 delete dcutCmd;
221 delete dnafCmd;
222 delete dnasCmd;
223 delete dnamscCmd;
224 delete pixeXsCmd;
225 delete pixeeXsCmd;
226 delete livCmd;
227 delete dnaSolCmd;
228 delete direFluoCmd;
229 delete meCmd;
230 delete dnaCmd;
231 delete deexCmd;
232}
233
234//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
235
237 G4String newValue)
238{
239 G4bool physicsModified = false;
240 if (command == deCmd) {
241 theParameters->SetFluo(deCmd->GetNewBoolValue(newValue));
242 physicsModified = true;
243 } else if (command == dirFluoCmd) {
244 theParameters->SetBeardenFluoDir(dirFluoCmd->GetNewBoolValue(newValue));
245 physicsModified = true;
246 } else if (command == dirFluoCmd1) {
247 theParameters->SetANSTOFluoDir(dirFluoCmd1->GetNewBoolValue(newValue));
248 physicsModified = true;
249 } else if (command == auCmd) {
250 theParameters->SetAuger(auCmd->GetNewBoolValue(newValue));
251 physicsModified = true;
252 } else if (command == auCascadeCmd) {
253 theParameters->SetAuger(auCascadeCmd->GetNewBoolValue(newValue));
254 physicsModified = true;
255 } else if (command == pixeCmd) {
256 theParameters->SetPixe(pixeCmd->GetNewBoolValue(newValue));
257 physicsModified = true;
258 } else if (command == dcutCmd) {
259 theParameters->SetDeexcitationIgnoreCut(dcutCmd->GetNewBoolValue(newValue));
260 physicsModified = true;
261 } else if (command == dnafCmd) {
262 theParameters->SetDNAFast(dnafCmd->GetNewBoolValue(newValue));
263 } else if (command == dnasCmd) {
264 theParameters->SetDNAStationary(dnasCmd->GetNewBoolValue(newValue));
265 } else if (command == dnamscCmd) {
266 theParameters->SetDNAElectronMsc(dnamscCmd->GetNewBoolValue(newValue));
267 } else if (command == dnaSolCmd) {
269 if(newValue == "Ritchie1994") {
271 } else if(newValue == "Terrisol1990") {
273 } else if (newValue == "Meesungnoen2002") {
275 } else if (newValue == "Meesungnoen2002_amorphous") {
277 } else if (newValue == "Kreipl2009") {
279 }
280 theParameters->SetDNAeSolvationSubType(ttt);
281 } else if (command == direFluoCmd) {
283 if(newValue == "Bearden") { ttt = fluoBearden; }
284 else if(newValue == "ANSTO") { ttt = fluoANSTO; }
285 else if(newValue == "XDB_EADL") { ttt = fluoXDB_EADL; }
286 theParameters->SetFluoDirectory(ttt);
287 } else if (command == pixeXsCmd) {
288 theParameters->SetPIXECrossSectionModel(newValue);
289 physicsModified = true;
290 } else if (command == pixeeXsCmd) {
291 theParameters->SetPIXEElectronCrossSectionModel(newValue);
292 physicsModified = true;
293 } else if (command == livCmd) {
294 theParameters->SetLivermoreDataDir(newValue);
295 } else if (command == meCmd) {
296 theParameters->AddMicroElec(newValue);
297 } else if (command == dnaCmd) {
298 G4String s1(""),s2("");
299 std::istringstream is(newValue);
300 is >> s1 >> s2;
301 theParameters->AddDNA(s1, s2);
302 } else if (command == deexCmd) {
303 G4String s1 (""), s2(""), s3(""), s4("");
304 G4bool b2(false), b3(false), b4(false);
305 std::istringstream is(newValue);
306 is >> s1 >> s2 >> s3 >> s4;
307 if(s2 == "true") { b2 = true; }
308 if(s3 == "true") { b3 = true; }
309 if(s4 == "true") { b4 = true; }
310 theParameters->SetDeexActiveRegion(s1,b2,b3,b4);
311 physicsModified = true;
312 }
313
314 if(physicsModified) {
315 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
316 }
317}
318
319//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@ G4State_Init
@ G4State_Idle
@ G4State_PreInit
G4DNAModelSubType
@ fMeesungnoen2002eSolvation
@ fKreipl2009eSolvation
@ fDNAUnknownModel
@ fMeesungnoensolid2002eSolvation
@ fRitchie1994eSolvation
@ fTerrisol1990eSolvation
G4EmFluoDirectory
@ fluoBearden
@ fluoXDB_EADL
@ fluoDefault
@ fluoANSTO
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 SetFluoDirectory(G4EmFluoDirectory 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:147
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:157
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:287
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:495
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77