Merges bin uncertainties and creates bin-by-bin statistical uncertainties. More...
Public Member Functions | |
BinByBinFactory () | |
void | MergeBinErrors (CombineHarvester &cb) |
Merges histogram bin errors between processes. More... | |
void | AddBinByBin (CombineHarvester &src, CombineHarvester &dest) |
Create bin-by-bin shape uncertainties for every process in src, and add these to dest More... | |
void | MergeAndAdd (CombineHarvester &src, CombineHarvester &dest) |
A convenience function which calls MergeBinErrors and AddBinByBin in turn. More... | |
BinByBinFactory & | SetVerbosity (unsigned verbosity) |
By default this class only produces output on the screen when an error occurs, set to a value greater than zero for more verbose output. More... | |
BinByBinFactory & | SetAddThreshold (double val) |
Set the fractional bin error threshold for bin-by-bin creation and for participation in the merging algorithm. More... | |
BinByBinFactory & | SetMergeThreshold (double val) |
The threshold for the merging algorithm. More... | |
BinByBinFactory & | SetPattern (std::string const &pattern) |
The pattern-string for the systematic naming convention. More... | |
BinByBinFactory & | SetFixNorm (bool fix) |
Whether or not the bin-by-bin systematics are allowed to vary the process normalisation. More... | |
BinByBinFactory & | SetPoissonErrors (bool poisson_errors) |
Construct approximate Poisson uncertainties instead of default Gaussian. More... | |
BinByBinFactory & | SetMergeZeroBins (bool merge) |
Set whether bins with zero content can participate in the merging procedure. More... | |
BinByBinFactory & | SetMergeSaturatedBins (bool merge) |
Set whether bins with error >= content participate in the merging procedure. More... | |
unsigned | GetVerbosity () |
Getter functions for class attributes. More... | |
double | GetAddThreshold () |
double | GetMergeThreshold () |
std::string | GetPattern () |
bool | GetFixNorm () |
bool | GetPoissonErrors () |
bool | GetMergeZeroBins () |
bool | GetMergeSaturatedBins () |
Merges bin uncertainties and creates bin-by-bin statistical uncertainties.
Typical usage:
auto bbb = ch::BinByBinFactory() .SetAddThreshold(0.1) .SetMergeThreshold(0.5) .SetFixNorm(true); bbb.MergeBinErrors(cb.cp().backgrounds()); bbb.AddBinByBin(cb.cp().backgrounds(), cb);
See below for details on each class method.
Definition at line 21 of file BinByBin.h.
ch::BinByBinFactory::BinByBinFactory | ( | ) |
Definition at line 11 of file BinByBin.cc.
void ch::BinByBinFactory::MergeBinErrors | ( | CombineHarvester & | cb | ) |
Merges histogram bin errors between processes.
The method will loop through each analysis category and apply the merging algorithm to the histograms of all processes within that category:
bin()
value. Definition at line 22 of file BinByBin.cc.
void ch::BinByBinFactory::AddBinByBin | ( | CombineHarvester & | src, |
CombineHarvester & | dest | ||
) |
Create bin-by-bin shape uncertainties for every process in src, and add these to dest
The behaviour of this function is controlled by three parameters:
true
will re-normalize the up and down shape templates to have the same integral as the nominal. This means the nuisance parameter for this bin is only able to change the shape of the distribution: if a bin is shifted up, all other bins are shifted down slightly to preserve the normalisation. This feature is useful when the statistical uncertainty in the process yield is considered as an independent nuisance parameter.CMS_$ANALYSIS_$CHANNEL_$BIN_$ERA_$PROCESS_bin_$#
, but can be changed with SetPattern. Note that the special term $#
should always be included as this is replaced with the bin index. Definition at line 105 of file BinByBin.cc.
void ch::BinByBinFactory::MergeAndAdd | ( | CombineHarvester & | src, |
CombineHarvester & | dest | ||
) |
A convenience function which calls MergeBinErrors and AddBinByBin in turn.
Definition at line 202 of file BinByBin.cc.
|
inline |
By default this class only produces output on the screen when an error occurs, set to a value greater than zero for more verbose output.
Definition at line 90 of file BinByBin.h.
|
inline |
Set the fractional bin error threshold for bin-by-bin creation and for participation in the merging algorithm.
Definition at line 99 of file BinByBin.h.
|
inline |
The threshold for the merging algorithm.
Definition at line 107 of file BinByBin.h.
|
inline |
The pattern-string for the systematic naming convention.
Definition at line 115 of file BinByBin.h.
|
inline |
Whether or not the bin-by-bin systematics are allowed to vary the process normalisation.
Definition at line 124 of file BinByBin.h.
|
inline |
Construct approximate Poisson uncertainties instead of default Gaussian.
Definition at line 132 of file BinByBin.h.
|
inline |
Set whether bins with zero content can participate in the merging procedure.
Definition at line 140 of file BinByBin.h.
|
inline |
Set whether bins with error >= content participate in the merging procedure.
Definition at line 148 of file BinByBin.h.
|
inline |
Getter functions for class attributes.
Definition at line 156 of file BinByBin.h.
|
inline |
Definition at line 157 of file BinByBin.h.
|
inline |
Definition at line 158 of file BinByBin.h.
|
inline |
Definition at line 159 of file BinByBin.h.
|
inline |
Definition at line 160 of file BinByBin.h.
|
inline |
Definition at line 161 of file BinByBin.h.
|
inline |
Definition at line 162 of file BinByBin.h.
|
inline |
Definition at line 163 of file BinByBin.h.