CombineHarvester
BinByBin.h
Go to the documentation of this file.
1 #ifndef CombineTools_BinByBin_h
2 #define CombineTools_BinByBin_h
3 #include <string>
5 
6 namespace ch {
22  public:
24 
53 
79 
85 
90  inline BinByBinFactory& SetVerbosity(unsigned verbosity) {
91  v_ = verbosity;
92  return *this;
93  }
94 
99  inline BinByBinFactory& SetAddThreshold(double val) {
100  bbb_threshold_ = val;
101  return *this;
102  }
103 
107  inline BinByBinFactory& SetMergeThreshold(double val) {
108  merge_threshold_ = val;
109  return *this;
110  }
111 
115  inline BinByBinFactory& SetPattern(std::string const& pattern) {
116  pattern_ = pattern;
117  return *this;
118  }
119 
124  inline BinByBinFactory& SetFixNorm(bool fix) {
125  fix_norm_ = fix;
126  return *this;
127  }
128 
132  inline BinByBinFactory& SetPoissonErrors(bool poisson_errors) {
133  poisson_errors_ = poisson_errors;
134  return *this;
135  }
136 
140  inline BinByBinFactory& SetMergeZeroBins(bool merge) {
141  merge_zero_bins_ = merge;
142  return *this;
143  }
144 
149  merge_saturated_bins_ = merge;
150  return *this;
151  }
152 
156  inline unsigned GetVerbosity() {return v_;}
157  inline double GetAddThreshold() {return bbb_threshold_;}
158  inline double GetMergeThreshold() {return merge_threshold_;}
159  inline std::string GetPattern() {return pattern_;}
160  inline bool GetFixNorm() {return fix_norm_;}
161  inline bool GetPoissonErrors() {return poisson_errors_;}
162  inline bool GetMergeZeroBins() {return merge_zero_bins_;}
163  inline bool GetMergeSaturatedBins() {return merge_saturated_bins_;}
164 
165  private:
166  std::string pattern_;
167  unsigned v_;
168  double bbb_threshold_;
169  double merge_threshold_;
170  bool fix_norm_;
171  bool poisson_errors_;
172  bool merge_zero_bins_;
173  bool merge_saturated_bins_;
174 };
175 }
176 
177 #endif
Merges bin uncertainties and creates bin-by-bin statistical uncertainties.
Definition: BinByBin.h:21
BinByBinFactory & SetAddThreshold(double val)
Set the fractional bin error threshold for bin-by-bin creation and for participation in the merging a...
Definition: BinByBin.h:99
unsigned GetVerbosity()
Getter functions for class attributes.
Definition: BinByBin.h:156
BinByBinFactory & SetFixNorm(bool fix)
Whether or not the bin-by-bin systematics are allowed to vary the process normalisation.
Definition: BinByBin.h:124
bool GetPoissonErrors()
Definition: BinByBin.h:161
double GetAddThreshold()
Definition: BinByBin.h:157
BinByBinFactory & SetPattern(std::string const &pattern)
The pattern-string for the systematic naming convention.
Definition: BinByBin.h:115
BinByBinFactory & SetMergeZeroBins(bool merge)
Set whether bins with zero content can participate in the merging procedure.
Definition: BinByBin.h:140
std::string GetPattern()
Definition: BinByBin.h:159
void MergeBinErrors(CombineHarvester &cb)
Merges histogram bin errors between processes.
Definition: BinByBin.cc:22
BinByBinFactory & SetMergeSaturatedBins(bool merge)
Set whether bins with error >= content participate in the merging procedure.
Definition: BinByBin.h:148
BinByBinFactory & SetPoissonErrors(bool poisson_errors)
Construct approximate Poisson uncertainties instead of default Gaussian.
Definition: BinByBin.h:132
BinByBinFactory & SetVerbosity(unsigned verbosity)
By default this class only produces output on the screen when an error occurs, set to a value greater...
Definition: BinByBin.h:90
void MergeAndAdd(CombineHarvester &src, CombineHarvester &dest)
A convenience function which calls MergeBinErrors and AddBinByBin in turn.
Definition: BinByBin.cc:202
BinByBinFactory & SetMergeThreshold(double val)
The threshold for the merging algorithm.
Definition: BinByBin.h:107
void AddBinByBin(CombineHarvester &src, CombineHarvester &dest)
Create bin-by-bin shape uncertainties for every process in src, and add these to dest
Definition: BinByBin.cc:105
bool GetMergeZeroBins()
Definition: BinByBin.h:162
bool GetMergeSaturatedBins()
Definition: BinByBin.h:163
double GetMergeThreshold()
Definition: BinByBin.h:158
Definition: Algorithm.h:10