Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
HS3Document.h File Reference
#include <functional>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <variant>
#include <vector>
Include dependency graph for HS3Document.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  RooFit::HS3::Analysis
 
struct  RooFit::HS3::Attributes
 
struct  RooFit::HS3::BinnedAxis
 The axis of binned data. More...
 
struct  RooFit::HS3::BinnedData
 
struct  RooFit::HS3::CategoricalAxis
 
struct  RooFit::HS3::CombinedDataset
 
struct  RooFit::HS3::CombinedDistribution
 
struct  RooFit::HS3::ConstantGammas
 The gamma parameters are constant, which is a RooFit extension. More...
 
struct  RooFit::HS3::ConstraintPdf
 The constraint term is a distribution of the document, named in "constraints". More...
 
struct  RooFit::HS3::ContinuousAxis
 The axis of point data or unbinned data, which can't have a binning. More...
 
struct  RooFit::HS3::CustomModifier
 Multiplies the sample with a function of the document. More...
 
struct  RooFit::HS3::Data
 
struct  RooFit::HS3::Diagnostic
 
struct  RooFit::HS3::Distribution
 
struct  RooFit::HS3::Domain
 
struct  RooFit::HS3::DomainAxis
 The axis of a domain. More...
 
class  RooFit::HS3::DomainRanges
 Where RooFit takes the ranges of variables from: the "default_domain" if there is one, otherwise the first domain by name that has the variable. More...
 
struct  RooFit::HS3::EdgesBinning
 
struct  RooFit::HS3::Function
 
struct  RooFit::HS3::GammaConstraintPdfs
 Every gamma parameter has its own constraint term, or none, as named in "constraints". More...
 
struct  RooFit::HS3::GaussianUncertainty
 
struct  RooFit::HS3::GenericObject
 A distribution or function that is not interpreted by the document, but by the importers that are registered for its type in RooFit::JSONIO::importers(), or by the factory expressions. More...
 
struct  RooFit::HS3::HistFactoryDist
 
struct  RooFit::HS3::HistoSys
 
struct  RooFit::HS3::HistoSysVariation
 
class  RooFit::HS3Document
 An HS3 document. It is move-only, because generic objects refer to the JSON tree that the document was read from. More...
 
struct  RooFit::HS3::InterpolatedFunction
 The function "interpolation" of RooFit, implemented by PiecewiseInterpolation: a nominal function plus the interpolated differences to the variations "high" and "low" for each parameter. More...
 
struct  RooFit::HS3::InterpolatedNumber
 The function "interpolation0d" of RooFit, implemented by FlexibleInterpVar: a nominal value plus the interpolated differences to the variations "high" and "low" for each parameter. More...
 
struct  RooFit::HS3::Interpolation
 How a modifier of a HistFactory distribution interpolates and extrapolates its effect. More...
 
struct  RooFit::HS3::Likelihood
 
struct  RooFit::HS3::LikelihoodTerm
 
struct  RooFit::HS3::Metadata
 
struct  RooFit::HS3::ModelConfigInfo
 
struct  RooFit::HS3::NormFactor
 
struct  RooFit::HS3::NormSys
 
struct  RooFit::HS3::overloaded< Ts >
 Combines lambdas into one visitor for std::visit(). The compiler complains about the alternatives without lambda. More...
 
struct  RooFit::HS3::Package
 
struct  RooFit::HS3::ParameterPoint
 
struct  RooFit::HS3::ParameterValue
 
struct  RooFit::HS3::ParseOptions
 Options for upgradeDocument() and parseDocument(). More...
 
struct  RooFit::HS3::PointData
 
struct  RooFit::HS3::Ref< Tag >
 A name that says what it refers to, so that for example a DataRef can't be used as a DomainRef. More...
 
struct  RooFit::HS3::RegularBinning
 
struct  RooFit::HS3::RooFitInternal
 The content of misc.ROOT_internal and misc.minimization. More...
 
struct  RooFit::HS3::Sample
 
struct  RooFit::HS3::ShapeSys
 Scales each bin by its own parameter. The modifier type "shapesys" is a deprecated alias of "shapefactor". More...
 
struct  RooFit::HS3::StatError
 Scales each bin by a parameter, that is constrained by the statistical uncertainty of all samples that have this modifier. More...
 
struct  RooFit::HS3::StatErrorConfig
 Settings of the staterror modifiers that apply to the whole channel. This is a RooFit extension. More...
 
