Geant4 10.7.0
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 "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);
66
67 dirFluoCmd = new G4UIcmdWithABool("/process/em/fluoBearden",this);
68 dirFluoCmd->SetGuidance("Enable/disable usage of Bearden fluorescence files");
69 dirFluoCmd->SetParameterName("fluoBeardenFlag",true);
70 dirFluoCmd->SetDefaultValue(false);
72
73 auCmd = new G4UIcmdWithABool("/process/em/auger",this);
74 auCmd->SetGuidance("Enable/disable Auger electrons production");
75 auCmd->SetParameterName("augerFlag",true);
76 auCmd->SetDefaultValue(false);
78
79 auCascadeCmd = new G4UIcmdWithABool("/process/em/augerCascade",this);
80 auCascadeCmd->SetGuidance("Enable/disable simulation of cascade of Auger electrons");
81 auCascadeCmd->SetParameterName("augerCascadeFlag",true);
82 auCascadeCmd->SetDefaultValue(false);
84
85 pixeCmd = new G4UIcmdWithABool("/process/em/pixe",this);
86 pixeCmd->SetGuidance("Enable/disable PIXE simulation");
87 pixeCmd->SetParameterName("pixeFlag",true);
88 pixeCmd->SetDefaultValue(false);
90
91 dcutCmd = new G4UIcmdWithABool("/process/em/deexcitationIgnoreCut",this);
92 dcutCmd->SetGuidance("Enable/Disable usage of cuts in de-excitation module");
93 dcutCmd->SetParameterName("deexcut",true);
94 dcutCmd->SetDefaultValue(false);
96
97 dnafCmd = new G4UIcmdWithABool("/process/dna/UseDNAFast",this);
98 dnafCmd->SetGuidance("Enable usage of fast sampling for DNA models");
99 dnafCmd->SetParameterName("dnaf",true);
100 dnafCmd->SetDefaultValue(false);
102
103 dnasCmd = new G4UIcmdWithABool("/process/dna/UseDNAStationary",this);
104 dnasCmd->SetGuidance("Enable usage of Stationary option for DNA models");
105 dnasCmd->SetParameterName("dnas",true);
106 dnasCmd->SetDefaultValue(false);
108
109 dnamscCmd = new G4UIcmdWithABool("/process/dna/UseDNAElectronMsc",this);
110 dnamscCmd->SetGuidance("Enable usage of e- msc for DNA");
111 dnamscCmd->SetParameterName("dnamsc",true);
112 dnamscCmd->SetDefaultValue(false);
114
115 pixeXsCmd = new G4UIcmdWithAString("/process/em/pixeXSmodel",this);
116 pixeXsCmd->SetGuidance("The name of PIXE cross section");
117 pixeXsCmd->SetParameterName("pixeXS",true);
118 pixeXsCmd->SetCandidates("ECPSSR_Analytical Empirical ECPSSR_FormFactor");
120
121 pixeeXsCmd = new G4UIcmdWithAString("/process/em/pixeElecXSmodel",this);
122 pixeeXsCmd->SetGuidance("The name of PIXE cross section for electron");
123 pixeeXsCmd->SetParameterName("pixeEXS",true);
124 pixeeXsCmd->SetCandidates("ECPSSR_Analytical Empirical Livermore Penelope");
126
127 livCmd = new G4UIcmdWithAString("/process/em/LivermoreData",this);
128 livCmd->SetGuidance("The name of Livermore data directory");
129 livCmd->SetParameterName("livDir",true);
130 livCmd->SetCandidates("livermore epics_2017");
132
133 dnaSolCmd = new G4UIcmdWithAString("/process/dna/e-SolvationSubType",this);
134 dnaSolCmd->SetGuidance("The name of e- solvation DNA model");
135 dnaSolCmd->SetParameterName("dnaSol",true);
136 dnaSolCmd->SetCandidates("Ritchie1994 Terrisol1990 Meesungnoen2002 Kreipl2009 Meesungnoen2002_amorphous");
138
139 meCmd = new G4UIcmdWithAString("/process/em/AddMicroElecRegion",this);
140 meCmd->SetGuidance("Activate MicroElec model in the G4Region");
141 meCmd->SetParameterName("MicroElec",true);
143
144 dnaCmd = new G4UIcommand("/process/em/AddDNARegion",this);
145 dnaCmd->SetGuidance("Activate DNA in a G4Region.");
146 dnaCmd->SetGuidance(" regName : G4Region name");
147 dnaCmd->SetGuidance(" dnaType : DNA_opt0, DNA_Opt2, DNA_Opt4, DNA_Opt4a, DNA_Opt6, DNA_Opt6a, DNA_Opt7");
149
150 G4UIparameter* regName = new G4UIparameter("regName",'s',false);
151 dnaCmd->SetParameter(regName);
152
153 G4UIparameter* type = new G4UIparameter("dnaType",'s',false);
154 dnaCmd->SetParameter(type);
155 type->SetParameterCandidates("DNA_Opt0 DNA_Opt2 DNA_Opt4 DNA_Opt4a DNA_Opt6 DNA_Opt6a DNA_Opt7");
156
157 deexCmd = new G4UIcommand("/process/em/deexcitation",this);
158 deexCmd->SetGuidance("Set deexcitation flags per G4Region.");
159 deexCmd->SetGuidance(" regName : G4Region name");
160 deexCmd->SetGuidance(" flagFluo : Fluorescence");
161 deexCmd->SetGuidance(" flagAuger : Auger");
162 deexCmd->SetGuidance(" flagPIXE : PIXE");
164
165 G4UIparameter* regNameD = new G4UIparameter("regName",'s',false);
166 deexCmd->SetParameter(regNameD);
167
168 G4UIparameter* flagFluo = new G4UIparameter("flagFluo",'s',false);
169 deexCmd->SetParameter(flagFluo);
170
171 G4UIparameter* flagAuger = new G4UIparameter("flagAuger",'s',false);
172 deexCmd->SetParameter(flagAuger);
173
174 G4UIparameter* flagPIXE = new G4UIparameter("flagPIXE",'s',false);
175 deexCmd->SetParameter(flagPIXE);
176
177}
178
179//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
180
182{
183 delete deCmd;
184 delete dirFluoCmd;
185 delete auCmd;
186 delete auCascadeCmd;
187 delete pixeCmd;
188 delete dcutCmd;
189 delete dnafCmd;
190 delete dnasCmd;
191 delete dnamscCmd;
192 delete pixeXsCmd;
193 delete pixeeXsCmd;
194 delete livCmd;
195 delete dnaSolCmd;
196 delete meCmd;
197 delete dnaCmd;
198 delete deexCmd;
199}
200
201//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
202
204 G4String newValue)
205{
206 G4bool physicsModified = false;
207 if (command == deCmd) {
208 theParameters->SetFluo(deCmd->GetNewBoolValue(newValue));
209 physicsModified = true;
210 } else if (command == dirFluoCmd) {
211 theParameters->SetBeardenFluoDir(dirFluoCmd->GetNewBoolValue(newValue));
212 } else if (command == auCmd) {
213 theParameters->SetAuger(auCmd->GetNewBoolValue(newValue));
214 physicsModified = true;
215 } else if (command == auCascadeCmd) {
216 theParameters->SetAuger(auCascadeCmd->GetNewBoolValue(newValue));
217 physicsModified = true;
218 } else if (command == pixeCmd) {
219 theParameters->SetPixe(pixeCmd->GetNewBoolValue(newValue));
220 physicsModified = true;
221 } else if (command == dcutCmd) {
222 theParameters->SetDeexcitationIgnoreCut(dcutCmd->GetNewBoolValue(newValue));
223 physicsModified = true;
224 } else if (command == dnafCmd) {
225 theParameters->SetDNAFast(dnafCmd->GetNewBoolValue(newValue));
226 } else if (command == dnasCmd) {
227 theParameters->SetDNAStationary(dnasCmd->GetNewBoolValue(newValue));
228 } else if (command == dnamscCmd) {
229 theParameters->SetDNAElectronMsc(dnamscCmd->GetNewBoolValue(newValue));
230 } else if (command == dnaSolCmd) {
232 if(newValue == "Ritchie1994") {
234 } else if(newValue == "Terrisol1990") {
236 } else if (newValue == "Meesungnoen2002") {
238 } else if (newValue == "Meesungnoen2002_amorphous") {
240 } else if (newValue == "Kreipl2009") {
242 }
243 theParameters->SetDNAeSolvationSubType(ttt);
244 } else if (command == pixeXsCmd) {
245 theParameters->SetPIXECrossSectionModel(newValue);
246 physicsModified = true;
247 } else if (command == pixeeXsCmd) {
248 theParameters->SetPIXEElectronCrossSectionModel(newValue);
249 physicsModified = true;
250 } else if (command == livCmd) {
251 theParameters->SetLivermoreDataDir(newValue);
252 } else if (command == meCmd) {
253 theParameters->AddMicroElec(newValue);
254 } else if (command == dnaCmd) {
255 G4String s1(""),s2("");
256 std::istringstream is(newValue);
257 is >> s1 >> s2;
258 theParameters->AddDNA(s1, s2);
259 } else if (command == deexCmd) {
260 G4String s1 (""), s2(""), s3(""), s4("");
261 G4bool b2(false), b3(false), b4(false);
262 std::istringstream is(newValue);
263 is >> s1 >> s2 >> s3 >> s4;
264 if(s2 == "true") { b2 = true; }
265 if(s3 == "true") { b3 = true; }
266 if(s4 == "true") { b4 = true; }
267 theParameters->SetDeexActiveRegion(s1,b2,b3,b4);
268 physicsModified = true;
269 }
270
271 if(physicsModified) {
272 G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
273 }
274}
275
276//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@ G4State_Init
@ G4State_Idle
@ G4State_PreInit
G4DNAModelSubType
@ fMeesungnoen2002eSolvation
@ fKreipl2009eSolvation
@ fDNAUnknownModel
@ fMeesungnoensolid2002eSolvation
@ fRitchie1994eSolvation
@ fTerrisol1990eSolvation
bool G4bool
Definition: G4Types.hh:86
virtual 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 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 SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:146
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:273
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:485
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
void SetParameterCandidates(const char *theString)