Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFit::HS3 Namespace Reference

Types that represent an HS3 document. More...

Classes

struct  Analysis
 
struct  Attributes
 
struct  BinnedAxis
 The axis of binned data. More...
 
struct  BinnedData
 
struct  CategoricalAxis
 
struct  CombinedDataset
 
struct  CombinedDistribution
 
struct  ConstantGammas
 The gamma parameters are constant, which is a RooFit extension. More...
 
struct  ConstraintPdf
 The constraint term is a distribution of the document, named in "constraints". More...
 
struct  ContinuousAxis
 The axis of point data or unbinned data, which can't have a binning. More...
 
class  Cursor
 A position in the JSON tree. More...
 
struct  CustomModifier
 Multiplies the sample with a function of the document. More...
 
struct  Data
 
struct  Diagnostic
 
struct  Distribution
 
struct  Domain
 
struct  DomainAxis
 The axis of a domain. More...
 
class  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  EdgesBinning
 
struct  Function
 
struct  GammaConstraintPdfs
 Every gamma parameter has its own constraint term, or none, as named in "constraints". More...
 
struct  GaussianUncertainty
 
struct  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  HistFactoryDist
 
struct  HistoSys
 
struct  HistoSysVariation
 
struct  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  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  Interpolation
 How a modifier of a HistFactory distribution interpolates and extrapolates its effect. More...
 
struct  Likelihood
 
struct  LikelihoodTerm
 
struct  Metadata
 
struct  ModelConfigInfo
 
struct  NormFactor
 
struct  NormSys
 
struct  overloaded
 Combines lambdas into one visitor for std::visit(). The compiler complains about the alternatives without lambda. More...
 
struct  Package
 
struct  ParameterPoint
 
struct  ParameterValue
 
struct  ParseOptions
 Options for upgradeDocument() and parseDocument(). More...
 
struct  PointData
 
class  Reader
 Reads the components of a struct. More...
 
struct  Ref
 A name that says what it refers to, so that for example a DataRef can't be used as a DomainRef. More...
 
struct  RegularBinning
 
struct  RooFitInternal
 The content of misc.ROOT_internal and misc.minimization. More...
 
struct  Sample
 
struct  ShapeSys
 Scales each bin by its own parameter. The modifier type "shapesys" is a deprecated alias of "shapefactor". More...
 
struct  StatError
 Scales each bin by a parameter, that is constrained by the statistical uncertainty of all samples that have this modifier. More...
 
struct  StatErrorConfig
 Settings of the staterror modifiers that apply to the whole channel. This is a RooFit extension. More...
 
struct  StepWidth
 
struct  ToolExportState
 The document that the tool is exporting. More...
 
struct  ToolImportState
 What the tool needs to know about the document that it is importing. More...
 
struct  UnbinnedData
 
struct  Unconstrained
 The parameter of the modifier is not constrained. More...
 
struct  ValidateOptions
 Options for validate(). More...
 
struct  Version
 

Typedefs

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

Enumerations

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

Functions

void buildHistFactoryDist (RooJSONFactoryWSTool &tool, std::string const &name, HistFactoryDist const &dist, std::vector< DistributionRef > const *channelConstraints=nullptr)
 Create the RooFit objects of a HistFactory distribution in the workspace of the tool.
 
void 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 > codeFromInterpolation (Interpolation const &interpolation, InterpolationClass interpolationClass)
 The integer code of an interpolation, or nothing if the class can't represent the interpolation.
 
std::unique_ptr< RooDataHist > createDataHist (std::string const &name, RooArgSet const &vars, std::vector< double > const &contents, std::vector< double > const *errors)
 Create a RooDataHist with the contents and errors. If there are no errors, it doesn't store squared weights.
 
RooArgSet createObservables (std::vector< BinnedAxis > const &axes)
 Create the variables for the axes of binned data.
 
void describe (Reader &ar, Analysis &analysis)
 
void describe (Reader &ar, Attributes &attributes)
 
void describe (Reader &ar, BinnedAxis &axis)
 
void describe (Reader &ar, BinnedData &data)
 
void describe (Reader &ar, CategoricalAxis &axis)
 
