39 using namespace G4Analysis;
47 fCreateP2Cmd(nullptr),
52 fSetP2TitleCmd(nullptr),
53 fSetP2XAxisCmd(nullptr),
54 fSetP2YAxisCmd(nullptr)
56 fHelper = G4Analysis::make_unique<G4AnalysisMessengerHelper>(
"p2");
88 p2Name->SetGuidance(
"Profile name (label)");
91 p2Title->SetGuidance(
"Profile title");
94 p2xNbins0->SetGuidance(
"Number of x-bins (default = 100)");
95 p2xNbins0->SetGuidance(
"Can be reset with /analysis/p2/set command");
96 p2xNbins0->SetDefaultValue(100);
99 p2xValMin0->SetGuidance(
"Minimum x-value, expressed in unit (default = 0.)");
100 p2xValMin0->SetGuidance(
"Can be reset with /analysis/p2/set command");
101 p2xValMin0->SetDefaultValue(0.);
104 p2xValMax0->SetGuidance(
"Maximum x-value, expressed in unit (default = 1.)");
105 p2xValMax0->SetGuidance(
"Can be reset with /analysis/p2/set command");
106 p2xValMax0->SetDefaultValue(1.);
108 auto p2xValUnit0 =
new G4UIparameter(
"xvalUnit0",
's',
true);
109 p2xValUnit0->SetGuidance(
"The unit applied to filled x-values and xvalMin0, xvalMax0");
110 p2xValUnit0->SetDefaultValue(
"none");
113 G4String fcnxGuidance =
"The function applied to filled x-values (log, log10, exp, none).";
114 p2xValFcn0->SetGuidance(fcnxGuidance);
115 p2xValFcn0->SetParameterCandidates(
"log log10 exp none");
116 p2xValFcn0->SetDefaultValue(
"none");
118 auto p2xValBinScheme0 =
new G4UIparameter(
"xvalBinScheme0",
's',
true);
119 G4String binSchemeGuidance =
"The binning scheme (linear, log).";
120 p2xValBinScheme0->SetParameterCandidates(
"linear log");
121 p2xValBinScheme0->SetGuidance(binSchemeGuidance);
122 p2xValBinScheme0->SetDefaultValue(
"linear");
125 p2yNbins0->SetGuidance(
"Number of y-bins (default = 100)");
126 p2yNbins0->SetGuidance(
"Can be reset with /analysis/p2/set command");
127 p2yNbins0->SetDefaultValue(100);
130 p2yValMin0->SetGuidance(
"Minimum y-value, expressed in unit (default = 0.)");
131 p2yValMin0->SetGuidance(
"Can be reset with /analysis/p2/set command");
132 p2yValMin0->SetDefaultValue(0.);
135 p2yValMax0->SetGuidance(
"Maximum y-value, expressed in unit (default = 1.)");
136 p2yValMax0->SetGuidance(
"Can be reset with /analysis/p2/set command");
137 p2yValMax0->SetDefaultValue(1.);
139 auto p2yValUnit0 =
new G4UIparameter(
"yvalUnit0",
's',
true);
140 p2yValUnit0->SetGuidance(
"The unit applied to filled y-values and yvalMin0, yvalMax0");
141 p2yValUnit0->SetDefaultValue(
"none");
144 G4String fcnyGuidance =
"The function applied to filled y-values (log, log10, exp, none).";
145 p2yValFcn0->SetGuidance(fcnyGuidance);
146 p2yValFcn0->SetParameterCandidates(
"log log10 exp none");
147 p2yValFcn0->SetDefaultValue(
"none");
149 auto p2yValBinScheme0 =
new G4UIparameter(
"yvalBinScheme0",
's',
true);
150 p2yValBinScheme0->SetParameterCandidates(
"linear log");
151 p2yValBinScheme0->SetGuidance(binSchemeGuidance);
152 p2yValBinScheme0->SetDefaultValue(
"linear");
155 p2zValMin0->SetGuidance(
"Minimum z-value, expressed in unit (default = 0.)");
156 p2zValMin0->SetGuidance(
"Can be reset with /analysis/p2/set command");
157 p2zValMin0->SetDefaultValue(0.);
160 p2zValMax0->SetGuidance(
"Maximum z-value, expressed in unit (default = 1.)");
161 p2zValMax0->SetGuidance(
"Can be reset with /analysis/p2/set command");
162 p2zValMax0->SetDefaultValue(1.);
164 auto p2zValUnit0 =
new G4UIparameter(
"zvalUnit0",
's',
true);
165 p2zValUnit0->SetGuidance(
"The unit applied to filled z-values and zvalMin0, zvalMax0");
166 p2zValUnit0->SetDefaultValue(
"none");
169 G4String fcnzGuidance =
"The function applied to filled z-values (log, log10, exp, none).";
170 p2zValFcn0->SetGuidance(fcnzGuidance);
171 p2zValFcn0->SetParameterCandidates(
"log log10 exp none");
172 p2zValFcn0->SetDefaultValue(
"none");
174 fCreateP2Cmd = G4Analysis::make_unique<G4UIcommand>(
"/analysis/p2/create",
this);
202 p2Id->SetGuidance(
"Profile id");
203 p2Id->SetParameterRange(
"id>=0");
206 p2xNbins->SetGuidance(
"Number of x-bins");
209 p2xValMin->SetGuidance(
"Minimum x-value, expressed in unit");
212 p2xValMax->SetGuidance(
"Maximum x-value, expressed in unit");
215 p2xValUnit->SetGuidance(
"The unit applied to filled x-values and xvalMin0, xvalMax0");
216 p2xValUnit->SetDefaultValue(
"none");
219 p2xValFcn->SetParameterCandidates(
"log log10 exp none");
220 G4String fcnxGuidance =
"The function applied to filled x-values (log, log10, exp, none).";
221 p2xValFcn->SetGuidance(fcnxGuidance);
222 p2xValFcn->SetDefaultValue(
"none");
224 auto p2xValBinScheme =
new G4UIparameter(
"xvalBinScheme",
's',
true);
225 G4String binSchemeGuidance =
"The binning scheme (linear, log).";
226 p2xValBinScheme->SetParameterCandidates(
"linear log");
227 p2xValBinScheme->SetGuidance(binSchemeGuidance);
228 p2xValBinScheme->SetDefaultValue(
"linear");
231 p2yNbins->SetGuidance(
"Number of y-bins");
234 p2yValMin->SetGuidance(
"Minimum y-value, expressed in unit");
237 p2yValMax->SetGuidance(
"Maximum y-value, expressed in unit");
240 p2yValUnit->SetGuidance(
"The unit applied to filled y-values and yvalMin0, yvalMax0");
241 p2yValUnit->SetDefaultValue(
"none");
244 p2yValFcn->SetParameterCandidates(
"log log10 exp none");
245 G4String fcnyGuidance =
"The function applied to filled y-values (log, log10, exp, none).";
246 p2yValFcn->SetGuidance(fcnyGuidance);
247 p2yValFcn->SetDefaultValue(
"none");
249 auto p2yValBinScheme =
new G4UIparameter(
"yvalBinScheme",
's',
true);
250 p2yValBinScheme->SetParameterCandidates(
"linear log");
251 p2yValBinScheme->SetGuidance(binSchemeGuidance);
252 p2yValBinScheme->SetDefaultValue(
"linear");
255 p2zValMin->SetGuidance(
"Minimum z-value, expressed in unit");
258 p2zValMax->SetGuidance(
"Maximum z-value, expressed in unit");
261 p2zValUnit->SetGuidance(
"The unit applied to filled z-values and zvalMin0, zvalMax0");
262 p2zValUnit->SetDefaultValue(
"none");
265 p2zValFcn->SetParameterCandidates(
"log log10 exp none");
266 G4String fcnzGuidance =
"The function applied to filled z-values (log, log10, exp, none).";
267 p2zValFcn->SetGuidance(fcnzGuidance);
268 p2zValFcn->SetDefaultValue(
"none");
270 fSetP2Cmd = G4Analysis::make_unique<G4UIcommand>(
"/analysis/p2/set",
this);
271 fSetP2Cmd->SetGuidance(
"Set parameters for the 2D profile of given id:");
272 fSetP2Cmd->SetGuidance(
" nxbins; xvalMin; xvalMax; xunit; xbinScheme");
273 fSetP2Cmd->SetGuidance(
" nybins; yvalMin; yvalMax; yunit; ybinScheme");
274 fSetP2Cmd->SetGuidance(
" zvalMin; zvalMax; zunit; zfunction");
281 fSetP2Cmd->SetParameter(p2xValBinScheme);
287 fSetP2Cmd->SetParameter(p2yValBinScheme);
309 fHelper->WarnAboutParameters(command, parameters.size());
315 auto name = parameters[counter++];
316 auto title = parameters[counter++];
318 fHelper->GetBinData(xdata, parameters, counter);
321 fHelper->GetBinData(ydata, parameters, counter);
324 fHelper->GetValueData(zdata, parameters, counter);
338 fHelper->GetBinData(xdata, parameters, counter);
341 fHelper->GetBinData(ydata, parameters, counter);
344 fHelper->GetValueData(zdata, parameters, counter);
366 fHelper->WarnAboutSetCommands();
388 fHelper->WarnAboutSetCommands();
394 fHelper->GetValueData(zdata, parameters, counter);
409 auto title = parameters[counter++];
415 auto xaxis = parameters[counter++];
421 auto yaxis = parameters[counter++];
427 auto zaxis = parameters[counter++];