Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4RadioactiveDecayMessenger Class Reference

#include <G4RadioactiveDecayMessenger.hh>

Inheritance diagram for G4RadioactiveDecayMessenger:

Public Member Functions

 G4RadioactiveDecayMessenger (G4VRadioactiveDecay *)
 ~G4RadioactiveDecayMessenger () override
void SetNewValue (G4UIcommand *command, G4String newValues) override
Public Member Functions inherited from G4UImessenger
 G4UImessenger ()=default
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
virtual ~G4UImessenger ()
virtual G4String GetCurrentValue (G4UIcommand *command)
G4bool CommandsShouldBeInMaster () const

Additional Inherited Members

Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
G4String LtoS (G4long l)
G4String DtoS (G4double a)
G4String BtoS (G4bool b)
G4int StoI (const G4String &s)
G4long StoL (const G4String &s)
G4double StoD (const G4String &s)
G4bool StoB (const G4String &s)
void AddUIcommand (G4UIcommand *newCommand)
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
template<typename T>
T * CreateCommand (const G4String &cname, const G4String &dsc)
Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir = nullptr
G4String baseDirName = ""
G4bool commandsShouldBeInMaster = false

Detailed Description

Definition at line 60 of file G4RadioactiveDecayMessenger.hh.

Constructor & Destructor Documentation

◆ G4RadioactiveDecayMessenger()

G4RadioactiveDecayMessenger::G4RadioactiveDecayMessenger ( G4VRadioactiveDecay * ptr)

Definition at line 46 of file G4RadioactiveDecayMessenger.cc.

47:theRadDecay(ptr)
48{
49 rdmDirectory = new G4UIdirectory("/process/had/rdm/");
50 rdmDirectory->SetGuidance("Controls for the Radioactive Decay Module.");
51
52 // Command to define the limits on nucleus the RDM will treat.
53 nucleuslimitsCmd = new G4UIcmdWithNucleusLimits("/process/had/rdm/nucleusLimits",this);
54 nucleuslimitsCmd->SetGuidance("Set the atomic weight and number limits for the RDM.");
55 nucleuslimitsCmd->SetParameterName("AMin","AMax","ZMin","ZMax",true);
56
57 // Select a logical volume for RDM
58 avolumeCmd = new G4UIcmdWithAString("/process/had/rdm/selectVolume",this);
59 avolumeCmd->SetGuidance("Supply a logical volumes name to add it to the RDM apply list");
60 avolumeCmd->SetParameterName("AVolume",false);
61
62 // De-select a logical volume for RDM
63 deavolumeCmd = new G4UIcmdWithAString("/process/had/rdm/deselectVolume",this);
64 deavolumeCmd->SetGuidance("Supply a logical volumes name to remove it from the RDM apply list");
65 deavolumeCmd->SetParameterName("AVolume",false);
66
67 // Select all logical volumes for RDM
68 allvolumesCmd = new G4UIcmdWithoutParameter("/process/had/rdm/allVolumes",this);
69 allvolumesCmd->SetGuidance(" apply RDM to all logical volumes. No parameter required.");
70 // allvolumeCmd->SetParameterName("AddAVolume",true);
71
72 // De-select all logical volumes for RDM
73 deallvolumesCmd = new G4UIcmdWithoutParameter("/process/had/rdm/noVolumes",this);
74 deallvolumesCmd->SetGuidance(" RDM is not applied to any logical volumes");
75 // deallvolumesCmd->SetParameterName("RemoveAVolume",true);
76
77 // Command to invoke atomic relaxation or not
78 armCmd = new G4UIcmdWithABool("/process/had/rdm/applyARM",this);
79 armCmd->SetGuidance("True: ARM is applied; false: no");
80 armCmd->SetParameterName("ApplyARM",true);
81 armCmd->SetDefaultValue(true);
82 //armCmd->AvailableForStates(G4State_PreInit);
83
84 // Command to set the directional bias (collimation) vector
85 colldirCmd = new G4UIcmdWith3Vector("/process/had/rdm/decayDirection",this);
86 colldirCmd->SetGuidance("Supply the direction vector for decay products");
87 colldirCmd->SetParameterName("X","Y","Z",false);
88
89 // Command to set the directional bias (collimation) half angle ("cone")
90 collangleCmd = new G4UIcmdWithADoubleAndUnit("/process/had/rdm/decayHalfAngle",this);
91 collangleCmd->SetGuidance("Supply maximum angle from direction vector for decay products");
92 collangleCmd->SetParameterName("HalfAngle",false);
93 collangleCmd->SetUnitCategory("Angle");
94
95 // This command setup the verbose level of radioactive decay
96 verboseCmd = new G4UIcmdWithAnInteger("/process/had/rdm/verbose",this);
97 verboseCmd->SetGuidance("Set verbose level: 0, 1, 2 or 3");
98 verboseCmd->SetParameterName("VerboseLevel",true);
99 verboseCmd->SetDefaultValue(1);
100 verboseCmd->SetRange("VerboseLevel>=0");
101
102 // Use a user-defined decay datafile for a given isotope
103 userDecayDataCmd = new G4UIcommand("/process/had/rdm/setRadioactiveDecayFile",this);
104 userDecayDataCmd->SetGuidance("Supply user-defined radioactive decay data file");
105 G4UIparameter* Z_para= new G4UIparameter("Z_isotope",'i',true);
106 Z_para->SetParameterRange("Z_isotope > 0");
107 Z_para->SetGuidance("Z: Charge number of isotope");
108 G4UIparameter* A_para= new G4UIparameter("A_isotope",'i',true);
109 A_para->SetParameterRange("A_isotope > 1");
110 A_para->SetGuidance("A: mass number of isotope");
111 G4UIparameter* FileName_para= new G4UIparameter("file_name",'s',true);
112 FileName_para->SetGuidance("Name of the user data file");
113 userDecayDataCmd->SetParameter(Z_para);
114 userDecayDataCmd->SetParameter(A_para);
115 userDecayDataCmd->SetParameter(FileName_para);
116
117 // Use a user-defined evaporation data file for a given isotope
118 userEvaporationDataCmd = new G4UIcommand("/process/had/rdm/setPhotoEvaporationFile",this);
119 userEvaporationDataCmd->SetGuidance("Supply user-defined photon evaporation data file");
120 G4UIparameter* Zpara= new G4UIparameter("Z_isotope",'i',true);
121 Zpara->SetParameterRange("Z_isotope > 0");
122 Zpara->SetGuidance("Z: Charge number of isotope");
123 G4UIparameter* Apara= new G4UIparameter("A_isotope",'i',true);
124 Apara->SetParameterRange("A_isotope > 1");
125 Apara->SetGuidance("A: mass number of isotope");
126 G4UIparameter* FileNamepara= new G4UIparameter("file_name",'s',true);
127 FileNamepara->SetGuidance("Name of the user data file");
128 userEvaporationDataCmd->SetParameter(Zpara);
129 userEvaporationDataCmd->SetParameter(Apara);
130 userEvaporationDataCmd->SetParameter(FileNamepara);
131
132 // Command to set the threshold for very long decay time (i.e. radioactive
133 // decays of nuclides at rest happening later than this threshold are ignored)
134 thresholdForVeryLongDecayTimeCmd = new G4UIcmdWithADoubleAndUnit("/process/had/rdm/thresholdForVeryLongDecayTime",this);
135 thresholdForVeryLongDecayTimeCmd->SetGuidance("Ignore decays at rest of nuclides happening after this time threshold");
136 thresholdForVeryLongDecayTimeCmd->SetParameterName("ThresholdForVeryLongDecayTime",false);
137 thresholdForVeryLongDecayTimeCmd->SetUnitCategory("Time");
138}
void SetGuidance(const char *theGuidance)
void SetParameterRange(const char *theRange)