void describe (Reader &ar, CombinedDataset &info)
 
void describe (Reader &ar, CombinedDistribution &info)
 
void describe (Reader &ar, ContinuousAxis &axis)
 
void describe (Reader &ar, CustomModifier &m)
 
void describe (Reader &ar, Domain &domain)
 
void describe (Reader &ar, DomainAxis &axis)
 
void describe (Reader &ar, GaussianUncertainty &uncertainty)
 
void describe (Reader &ar, HistFactoryDist &dist)
 
void describe (Reader &ar, HistoSys &m)
 
void describe (Reader &ar, HistoSysVariation &variation)
 
void describe (Reader &ar, Likelihood &likelihood)
 
void describe (Reader &ar, ModelConfigInfo &info)
 
void describe (Reader &ar, NormFactor &m)
 
void describe (Reader &ar, NormSys &m)
 
void describe (Reader &ar, Package &p)
 
void describe (Reader &ar, ParameterPoint &point)
 
void describe (Reader &ar, PointData &data)
 
void describe (Reader &ar, Sample &sample)
 
void describe (Reader &ar, ShapeSys &m)
 
void describe (Reader &ar, StatError &m)
 
void describe (Reader &ar, StatErrorConfig &config)
 
void describe (Reader &ar, UnbinnedData &data)
 
void factorOutDefaultInterpolation (HistFactoryDist &dist)
 Makes the most common interpolation of the modifiers the "default_interpolation", which they then don't repeat.
 
bool hasErrors (Diagnostics const &diagnostics)
 Whether there is a diagnostic with error severity.
 
void importHistFactoryNode (RooJSONFactoryWSTool &tool, Detail::JSONNode const &node, std::vector< DistributionRef > const *channelConstraints)
 What the built-in importer does with a HistFactory distribution, plus the constraint terms of the channel.
 
std::optional< Interpolation > interpolationFromCode (int code, InterpolationClass interpolationClass)
 The interpolation for an integer code, or nothing if the class doesn't support the code.
 
bool isBuiltinHistFactoryImporter (JSONIO::Importer const &importer)
 Whether this is the importer that RooFit registers for HistFactory distributions, as opposed to the one of a user.
 
void 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 operator!= (Interpolation const &l, Interpolation const &r)
 
bool operator< (Interpolation const &l, Interpolation const &r)
 
bool operator< (Version const &l, Version const &r)
 
bool operator== (ConstraintPdf const &l, ConstraintPdf const &r)
 
bool operator== (Interpolation const &l, Interpolation const &r)
 
bool operator== (Unconstrained, Unconstrained)
 
template<class... Ts>
 overloaded (Ts...) -> overloaded< Ts... >
 
std::vector< BinnedAxis > parseBinnedAxes (Detail::JSONNode const &axes, Diagnostics &diagnostics)
 Reads the axes of binned data that doesn't come with a document.
 
HS3Document parseDocument (Detail::JSONNode const &root, Diagnostics &diagnostics, ParseOptions const &options={})
 Reads a document.
 
HistFactoryDist parseHistFactoryDist (Detail::JSONNode const &distribution, Diagnostics &diagnostics)
 Reads a HistFactory distribution that doesn't come with a document.
 
InterpolatedFunction parseInterpolatedFunction (Detail::JSONNode const &node, Diagnostics &diagnostics)
 Reads the functions "interpolation" and "interpolation0d", which don't come with a document.
 
InterpolatedNumber parseInterpolatedNumber (Detail::JSONNode const &node, Diagnostics &diagnostics)
 
bool parseVersion (std::string const &version, Version &out)
 Reads the leading "MAJOR.MINOR" and the optional ".PATCH" of an HS3 version string.
 
std::optional< Interpolation > readInterpolationCode (Cursor const &c, InterpolationClass interpolationClass)
 Reads an integer interpolation code, as older versions of RooFit wrote them.
 
void readModifierName (Reader &ar, std::string &name)
 
void readParameter (Reader &ar, ParameterRef &parameter)
 
void readValue (Cursor const &c, bool &out)
 
void readValue (Cursor const &c, Data &out)
 
