1 #ifndef CMSHistFuncFactory_h
2 #define CMSHistFuncFactory_h
5 #include "RooWorkspace.h"
6 #include "RooHistPdf.h"
7 #include "RooBinning.h"
9 #pragma GCC diagnostic push
10 #pragma GCC diagnostic ignored "-Wuninitialized"
11 #pragma GCC diagnostic ignored "-Wignored-qualifiers"
12 #pragma GCC diagnostic ignored "-Wunused-parameter"
13 #include "HiggsAnalysis/CombinedLimit/interface/CMSHistFunc.h"
14 #include "HiggsAnalysis/CombinedLimit/interface/RooSpline1D.h"
15 #include "HiggsAnalysis/CombinedLimit/interface/VerticalInterpHistPdf.h"
16 #include "HiggsAnalysis/CombinedLimit/interface/AsymPow.h"
17 #pragma GCC diagnostic pop
23 void Run(
CombineHarvester& cb, RooWorkspace& ws, std::map<std::string, std::string> process_vs_norm_postfix_map);
28 std::string norm_postfix_ =
"norm";
31 std::map<std::string, RooAbsReal*> mass_var;
33 std::map<std::string, RooRealVar> obs_;
37 TH1F AsTH1F(TH1
const* hist) {
39 TH1F
const* test_f =
dynamic_cast<TH1F const*
>(hist);
40 TH1D
const* test_d =
dynamic_cast<TH1D const*
>(hist);
46 throw std::runtime_error(
"TH1 is not a TH1F or a TH1D");
51 RooRealVar VarFromHist(TString name, TString title, TH1
const& hist) {
53 if (hist.GetXaxis()->GetXbins() && hist.GetXaxis()->GetXbins()->GetSize()) {
54 binning =
new RooBinning(hist.GetNbinsX(), hist.GetXaxis()->GetXbins()->GetArray());
56 binning =
new RooBinning(hist.GetNbinsX(), hist.GetXaxis()->GetXmin(), hist.GetXaxis()->GetXmax());
58 RooRealVar x(name, title, hist.GetXaxis()->GetXmin(), hist.GetXaxis()->GetXmax());
60 x.setBinning(*binning);
void Run(CombineHarvester &cb, RooWorkspace &ws, std::map< std::string, std::string > process_vs_norm_postfix_map)
void SetHorizontalMorphingVariable(std::map< std::string, RooAbsReal * > &hvar)