17 typedef std::pair<double, double>
Range;
47 XHistogram(
size_t size,
size_t bins_x,
size_t bins_y, Range
x, Range
y,
size_t zones,
const std::vector<double>&
max)
59 m_histograms[
i].reset(
new Histogram(
nullptr,
nullptr, bins_x, x.first, x.second, bins_y, y.first, y.second));
60 m_histograms[
i]->SetMinimum(0.);
61 m_histograms[
i]->SetMaximum(max[
i]);
63 m_normalization.reset(
new Histogram(
nullptr,
nullptr, bins_x, x.first, x.second, bins_y, y.first, y.second));
64 m_colormap.reset(
new ColorMap(
nullptr,
nullptr, bins_x, x.first, x.second, bins_y, y.first, y.second));
65 m_colormap->SetMinimum(0);
66 m_colormap->SetMaximum(zones);
67 Histogram(
nullptr,
nullptr, 0, 0., 0., 0, 0., 0.);
71 void fill(
double x,
double y,
const std::vector<double>&
weight,
double norm);
74 void fill(
double x,
double y,
const std::vector<double>& weight,
double norm,
unsigned int colour);
77 void fill(
const Range& x,
const Range& y,
const std::vector<double>& weight,
double norm);
80 void fill(
const Range& x,
const Range& y,
const std::vector<double>& weight,
double norm,
unsigned int colour);
86 Histogram*
get(
size_t h = 0)
const {
88 return (Histogram*)m_histograms[
h]->Clone(
nullptr);
94 Histogram*
normalization(
void)
const {
return (Histogram*)m_normalization->Clone(
nullptr); }
97 ColorMap*
colormap(
void)
const {
return (ColorMap*)m_colormap->Clone(
nullptr); }
111 position(
double f_,
double x_,
double y_) : f(f_), x(x_), y(y_) {}
117 std::vector<position>
splitSegment(Range x, Range y)
const;
122 if (weight.size() !=
m_size)
123 throw std::invalid_argument(
"weight: wrong number of elements");
127 #endif // XHistogram_h
ColorMap * colormap(void) const
access the colormap
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
XHistogram(size_t size, size_t bins_x, size_t bins_y, Range x, Range y, size_t zones, const std::vector< double > &max)
std::vector< position > splitSegment(Range x, Range y) const
split a segment into a vector of points
std::vector< std::shared_ptr< Histogram > > m_histograms
void check_weight(const std::vector< double > &weight) noexcept(false)
check the weights passed as an std::vector have the correct size
position(double f_, double x_, double y_)
std::shared_ptr< ColorMap > m_colormap
std::shared_ptr< Histogram > m_normalization
bool operator<(const position &other) const
XHistogram(void)
default CTOR
std::shared_ptr< Histogram > m_dummy
void fill(double x, double y, const std::vector< double > &weight, double norm)
fill one point
void normalize(void)
normalize the histograms
std::pair< double, double > Range
Histogram * normalization(void) const
access the normalization