void readValue (Cursor const &c, double &out)
 
void readValue (Cursor const &c, Function &out)
 
void readValue (Cursor const &c, int &out)
 
void readValue (Cursor const &c, Interpolation &out)
 
void readValue (Cursor const &c, Modifier &out)
 
void readValue (Cursor const &c, NameOrNumber &out)
 
void readValue (Cursor const &c, ParameterValue &p)
 
template<class Tag >
void readValue (Cursor const &c, Ref< Tag > &out)
 
void readValue (Cursor const &c, std::string &out)
 
void readValue (Cursor const &c, std::variant< BinnedAxis, CategoricalAxis > &out)
 
void readValue (Cursor const &c, std::variant< ContinuousAxis, CategoricalAxis > &out)
 
void readValue (Cursor const &c, std::variant< DomainAxis, CategoricalAxis > &out)
 
template<class T >
void readValue (Cursor const &c, std::vector< T > &out)
 
template<class T >
auto readValue (Cursor const &c, T &out) -> std::void_t< decltype(describe(std::declval< Reader & >(), out))>
 Everything that has a describe() function is read from a struct.
 
void report (Diagnostics const &diagnostics)
 Forward the warnings to the message service, and throw if there are errors.
 
void setExportedObject (RooJSONFactoryWSTool &tool, HistFactoryDist dist, std::vector< DistributionRef > channelConstraints)
 Called by the exporter of a HistFactory distribution, which is then written by the tool.
 
BinnedAxis toBinnedAxis (RooRealVar const &var)
 The axis of binned data for a variable.
 
NameOrNumber toNameOrNumber (RooAbsArg const &arg)
 The name of an object, or the value of a literal constant.
 
char const * toString (ConstraintType type)
 
char const * toString (InterpolationFunction function)
 
char const * toString (InterpolationType type)
 
void 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 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 > 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 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 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 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 writeHistFactoryDist (Detail::JSONNode &node, HistFactoryDist const &dist)
 Writes a HistFactory distribution, without its name.
 
void writeInterpolatedFunction (Detail::JSONNode &node, InterpolatedFunction const &function)
 Writes the functions "interpolation" and "interpolation0d", with a single interpolation if they are all the same.
 
void writeInterpolatedNumber (Detail::JSONNode &node, InterpolatedNumber const &function)
 
void writeInterpolation (Detail::JSONNode &node, Interpolation const &interpolation)
 
void writeNumber (Detail::JSONNode &node, double value)
 Writes a number, as an integer if it has no fractional part.
 

Variables

constexpr Interpolation additivePiecewiseLinear
 
constexpr Interpolation additivePolynomialLinear
 
constexpr Interpolation additiveQuadraticLinear
 
constexpr char const * 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 multiplicativePiecewiseExponential
 
constexpr Interpolation multiplicativePolynomialExponential
 
constexpr Interpolation multiplicativePolynomialLinear
 
constexpr auto supportedVersion = "0.3"
 

Detailed Description

Types that represent an HS3 document.

They follow the structure of the HS3 standard, and this header must not depend on RooFit: creating RooFit objects from a document is a separate step.

Typedef Documentation

◆ Binning

Definition at line 94 of file HS3Document.h.

◆ Constraint

Definition at line 305 of file HS3Document.h.

◆ DataRef

using RooFit::HS3::DataRef = Ref<struct DataTag>

Definition at line 68 of file HS3Document.h.

◆ Diagnostics

using RooFit::HS3::Diagnostics = std::vector<Diagnostic>

Definition at line 488 of file HS3Document.h.

◆ DistributionRef

typedef Ref< struct DistributionTag > RooFit::HS3::DistributionRef = Ref<struct DistributionTag>

Definition at line 40 of file RooJSONFactoryWSTool.h.

◆ DomainRef

using RooFit::HS3::DomainRef = Ref<struct DomainTag>

Definition at line 69 of file HS3Document.h.

◆ GammaConstraint

◆ LikelihoodRef

using RooFit::HS3::LikelihoodRef = Ref<struct LikelihoodTag>

Definition at line 70 of file HS3Document.h.

◆ Modifier

