1 #ifndef CombineTools_AutoRebin_h
2 #define CombineTools_AutoRebin_h
58 void FindNewBinning(TH1F &total_bkg, std::vector<double> &new_bins,
59 double bin_condition,
double bin_uncert_fraction,
int mode);
88 bin_uncert_fraction_ = val;
104 perform_rebin_ = val;
113 double bin_threshold_;
114 double bin_uncert_fraction_;
Tests for any bins below a certain threshold and if they exist merges them with neighborouring bins.
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...
AutoRebin & SetRebinMode(int val)
Flag to perform different versions of rebinning algorithm.
int GetMaximumFracUncertBin(TH1F &total_bkg)
Return bin with maximum value of fractional error.
AutoRebin & SetPerformRebin(bool val)
Whether to actually perform the rebinning or just print it out.
AutoRebin & SetVerbosity(unsigned verbosity)
Set to a value greater than zero for more verbose output.
AutoRebin & SetBinThreshold(double val)
The threshold for which we consider merging bins containing less than this value.
AutoRebin & SetBinUncertFraction(double val)
The threshold on the bin uncertainty fraction for which we consider merging bins containing less than...
void Rebin(CombineHarvester &src, CombineHarvester &dest)
Work out optimal binning using the total background histogram built from src, and apply the binning t...