Tests for any bins below a certain threshold and if they exist merges them with neighborouring bins. More...
Public Member Functions | |
| AutoRebin () | |
| void | Rebin (CombineHarvester &src, CombineHarvester &dest) |
| Work out optimal binning using the total background histogram built from src, and apply the binning to dest More... | |
| void | FindNewBinning (TH1F &total_bkg, std::vector< double > &new_bins, double bin_condition, double bin_uncert_fraction, int mode) |
| Pass through the total background histogram to find bins failing the required condition ("empty" bins). More... | |
| int | GetMaximumFracUncertBin (TH1F &total_bkg) |
| Return bin with maximum value of fractional error. More... | |
| AutoRebin & | SetVerbosity (unsigned verbosity) |
| Set to a value greater than zero for more verbose output. More... | |
| AutoRebin & | SetBinThreshold (double val) |
| The threshold for which we consider merging bins containing less than this value. More... | |
| AutoRebin & | SetBinUncertFraction (double val) |
| The threshold on the bin uncertainty fraction for which we consider merging bins containing less than this value. More... | |
| AutoRebin & | SetRebinMode (int val) |
| Flag to perform different versions of rebinning algorithm. More... | |
| AutoRebin & | SetPerformRebin (bool val) |
| Whether to actually perform the rebinning or just print it out. More... | |
Tests for any bins below a certain threshold and if they exist merges them with neighborouring bins.
Typical usage:
auto rebin = ch::AutoRebin()
.SetEmptyBinThreshold(0.);
rebin.Rebin(cb.cp().channel({"tt"}), cb);
See below for details on each class method.
Definition at line 19 of file AutoRebin.h.
| ch::AutoRebin::AutoRebin | ( | ) |
Definition at line 10 of file AutoRebin.cc.
| void ch::AutoRebin::Rebin | ( | CombineHarvester & | src, |
| CombineHarvester & | dest | ||
| ) |
Work out optimal binning using the total background histogram built from src, and apply the binning to dest
Definition at line 18 of file AutoRebin.cc.
| void ch::AutoRebin::FindNewBinning | ( | TH1F & | total_bkg, |
| std::vector< double > & | new_bins, | ||
| double | bin_condition, | ||
| double | bin_uncert_fraction, | ||
| int | mode | ||
| ) |
Pass through the total background histogram to find bins failing the required condition ("empty" bins).
For RebinMode==0:
For RebinMode==1:
Definition at line 104 of file AutoRebin.cc.
| int ch::AutoRebin::GetMaximumFracUncertBin | ( | TH1F & | total_bkg | ) |
Return bin with maximum value of fractional error.
Definition at line 336 of file AutoRebin.cc.
|
inline |
Set to a value greater than zero for more verbose output.
Definition at line 69 of file AutoRebin.h.
|
inline |
The threshold for which we consider merging bins containing less than this value.
Definition at line 78 of file AutoRebin.h.
|
inline |
The threshold on the bin uncertainty fraction for which we consider merging bins containing less than this value.
Definition at line 87 of file AutoRebin.h.
|
inline |
Flag to perform different versions of rebinning algorithm.
Definition at line 95 of file AutoRebin.h.
|
inline |
Whether to actually perform the rebinning or just print it out.
Definition at line 103 of file AutoRebin.h.