| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DsG4RadioactiveDecaymessenger.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
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   // main directory for control of the RDM
00041   //
00042   //
00043   grdmDirectory = new G4UIdirectory("/grdm/");
00044   grdmDirectory->SetGuidance("Controls for the Radioactive Decay Module.");
00045   //
00046   //
00047   // Command to define the limits on nucleus the RDM will treat.
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   // The next command contols whether the decay will be treated analoguely or 
00058   // with variance reduction
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   // The next command contols whether beta decay will be treated faithfully or 
00066   // in fast mode
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   // Command to selete a logical volume for RDM.
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   // Command to de-selete a logical volume for RDM.
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   // Command to selete all logical volumes for RDM.
00095   //
00096   allvolumesCmd = new
00097     G4UIcmdWithoutParameter("/grdm/allVolumes",this);
00098   allvolumesCmd->SetGuidance 
00099     (" apply RDM to all logical volumes. No parameter required.");
00100   //  allvolumeCmd->SetParameterName("AddAVolume",true);
00101 
00102   //
00103   // Command to de-selete a logical volume for RDM.
00104   //
00105   deallvolumesCmd = new
00106     G4UIcmdWithoutParameter("/grdm/noVolumes",this);
00107   deallvolumesCmd->SetGuidance 
00108     (" RDM is not applied to any logical volumes");
00109 
00110   //  deallvolumesCmd->SetParameterName("RemoveAVolume",true);
00111   //
00112   // The next command contols whether the branching ratio biasing will be applied or not
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   // Command to define the incident particle source time profile.
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   // Command to define the incident particle source time profile.
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   // This command setup the nuclei spliting parameter
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   // This command setup the verbose level of radioactive decay
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 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:53:24 2011 for DetSim by doxygen 1.4.7