49#define OLD_RADIUS_UNITS (3.3836/1.2)
54 class BERTParameters {
71 static auto _instance = []() {
84G4CascadeParameters::G4CascadeParameters()
85 : G4CASCADE_VERBOSE(
std::getenv(
"G4CASCADE_VERBOSE")),
86 G4CASCADE_CHECK_ECONS(
std::getenv(
"G4CASCADE_CHECK_ECONS")),
87 G4CASCADE_USE_PRECOMPOUND(
std::getenv(
"G4CASCADE_USE_PRECOMPOUND")),
88 G4CASCADE_USE_ABLA(
std::getenv(
"G4CASCADE_USE_ABLA")),
89 G4CASCADE_DO_COALESCENCE(
std::getenv(
"G4CASCADE_DO_COALESCENCE")),
90 G4CASCADE_SHOW_HISTORY(
std::getenv(
"G4CASCADE_SHOW_HISTORY")),
91 G4CASCADE_USE_3BODYMOM(
std::getenv(
"G4CASCADE_USE_3BODYMOM")),
92 G4CASCADE_USE_PHASESPACE(
std::getenv(
"G4CASCADE_USE_PHASESPACE")),
93 G4CASCADE_PIN_ABSORPTION(
std::getenv(
"G4CASCADE_PIN_ABSORPTION")),
94 G4CASCADE_RANDOM_FILE(
std::getenv(
"G4CASCADE_RANDOM_FILE")),
95 G4NUCMODEL_USE_BEST(
std::getenv(
"G4NUCMODEL_USE_BEST")),
96 G4NUCMODEL_RAD_2PAR(
std::getenv(
"G4NUCMODEL_RAD_2PAR")),
97 G4NUCMODEL_RAD_SCALE(
std::getenv(
"G4NUCMODEL_RAD_SCALE")),
98 G4NUCMODEL_RAD_SMALL(
std::getenv(
"G4NUCMODEL_RAD_SMALL")),
99 G4NUCMODEL_RAD_ALPHA(
std::getenv(
"G4NUCMODEL_RAD_ALPHA")),
100 G4NUCMODEL_RAD_TRAILING(
std::getenv(
"G4NUCMODEL_RAD_TRAILING")),
101 G4NUCMODEL_FERMI_SCALE(
std::getenv(
"G4NUCMODEL_FERMI_SCALE")),
102 G4NUCMODEL_XSEC_SCALE(
std::getenv(
"G4NUCMODEL_XSEC_SCALE")),
103 G4NUCMODEL_GAMMAQD(
std::getenv(
"G4NUCMODEL_GAMMAQD")),
104 DPMAX_2CLUSTER(
std::getenv(
"DPMAX_2CLUSTER")),
105 DPMAX_3CLUSTER(
std::getenv(
"DPMAX_3CLUSTER")),
106 DPMAX_4CLUSTER(
std::getenv(
"DPMAX_4CLUSTER")),
112void G4CascadeParameters::Initialize() {
113 VERBOSE_LEVEL = (G4CASCADE_VERBOSE ? atoi(G4CASCADE_VERBOSE) : 0);
114 CHECK_ECONS = (0!=G4CASCADE_CHECK_ECONS);
115 USE_PRECOMPOUND = (0!=G4CASCADE_USE_PRECOMPOUND &&
116 G4CASCADE_USE_PRECOMPOUND[0]!=
'0');
117 USE_ABLA = (0!=G4CASCADE_USE_ABLA && G4CASCADE_USE_ABLA[0]!=
'0');
118 DO_COALESCENCE = (0==G4CASCADE_DO_COALESCENCE ||
119 G4CASCADE_DO_COALESCENCE[0]!=
'0');
120 SHOW_HISTORY = (0!=G4CASCADE_SHOW_HISTORY);
121 USE_3BODYMOM = (0!=G4CASCADE_USE_3BODYMOM);
122 USE_PHASESPACE = (0!=G4CASCADE_USE_PHASESPACE &&
123 G4CASCADE_USE_PHASESPACE[0]!=
'0');
124 PIN_ABSORPTION = (G4CASCADE_PIN_ABSORPTION ? strtod(G4CASCADE_PIN_ABSORPTION,0)
126 RANDOM_FILE = (G4CASCADE_RANDOM_FILE ? G4CASCADE_RANDOM_FILE :
"");
127 BEST_PAR = (0!=G4NUCMODEL_USE_BEST);
128 TWOPARAM_RADIUS = (0!=G4NUCMODEL_RAD_2PAR);
129 RADIUS_SCALE = (G4NUCMODEL_RAD_SCALE ? strtod(G4NUCMODEL_RAD_SCALE,0)
131 if ( G4NUCMODEL_RAD_SCALE == 0 && BEST_PAR == 0 )
HDP.
DeveloperGet(
"BERT_RADIUS_SCALE",RADIUS_SCALE);
132 RADIUS_SMALL = ((G4NUCMODEL_RAD_SMALL ? strtod(G4NUCMODEL_RAD_SMALL,0)
134 RADIUS_ALPHA = (G4NUCMODEL_RAD_ALPHA ? strtod(G4NUCMODEL_RAD_ALPHA,0)
135 : (BEST_PAR?0.84:0.70));
136 RADIUS_TRAILING = ((G4NUCMODEL_RAD_TRAILING ? strtod(G4NUCMODEL_RAD_TRAILING,0)
137 : 0.) * RADIUS_SCALE);
138 if ( G4NUCMODEL_RAD_TRAILING == 0 )
HDP.
DeveloperGet(
"BERT_RAD_TRAILING",RADIUS_TRAILING),RADIUS_TRAILING*=RADIUS_SCALE;
139 FERMI_SCALE = ((G4NUCMODEL_FERMI_SCALE ? strtod(G4NUCMODEL_FERMI_SCALE,0)
141 if ( G4NUCMODEL_FERMI_SCALE == 0 && BEST_PAR == 0 )
HDP.
DeveloperGet(
"BERT_FERMI_SCALE",FERMI_SCALE),FERMI_SCALE*=RADIUS_SCALE;
142 XSEC_SCALE = (G4NUCMODEL_XSEC_SCALE ? strtod(G4NUCMODEL_XSEC_SCALE,0)
143 : (BEST_PAR?0.1:1.0) );
144 if ( G4NUCMODEL_XSEC_SCALE == 0 && BEST_PAR == 0 )
HDP.
DeveloperGet(
"BERT_XSEC_SCALE",XSEC_SCALE);
145 GAMMAQD_SCALE = (G4NUCMODEL_GAMMAQD?strtod(G4NUCMODEL_GAMMAQD,0):1.);
146 DPMAX_DOUBLET = (DPMAX_2CLUSTER ? strtod(DPMAX_2CLUSTER,0) : 0.090);
147 DPMAX_TRIPLET = (DPMAX_3CLUSTER ? strtod(DPMAX_3CLUSTER,0) : 0.108);
148 DPMAX_ALPHA = (DPMAX_4CLUSTER ? strtod(DPMAX_4CLUSTER,0) : 0.115);
158void G4CascadeParameters::DumpConfig(std::ostream& os)
const {
159 if (G4CASCADE_VERBOSE)
160 os <<
"G4CASCADE_VERBOSE = " << G4CASCADE_VERBOSE << endl;
161 if (G4CASCADE_CHECK_ECONS)
162 os <<
"G4CASCADE_CHECK_ECONS = " << G4CASCADE_CHECK_ECONS << endl;
163 if (G4CASCADE_USE_PRECOMPOUND)
164 os <<
"G4CASCADE_USE_PRECOMPOUND = " << G4CASCADE_USE_PRECOMPOUND << endl;
165 if (G4CASCADE_USE_ABLA)
166 os <<
"G4CASCADE_USE_ABLA = " << G4CASCADE_USE_ABLA << endl;
167 if (G4CASCADE_DO_COALESCENCE)
168 os <<
"G4CASCADE_DO_COALESCENCE = " << G4CASCADE_DO_COALESCENCE << endl;
169 if (G4CASCADE_PIN_ABSORPTION)
170 os <<
"G4CASCADE_PIN_ABSORPTION = " << G4CASCADE_PIN_ABSORPTION << endl;
171 if (G4CASCADE_SHOW_HISTORY)
172 os <<
"G4CASCADE_SHOW_HISTORY = " << G4CASCADE_SHOW_HISTORY << endl;
173 if (G4CASCADE_USE_3BODYMOM)
174 os <<
"G4CASCADE_USE_3BODYMOM = " << G4CASCADE_USE_3BODYMOM << endl;
175 if (G4CASCADE_USE_PHASESPACE)
176 os <<
"G4CASCADE_USE_PHASESPACE = " << G4CASCADE_USE_PHASESPACE << endl;
177 if (G4CASCADE_RANDOM_FILE)
178 os <<
"G4CASCADE_RANDOM_FILE = " << G4CASCADE_RANDOM_FILE << endl;
179 if (G4NUCMODEL_USE_BEST)
180 os <<
"G4NUCMODEL_USE_BEST = " << G4NUCMODEL_USE_BEST << endl;
181 if (G4NUCMODEL_RAD_2PAR)
182 os <<
"G4NUCMODEL_RAD_2PAR = " << G4NUCMODEL_RAD_2PAR << endl;
183 if (G4NUCMODEL_RAD_SCALE)
184 os <<
"G4NUCMODEL_RAD_SCALE = " << G4NUCMODEL_RAD_SCALE << endl;
185 if (G4NUCMODEL_RAD_SMALL)
186 os <<
"G4NUCMODEL_RAD_SMALL = " << G4NUCMODEL_RAD_SMALL << endl;
187 if (G4NUCMODEL_RAD_ALPHA)
188 os <<
"G4NUCMODEL_RAD_ALPHA = " << G4NUCMODEL_RAD_ALPHA << endl;
189 if (G4NUCMODEL_RAD_TRAILING)
190 os <<
"G4NUCMODEL_RAD_TRAILING = " << G4NUCMODEL_RAD_TRAILING << endl;
191 if (G4NUCMODEL_FERMI_SCALE)
192 os <<
"G4NUCMODEL_FERMI_SCALE = " << G4NUCMODEL_FERMI_SCALE << endl;
193 if (G4NUCMODEL_XSEC_SCALE)
194 os <<
"G4NUCMODEL_XSEC_SCALE = " << G4NUCMODEL_XSEC_SCALE << endl;
195 if (G4NUCMODEL_GAMMAQD)
196 os <<
"G4NUCMODEL_GAMMAQD = " << G4NUCMODEL_GAMMAQD << endl;
198 os <<
"DPMAX_2CLUSTER = " << DPMAX_2CLUSTER << endl;
200 os <<
"DPMAX_3CLUSTER = " << DPMAX_3CLUSTER << endl;
202 os <<
"DPMAX_4CLUSTER = " << DPMAX_4CLUSTER << endl;
G4HadronicDeveloperParameters & HDP
static const G4CascadeParameters * Instance()
friend class G4CascadeParamMessenger
G4bool DeveloperGet(const std::string name, G4bool &value)
static G4HadronicDeveloperParameters & GetInstance()
G4bool SetDefault(const std::string name, const G4bool value)