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 <<
'"';
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);
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; });
390 for (
const auto &client :
gamma->clients()) {
391 if (
auto casted =
dynamic_cast<T *
>(client)) {
420 return "gamma_" +
sysname +
"_bin_" + std::to_string(i);
430 for (std::size_t i = 0; i < params.size(); ++i) {
431 std::string
name(params[i]->GetName());
445 nom.setConstant(
true);
484 *
tool.workspace()->var(std::string(
"nom_") + param.
GetName()), 1.);
489 "' is a known constraint type, but it cannot be resolved in this context");
493 const std::vector<std::string> &
parnames,
const std::vector<double> &vals,
500 size_t n = std::max(vals.size(),
parnames.size());
502 for (std::size_t i = 0; i <
n; ++i) {
513 if (vals.size() > 0) {
525 gamma->setConstant(
true);
535 if (!
comp.has_child(
"modifiers"))
537 for (
const auto &
mod :
comp[
"modifiers"].children()) {
538 if (
mod[
"type"].val() == ::Literals::staterror)
546 if (
comp.has_child(
"modifiers")) {
547 for (
const auto &
mod :
comp[
"modifiers"].children()) {
548 if (
mod[
"type"].val() == ::Literals::staterror)
553 ::Literals::staterror +
" modifier!");
568 param.
setError(gauss->getSigma().getVal());
573 if (
auto constr =
mod.find(
"constraint")) {
577 param.
setError(gauss->getSigma().getVal());
588 "': this looks like a legacy workspace where the 'constraint' field is neither a "
589 "constraint pdf name nor a supported legacy constraint type");
606 std::string(constraint.
GetName()));
614 if (
auto const *tau =
dynamic_cast<RooConstVar const *
>(arg)) {
615 return tau->getVal();
622 return real->getVal();
628 std::string(constraint.
GetName()));
629 return std::numeric_limits<double>::quiet_NaN();
643 return std::numeric_limits<double>::quiet_NaN();
658 if (!
p.has_child(
"data")) {
674 if (
p.has_child(
"modifiers")) {
686 for (
const auto &
mod :
p[
"modifiers"].children()) {
687 std::string
const &
modtype =
mod[
"type"].val();
689 mod.has_child(
"name")
691 : (
mod.has_child(
"parameter") ?
mod[
"parameter"].val() :
"syst_" + std::to_string(idx));
695 }
else if (
modtype ==
"normfactor") {
699 if (
mod.has_child(
"constraint") ||
mod.has_child(
"constraint_name") ||
mod.has_child(
"constraint_type")) {
703 }
else if (
modtype ==
"normsys") {
710 const std::string context =
"interpolation for normsys modifier '" +
sysname +
"' in sample '" +
713 double low =
data[
"lo"].val_double();
714 double high =
data[
"hi"].val_double();
720 if (
interp == 4 && low <= 0)
721 low = std::numeric_limits<double>::epsilon();
722 if (
interp == 4 && high <= 0)
723 high = std::numeric_limits<double>::epsilon();
730 }
else if (
modtype ==
"histosys") {
743 const std::string context =
"interpolation for histosys modifier '" +
sysname +
"' in sample '" +
750 std::vector<double> vals;
751 if (
mod[
"data"].has_child(
"vals")) {
752 for (
const auto &
v :
mod[
"data"][
"vals"].children()) {
753 vals.push_back(
v.val_double());
757 for (
const auto &
v :
mod[
"parameters"].children()) {
760 if (vals.empty() &&
parnames.empty()) {
762 "' with neither values nor parameters!");
764 std::string constraint =
"unknown";
765 std::vector<RooAbsPdf *> constraintPdfs;
768 for (
const auto &
v :
mod[
"constraints"].children()) {
770 constraintPdfs.push_back(
nullptr);
782 if (constraintPdfs.size() !=
nGammas) {
783 std::stringstream
ss;
785 <<
" constraints, but " <<
nGammas <<
" parameters";
788 }
else if (
mod.has_child(
"constraint_type")) {
789 constraint =
mod[
"constraint_type"].val();
790 }
else if (
mod.has_child(
"constraint")) {
797 "': this looks like a legacy workspace where the 'constraint' field is "
798 "not a supported legacy constraint type");
809 }
else if (
modtype ==
"custom") {
855 if (!
p.has_child(
"samples")) {
861 if (
p.has_child(
"default_interpolation")) {
865 if (
p.has_child(::Literals::staterror)) {
866 auto &
staterr =
p[::Literals::staterror];
867 if (
staterr.has_child(
"relThreshold"))
869 if (
staterr.has_child(
"constraint_type"))
872 std::vector<double>
sumW;
873 std::vector<double>
sumW2;
879 std::vector<std::unique_ptr<RooDataHist>>
data;
880 for (
const auto &
comp :
p[
"samples"].children()) {
883 size_t nbins =
dh->numEntries();
890 for (
size_t i = 0; i <
nbins; ++i) {
892 sumW2[i] +=
dh->weightSquared(i);
902 data.emplace_back(std::move(
dh));
911 std::vector<double>
errs(
sumW.size());
912 for (
size_t i = 0; i <
sumW.size(); ++i) {
930 for (
const auto &
comp :
p[
"samples"].children()) {
940 if (constraints.
empty()) {
955 std::string
const &key()
const override
957 static const std::string
keystring =
"interpolation0d";
963 const std::size_t nParameters =
fip->variables().size();
964 if (
fip->low().size() != nParameters ||
fip->high().size() != nParameters ||
965 fip->interpolationCodes().size() != nParameters) {
967 "' has non-matching parameter, variation, and interpolation lengths");
969 elem[
"type"] << key();
971 "FlexibleInterpVar '" + std::string{fip->GetName()} +
"'");
974 elem[
"high"].fill_seq(
fip->high(),
fip->variables().size());
975 elem[
"low"].fill_seq(
fip->low(),
fip->variables().size());
982 std::string
const &key()
const override
984 static const std::string
keystring =
"interpolation";
990 const std::size_t nParameters =
pip->paramList().size();
991 if (
pip->lowList().size() != nParameters ||
pip->highList().size() != nParameters ||
992 pip->interpolationCodes().size() != nParameters) {
994 "' has non-matching parameter, variation, and interpolation lengths");
996 elem[
"type"] << key();
998 "PiecewiseInterpolation '" + std::string{pip->GetName()} +
"'");
999 elem[
"positiveDefinite"] <<
pip->positiveDefinite();
1001 elem[
"nom"] <<
pip->nominalHist()->GetName();
1017 if (vars.size() != low.size() || vars.size() != high.size()) {
1019 "' has non-matching lengths of 'vars', 'high' and 'low'");
1021 const std::vector<int>
codes =
1027 pip.setPositiveDefinite(
p[
"positiveDefinite"].val_bool());
1038 if (!
p.has_child(
"high")) {
1041 if (!
p.has_child(
"low")) {
1044 if (!
p.has_child(
"nom")) {
1048 double nom(
p[
"nom"].val_double());
1052 std::vector<double> high;
1055 std::vector<double> low;
1058 if (vars.size() != low.size() || vars.size() != high.size()) {
1060 "' has non-matching lengths of 'vars', 'high' and 'low'!");
1062 const std::vector<int>
codes =
1082 std::string
name =
"";
1090 :
name(
n), param(
p), low(
l), high(
h), interpolation(std::
move(i)), constraint(
c)
1098 std::vector<double> low;
1099 std::vector<double> high;
1104 :
name(
n), param(
p), interpolation(std::
move(i)), constraint(
c)
1106 low.assign(
l->dataHist().weightArray(),
l->dataHist().weightArray() +
l->dataHist().numEntries());
1107 high.assign(
h->dataHist().weightArray(),
h->dataHist().weightArray() +
h->dataHist().numEntries());
1112 std::vector<double> constraints;
1113 std::vector<RooAbsPdf const *> constraintPdfs;
1114 std::vector<RooAbsReal *> parameters;
1118struct GenericElement {
1127 size_t end = s.size();
1129 while (start < end && s[start] ==
'(' && s[end - 1] ==
')') {
1132 for (
size_t i = start; i < end - 1; ++i) {
1135 else if (s[i] ==
')')
1137 if (
depth == 0 && i < end - 1) {
1149 return s.substr(start, end - start);
1154 std::vector<std::string>
parts;
1159 for (
size_t i = 0; i <
expr.size(); ++i) {
1163 }
else if (
c ==
')') {
1165 }
else if (
c ==
'*' &&
depth == 0) {
1167 std::string sub =
expr.substr(start, i - start);
1177 std::string sub =
expr.substr(start);
1184 static const std::regex pattern(
1185 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*$)");
1191 if (std::regex_match(s, match, pattern)) {
1192 if (match[1].str() ==
"-") {
1196 std::string
token2 = match[2].str();
1197 std::string
token3 = match[4].str();
1208 sys.name =
p2->GetName();
1213 sys.name =
p3->GetName();
1218 sys.name =
v2->GetName();
1220 sys.high =
sign *
p3->getVal();
1221 sys.low = -
sign *
p3->getVal();
1223 sys.name =
v3->GetName();
1225 sys.high =
sign *
p2->getVal();
1226 sys.low = -
sign *
p2->getVal();
1239 if (
auto prod =
dynamic_cast<RooProduct *
>(arg)) {
1240 for (
const auto &
e : prod->components()) {
1250 for (
auto *var : list) {
1260 std::vector<double> hist;
1261 std::vector<double> histError;
1262 std::vector<NormFactor> normfactors;
1263 std::vector<NormSys> normsys;
1264 std::vector<HistoSys> histosys;
1265 std::vector<ShapeSys> shapesys;
1266 std::vector<GenericElement> tmpElements;
1267 std::vector<GenericElement> otherElements;
1268 bool useBarlowBeestonLight =
false;
1269 std::vector<RooAbsReal *> staterrorParameters;
1277 for (
RooAbsArg const *pdf : ws->allPdfs()) {
1278 if (
auto gauss =
dynamic_cast<RooGaussian const *
>(pdf)) {
1279 if (
parname == gauss->getX().GetName()) {
1280 sample.normfactors.emplace_back(*par, gauss);
1286 sample.normfactors.emplace_back(*par);
1291 std::vector<Sample> samples;
1292 std::map<int, double> tot_yield;
1293 std::map<int, double> tot_yield2;
1294 std::map<int, double> rel_errors;
1296 long unsigned int nBins = 0;
1311 std::vector<ParamHistFunc *>
phfs;
1321 if (channel.varSet ==
nullptr) {
1322 channel.varSet = dataHist.get();
1323 channel.nBins = dataHist.numEntries();
1325 if (
sample.hist.empty()) {
1326 auto *
w = dataHist.weightArray();
1327 sample.hist.assign(
w,
w + dataHist.numEntries());
1344 }
else if (
auto par =
dynamic_cast<RooRealVar *
>(
e)) {
1353 for (
size_t i = 0; i <
fip->variables().size(); ++i) {
1361 const std::string context =
"normsys modifier '" +
sysname +
"' in sample '" +
sample.name +
1362 "' of channel '" + channel.name +
"'";
1363 sample.normsys.emplace_back(
1377 expression.ReplaceAll((
"x[" + std::to_string(i) +
"]").c_str(),
p->GetName());
1378 expression.ReplaceAll((
"@" + std::to_string(i)).c_str(),
p->GetName());
1381 if (components.size() == 0) {
1383 sample.otherElements.push_back(formula);
1386 std::vector<RooAbsArg *> realComponents;
1388 for (
auto &
comp : components) {
1392 realComponents.push_back(
part);
1397 if (normsys.param) {
1398 sample.normsys.emplace_back(std::move(normsys));
1403 std::string
name = std::string(formula->
GetName()) +
"_part" + std::to_string(idx);
1406 sample.tmpElements.push_back({var});
1434 for (
size_t i = 0; i <
pip->paramList().
size(); ++i) {
1438 if (
auto lo =
dynamic_cast<RooHistFunc *
>(
pip->lowList().at(i))) {
1444 const std::string context =
"histosys modifier '" +
sysname +
"' in sample '" +
sample.name +
1445 "' of channel '" + channel.name +
"'";
1446 sample.histosys.emplace_back(
1460 for (
const auto &
g :
phf->paramList()) {
1464 if (channel.tot_yield.find(idx) == channel.tot_yield.end()) {
1465 channel.tot_yield[idx] = 0;
1466 channel.tot_yield2[idx] = 0;
1468 channel.tot_yield[idx] +=
sample.hist[idx - 1];
1469 channel.tot_yield2[idx] += (
sample.hist[idx - 1] *
sample.hist[idx - 1]);
1474 sample.useBarlowBeestonLight =
true;
1481 for (
const auto &
g :
phf->paramList()) {
1482 sys.parameters.push_back(
static_cast<RooRealVar *
>(
g));
1488 if (!constraint && !
g->isConstant()) {
1495 sys.constraints.push_back(0.0);
1496 sys.constraintPdfs.push_back(
nullptr);
1499 sys.constraintPdfs.push_back(constraint);
1502 sample.shapesys.emplace_back(std::move(sys));
1508 channel.samples.emplace_back(std::move(
sample));
1520 return std::string{
lhs->GetName()} ==
rhs->GetName() &&
lhs->IsA() ==
rhs->IsA();
1524 std::string_view
name, std::string_view
reason)
1526 std::stringstream
ss;
1527 ss <<
"cannot combine duplicate modifier '" <<
name <<
"' of type '" <<
type <<
"' in sample '" <<
sample.name
1528 <<
"' of channel '" << channel.name <<
"': " <<
reason;
1533 std::string_view
name, std::size_t count)
1535 std::stringstream
ss;
1536 ss <<
"combined " << count <<
" duplicate modifiers named '" <<
name <<
"' of type '" <<
type <<
"' in sample '"
1537 <<
sample.name <<
"' of channel '" << channel.name <<
"'";
1554template <
class Modifiers,
class CombineFn>
1561 for (std::size_t begin = 0; begin <
modifiers.size();) {
1562 std::size_t end = begin + 1;
1568 for (std::size_t i = begin + 1; i < end; ++i) {
1582 if (end - begin > 1) {
1595 if (!normSysSupportsMultiplicativeMerge(merged.interpolation)) {
1596 duplicateModifierError(channel, sample,
"normsys", merged.name,
1597 "multiplicative combination is only valid for log-space interpolation");
1606 const std::size_t nBins =
sample.hist.size();
1609 if (merged.interpolation != additivePolynomialLinear) {
1610 duplicateModifierError(channel, sample,
"histosys", merged.name,
1611 "this interpolation cannot currently be combined for duplicate histosys "
1614 if (
merged.low.size() != nBins ||
merged.high.size() != nBins ||
modifier.low.size() != nBins ||
1616 duplicateModifierError(channel, sample,
"histosys", merged.name,
"histogram binning differs");
1618 for (std::size_t bin = 0; bin < nBins; ++bin) {
1627 std::set<std::pair<std::string, std::string>>
seen;
1628 auto add = [&](std::string
type,
const std::string &
name) {
1631 "this modifier type cannot be combined without changing its meaning");
1647 if (
sample.useBarlowBeestonLight)
1648 add(::Literals::staterror, ::Literals::staterror);
1653 for (
auto &
sample : channel.samples) {
1662 for (
auto &
sample : channel.samples) {
1663 if (
sample.useBarlowBeestonLight) {
1665 for (
auto bin : channel.rel_errors) {
1668 const int i = bin.first;
1670 const double count =
sample.hist[i - 1];
1673 sample.histError[i - 1] =
1682 std::map<Interpolation, std::size_t>
counts;
1683 for (
const auto &
sample : channel.samples) {
1692 return std::nullopt;
1697 if (current->second >
best->second ||
1711 if (sys.constraint) {
1712 mod[
"constraint"] << sys.constraint->GetName();
1716 elem[
"type"] <<
"histfactory_dist";
1723 for (
const auto &
sample : channel.samples) {
1730 for (
const auto &
nf :
sample.normfactors) {
1733 mod[
"name"] <<
nf.name;
1734 mod[
"parameter"] <<
nf.param->GetName();
1735 mod[
"type"] <<
"normfactor";
1736 if (
nf.constraint) {
1737 mod[
"constraint"] <<
nf.constraint->GetName();
1738 tool->queueExport(*
nf.constraint);
1742 for (
const auto &sys :
sample.normsys) {
1745 mod[
"name"] << sys.name;
1746 mod[
"type"] <<
"normsys";
1747 mod[
"parameter"] << sys.param->GetName();
1752 auto &
data =
mod[
"data"].set_map();
1753 data[
"lo"] << sys.low;
1754 data[
"hi"] << sys.high;
1757 for (
const auto &sys :
sample.histosys) {
1760 mod[
"name"] << sys.name;
1761 mod[
"type"] <<
"histosys";
1762 mod[
"parameter"] << sys.param->GetName();
1767 auto &
data =
mod[
"data"].set_map();
1768 if (channel.nBins != sys.low.size() || channel.nBins != sys.high.size()) {
1769 std::stringstream
ss;
1770 ss <<
"inconsistent binning: " << channel.nBins <<
" bins expected, but " << sys.low.size() <<
"/"
1771 << sys.high.size() <<
" found in nominal histogram errors!";
1778 for (
const auto &sys :
sample.shapesys) {
1781 mod[
"name"] << sys.name;
1782 mod[
"type"] <<
"shapesys";
1784 if (std::any_of(sys.constraintPdfs.begin(), sys.constraintPdfs.end(),
1785 [](
auto *pdf) { return pdf != nullptr; })) {
1787 for (
auto *constraint : sys.constraintPdfs) {
1795 mod[
"data"].set_map()[
"vals"].fill_seq(sys.constraints);
1802 mod[
"type"] <<
"custom";
1808 mod[
"type"] <<
"custom";
1811 if (
sample.useBarlowBeestonLight) {
1814 mod[
"name"] << ::Literals::staterror;
1815 mod[
"type"] << ::Literals::staterror;
1826 auto &
dataNode = s[
"data"].set_map();
1827 if (channel.nBins !=
sample.hist.size()) {
1828 std::stringstream
ss;
1829 ss <<
"inconsistent binning: " << channel.nBins <<
" bins expected, but " <<
sample.hist.size()
1830 <<
" found in nominal histogram!";
1834 if (!
sample.histError.empty()) {
1835 if (channel.nBins !=
sample.histError.size()) {
1836 std::stringstream
ss;
1837 ss <<
"inconsistent binning: " << channel.nBins <<
" bins expected, but " <<
sample.histError.size()
1838 <<
" found in nominal histogram errors!";
1851 std::set<const RooAbsReal *> vars;
1852 for (
const auto &
sample : channel.samples) {
1853 for (
const auto &
nf :
sample.normfactors) {
1854 vars.insert(
nf.param);
1856 for (
const auto &sys :
sample.normsys) {
1857 vars.insert(sys.param);
1860 for (
const auto &sys :
sample.histosys) {
1861 vars.insert(sys.param);
1863 for (
const auto &sys :
sample.shapesys) {
1864 for (
const auto &par : sys.parameters) {
1868 if (
sample.useBarlowBeestonLight) {
1869 for (
const auto &par :
sample.staterrorParameters) {
1877 for (
auto *pdf : constraints) {
1879 for (
const auto *var : vars) {
1880 if (pdf->dependsOn(*var)) {
1909 if (channel.samples.size() == 0)
1911 for (
auto &
sample : channel.samples) {
1912 if (
sample.hist.empty()) {
1926 "losing constraint term '" + std::string(constraint->
GetName()) +
1927 "', implicit constraints are not supported by HS3 yet! The term will appear in the HS3 file, but will not be "
1928 "picked up when creating a likelihood from it! You will have to add it manually as an external constraint.");
1929 tool->queueExport(*constraint);
1933 for (
const auto &
sample : channel.samples) {
1950 for (
auto *constraint :
modifier.constraintPdfs) {
1952 tool->queueExport(*constraint);
1959 for (
const auto &
sample : channel.samples) {
1970 sumpdf->getParameters(channel.varSet, parameters);
1974 tool->queueExport(*param);
1983 bool autoExportDependants()
const override {
return false; }
1986 std::vector<RooAbsPdf *> constraints;
1996 constraints.push_back(pdf);
2005 std::string
const &key()
const override
2007 static const std::string
keystring =
"histfactory_dist";
2018 bool autoExportDependants()
const override {
return false; }
2021 std::vector<RooAbsPdf *> constraints;
2024 std::string
const &key()
const override
2026 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)
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
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)