Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4RadioactivationMessenger.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 //
27 // //
28 // File: G4RadioactivationMessenger.cc //
29 // Author: D.H. Wright (SLAC) //
30 // Date: 29 August 2017 //
31 // Description: messenger class for biased version of G4RadioactiveDecay. //
32 // Based on the code of F. Lei and P.R. Truscott. //
33 // //
35 
37 #include "G4NuclearLevelData.hh"
38 #include <sstream>
39 
40 
42  :theRadioactivationContainer(theRadioactivationContainer1)
43 {
44  grdmDirectory = new G4UIdirectory("/grdm/");
45  grdmDirectory->SetGuidance("Controls the biased version of radioactive decay");
46 /*
47  // Command to define the limits on nuclei the RDM will treat
48  nucleuslimitsCmd = new G4UIcmdWithNucleusLimits("/grdm/nucleusLimits",this);
49  nucleuslimitsCmd->SetGuidance
50  ("Set the atomic weight and number limits for the RDM.");
51  nucleuslimitsCmd->SetParameterName("aMin","aMax","zMin","zMax",true);
52 
53  // Command to contols whether beta decay will be treated faithfully or
54  // in fast mode (no longer used)
55  fbetaCmd = new G4UIcmdWithABool ("/grdm/fBeta",this);
56  fbetaCmd->SetGuidance("false: use 3-body decay, true: use histogram method");
57  fbetaCmd->SetParameterName("fBeta",true);
58  fbetaCmd->SetDefaultValue(false);
59 
60  // Command to select a logical volume for RDM
61  avolumeCmd = new G4UIcmdWithAString("/grdm/selectVolume",this);
62  avolumeCmd->SetGuidance
63  ("Suppply a logical volumes name to add it to the RDM apply list");
64  avolumeCmd->SetParameterName("aVolume",false);
65 
66  // Command to de-select a logical volume for RDM
67  deavolumeCmd = new G4UIcmdWithAString("/grdm/deselectVolume",this);
68  deavolumeCmd->SetGuidance
69  ("Suppply a logical volumes name to remove it from the RDM apply list");
70  deavolumeCmd->SetParameterName("aVolume",false);
71 
72  // Command to select all logical volumes for RDM
73  allvolumesCmd = new G4UIcmdWithoutParameter("/grdm/allVolumes",this);
74  allvolumesCmd->SetGuidance
75  (" apply RDM to all logical volumes. No parameter required.");
76 
77  // Command to de-selete a logical volume for RDM.
78  deallvolumesCmd = new G4UIcmdWithoutParameter("/grdm/noVolumes",this);
79  deallvolumesCmd->SetGuidance(" RDM is not applied to any logical volumes");
80 */
81  // Command to use branching ratio biasing or not
82  brbiasCmd = new G4UIcmdWithABool ("/grdm/BRbias",this);
83  brbiasCmd->SetGuidance("false: no biasing; true: all branches are treated as equal");
84  brbiasCmd->SetParameterName("BRBias",true);
86 /*
87  // Command to apply internal conversion or not
88  icmCmd = new G4UIcmdWithABool ("/grdm/applyICM",this);
89  icmCmd->SetGuidance("True: ICM is applied; false: no");
90  icmCmd->SetParameterName("applyICM",true);
91  icmCmd->SetDefaultValue(true);
92 
93  // Command to apply atomic relaxation or not
94  armCmd = new G4UIcmdWithABool ("/grdm/applyARM",this);
95  armCmd->SetGuidance("True: ARM is applied; false: no");
96  armCmd->SetParameterName("applyARM",true);
97  armCmd->SetDefaultValue(true);
98 */
99  // Command to set the half-life thresold for isomer production
100  hlthCmd = new G4UIcmdWithADoubleAndUnit("/grdm/hlThreshold",this);
101  hlthCmd->SetGuidance("Set the h-l threshold for isomer production");
102  hlthCmd->SetParameterName("hlThreshold",false);
103  hlthCmd->SetUnitCategory("Time");
104 
105  // Command to define the incident particle source time profile
106  sourcetimeprofileCmd = new G4UIcmdWithAString("/grdm/sourceTimeProfile",this);
108  ("Supply the name of the ascii file containing the source particle time profile");
109  sourcetimeprofileCmd->SetParameterName("STimeProfile",true);
110  sourcetimeprofileCmd->SetDefaultValue("source.data");
111 
112  // Command to define the incident particle source time profile
113  decaybiasprofileCmd = new G4UIcmdWithAString("/grdm/decayBiasProfile",this);
115  ("Supply the name of the ascii file containing the decay bias time profile");
116  decaybiasprofileCmd->SetParameterName("DBiasProfile",true);
117  decaybiasprofileCmd->SetDefaultValue("bias.data");
118 /*
119  // Command to set the directional bias (collimation) vector
120  colldirCmd = new G4UIcmdWith3Vector("/grdm/decayDirection",this);
121  colldirCmd->SetGuidance("Supply the direction vector for decay products");
122  colldirCmd->SetParameterName("X","Y","Z",false);
123 
124  // Command to set the directional bias (collimation) half angle ("cone")
125  collangleCmd = new G4UIcmdWithADoubleAndUnit("/grdm/decayHalfAngle",this);
126  collangleCmd->SetGuidance
127  ("Supply maximum angle from direction vector for decay products");
128  collangleCmd->SetParameterName("halfAngle",false);
129  collangleCmd->SetUnitCategory("Angle");
130 */
131  // Command to set nuclei spliting parameter
132  splitnucleiCmd = new G4UIcmdWithAnInteger("/grdm/splitNuclei",this);
133  splitnucleiCmd->SetGuidance("Set number of spliting for the isotopes.");
134  splitnucleiCmd->SetParameterName("NSplit",true);
136  splitnucleiCmd->SetRange("NSplit>=1");
137 /*
138  // Command to set verbosity
139  verboseCmd = new G4UIcmdWithAnInteger("/grdm/verbose",this);
140  verboseCmd->SetGuidance("Set verbose level: 0, 1, 2 or 3");
141  verboseCmd->SetParameterName("VerboseLevel",true);
142  verboseCmd->SetDefaultValue(1);
143  verboseCmd->SetRange("VerboseLevel>=0");
144 
145  //This commansd allows the user to define its own decay datafile for
146  // a given isotope
147  //
148  userDecayDataCmd = new G4UIcommand("/grdm/setRadioactiveDecayFile",this);
149  G4UIparameter* Z_para= new G4UIparameter("Z_isotope",'i',true);
150  Z_para->SetParameterRange("Z_isotope > 0");
151  Z_para->SetGuidance("Z: Charge number of isotope");
152 
153 
154  G4UIparameter* A_para= new G4UIparameter("A_isotope",'i',true);
155  A_para->SetParameterRange("A_isotope > 1");
156  A_para->SetGuidance("A: mass number of isotope");
157 
158  G4UIparameter* FileName_para= new G4UIparameter("file_name",'s',true);
159  FileName_para->SetGuidance("Name of the user data file");
160  userDecayDataCmd->SetParameter(Z_para);
161  userDecayDataCmd->SetParameter(A_para);
162  userDecayDataCmd->SetParameter(FileName_para);
163 
164  // Command allowing user-defined evaporation data file to be used
165  // a given isotope
166 
167  userEvaporationDataCmd = new G4UIcommand("/grdm/setPhotoEvaporationFile",this);
168  userEvaporationDataCmd->SetParameter(Z_para);
169  userEvaporationDataCmd->SetParameter(A_para);
170  userEvaporationDataCmd->SetParameter(FileName_para);
171 */
172 }
173 
174 
176 {
177  delete grdmDirectory;
178 // delete nucleuslimitsCmd;
179  delete sourcetimeprofileCmd;
180  delete decaybiasprofileCmd;
181 // delete fbetaCmd;
182  delete brbiasCmd;
183  delete splitnucleiCmd;
184 // delete verboseCmd;
185 // delete avolumeCmd;
186 // delete deavolumeCmd;
187 // delete allvolumesCmd;
188 // delete deallvolumesCmd;
189 // delete icmCmd;
190 // delete armCmd;
191  delete hlthCmd;
192 // delete userDecayDataCmd;
193 // delete userEvaporationDataCmd;
194 // delete colldirCmd;
195 // delete collangleCmd;
196 }
197 
198 
200 {
201 // if (command==nucleuslimitsCmd) {theRadioactivationContainer->
202 // SetNucleusLimits(nucleuslimitsCmd->GetNewNucleusLimitsValue(newValues));
203 /*
204  } else if (command==fbetaCmd) {theRadioactivationContainer->
205  SetFBeta(fbetaCmd->GetNewBoolValue(newValues));
206 
207  } else if (command==avolumeCmd) {theRadioactivationContainer->
208  SelectAVolume(newValues);
209 
210  } else if (command==deavolumeCmd) {theRadioactivationContainer->
211  DeselectAVolume(newValues);
212 
213  } else if (command==allvolumesCmd) {theRadioactivationContainer->
214  SelectAllVolumes();
215 
216  } else if (command==deallvolumesCmd) {theRadioactivationContainer->
217  DeselectAllVolumes();
218 */
219  if (command==brbiasCmd) {theRadioactivationContainer->
220  SetBRBias(brbiasCmd->GetNewBoolValue(newValues));
221 
222  } else if (command==sourcetimeprofileCmd) {theRadioactivationContainer->
223  SetSourceTimeProfile(newValues);
224 
225  } else if (command==decaybiasprofileCmd) {theRadioactivationContainer->
226  SetDecayBias(newValues);
227 
228  } else if (command==splitnucleiCmd) {theRadioactivationContainer->
229  SetSplitNuclei(splitnucleiCmd->GetNewIntValue(newValues));
230 /*
231  } else if (command==verboseCmd) {theRadioactivationContainer->
232  SetVerboseLevel(verboseCmd->GetNewIntValue(newValues));
233 
234  } else if (command==icmCmd ) {theRadioactivationContainer->
235  SetICM(icmCmd->GetNewBoolValue(newValues));
236 
237  } else if (command==armCmd ) {theRadioactivationContainer->
238  SetARM(armCmd->GetNewBoolValue(newValues));
239 */
240  } else if (command==hlthCmd ) {theRadioactivationContainer->
241  SetHLThreshold(hlthCmd->GetNewDoubleValue(newValues));
242 /*
243  } else if (command ==userDecayDataCmd) {
244  G4int Z,A;
245  G4String file_name;
246  const char* nv = (const char*)newValues;
247  std::istringstream is(nv);
248  is >> Z >> A >> file_name;
249  theRadioactivationContainer->AddUserDecayDataFile(Z,A,file_name);
250 
251  } else if (command ==userEvaporationDataCmd) {
252  G4int Z,A;
253  G4String file_name;
254  const char* nv = (const char*)newValues;
255  std::istringstream is(nv);
256  is >> Z >> A >> file_name;
257  G4NuclearLevelData::GetInstance()->AddPrivateData(Z,A,file_name);
258 
259  } else if (command==colldirCmd) {theRadioactivationContainer->
260  SetDecayDirection(colldirCmd->GetNew3VectorValue(newValues));
261 
262  } else if (command==collangleCmd) {theRadioactivationContainer->
263  SetDecayHalfAngle(collangleCmd->GetNewDoubleValue(newValues));
264 */
265  }
266 }
267 
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4Radioactivation * theRadioactivationContainer
void SetDefaultValue(G4bool defVal)
void SetDefaultValue(G4int defVal)
G4UIcmdWithADoubleAndUnit * hlthCmd
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetDefaultValue(const char *defVal)
static G4bool GetNewBoolValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
void SetUnitCategory(const char *unitCategory)
G4RadioactivationMessenger(G4Radioactivation *theRadioactivationContainer)
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 SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetNewValue(G4UIcommand *command, G4String newValues)