Definition at line 376 of file HS3Document.h.

◆ NameOrNumber

using RooFit::HS3::NameOrNumber = std::variant<std::string, double>

A name, or a number for a constant.

Definition at line 411 of file HS3Document.h.

◆ ParameterPointRef

using RooFit::HS3::ParameterPointRef = Ref<struct ParameterPointTag>

Definition at line 71 of file HS3Document.h.

◆ ParameterRef

using RooFit::HS3::ParameterRef = Ref<struct ParameterTag>

Definition at line 72 of file HS3Document.h.

Enumeration Type Documentation

◆ ConstraintType

enum class RooFit::HS3::ConstraintType
strong

The constraint types that older documents named, for which RooFit creates the constraint terms.

Enumerator
Gauss 
Poisson 
LogNormal 

Definition at line 289 of file HS3Document.h.

◆ InterpolationClass

The RooFit classes that implement the interpolations, which encode them with integer codes.

Enumerator
Piecewise 
Flexible 

Definition at line 278 of file HS3Document.h.

◆ InterpolationFunction

Enumerator
Poly1 
Poly2 
Poly6 
Exp 

Definition at line 228 of file HS3Document.h.

◆ InterpolationType

enum class RooFit::HS3::InterpolationType
strong
Enumerator
Add 
Mult 

Definition at line 223 of file HS3Document.h.

Function Documentation

◆ buildHistFactoryDist()

void RooFit::HS3::buildHistFactoryDist ( RooJSONFactoryWSTool & tool,
std::string const & name,
HistFactoryDist const & dist,
std::vector< DistributionRef > const * channelConstraints = nullptr )

Create the RooFit objects of a HistFactory distribution in the workspace of the tool.

The constraint terms that no modifier names are passed separately.

Definition at line 1485 of file JSONFactories_HistFactory.cxx.

◆ checkDocument()

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.

Definition at line 582 of file HS3Validate.cxx.

◆ codeFromInterpolation()

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.

Definition at line 83 of file HS3Parser.cxx.

◆ createDataHist()

std::unique_ptr< RooDataHist > RooFit::HS3::createDataHist ( std::string const & name,
RooArgSet const & vars,
std::vector< double > const & contents,
std::vector< double > const * errors )

Create a RooDataHist with the contents and errors. If there are no errors, it doesn't store squared weights.

Definition at line 1034 of file RooJSONFactoryWSTool.cxx.

◆ createObservables()

RooArgSet RooFit::HS3::createObservables ( std::vector< BinnedAxis > const & axes)

Create the variables for the axes of binned data.

Definition at line 1025 of file RooJSONFactoryWSTool.cxx.

◆ describe() [1/27]

void RooFit::HS3::describe ( Reader & ar,
Analysis & analysis )

Definition at line 620 of file HS3Parser.cxx.

◆ describe() [2/27]

void RooFit::HS3::describe ( Reader & ar,
Attributes & attributes )

Definition at line 1025 of file HS3Parser.cxx.

◆ describe() [3/27]

void RooFit::HS3::describe ( Reader & ar,
BinnedAxis & axis )

Definition at line 333 of file HS3Parser.cxx.

◆ describe() [4/27]

void RooFit::HS3::describe ( Reader & ar,
BinnedData & data )

Definition at line 538 of file HS3Parser.cxx.

◆ describe() [5/27]

void RooFit::HS3::describe ( Reader & ar,
CategoricalAxis & axis )

Definition at line 364 of file HS3Parser.cxx.

◆ describe() [6/27]

void RooFit::HS3::describe ( Reader & ar,
CombinedDataset & info )

Definition at line 1056 of file HS3Parser.cxx.

◆ describe() [7/27]

void RooFit::HS3::describe ( Reader & ar,
CombinedDistribution & info )

Definition at line 1045 of file HS3Parser.cxx.

◆ describe() [8/27]

void RooFit::HS3::describe ( Reader & ar,
ContinuousAxis & axis )

Definition at line 326 of file HS3Parser.cxx.

◆ describe() [9/27]

void RooFit::HS3::describe ( Reader & ar,
CustomModifier & m )

Definition at line 911 of file HS3Parser.cxx.

