Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
CustomWilson.h
Go to the documentation of this file.
1#ifndef CUSTOM_WILSON_H
2#define CUSTOM_WILSON_H
3
4#include <functional>
5#include <memory>
6#include <string>
7#include <unordered_set>
8
9#include "Wilson.h"
10
51public:
59 CustomWilson(const LhaID& name,
60 const std::string& storage_block,
63 {
64 std::cout << "Creating CustomWilson: " << name << std::endl;
68
69 // this->max_order = max_order;
70 this->type = type;
71 }
72
99
110 QCDOrder order,
111 std::unordered_set<ParamId> sources,
112 std::function<scalar_t(const ParamSrc&)> compute,
113 LhaID lhaid
114 ) {
115 matching_info[order] = MatchingInfo(std::move(sources), std::move(compute), std::move(lhaid));
116 // if (order > max_order) max_order = order;
117 return *this;
118 }
119
123 CustomWilson& with_type(ContributionType t) { this->type = t; return *this; }
124
128 CustomWilson& with_storage_block(std::string block) { this->storage_block = std::move(block); return *this; }
129
135 std::shared_ptr<WilsonCoefficient> clone() const override {
136 return std::make_shared<CustomWilson>(*this);
137 }
138};
139
140#endif // CUSTOM_WILSON_H
QCDOrder
ContributionType
Domain objects representing Wilson coefficients and their matching metadata.
Concrete WilsonCoefficient whose matching rules are provided by the user.
CustomWilson & with_storage_block(std::string block)
Sets the storage block name (fluent API).
CustomWilson & set_order_info(QCDOrder order, std::unordered_set< ParamId > sources, std::function< scalar_t(const ParamSrc &)> compute, LhaID lhaid)
Defines sources and compute functor for a specific QCD order.
CustomWilson(const LhaID &name, const std::string &storage_block, ContributionType type=ContributionType::SM)
Constructs a custom Wilson coefficient.
CustomWilson & with_type(ContributionType t)
Sets the contribution type (fluent API).
std::shared_ptr< WilsonCoefficient > clone() const override
Polymorphic clone.
CustomWilson(WCoefId id, const std::string &storage_block, ContributionType type=ContributionType::SM)
Constructs a custom coefficient from a dynamic Wilson coefficient id.
static std::string str(const IdOf< WCoefTag > &id)
Returns the string representation of an identifier.
Lightweight view over a set of source parameters keyed by ParamId.
High-level mapper for WCoef <-> text <-> FLHA base indices.
Definition wcoef_ids.hpp:57
static LhaID flha_full(WCoef e, QCDOrder q, ContributionType c)
Abstract base class representing a Wilson coefficient and its matching information.
Definition Wilson.h:153
LhaID id(QCDOrder order, ContributionType typ) const
Returns the LHA id for a given order and contribution type.
Definition Wilson.cpp:97
std::string coeffName
Domain name of the coefficient (may include suffixes like _THDM/_SUSY).
Definition Wilson.h:311
std::map< QCDOrder, MatchingInfo > matching_info
Matching metadata indexed by QCD order.
Definition Wilson.h:330
ContributionType type
Contribution type for this coefficient (SM by default, inferred in constructors).
Definition Wilson.h:314
std::string storage_block
Block name where this coefficient is stored in the Parameters system.
Definition Wilson.h:320
Represents an identifier of a LHA element, possibly containing several sub-ids.
Definition LhaID.h:56
Matching metadata for a Wilson coefficient at a specific QCD order.
Definition Wilson.h:62