ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4EmLowEParametersMessenger.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4EmLowEParametersMessenger.cc
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"
46 #include "G4UIcmdWithAnInteger.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);
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);
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 
98  dnafCmd = new G4UIcmdWithABool("/process/dna/UseDNAFast",this);
99  dnafCmd->SetGuidance("Enable usage of fast sampling for DNA models");
100  dnafCmd->SetParameterName("dnaf",true);
101  dnafCmd->SetDefaultValue(false);
103 
104  dnasCmd = new G4UIcmdWithABool("/process/dna/UseDNAStationary",this);
105  dnasCmd->SetGuidance("Enable usage of Stationary option for DNA models");
106  dnasCmd->SetParameterName("dnas",true);
107  dnasCmd->SetDefaultValue(false);
109 
110  dnamscCmd = new G4UIcmdWithABool("/process/dna/UseDNAElectronMsc",this);
111  dnamscCmd->SetGuidance("Enable usage of e- msc for DNA");
112  dnamscCmd->SetParameterName("dnamsc",true);
113  dnamscCmd->SetDefaultValue(false);
115 
116  pixeXsCmd = new G4UIcmdWithAString("/process/em/pixeXSmodel",this);
117  pixeXsCmd->SetGuidance("The name of PIXE cross section");
118  pixeXsCmd->SetParameterName("pixeXS",true);
119  pixeXsCmd->SetCandidates("ECPSSR_Analytical Empirical ECPSSR_FormFactor");
121 
122  pixeeXsCmd = new G4UIcmdWithAString("/process/em/pixeElecXSmodel",this);
123  pixeeXsCmd->SetGuidance("The name of PIXE cross section for electron");
124  pixeeXsCmd->SetParameterName("pixeEXS",true);
125  pixeeXsCmd->SetCandidates("ECPSSR_Analytical Empirical Livermore Penelope");
127 
128  dnaSolCmd = new G4UIcmdWithAString("/process/dna/e-SolvationSubType",this);
129  dnaSolCmd->SetGuidance("The name of e- solvation DNA model");
130  dnaSolCmd->SetParameterName("dnaSol",true);
131  dnaSolCmd->SetCandidates("Ritchie1994 Terrisol1990 Meesungnoen2002 Kreipl2009 Meesungnoen2002_amorphous");
133 
134  meCmd = new G4UIcmdWithAString("/process/em/AddMicroElecRegion",this);
135  meCmd->SetGuidance("Activate MicroElec model in the G4Region");
136  meCmd->SetParameterName("MicroElec",true);
138 
139  dnaCmd = new G4UIcommand("/process/em/AddDNARegion",this);
140  dnaCmd->SetGuidance("Activate DNA in a G4Region.");
141  dnaCmd->SetGuidance(" regName : G4Region name");
142  dnaCmd->SetGuidance(" dnaType : DNA_opt0, DNA_opt1, DNA_opt2");
144 
145  G4UIparameter* regName = new G4UIparameter("regName",'s',false);
146  dnaCmd->SetParameter(regName);
147 
148  G4UIparameter* type = new G4UIparameter("dnaType",'s',false);
149  dnaCmd->SetParameter(type);
150  type->SetParameterCandidates("DNA_Opt0");
151 
152  deexCmd = new G4UIcommand("/process/em/deexcitation",this);
153  deexCmd->SetGuidance("Set deexcitation flags per G4Region.");
154  deexCmd->SetGuidance(" regName : G4Region name");
155  deexCmd->SetGuidance(" flagFluo : Fluorescence");
156  deexCmd->SetGuidance(" flagAuger : Auger");
157  deexCmd->SetGuidance(" flagPIXE : PIXE");
159 
160  G4UIparameter* regNameD = new G4UIparameter("regName",'s',false);
161  deexCmd->SetParameter(regNameD);
162 
163  G4UIparameter* flagFluo = new G4UIparameter("flagFluo",'s',false);
164  deexCmd->SetParameter(flagFluo);
165 
166  G4UIparameter* flagAuger = new G4UIparameter("flagAuger",'s',false);
167  deexCmd->SetParameter(flagAuger);
168 
169  G4UIparameter* flagPIXE = new G4UIparameter("flagPIXE",'s',false);
170  deexCmd->SetParameter(flagPIXE);
171 
172 }
173 
174 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
175 
177 {
178  delete deCmd;
179  delete dirFluoCmd;
180  delete auCmd;
181  delete auCascadeCmd;
182  delete pixeCmd;
183  delete dcutCmd;
184  delete dnafCmd;
185  delete dnasCmd;
186  delete dnamscCmd;
187  delete pixeXsCmd;
188  delete pixeeXsCmd;
189  delete dnaSolCmd;
190  delete meCmd;
191  delete dnaCmd;
192  delete deexCmd;
193 }
194 
195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
196 
198  G4String newValue)
199 {
200  G4bool physicsModified = false;
201  if (command == deCmd) {
203  physicsModified = true;
204  } else if (command == dirFluoCmd) {
206  } else if (command == auCmd) {
208  physicsModified = true;
209  } else if (command == auCascadeCmd) {
211  physicsModified = true;
212  } else if (command == pixeCmd) {
214  physicsModified = true;
215  } else if (command == dcutCmd) {
217  physicsModified = true;
218  } else if (command == dnafCmd) {
220  } else if (command == dnasCmd) {
222  } else if (command == dnamscCmd) {
224  } else if (command == dnaSolCmd) {
226  if(newValue == "Ritchie1994") {
227  ttt = fRitchie1994eSolvation;
228  } else if(newValue == "Terrisol1990") {
230  } else if (newValue == "Meesungnoen2002") {
232  } else if (newValue == "Meesungnoen2002_amorphous") {
234  } else if (newValue == "Kreipl2009") {
235  ttt = fKreipl2009eSolvation;
236  }
238  } else if (command == pixeXsCmd) {
240  physicsModified = true;
241  } else if (command == pixeeXsCmd) {
243  physicsModified = true;
244  } else if (command == meCmd) {
245  theParameters->AddMicroElec(newValue);
246  } else if (command == dnaCmd) {
247  G4String s1(""),s2("");
248  std::istringstream is(newValue);
249  is >> s1 >> s2;
250  theParameters->AddDNA(s1, s2);
251  } else if (command == deexCmd) {
252  G4String s1 (""), s2(""), s3(""), s4("");
253  G4bool b2(false), b3(false), b4(false);
254  std::istringstream is(newValue);
255  is >> s1 >> s2 >> s3 >> s4;
256  if(s2 == "true") { b2 = true; }
257  if(s3 == "true") { b3 = true; }
258  if(s4 == "true") { b4 = true; }
260  physicsModified = true;
261  }
262 
263  if(physicsModified) {
264  G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
265  }
266 }
267 
268 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....