58 int ndigits = std::floor(std::log10(std::abs(
d))) + 1 -
nSig;
60 if (std::abs(
d /
sf) < 2)
62 return sf * std::round(
d /
sf);
74 std::optional<std::string> out;
78 return std::tie(type, in, out) == std::tie(
other.type,
other.in,
other.out);
85 return std::tie(type, in, out) < std::tie(
other.type,
other.in,
other.out);
99 ss << R
"({"type":")" << interpolation.type << R"(","in":")" << interpolation.in << R"(","out":)";
100 if (interpolation.out) {
101 ss <<
'"' << *interpolation.out <<
'"';
111 return function ==
"poly1" || function ==
"poly2" || function ==
"poly6" || function ==
"exp";
119 for (
const char *
component : {
"type",
"in",
"out"}) {
125 const auto &
typeNode = node[
"type"];
126 const auto &
inNode = node[
"in"];
127 const auto &
outNode = node[
"out"];
132 Interpolation interpolation{
typeNode.val(),
inNode.val(), std::nullopt};
133 if (interpolation.type !=
"add" && interpolation.type !=
"mult") {
144 interpolation.out =
outNode.val();
150 return interpolation;
156 node[
"type"] << interpolation.type;
157 node[
"in"] << interpolation.in;
158 if (interpolation.out) {
159 node[
"out"] << *interpolation.out;
171 const std::string
value = node.
val();
180enum class InterpolationClass {
190struct InterpolationCodes {
191 const Interpolation &descriptor;
211 return interpolationClass == InterpolationClass::Piecewise ? row.piecewise : row.flexible;
216 return interpolationClass == InterpolationClass::Piecewise ?
"PiecewiseInterpolation" :
"FlexibleInterpVar";
232 return row.descriptor;
236 std::to_string(code));
240 const std::string &context)
253 const std::string &context)
262 for (std::size_t i = 0; i < codes.size(); ++i) {
268 for (std::size_t i = 1; i <
descriptors.size(); ++i) {
276 for (std::size_t i = 0; i < outputSize; ++i) {
293 " component 'interpolations' must contain either one descriptor or one "
294 "descriptor per parameter (got " +
295 std::to_string(
size) +
" for " + std::to_string(nParameters) +
" parameters)");
298 std::vector<int> codes;
302 const std::string
entryContext = context +
" component 'interpolations' at index " + std::to_string(i);
308 codes.resize(nParameters, codes.front());
313 std::vector<int> codes(nParameters, 0);
314 if (
const auto *
legacyCodes =
object.find(
"interpolationCodes")) {
320 " legacy component 'interpolationCodes' must contain one code per "
322 std::to_string(
legacyCodes->num_children()) +
" for " +
323 std::to_string(nParameters) +
" parameters)");
329 context +
" legacy component 'interpolationCodes' at index " + std::to_string(i);
330 const Interpolation interpolation =
342 const auto toCode = [&](
const Interpolation &interpolation) {
352 return toCode(interpolation);
364void erasePrefix(std::string &str, std::string_view prefix)
367 str.erase(0, prefix.size());
374 str.erase(str.size() -
suffix.size());
384 std::sort(
coll.
begin(),
coll.
end(), [](
auto &
l,
auto &
r) { return l.name < r.name; });
415 return "gamma_" +
sysname +
"_bin_" + std::to_string(i);
431 nom.setConstant(
true);
470 *
tool.workspace()->var(std::string(
"nom_") + param.
GetName()), 1.);
475 "' is a known constraint type, but it cannot be resolved in this context");
479 const std::vector<std::string> &
parnames,
const std::vector<double> &vals,
486 size_t n = std::max(vals.size(),
parnames.size());
488 for (std::size_t i = 0; i <
n; ++i) {
499 if (vals.size() > 0) {
511 gamma->setConstant(
true);
522 if (
comp.has_child(
"modifiers")) {
523 for (
const auto &
mod :
comp[
"modifiers"].children()) {
524 if (
mod[
"type"].val() == ::Literals::staterror)
543 param.
setError(gauss->getSigma().getVal());
548 if (
auto constr =
mod.find(
"constraint")) {
552 param.
setError(gauss->getSigma().getVal());
563 "': this looks like a legacy workspace where the 'constraint' field is neither a "
564 "constraint pdf name nor a supported legacy constraint type");
581 std::string(constraint.
GetName()));
589 if (
auto const *tau =
dynamic_cast<RooConstVar const *
>(arg)) {
590 return tau->getVal();
597 return real->getVal();
603 std::string(constraint.
GetName()));
604 return std::numeric_limits<double>::quiet_NaN();
618 return std::numeric_limits<double>::quiet_NaN();
633 if (!
p.has_child(
"data")) {
649 if (
p.has_child(
"modifiers")) {
661 for (
const auto &
mod :
p[
"modifiers"].children()) {
662 std::string
const &
modtype =
mod[
"type"].val();
664 mod.has_child(
"name")
666 : (
mod.has_child(
"parameter") ?
mod[
"parameter"].val() :
"syst_" + std::to_string(idx));
670 }
else if (
modtype ==
"normfactor") {
674 if (
mod.has_child(
"constraint") ||
mod.has_child(
"constraint_name") ||
mod.has_child(
"constraint_type")) {
678 }
else if (
modtype ==
"normsys") {
685 const std::string context =
"interpolation for normsys modifier '" +
sysname +
"' in sample '" +
688 double low =
data[
"lo"].val_double();
689 double high =
data[
"hi"].val_double();
695 if (
interp == 4 && low <= 0)
696 low = std::numeric_limits<double>::epsilon();
697 if (
interp == 4 && high <= 0)
698 high = std::numeric_limits<double>::epsilon();
705 }
else if (
modtype ==
"histosys") {
718 const std::string context =
"interpolation for histosys modifier '" +
sysname +
"' in sample '" +
725 std::vector<double> vals;
726 if (
mod[
"data"].has_child(
"vals")) {
727 for (
const auto &
v :
mod[
"data"][
"vals"].children()) {
728 vals.push_back(
v.val_double());
732 for (
const auto &
v :
mod[
"parameters"].children()) {
735 if (vals.empty() &&
parnames.empty()) {
737 "' with neither values nor parameters!");
739 std::string constraint =
"unknown";
740 std::vector<RooAbsPdf *> constraintPdfs;
743 for (
const auto &
v :
mod[
"constraints"].children()) {
745 constraintPdfs.push_back(
nullptr);
757 if (constraintPdfs.size() !=
nGammas) {
758 std::stringstream
ss;
760 <<
" constraints, but " <<
nGammas <<
" parameters";
763 }
else if (
mod.has_child(
"constraint_type")) {
764 constraint =
mod[
"constraint_type"].val();
765 }
else if (
mod.has_child(
"constraint")) {
772 "': this looks like a legacy workspace where the 'constraint' field is "
773 "not a supported legacy constraint type");
784 }
else if (
modtype ==
"custom") {
830 if (!
p.has_child(
"samples")) {
836 if (
p.has_child(
"default_interpolation")) {
840 if (
p.has_child(::Literals::staterror)) {
841 auto &
staterr =
p[::Literals::staterror];
842 if (
staterr.has_child(
"relThreshold"))
844 if (
staterr.has_child(
"constraint_type"))
847 std::vector<double>
sumW;
848 std::vector<double>
sumW2;
854 std::vector<std::unique_ptr<RooDataHist>>
data;
855 for (
const auto &
comp :
p[
"samples"].children()) {
858 size_t nbins =
dh->numEntries();
865 for (
size_t i = 0; i <
nbins; ++i) {
867 sumW2[i] +=
dh->weightSquared(i);
877 data.emplace_back(std::move(
dh));
886 std::vector<double>
errs(
sumW.size());
887 for (
size_t i = 0; i <
sumW.size(); ++i) {
905 for (
const auto &
comp :
p[
"samples"].children()) {
915 if (constraints.
empty()) {
930 std::string
const &key()
const override
932 static const std::string
keystring =
"interpolation0d";
938 const std::size_t nParameters =
fip->variables().size();
939 if (
fip->low().size() != nParameters ||
fip->high().size() != nParameters ||
940 fip->interpolationCodes().size() != nParameters) {
942 "' has non-matching parameter, variation, and interpolation lengths");
944 elem[
"type"] << key();
946 "FlexibleInterpVar '" + std::string{fip->GetName()} +
"'");
949 elem[
"high"].fill_seq(
fip->high(),
fip->variables().size());
950 elem[
"low"].fill_seq(
fip->low(),
fip->variables().size());
957 std::string
const &key()
const override
959 static const std::string
keystring =
"interpolation";
965 const std::size_t nParameters =
pip->paramList().size();
966 if (
pip->lowList().size() != nParameters ||
pip->highList().size() != nParameters ||
967 pip->interpolationCodes().size() != nParameters) {
969 "' has non-matching parameter, variation, and interpolation lengths");
971 elem[
"type"] << key();
973 "PiecewiseInterpolation '" + std::string{pip->GetName()} +
"'");
974 elem[
"positiveDefinite"] <<
pip->positiveDefinite();
976 elem[
"nom"] <<
pip->nominalHist()->GetName();
992 if (vars.size() != low.size() || vars.size() != high.size()) {
994 "' has non-matching lengths of 'vars', 'high' and 'low'");
996 const std::vector<int> codes =
1002 pip.setPositiveDefinite(
p[
"positiveDefinite"].val_bool());
1013 if (!
p.has_child(
"high")) {
1016 if (!
p.has_child(
"low")) {
1019 if (!
p.has_child(
"nom")) {
1023 double nom(
p[
"nom"].val_double());
1027 std::vector<double> high;
1030 std::vector<double> low;
1033 if (vars.size() != low.size() || vars.size() != high.size()) {
1035 "' has non-matching lengths of 'vars', 'high' and 'low'!");
1037 const std::vector<int> codes =
1057 std::string
name =
"";
1065 :
name(
n), param(
p), low(
l), high(
h), interpolation(std::
move(i)), constraint(
c)
1073 std::vector<double> low;
1074 std::vector<double> high;
1079 :
name(
n), param(
p), interpolation(std::
move(i)), constraint(
c)
1081 low.assign(
l->dataHist().weightArray(),
l->dataHist().weightArray() +
l->dataHist().numEntries());
1082 high.assign(
h->dataHist().weightArray(),
h->dataHist().weightArray() +
h->dataHist().numEntries());
1087 std::vector<double> constraints;
1088 std::vector<RooAbsPdf const *> constraintPdfs;
1089 std::vector<RooAbsReal *> parameters;
1093struct GenericElement {
1102 size_t end = s.size();
1104 while (start < end && s[start] ==
'(' && s[end - 1] ==
')') {
1107 for (
size_t i = start; i < end - 1; ++i) {
1110 else if (s[i] ==
')')
1112 if (
depth == 0 && i < end - 1) {
1124 return s.substr(start, end - start);
1129 std::vector<std::string>
parts;
1134 for (
size_t i = 0; i <
expr.size(); ++i) {
1138 }
else if (
c ==
')') {
1140 }
else if (
c ==
'*' &&
depth == 0) {
1142 std::string sub =
expr.substr(start, i - start);
1152 std::string sub =
expr.substr(start);
1159 static const std::regex pattern(
1160 R
"(^\s*1(?:\.0)?\s*([\+\-])\s*([a-zA-Z_][a-zA-Z0-9_]*|[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)\s*\*\s*([a-zA-Z_][a-zA-Z0-9_]*|[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)\s*$)");
1166 if (std::regex_match(s, match, pattern)) {
1167 if (match[1].str() ==
"-") {
1171 std::string
token2 = match[2].str();
1172 std::string
token3 = match[4].str();
1183 sys.name =
p2->GetName();
1188 sys.name =
p3->GetName();
1193 sys.name =
v2->GetName();
1195 sys.high =
sign *
p3->getVal();
1196 sys.low = -
sign *
p3->getVal();
1198 sys.name =
v3->GetName();
1200 sys.high =
sign *
p2->getVal();
1201 sys.low = -
sign *
p2->getVal();
1214 if (
auto prod =
dynamic_cast<RooProduct *
>(arg)) {
1215 for (
const auto &
e : prod->components()) {
1225 for (
auto *var : list) {
1235 std::vector<double> hist;
1236 std::vector<double> histError;
1237 std::vector<NormFactor> normfactors;
1238 std::vector<NormSys> normsys;
1239 std::vector<HistoSys> histosys;
1240 std::vector<ShapeSys> shapesys;
1241 std::vector<GenericElement> tmpElements;
1242 std::vector<GenericElement> otherElements;
1243 bool useBarlowBeestonLight =
false;
1244 std::vector<RooAbsReal *> staterrorParameters;
1252 for (
RooAbsArg const *pdf : ws->allPdfs()) {
1253 if (
auto gauss =
dynamic_cast<RooGaussian const *
>(pdf)) {
1254 if (
parname == gauss->getX().GetName()) {
1255 sample.normfactors.emplace_back(*par, gauss);
1261 sample.normfactors.emplace_back(*par);
1266 std::vector<Sample> samples;
1267 std::map<int, double> tot_yield;
1268 std::map<int, double> tot_yield2;
1269 std::map<int, double> rel_errors;
1271 long unsigned int nBins = 0;
1286 std::vector<ParamHistFunc *>
phfs;
1296 if (channel.varSet ==
nullptr) {
1297 channel.varSet = dataHist.get();
1298 channel.nBins = dataHist.numEntries();
1300 if (
sample.hist.empty()) {
1301 auto *
w = dataHist.weightArray();
1302 sample.hist.assign(
w,
w + dataHist.numEntries());
1319 }
else if (
auto par =
dynamic_cast<RooRealVar *
>(
e)) {
1328 for (
size_t i = 0; i <
fip->variables().size(); ++i) {
1336 const std::string context =
"normsys modifier '" +
sysname +
"' in sample '" +
sample.name +
1337 "' of channel '" + channel.name +
"'";
1338 sample.normsys.emplace_back(
1350 for (
size_t i =
formula->nParameters(); i--;) {
1352 expression.ReplaceAll((
"x[" + std::to_string(i) +
"]").c_str(),
p->GetName());
1353 expression.ReplaceAll((
"@" + std::to_string(i)).c_str(),
p->GetName());
1356 if (components.size() == 0) {
1361 std::vector<RooAbsArg *> realComponents;
1363 for (
auto &
comp : components) {
1367 realComponents.push_back(
part);
1372 if (normsys.param) {
1373 sample.normsys.emplace_back(std::move(normsys));
1378 std::string
name = std::string(
formula->GetName()) +
"_part" + std::to_string(idx);
1381 sample.tmpElements.push_back({var});
1409 for (
size_t i = 0; i <
pip->paramList().
size(); ++i) {
1413 if (
auto lo =
dynamic_cast<RooHistFunc *
>(
pip->lowList().at(i))) {
1419 const std::string context =
"histosys modifier '" +
sysname +
"' in sample '" +
sample.name +
1420 "' of channel '" + channel.name +
"'";
1421 sample.histosys.emplace_back(
1435 for (
const auto &
g :
phf->paramList()) {
1439 channel.tot_yield[idx] +=
sample.hist[idx - 1];
1440 channel.tot_yield2[idx] += (
sample.hist[idx - 1] *
sample.hist[idx - 1]);
1445 sample.useBarlowBeestonLight =
true;
1452 for (
const auto &
g :
phf->paramList()) {
1453 sys.parameters.push_back(
static_cast<RooRealVar *
>(
g));
1459 if (!constraint && !
g->isConstant()) {
1466 sys.constraints.push_back(0.0);
1467 sys.constraintPdfs.push_back(
nullptr);
1470 sys.constraintPdfs.push_back(constraint);
1473 sample.shapesys.emplace_back(std::move(sys));
1479 channel.samples.emplace_back(std::move(
sample));
1491 return std::string{
lhs->GetName()} ==
rhs->GetName() &&
lhs->IsA() ==
rhs->IsA();
1495 std::string_view
name, std::string_view
reason)
1497 std::stringstream
ss;
1498 ss <<
"cannot combine duplicate modifier '" <<
name <<
"' of type '" <<
type <<
"' in sample '" <<
sample.name
1499 <<
"' of channel '" << channel.name <<
"': " <<
reason;
1504 std::string_view
name, std::size_t count)
1506 std::stringstream
ss;
1507 ss <<
"combined " << count <<
" duplicate modifiers named '" <<
name <<
"' of type '" <<
type <<
"' in sample '"
1508 <<
sample.name <<
"' of channel '" << channel.name <<
"'";
1525template <
class Modifiers,
class CombineFn>
1532 for (std::size_t begin = 0; begin <
modifiers.size();) {
1533 std::size_t end = begin + 1;
1539 for (std::size_t i = begin + 1; i < end; ++i) {
1553 if (end - begin > 1) {
1566 if (!normSysSupportsMultiplicativeMerge(merged.interpolation)) {
1567 duplicateModifierError(channel, sample,
"normsys", merged.name,
1568 "multiplicative combination is only valid for log-space interpolation");
1577 const std::size_t nBins =
sample.hist.size();
1580 if (merged.interpolation != additivePolynomialLinear) {
1581 duplicateModifierError(channel, sample,
"histosys", merged.name,
1582 "this interpolation cannot currently be combined for duplicate histosys "
1587 duplicateModifierError(channel, sample,
"histosys", merged.name,
"histogram binning differs");
1598 std::set<std::pair<std::string, std::string>>
seen;
1599 auto add = [&](std::string
type,
const std::string &
name) {
1602 "this modifier type cannot be combined without changing its meaning");
1618 if (
sample.useBarlowBeestonLight)
1619 add(::Literals::staterror, ::Literals::staterror);
1624 for (
auto &
sample : channel.samples) {
1633 for (
auto &
sample : channel.samples) {
1634 if (
sample.useBarlowBeestonLight) {
1636 for (
auto bin : channel.rel_errors) {
1639 const int i =
bin.first;
1641 const double count =
sample.hist[i - 1];
1644 sample.histError[i - 1] =
1653 std::map<Interpolation, std::size_t>
counts;
1654 for (
const auto &
sample : channel.samples) {
1663 return std::nullopt;
1668 if (current->second >
best->second ||
1682 if (sys.constraint) {
1683 mod[
"constraint"] << sys.constraint->GetName();
1694 elem[
"type"] <<
"histfactory_dist";
1701 for (
const auto &
sample : channel.samples) {
1708 for (
const auto &
nf :
sample.normfactors) {
1711 mod[
"name"] <<
nf.name;
1712 mod[
"parameter"] <<
nf.param->GetName();
1713 mod[
"type"] <<
"normfactor";
1714 if (
nf.constraint) {
1715 mod[
"constraint"] <<
nf.constraint->GetName();
1716 tool->queueExport(*
nf.constraint);
1720 for (
const auto &sys :
sample.normsys) {
1722 mod[
"parameter"] << sys.param->GetName();
1727 auto &
data =
mod[
"data"].set_map();
1728 data[
"lo"] << sys.low;
1729 data[
"hi"] << sys.high;
1732 for (
const auto &sys :
sample.histosys) {
1734 mod[
"parameter"] << sys.param->GetName();
1739 auto &
data =
mod[
"data"].set_map();
1740 if (channel.nBins != sys.low.size() || channel.nBins != sys.high.size()) {
1742 " bins expected, but " + std::to_string(sys.low.size()) +
"/" +
1743 std::to_string(sys.high.size()) +
" found in nominal histogram errors!");
1749 for (
const auto &sys :
sample.shapesys) {
1752 if (std::any_of(sys.constraintPdfs.begin(), sys.constraintPdfs.end(),
1753 [](
auto *pdf) { return pdf != nullptr; })) {
1755 for (
auto *constraint : sys.constraintPdfs) {
1763 mod[
"data"].set_map()[
"vals"].fill_seq(sys.constraints);
1773 if (
sample.useBarlowBeestonLight) {
1779 auto &output =
elem[
"axes"].set_seq();
1785 auto &
dataNode = s[
"data"].set_map();
1786 if (channel.nBins !=
sample.hist.size()) {
1788 std::to_string(
sample.hist.size()) +
" found in nominal histogram!");
1791 if (!
sample.histError.empty()) {
1792 if (channel.nBins !=
sample.histError.size()) {
1794 " bins expected, but " + std::to_string(
sample.histError.size()) +
1795 " found in nominal histogram errors!");
1807 std::set<const RooAbsReal *> vars;
1808 for (
const auto &
sample : channel.samples) {
1809 for (
const auto &
nf :
sample.normfactors) {
1810 vars.insert(
nf.param);
1812 for (
const auto &sys :
sample.normsys) {
1813 vars.insert(sys.param);
1816 for (
const auto &sys :
sample.histosys) {
1817 vars.insert(sys.param);
1819 for (
const auto &sys :
sample.shapesys) {
1820 for (
const auto &par : sys.parameters) {
1824 if (
sample.useBarlowBeestonLight) {
1825 for (
const auto &par :
sample.staterrorParameters) {
1833 for (
auto *pdf : constraints) {
1835 for (
const auto *var : vars) {
1836 if (pdf->dependsOn(*var)) {
1865 if (channel.samples.size() == 0)
1867 for (
auto &
sample : channel.samples) {
1868 if (
sample.hist.empty()) {
1882 "losing constraint term '" + std::string(constraint->
GetName()) +
1883 "', implicit constraints are not supported by HS3 yet! The term will appear in the HS3 file, but will not be "
1884 "picked up when creating a likelihood from it! You will have to add it manually as an external constraint.");
1885 tool->queueExport(*constraint);
1896 for (
const auto &
sample : channel.samples) {
1901 for (
auto *constraint :
modifier.constraintPdfs) {
1903 tool->queueExport(*constraint);
1910 for (
const auto &
sample : channel.samples) {
1921 sumpdf->getParameters(channel.varSet, parameters);
1925 tool->queueExport(*param);
1934 bool autoExportDependants()
const override {
return false; }
1937 std::vector<RooAbsPdf *> constraints;
1947 constraints.push_back(pdf);
1956 std::string
const &key()
const override
1958 static const std::string
keystring =
"histfactory_dist";
1969 bool autoExportDependants()
const override {
return false; }
1972 std::vector<RooAbsPdf *> constraints;
1975 std::string
const &key()
const override
1977 static const std::string
keystring =
"histfactory_dist";
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)
double toDouble(const char *s)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
Bool_t operator<(const TDatime &d1, const TDatime &d2)
Bool_t operator==(const TDatime &d1, const TDatime &d2)
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 char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
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
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
A class which maps the current values of a RooRealVar (or a set of RooRealVars) to one of a number of...
The PiecewiseInterpolation is a class that can morph distributions into each other,...
void setPositiveDefinite(bool flag=true)
const_iterator begin() const
const_iterator end() const
Common abstract base class for objects that represent a value and a "shape" in RooFit.
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.
bool isConstant() const
Check if the "Constant" attribute is set.
Abstract container object that can hold multiple RooAbsArg objects.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Returns the bin width (or volume) given a RooHistFunc.
Represents a constant real-valued object.
Container class to hold N-dimensional binned data.
virtual std::string val() const =0
virtual JSONNode & set_map()=0
virtual JSONNode & set_null()=0
virtual JSONNode & set_seq()=0
virtual bool is_container() const =0
virtual bool is_map() const =0
virtual bool has_child(std::string const &) const =0
virtual bool is_null() const =0
virtual bool has_val() const =0
A real-valued function sampled from a multidimensional histogram.
RooAbsReal const & getMean() const
Get the mean parameter.
Efficient implementation of a product of PDFs of the form.
Represents the product of a given set of RooAbsReal objects.
Implements a PDF constructed from a sum of functions:
Variable that can be changed from the outside.
void setError(double value)
This class encapsulates all information for the statistical interpretation of one experiment.
Configuration for a constrained, coherent shape variation of affected samples.
Configuration for an un- constrained overall systematic to scale sample normalisations.
std::string GetName() const
Constrained bin-by-bin variation of affected histogram.
Persistable container for RooFit projects.
TObject * obj(RooStringView name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name)
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.
bool import(const RooAbsArg &arg, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={})
Import a RooAbsArg object, e.g.
const char * GetName() const override
Returns name of object.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
RooCmdArg RecycleConflictNodes(bool flag=true)
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, bool depsAreCond=false)
constexpr double defaultShapeSysGammaMax
constexpr double minShapeUncertainty
constexpr double defaultStatErrorGammaMax
constexpr double defaultGammaMin
void configureConstrainedGammas(RooArgList const &gammas, std::span< const double > relSigmas, double minSigma)
Configure constrained gamma parameters for fitting.
CreateGammaConstraintsOutput createGammaConstraints(RooArgList const ¶mList, std::span< const double > relSigmas, double minSigma, Constraint::Type type)
#define STATIC_EXECUTE(MY_FUNC)
static uint64_t sum(uint64_t i)