◆ describe() [10/27]

void RooFit::HS3::describe ( Reader & ar,
Domain & domain )

Definition at line 410 of file HS3Parser.cxx.

◆ describe() [11/27]

void RooFit::HS3::describe ( Reader & ar,
DomainAxis & axis )

Definition at line 287 of file HS3Parser.cxx.

◆ describe() [12/27]

void RooFit::HS3::describe ( Reader & ar,
GaussianUncertainty & uncertainty )

Definition at line 517 of file HS3Parser.cxx.

◆ describe() [13/27]

void RooFit::HS3::describe ( Reader & ar,
HistFactoryDist & dist )

Definition at line 972 of file HS3Parser.cxx.

◆ describe() [14/27]

void RooFit::HS3::describe ( Reader & ar,
HistoSys & m )

Definition at line 878 of file HS3Parser.cxx.

◆ describe() [15/27]

void RooFit::HS3::describe ( Reader & ar,
HistoSysVariation & variation )

Definition at line 872 of file HS3Parser.cxx.

◆ describe() [16/27]

void RooFit::HS3::describe ( Reader & ar,
Likelihood & likelihood )

Definition at line 582 of file HS3Parser.cxx.

◆ describe() [17/27]

void RooFit::HS3::describe ( Reader & ar,
ModelConfigInfo & info )

Definition at line 1066 of file HS3Parser.cxx.

◆ describe() [18/27]

void RooFit::HS3::describe ( Reader & ar,
NormFactor & m )

Definition at line 853 of file HS3Parser.cxx.

◆ describe() [19/27]

void RooFit::HS3::describe ( Reader & ar,
NormSys & m )

Definition at line 860 of file HS3Parser.cxx.

◆ describe() [20/27]

void RooFit::HS3::describe ( Reader & ar,
Package & p )

Definition at line 281 of file HS3Parser.cxx.

◆ describe() [21/27]

void RooFit::HS3::describe ( Reader & ar,
ParameterPoint & point )

Definition at line 450 of file HS3Parser.cxx.

◆ describe() [22/27]

void RooFit::HS3::describe ( Reader & ar,
PointData & data )

Definition at line 456 of file HS3Parser.cxx.

◆ describe() [23/27]

void RooFit::HS3::describe ( Reader & ar,
Sample & sample )

Definition at line 950 of file HS3Parser.cxx.

◆ describe() [24/27]

void RooFit::HS3::describe ( Reader & ar,
ShapeSys & m )

Definition at line 890 of file HS3Parser.cxx.

◆ describe() [25/27]

void RooFit::HS3::describe ( Reader & ar,
StatError & m )

Definition at line 904 of file HS3Parser.cxx.

◆ describe() [26/27]

void RooFit::HS3::describe ( Reader & ar,
StatErrorConfig & config )

Definition at line 960 of file HS3Parser.cxx.

◆ describe() [27/27]

void RooFit::HS3::describe ( Reader & ar,
UnbinnedData & data )

Definition at line 463 of file HS3Parser.cxx.

◆ factorOutDefaultInterpolation()

void RooFit::HS3::factorOutDefaultInterpolation ( HistFactoryDist & dist)

Makes the most common interpolation of the modifiers the "default_interpolation", which they then don't repeat.

Definition at line 184 of file HS3Document.cxx.

◆ hasErrors()

bool RooFit::HS3::hasErrors ( Diagnostics const & diagnostics)

Whether there is a diagnostic with error severity.

Definition at line 94 of file HS3Parser.cxx.

◆ importHistFactoryNode()

void RooFit::HS3::importHistFactoryNode ( RooJSONFactoryWSTool & tool,
Detail::JSONNode const & node,
std::vector< DistributionRef > const * channelConstraints )

What the built-in importer does with a HistFactory distribution, plus the constraint terms of the channel.

Definition at line 1597 of file JSONFactories_HistFactory.cxx.

◆ interpolationFromCode()

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.

Definition at line 64 of file HS3Parser.cxx.

◆ isBuiltinHistFactoryImporter()

bool RooFit::HS3::isBuiltinHistFactoryImporter ( JSONIO::Importer const & importer)

