34 #include "tools/histo/h1d"
38 using namespace G4Analysis;
80 h1d->add_annotation(tools::histo::key_axis_x_title(), axisTitle);
94 if ( binScheme != G4BinScheme::kLog ) {
95 if ( binScheme == G4BinScheme::kUser ) {
100 <<
" User binning scheme setting was ignored." <<
G4endl
101 <<
" Linear binning will be applied with given (nbins, xmin, xmax) values";
109 std::vector<G4double> edges;
110 ComputeEdges(nbins, xmin, xmax, unit, fcn, binScheme, edges);
117 const std::vector<G4double>& edges,
125 std::vector<G4double> newEdges;
142 if ( binScheme != G4BinScheme::kLog ) {
143 if ( binScheme == G4BinScheme::kUser ) {
148 <<
" User binning scheme setting was ignored." <<
G4endl
149 <<
" Linear binning will be applied with given (nbins, xmin, xmax) values";
153 h1d->configure(nbins, fcn(xmin/unit), fcn(xmax/unit));
157 std::vector<G4double> edges;
158 ComputeEdges(nbins, xmin, xmax, unit, fcn, binScheme, edges);
159 h1d->configure(edges);
165 const std::vector<G4double>& edges,
172 std::vector<G4double> newEdges;
175 h1d->configure(newEdges);
191 hnInformation->
AddDimension(unitName, fcnName, binScheme);
211 = CreateToolsH1(title, nbins, xmin, xmax, unitName, fcnName, binSchemeName);
214 AddH1Annotation(h1d, unitName, fcnName);
232 const std::vector<G4double>& edges,
240 = CreateToolsH1(title, edges, unitName, fcnName);
243 AddH1Annotation(h1d, unitName, fcnName);
265 if ( ! h1d )
return false;
274 ConfigureToolsH1(h1d, nbins, xmin, xmax, unitName, fcnName, binSchemeName);
277 AddH1Annotation(h1d, unitName, fcnName);
281 UpdateH1Information(
info, unitName, fcnName, binScheme);
291 const std::vector<G4double>& edges,
296 if ( ! h1d )
return false;
305 ConfigureToolsH1(h1d, edges, unitName, fcnName);
308 AddH1Annotation(h1d, unitName, fcnName);
311 UpdateH1Information(
info, unitName, fcnName, G4BinScheme::kUser);
324 if ( ! h1d )
return false;
326 return h1d->scale(factor);
333 if ( ! h1d )
return false;
341 =
fHnManager->GetHnDimensionInformation(
id,
kX,
"FillH1");
346 description <<
" id " <<
id <<
" value " << value
347 <<
" fcn(value/unit) " <<
info->fFcn(value/
info->fUnit)
358 return GetTId(name, warn);
365 if ( ! h1d )
return 0;
376 if ( ! h1d )
return 0.;
385 if ( ! h1d )
return 0.;
394 if ( ! h1d )
return 0.;
403 if ( ! h1d )
return false;
412 if ( ! h1d )
return false;
421 if ( ! h1d )
return false;
430 if ( ! h1d )
return "";
440 if ( ! h1d )
return "";
449 if ( ! h1d )
return "";
466 if ( !
info->GetAscii() )
continue;
474 output <<
"\n 1D histogram " <<
id <<
": " <<
h1->title()
475 <<
"\n \n \t X \t\t Y" <<
G4endl;
478 output <<
" " << j <<
"\t"
479 <<
h1->axis().bin_center(j) <<
"\t"
500 AddH1Annotation(h1d,
"none",
"none");
517 const std::vector<tools::histo::h1d*>& h1Vector)
524 G4bool onlyIfActive)
const