Geant4-11
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4RadioactiveDecayMessenger.cc
Go to the documentation of this file.
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
28// //
29// File: G4RadioactiveDecayMessenger.cc //
30// Author: D.H. Wright (SLAC) //
31// Date: 29 August 2017 //
32// Description: messenger class for the non-biased version of //
33// G4RadioactiveDecay. Based on the code of F. Lei and //
34// P.R. Truscott. //
35// //
37
39#include "G4NuclearLevelData.hh"
40#include <sstream>
42
43
45(G4RadioactiveDecay* theRadioactiveDecayContainer1)
46:theRadioactiveDecayContainer(theRadioactiveDecayContainer1)
47{
48 rdmDirectory = new G4UIdirectory("/process/had/rdm/");
49 rdmDirectory->SetGuidance("Controls for the Radioactive Decay Module.");
50
51 // Command to define the limits on nucleus the RDM will treat.
52 nucleuslimitsCmd = new G4UIcmdWithNucleusLimits("/process/had/rdm/nucleusLimits",this);
53 nucleuslimitsCmd->SetGuidance("Set the atomic weight and number limits for the RDM.");
54 nucleuslimitsCmd->SetParameterName("AMin","AMax","ZMin","ZMax",true);
55
56 // Select a logical volume for RDM
57 avolumeCmd = new G4UIcmdWithAString("/process/had/rdm/selectVolume",this);
58 avolumeCmd->SetGuidance("Supply a logical volumes name to add it to the RDM apply list");
59 avolumeCmd->SetParameterName("AVolume",false);
60
61 // De-select a logical volume for RDM
62 deavolumeCmd = new G4UIcmdWithAString("/process/had/rdm/deselectVolume",this);
63 deavolumeCmd->SetGuidance("Supply a logical volumes name to remove it from the RDM apply list");
64 deavolumeCmd->SetParameterName("AVolume",false);
65
66 // Select all logical volumes for RDM
67 allvolumesCmd = new G4UIcmdWithoutParameter("/process/had/rdm/allVolumes",this);
68 allvolumesCmd->SetGuidance(" apply RDM to all logical volumes. No parameter required.");
69 // allvolumeCmd->SetParameterName("AddAVolume",true);
70
71 // De-select all logical volumes for RDM
72 deallvolumesCmd = new G4UIcmdWithoutParameter("/process/had/rdm/noVolumes",this);
73 deallvolumesCmd->SetGuidance(" RDM is not applied to any logical volumes");
74 // deallvolumesCmd->SetParameterName("RemoveAVolume",true);
75
76 // Command to invoke internal conversion or not
77 icmCmd = new G4UIcmdWithABool("/process/had/rdm/applyICM",this);
78 icmCmd->SetGuidance("Command not active; kept for backward compatibility.");
79 icmCmd->SetGuidance("Internal conversion is always turned on.");
80 icmCmd->SetParameterName("ApplyICM",true);
82
83 // Command to invoke atomic relaxation or not
84 armCmd = new G4UIcmdWithABool("/process/had/rdm/applyARM",this);
85 armCmd->SetGuidance("True: ARM is applied; false: no");
86 armCmd->SetParameterName("ApplyARM",true);
88 //armCmd->AvailableForStates(G4State_PreInit);
89
90 // Command to set the directional bias (collimation) vector
91 colldirCmd = new G4UIcmdWith3Vector("/process/had/rdm/decayDirection",this);
92 colldirCmd->SetGuidance("Supply the direction vector for decay products");
93 colldirCmd->SetParameterName("X","Y","Z",false);
94
95 // Command to set the directional bias (collimation) half angle ("cone")
96 collangleCmd = new G4UIcmdWithADoubleAndUnit("/process/had/rdm/decayHalfAngle",this);
97 collangleCmd->SetGuidance("Supply maximum angle from direction vector for decay products");
98 collangleCmd->SetParameterName("HalfAngle",false);
100
101 // This command setup the verbose level of radioactive decay
102 verboseCmd = new G4UIcmdWithAnInteger("/process/had/rdm/verbose",this);
103 verboseCmd->SetGuidance("Set verbose level: 0, 1, 2 or 3");
104 verboseCmd->SetParameterName("VerboseLevel",true);
106 verboseCmd->SetRange("VerboseLevel>=0");
107
108 // Use a user-defined decay datafile for a given isotope
109 userDecayDataCmd = new G4UIcommand("/process/had/rdm/setRadioactiveDecayFile",this);
110 userDecayDataCmd->SetGuidance("Supply user-defined radioactive decay data file");
111 G4UIparameter* Z_para= new G4UIparameter("Z_isotope",'i',true);
112 Z_para->SetParameterRange("Z_isotope > 0");
113 Z_para->SetGuidance("Z: Charge number of isotope");
114 G4UIparameter* A_para= new G4UIparameter("A_isotope",'i',true);
115 A_para->SetParameterRange("A_isotope > 1");
116 A_para->SetGuidance("A: mass number of isotope");
117 G4UIparameter* FileName_para= new G4UIparameter("file_name",'s',true);
118 FileName_para->SetGuidance("Name of the user data file");
121 userDecayDataCmd->SetParameter(FileName_para);
122
123 // Use a user-defined evaporation data file for a given isotope
124 userEvaporationDataCmd = new G4UIcommand("/process/had/rdm/setPhotoEvaporationFile",this);
125 userEvaporationDataCmd->SetGuidance("Supply user-defined photon evaporation data file");
126 G4UIparameter* Zpara= new G4UIparameter("Z_isotope",'i',true);
127 Zpara->SetParameterRange("Z_isotope > 0");
128 Zpara->SetGuidance("Z: Charge number of isotope");
129 G4UIparameter* Apara= new G4UIparameter("A_isotope",'i',true);
130 Apara->SetParameterRange("A_isotope > 1");
131 Apara->SetGuidance("A: mass number of isotope");
132 G4UIparameter* FileNamepara= new G4UIparameter("file_name",'s',true);
133 FileNamepara->SetGuidance("Name of the user data file");
137
138 // Command to set the threshold for very long decay time (i.e. radioactive
139 // decays of nuclides at rest happening later than this threshold are ignored)
140 thresholdForVeryLongDecayTimeCmd = new G4UIcmdWithADoubleAndUnit("/process/had/rdm/thresholdForVeryLongDecayTime",this);
141 thresholdForVeryLongDecayTimeCmd->SetGuidance("Ignore decays at rest of nuclides happening after this time threshold");
142 thresholdForVeryLongDecayTimeCmd->SetParameterName("ThresholdForVeryLongDecayTime",false);
144}
145
146
148{
149 delete rdmDirectory;
150 delete nucleuslimitsCmd;
151 delete verboseCmd;
152 delete avolumeCmd;
153 delete deavolumeCmd;
154 delete allvolumesCmd;
155 delete deallvolumesCmd;
156 delete icmCmd;
157 delete armCmd;
158 delete userDecayDataCmd;
160 delete colldirCmd;
161 delete collangleCmd;
163}
164
165
166void
168{
169 if ( command == nucleuslimitsCmd ) {
171 SetNucleusLimits( nucleuslimitsCmd->GetNewNucleusLimitsValue( newValues ) );
172 } else if ( command == avolumeCmd ) {
174 } else if ( command == deavolumeCmd ) {
176 } else if ( command == allvolumesCmd ) {
178 } else if ( command == deallvolumesCmd ) {
180 } else if ( command == verboseCmd ) {
182 } else if ( command == icmCmd ) {
184 } else if ( command == armCmd ) {
186 } else if ( command == userDecayDataCmd ) {
187 G4int Z,A;
188 G4String file_name;
189 const char* nv = (const char*)newValues;
190 std::istringstream is(nv);
191 is >> Z >> A >> file_name;
193 } else if ( command == userEvaporationDataCmd ) {
194 G4int Z,A;
195 G4String file_name;
196 const char* nv = (const char*)newValues;
197 std::istringstream is(nv);
198 is >> Z >> A >> file_name;
200 } else if ( command == colldirCmd ) {
202 } else if ( command == collangleCmd ) {
204 } else if ( command == thresholdForVeryLongDecayTimeCmd ) {
206 }
207}
208
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]
G4bool AddPrivateData(G4int Z, G4int A, const G4String &filename)
static G4NuclearLevelData * GetInstance()
G4UIcmdWithNucleusLimits * nucleuslimitsCmd
G4UIcmdWithADoubleAndUnit * thresholdForVeryLongDecayTimeCmd
G4UIcmdWithoutParameter * deallvolumesCmd
G4RadioactiveDecay * theRadioactiveDecayContainer
G4UIcmdWithADoubleAndUnit * collangleCmd
G4RadioactiveDecayMessenger(G4RadioactiveDecay *theRadioactiveDecayContainer)
void SetNewValue(G4UIcommand *command, G4String newValues)
G4UIcmdWithoutParameter * allvolumesCmd
void SelectAVolume(const G4String &aVolume)
void SetVerboseLevel(G4int value)
void SetICM(G4bool icm)
void SetDecayHalfAngle(G4double halfAngle=0.*CLHEP::deg)
void SetDecayDirection(const G4ThreeVector &theDir)
void SetARM(G4bool arm)
void SetThresholdForVeryLongDecayTime(const G4double inputThreshold)
void AddUserDecayDataFile(G4int Z, G4int A, G4String filename)
void DeselectAVolume(const G4String &aVolume)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetUnitCategory(const char *unitCategory)
static G4double GetNewDoubleValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
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 SetDefaultValue(G4int defVal)
G4NucleusLimits GetNewNucleusLimitsValue(G4String paramString)
void SetParameterName(const char *theNameAMin, const char *theNameAMax, const char *theNameZMin, const char *theNameZMax, G4bool omittable, G4bool currentAsDefault=true)
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:146
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void SetRange(const char *rs)
Definition: G4UIcommand.hh:120
void SetGuidance(const char *theGuidance)
void SetParameterRange(const char *theRange)