Whether this is the importer that RooFit registers for HistFactory distributions, as opposed to the one of a user.

Definition at line 1591 of file JSONFactories_HistFactory.cxx.

◆ mergeDuplicateModifiers()

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.

The modifiers of a type must be sorted by name. Other duplicates are errors.

Definition at line 127 of file HS3Document.cxx.

◆ operator!=()

bool RooFit::HS3::operator!= ( Interpolation const & l,
Interpolation const & r )
inline

Definition at line 246 of file HS3Document.h.

◆ operator<() [1/2]

bool RooFit::HS3::operator< ( Interpolation const & l,
Interpolation const & r )
inline

Definition at line 250 of file HS3Document.h.

◆ operator<() [2/2]

bool RooFit::HS3::operator< ( Version const & l,
Version const & r )
inline

Definition at line 42 of file HS3Document.h.

◆ operator==() [1/3]

bool RooFit::HS3::operator== ( ConstraintPdf const & l,
ConstraintPdf const & r )
inline

Definition at line 311 of file HS3Document.h.

◆ operator==() [2/3]

bool RooFit::HS3::operator== ( Interpolation const & l,
Interpolation const & r )
inline

Definition at line 242 of file HS3Document.h.

◆ operator==() [3/3]

bool RooFit::HS3::operator== ( Unconstrained ,
Unconstrained  )
inline

Definition at line 307 of file HS3Document.h.

◆ overloaded()

template<class... Ts>
RooFit::HS3::overloaded ( Ts... ) -> overloaded< Ts... >

◆ parseBinnedAxes()

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.

Definition at line 1348 of file HS3Parser.cxx.

◆ parseDocument()

HS3Document RooFit::HS3::parseDocument ( Detail::JSONNode const & root,
Diagnostics & diagnostics,
ParseOptions const & options = {} )

Reads a document.

The generic objects in the document refer to nodes of the JSON tree, so the tree must outlive the document. Problems are reported in diagnostics, and if there are errors the document must not be used.

Definition at line 1189 of file HS3Parser.cxx.

◆ parseHistFactoryDist()

HistFactoryDist RooFit::HS3::parseHistFactoryDist ( Detail::JSONNode const & distribution,
Diagnostics & diagnostics )

Reads a HistFactory distribution that doesn't come with a document.

Definition at line 1225 of file HS3Parser.cxx.

◆ parseInterpolatedFunction()

InterpolatedFunction RooFit::HS3::parseInterpolatedFunction ( Detail::JSONNode const & node,
Diagnostics & diagnostics )

Reads the functions "interpolation" and "interpolation0d", which don't come with a document.

Older versions of RooFit wrote integer "interpolationCodes" instead of "interpolations".

Definition at line 1355 of file HS3Parser.cxx.

◆ parseInterpolatedNumber()

InterpolatedNumber RooFit::HS3::parseInterpolatedNumber ( Detail::JSONNode const & node,
Diagnostics & diagnostics )

Definition at line 1362 of file HS3Parser.cxx.

◆ parseVersion()

bool RooFit::HS3::parseVersion ( std::string const & version,
Version & out )

Reads the leading "MAJOR.MINOR" and the optional ".PATCH" of an HS3 version string.

Definition at line 206 of file HS3Parser.cxx.

◆ readInterpolationCode()

std::optional< Interpolation > RooFit::HS3::readInterpolationCode ( Cursor const & c,
InterpolationClass interpolationClass )

Reads an integer interpolation code, as older versions of RooFit wrote them.

Definition at line 1249 of file HS3Parser.cxx.

◆ readModifierName()

void RooFit::HS3::readModifierName ( Reader & ar,
std::string & name )

Definition at line 831 of file HS3Parser.cxx.

◆ readParameter()

void RooFit::HS3::readParameter ( Reader & ar,
ParameterRef & parameter )

Definition at line 839 of file HS3Parser.cxx.

◆ readValue() [1/16]

void RooFit::HS3::readValue ( Cursor const & c,
bool & out )

Definition at line 193 of file HS3Parser.cxx.

◆ readValue() [2/16]

