Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
AbstractElement Class Referenceabstract

Abstract base class for a single element of an LHA/FLHA block. More...

#include <lha_elements.h>

Inheritance diagram for AbstractElement:
Collaboration diagram for AbstractElement:

Public Member Functions

 AbstractElement (const LhaID &id_)
 Constructs an AbstractElement with a given identifier.
 
LhaID getId () const
 Returns the identifier of the element.
 
virtual std::pair< double, double > getBinning () const =0
 Returns the binning associated to this element.
 
virtual double getScale () const =0
 Returns the renormalization scale of this element.
 
virtual std::string toString () const =0
 Converts the element to a line-like string representation.
 
virtual std::shared_ptr< DBNodetoDBNode () const =0
 Converts the element into a DBNode for database/storage use.
 
virtual ~AbstractElement ()=default
 Virtual destructor.
 

Protected Attributes

const LhaID id
 

Detailed Description

Abstract base class for a single element of an LHA/FLHA block.

An AbstractElement represents one logical "entry" in a block:

  • it has a unique identifier (LhaID) built from the line indices,
  • it can expose an optional scale and binning,
  • it can be serialized to a string or to a DBNode.

Concrete implementations (LhaElement<T>) provide the actual value type.

Definition at line 40 of file lha_elements.h.

Constructor & Destructor Documentation

◆ AbstractElement()

AbstractElement::AbstractElement ( const LhaID id_)
inlineexplicit

Constructs an AbstractElement with a given identifier.

Parameters
idUnique LhaID associated with this element.

Definition at line 50 of file lha_elements.h.

◆ ~AbstractElement()

virtual AbstractElement::~AbstractElement ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ getBinning()

virtual std::pair< double, double > AbstractElement::getBinning ( ) const
pure virtual

Returns the binning associated to this element.

The convention is defined by derived classes. For LhaElement<T>, if no bin is defined, a dummy pair (-1.0, -1.0) is returned.

Returns
Pair (low, high) bin edges.

Implemented in LhaElement< T >.

◆ getId()

LhaID AbstractElement::getId ( ) const
inline

Returns the identifier of the element.

The identifier encodes the integer indices of the line (e.g. PDG codes, matrix indices), excluding value/scale/scheme/bin.

Returns
LhaID of this element.

Definition at line 60 of file lha_elements.h.

◆ getScale()

virtual double AbstractElement::getScale ( ) const
pure virtual

Returns the renormalization scale of this element.

For blocks without a scale, derived classes typically return 0.

Returns
Scale value Q.

Implemented in LhaElement< T >.

◆ toDBNode()

virtual std::shared_ptr< DBNode > AbstractElement::toDBNode ( ) const
pure virtual

Converts the element into a DBNode for database/storage use.

The node typically stores:

  • "central_value" : the value,
  • "scale" : Q (if available),
  • "renormalization_scheme" : scheme (if available),
  • "bin_low", "bin_high" : bin edges (if available).
Returns
Shared pointer to a newly created DBNode.

Implemented in LhaElement< T >.

◆ toString()

virtual std::string AbstractElement::toString ( ) const
pure virtual

Converts the element to a line-like string representation.

The exact format is implementation-dependent; for LhaElement<T> it typically contains:

  • the ID (indices),
  • the value,
  • optionally Q and the renormalization scheme.
Returns
String representation of the element.

Implemented in LhaElement< T >.

Member Data Documentation

◆ id

const LhaID AbstractElement::id
protected

Unique identifier for the element.

Definition at line 42 of file lha_elements.h.


The documentation for this class was generated from the following file: