source: trunk/source/processes/hadronic/models/radioactive_decay/src/G4RadioactiveDecaymessenger.cc@ 1323

Last change on this file since 1323 was 1315, checked in by garnier, 15 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File size: 9.5 KB
Line 
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#include "G4RadioactiveDecaymessenger.hh"
29
30#include <sstream>
31
32////////////////////////////////////////////////////////////////////////////////
33//
34G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger
35(G4RadioactiveDecay* theRadioactiveDecayContainer1)
36:theRadioactiveDecayContainer(theRadioactiveDecayContainer1)
37{
38 //
39 //
40 // main directory for control of the RDM
41 //
42 //
43 grdmDirectory = new G4UIdirectory("/grdm/");
44 grdmDirectory->SetGuidance("Controls for the Radioactive Decay Module.");
45 //
46 //
47 // Command to define the limits on nucleus the RDM will treat.
48 //
49 nucleuslimitsCmd = new
50 G4UIcmdWithNucleusLimits("/grdm/nucleusLimits",this);
51 nucleuslimitsCmd->SetGuidance
52 ("Set the amotic weight and number limits for the RDM.");
53 nucleuslimitsCmd->SetParameterName("aMin","aMax","zMin","zMax",true);
54 //
55
56 //
57 // The next command contols whether the decay will be treated analoguely or
58 // with variance reduction
59 //
60 analoguemcCmd = new G4UIcmdWithABool ("/grdm/analogueMC",this);
61 analoguemcCmd->SetGuidance("false: variance reduction method; true: analogue method");
62 analoguemcCmd->SetParameterName("AnalogueMC",true);
63 analoguemcCmd->SetDefaultValue(true);
64 //
65 // The next command contols whether beta decay will be treated faithfully or
66 // in fast mode
67 //
68 fbetaCmd = new G4UIcmdWithABool ("/grdm/fBeta",this);
69 fbetaCmd->SetGuidance("false: use 3-body decay, true: use histogram method");
70 fbetaCmd->SetParameterName("fBeta",true);
71 fbetaCmd->SetDefaultValue(false);
72
73 //
74 //
75 // Command to selete a logical volume for RDM.
76 //
77 avolumeCmd = new
78 G4UIcmdWithAString("/grdm/selectVolume",this);
79 avolumeCmd->SetGuidance
80 ("Suppply a logical volumes name to add it to the RDM apply list");
81 avolumeCmd->SetParameterName("aVolume",false);
82 //
83 //
84 //
85 // Command to de-selete a logical volume for RDM.
86 //
87 deavolumeCmd = new
88 G4UIcmdWithAString("/grdm/deselectVolume",this);
89 deavolumeCmd->SetGuidance
90 ("Suppply a logical volumes name to remove it from the RDM apply list");
91 deavolumeCmd->SetParameterName("aVolume",false);
92 //
93 //
94 // Command to selete all logical volumes for RDM.
95 //
96 allvolumesCmd = new
97 G4UIcmdWithoutParameter("/grdm/allVolumes",this);
98 allvolumesCmd->SetGuidance
99 (" apply RDM to all logical volumes. No parameter required.");
100 // allvolumeCmd->SetParameterName("AddAVolume",true);
101
102 //
103 // Command to de-selete a logical volume for RDM.
104 //
105 deallvolumesCmd = new
106 G4UIcmdWithoutParameter("/grdm/noVolumes",this);
107 deallvolumesCmd->SetGuidance
108 (" RDM is not applied to any logical volumes");
109
110 // deallvolumesCmd->SetParameterName("RemoveAVolume",true);
111 //
112 // The next command contols whether the branching ratio biasing will be applied or not
113 //
114 brbiasCmd = new G4UIcmdWithABool ("/grdm/BRbias",this);
115 brbiasCmd->SetGuidance("false: no biasing; true: all branches are treated as equal");
116 brbiasCmd->SetParameterName("BRBias",true);
117 brbiasCmd->SetDefaultValue(true);
118 //
119 // Command contols whether ICM will be applied or not
120 //
121 icmCmd = new G4UIcmdWithABool ("/grdm/applyICM",this);
122 icmCmd->SetGuidance("True: ICM is applied; false: no");
123 icmCmd->SetParameterName("applyICM",true);
124 icmCmd->SetDefaultValue(true);
125 //
126 // Command contols whether ARM will be applied or not
127 //
128 armCmd = new G4UIcmdWithABool ("/grdm/applyARM",this);
129 armCmd->SetGuidance("True: ARM is applied; false: no");
130 armCmd->SetParameterName("applyARM",true);
131 armCmd->SetDefaultValue(true);
132 //
133 // Command to set the h-l thresold for isomer production
134 //
135 hlthCmd = new G4UIcmdWithADoubleAndUnit("/grdm/hlThreshold",this);
136 hlthCmd->SetGuidance("Set the h-l threshold for isomer production");
137 hlthCmd->SetParameterName("hlThreshold",false);
138 hlthCmd->SetRange("hlThreshold>0.");
139 hlthCmd->SetUnitCategory("Time");
140 hlthCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
141 //
142 // Command to define the incident particle source time profile.
143 //
144 sourcetimeprofileCmd = new
145 G4UIcmdWithAString("/grdm/sourceTimeProfile",this);
146 sourcetimeprofileCmd->SetGuidance
147 ("Supply the name of the ascii file containing the source particle time profile");
148 sourcetimeprofileCmd->SetParameterName("STimeProfile",true);
149 sourcetimeprofileCmd->SetDefaultValue("source.data");
150 //
151 //
152 // Command to define the incident particle source time profile.
153 //
154 decaybiasprofileCmd = new
155 G4UIcmdWithAString("/grdm/decayBiasProfile",this);
156 decaybiasprofileCmd->SetGuidance
157 ("Supply the name of the ascii file containing the decay bias time profile");
158 decaybiasprofileCmd->SetParameterName("DBiasProfile",true);
159 decaybiasprofileCmd->SetDefaultValue("bias.data");
160 //
161
162 //
163 // This command setup the nuclei spliting parameter
164 //
165 splitnucleiCmd = new G4UIcmdWithAnInteger("/grdm/splitNuclei",this);
166 splitnucleiCmd->SetGuidance("Set number of spliting for the isotopes.");
167 splitnucleiCmd->SetParameterName("NSplit",true);
168 splitnucleiCmd->SetDefaultValue(1);
169 splitnucleiCmd->SetRange("NSplit>=1");
170
171 //
172 // This command setup the verbose level of radioactive decay
173 //
174 verboseCmd = new G4UIcmdWithAnInteger("/grdm/verbose",this);
175 verboseCmd->SetGuidance("Set verbose level: 0, 1, 2 or 3");
176 verboseCmd->SetParameterName("VerboseLevel",true);
177 verboseCmd->SetDefaultValue(1);
178 verboseCmd->SetRange("VerboseLevel>=0");
179
180}
181////////////////////////////////////////////////////////////////////////////////
182//
183G4RadioactiveDecaymessenger::~G4RadioactiveDecaymessenger ()
184{
185 delete grdmDirectory;
186 delete nucleuslimitsCmd;
187 delete sourcetimeprofileCmd;
188 delete decaybiasprofileCmd;
189 delete analoguemcCmd;
190 delete fbetaCmd;
191 delete brbiasCmd;
192 delete splitnucleiCmd;
193 delete verboseCmd;
194 delete avolumeCmd;
195 delete deavolumeCmd;
196 delete allvolumesCmd;
197 delete deallvolumesCmd;
198 delete icmCmd;
199 delete armCmd;
200 delete hlthCmd;
201}
202////////////////////////////////////////////////////////////////////////////////
203//
204void G4RadioactiveDecaymessenger::SetNewValue (G4UIcommand *command, G4String newValues)
205{
206 if (command==nucleuslimitsCmd) {theRadioactiveDecayContainer->
207 SetNucleusLimits(nucleuslimitsCmd->GetNewNucleusLimitsValue(newValues));}
208 else if (command==analoguemcCmd) {
209 G4int vl;
210 const char* t = newValues;
211 std::istringstream is(t);
212 is >> vl;
213 theRadioactiveDecayContainer->SetAnalogueMonteCarlo(vl!=0);}
214 else if (command==fbetaCmd) {
215 G4int vl;
216 const char* t = newValues;
217 std::istringstream is(t);
218 is >> vl;
219 theRadioactiveDecayContainer->SetFBeta(vl!=0);}
220 else if (command==avolumeCmd) {theRadioactiveDecayContainer->
221 SelectAVolume(newValues);}
222 else if (command==deavolumeCmd) {theRadioactiveDecayContainer->
223 DeselectAVolume(newValues);}
224 else if (command==allvolumesCmd) {theRadioactiveDecayContainer->
225 SelectAllVolumes();}
226 else if (command==deallvolumesCmd) {theRadioactiveDecayContainer->
227 DeselectAllVolumes();}
228 else if (command==brbiasCmd) {
229 G4int vl;
230 const char* t = newValues;
231 std::istringstream is(t);
232 is >> vl;
233 theRadioactiveDecayContainer->SetBRBias(vl!=0);}
234 else if (command==sourcetimeprofileCmd) {theRadioactiveDecayContainer->
235 SetSourceTimeProfile(newValues);}
236 else if (command==decaybiasprofileCmd) {theRadioactiveDecayContainer->
237 SetDecayBias(newValues);}
238 else if (command==splitnucleiCmd) {theRadioactiveDecayContainer->
239 SetSplitNuclei(splitnucleiCmd->GetNewIntValue(newValues));}
240 else if (command==verboseCmd) {theRadioactiveDecayContainer->
241 SetVerboseLevel(verboseCmd->GetNewIntValue(newValues));}
242 else if (command==icmCmd ) {theRadioactiveDecayContainer->
243 SetICM(icmCmd->GetNewBoolValue(newValues));}
244 else if (command==armCmd ) {theRadioactiveDecayContainer->
245 SetARM(armCmd->GetNewBoolValue(newValues));}
246 else if (command==hlthCmd ) {theRadioactiveDecayContainer->
247 SetHLThreshold(hlthCmd->GetNewDoubleValue(newValues));}
248}
249
250
251
252
253
254
Note: See TracBrowser for help on using the repository browser.