struct  RooFit::HS3::StepWidth
 
struct  RooFit::HS3::UnbinnedData
 
struct  RooFit::HS3::Unconstrained
 The parameter of the modifier is not constrained. More...
 
class  RooFit::ValidatedHS3Document
 A document that passed validate(). More...
 
struct  RooFit::HS3::ValidateOptions
 Options for validate(). More...
 
struct  RooFit::HS3::Version
 

Namespaces

namespace  RooFit
 The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or other types of arguments).
 
namespace  RooFit::Detail
 
namespace  RooFit::HS3
 Types that represent an HS3 document.
 

Typedefs

using RooFit::HS3::Binning = std::variant<RegularBinning, EdgesBinning>
 
using RooFit::HS3::Constraint = std::variant<Unconstrained, ConstraintType, ConstraintPdf>
 
using RooFit::HS3::DataRef = Ref<struct DataTag>
 
using RooFit::HS3::Diagnostics = std::vector<Diagnostic>
 
using RooFit::HS3::DomainRef = Ref<struct DomainTag>
 
using RooFit::HS3::GammaConstraint = std::variant<Unconstrained, ConstraintType, ConstantGammas, GammaConstraintPdfs>
 
using RooFit::HS3::LikelihoodRef = Ref<struct LikelihoodTag>
 
using RooFit::HS3::Modifier = std::variant<NormFactor, NormSys, HistoSys, ShapeSys, StatError, CustomModifier>
 
using RooFit::HS3::NameOrNumber = std::variant<std::string, double>
 A name, or a number for a constant.
 
using RooFit::HS3::ParameterPointRef = Ref<struct ParameterPointTag>
 
using RooFit::HS3::ParameterRef = Ref<struct ParameterTag>
 

Enumerations

enum class  RooFit::HS3::ConstraintType { RooFit::HS3::Gauss , RooFit::HS3::Poisson , RooFit::HS3::LogNormal }
 The constraint types that older documents named, for which RooFit creates the constraint terms. More...
 
enum class  RooFit::HS3::InterpolationClass { RooFit::HS3::Piecewise , RooFit::HS3::Flexible }
 The RooFit classes that implement the interpolations, which encode them with integer codes. More...
 
enum class  RooFit::HS3::InterpolationFunction { RooFit::HS3::Poly1 , RooFit::HS3::Poly2 , RooFit::HS3::Poly6 , RooFit::HS3::Exp }
 
enum class  RooFit::HS3::InterpolationType { RooFit::HS3::Add , RooFit::HS3::Mult }
 

Functions

void RooFit::HS3::checkDocument (HS3Document const &doc, Diagnostics &diagnostics, ValidateOptions const &options={})
 The checks of validate(), for a document that is still needed if it doesn't pass them.
 
std::optional< int > RooFit::HS3::codeFromInterpolation (Interpolation const &interpolation, InterpolationClass interpolationClass)
 The integer code of an interpolation, or nothing if the class can't represent the interpolation.
 
void RooFit::HS3::factorOutDefaultInterpolation (HistFactoryDist &dist)
 Makes the most common interpolation of the modifiers the "default_interpolation", which they then don't repeat.
 
bool RooFit::HS3::hasErrors (Diagnostics const &diagnostics)
 Whether there is a diagnostic with error severity.
 
std::optional< Interpolation > RooFit::HS3::interpolationFromCode (int code, InterpolationClass interpolationClass)
 The interpolation for an integer code, or nothing if the class doesn't support the code.
 
void RooFit::HS3::mergeDuplicateModifiers (HistFactoryDist &dist, std::string const &channel, Diagnostics &diagnostics)
 Combines the modifiers of a sample that have the same type and name, which HistFactory models can have but documents can't: normsys by multiplying their variations, and histosys by adding up their differences to the nominal contents.
 
bool RooFit::HS3::operator!= (Interpolation const &l, Interpolation const &r)
 
bool RooFit::HS3::operator< (Interpolation const &l, Interpolation const &r)
 
bool RooFit::HS3::operator< (Version const &l, Version const &r)
 
bool RooFit::HS3::operator== (ConstraintPdf const &l, ConstraintPdf const &r)
 
bool RooFit::HS3::operator== (Interpolation const &l, Interpolation const &r)
 
bool RooFit::HS3::operator== (Unconstrained, Unconstrained)
 
