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 "DsG4RadioactiveDecaymessenger.hh"
00029
00030 #include <sstream>
00031
00033
00034 DsG4RadioactiveDecaymessenger::DsG4RadioactiveDecaymessenger
00035 (DsG4RadioactiveDecay* theRadioactiveDecayContainer1)
00036 :theRadioactiveDecayContainer(theRadioactiveDecayContainer1)
00037 {
00038
00039
00040
00041
00042
00043 grdmDirectory = new G4UIdirectory("/grdm/");
00044 grdmDirectory->SetGuidance("Controls for the Radioactive Decay Module.");
00045
00046
00047
00048
00049 nucleuslimitsCmd = new
00050 G4UIcmdWithNucleusLimits("/grdm/nucleusLimits",this);
00051 nucleuslimitsCmd->SetGuidance
00052 ("Set the amotic weight and number limits for the RDM.");
00053 nucleuslimitsCmd->SetParameterName("aMin","aMax","zMin","zMax",true);
00054
00055
00056
00057
00058
00059
00060 analoguemcCmd = new G4UIcmdWithABool ("/grdm/analogueMC",this);
00061 analoguemcCmd->SetGuidance("false: variance reduction method; true: analogue method");
00062 analoguemcCmd->SetParameterName("AnalogueMC",true);
00063 analoguemcCmd->SetDefaultValue(true);
00064
00065
00066
00067
00068 fbetaCmd = new G4UIcmdWithABool ("/grdm/fBeta",this);
00069 fbetaCmd->SetGuidance("false: use 3-body decay, true: use histogram method");
00070 fbetaCmd->SetParameterName("fBeta",true);
00071 fbetaCmd->SetDefaultValue(false);
00072
00073
00074
00075
00076
00077 avolumeCmd = new
00078 G4UIcmdWithAString("/grdm/selectVolume",this);
00079 avolumeCmd->SetGuidance
00080 ("Suppply a logical volumes name to add it to the RDM apply list");
00081 avolumeCmd->SetParameterName("aVolume",false);
00082
00083
00084
00085
00086
00087 deavolumeCmd = new
00088 G4UIcmdWithAString("/grdm/deselectVolume",this);
00089 deavolumeCmd->SetGuidance
00090 ("Suppply a logical volumes name to remove it from the RDM apply list");
00091 deavolumeCmd->SetParameterName("aVolume",false);
00092
00093
00094
00095
00096 allvolumesCmd = new
00097 G4UIcmdWithoutParameter("/grdm/allVolumes",this);
00098 allvolumesCmd->SetGuidance
00099 (" apply RDM to all logical volumes. No parameter required.");
00100
00101
00102
00103
00104
00105 deallvolumesCmd = new
00106 G4UIcmdWithoutParameter("/grdm/noVolumes",this);
00107 deallvolumesCmd->SetGuidance
00108 (" RDM is not applied to any logical volumes");
00109
00110
00111
00112
00113
00114 brbiasCmd = new G4UIcmdWithABool ("/grdm/BRbias",this);
00115 brbiasCmd->SetGuidance("false: no biasing; true: all branches are treated as equal");
00116 brbiasCmd->SetParameterName("BRBias",true);
00117 brbiasCmd->SetDefaultValue(true);
00118
00119
00120
00121
00122 sourcetimeprofileCmd = new
00123 G4UIcmdWithAString("/grdm/sourceTimeProfile",this);
00124 sourcetimeprofileCmd->SetGuidance
00125 ("Supply the name of the ascii file containing the source particle time profile");
00126 sourcetimeprofileCmd->SetParameterName("STimeProfile",true);
00127 sourcetimeprofileCmd->SetDefaultValue("source.data");
00128
00129
00130
00131
00132 decaybiasprofileCmd = new
00133 G4UIcmdWithAString("/grdm/decayBiasProfile",this);
00134 decaybiasprofileCmd->SetGuidance
00135 ("Supply the name of the ascii file containing the decay bias time profile");
00136 decaybiasprofileCmd->SetParameterName("DBiasProfile",true);
00137 decaybiasprofileCmd->SetDefaultValue("bias.data");
00138
00139
00140
00141
00142
00143 splitnucleiCmd = new G4UIcmdWithAnInteger("/grdm/splitNuclei",this);
00144 splitnucleiCmd->SetGuidance("Set number of spliting for the isotopes.");
00145 splitnucleiCmd->SetParameterName("NSplit",true);
00146 splitnucleiCmd->SetDefaultValue(1);
00147 splitnucleiCmd->SetRange("NSplit>=1");
00148
00149
00150
00151
00152 verboseCmd = new G4UIcmdWithAnInteger("/grdm/verbose",this);
00153 verboseCmd->SetGuidance("Set verbose level: 0, 1, 2 or 3");
00154 verboseCmd->SetParameterName("VerboseLevel",true);
00155 verboseCmd->SetDefaultValue(1);
00156 verboseCmd->SetRange("VerboseLevel>=0");
00157
00158 }
00160
00161 DsG4RadioactiveDecaymessenger::~DsG4RadioactiveDecaymessenger ()
00162 {
00163 delete grdmDirectory;
00164 delete nucleuslimitsCmd;
00165 delete sourcetimeprofileCmd;
00166 delete decaybiasprofileCmd;
00167 delete analoguemcCmd;
00168 delete fbetaCmd;
00169 delete brbiasCmd;
00170 delete splitnucleiCmd;
00171 delete verboseCmd;
00172 delete avolumeCmd;
00173 delete deavolumeCmd;
00174 delete allvolumesCmd;
00175 delete deallvolumesCmd;
00176 }
00178
00179 void DsG4RadioactiveDecaymessenger::SetNewValue (G4UIcommand *command, G4String newValues)
00180 {
00181 if (command==nucleuslimitsCmd) {theRadioactiveDecayContainer->
00182 SetNucleusLimits(nucleuslimitsCmd->GetNewNucleusLimitsValue(newValues));}
00183 else if (command==analoguemcCmd) {
00184 G4int vl;
00185 const char* t = newValues;
00186 std::istringstream is(t);
00187 is >> vl;
00188 theRadioactiveDecayContainer->SetAnalogueMonteCarlo(vl!=0);}
00189 else if (command==fbetaCmd) {
00190 G4int vl;
00191 const char* t = newValues;
00192 std::istringstream is(t);
00193 is >> vl;
00194 theRadioactiveDecayContainer->SetFBeta(vl!=0);}
00195 else if (command==avolumeCmd) {theRadioactiveDecayContainer->
00196 SelectAVolume(newValues);}
00197 else if (command==deavolumeCmd) {theRadioactiveDecayContainer->
00198 DeselectAVolume(newValues);}
00199 else if (command==allvolumesCmd) {theRadioactiveDecayContainer->
00200 SelectAllVolumes();}
00201 else if (command==deallvolumesCmd) {theRadioactiveDecayContainer->
00202 DeselectAllVolumes();}
00203 else if (command==brbiasCmd) {
00204 G4int vl;
00205 const char* t = newValues;
00206 std::istringstream is(t);
00207 is >> vl;
00208 theRadioactiveDecayContainer->SetBRBias(vl!=0);}
00209 else if (command==sourcetimeprofileCmd) {theRadioactiveDecayContainer->
00210 SetSourceTimeProfile(newValues);}
00211 else if (command==decaybiasprofileCmd) {theRadioactiveDecayContainer->
00212 SetDecayBias(newValues);}
00213 else if (command==splitnucleiCmd) {theRadioactiveDecayContainer->
00214 SetSplitNuclei(splitnucleiCmd->GetNewIntValue(newValues));}
00215 else if (command==verboseCmd) {theRadioactiveDecayContainer->
00216 SetVerboseLevel(verboseCmd->GetNewIntValue(newValues));}
00217 }
00218
00219
00220
00221
00222
00223