Types that represent an HS3 document. More...
Classes | |
| struct | Analysis |
| struct | Attributes |
| struct | AuxiliaryConstraints |
| What readAuxiliaryChannelsAsConstraints() changed. More... | |
| struct | BinnedAxis |
| The axis of binned data. More... | |
| struct | BinnedData |
| struct | CategoricalAxis |
| struct | Combined |
| Data sets or distributions that are selected by a key (HS3 #119). The columns are categorical axes of the domains. More... | |
| struct | CombinedComponent |
| The data set or distribution that a combined data set or distribution selects for one key, which has one label per column. More... | |
| struct | CombinedDataset |
| The data set of a RooSimultaneous as older versions of RooFit wrote it. It is only read. More... | |
| struct | CombinedDistribution |
| A RooSimultaneous as older versions of RooFit wrote it, before HS3 had combined distributions. It is only read. More... | |
| 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(). 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 |
| The data of a likelihood term: a data set, a number given in-line, or none (std::monostate) in a pure model. More... | |
| 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 | CombinedData = Combined<DataRef> |
| using | CombinedDist = Combined<DistributionRef> |
| 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 | |
| std::string | arrayComponentForm (std::string const &componentType, RooFit::Detail::JSONNode const &component, RooFit::Detail::JSONNode const *defaults) |
A canonical form of the component component of an array distribution with the type componentType and the default parameters defaults (may be nullptr): the type and all fields after applying the defaults, sorted, with numbers in a canonical representation. | |
| std::map< std::string, std::set< std::string > > | bookkeepingColumns (HS3Document const &doc) |
| The bookkeeping columns by combined data set: the declared ones (RooFitInternal::bookkeepingColumns), except for those that are a variate of a distribution after all. | |
| void | buildCombinedDist (RooJSONFactoryWSTool &tool, std::string const &name, CombinedDist const &dist, std::vector< std::string > const &otherLikelihoodTerms={}) |
| Create the RooSimultaneous of a combined distribution in the workspace of the tool. | |
| void | buildHistFactoryDist (RooJSONFactoryWSTool &tool, std::string const &name, HistFactoryDist const &dist) |
| 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::set< std::string > | componentsWithData (HS3Document const &doc) |
| The distributions that are components of a combined distribution of a likelihood, with a component of the paired combined data set that has entries: measurements of their own. | |
| 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, Data &out) |
| void | describe (Reader &ar, Domain &domain) |
| void | describe (Reader &ar, DomainAxis &axis) |
| void | describe (Reader &ar, Function &out) |
| void | describe (Reader &ar, GaussianUncertainty &uncertainty) |
| void | describe (Reader &ar, HistFactoryDist &dist) |
| void | describe (Reader &ar, HistoSysVariation &variation) |
| void | describe (Reader &ar, Likelihood &likelihood) |
| void | describe (Reader &ar, ModelConfigInfo &info) |
| void | describe (Reader &ar, Modifier &out) |
| void | describe (Reader &ar, NormFactor &m) |
| void | describe (Reader &ar, Package &p) |
| void | describe (Reader &ar, ParameterPoint &point) |
| void | describe (Reader &ar, ParameterValue &out) |
| 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) |
| template<class Axis_t > | |
| void | describe (Reader &ar, std::variant< Axis_t, CategoricalAxis > &out) |
| void | describe (Reader &ar, UnbinnedData &data) |
| template<class Modifier_t > | |
| void | describeSys (Reader &ar, Modifier_t &m) |
| void | factorOutDefaultInterpolation (HistFactoryDist &dist) |
| Makes the most common interpolation of the modifiers the "default_interpolation", which they then don't repeat. | |
| template<class Body_t , class Objects_t > | |
| auto | find (Objects_t &objects, std::string const &name) -> decltype(std::get_if< Body_t >(&objects.begin() ->body)) |
The body of the object name if it is a Body_t, e.g. find<CombinedData>(doc.data, "obsData"), or nullptr. | |
| template<class Objects_t > | |
| auto | findByName (Objects_t &objects, std::string const &name) -> decltype(&*objects.begin()) |
The object with the name name among the objects of a section, e.g. findByName(doc.data, "obsData"), or nullptr. | |
| bool | hasErrors (Diagnostics const &diagnostics) |
| Whether there is a diagnostic with error severity. | |
| std::string const * | importedArrayComponentForm (RooJSONFactoryWSTool &tool, std::string const &name) |
The canonical form (see arrayComponentForm()) of the component of an array distribution that this import created under the name name, or nullptr if it created none of that name. | |
| 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. | |
| template<class... Ts> | |
| std::string const & | nameOf (std::variant< Ts... > const &v) |
| The name of the alternative that a variant holds, e.g. of an axis or of a modifier. | |
| 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. | |
| Data | parseData (Detail::JSONNode const &data, Diagnostics &diagnostics) |
| Reads a data set that doesn't come with a document. | |
| Distribution | parseDistribution (Detail::JSONNode const &distribution, Diagnostics &diagnostics) |
| Reads a distribution 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. | |
| AuxiliaryConstraints | readAuxiliaryChannelsAsConstraints (ValidatedHS3Document &doc, bool asChannels) |
| RooFit writes an array of constraints with the data set of its observed values as a component of the combined distribution of the model (RooJSONFactoryWSTool::Config::exportConstraintData), and marks it in misc.ROOT_internal.auxiliary_channels. | |
| template<class Ref_t > | |
| void | readCombined (Reader &ar, std::string const &context, const char *refKey, Combined< Ref_t > &out) |
| std::optional< Interpolation > | readInterpolationCode (Cursor const &c, InterpolationClass interpolationClass) |
| Reads an integer interpolation code, as older versions of RooFit wrote them. | |
| void | readParameter (Reader &ar, ParameterRef ¶meter) |
| void | readValue (Cursor const &c, bool &out) |
| void | readValue (Cursor const &c, double &out) |
| void | readValue (Cursor const &c, int &out) |
| void | readValue (Cursor const &c, Interpolation &out) |
| void | readValue (Cursor const &c, NameOrNumber &out) |
| template<class Tag > | |
| void | readValue (Cursor const &c, Ref< Tag > &out) |
| template<class T > | |
| void | readValue (Cursor const &c, std::map< std::string, T > &out) |
| A struct that has a value of one type for each name. | |
| template<class T > | |
| void | readValue (Cursor const &c, std::optional< T > &out) |
| A value that can be null, like the constraint of a parameter that is not constrained. | |
| void | readValue (Cursor const &c, std::string &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 | recordImportedArrayComponent (RooJSONFactoryWSTool &tool, std::string const &name, std::string form) |
Record that this import created the component name of an array distribution, with the canonical form form. | |
| void | report (Diagnostics const &diagnostics, std::string const &object="") |
| Forward the warnings to the message service, and throw if there are errors. | |
| std::vector< std::string > | resolvePointData (ValidatedHS3Document &doc) |
| A number given in-line in the "data" of a likelihood, or a point data set without axes, is the value of the single variate of the paired distribution (HS3 0.3). | |
| 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. | |
| std::map< std::string, std::set< std::string > > | sharedAxes (HS3Document const &doc) |
| The axes that several components of a combined data set have, by combined data set. | |
| std::vector< std::string > | sharedVariates (HS3Document const &doc) |
| Describes each variate that is shared although it must be distinct: by the terms of a likelihood, by the components of a combined distribution that no likelihood lists (the others are checked through the likelihood), or by the components of a combined data set, except for bookkeeping columns. | |
| BinnedAxis | toBinnedAxis (RooRealVar const &var) |
| The axis of binned data for a variable, or for a binning of a variable with the given name. | |
| BinnedAxis | toBinnedAxis (std::string const &name, RooAbsBinning const &binning) |
| 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) |
| char const * | typeOf (Modifier const &modifier) |
| The type of a modifier, as the standard names it. | |
| std::vector< std::string > | unlistedConstraints (HS3Document const &doc, std::vector< std::string > *warnings=nullptr) |
| In HS3 0.3 (HS3 PR #154, decision on HS3 #156), the "constraints" of a HistFactory modifier add no term to a likelihood: every likelihood that contains the channel must list each named distribution exactly once, in "distributions" or "aux_distributions", or as a factor of a product_dist or a component of a combined_dist reached from them. | |
| 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 | validateCombinedDist (CombinedDist const &dist, std::string const &name, Diagnostics &diagnostics) |
| void | validateHistFactoryDist (HistFactoryDist const &dist, std::string const &name, Diagnostics &diagnostics) |
| Same as validate(), but for a single HistFactory or combined distribution that doesn't come with a document. | |
| std::set< std::string > | variatesOf (HS3Document const &doc, Likelihood const &likelihood) |
| The variates of the "distributions" of a likelihood, which it pairs with data, with the columns of its combined distributions. | |
| std::set< std::string > | variatesOf (HS3Document const &doc, std::string const &distribution) |
The variates of the distribution distribution, without the columns of a combined distribution. | |
| void | writeAxis (Detail::JSONNode &node, BinnedAxis const &axis) |
| Writes an axis of binned data. | |
| void | writeBinnedData (Detail::JSONNode &node, BinnedData const &data) |
| Writes the axes, contents and uncertainties of binned data, without its name and type. | |
| void | writeCombinedDist (Detail::JSONNode &node, CombinedDist const &dist) |
| Writes a combined distribution, without its name. | |
| 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) |
| std::map< std::string, std::set< std::string > > | writeLikelihoodTermsOnce (HS3Document const &doc, Detail::JSONNode &root) |
Writes each term of the likelihoods once: a factor of a product that is a term of the likelihood as well would enter it twice, so it is removed from the "factors" of the product in root, the JSON tree that the document is written to. | |
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" |
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.
| using RooFit::HS3::Binning = std::variant<RegularBinning, EdgesBinning> |
Definition at line 116 of file HS3Document.h.
| using RooFit::HS3::CombinedData = Combined<DataRef> |
Definition at line 242 of file HS3Document.h.
Definition at line 243 of file HS3Document.h.
| using RooFit::HS3::Constraint = std::variant<Unconstrained, ConstraintType, ConstraintPdf> |
Definition at line 371 of file HS3Document.h.
| using RooFit::HS3::DataRef = Ref<struct DataTag> |
Definition at line 90 of file HS3Document.h.
| using RooFit::HS3::Diagnostics = std::vector<Diagnostic> |
Definition at line 567 of file HS3Document.h.
| typedef Ref< struct DistributionTag > RooFit::HS3::DistributionRef = Ref<struct DistributionTag> |
Definition at line 41 of file RooJSONFactoryWSTool.h.
| using RooFit::HS3::DomainRef = Ref<struct DomainTag> |
Definition at line 91 of file HS3Document.h.
| using RooFit::HS3::GammaConstraint = std::variant<Unconstrained, ConstraintType, ConstantGammas, GammaConstraintPdfs> |
Definition at line 419 of file HS3Document.h.
| using RooFit::HS3::LikelihoodRef = Ref<struct LikelihoodTag> |
Definition at line 92 of file HS3Document.h.
| using RooFit::HS3::Modifier = std::variant<NormFactor, NormSys, HistoSys, ShapeSys, StatError, CustomModifier> |
Definition at line 442 of file HS3Document.h.
| using RooFit::HS3::NameOrNumber = std::variant<std::string, double> |
A name, or a number for a constant.
Definition at line 480 of file HS3Document.h.
| using RooFit::HS3::ParameterPointRef = Ref<struct ParameterPointTag> |
Definition at line 93 of file HS3Document.h.
| using RooFit::HS3::ParameterRef = Ref<struct ParameterTag> |
Definition at line 94 of file HS3Document.h.
|
strong |
The constraint types that older documents named, for which RooFit creates the constraint terms.
| Enumerator | |
|---|---|
| Gauss | |
| Poisson | |
| LogNormal | |
Definition at line 352 of file HS3Document.h.
|
strong |
The RooFit classes that implement the interpolations, which encode them with integer codes.
| Enumerator | |
|---|---|
| Piecewise | |
| Flexible | |
Definition at line 341 of file HS3Document.h.
|
strong |
| Enumerator | |
|---|---|
| Poly1 | |
| Poly2 | |
| Poly6 | |
| Exp | |
Definition at line 297 of file HS3Document.h.
|
strong |
| Enumerator | |
|---|---|
| Add | |
| Mult | |
Definition at line 292 of file HS3Document.h.
| std::string RooFit::HS3::arrayComponentForm | ( | std::string const & | componentType, |
| RooFit::Detail::JSONNode const & | component, | ||
| RooFit::Detail::JSONNode const * | defaults ) |
A canonical form of the component component of an array distribution with the type componentType and the default parameters defaults (may be nullptr): the type and all fields after applying the defaults, sorted, with numbers in a canonical representation.
Two components with the same form are identical in the sense of HS3: they are one factor of a union composition, also if they belong to different array distributions.
Definition at line 540 of file HS3Variates.cxx.
| std::map< std::string, std::set< std::string > > RooFit::HS3::bookkeepingColumns | ( | HS3Document const & | doc | ) |
The bookkeeping columns by combined data set: the declared ones (RooFitInternal::bookkeepingColumns), except for those that are a variate of a distribution after all.
They are exempt from the requirement of distinct variates.
Definition at line 384 of file HS3Variates.cxx.
| void RooFit::HS3::buildCombinedDist | ( | RooJSONFactoryWSTool & | tool, |
| std::string const & | name, | ||
| CombinedDist const & | dist, | ||
| std::vector< std::string > const & | otherLikelihoodTerms = {} ) |
Create the RooSimultaneous of a combined distribution in the workspace of the tool.
The other terms of the likelihoods that have the distribution are the candidates for the constraint terms of its components.
Definition at line 2227 of file RooJSONFactoryWSTool.cxx.
| void RooFit::HS3::buildHistFactoryDist | ( | RooJSONFactoryWSTool & | tool, |
| std::string const & | name, | ||
| HistFactoryDist const & | dist ) |
Create the RooFit objects of a HistFactory distribution in the workspace of the tool.
Definition at line 1641 of file JSONFactories_HistFactory.cxx.
| 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 854 of file HS3Validate.cxx.
| 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 81 of file HS3Parser.cxx.
| std::set< std::string > RooFit::HS3::componentsWithData | ( | HS3Document const & | doc | ) |
The distributions that are components of a combined distribution of a likelihood, with a component of the paired combined data set that has entries: measurements of their own.
Definition at line 511 of file HS3Variates.cxx.
| 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 2196 of file RooJSONFactoryWSTool.cxx.
| RooArgSet RooFit::HS3::createObservables | ( | std::vector< BinnedAxis > const & | axes | ) |
Create the variables for the axes of binned data.
Definition at line 2187 of file RooJSONFactoryWSTool.cxx.
Definition at line 661 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| Attributes & | attributes ) |
Definition at line 1024 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| BinnedAxis & | axis ) |
Definition at line 331 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| BinnedData & | data ) |
Definition at line 523 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| CategoricalAxis & | axis ) |
Definition at line 363 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| CombinedDataset & | info ) |
Definition at line 1048 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| CombinedDistribution & | info ) |
Definition at line 1037 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| ContinuousAxis & | axis ) |
Definition at line 322 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| CustomModifier & | m ) |
Definition at line 917 of file HS3Parser.cxx.
Definition at line 591 of file HS3Parser.cxx.
Definition at line 404 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| DomainAxis & | axis ) |
Definition at line 282 of file HS3Parser.cxx.
Definition at line 1015 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| GaussianUncertainty & | uncertainty ) |
Definition at line 502 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| HistFactoryDist & | dist ) |
Definition at line 965 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| HistoSysVariation & | variation ) |
Definition at line 876 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| Likelihood & | likelihood ) |
Definition at line 615 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| ModelConfigInfo & | info ) |
Definition at line 1058 of file HS3Parser.cxx.
Definition at line 922 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| NormFactor & | m ) |
Definition at line 869 of file HS3Parser.cxx.
Definition at line 276 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| ParameterPoint & | point ) |
Definition at line 435 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| ParameterValue & | out ) |
Definition at line 416 of file HS3Parser.cxx.
Definition at line 441 of file HS3Parser.cxx.
Definition at line 947 of file HS3Parser.cxx.
Definition at line 896 of file HS3Parser.cxx.
Definition at line 910 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| StatErrorConfig & | config ) |
Definition at line 957 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| std::variant< Axis_t, CategoricalAxis > & | out ) |
Definition at line 394 of file HS3Parser.cxx.
| void RooFit::HS3::describe | ( | Reader & | ar, |
| UnbinnedData & | data ) |
Definition at line 448 of file HS3Parser.cxx.
| void RooFit::HS3::describeSys | ( | Reader & | ar, |
| Modifier_t & | m ) |
Definition at line 884 of file HS3Parser.cxx.
| 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 180 of file HS3Document.cxx.
| auto RooFit::HS3::find | ( | Objects_t & | objects, |
| std::string const & | name ) -> decltype(std::get_if<Body_t>(&objects.begin()->body)) |
The body of the object name if it is a Body_t, e.g. find<CombinedData>(doc.data, "obsData"), or nullptr.
Definition at line 77 of file HS3Document.h.
| auto RooFit::HS3::findByName | ( | Objects_t & | objects, |
| std::string const & | name ) -> decltype(&*objects.begin()) |
The object with the name name among the objects of a section, e.g. findByName(doc.data, "obsData"), or nullptr.
Definition at line 65 of file HS3Document.h.
| bool RooFit::HS3::hasErrors | ( | Diagnostics const & | diagnostics | ) |
Whether there is a diagnostic with error severity.
Definition at line 92 of file HS3Parser.cxx.
| std::string const * RooFit::HS3::importedArrayComponentForm | ( | RooJSONFactoryWSTool & | tool, |
| std::string const & | name ) |
The canonical form (see arrayComponentForm()) of the component of an array distribution that this import created under the name name, or nullptr if it created none of that name.
Definition at line 186 of file RooJSONFactoryWSTool.cxx.
| 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 62 of file HS3Parser.cxx.
| 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 1734 of file JSONFactories_HistFactory.cxx.
| 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 123 of file HS3Document.cxx.
| std::string const & RooFit::HS3::nameOf | ( | std::variant< Ts... > const & | v | ) |
The name of the alternative that a variant holds, e.g. of an axis or of a modifier.
Definition at line 58 of file HS3Document.h.
|
inline |
Definition at line 315 of file HS3Document.h.
|
inline |
Definition at line 319 of file HS3Document.h.
Definition at line 43 of file HS3Document.h.
|
inline |
Definition at line 377 of file HS3Document.h.
|
inline |
Definition at line 311 of file HS3Document.h.
|
inline |
Definition at line 373 of file HS3Document.h.
| 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.
Definition at line 1335 of file HS3Parser.cxx.
| Data RooFit::HS3::parseData | ( | Detail::JSONNode const & | data, |
| Diagnostics & | diagnostics ) |
Reads a data set that doesn't come with a document.
Definition at line 1328 of file HS3Parser.cxx.
| Distribution RooFit::HS3::parseDistribution | ( | Detail::JSONNode const & | distribution, |
| Diagnostics & | diagnostics ) |
Reads a distribution that doesn't come with a document.
Definition at line 1321 of file HS3Parser.cxx.
| 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 1162 of file HS3Parser.cxx.
| HistFactoryDist RooFit::HS3::parseHistFactoryDist | ( | Detail::JSONNode const & | distribution, |
| Diagnostics & | diagnostics ) |
Reads a HistFactory distribution that doesn't come with a document.
Definition at line 1198 of file HS3Parser.cxx.
| 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 1342 of file HS3Parser.cxx.
| InterpolatedNumber RooFit::HS3::parseInterpolatedNumber | ( | Detail::JSONNode const & | node, |
| Diagnostics & | diagnostics ) |
Definition at line 1349 of file HS3Parser.cxx.
Reads the leading "MAJOR.MINOR" and the optional ".PATCH" of an HS3 version string.
Definition at line 201 of file HS3Parser.cxx.
| AuxiliaryConstraints RooFit::HS3::readAuxiliaryChannelsAsConstraints | ( | ValidatedHS3Document & | doc, |
| bool | asChannels ) |
RooFit writes an array of constraints with the data set of its observed values as a component of the combined distribution of the model (RooJSONFactoryWSTool::Config::exportConstraintData), and marks it in misc.ROOT_internal.auxiliary_channels.
Unless these components are to stay components (asChannels), the document is changed to what RooFit wrote before: the component and its data set become a term of every likelihood that has the combined distribution, which is then read as a constraint term with global observables. The label of the component is taken out of the index category.
The same is done for a document that lists a distribution twice: as a component of a combined distribution whose data set has no entries for it, and as a term of its own with data. It contributes once, as the term, but a component without data is not a constraint term for RooFit, which would leave it out of the likelihood. Such a document is read like the ones above, with a warning. If the components stay components, the data of the term becomes the data of the component instead, and the term is removed.
Definition at line 722 of file HS3Variates.cxx.
| void RooFit::HS3::readCombined | ( | Reader & | ar, |
| std::string const & | context, | ||
| const char * | refKey, | ||
| Combined< Ref_t > & | out ) |
Definition at line 544 of file HS3Parser.cxx.
| 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 1222 of file HS3Parser.cxx.
| void RooFit::HS3::readParameter | ( | Reader & | ar, |
| ParameterRef & | parameter ) |
Definition at line 859 of file HS3Parser.cxx.
Definition at line 192 of file HS3Parser.cxx.
Definition at line 172 of file HS3Parser.cxx.
Definition at line 181 of file HS3Parser.cxx.
| void RooFit::HS3::readValue | ( | Cursor const & | c, |
| Interpolation & | out ) |
Definition at line 742 of file HS3Parser.cxx.
| void RooFit::HS3::readValue | ( | Cursor const & | c, |
| NameOrNumber & | out ) |
Definition at line 1213 of file HS3Parser.cxx.
Definition at line 108 of file HS3Schema.h.
| void RooFit::HS3::readValue | ( | Cursor const & | c, |
| std::map< std::string, T > & | out ) |
A struct that has a value of one type for each name.
Definition at line 142 of file HS3Schema.h.
| void RooFit::HS3::readValue | ( | Cursor const & | c, |
| std::optional< T > & | out ) |
A value that can be null, like the constraint of a parameter that is not constrained.
Definition at line 115 of file HS3Schema.h.
| void RooFit::HS3::readValue | ( | Cursor const & | c, |
| std::string & | out ) |
Definition at line 163 of file HS3Parser.cxx.
| void RooFit::HS3::readValue | ( | Cursor const & | c, |
| std::vector< T > & | out ) |
Definition at line 123 of file HS3Schema.h.
| 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 156 of file HS3Schema.h.
| void RooFit::HS3::recordImportedArrayComponent | ( | RooJSONFactoryWSTool & | tool, |
| std::string const & | name, | ||
| std::string | form ) |
Record that this import created the component name of an array distribution, with the canonical form form.
Definition at line 195 of file RooJSONFactoryWSTool.cxx.
| void RooFit::HS3::report | ( | Diagnostics const & | diagnostics, |
| std::string const & | object = "" ) |
Forward the warnings to the message service, and throw if there are errors.
The paths of the diagnostics start with the name of the object, if they are about an object that doesn't come with a document.
Definition at line 448 of file RooJSONFactoryWSTool.cxx.
| std::vector< std::string > RooFit::HS3::resolvePointData | ( | ValidatedHS3Document & | doc | ) |
A number given in-line in the "data" of a likelihood, or a point data set without axes, is the value of the single variate of the paired distribution (HS3 0.3).
The numbers become point data sets named "<distribution>_data", and the point data sets get their axis, so that every term of a likelihood refers to a data set, or has no data. Returns the errors: a distribution without a single variate, or a point data set with an axis that is not the variate of its distribution.
Definition at line 886 of file HS3Variates.cxx.
| 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 202 of file RooJSONFactoryWSTool.cxx.
| std::map< std::string, std::set< std::string > > RooFit::HS3::sharedAxes | ( | HS3Document const & | doc | ) |
The axes that several components of a combined data set have, by combined data set.
Definition at line 366 of file HS3Variates.cxx.
| std::vector< std::string > RooFit::HS3::sharedVariates | ( | HS3Document const & | doc | ) |
Describes each variate that is shared although it must be distinct: by the terms of a likelihood, by the components of a combined distribution that no likelihood lists (the others are checked through the likelihood), or by the components of a combined data set, except for bookkeeping columns.
Definition at line 573 of file HS3Variates.cxx.
| HS3::BinnedAxis RooFit::HS3::toBinnedAxis | ( | RooRealVar const & | var | ) |
The axis of binned data for a variable, or for a binning of a variable with the given name.
Definition at line 696 of file RooJSONFactoryWSTool.cxx.
| HS3::BinnedAxis RooFit::HS3::toBinnedAxis | ( | std::string const & | name, |
| RooAbsBinning const & | binning ) |
Definition at line 702 of file RooJSONFactoryWSTool.cxx.
| HS3::NameOrNumber RooFit::HS3::toNameOrNumber | ( | RooAbsArg const & | arg | ) |
The name of an object, or the value of a literal constant.
Definition at line 707 of file RooJSONFactoryWSTool.cxx.
| char const * RooFit::HS3::toString | ( | ConstraintType | type | ) |
Definition at line 732 of file HS3Parser.cxx.
| char const * RooFit::HS3::toString | ( | InterpolationFunction | function | ) |
Definition at line 721 of file HS3Parser.cxx.
| char const * RooFit::HS3::toString | ( | InterpolationType | type | ) |
Definition at line 716 of file HS3Parser.cxx.
| char const * RooFit::HS3::typeOf | ( | Modifier const & | modifier | ) |
The type of a modifier, as the standard names it.
Definition at line 54 of file HS3Document.cxx.
| std::vector< std::string > RooFit::HS3::unlistedConstraints | ( | HS3Document const & | doc, |
| std::vector< std::string > * | warnings = nullptr ) |
In HS3 0.3 (HS3 PR #154, decision on HS3 #156), the "constraints" of a HistFactory modifier add no term to a likelihood: every likelihood that contains the channel must list each named distribution exactly once, in "distributions" or "aux_distributions", or as a factor of a product_dist or a component of a combined_dist reached from them.
One message for each named distribution of each likelihood that doesn't. For older documents, RooFit adds the named constraints itself (see sharedVariates()).
A distribution contributes one factor per entry of the data that it is paired with, so that being listed is not the same as contributing: a component of a combined_dist without a component of the paired combined data set, or with one that has no entries, contributes nothing. A constraint that contributes once elsewhere is then fine, but since listing it in the model and again on its own is probably unintended, warnings gets a message. So it does for every component of a combined distribution that has no data component at all.
Definition at line 406 of file HS3Variates.cxx.
| 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 371 of file HS3Upgrade.cxx.
| 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 403 of file HS3Upgrade.cxx.
| 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 859 of file HS3Validate.cxx.
| void RooFit::HS3::validateCombinedDist | ( | CombinedDist const & | dist, |
| std::string const & | name, | ||
| Diagnostics & | diagnostics ) |
Definition at line 877 of file HS3Validate.cxx.
| void RooFit::HS3::validateHistFactoryDist | ( | HistFactoryDist const & | dist, |
| std::string const & | name, | ||
| Diagnostics & | diagnostics ) |
Same as validate(), but for a single HistFactory or combined distribution that doesn't come with a document.
Definition at line 868 of file HS3Validate.cxx.
| std::set< std::string > RooFit::HS3::variatesOf | ( | HS3Document const & | doc, |
| Likelihood const & | likelihood ) |
The variates of the "distributions" of a likelihood, which it pairs with data, with the columns of its combined distributions.
Definition at line 344 of file HS3Variates.cxx.
| std::set< std::string > RooFit::HS3::variatesOf | ( | HS3Document const & | doc, |
| std::string const & | distribution ) |
The variates of the distribution distribution, without the columns of a combined distribution.
Definition at line 358 of file HS3Variates.cxx.
| void RooFit::HS3::writeAxis | ( | Detail::JSONNode & | node, |
| BinnedAxis const & | axis ) |
Writes an axis of binned data.
Definition at line 423 of file HS3Writer.cxx.
| void RooFit::HS3::writeBinnedData | ( | Detail::JSONNode & | node, |
| BinnedData const & | data ) |
Writes the axes, contents and uncertainties of binned data, without its name and type.
Definition at line 435 of file HS3Writer.cxx.
| void RooFit::HS3::writeCombinedDist | ( | Detail::JSONNode & | node, |
| CombinedDist const & | dist ) |
Writes a combined distribution, without its name.
Definition at line 483 of file HS3Writer.cxx.
| 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 381 of file HS3Writer.cxx.
| 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 489 of file HS3Writer.cxx.
| void RooFit::HS3::writeHistFactoryDist | ( | Detail::JSONNode & | node, |
| HistFactoryDist const & | dist ) |
Writes a HistFactory distribution, without its name.
Definition at line 457 of file HS3Writer.cxx.
| 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 446 of file HS3Writer.cxx.
| void RooFit::HS3::writeInterpolatedNumber | ( | Detail::JSONNode & | node, |
| InterpolatedNumber const & | function ) |
Definition at line 452 of file HS3Writer.cxx.
| void RooFit::HS3::writeInterpolation | ( | Detail::JSONNode & | node, |
| Interpolation const & | interpolation ) |
Definition at line 389 of file HS3Writer.cxx.
| std::map< std::string, std::set< std::string > > RooFit::HS3::writeLikelihoodTermsOnce | ( | HS3Document const & | doc, |
| Detail::JSONNode & | root ) |
Writes each term of the likelihoods once: a factor of a product that is a term of the likelihood as well would enter it twice, so it is removed from the "factors" of the product in root, the JSON tree that the document is written to.
Only products that no other distribution uses are changed (being a component of a combined distribution is not a use), only factors that are terms of every likelihood that has the product as a term, and a product whose factors are all such terms is left as it is. Returns the removed factors by product.
Definition at line 957 of file HS3Variates.cxx.
|
inlineconstexpr |
Definition at line 324 of file HS3Document.h.
|
inlineconstexpr |
Definition at line 330 of file HS3Document.h.
|
inlineconstexpr |
Definition at line 328 of file HS3Document.h.
|
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 157 of file HS3Document.h.
|
inlineconstexpr |
Definition at line 326 of file HS3Document.h.
|
inlineconstexpr |
Definition at line 332 of file HS3Document.h.
|
inlineconstexpr |
Definition at line 334 of file HS3Document.h.
|
constexpr |
Definition at line 27 of file HS3Parser.cxx.