template<class... Ts>
 RooFit::HS3::overloaded (Ts...) -> overloaded< Ts... >
 
std::vector< BinnedAxis > RooFit::HS3::parseBinnedAxes (Detail::JSONNode const &axes, Diagnostics &diagnostics)
 Reads the axes of binned data that doesn't come with a document.
 
HS3Document RooFit::HS3::parseDocument (Detail::JSONNode const &root, Diagnostics &diagnostics, ParseOptions const &options={})
 Reads a document.
 
HistFactoryDist RooFit::HS3::parseHistFactoryDist (Detail::JSONNode const &distribution, Diagnostics &diagnostics)
 Reads a HistFactory distribution that doesn't come with a document.
 
InterpolatedFunction RooFit::HS3::parseInterpolatedFunction (Detail::JSONNode const &node, Diagnostics &diagnostics)
 Reads the functions "interpolation" and "interpolation0d", which don't come with a document.
 
InterpolatedNumber RooFit::HS3::parseInterpolatedNumber (Detail::JSONNode const &node, Diagnostics &diagnostics)
 
bool RooFit::HS3::parseVersion (std::string const &version, Version &out)
 Reads the leading "MAJOR.MINOR" and the optional ".PATCH" of an HS3 version string.
 
char const * RooFit::HS3::toString (ConstraintType type)
 
char const * RooFit::HS3::toString (InterpolationFunction function)
 
char const * RooFit::HS3::toString (InterpolationType type)
 
void RooFit::HS3::upgradeDocument (Detail::JSONNode &root, Diagnostics &diagnostics, ParseOptions const &options={})
 Rewrites everything that older versions of RooFit wrote in a way that is not part of the standard into the form that parseDocument() understands.
 
void RooFit::HS3::upgradeHistFactoryDist (Detail::JSONNode &distribution, Version const &version, Diagnostics &diagnostics)
 Same as upgradeDocument(), but for a single HistFactory distribution that doesn't come with a document.
 
std::optional< ValidatedHS3Document > RooFit::HS3::validate (HS3Document doc, Diagnostics &diagnostics, ValidateOptions const &options={})
 Checks what can be checked without knowing how the objects are built: unique names, that the references can be resolved, and that the sizes of arrays are consistent.
 
void RooFit::HS3::validateHistFactoryDist (HistFactoryDist const &dist, std::string const &name, Diagnostics &diagnostics)
 Same as validate(), but for a single HistFactory distribution that doesn't come with a document.
 
void RooFit::HS3::writeContents (Detail::JSONNode &node, std::vector< double > const &values)
 Writes an array of numbers, each as an integer if it has no fractional part.
 
void RooFit::HS3::writeDocument (Detail::JSONNode &root, HS3Document const &doc)
 Writes everything but the distributions and functions, which are written one by one while they are exported: the generic ones by the exporters, and the others with functions like writeHistFactoryDist().
 
void RooFit::HS3::writeHistFactoryDist (Detail::JSONNode &node, HistFactoryDist const &dist)
 Writes a HistFactory distribution, without its name.
 
void RooFit::HS3::writeInterpolatedFunction (Detail::JSONNode &node, InterpolatedFunction const &function)
 Writes the functions "interpolation" and "interpolation0d", with a single interpolation if they are all the same.
 
void RooFit::HS3::writeInterpolatedNumber (Detail::JSONNode &node, InterpolatedNumber const &function)
 
void RooFit::HS3::writeInterpolation (Detail::JSONNode &node, Interpolation const &interpolation)
 
void RooFit::HS3::writeNumber (Detail::JSONNode &node, double value)
 Writes a number, as an integer if it has no fractional part.
 

Variables

constexpr Interpolation RooFit::HS3::additivePiecewiseLinear
 
constexpr Interpolation RooFit::HS3::additivePolynomialLinear
 
constexpr Interpolation RooFit::HS3::additiveQuadraticLinear
 
constexpr char const * RooFit::HS3::defaultDomainName = "default_domain"
 The domain in which RooFit writes the ranges of all variables. It is a convention of RooFit, not of the standard.
 
constexpr Interpolation RooFit::HS3::multiplicativePiecewiseExponential
 
constexpr Interpolation RooFit::HS3::multiplicativePolynomialExponential
 
constexpr Interpolation RooFit::HS3::multiplicativePolynomialLinear