void RooFit::HS3::readValue ( Cursor const & c,
Data & out )

Definition at line 555 of file HS3Parser.cxx.

◆ readValue() [3/16]

void RooFit::HS3::readValue ( Cursor const & c,
double & out )

Definition at line 173 of file HS3Parser.cxx.

◆ readValue() [4/16]

void RooFit::HS3::readValue ( Cursor const & c,
Function & out )

Definition at line 1009 of file HS3Parser.cxx.

◆ readValue() [5/16]

void RooFit::HS3::readValue ( Cursor const & c,
int & out )

Definition at line 182 of file HS3Parser.cxx.

◆ readValue() [6/16]

void RooFit::HS3::readValue ( Cursor const & c,
Interpolation & out )

Definition at line 701 of file HS3Parser.cxx.

◆ readValue() [7/16]

void RooFit::HS3::readValue ( Cursor const & c,
Modifier & out )

Definition at line 916 of file HS3Parser.cxx.

◆ readValue() [8/16]

void RooFit::HS3::readValue ( Cursor const & c,
NameOrNumber & out )

Definition at line 1240 of file HS3Parser.cxx.

◆ readValue() [9/16]

void RooFit::HS3::readValue ( Cursor const & c,
ParameterValue & p )

Definition at line 424 of file HS3Parser.cxx.

◆ readValue() [10/16]

template<class Tag >
void RooFit::HS3::readValue ( Cursor const & c,
Ref< Tag > & out )

Definition at line 105 of file HS3Schema.h.

◆ readValue() [11/16]

void RooFit::HS3::readValue ( Cursor const & c,
std::string & out )

Definition at line 164 of file HS3Parser.cxx.

◆ readValue() [12/16]

void RooFit::HS3::readValue ( Cursor const & c,
std::variant< BinnedAxis, CategoricalAxis > & out )

Definition at line 405 of file HS3Parser.cxx.

◆ readValue() [13/16]

void RooFit::HS3::readValue ( Cursor const & c,
std::variant< ContinuousAxis, CategoricalAxis > & out )

Definition at line 400 of file HS3Parser.cxx.

◆ readValue() [14/16]

void RooFit::HS3::readValue ( Cursor const & c,
std::variant< DomainAxis, CategoricalAxis > & out )

Definition at line 395 of file HS3Parser.cxx.

◆ readValue() [15/16]

template<class T >
void RooFit::HS3::readValue ( Cursor const & c,
std::vector< T > & out )

Definition at line 111 of file HS3Schema.h.

◆ readValue() [16/16]

template<class T >
auto RooFit::HS3::readValue ( Cursor const & c,
T & out ) -> std::void_t<decltype(describe(std::declval<Reader &>(), out))>

Everything that has a describe() function is read from a struct.

Definition at line 130 of file HS3Schema.h.

◆ report()

void RooFit::HS3::report ( Diagnostics const & diagnostics)

Forward the warnings to the message service, and throw if there are errors.

Definition at line 329 of file RooJSONFactoryWSTool.cxx.

◆ setExportedObject()

void RooFit::HS3::setExportedObject ( RooJSONFactoryWSTool & tool,
HistFactoryDist dist,
std::vector< DistributionRef > channelConstraints )

Called by the exporter of a HistFactory distribution, which is then written by the tool.

The constraint terms that no modifier names are passed separately.

Definition at line 163 of file RooJSONFactoryWSTool.cxx.

◆ toBinnedAxis()

HS3::BinnedAxis RooFit::HS3::toBinnedAxis ( RooRealVar const & var)

The axis of binned data for a variable.

Definition at line 608 of file RooJSONFactoryWSTool.cxx.

◆ toNameOrNumber()

HS3::NameOrNumber RooFit::HS3::toNameOrNumber ( RooAbsArg const & arg)

The name of an object, or the value of a literal constant.

Definition at line 620 of file RooJSONFactoryWSTool.cxx.

◆ toString() [1/3]

char const * RooFit::HS3::toString ( ConstraintType type)

Definition at line 691 of file HS3Parser.cxx.

◆ toString() [2/3]

char const * RooFit::HS3::toString ( InterpolationFunction function)

