ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4RadioactivationMessenger.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4RadioactivationMessenger.cc
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
//
27
// //
28
// File: G4RadioactivationMessenger.cc //
29
// Author: D.H. Wright (SLAC) //
30
// Date: 29 August 2017 //
31
// Description: messenger class for biased version of G4RadioactiveDecay. //
32
// Based on the code of F. Lei and P.R. Truscott. //
33
// //
35
36
#include "
G4RadioactivationMessenger.hh
"
37
#include "
G4NuclearLevelData.hh
"
38
#include <sstream>
39
40
41
G4RadioactivationMessenger::G4RadioactivationMessenger
(
G4Radioactivation
* theRadioactivationContainer1)
42
:theRadioactivationContainer(theRadioactivationContainer1)
43
{
44
grdmDirectory
=
new
G4UIdirectory
(
"/grdm/"
);
45
grdmDirectory
->
SetGuidance
(
"Controls the biased version of radioactive decay"
);
46
47
// Command to turn on/off variance reduction options
48
analoguemcCmd
=
new
G4UIcmdWithABool
(
"/grdm/analogueMC"
,
this
);
49
analoguemcCmd
->
SetGuidance
(
"false: variance reduction method; true: analogue method"
);
50
analoguemcCmd
->
SetParameterName
(
"AnalogueMC"
,
true
);
51
analoguemcCmd
->
SetDefaultValue
(
true
);
52
53
// Command to use branching ratio biasing or not
54
brbiasCmd
=
new
G4UIcmdWithABool
(
"/grdm/BRbias"
,
this
);
55
brbiasCmd
->
SetGuidance
(
"false: no biasing; true: all branches are treated as equal"
);
56
brbiasCmd
->
SetParameterName
(
"BRBias"
,
true
);
57
brbiasCmd
->
SetDefaultValue
(
true
);
58
59
// Command to set the half-life thresold for isomer production
60
hlthCmd
=
new
G4UIcmdWithADoubleAndUnit
(
"/grdm/hlThreshold"
,
this
);
61
hlthCmd
->
SetGuidance
(
"Set the h-l threshold for isomer production"
);
62
hlthCmd
->
SetParameterName
(
"hlThreshold"
,
false
);
63
hlthCmd
->
SetUnitCategory
(
"Time"
);
64
65
// Command to define the incident particle source time profile
66
sourcetimeprofileCmd
=
new
G4UIcmdWithAString
(
"/grdm/sourceTimeProfile"
,
this
);
67
sourcetimeprofileCmd
->
SetGuidance
68
(
"Supply the name of the ascii file containing the source particle time profile"
);
69
sourcetimeprofileCmd
->
SetParameterName
(
"STimeProfile"
,
true
);
70
sourcetimeprofileCmd
->
SetDefaultValue
(
"source.data"
);
71
72
// Command to define the incident particle source time profile
73
decaybiasprofileCmd
=
new
G4UIcmdWithAString
(
"/grdm/decayBiasProfile"
,
this
);
74
decaybiasprofileCmd
->
SetGuidance
75
(
"Supply the name of the ascii file containing the decay bias time profile"
);
76
decaybiasprofileCmd
->
SetParameterName
(
"DBiasProfile"
,
true
);
77
decaybiasprofileCmd
->
SetDefaultValue
(
"bias.data"
);
78
79
// Command to set nuclei spliting parameter
80
splitnucleiCmd
=
new
G4UIcmdWithAnInteger
(
"/grdm/splitNuclei"
,
this
);
81
splitnucleiCmd
->
SetGuidance
(
"Set number of spliting for the isotopes."
);
82
splitnucleiCmd
->
SetParameterName
(
"NSplit"
,
true
);
83
splitnucleiCmd
->
SetDefaultValue
(1);
84
splitnucleiCmd
->
SetRange
(
"NSplit>=1"
);
85
}
86
87
88
G4RadioactivationMessenger::~G4RadioactivationMessenger
()
89
{
90
delete
grdmDirectory
;
91
delete
analoguemcCmd
;
92
delete
sourcetimeprofileCmd
;
93
delete
decaybiasprofileCmd
;
94
delete
brbiasCmd
;
95
delete
splitnucleiCmd
;
96
delete
hlthCmd
;
97
}
98
99
100
void
G4RadioactivationMessenger::SetNewValue
(
G4UIcommand
* command,
G4String
newValues)
101
{
102
if
(command==
analoguemcCmd
) {
theRadioactivationContainer
->
103
SetAnalogueMonteCarlo(
analoguemcCmd
->
GetNewBoolValue
(newValues));
104
105
}
else
if
(command==
brbiasCmd
) {
theRadioactivationContainer
->
106
SetBRBias(
brbiasCmd
->
GetNewBoolValue
(newValues));
107
108
}
else
if
(command==
sourcetimeprofileCmd
) {
theRadioactivationContainer
->
109
SetSourceTimeProfile(newValues);
110
111
}
else
if
(command==
decaybiasprofileCmd
) {
theRadioactivationContainer
->
112
SetDecayBias(newValues);
113
114
}
else
if
(command==
splitnucleiCmd
) {
theRadioactivationContainer
->
115
SetSplitNuclei(
splitnucleiCmd
->
GetNewIntValue
(newValues));
116
117
}
else
if
(command==
hlthCmd
) {
theRadioactivationContainer
->
118
SetHLThreshold(
hlthCmd
->
GetNewDoubleValue
(newValues));
119
}
120
}
121
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
radioactive_decay
src
G4RadioactivationMessenger.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:50
using
1.8.2 with
ECCE GitHub integration