A set of booked Histo1DPtr, each in a bin of a second variable.
More...
#include <BinnedHistogram.hh>
|
| BinnedHistogram ()=default |
| Create a new empty BinnedHistogram.
|
|
| BinnedHistogram (const vector< double > &edges, const vector< Histo1DPtr > &histos) |
| Create a new BinnedHistogram with the given bin edges and contents.
|
|
const BinnedHistogram & | add (double binMin, double binMax, Histo1DPtr histo) |
| Add a histogram in the T bin between binMin and binMax. More...
|
|
void | fill (double binval, double val, double weight=1.0) |
| Fill the histogram in the same bin as binval with value val and weight weight.
|
|
const Histo1DPtr | histo (double binval) const |
| Get the histogram in the same bin as binval (const) More...
|
|
Histo1DPtr | histo (double binval) |
| Get the histogram in the same bin as binval. More...
|
|
const vector< Histo1DPtr > & | histos () const |
| Get the contained histograms (const)
|
|
vector< Histo1DPtr > & | histos () |
| Get the contained histograms.
|
|
void | scale (double scale, Analysis *ana) |
|
A set of booked Histo1DPtr, each in a bin of a second variable.
BinnedHistogram contains a series of histograms of the same quantity each in a different region of a second quantity. For example, a BinnedHistogram may contain histograms of the cross-section differential in \( p_T \) in different \( \eta \) regions.
◆ add()
const BinnedHistogram & Rivet::BinnedHistogram::add |
( |
double |
binMin, |
|
|
double |
binMax, |
|
|
Histo1DPtr |
histo |
|
) |
| |
Add a histogram in the T
bin between binMin and binMax.
- Todo:
- Can we have an "emplace constructor", passing tuples of bookHisto1D args?
Referenced by BinnedHistogram().
◆ histo() [1/2]
Histo1DPtr Rivet::BinnedHistogram::histo |
( |
double |
binval | ) |
|
Get the histogram in the same bin as binval.
- Note
- Throws a RangeError if binval doesn't fall in a declared bin
◆ histo() [2/2]
const Histo1DPtr Rivet::BinnedHistogram::histo |
( |
double |
binval | ) |
const |
Get the histogram in the same bin as binval (const)
- Note
- Throws a RangeError if binval doesn't fall in a declared bin
◆ scale()
void Rivet::BinnedHistogram::scale |
( |
double |
scale, |
|
|
Analysis * |
ana |
|
) |
| |
Scale histograms taking into account its "external" binwidth, i.e. by scale/binWidth
- Note
- The Analysis pointer is passed in order to call the analysis' scale(h) method: can we avoid that?
The documentation for this class was generated from the following file: