Binning of a data distribution Provides PDF and CDF values of the distribution per bin.
More...
#include <Binning.h>
|
| Binning (unsigned int nBins=0) |
| Creates an empty binning with nBins. More...
|
|
unsigned int | getBin (float datapoint) const |
| Gets the bin corresponding to the given datapoint. More...
|
|
void | normalizePDFs () |
| Normalizes the PDF values, so their sum is 1.
|
|
void | calculateCDFsFromPDFs () |
| Calculates the CDF values from the pdf values, which are assumed to be normalized.
|
|
|
static Binning | CreateEqualFrequency (const std::vector< float > &data, const std::vector< float > &weights, const std::vector< bool > &isSignal, unsigned int nBins) |
| Create an equal frequency (aka equal-statistics) binning. More...
|
|
static Binning | CreateEquidistant (const std::vector< float > &data, const std::vector< float > &weights, const std::vector< bool > &isSignal, unsigned int nBins) |
| Create an equidistant binning. More...
|
|
|
double | m_signal_yield |
| Signal yield in data distribution.
|
|
double | m_bckgrd_yield |
| Background yield in data distribution.
|
|
std::vector< float > | m_signal_pdf |
| Signal pdf of data distribution per bin.
|
|
std::vector< float > | m_signal_cdf |
| Signal cdf of data distribution per bin.
|
|
std::vector< float > | m_bckgrd_pdf |
| Background pdf of data distribution per bin.
|
|
std::vector< float > | m_bckgrd_cdf |
| Background cdf of data distribution per bin.
|
|
std::vector< float > | m_boundaries |
| Boundaries of data distribution, including minimum and maximum value as first and last boundary.
|
|
Binning of a data distribution Provides PDF and CDF values of the distribution per bin.
Definition at line 27 of file Binning.h.
◆ Binning()
Creates an empty binning with nBins.
- Parameters
-
Definition at line 21 of file Binning.cc.
std::vector< float > m_bckgrd_pdf
Background pdf of data distribution per bin.
std::vector< float > m_signal_pdf
Signal pdf of data distribution per bin.
std::vector< float > m_boundaries
Boundaries of data distribution, including minimum and maximum value as first and last boundary.
std::vector< float > m_bckgrd_cdf
Background cdf of data distribution per bin.
double m_bckgrd_yield
Background yield in data distribution.
double m_signal_yield
Signal yield in data distribution.
std::vector< float > m_signal_cdf
Signal cdf of data distribution per bin.
◆ CreateEqualFrequency()
Binning CreateEqualFrequency |
( |
const std::vector< float > & |
data, |
|
|
const std::vector< float > & |
weights, |
|
|
const std::vector< bool > & |
isSignal, |
|
|
unsigned int |
nBins |
|
) |
| |
|
static |
Create an equal frequency (aka equal-statistics) binning.
- Parameters
-
data | data-points sampled from the distribution |
weights | weights for each data-point |
isSignal | per data point |
nBins | number of bins |
Definition at line 93 of file Binning.cc.
◆ CreateEquidistant()
Binning CreateEquidistant |
( |
const std::vector< float > & |
data, |
|
|
const std::vector< float > & |
weights, |
|
|
const std::vector< bool > & |
isSignal, |
|
|
unsigned int |
nBins |
|
) |
| |
|
static |
Create an equidistant binning.
- Parameters
-
data | data-points sampled from the distribution |
weights | weights for each data-point |
isSignal | per data point |
nBins | number of bins |
Definition at line 139 of file Binning.cc.
◆ getBin()
unsigned int getBin |
( |
float |
datapoint | ) |
const |
Gets the bin corresponding to the given datapoint.
There are no overflow/underflow bins, so data points outside the original range are mapped to the first and last bin.
- Parameters
-
datapoint | for which the bin is returned |
Definition at line 34 of file Binning.cc.
The documentation for this class was generated from the following files: