43 fHelper = std::make_unique<G4AnalysisMessengerHelper>(
"h3");
73 h3Name->SetGuidance(
"Histogram name (label)");
76 h3Title->SetGuidance(
"Histogram title");
79 h3xNbins0->SetGuidance(
"Number of x-bins (default = 100)");
80 h3xNbins0->SetGuidance(
"Can be reset with /analysis/h3/set command");
81 h3xNbins0->SetDefaultValue(100);
84 h3xValMin0->SetGuidance(
"Minimum x-value, expressed in unit (default = 0.)");
85 h3xValMin0->SetGuidance(
"Can be reset with /analysis/h3/set command");
86 h3xValMin0->SetDefaultValue(0.);
89 h3xValMax0->SetGuidance(
"Maximum x-value, expressed in unit (default = 1.)");
90 h3xValMax0->SetGuidance(
"Can be reset with /analysis/h3/set command");
91 h3xValMax0->SetDefaultValue(1.);
94 h3xValUnit0->SetGuidance(
"The unit applied to filled x-values and xvalMin0, xvalMax0");
95 h3xValUnit0->SetDefaultValue(
"none");
98 G4String fcnxGuidance =
"The function applied to filled x-values (log, log10, exp, none).";
99 h3xValFcn0->SetGuidance(fcnxGuidance);
100 h3xValFcn0->SetParameterCandidates(
"log log10 exp none");
101 h3xValFcn0->SetDefaultValue(
"none");
103 auto h3xValBinScheme0 =
new G4UIparameter(
"xvalBinScheme0",
's',
true);
104 G4String xbinSchemeGuidance =
"The binning scheme (linear, log).";
105 h3xValBinScheme0->SetParameterCandidates(
"linear log");
106 h3xValBinScheme0->SetGuidance(xbinSchemeGuidance);
107 h3xValBinScheme0->SetDefaultValue(
"linear");
110 h3yNbins0->SetGuidance(
"Number of y-bins (default = 100)");
111 h3yNbins0->SetGuidance(
"Can be reset with /analysis/h3/set command");
112 h3yNbins0->SetDefaultValue(100);
115 h3yValMin0->SetGuidance(
"Minimum y-value, expressed in unit (default = 0.)");
116 h3yValMin0->SetGuidance(
"Can be reset with /analysis/h3/set command");
117 h3yValMin0->SetDefaultValue(0.);
120 h3yValMax0->SetGuidance(
"Maximum y-value, expressed in unit (default = 1.)");
121 h3yValMax0->SetGuidance(
"Can be reset with /analysis/h3/set command");
122 h3yValMax0->SetDefaultValue(1.);
124 auto h3yValUnit0 =
new G4UIparameter(
"yvalUnit0",
's',
true);
125 h3yValUnit0->SetGuidance(
"The unit applied to filled y-values and yvalMin0, yvalMax0");
126 h3yValUnit0->SetDefaultValue(
"none");
129 G4String fcnyGuidance =
"The function applied to filled y-values (log, log10, exp, none).";
130 h3yValFcn0->SetGuidance(fcnyGuidance);
131 h3yValFcn0->SetParameterCandidates(
"log log10 exp none");
132 h3yValFcn0->SetDefaultValue(
"none");
134 auto h3yValBinScheme0 =
new G4UIparameter(
"yvalBinScheme0",
's',
true);
135 G4String ybinSchemeGuidance =
"The binning scheme (linear, log).";
136 h3yValBinScheme0->SetParameterCandidates(
"linear log");
137 h3yValBinScheme0->SetGuidance(ybinSchemeGuidance);
138 h3yValBinScheme0->SetDefaultValue(
"linear");
141 h3zNbins0->SetGuidance(
"Number of z-bins (default = 100)");
142 h3zNbins0->SetGuidance(
"Can be reset with /analysis/h3/set command");
143 h3zNbins0->SetDefaultValue(100);
146 h3zValMin0->SetGuidance(
"Minimum z-value, expressed in unit (default = 0.)");
147 h3zValMin0->SetGuidance(
"Can be reset with /analysis/h3/set command");
148 h3zValMin0->SetDefaultValue(0.);
151 h3zValMax0->SetGuidance(
"Maximum z-value, expressed in unit (default = 1.)");
152 h3zValMax0->SetGuidance(
"Can be reset with /analysis/h3/set command");
153 h3zValMax0->SetDefaultValue(1.);
155 auto h3zValUnit0 =
new G4UIparameter(
"zvalUnit0",
's',
true);
156 h3zValUnit0->SetGuidance(
"The unit applied to filled z-values and zvalMin0, zvalMax0");
157 h3zValUnit0->SetDefaultValue(
"none");
160 G4String fcnzGuidance =
"The function applied to filled z-values (log, log10, exp, none).";
161 h3zValFcn0->SetGuidance(fcnzGuidance);
162 h3zValFcn0->SetParameterCandidates(
"log log10 exp none");
163 h3zValFcn0->SetDefaultValue(
"none");
165 auto h3zValBinScheme0 =
new G4UIparameter(
"zvalBinScheme0",
's',
true);
166 G4String zbinSchemeGuidance =
"The binning scheme (linear, log).";
167 h3zValBinScheme0->SetParameterCandidates(
"linear log");
168 h3zValBinScheme0->SetGuidance(zbinSchemeGuidance);
169 h3zValBinScheme0->SetDefaultValue(
"linear");
171 fCreateH3Cmd = std::make_unique<G4UIcommand>(
"/analysis/h3/create",
this);
201 h3Id->SetGuidance(
"Histogram id");
202 h3Id->SetParameterRange(
"id>=0");
205 h3xNbins->SetGuidance(
"Number of x-bins");
208 h3xValMin->SetGuidance(
"Minimum x-value, expressed in unit");
211 h3xValMax->SetGuidance(
"Maximum x-value, expressed in unit");
214 h3xValUnit->SetGuidance(
"The unit applied to filled x-values and xvalMin0, xvalMax0");
215 h3xValUnit->SetDefaultValue(
"none");
218 h3xValFcn->SetParameterCandidates(
"log log10 exp none");
219 G4String fcnxGuidance =
"The function applied to filled x-values (log, log10, exp, none).";
220 h3xValFcn->SetGuidance(fcnxGuidance);
221 h3xValFcn->SetDefaultValue(
"none");
223 auto h3xValBinScheme =
new G4UIparameter(
"xvalBinScheme",
's',
true);
224 G4String xbinSchemeGuidance =
"The binning scheme (linear, log).";
225 h3xValBinScheme->SetParameterCandidates(
"linear log");
226 h3xValBinScheme->SetGuidance(xbinSchemeGuidance);
227 h3xValBinScheme->SetDefaultValue(
"linear");
230 h3yNbins->SetGuidance(
"Number of y-bins");
233 h3yValMin->SetGuidance(
"Minimum y-value, expressed in unit");
236 h3yValMax->SetGuidance(
"Maximum y-value, expressed in unit");
239 h3yValUnit->SetGuidance(
"The unit applied to filled y-values and yvalMin0, yvalMax0");
240 h3yValUnit->SetDefaultValue(
"none");
243 h3yValFcn->SetParameterCandidates(
"log log10 exp none");
244 G4String fcnyGuidance =
"The function applied to filled y-values (log, log10, exp, none).";
245 h3yValFcn->SetGuidance(fcnyGuidance);
246 h3yValFcn->SetDefaultValue(
"none");
248 auto h3yValBinScheme =
new G4UIparameter(
"yvalBinScheme",
's',
true);
249 G4String ybinSchemeGuidance =
"The binning scheme (linear, log).";
250 h3yValBinScheme->SetParameterCandidates(
"linear log");
251 h3yValBinScheme->SetGuidance(ybinSchemeGuidance);
252 h3yValBinScheme->SetDefaultValue(
"linear");
255 h3zNbins->SetGuidance(
"Number of z-bins");
258 h3zValMin->SetGuidance(
"Minimum z-value, expressed in unit");
261 h3zValMax->SetGuidance(
"Maximum z-value, expressed in unit");
264 h3zValUnit->SetGuidance(
"The unit applied to filled z-values and zvalMin0, zvalMax0");
265 h3zValUnit->SetDefaultValue(
"none");
268 h3zValFcn->SetParameterCandidates(
"log log10 exp none");
269 G4String fcnzGuidance =
"The function applied to filled z-values (log, log10, exp, none).";
270 h3zValFcn->SetGuidance(fcnzGuidance);
271 h3zValFcn->SetDefaultValue(
"none");
273 auto h3zValBinScheme =
new G4UIparameter(
"zvalBinScheme",
's',
true);
274 G4String zbinSchemeGuidance =
"The binning scheme (linear, log).";
275 h3zValBinScheme->SetParameterCandidates(
"linear log");
276 h3zValBinScheme->SetGuidance(zbinSchemeGuidance);
277 h3zValBinScheme->SetDefaultValue(
"linear");
279 fSetH3Cmd = std::make_unique<G4UIcommand>(
"/analysis/h3/set",
this);
280 fSetH3Cmd->SetGuidance(
"Set parameters for the 3D histogram of given id:");
281 fSetH3Cmd->SetGuidance(
" nxbins; xvalMin; xvalMax; xunit; xfunction; xbinScheme");
282 fSetH3Cmd->SetGuidance(
" nybins; yvalMin; yvalMax; yunit; yfunction; ybinScheme");
283 fSetH3Cmd->SetGuidance(
" nzbins; zvalMin; zvalMax; zunit; zfunction; zbinScheme");
290 fSetH3Cmd->SetParameter(h3xValBinScheme);
296 fSetH3Cmd->SetParameter(h3yValBinScheme);
302 fSetH3Cmd->SetParameter(h3zValBinScheme);
315 std::vector<G4String> parameters;
320 fHelper->WarnAboutParameters(command, parameters.size());
326 auto name = parameters[counter++];
327 auto title = parameters[counter++];
329 fHelper->GetBinData(xdata, parameters, counter);
332 fHelper->GetBinData(ydata, parameters, counter);
335 fHelper->GetBinData(zdata, parameters, counter);
349 fHelper->GetBinData(xdata, parameters, counter);
352 fHelper->GetBinData(ydata, parameters, counter);
355 fHelper->GetBinData(zdata, parameters, counter);
383 fHelper->WarnAboutSetCommands();
389 fHelper->GetBinData(zdata, parameters, counter);
404 auto title = parameters[counter++];
410 auto xaxis = parameters[counter++];
416 auto yaxis = parameters[counter++];
422 auto zaxis = parameters[counter++];
G4AnalysisMessengerHelper::BinData fXData
std::unique_ptr< G4UIcommand > fSetH3XAxisCmd
std::unique_ptr< G4UIdirectory > fDirectory
std::unique_ptr< G4UIcommand > fSetH3ZAxisCmd
std::unique_ptr< G4UIcommand > fSetH3XCmd
virtual void SetNewValue(G4UIcommand *command, G4String value) final
std::unique_ptr< G4UIcommand > fSetH3YCmd
std::unique_ptr< G4UIcommand > fSetH3ZCmd
std::unique_ptr< G4UIcommand > fCreateH3Cmd
G4AnalysisMessengerHelper::BinData fYData
std::unique_ptr< G4UIcommand > fSetH3YAxisCmd
std::unique_ptr< G4UIcommand > fSetH3YAxisLogCmd
std::unique_ptr< G4UIcommand > fSetH3Cmd
std::unique_ptr< G4UIcommand > fSetH3XAxisLogCmd
G4VAnalysisManager * fManager
Associated class.
std::unique_ptr< G4AnalysisMessengerHelper > fHelper
std::unique_ptr< G4UIcommand > fSetH3ZAxisLogCmd
std::unique_ptr< G4UIcommand > fSetH3TitleCmd
std::size_t GetParameterEntries() const
static G4int ConvertToInt(const char *st)
static G4bool ConvertToBool(const char *st)
G4bool SetH3Title(G4int id, const G4String &title)
G4bool SetH3(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nzbins, G4double zmin, G4double zmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear", const G4String &zbinSchemeName="linear")
G4bool SetH3YAxisTitle(G4int id, const G4String &title)
G4int CreateH3(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear", const G4String &zbinSchemeName="linear")
G4bool SetH3XAxisIsLog(G4int id, G4bool isLog)
G4bool SetH3XAxisTitle(G4int id, const G4String &title)
G4bool SetH3YAxisIsLog(G4int id, G4bool isLog)
G4bool SetH3ZAxisIsLog(G4int id, G4bool isLog)
G4bool SetH3ZAxisTitle(G4int id, const G4String &title)
void Tokenize(const G4String &line, std::vector< G4String > &tokens)
G4double GetUnitValue(const G4String &unit)
const char * name(G4int ptype)