39 using namespace G4Analysis;
47 fCreateH3Cmd(nullptr),
52 fSetH3TitleCmd(nullptr),
53 fSetH3XAxisCmd(nullptr),
54 fSetH3YAxisCmd(nullptr),
55 fSetH3ZAxisCmd(nullptr),
61 fHelper = G4Analysis::make_unique<G4AnalysisMessengerHelper>(
"h3");
92 h3Name->SetGuidance(
"Histogram name (label)");
95 h3Title->SetGuidance(
"Histogram title");
98 h3xNbins0->SetGuidance(
"Number of x-bins (default = 100)");
99 h3xNbins0->SetGuidance(
"Can be reset with /analysis/h3/set command");
100 h3xNbins0->SetDefaultValue(100);
103 h3xValMin0->SetGuidance(
"Minimum x-value, expressed in unit (default = 0.)");
104 h3xValMin0->SetGuidance(
"Can be reset with /analysis/h3/set command");
105 h3xValMin0->SetDefaultValue(0.);
108 h3xValMax0->SetGuidance(
"Maximum x-value, expressed in unit (default = 1.)");
109 h3xValMax0->SetGuidance(
"Can be reset with /analysis/h3/set command");
110 h3xValMax0->SetDefaultValue(1.);
112 auto h3xValUnit0 =
new G4UIparameter(
"xvalUnit0",
's',
true);
113 h3xValUnit0->SetGuidance(
"The unit applied to filled x-values and xvalMin0, xvalMax0");
114 h3xValUnit0->SetDefaultValue(
"none");
117 G4String fcnxGuidance =
"The function applied to filled x-values (log, log10, exp, none).";
118 h3xValFcn0->SetGuidance(fcnxGuidance);
119 h3xValFcn0->SetParameterCandidates(
"log log10 exp none");
120 h3xValFcn0->SetDefaultValue(
"none");
122 auto h3xValBinScheme0 =
new G4UIparameter(
"xvalBinScheme0",
's',
true);
123 G4String xbinSchemeGuidance =
"The binning scheme (linear, log).";
124 h3xValBinScheme0->SetParameterCandidates(
"linear log");
125 h3xValBinScheme0->SetGuidance(xbinSchemeGuidance);
126 h3xValBinScheme0->SetDefaultValue(
"linear");
129 h3yNbins0->SetGuidance(
"Number of y-bins (default = 100)");
130 h3yNbins0->SetGuidance(
"Can be reset with /analysis/h3/set command");
131 h3yNbins0->SetDefaultValue(100);
134 h3yValMin0->SetGuidance(
"Minimum y-value, expressed in unit (default = 0.)");
135 h3yValMin0->SetGuidance(
"Can be reset with /analysis/h3/set command");
136 h3yValMin0->SetDefaultValue(0.);
139 h3yValMax0->SetGuidance(
"Maximum y-value, expressed in unit (default = 1.)");
140 h3yValMax0->SetGuidance(
"Can be reset with /analysis/h3/set command");
141 h3yValMax0->SetDefaultValue(1.);
143 auto h3yValUnit0 =
new G4UIparameter(
"yvalUnit0",
's',
true);
144 h3yValUnit0->SetGuidance(
"The unit applied to filled y-values and yvalMin0, yvalMax0");
145 h3yValUnit0->SetDefaultValue(
"none");
148 G4String fcnyGuidance =
"The function applied to filled y-values (log, log10, exp, none).";
149 h3yValFcn0->SetGuidance(fcnyGuidance);
150 h3yValFcn0->SetParameterCandidates(
"log log10 exp none");
151 h3yValFcn0->SetDefaultValue(
"none");
153 auto h3yValBinScheme0 =
new G4UIparameter(
"yvalBinScheme0",
's',
true);
154 G4String ybinSchemeGuidance =
"The binning scheme (linear, log).";
155 h3yValBinScheme0->SetParameterCandidates(
"linear log");
156 h3yValBinScheme0->SetGuidance(ybinSchemeGuidance);
157 h3yValBinScheme0->SetDefaultValue(
"linear");
160 h3zNbins0->SetGuidance(
"Number of z-bins (default = 100)");
161 h3zNbins0->SetGuidance(
"Can be reset with /analysis/h3/set command");
162 h3zNbins0->SetDefaultValue(100);
165 h3zValMin0->SetGuidance(
"Minimum z-value, expressed in unit (default = 0.)");
166 h3zValMin0->SetGuidance(
"Can be reset with /analysis/h3/set command");
167 h3zValMin0->SetDefaultValue(0.);
170 h3zValMax0->SetGuidance(
"Maximum z-value, expressed in unit (default = 1.)");
171 h3zValMax0->SetGuidance(
"Can be reset with /analysis/h3/set command");
172 h3zValMax0->SetDefaultValue(1.);
174 auto h3zValUnit0 =
new G4UIparameter(
"zvalUnit0",
's',
true);
175 h3zValUnit0->SetGuidance(
"The unit applied to filled z-values and zvalMin0, zvalMax0");
176 h3zValUnit0->SetDefaultValue(
"none");
179 G4String fcnzGuidance =
"The function applied to filled z-values (log, log10, exp, none).";
180 h3zValFcn0->SetGuidance(fcnzGuidance);
181 h3zValFcn0->SetParameterCandidates(
"log log10 exp none");
182 h3zValFcn0->SetDefaultValue(
"none");
184 auto h3zValBinScheme0 =
new G4UIparameter(
"zvalBinScheme0",
's',
true);
185 G4String zbinSchemeGuidance =
"The binning scheme (linear, log).";
186 h3zValBinScheme0->SetParameterCandidates(
"linear log");
187 h3zValBinScheme0->SetGuidance(zbinSchemeGuidance);
188 h3zValBinScheme0->SetDefaultValue(
"linear");
190 fCreateH3Cmd = G4Analysis::make_unique<G4UIcommand>(
"/analysis/h3/create",
this);
220 h3Id->SetGuidance(
"Histogram id");
221 h3Id->SetParameterRange(
"id>=0");
224 h3xNbins->SetGuidance(
"Number of x-bins");
227 h3xValMin->SetGuidance(
"Minimum x-value, expressed in unit");
230 h3xValMax->SetGuidance(
"Maximum x-value, expressed in unit");
233 h3xValUnit->SetGuidance(
"The unit applied to filled x-values and xvalMin0, xvalMax0");
234 h3xValUnit->SetDefaultValue(
"none");
237 h3xValFcn->SetParameterCandidates(
"log log10 exp none");
238 G4String fcnxGuidance =
"The function applied to filled x-values (log, log10, exp, none).";
239 h3xValFcn->SetGuidance(fcnxGuidance);
240 h3xValFcn->SetDefaultValue(
"none");
242 auto h3xValBinScheme =
new G4UIparameter(
"xvalBinScheme",
's',
true);
243 G4String xbinSchemeGuidance =
"The binning scheme (linear, log).";
244 h3xValBinScheme->SetParameterCandidates(
"linear log");
245 h3xValBinScheme->SetGuidance(xbinSchemeGuidance);
246 h3xValBinScheme->SetDefaultValue(
"linear");
249 h3yNbins->SetGuidance(
"Number of y-bins");
252 h3yValMin->SetGuidance(
"Minimum y-value, expressed in unit");
255 h3yValMax->SetGuidance(
"Maximum y-value, expressed in unit");
258 h3yValUnit->SetGuidance(
"The unit applied to filled y-values and yvalMin0, yvalMax0");
259 h3yValUnit->SetDefaultValue(
"none");
262 h3yValFcn->SetParameterCandidates(
"log log10 exp none");
263 G4String fcnyGuidance =
"The function applied to filled y-values (log, log10, exp, none).";
264 h3yValFcn->SetGuidance(fcnyGuidance);
265 h3yValFcn->SetDefaultValue(
"none");
267 auto h3yValBinScheme =
new G4UIparameter(
"yvalBinScheme",
's',
true);
268 G4String ybinSchemeGuidance =
"The binning scheme (linear, log).";
269 h3yValBinScheme->SetParameterCandidates(
"linear log");
270 h3yValBinScheme->SetGuidance(ybinSchemeGuidance);
271 h3yValBinScheme->SetDefaultValue(
"linear");
274 h3zNbins->SetGuidance(
"Number of z-bins");
277 h3zValMin->SetGuidance(
"Minimum z-value, expressed in unit");
280 h3zValMax->SetGuidance(
"Maximum z-value, expressed in unit");
283 h3zValUnit->SetGuidance(
"The unit applied to filled z-values and zvalMin0, zvalMax0");
284 h3zValUnit->SetDefaultValue(
"none");
287 h3zValFcn->SetParameterCandidates(
"log log10 exp none");
288 G4String fcnzGuidance =
"The function applied to filled z-values (log, log10, exp, none).";
289 h3zValFcn->SetGuidance(fcnzGuidance);
290 h3zValFcn->SetDefaultValue(
"none");
292 auto h3zValBinScheme =
new G4UIparameter(
"zvalBinScheme",
's',
true);
293 G4String zbinSchemeGuidance =
"The binning scheme (linear, log).";
294 h3zValBinScheme->SetParameterCandidates(
"linear log");
295 h3zValBinScheme->SetGuidance(zbinSchemeGuidance);
296 h3zValBinScheme->SetDefaultValue(
"linear");
298 fSetH3Cmd = G4Analysis::make_unique<G4UIcommand>(
"/analysis/h3/set",
this);
299 fSetH3Cmd->SetGuidance(
"Set parameters for the 3D histogram of given id:");
300 fSetH3Cmd->SetGuidance(
" nxbins; xvalMin; xvalMax; xunit; xfunction; xbinScheme");
301 fSetH3Cmd->SetGuidance(
" nybins; yvalMin; yvalMax; yunit; yfunction; ybinScheme");
302 fSetH3Cmd->SetGuidance(
" nzbins; zvalMin; zvalMax; zunit; zfunction; zbinScheme");
309 fSetH3Cmd->SetParameter(h3xValBinScheme);
315 fSetH3Cmd->SetParameter(h3yValBinScheme);
321 fSetH3Cmd->SetParameter(h3zValBinScheme);
339 fHelper->WarnAboutParameters(command, parameters.size());
345 auto name = parameters[counter++];
346 auto title = parameters[counter++];
348 fHelper->GetBinData(xdata, parameters, counter);
351 fHelper->GetBinData(ydata, parameters, counter);
354 fHelper->GetBinData(zdata, parameters, counter);
368 fHelper->GetBinData(xdata, parameters, counter);
371 fHelper->GetBinData(ydata, parameters, counter);
374 fHelper->GetBinData(zdata, parameters, counter);
402 fHelper->WarnAboutSetCommands();
408 fHelper->GetBinData(zdata, parameters, counter);
423 auto title = parameters[counter++];
429 auto xaxis = parameters[counter++];
435 auto yaxis = parameters[counter++];
441 auto zaxis = parameters[counter++];