9 #include "boost/lexical_cast.hpp"
10 #include "boost/algorithm/string.hpp"
11 #include "boost/range/algorithm_ext/erase.hpp"
12 #include "boost/range/algorithm/find.hpp"
13 #include "boost/format.hpp"
14 #include "TDirectory.h"
32 CombineHarvester::ProcSystMap CombineHarvester::GenerateProcSystMap() {
33 ProcSystMap lookup(procs_.size());
34 for (
unsigned i = 0; i < systs_.size(); ++i) {
35 for (
unsigned j = 0; j < procs_.size(); ++j) {
37 lookup[j].push_back(systs_[i].get());
45 auto lookup = GenerateProcSystMap();
47 for (
auto param_it : params_) {
48 double backup = param_it.second->val();
49 param_it.second->set_val(backup+param_it.second->err_d());
50 double rate_d = this->GetRateInternal(lookup, param_it.first);
51 param_it.second->set_val(backup+param_it.second->err_u());
52 double rate_u = this->GetRateInternal(lookup, param_it.first);
53 double err = std::fabs(rate_u-rate_d) / 2.0;
55 param_it.second->set_val(backup);
57 return std::sqrt(err_sq);
67 auto lookup = GenerateProcSystMap();
68 double rate = GetRateInternal(lookup);
76 RooArgList
const& rands = fit.randomizePars();
80 int n_pars = rands.getSize();
81 std::vector<RooRealVar const*> r_vec(n_pars,
nullptr);
82 std::vector<ch::Parameter*> p_vec(n_pars,
nullptr);
83 for (
unsigned n = 0; n < p_vec.size(); ++n) {
84 r_vec[n] =
dynamic_cast<RooRealVar const*
>(rands.at(n));
88 for (
unsigned i = 0; i < n_samples; ++i) {
91 for (
int n = 0; n < n_pars; ++n) {
92 if (p_vec[n]) p_vec[n]->set_val(r_vec[n]->getVal());
95 double rand_rate = this->GetRateInternal(lookup);
96 double err = std::fabs(rand_rate-rate);
100 return std::sqrt(err_sq/
double(n_samples));
104 auto lookup = GenerateProcSystMap();
106 for (
int i = 1; i <= shape.GetNbinsX(); ++i) {
107 shape.SetBinError(i, 0.0);
109 for (
auto param_it : params_) {
110 double backup = param_it.second->val();
111 param_it.second->set_val(backup+param_it.second->err_d());
112 TH1F shape_d = this->GetShapeInternal(lookup, param_it.first);
113 param_it.second->set_val(backup+param_it.second->err_u());
114 TH1F shape_u = this->GetShapeInternal(lookup, param_it.first);
115 for (
int i = 1; i <= shape.GetNbinsX(); ++i) {
117 std::fabs(shape_u.GetBinContent(i) - shape_d.GetBinContent(i)) / 2.0;
118 shape.SetBinError(i, err*err + shape.GetBinError(i));
120 param_it.second->set_val(backup);
122 for (
int i = 1; i <= shape.GetNbinsX(); ++i) {
123 shape.SetBinError(i, std::sqrt(shape.GetBinError(i)));
129 unsigned n_samples) {
134 unsigned n_samples) {
135 auto lookup = GenerateProcSystMap();
136 TH1F shape = GetShapeInternal(lookup);
138 shape.Copy(yield_sum);
139 int n_bins = shape.GetNbinsX();
140 std::vector<std::vector<float>> sample_yields_perbin(n_bins, std::vector<float>(n_samples));
142 for (
int i = 1; i <= n_bins; ++i) {
143 shape.SetBinError(i, 0.0);
144 yield_sum.SetBinContent(i, 0.0);
151 RooArgList
const& rands = fit.randomizePars();
155 int n_pars = rands.getSize();
156 std::vector<RooRealVar const*> r_vec(n_pars,
nullptr);
157 std::vector<ch::Parameter*> p_vec(n_pars,
nullptr);
158 for (
unsigned n = 0; n < p_vec.size(); ++n) {
159 r_vec[n] =
dynamic_cast<RooRealVar const*
>(rands.at(n));
164 for (
unsigned i = 0; i < n_samples; ++i) {
167 for (
int n = 0; n < n_pars; ++n) {
168 if (p_vec[n]) p_vec[n]->set_val(r_vec[n]->getVal());
170 TH1F rand_shape = this->GetShapeInternal(lookup);
171 for (
int j = 1; j <= n_bins; ++j) {
172 double yield = rand_shape.GetBinContent(j);
173 sample_yields_perbin[j-1][i] = yield;
174 yield_sum.SetBinContent(j, yield_sum.GetBinContent(j) + yield);
177 for (
int i = 1; i <= n_bins; ++i) {
178 double yield_mean = yield_sum.GetBinContent(i)/double(n_samples);
179 for (
auto x :sample_yields_perbin[i-1]){
180 double err = std::fabs(x - yield_mean);
181 shape.SetBinError(i, err*err + shape.GetBinError(i));
183 shape.SetBinError(i, std::sqrt(shape.GetBinError(i)/
double(n_samples)));
190 unsigned n_samples) {
191 auto lookup = GenerateProcSystMap();
193 unsigned n = procs_.size();
194 TH1F nom(
"nominal",
"nominal", n, 0, n);
195 TH2F res(
"covariance",
"covariance", n, 0, n, n, 0, n);
197 std::vector<CombineHarvester> ch_procs;
198 std::vector<std::string> labels;
199 unsigned nbins = this->
bin_set().size();
201 for (
unsigned i = 0; i < procs_.size(); ++i) {
203 this->
cp().
bin({procs_[i]->bin()}).
process({procs_[i]->process()}));
205 labels.push_back(procs_[i]->
bin() +
"," + procs_[i]->
process());
207 labels.push_back(procs_[i]->
process());
210 for (
unsigned i = 0; i < procs_.size(); ++i) {
211 nom.SetBinContent(i + 1, ch_procs[i].
GetRate());
217 RooArgList
const& rands = fit.randomizePars();
221 int n_pars = rands.getSize();
222 std::vector<RooRealVar const*> r_vec(n_pars,
nullptr);
223 std::vector<ch::Parameter*> p_vec(n_pars,
nullptr);
224 for (
unsigned n = 0; n < p_vec.size(); ++n) {
225 r_vec[n] =
dynamic_cast<RooRealVar const*
>(rands.at(n));
230 for (
unsigned rnd = 0; rnd < n_samples; ++rnd) {
233 for (
int n = 0; n < n_pars; ++n) {
234 if (p_vec[n]) p_vec[n]->set_val(r_vec[n]->getVal());
237 for (
int i = 1; i <= nom.GetNbinsX(); ++i) {
238 for (
int j = 1; j <= nom.GetNbinsX(); ++j) {
240 int y = nom.GetNbinsX() - (i - 1);
241 res.GetXaxis()->SetBinLabel(x, labels[j - 1].c_str());
242 res.GetYaxis()->SetBinLabel(y, labels[i - 1].c_str());
244 x, y, res.GetBinContent(x, y) +
245 (ch_procs[i - 1].GetRate() - nom.GetBinContent(i)) *
246 (ch_procs[j - 1].
GetRate() - nom.GetBinContent(j)));
251 for (
int i = 1; i <= nom.GetNbinsX(); ++i) {
252 for (
int j = 1; j <= nom.GetNbinsX(); ++j) {
254 int y = nom.GetNbinsX() - (i - 1);
255 res.SetBinContent(x, y, res.GetBinContent(x, y) / double(n_samples));
263 unsigned n_samples) {
266 res.SetName(
"correlation");
267 res.SetTitle(
"correlation");
268 for (
int i = 1; i <= cov.GetNbinsX(); ++i) {
269 for (
int j = 1; j <= cov.GetNbinsX(); ++j) {
271 int y = cov.GetNbinsX() - (i - 1);
274 cov.GetBinContent(x, y) /
275 (std::sqrt(cov.GetBinContent(i, cov.GetNbinsX() - (i - 1))) *
276 std::sqrt(cov.GetBinContent(j, cov.GetNbinsX() - (j - 1)))));
283 auto lookup = GenerateProcSystMap();
284 return GetRateInternal(lookup);
288 auto lookup = GenerateProcSystMap();
289 return GetShapeInternal(lookup);
292 double CombineHarvester::GetRateInternal(ProcSystMap
const& lookup,
293 std::string
const& single_sys) {
296 for (
unsigned i = 0; i < procs_.size(); ++i) {
297 double p_rate = procs_[i]->rate();
303 if (single_sys !=
"" && !procs_[i]->pdf()) {
305 return sys->
name() == single_sys;
308 for (
auto sys_it : lookup[i]) {
309 if (sys_it->type() ==
"rateParam") {
312 double x = params_[sys_it->name()]->val();
313 if (sys_it->asymm()) {
314 p_rate *= logKappaForX(x * sys_it->scale(), sys_it->value_d(),
317 p_rate *= std::pow(sys_it->value_u(), x * sys_it->scale());
325 TH1F CombineHarvester::GetShapeInternal(ProcSystMap
const& lookup,
326 std::string
const& single_sys) {
328 bool shape_init =
false;
330 for (
unsigned i = 0; i < procs_.size(); ++i) {
334 if (single_sys !=
"" && !procs_[i]->pdf()) {
335 if (!
ch::any_of(lookup[i], [&](Systematic
const* sys) {
336 return sys->name() == single_sys;
340 double p_rate = procs_[i]->rate();
341 if (procs_[i]->shape() || procs_[i]->
data()) {
342 TH1F proc_shape = procs_[i]->ShapeAsTH1F();
343 for (
auto sys_it : lookup[i]) {
344 if (sys_it->type() ==
"rateParam") {
347 auto param_it = params_.find(sys_it->name());
348 if (param_it == params_.end()) {
349 throw std::runtime_error(
350 FNERROR(
"Parameter " + sys_it->name() +
351 " not found in CombineHarvester instance"));
353 double x = param_it->second->val();
354 if (sys_it->asymm()) {
355 p_rate *= logKappaForX(x * sys_it->scale(), sys_it->value_d(),
357 if (sys_it->type() ==
"shape" || sys_it->type() ==
"shapeN2" ||
358 sys_it->type() ==
"shapeU") {
360 if (sys_it->type() ==
"shapeN2") linear =
false;
361 if (sys_it->shape_u() && sys_it->shape_d()) {
362 ShapeDiff(x * sys_it->scale(), &proc_shape, procs_[i]->shape(),
363 sys_it->shape_d(), sys_it->shape_u(), linear);
365 if (sys_it->data_u() && sys_it->data_d()) {
366 RooDataHist
const* nom =
367 dynamic_cast<RooDataHist const*
>(procs_[i]->data());
369 ShapeDiff(x * sys_it->scale(), &proc_shape, nom,
370 sys_it->data_d(), sys_it->data_u());
375 p_rate *= std::pow(sys_it->value_u(), x * sys_it->scale());
378 for (
int b = 1; b <= proc_shape.GetNbinsX(); ++b) {
379 if (proc_shape.GetBinContent(b) < 0.) proc_shape.SetBinContent(b, 0.);
381 proc_shape.Scale(p_rate);
383 proc_shape.Copy(shape);
387 shape.Add(&proc_shape);
388 }
else if (procs_[i]->pdf()) {
389 if (!procs_[i]->observable()) {
390 RooAbsData
const* data_obj = FindMatchingData(procs_[i].get());
391 std::string var_name =
"CMS_th1x";
392 if (data_obj) var_name = data_obj->get()->first()->GetName();
393 procs_[i]->set_observable((RooRealVar *)procs_[i]->pdf()->findServer(var_name.c_str()));
395 TH1::AddDirectory(
false);
396 TH1F* tmp = (TH1F*)procs_[i]->observable()->createHistogram(
"");
397 for (
int b = 1; b <= tmp->GetNbinsX(); ++b) {
398 procs_[i]->observable()->setVal(tmp->GetBinCenter(b));
399 tmp->SetBinContent(b, tmp->GetBinWidth(b) * procs_[i]->pdf()->getVal());
401 TH1F proc_shape = *tmp;
403 RooAbsPdf
const* aspdf =
dynamic_cast<RooAbsPdf const*
>(procs_[i]->pdf());
404 if ((aspdf && !aspdf->selfNormalized()) || (!aspdf)) {
407 if (proc_shape.Integral() > 0.) {
408 proc_shape.Scale(1. / proc_shape.Integral());
411 for (
auto sys_it : lookup[i]) {
412 if (sys_it->type() ==
"rateParam") {
415 double x = params_[sys_it->name()]->val();
416 if (sys_it->asymm()) {
417 p_rate *= logKappaForX(x * sys_it->scale(), sys_it->value_d(),
420 p_rate *= std::pow(sys_it->value_u(), x * sys_it->scale());
423 proc_shape.Scale(p_rate);
425 proc_shape.Copy(shape);
429 shape.Add(&proc_shape);
437 for (
unsigned i = 0; i < obs_.size(); ++i) {
438 rate += obs_[i]->rate();
445 bool shape_init =
false;
447 for (
unsigned i = 0; i < obs_.size(); ++i) {
449 double p_rate = obs_[i]->rate();
450 if (obs_[i]->shape()) {
451 proc_shape = obs_[i]->ShapeAsTH1F();
452 }
else if (obs_[i]->
data()) {
453 TH1F* tmp =
dynamic_cast<TH1F*
>(obs_[i]->data()->createHistogram(
454 "", *(RooRealVar*)obs_[i]->
data()->get()->first()));
456 tmp->SetBinErrorOption(TH1::kPoisson);
459 proc_shape.Scale(1. / proc_shape.Integral());
461 proc_shape.Scale(p_rate);
463 proc_shape.Copy(shape);
467 shape.Add(&proc_shape);
472 void CombineHarvester::ShapeDiff(
double x,
478 double fx = smoothStepFunc(x);
479 for (
int i = 1; i <= target->GetNbinsX(); ++i) {
480 float h = high->GetBinContent(i);
481 float l = low->GetBinContent(i);
482 float n = nom->GetBinContent(i);
484 float t = target->GetBinContent(i);
485 target->SetBinContent(i, t > 0. ? std::log(t) : -999.);
486 h = (h > 0. && n > 0.) ? std::log(h/n) : 0.;
487 l = (l > 0. && n > 0.) ? std::log(l/n) : 0.;
488 target->SetBinContent(i, target->GetBinContent(i) +
489 0.5 * x * ((h - l) + (h + l) * fx));
490 target->SetBinContent(i, std::exp(target->GetBinContent(i)));
492 target->SetBinContent(i, target->GetBinContent(i) +
493 0.5 * x * ((h - l) + (h + l - 2. * n) * fx));
498 void CombineHarvester::ShapeDiff(
double x,
500 RooDataHist
const* nom,
501 RooDataHist
const* low,
502 RooDataHist
const* high) {
503 double fx = smoothStepFunc(x);
504 for (
int i = 1; i <= target->GetNbinsX(); ++i) {
510 float h = high->weight() / high->sumEntries();
511 float l = low->weight() / low->sumEntries();
512 float n = nom->weight() / nom->sumEntries();
513 target->SetBinContent(i, target->GetBinContent(i) +
514 0.5 * x * ((h - l) + (h + l - 2. * n) * fx));
526 std::string
const& newname) {
527 auto it = params_.find(oldname);
528 if (it != params_.end()) {
529 params_[newname] = it->second;
530 params_[newname]->set_name(newname);
536 std::string
const& name)
const {
537 auto it = params_.find(name);
538 if (it != params_.end()) {
539 return it->second.get();
546 auto it = params_.find(name);
547 if (it != params_.end()) {
548 return it->second.get();
555 std::vector<ch::Parameter>
const& params) {
556 for (
unsigned i = 0; i < params.size(); ++i) {
557 auto it = params_.find(params[i].name());
558 if (it != params_.end()) {
559 it->second->set_val(params[i].val());
560 it->second->set_err_d(params[i].err_d());
561 it->second->set_err_u(params[i].err_u());
563 if (verbosity_ >= 1) {
564 LOGLINE(log(),
"Parameter " + params[i].name() +
" is not defined");
571 for (
int i = 0; i < fit.floatParsFinal().getSize(); ++i) {
572 RooRealVar
const* var =
573 dynamic_cast<RooRealVar const*
>(fit.floatParsFinal().at(i));
575 auto it = params_.find(std::string(var->GetName()));
576 if (it != params_.end()) {
577 it->second->set_val(var->getVal());
578 it->second->set_err_d(var->getErrorLo());
579 it->second->set_err_u(var->getErrorHi());
581 if (verbosity_ >= 1) {
583 "Parameter " + std::string(var->GetName()) +
" is not defined");
594 std::vector<ch::Parameter> params;
595 for (
auto const& it : params_) {
596 params.push_back(*(it.second));
608 std::vector<double> prev_proc_rates(procs_.size());
612 std::vector<std::unique_ptr<TH1>> scaled_procs(procs_.size());
614 for (
unsigned i = 0; i < procs_.size(); ++i) {
615 if (procs_[i]->shape()) {
617 std::unique_ptr<TH1> copy(procs_[i]->ClonedScaledShape());
619 prev_proc_rates[i] = procs_[i]->no_norm_rate();
620 std::unique_ptr<TH1> copy2(copy->Rebin(bins.size()-1,
"", &(bins[0])));
622 procs_[i]->set_shape(std::move(copy2),
true);
623 scaled_procs[i] = procs_[i]->ClonedScaledShape();
626 for (
unsigned i = 0; i < obs_.size(); ++i) {
627 if (obs_[i]->shape()) {
628 std::unique_ptr<TH1> copy(obs_[i]->ClonedScaledShape());
629 std::unique_ptr<TH1> copy2(copy->Rebin(bins.size()-1,
"", &(bins[0])));
630 obs_[i]->set_shape(std::move(copy2),
true);
633 for (
unsigned i = 0; i < systs_.size(); ++i) {
634 TH1
const* proc_hist =
nullptr;
635 double prev_rate = 0.;
636 for (
unsigned j = 0; j < procs_.size(); ++j) {
638 proc_hist = scaled_procs[j].get();
639 prev_rate = prev_proc_rates[j];
642 if (systs_[i]->shape_u() && systs_[i]->shape_d()) {
644 std::unique_ptr<TH1> copy_u(systs_[i]->ClonedShapeU());
645 std::unique_ptr<TH1> copy_d(systs_[i]->ClonedShapeD());
650 copy_u->Scale(systs_[i]->value_u() * prev_rate);
651 copy_d->Scale(systs_[i]->value_d() * prev_rate);
653 std::unique_ptr<TH1> copy2_u(
654 copy_u->Rebin(bins.size() - 1,
"", &(bins[0])));
655 std::unique_ptr<TH1> copy2_d(
656 copy_d->Rebin(bins.size() - 1,
"", &(bins[0])));
659 systs_[i]->set_shapes(std::move(copy2_u), std::move(copy2_d), proc_hist);
668 std::vector<double> prev_proc_rates(procs_.size());
673 std::vector<std::unique_ptr<TH1>> scaled_procs(procs_.size());
675 for (
unsigned i = 0; i < procs_.size(); ++i) {
676 if (procs_[i]->shape()) {
678 std::unique_ptr<TH1> copy(procs_[i]->ClonedScaledShape());
680 prev_proc_rates[i] = procs_[i]->no_norm_rate();
681 for (
int j = 1; j <= copy->GetNbinsX();j ++){
682 if(copy->GetBinLowEdge(j) >= min && copy->GetBinLowEdge(j+1) <= max){
683 copy->SetBinContent(j,0.);
684 copy->SetBinError(j,0.);
688 procs_[i]->set_shape(std::move(copy),
true);
689 scaled_procs[i] = procs_[i]->ClonedScaledShape();
692 for (
unsigned i = 0; i < obs_.size(); ++i) {
693 if (obs_[i]->shape()) {
694 std::unique_ptr<TH1> copy(obs_[i]->ClonedScaledShape());
695 for (
int j = 1; j <= copy->GetNbinsX();j ++){
696 if(copy->GetBinLowEdge(j) >= min && copy->GetBinLowEdge(j+1) <= max){
697 copy->SetBinContent(j,0.);
698 copy->SetBinError(j,0.);
701 obs_[i]->set_shape(std::move(copy),
true);
704 for (
unsigned i = 0; i < systs_.size(); ++i) {
705 TH1
const* proc_hist =
nullptr;
706 double prev_rate = 0.;
707 for (
unsigned j = 0; j < procs_.size(); ++j) {
709 proc_hist = scaled_procs[j].get();
710 prev_rate = prev_proc_rates[j];
713 if (systs_[i]->shape_u() && systs_[i]->shape_d()) {
715 std::unique_ptr<TH1> copy_u(systs_[i]->ClonedShapeU());
716 std::unique_ptr<TH1> copy_d(systs_[i]->ClonedShapeD());
721 copy_u->Scale(systs_[i]->value_u() * prev_rate);
722 copy_d->Scale(systs_[i]->value_d() * prev_rate);
724 for (
int j = 1; j <= copy_u->GetNbinsX();j ++){
725 if(copy_u->GetBinLowEdge(j) >= min && copy_u->GetBinLowEdge(j+1) <= max){
726 copy_u->SetBinContent(j,0.);
727 copy_u->SetBinError(j,0.);
729 if(copy_d->GetBinLowEdge(j) >= min && copy_d->GetBinLowEdge(j+1) <= max){
730 copy_d->SetBinContent(j,0.);
731 copy_d->SetBinError(j,0.);
736 systs_[i]->set_shapes(std::move(copy_u), std::move(copy_d), proc_hist);
743 for (
unsigned i = 0; i < procs_.size(); ++i) {
744 std::set<std::string> binning_vars;
745 if (procs_[i]->pdf()) {
746 RooAbsData
const* data_obj = FindMatchingData(procs_[i].get());
747 std::string var_name =
"CMS_th1x";
748 if (data_obj) var_name = data_obj->get()->first()->GetName();
749 binning_vars.insert(var_name);
751 for (
auto & it : wspaces_) {
752 for (
auto & var : binning_vars) {
754 dynamic_cast<RooRealVar*
>(it.second->var(var.c_str()));
755 if (avar) avar->setBins(nbins);
763 double CombineHarvester::logKappaForX(
double x,
double k_low,
764 double k_high)
const {
765 if (k_high == 0. || k_low == 0.) {
766 if (verbosity_ >= 1) {
767 LOGLINE(log(),
"Have kappa=0.0 (scaling ill-defined), returning 1.0");
772 return (x >= 0 ? std::pow(k_high, x) : std::pow(k_low, -1.0 * x));
781 double logKhi = std::log(k_high);
782 double logKlo = -std::log(k_low);
783 double avg = 0.5 * (logKhi + logKlo), halfdiff = 0.5 * (logKhi - logKlo);
784 double twox = x + x, twox2 = twox * twox;
785 double alpha = 0.125 * twox * (twox2 * (3 * twox2 - 10.) + 15.);
786 double ret = avg + alpha * halfdiff;
787 return std::exp(ret * x);
791 std::vector<std::string>
const& patterns) {
792 std::vector<boost::regex> rgx;
793 for (
auto const& pt : patterns) rgx.emplace_back(pt);
794 for (
auto it = params_.begin(); it != params_.end(); ++it) {
795 std::string par = it->first;
796 auto & groups = it->second->groups();
797 if (groups.count(name))
continue;
805 std::vector<std::string>
const& patterns) {
806 std::vector<boost::regex> rgx;
807 for (
auto const& pt : patterns) rgx.emplace_back(pt);
808 for (
auto it = params_.begin(); it != params_.end(); ++it) {
809 std::string par = it->first;
810 auto & groups = it->second->groups();
811 if (!groups.count(name))
continue;
819 std::string
const& newname) {
820 for (
auto it = params_.begin(); it != params_.end(); ++it) {
821 auto & groups = it->second->groups();
822 if (groups.count(oldname)) {
823 groups.erase(oldname);
824 groups.insert(newname);
830 post_lines_.push_back(line);
TH2F GetRateCovariance(RooFitResult const &fit, unsigned n_samples)
void ZeroBins(double min, double max)
void RenameParameter(std::string const &oldname, std::string const &newname)
TH2F GetRateCorrelation(RooFitResult const &fit, unsigned n_samples)
CombineHarvester & process(std::vector< std::string > const &vec, bool cond=true)
CombineHarvester & data()
void AddDatacardLineAtEnd(std::string const &line)
Add a line of text at the end of all datacards.
void SetGroup(std::string const &name, std::vector< std::string > const &patterns)
Add parameters to a given group.
TH1F GetShapeWithUncertainty()
void RenameGroup(std::string const &oldname, std::string const &newname)
Rename a nuisance parameter group.
CombineHarvester & bin(std::vector< std::string > const &vec, bool cond=true)
void UpdateParameters(std::vector< ch::Parameter > const ¶ms)
std::set< std::string > bin_set()
void VariableRebin(std::vector< double > bins)
void RemoveGroup(std::string const &name, std::vector< std::string > const &patterns)
Remove parameters to a given group.
void ClearDatacardLinesAtEnd()
Clear all added datacard lines.
std::vector< ch::Parameter > GetParameters() const
void SetPdfBins(unsigned nbins)
CombineHarvester cp()
Creates and returns a shallow copy of the CombineHarvester instance.
ch::Parameter const * GetParameter(std::string const &name) const
std::string const & name() const
bool contains_rgx(const std::vector< boost::regex > &r, T p)
bool any_of(const Range &r, Predicate p)
bool MatchingProcess(T const &first, U const &second)