00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "G4RadioactiveDecaymessenger.hh"
00029 #include "G4NuclearLevelStore.hh"
00030
00031 #include <sstream>
00032
00034
00035 G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger
00036 (G4RadioactiveDecay* theRadioactiveDecayContainer1)
00037 :theRadioactiveDecayContainer(theRadioactiveDecayContainer1)
00038 {
00039
00040
00041
00042
00043
00044 grdmDirectory = new G4UIdirectory("/grdm/");
00045 grdmDirectory->SetGuidance("Controls for the Radioactive Decay Module.");
00046
00047
00048
00049
00050 nucleuslimitsCmd = new
00051 G4UIcmdWithNucleusLimits("/grdm/nucleusLimits",this);
00052 nucleuslimitsCmd->SetGuidance
00053 ("Set the atomic weight and number limits for the RDM.");
00054 nucleuslimitsCmd->SetParameterName("aMin","aMax","zMin","zMax",true);
00055
00056
00057
00058
00059
00060
00061 analoguemcCmd = new G4UIcmdWithABool ("/grdm/analogueMC",this);
00062 analoguemcCmd->SetGuidance("false: variance reduction method; true: analogue method");
00063 analoguemcCmd->SetParameterName("AnalogueMC",true);
00064 analoguemcCmd->SetDefaultValue(true);
00065
00066
00067
00068
00069 fbetaCmd = new G4UIcmdWithABool ("/grdm/fBeta",this);
00070 fbetaCmd->SetGuidance("false: use 3-body decay, true: use histogram method");
00071 fbetaCmd->SetParameterName("fBeta",true);
00072 fbetaCmd->SetDefaultValue(false);
00073
00074
00075
00076
00077
00078 avolumeCmd = new
00079 G4UIcmdWithAString("/grdm/selectVolume",this);
00080 avolumeCmd->SetGuidance
00081 ("Suppply a logical volumes name to add it to the RDM apply list");
00082 avolumeCmd->SetParameterName("aVolume",false);
00083
00084
00085
00086
00087
00088 deavolumeCmd = new
00089 G4UIcmdWithAString("/grdm/deselectVolume",this);
00090 deavolumeCmd->SetGuidance
00091 ("Suppply a logical volumes name to remove it from the RDM apply list");
00092 deavolumeCmd->SetParameterName("aVolume",false);
00093
00094
00095
00096
00097 allvolumesCmd = new
00098 G4UIcmdWithoutParameter("/grdm/allVolumes",this);
00099 allvolumesCmd->SetGuidance
00100 (" apply RDM to all logical volumes. No parameter required.");
00101
00102
00103
00104
00105
00106 deallvolumesCmd = new
00107 G4UIcmdWithoutParameter("/grdm/noVolumes",this);
00108 deallvolumesCmd->SetGuidance
00109 (" RDM is not applied to any logical volumes");
00110
00111
00112
00113
00114
00115 brbiasCmd = new G4UIcmdWithABool ("/grdm/BRbias",this);
00116 brbiasCmd->SetGuidance("false: no biasing; true: all branches are treated as equal");
00117 brbiasCmd->SetParameterName("BRBias",true);
00118 brbiasCmd->SetDefaultValue(true);
00119
00120
00121
00122 icmCmd = new G4UIcmdWithABool ("/grdm/applyICM",this);
00123 icmCmd->SetGuidance("True: ICM is applied; false: no");
00124 icmCmd->SetParameterName("applyICM",true);
00125 icmCmd->SetDefaultValue(true);
00126
00127
00128
00129
00130 armCmd = new G4UIcmdWithABool ("/grdm/applyARM",this);
00131 armCmd->SetGuidance("True: ARM is applied; false: no");
00132 armCmd->SetParameterName("applyARM",true);
00133 armCmd->SetDefaultValue(true);
00134
00135
00136
00137
00138 hlthCmd = new G4UIcmdWithADoubleAndUnit("/grdm/hlThreshold",this);
00139 hlthCmd->SetGuidance("Set the h-l threshold for isomer production");
00140 hlthCmd->SetParameterName("hlThreshold",false);
00141
00142 hlthCmd->SetUnitCategory("Time");
00143
00144
00145
00146
00147 sourcetimeprofileCmd = new
00148 G4UIcmdWithAString("/grdm/sourceTimeProfile",this);
00149 sourcetimeprofileCmd->SetGuidance
00150 ("Supply the name of the ascii file containing the source particle time profile");
00151 sourcetimeprofileCmd->SetParameterName("STimeProfile",true);
00152 sourcetimeprofileCmd->SetDefaultValue("source.data");
00153
00154
00155
00156
00157 decaybiasprofileCmd = new
00158 G4UIcmdWithAString("/grdm/decayBiasProfile",this);
00159 decaybiasprofileCmd->SetGuidance
00160 ("Supply the name of the ascii file containing the decay bias time profile");
00161 decaybiasprofileCmd->SetParameterName("DBiasProfile",true);
00162 decaybiasprofileCmd->SetDefaultValue("bias.data");
00163
00164
00165
00166
00167 colldirCmd = new G4UIcmdWith3Vector("/grdm/decayDirection",this);
00168 colldirCmd->SetGuidance("Supply the direction vector for decay products");
00169 colldirCmd->SetParameterName("X","Y","Z",false);
00170
00171
00172
00173
00174 collangleCmd = new G4UIcmdWithADoubleAndUnit("/grdm/decayHalfAngle",this);
00175 collangleCmd->SetGuidance
00176 ("Supply maximum angle from direction vector for decay products");
00177 collangleCmd->SetParameterName("halfAngle",false);
00178 collangleCmd->SetUnitCategory("Angle");
00179
00180
00181
00182
00183 splitnucleiCmd = new G4UIcmdWithAnInteger("/grdm/splitNuclei",this);
00184 splitnucleiCmd->SetGuidance("Set number of spliting for the isotopes.");
00185 splitnucleiCmd->SetParameterName("NSplit",true);
00186 splitnucleiCmd->SetDefaultValue(1);
00187 splitnucleiCmd->SetRange("NSplit>=1");
00188
00189
00190
00191
00192 verboseCmd = new G4UIcmdWithAnInteger("/grdm/verbose",this);
00193 verboseCmd->SetGuidance("Set verbose level: 0, 1, 2 or 3");
00194 verboseCmd->SetParameterName("VerboseLevel",true);
00195 verboseCmd->SetDefaultValue(1);
00196 verboseCmd->SetRange("VerboseLevel>=0");
00197
00198
00199
00200
00201
00202 userDecayDataCmd = new G4UIcommand("/grdm/setRadioactiveDecayFile",this);
00203 G4UIparameter* Z_para= new G4UIparameter("Z_isotope",'i',true);
00204 Z_para->SetParameterRange("Z_isotope > 0");
00205 Z_para->SetGuidance("Z: Charge number of isotope");
00206
00207
00208 G4UIparameter* A_para= new G4UIparameter("A_isotope",'i',true);
00209 A_para->SetParameterRange("A_isotope > 1");
00210 A_para->SetGuidance("A: mass number of isotope");
00211
00212 G4UIparameter* FileName_para= new G4UIparameter("file_name",'s',true);
00213 FileName_para->SetGuidance("Name of the user data file");
00214 userDecayDataCmd->SetParameter(Z_para);
00215 userDecayDataCmd->SetParameter(A_para);
00216 userDecayDataCmd->SetParameter(FileName_para);
00217
00218
00219
00220
00221
00222 userEvaporationDataCmd = new G4UIcommand("/grdm/setPhotoEvaporationFile",this);
00223 userEvaporationDataCmd->SetParameter(Z_para);
00224 userEvaporationDataCmd->SetParameter(A_para);
00225 userEvaporationDataCmd->SetParameter(FileName_para);
00226
00227
00228 }
00230
00231 G4RadioactiveDecaymessenger::~G4RadioactiveDecaymessenger ()
00232 {
00233 delete grdmDirectory;
00234 delete nucleuslimitsCmd;
00235 delete sourcetimeprofileCmd;
00236 delete decaybiasprofileCmd;
00237 delete analoguemcCmd;
00238 delete fbetaCmd;
00239 delete brbiasCmd;
00240 delete splitnucleiCmd;
00241 delete verboseCmd;
00242 delete avolumeCmd;
00243 delete deavolumeCmd;
00244 delete allvolumesCmd;
00245 delete deallvolumesCmd;
00246 delete icmCmd;
00247 delete armCmd;
00248 delete hlthCmd;
00249 delete userDecayDataCmd;
00250 delete userEvaporationDataCmd;
00251 delete colldirCmd;
00252 delete collangleCmd;
00253
00254 }
00256
00257 void G4RadioactiveDecaymessenger::SetNewValue (G4UIcommand *command, G4String newValues)
00258 {
00259 if (command==nucleuslimitsCmd) {theRadioactiveDecayContainer->
00260 SetNucleusLimits(nucleuslimitsCmd->GetNewNucleusLimitsValue(newValues));}
00261 else if (command==analoguemcCmd) {theRadioactiveDecayContainer->
00262 SetAnalogueMonteCarlo(analoguemcCmd->GetNewBoolValue(newValues));}
00263 else if (command==fbetaCmd) {theRadioactiveDecayContainer->
00264 SetFBeta(fbetaCmd->GetNewBoolValue(newValues));}
00265 else if (command==avolumeCmd) {theRadioactiveDecayContainer->
00266 SelectAVolume(newValues);}
00267 else if (command==deavolumeCmd) {theRadioactiveDecayContainer->
00268 DeselectAVolume(newValues);}
00269 else if (command==allvolumesCmd) {theRadioactiveDecayContainer->
00270 SelectAllVolumes();}
00271 else if (command==deallvolumesCmd) {theRadioactiveDecayContainer->
00272 DeselectAllVolumes();}
00273 else if (command==brbiasCmd) {theRadioactiveDecayContainer->
00274 SetBRBias(brbiasCmd->GetNewBoolValue(newValues));}
00275 else if (command==sourcetimeprofileCmd) {theRadioactiveDecayContainer->
00276 SetSourceTimeProfile(newValues);}
00277 else if (command==decaybiasprofileCmd) {theRadioactiveDecayContainer->
00278 SetDecayBias(newValues);}
00279 else if (command==splitnucleiCmd) {theRadioactiveDecayContainer->
00280 SetSplitNuclei(splitnucleiCmd->GetNewIntValue(newValues));}
00281 else if (command==verboseCmd) {theRadioactiveDecayContainer->
00282 SetVerboseLevel(verboseCmd->GetNewIntValue(newValues));}
00283 else if (command==icmCmd ) {theRadioactiveDecayContainer->
00284 SetICM(icmCmd->GetNewBoolValue(newValues));}
00285 else if (command==armCmd ) {theRadioactiveDecayContainer->
00286 SetARM(armCmd->GetNewBoolValue(newValues));}
00287 else if (command==hlthCmd ) {theRadioactiveDecayContainer->
00288 SetHLThreshold(hlthCmd->GetNewDoubleValue(newValues));}
00289
00290 else if (command ==userDecayDataCmd){
00291 G4int Z,A;
00292 G4String file_name;
00293 const char* nv = (const char*)newValues;
00294 std::istringstream is(nv);
00295 is >> Z>>A>>file_name;
00296 theRadioactiveDecayContainer->AddUserDecayDataFile(Z,A,file_name);
00297 }
00298 else if (command ==userEvaporationDataCmd){
00299 G4int Z,A;
00300 G4String file_name;
00301 const char* nv = (const char*)newValues;
00302 std::istringstream is(nv);
00303 is >> Z>>A>>file_name;
00304 G4NuclearLevelStore::GetInstance()->AddUserEvaporationDataFile(Z,A,file_name);
00305 }
00306 else if (command==colldirCmd) {theRadioactiveDecayContainer->
00307 SetDecayDirection(colldirCmd->GetNew3VectorValue(newValues));}
00308 else if (command==collangleCmd) {theRadioactiveDecayContainer->
00309 SetDecayHalfAngle(collangleCmd->GetNewDoubleValue(newValues));}
00310 }
00311
00312
00313
00314
00315
00316