Definition at line 680 of file HS3Parser.cxx.

◆ toString() [3/3]

char const * RooFit::HS3::toString ( InterpolationType type)

Definition at line 675 of file HS3Parser.cxx.

◆ upgradeDocument()

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.

Definition at line 361 of file HS3Upgrade.cxx.

◆ upgradeHistFactoryDist()

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.

Names that can't be resolved in the document are assumed to refer to distributions.

Definition at line 397 of file HS3Upgrade.cxx.

◆ validate()

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.

Gives nothing if there are errors.

Definition at line 587 of file HS3Validate.cxx.

◆ validateHistFactoryDist()

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.

Definition at line 596 of file HS3Validate.cxx.

◆ writeContents()

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.

Definition at line 392 of file HS3Writer.cxx.

◆ writeDocument()

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().

Definition at line 491 of file HS3Writer.cxx.

◆ writeHistFactoryDist()

void RooFit::HS3::writeHistFactoryDist ( Detail::JSONNode & node,
HistFactoryDist const & dist )

Writes a HistFactory distribution, without its name.

Definition at line 465 of file HS3Writer.cxx.

◆ writeInterpolatedFunction()

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.

Definition at line 454 of file HS3Writer.cxx.

◆ writeInterpolatedNumber()

void RooFit::HS3::writeInterpolatedNumber ( Detail::JSONNode & node,
InterpolatedNumber const & function )

Definition at line 460 of file HS3Writer.cxx.

◆ writeInterpolation()

void RooFit::HS3::writeInterpolation ( Detail::JSONNode & node,
Interpolation const & interpolation )

Definition at line 400 of file HS3Writer.cxx.

◆ writeNumber()

void RooFit::HS3::writeNumber ( Detail::JSONNode & node,
double value )

Writes a number, as an integer if it has no fractional part.

Definition at line 382 of file HS3Writer.cxx.

Variable Documentation

◆ additivePiecewiseLinear

constexpr Interpolation RooFit::HS3::additivePiecewiseLinear
inlineconstexpr
Initial value:
{InterpolationType::Add, InterpolationFunction::Poly1,
std::nullopt}

Definition at line 261 of file HS3Document.h.

◆ additivePolynomialLinear

constexpr Interpolation RooFit::HS3::additivePolynomialLinear
inlineconstexpr
Initial value:
{InterpolationType::Add, InterpolationFunction::Poly6,
InterpolationFunction::Poly1}

Definition at line 267 of file HS3Document.h.

◆ additiveQuadraticLinear

constexpr Interpolation RooFit::HS3::additiveQuadraticLinear
inlineconstexpr
Initial value:
{InterpolationType::Add, InterpolationFunction::Poly2,
InterpolationFunction::Poly1}

Definition at line 265 of file HS3Document.h.

◆ defaultDomainName

constexpr char const* RooFit::HS3::defaultDomainName = "default_domain"
inlineconstexpr

The domain in which RooFit writes the ranges of all variables. It is a convention of RooFit, not of the standard.

Definition at line 132 of file HS3Document.h.

◆ multiplicativePiecewiseExponential

constexpr Interpolation RooFit::HS3::multiplicativePiecewiseExponential
inlineconstexpr
Initial value:
{InterpolationType::Mult, InterpolationFunction::Exp,
std::nullopt}

Definition at line 263 of file HS3Document.h.

◆ multiplicativePolynomialExponential

constexpr Interpolation RooFit::HS3::multiplicativePolynomialExponential
inlineconstexpr
Initial value:
{
InterpolationType::Mult, InterpolationFunction::Poly6, InterpolationFunction::Exp}

Definition at line 269 of file HS3Document.h.

◆ multiplicativePolynomialLinear

constexpr Interpolation RooFit::HS3::multiplicativePolynomialLinear
inlineconstexpr
Initial value:
{InterpolationType::Mult, InterpolationFunction::Poly6,
InterpolationFunction::Poly1}

Definition at line 271 of file HS3Document.h.

◆ supportedVersion

constexpr auto RooFit::HS3::supportedVersion = "0.3"
constexpr

Definition at line 29 of file HS3Parser.cxx.