Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
LhaBlockPrototype.h
Go to the documentation of this file.
1#ifndef LHABLOCKPROTOTYPE_H
2#define LHABLOCKPROTOTYPE_H
3
4#include <string>
5#include <unordered_set>
6#include "BlockName.h"
7
12struct Prototype {
14 size_t itemCount {2};
15 size_t valueIdx {1};
16 int scaleIdx {-1};
17 int rgIdx {-1};
18 int binIdx {-1};
19 bool globalScale {false};
21 bool operator==(const Prototype& other) const {
22 return blockName == other.blockName &&
23 itemCount == other.itemCount &&
24 valueIdx == other.valueIdx &&
25 scaleIdx == other.scaleIdx &&
26 binIdx == other.binIdx &&
27 rgIdx == other.rgIdx &&
28 globalScale == other.globalScale;
29 }
30};
31
32namespace std {
33 template <>
34 struct hash<Prototype> {
35 std::size_t operator()(const Prototype& p) const noexcept {
36 std::size_t h1 = std::hash<BlockName>{}(p.blockName);
37 std::size_t h2 = std::hash<size_t>{}(p.itemCount);
38 std::size_t h3 = std::hash<size_t>{}(p.valueIdx);
39 std::size_t h4 = std::hash<int>{}(p.scaleIdx);
40 std::size_t h5 = std::hash<int>{}(p.rgIdx);
41 std::size_t h6 = std::hash<bool>{}(p.globalScale);
42
43 return h1 ^ (h2 << 1) ^ (h3 << 2) ^ (h4 << 3) ^ (h5 << 4) ^ (h6 << 5);
44 }
45 };
46}
47
48// SLHA Block prototypes
49const Prototype MODSEL = Prototype{"MODSEL"};
50const Prototype SMINPUTS = Prototype{"SMINPUTS"};
51const Prototype VCKMIN = Prototype{"VCKMIN"};
52const Prototype UPMNSIN = Prototype{"UPMNSIN"};
53const Prototype MINPAR = Prototype{"MINPAR"};
54// Common blocks emitted by 2HDMC spectrum files.
55const Prototype THDM = Prototype{"THDM"};
56const Prototype MGCKM = Prototype{"MGCKM", 3, 2};
57const Prototype MGUSER = Prototype{"MGUSER"};
58const Prototype EXTPAR = Prototype{"EXTPAR"};
59const Prototype MASS = Prototype{"MASS"};
60// Neutralino mixing matrices are also frequently written with a global Q=
61// scale. Keep the synthetic scale column so both scaled and unscaled SLHA
62// variants map their matrix indices to LhaID(i,j) consistently.
63const Prototype NMIX = Prototype{"NMIX", 4, 3, -1, -1, -1, true};
64const Prototype NMNMIX = Prototype{"NMNMIX", 4, 3, -1, -1, -1, true};
65const Prototype UMIX = Prototype{"UMIX", 3, 2};
66const Prototype VMIX = Prototype{"VMIX", 3, 2};
67// Spectrum generators commonly attach a global Q= scale to NMSSM Higgs
68// mixing matrices. The parser prepends that scale to every data row, hence
69// the four-column layout [Q, i, j, value]. Files without Q= are also
70// accepted: the parser stores -1 as the synthetic scale column.
71const Prototype NMAMIX = Prototype{"NMAMIX", 4, 3, -1, -1, -1, true};
72const Prototype NMHMIX = Prototype{"NMHMIX", 4, 3, -1, -1, -1, true};
73const Prototype NMSSMRUN = Prototype{"NMSSMRUN", 3, 2, -1, -1, -1, true};
74const Prototype STOPMIX = Prototype{"STOPMIX", 3, 2};
75const Prototype SBOTMIX = Prototype{"SBOTMIX", 3, 2};
76const Prototype STAUMIX = Prototype{"STAUMIX", 3, 2};
77const Prototype ALPHA = Prototype{"ALPHA", 1, 0};
78const Prototype HMIX = Prototype{"HMIX", 3, 2, -1, -1, -1, true};
79const Prototype GAUGE = Prototype{"GAUGE", 3, 2, -1, -1, -1, true};
80const Prototype MSOFT = Prototype{"MSOFT", 3, 2, -1, -1, -1, true};
81const Prototype AU = Prototype{"AU", 4, 3, -1, -1, -1, true};
82const Prototype AD = Prototype{"AD", 4, 3, -1, -1, -1, true};
83const Prototype AE = Prototype{"AE", 4, 3, -1, -1, -1, true};
84const Prototype YU = Prototype{{"YU", "UCOUPL"}, 4, 3, -1, -1, -1, true};
85const Prototype YD = Prototype{{"YD", "DCOUPL"}, 4, 3, -1, -1, -1, true};
86const Prototype YE = Prototype{{"YE", "LCOUPL", "YL"}, 4, 3, -1, -1, -1, true};
87
88const std::unordered_set<Prototype> LHA_BLOCKS = {MODSEL, SMINPUTS, VCKMIN, UPMNSIN, MASS, GAUGE};
89const std::unordered_set<Prototype> SLHA_BLOCKS = {MINPAR, EXTPAR, THDM, MGCKM, MGUSER, NMIX, NMNMIX, UMIX, VMIX, STOPMIX, SBOTMIX, STAUMIX, ALPHA, HMIX, MSOFT, AU, AD, AE, YU, YD, YE, NMHMIX, NMAMIX, NMSSMRUN}; // SPINFO/FCINFO contain free-form strings and are skipped by the parser.
90
91// FLHA Block prototypes
92const Prototype FCINFO = Prototype{"FCINFO"};
93const Prototype FMODSEL = Prototype{"FMODSEL"};
94const Prototype FMASS = Prototype{"FMASS", 4, 1, 2, 3};
95const Prototype FLIFE = Prototype{"FLIFE"};
96const Prototype FCONST = Prototype{"FCONST", 5, 2, 3, 4};
97const Prototype FCONSTRATIO = Prototype{"FCONSTRATIO", 7, 4, 5, 6};
98const Prototype FBAG = Prototype{"FBAG", 5, 2, 3, 4};
99// const Prototype FWCOEF = Prototype{"FWCOEF", 6, 5, -1, -1, true};
100// const Prototype IMFWCOEF = Prototype{"IMFWCOEF", 6, 5, -1, -1, true};
101const Prototype FWCOEF = Prototype{"FWCOEF", 7, 6, -1, -1, -1, true};
102const Prototype IMFWCOEF = Prototype{"IMFWCOEF", 7, 6, -1, -1, -1, true};
103const Prototype FOBS = Prototype{"FOBS", 11, 2, 3, -1, 4};
104const Prototype FOBSERR = Prototype{"FOBSERR", 11, 2, 3, -1, 4};
105const Prototype FOBSSM = Prototype{"FOBSSM", 11, 2, 3, -1, 4};
106const Prototype FDIPOLE = Prototype{"FDIPOLE", 4, 3};
107const Prototype FPARAM = Prototype{"FPARAM", 9, 2, 3};
108
110
111
112#endif // LHABLOCKPROTOTYPE_H
Representation of SLHA / LHA block names with support for aliases.
const Prototype FMASS
const Prototype MGCKM
const Prototype FCONST
const Prototype FLIFE
const Prototype MINPAR
const Prototype IMFWCOEF
const Prototype FWCOEF
const Prototype AU
const Prototype FDIPOLE
const Prototype MODSEL
const Prototype THDM
const Prototype GAUGE
const std::unordered_set< Prototype > SLHA_BLOCKS
const Prototype YD
const Prototype ALPHA
const Prototype NMHMIX
const Prototype STAUMIX
const Prototype SBOTMIX
const Prototype EXTPAR
const Prototype FOBSERR
const Prototype YU
const Prototype FCONSTRATIO
const Prototype FCINFO
const Prototype VCKMIN
const Prototype NMIX
const Prototype MGUSER
const Prototype AE
const Prototype SMINPUTS
const Prototype NMSSMRUN
const Prototype STOPMIX
const Prototype FMODSEL
const Prototype MSOFT
const Prototype VMIX
const Prototype UPMNSIN
const Prototype HMIX
const std::unordered_set< Prototype > FLHA_BLOCKS
const std::unordered_set< Prototype > LHA_BLOCKS
const Prototype MASS
const Prototype UMIX
const Prototype AD
const Prototype NMNMIX
const Prototype FBAG
const Prototype YE
const Prototype FOBS
const Prototype FPARAM
const Prototype FOBSSM
const Prototype NMAMIX
Block identifier with alias support.
Definition BlockName.h:59
Hash specialization for SymbolId<Tag>.
Definition BlockName.h:353
double h4(double x, double y)
Wilson special function h4 depending on x and y.
double h1(double x)
Wilson special function h1 depending on x.
double h3(double x)
Wilson special function h3 depending on x.
Represents the structure of an LHA block, specifying columns for values, scales, and renormalization ...
BlockName blockName
bool operator==(const Prototype &other) const
std::size_t operator()(const Prototype &p) const noexcept