◆ ~G4RadioactiveDecayMessenger()

G4RadioactiveDecayMessenger::~G4RadioactiveDecayMessenger ( )
override

Definition at line 141 of file G4RadioactiveDecayMessenger.cc.

142{
143 delete rdmDirectory;
144 delete nucleuslimitsCmd;
145 delete verboseCmd;
146 delete avolumeCmd;
147 delete deavolumeCmd;
148 delete allvolumesCmd;
149 delete deallvolumesCmd;
150 delete armCmd;
151 delete userDecayDataCmd;
152 delete userEvaporationDataCmd;
153 delete colldirCmd;
154 delete collangleCmd;
155 delete thresholdForVeryLongDecayTimeCmd;
156}

Member Function Documentation

◆ SetNewValue()

void G4RadioactiveDecayMessenger::SetNewValue ( G4UIcommand * command,
G4String newValues )
overridevirtual

Reimplemented from G4UImessenger.

Definition at line 160 of file G4RadioactiveDecayMessenger.cc.

161{
162 if ( command == nucleuslimitsCmd ) {
163 theRadDecay->
164 SetNucleusLimits( nucleuslimitsCmd->GetNewNucleusLimitsValue( newValues ) );
165 } else if ( command == avolumeCmd ) {
166 theRadDecay->SelectAVolume( newValues );
167 } else if ( command == deavolumeCmd ) {
168 theRadDecay->DeselectAVolume( newValues );
169 } else if ( command == allvolumesCmd ) {
170 theRadDecay->SelectAllVolumes();
171 } else if ( command == deallvolumesCmd ) {
172 theRadDecay->DeselectAllVolumes();
173 } else if (command == verboseCmd) {
174 theRadDecay->SetVerboseLevel(verboseCmd->GetNewIntValue(newValues) );
175 } else if (command == armCmd) {
176 theRadDecay->SetARM(armCmd->GetNewBoolValue(newValues) );
177 } else if ( command == userDecayDataCmd ) {
178 G4int Z,A;
179 G4String file_name;
180 const char* nv = (const char*)newValues;
181 std::istringstream is(nv);
182 is >> Z >> A >> file_name;
183 theRadDecay->AddUserDecayDataFile(Z,A,file_name);
184 } else if ( command == userEvaporationDataCmd ) {
185 G4int Z,A;
186 G4String file_name;
187 const char* nv = (const char*)newValues;
188 std::istringstream is(nv);
189 is >> Z >> A >> file_name;
191 } else if ( command == colldirCmd ) {
192 theRadDecay->SetDecayDirection( colldirCmd->GetNew3VectorValue( newValues ) );
193 } else if ( command == collangleCmd ) {
194 theRadDecay->SetDecayHalfAngle( collangleCmd->GetNewDoubleValue( newValues ) );
195 } else if (command == thresholdForVeryLongDecayTimeCmd) {
196 theRadDecay->SetThresholdForVeryLongDecayTime(thresholdForVeryLongDecayTimeCmd->GetNewDoubleValue(newValues) );
197 }
198}
int G4int
Definition G4Types.hh:85
const G4double A[17]
G4bool AddPrivateData(G4int Z, G4int A, const G4String &filename)
static G4NuclearLevelData * GetInstance()

The documentation for this class was generated from the following files: