46 if (binning.isUniform()) {
48 axis[
"min"] << obs.
getMin();
49 axis[
"max"] << obs.
getMax();
51 auto &bounds = axis[
"bounds"];
53 double val = binning.binLow(0);
55 for (
int i = 0; i < binning.numBins(); ++i) {
56 val = binning.binHigh(i);
57 bounds.append_child() << val;
62double round_prec(
double d,
int nSig)
66 int ndigits = std::floor(std::log10(std::abs(
d))) + 1 - nSig;
67 double sf = std::pow(10, ndigits);
68 if (std::abs(
d / sf) < 2)
70 return sf * std::round(
d / sf);
76constexpr auto staterror =
"staterror";
79void erasePrefix(std::string &str, std::string_view prefix)
82 str.erase(0, prefix.size());
86void eraseSuffix(std::string &str, std::string_view suffix)
89 str.erase(str.size() - suffix.size());
94void sortByName(Coll &coll)
96 std::sort(coll.begin(), coll.end(), [](
auto &
l,
auto &
r) { return l.name < r.name; });
102 for (
const auto &client :
gamma->clients()) {
103 if (
auto casted =
dynamic_cast<T *
>(client)) {
106 T *
c = findClient<T>(client);
116 RooPoisson *constraint_p = findClient<RooPoisson>(
g);
147RooRealVar &createNominal(
RooWorkspace &ws, std::string
const &parname,
double val,
double min,
double max)
149 RooRealVar &nom = getOrCreate<RooRealVar>(ws,
"nom_" + parname, val, min, max);
157std::string constraintName(std::string
const &sysname)
159 return sysname +
"_constraint";
164 return getOrCreate<RooGaussian>(ws, constraintName(sysname), *ws.
var(pname), *ws.
var(
"nom_" + pname),
168void setMCStatGammaRanges(
RooArgList const &gammas, std::vector<double>
const &errs,
double statErrThresh)
172 for (
size_t i = 0; i < errs.size(); ++i) {
175 g->setError(errs[i]);
176 if (errs[i] < statErrThresh) {
177 g->setConstant(
true);
182ParamHistFunc &createPHF(
const std::string &sysname,
const std::string &phfname,
const std::vector<double> &vals,
184 const std::string &constraintType,
RooArgList &gammas,
double gamma_min,
double gamma_max)
190 for (
size_t i = 0; i < gammas.
size(); ++i) {
194 std::string basename =
v->
GetName();
195 v->setConstant(
false);
196 if (constraintType ==
"Const" || vals[i] == 0.) {
197 v->setConstant(
true);
198 }
else if (constraintType ==
"Gauss") {
199 auto &nom = createNominal(ws, basename, 1.0, 0, std::max(10., gamma_max));
202 }
else if (constraintType ==
"Poisson") {
203 double tau_float = vals[i];
208 pois.setNoRounding(
true);
209 constraints.
add(pois,
true);
214 for (
auto &
g : gammas) {
215 for (
auto client :
g->clients()) {
216 if (
dynamic_cast<RooAbsPdf *
>(client) && !constraints.
find(*client)) {
217 constraints.
add(*client);
225bool hasStaterror(
const JSONNode &comp)
229 for (
const auto &mod : comp[
"modifiers"].children()) {
230 if (mod[
"type"].val() == ::Literals::staterror)
243 std::string prefixedName = fprefix +
"_" +
name;
245 if (!
p.has_child(
"data")) {
257 if (hasStaterror(
p)) {
258 shapeElems.
add(*mcStatObject);
261 if (
p.has_child(
"modifiers")) {
263 std::vector<double> overall_low;
264 std::vector<double> overall_high;
270 for (
const auto &mod :
p[
"modifiers"].children()) {
271 std::string
const &modtype = mod[
"type"].val();
273 if (modtype ==
"staterror") {
275 }
else if (modtype ==
"normfactor") {
276 normElems.
add(getOrCreate<RooRealVar>(ws, sysname, 1., -3, 5));
277 if (
auto constrInfo = mod.find(
"constraint_name")) {
280 }
else if (modtype ==
"normsys") {
281 auto *parameter = mod.find(
"parameter");
282 std::string parname(parameter ? parameter->val() :
"alpha_" + sysname);
283 createNominal(ws, parname, 0.0, -10, 10);
284 overall_nps.
add(getOrCreate<RooRealVar>(ws, parname, 0., -5, 5));
285 auto &
data = mod[
"data"];
290 overall_low.push_back(
data[
"lo"].val_double() > 0 ?
data[
"lo"].val_double()
292 overall_high.push_back(
data[
"hi"].val_double() > 0 ?
data[
"hi"].val_double()
294 constraints.
add(getConstraint(ws, sysname, parname));
295 }
else if (modtype ==
"histosys") {
296 auto *parameter = mod.find(
"parameter");
297 std::string parname(parameter ? parameter->val() :
"alpha_" + sysname);
298 createNominal(ws, parname, 0.0, -10, 10);
299 histNps.
add(getOrCreate<RooRealVar>(ws, parname, 0., -5, 5));
300 auto &
data = mod[
"data"];
302 sysname +
"Low_" + prefixedName, varlist,
305 sysname +
"High_" + prefixedName, varlist,
307 constraints.
add(getConstraint(ws, sysname, parname));
308 }
else if (modtype ==
"shapesys") {
309 std::string funcName = prefixedName +
"_" + sysname +
"_" + prefixedName +
"_ShapeSys";
310 std::vector<double> vals;
311 for (
const auto &
v : mod[
"data"][
"vals"].children()) {
312 vals.push_back(
v.val_double());
315 std::string constraint(mod[
"constraint"].val());
316 shapeElems.
add(createPHF(sysname, funcName, vals, tool, constraints, varlist, constraint, gammas, 0, 1000));
317 }
else if (modtype ==
"custom") {
323 shapeElems.
add(*obj);
332 if (!overall_nps.
empty()) {
334 1., overall_low, overall_high);
338 if (!histNps.
empty()) {
341 v.setAllInterpCodes(4);
349 if (!normElems.
empty()) {
352 ws.
factory(
"RooConstVar::" + prefixedName +
"_scaleFactors(1.)");
365 if (!
p.has_child(
"samples")) {
368 double statErrThresh = 0;
369 std::string statErrType =
"Poisson";
370 if (
p.has_child(::Literals::staterror)) {
371 auto &staterr =
p[::Literals::staterror];
372 if (staterr.has_child(
"relThreshold"))
373 statErrThresh = staterr[
"relThreshold"].val_double();
374 if (staterr.has_child(
"constraint"))
375 statErrType = staterr[
"constraint"].val();
377 std::vector<double> sumW;
378 std::vector<double> sumW2;
380 for (
auto const &obsNode :
p[
"axes"].children()) {
381 if (obsNode.has_child(
"bounds")) {
382 std::vector<double> bounds;
383 for (
auto const &bound : obsNode[
"bounds"].children()) {
384 bounds.push_back(bound.val_double());
386 RooRealVar &obs = getOrCreate<RooRealVar>(ws, obsNode[
"name"].val(), bounds[0], bounds[bounds.size() - 1]);
389 for (
auto b : bounds) {
393 observables.
add(obs);
395 RooRealVar &obs = getOrCreate<RooRealVar>(ws, obsNode[
"name"].val(), obsNode[
"min"].val_double(),
396 obsNode[
"max"].val_double());
397 obs.
setBins(obsNode[
"nbins"].val_int());
398 observables.
add(obs);
402 std::string fprefix =
name;
404 std::vector<std::unique_ptr<RooDataHist>>
data;
405 for (
const auto &comp :
p[
"samples"].children()) {
408 size_t nbins = dh->numEntries();
410 if (hasStaterror(comp)) {
415 for (
size_t i = 0; i < nbins; ++i) {
416 sumW[i] += dh->weight(i);
417 sumW2[i] += dh->weightSquared(i);
420 data.emplace_back(std::move(dh));
426 std::string phfName =
name;
427 erasePrefix(phfName,
"model_");
429 std::vector<double> vals(sumW.size());
430 std::vector<double> errs(sumW.size());
432 for (
size_t i = 0; i < sumW.size(); ++i) {
433 errs[i] = std::sqrt(sumW2[i]) / sumW[i];
434 if (statErrType ==
"Gauss") {
435 vals[i] = std::max(errs[i], 0.);
436 }
else if (statErrType ==
"Poisson") {
437 vals[i] = sumW[i] * sumW[i] / sumW2[i];
442 mcStatObject = &createPHF(
"stat_" + phfName,
"mc_stat_" + phfName, vals, *tool, constraints, observables,
443 statErrType, gammas, 0, 10);
444 setMCStatGammaRanges(gammas, errs, statErrThresh);
450 for (
const auto &comp :
p[
"samples"].children()) {
451 importHistSample(*tool, *
data[idx], observables, mcStatObject, fprefix, comp, constraints);
459 if (constraints.
empty()) {
463 std::string sumName =
name +
"_model";
464 erasePrefix(sumName,
"model_");
467 sum.setAttribute(
"BinnedLikelihood");
476 std::string
const &
key()
const override
478 static const std::string keystring =
"interpolation0d";
484 elem[
"type"] <<
key();
486 elem[
"interpolationCodes"].
fill_seq(fip->interpolationCodes());
487 elem[
"nom"] << fip->nominal();
496 std::string
const &
key()
const override
498 static const std::string keystring =
"interpolation";
504 elem[
"type"] <<
key();
529 if (
p.has_child(
"interpolationCodes")) {
531 for (
auto const &node :
p[
"interpolationCodes"].children()) {
546 if (!
p.has_child(
"high")) {
549 if (!
p.has_child(
"low")) {
552 if (!
p.has_child(
"nom")) {
556 double nom(
p[
"nom"].val_double());
560 std::vector<double> high;
563 std::vector<double> low;
566 if (vars.size() != low.size() || vars.size() != high.size()) {
568 "' has non-matching lengths of 'vars', 'high' and 'low'!");
573 if (
p.has_child(
"interpolationCodes")) {
575 for (
auto const &node :
p[
"interpolationCodes"].children()) {
587 if (
auto prod =
dynamic_cast<RooProduct *
>(arg)) {
588 for (
const auto &
e : prod->components()) {
589 collectElements(elems,
e);
601 :
name{par.GetName()}, param{&par}, constraint{constr}
613 :
name(
n), param(
p), low(
l), high(
h), constraint(
c)
620 std::vector<double> low;
621 std::vector<double> high;
624 :
name(
n), param(
p), constraint(
c)
626 low.assign(
l->dataHist().weightArray(),
l->dataHist().weightArray() +
l->dataHist().numEntries());
627 high.assign(
h->dataHist().weightArray(),
h->dataHist().weightArray() +
h->dataHist().numEntries());
632 std::vector<double> constraints;
633 TClass *constraint =
nullptr;
638 std::vector<double> hist;
639 std::vector<double> histError;
640 std::vector<NormFactor> normfactors;
641 std::vector<NormSys> normsys;
642 std::vector<HistoSys> histosys;
643 std::vector<ShapeSys> shapesys;
644 std::vector<RooAbsReal *> otherElements;
645 bool useBarlowBeestonLight =
false;
652 std::string parname = par->
GetName();
653 bool isConstrained =
false;
654 for (
RooAbsArg const *pdf : ws->allPdfs()) {
655 if (
auto gauss =
dynamic_cast<RooGaussian const *
>(pdf)) {
656 if (parname == gauss->getX().GetName()) {
657 sample.normfactors.emplace_back(*par, gauss);
658 isConstrained =
true;
663 sample.normfactors.emplace_back(*par);
675 std::string chname = pdfname;
676 erasePrefix(chname,
"model_");
677 eraseSuffix(chname,
"_model");
679 for (
RooAbsArg *sample : sumpdf->funcList()) {
685 std::map<int, double> tot_yield;
686 std::map<int, double> tot_yield2;
687 std::map<int, double> rel_errors;
689 long unsigned int nBins = 0;
691 std::vector<Sample> samples;
693 for (
size_t sampleidx = 0; sampleidx < sumpdf->
funcList().
size(); ++sampleidx) {
696 std::vector<ParamHistFunc *> phfs;
698 const auto func = sumpdf->
funcList().
at(sampleidx);
700 erasePrefix(sample.name,
"L_x_");
701 eraseSuffix(sample.name,
"_shapes");
702 eraseSuffix(sample.name,
"_" + chname);
703 erasePrefix(sample.name, pdfname +
"_");
705 collectElements(elems, func);
706 collectElements(elems, sumpdf->
coefList().
at(sampleidx));
708 auto updateObservables = [&](
RooDataHist const &dataHist) {
709 if (varSet ==
nullptr) {
710 varSet = dataHist.
get();
711 nBins = dataHist.numEntries();
713 if (sample.hist.empty()) {
714 auto *
w = dataHist.weightArray();
715 sample.hist.assign(
w,
w + dataHist.numEntries());
721 if (constVar->getVal() != 1.) {
722 sample.normfactors.emplace_back(*
e);
724 }
else if (
auto par =
dynamic_cast<RooRealVar *
>(
e)) {
725 addNormFactor(par, sample, ws);
726 }
else if (
auto hf =
dynamic_cast<const RooHistFunc *
>(
e)) {
727 updateObservables(hf->dataHist());
732 }
else if (
auto real =
dynamic_cast<RooAbsReal *
>(
e)) {
734 sample.otherElements.push_back(real);
742 updateObservables(nh->dataHist());
747 sortByName(sample.normfactors);
753 std::string sysname(var->
GetName());
754 erasePrefix(sysname,
"alpha_");
755 sample.normsys.emplace_back(sysname, var, fip->
high()[i], fip->
low()[i], findConstraint(var)->
IsA());
757 sortByName(sample.normsys);
764 std::string sysname(var->
GetName());
765 erasePrefix(sysname,
"alpha_");
768 sample.histosys.emplace_back(sysname, var, lo,
hi, findConstraint(var)->
IsA());
772 sortByName(sample.histosys);
776 if (
startsWith(std::string(phf->GetName()),
"mc_stat_")) {
778 for (
const auto &
g : phf->paramList()) {
781 if (tot_yield.find(idx) == tot_yield.end()) {
785 tot_yield[idx] += sample.hist[idx - 1];
786 tot_yield2[idx] += (sample.hist[idx - 1] * sample.hist[idx - 1]);
788 sample.barlowBeestonLightConstraint = constraint->
IsA();
790 double erel = 1. / std::sqrt(constraint_p->
getX().
getVal());
791 rel_errors[idx] = erel;
794 rel_errors[idx] = erel;
797 "currently, only RooPoisson and RooGaussian are supported as constraint types");
801 sample.useBarlowBeestonLight =
true;
804 erasePrefix(sys.name,
"model_" + chname +
"_");
805 erasePrefix(sys.name, chname +
"_");
806 erasePrefix(sys.name, sample.name +
"_");
807 eraseSuffix(sys.name,
"_ShapeSys");
808 eraseSuffix(sys.name,
"_" + sample.name);
809 eraseSuffix(sys.name,
"_model_" + chname);
810 eraseSuffix(sys.name,
"_" + chname);
811 eraseSuffix(sys.name,
"_" + sample.name);
813 for (
const auto &
g : phf->paramList()) {
816 constraint = ws->
pdf(constraintName(
g->GetName()));
817 if (!constraint && !
g->isConstant())
819 else if (!constraint) {
820 sys.constraints.push_back(0.0);
821 }
else if (
auto constraint_p =
dynamic_cast<RooPoisson *
>(constraint)) {
822 sys.constraints.push_back(constraint_p->
getX().
getVal());
823 if (!sys.constraint) {
826 }
else if (
auto constraint_g =
dynamic_cast<RooGaussian *
>(constraint)) {
828 if (!sys.constraint) {
833 sample.shapesys.emplace_back(std::move(sys));
836 sortByName(sample.shapesys);
839 samples.emplace_back(std::move(sample));
844 for (
auto &sample : samples) {
845 if (sample.hist.empty()) {
848 if (sample.useBarlowBeestonLight) {
849 sample.histError.resize(sample.hist.size());
850 for (
auto bin : rel_errors) {
853 const int i = bin.first;
854 const double relerr_tot = bin.second;
855 const double count = sample.hist[i - 1];
858 sample.histError[i - 1] = round_prec(relerr_tot * tot_yield[i] / std::sqrt(tot_yield2[i]) * count, 7);
863 bool observablesWritten =
false;
864 for (
const auto &sample : samples) {
866 elem[
"type"] <<
"histfactory_dist";
870 auto &modifiers = s[
"modifiers"];
872 for (
const auto &nf : sample.normfactors) {
874 mod[
"parameter"] << nf.param->GetName();
875 mod[
"type"] <<
"normfactor";
877 mod[
"constraint_name"] << nf.constraint->GetName();
882 for (
const auto &sys : sample.normsys) {
884 mod[
"type"] <<
"normsys";
885 mod[
"parameter"] << sys.param->GetName();
886 mod[
"constraint"] << toString(sys.constraint);
887 auto &
data = mod[
"data"].set_map();
888 data[
"lo"] << sys.low;
889 data[
"hi"] << sys.high;
892 for (
const auto &sys : sample.histosys) {
894 mod[
"type"] <<
"histosys";
895 mod[
"parameter"] << sys.param->GetName();
896 mod[
"constraint"] << toString(sys.constraint);
897 auto &
data = mod[
"data"].set_map();
898 if (nBins != sys.low.size() || nBins != sys.high.size()) {
899 std::stringstream ss;
900 ss <<
"inconsistent binning: " << nBins <<
" bins expected, but " << sys.low.size() <<
"/"
901 << sys.high.size() <<
" found in nominal histogram errors!";
908 for (
const auto &sys : sample.shapesys) {
910 mod[
"type"] <<
"shapesys";
911 mod[
"constraint"] << toString(sys.constraint);
912 if (sys.constraint) {
913 auto &
data = mod[
"data"].set_map();
914 auto &vals =
data[
"vals"];
915 vals.fill_seq(sys.constraints);
919 for (
const auto &other : sample.otherElements) {
921 customModifiers.
add(*other);
922 mod[
"type"] <<
"custom";
925 if (sample.useBarlowBeestonLight) {
927 mod[
"type"] << ::Literals::staterror;
928 mod[
"constraint"] << toString(sample.barlowBeestonLightConstraint);
931 if (!observablesWritten) {
936 writeAxis(out, *obs);
938 observablesWritten =
true;
940 auto &dataNode = s[
"data"].set_map();
941 if (nBins != sample.hist.size()) {
942 std::stringstream ss;
943 ss <<
"inconsistent binning: " << nBins <<
" bins expected, but " << sample.hist.size()
944 <<
" found in nominal histogram!";
948 if (!sample.histError.empty()) {
949 if (nBins != sample.histError.size()) {
950 std::stringstream ss;
951 ss <<
"inconsistent binning: " << nBins <<
" bins expected, but " << sample.histError.size()
952 <<
" found in nominal histogram errors!";
986 return tryExportHistFactory(tool, prodpdf->
GetName(), sumpdf, elem);
988 std::string
const &
key()
const override
990 static const std::string keystring =
"histfactory_dist";
995 return tryExport(tool,
static_cast<const RooProdPdf *
>(
p), elem);
1004 return tryExportHistFactory(tool, sumpdf->
GetName(), sumpdf, elem);
1006 std::string
const &
key()
const override
1008 static const std::string keystring =
"histfactory_dist";
1013 return tryExport(tool,
static_cast<const RooRealSumPdf *
>(
p), elem);
1020 registerImporter<HistFactoryImporter>(
"histfactory_dist",
true);
1021 registerImporter<PiecewiseInterpolationFactory>(
"interpolation",
true);
1022 registerImporter<FlexibleInterpVarFactory>(
"interpolation0d",
true);
bool startsWith(std::string_view str, std::string_view prefix)
bool endsWith(std::string_view str, std::string_view suffix)
ROOT::RRangeCast< T, false, Range_t > static_range_cast(Range_t &&coll)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void funcs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t modifier
TClass * IsA() const override
A class which maps the current values of a RooRealVar (or a set of RooRealVars) to one of a number of...
static RooArgList createParamSet(RooWorkspace &w, const std::string &, const RooArgList &Vars)
Create the list of RooRealVar parameters which represent the height of the histogram bins.
The PiecewiseInterpolation is a class that can morph distributions into each other,...
const RooArgList & highList() const
const RooAbsReal * nominalHist() const
Return pointer to the nominal hist function.
bool positiveDefinite() const
void setInterpCode(RooAbsReal ¶m, int code, bool silent=false)
const RooArgList & lowList() const
void setPositiveDefinite(bool flag=true)
const RooArgList & paramList() const
const std::vector< int > & interpolationCodes() const
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
bool dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=nullptr, bool valueOnly=false) const
Test whether we depend on (ie, are served by) any object in the specified collection.
RooFit::OwningPtr< RooArgSet > getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
void setAttribute(const Text_t *name, bool value=true)
Set (default) or clear a named boolean attribute of this object.
Storage_t const & get() const
Const access to the underlying stl container.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Storage_t::size_type size() const
RooAbsArg * find(const char *name) const
Find object with given name in list.
TClass * IsA() const override
Int_t numBins(const char *rangeName=nullptr) const override
void setConstant(bool value=true)
virtual double getMax(const char *name=nullptr) const
Get maximum of currently defined range.
virtual double getMin(const char *name=nullptr) const
Get minimum of currently defined range.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooBinWidthFunction is a class that returns the bin width (or volume) given a RooHistFunc.
Class RooBinning is an implements RooAbsBinning in terms of an array of boundary values,...
RooConstVar represent a constant real-valued object.
The RooDataHist is a container class to hold N-dimensional binned data.
void fill_seq(Collection const &coll)
virtual JSONNode & set_map()=0
virtual JSONNode & append_child()=0
virtual JSONNode & set_seq()=0
virtual bool has_child(std::string const &) const =0
virtual bool autoExportDependants() const
virtual std::string const & key() const =0
virtual bool exportObject(RooJSONFactoryWSTool *, const RooAbsArg *, RooFit::Detail::JSONNode &) const
virtual bool importArg(RooJSONFactoryWSTool *tool, const RooFit::Detail::JSONNode &node) const
RooAbsReal const & getMean() const
Get the mean parameter.
RooAbsReal const & getSigma() const
Get the sigma parameter.
RooHistFunc implements a real-valued function sampled from a multidimensional histogram.
static constexpr double infinity()
Return internal infinity representation.
RooAbsReal const & getX() const
Get the x variable.
RooProdPdf is an efficient implementation of a product of PDFs of the form.
A RooProduct represents the product of a given set of RooAbsReal objects.
The class RooRealSumPdf implements a PDF constructed from a sum of functions:
const RooArgList & funcList() const
const RooArgList & coefList() const
RooRealVar represents a variable that can be changed from the outside.
const RooAbsBinning & getBinning(const char *name=nullptr, bool verbose=true, bool createOnTheFly=false) const override
Return binning definition with name.
void setBinning(const RooAbsBinning &binning, const char *name=nullptr)
Add given binning under name 'name' with this variable.
void setBins(Int_t nBins, const char *name=nullptr)
Create a uniform binning under name 'name' for this variable.
void setMax(const char *name, double value)
Set maximum of name range to given value.
void setInterpCode(RooAbsReal ¶m, int code)
const std::vector< double > & high() const
const std::vector< double > & low() const
void setAllInterpCodes(int code)
const RooListProxy & variables() const
Const getters.
Configuration for a constrained, coherent shape variation of affected samples.
Configuration for an un- constrained overall systematic to scale sample normalisations.
Constrained bin-by-bin variation of affected histogram.
The RooWorkspace is a persistable container for RooFit projects.
RooAbsPdf * pdf(RooStringView name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
RooAbsReal * function(RooStringView name) const
Retrieve function (RooAbsReal) with given name. Note that all RooAbsPdfs are also RooAbsReals....
RooFactoryWSTool & factory()
Return instance to factory tool.
RooRealVar * var(RooStringView name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found.
TClass instances represent classes, structs and namespaces in the ROOT type system.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, bool depsAreCond=false)
RooConstVar & RooConst(double val)
#define STATIC_EXECUTE(MY_FUNC)
static uint64_t sum(uint64_t i)