1#ifndef HYPERISO_LHA_ELEMENTS_H
2#define HYPERISO_LHA_ELEMENTS_H
70 virtual std::pair<double, double>
getBinning()
const = 0;
105 virtual std::shared_ptr<DBNode>
toDBNode()
const = 0;
138 std::optional<RenormalizationScheme> rScheme;
139 std::optional<double> Q;
140 std::optional<std::pair<double, double>> bin;
158 LhaID encodeId(
const Prototype& prototype,
const std::vector<std::string>& line);
202 inline double getScale()
const override {
return this->Q.has_value() ? this->Q.value() : 0; }
211 inline std::pair<double, double>
getBinning()
const override {
return this->bin.value_or(std::pair(-1.0, -1.0)); }
223 std::string
toString()
const override;
237 std::shared_ptr<DBNode>
toDBNode()
const override;
265 static std::shared_ptr<AbstractElement>
createElement(
const Prototype& prototype,
const std::vector<std::string>& line);
Hierarchical key–value tree with JSON/YAML serialization.
Lightweight representation of LHAPDF / SLHA-style identifiers.
Abstract base class for a single element of an LHA/FLHA block.
virtual ~AbstractElement()=default
Virtual destructor.
virtual std::pair< double, double > getBinning() const =0
Returns the binning associated to this element.
virtual std::string toString() const =0
Converts the element to a line-like string representation.
AbstractElement(const LhaID &id_)
Constructs an AbstractElement with a given identifier.
LhaID getId() const
Returns the identifier of the element.
virtual std::shared_ptr< DBNode > toDBNode() const =0
Converts the element into a DBNode for database/storage use.
virtual double getScale() const =0
Returns the renormalization scale of this element.
Factory for creating LHA/FLHA elements from a prototype and a line.
static std::shared_ptr< AbstractElement > createElement(const Prototype &prototype, const std::vector< std::string > &line)
Creates an element of the appropriate type for a given line.
Template concrete implementation of an LHA/FLHA block element.
double getScale() const override
Returns the renormalization scale Q of the element.
std::pair< double, double > getBinning() const override
Returns the binning associated with the element.
RenormalizationScheme getScheme() const
Returns the renormalization scheme of the element.
std::string toString() const override
Returns a line-like string representation of the element.
std::shared_ptr< DBNode > toDBNode() const override
Converts the element to a DBNode representation.
T getValue() const
Returns the stored value of the element.
RenormalizationScheme
Enumeration of possible renormalization schemes for LHA elements.
double T(double x)
Wilson coefficient T(x).
Represents an identifier of a LHA element, possibly containing several sub-ids.
Represents the structure of an LHA block, specifying columns for values, scales, and renormalization ...