Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
MartyWilson.h
Go to the documentation of this file.
1#ifndef MARTY_WILSON_H
2#define MARTY_WILSON_H
3
4#include <complex>
5#include <iostream>
6#include <math.h>
7
8#include "Wilson.h"
9#include "DataFrame.h"
10#include "CSVReader.h"
11#include "InterpretedParam.h" //Only for template argument !!
12#include "IMartyWilsonProxy.h"
14#include "Utils.h"
15
67 std::string model_name{"SM"};
68
71 std::string generation_model_name{"SM"};
72
75 bool sm_like_filter{false};
76
81
87
90
92 std::string storage_block;
93
95 fs::path model_path{};
96
98 std::shared_ptr<IMartyWilsonProxy<InterpretedParam>> marty_proxy;
99
101 std::shared_ptr<IMartyWilsonPathProxy> path_provider;
102
104 std::string csv_path;
105
112 static fs::path fallback_csv_path(const std::string& model_name) {
113 return fs::temp_directory_path() / "pyhyperiso" / "MartyTemp" / (model_name + "_wilson.csv");
114 }
115
120 if (path_provider) {
121 csv_path = path_provider->wilson_csv_path(model_name).string();
122 } else {
124 }
125 }
126
137 const std::string& storage_block_name,
138 fs::path model_path,
139 std::shared_ptr<IMartyWilsonProxy<InterpretedParam>> proxy,
140 std::shared_ptr<IMartyWilsonPathProxy> paths = nullptr)
141 : coeff_id(id),
142 storage_block(storage_block_name),
144 marty_proxy(proxy),
145 path_provider(paths) {
147 }
148
162 MartyWilsonConfig(const std::string& model_name,
163 const LhaID& id,
164 const std::string& storage_block_name,
165 fs::path model_path,
166 std::shared_ptr<IMartyWilsonProxy<InterpretedParam>> proxy,
167 std::shared_ptr<IMartyWilsonPathProxy> paths = nullptr)
170 coeff_id(id),
171 storage_block(storage_block_name),
173 marty_proxy(proxy),
174 path_provider(paths) {
176 }
177
183 MartyWilsonConfig(const std::string& output_model_name,
184 const std::string& generation_model_name,
185 bool sm_like_filter,
188 const LhaID& id,
189 const std::string& storage_block_name,
190 fs::path model_path,
191 std::shared_ptr<IMartyWilsonProxy<InterpretedParam>> proxy,
192 std::shared_ptr<IMartyWilsonPathProxy> paths = nullptr)
193 : model_name(output_model_name),
198 coeff_id(id),
199 storage_block(storage_block_name),
201 marty_proxy(proxy),
202 path_provider(paths) {
204 }
205};
206
223public:
237
241 std::string get_model() {
242 return this->model;
243 }
244
248 void set_model(std::string model) {
249 this->model = model;
250 }
251
257 std::shared_ptr<WilsonCoefficient> clone() const override {
258 return std::make_shared<MartyWilson>(*this);
259 }
260
261private:
263 std::string model{"SM"};
264
265};
266
267#endif // MARTY_WILSON_H
Helper for loading CSV files into a DataFrame.
Minimal tabular container with column-wise storage and CSV I/O.
Port used by the Wilson layer to access MARTY-generated output paths.
Interface for MARTY-based Wilson coefficient calculations.
Lightweight key describing an interpreted LHA/SLHA parameter.
Domain objects representing Wilson coefficients and their matching metadata.
Abstract proxy for Wilson coefficient calculations via MARTY.
WilsonCoefficient whose matching value is computed through MARTY.
std::shared_ptr< WilsonCoefficient > clone() const override
Polymorphic clone.
void set_model(std::string model)
Sets the MARTY model name used by this coefficient.
std::string get_model()
Returns the MARTY model name used by this coefficient.
Abstract base class representing a Wilson coefficient and its matching information.
Definition Wilson.h:153
Represents an identifier of a LHA element, possibly containing several sub-ids.
Definition LhaID.h:56
Configuration bundle for constructing a MartyWilson coefficient.
Definition MartyWilson.h:65
void refresh_csv_path()
Resolves and stores the CSV path using the path provider when available.
std::string model_name
Output model label used for generated libraries/CSV files (e.g. "SM", "THDM").
Definition MartyWilson.h:67
LhaID coeff_id
Full coefficient id used to store the matching value (including order/type parts).
Definition MartyWilson.h:89
static fs::path fallback_csv_path(const std::string &model_name)
Fallback path used only when legacy code constructs MartyWilsonConfig without a path provider.
std::string storage_block
Name of the block where matching coefficients are stored (e.g. "WC_B_MATCH").
Definition MartyWilson.h:92
bool full_target_generation
Definition MartyWilson.h:86
fs::path model_path
Path to the MARTY model header file.
Definition MartyWilson.h:95
std::string csv_path
Absolute path to the CSV output produced by MARTY for this model.
std::shared_ptr< IMartyWilsonProxy< InterpretedParam > > marty_proxy
Proxy used to run MARTY and retrieve dependencies/special blocks.
Definition MartyWilson.h:98
std::string generation_model_name
Definition MartyWilson.h:71
MartyWilsonConfig(const std::string &output_model_name, const std::string &generation_model_name, bool sm_like_filter, bool bsm_split_generation, bool full_target_generation, const LhaID &id, const std::string &storage_block_name, fs::path model_path, std::shared_ptr< IMartyWilsonProxy< InterpretedParam > > proxy, std::shared_ptr< IMartyWilsonPathProxy > paths=nullptr)
Constructs config with a separate output label and generated model.
MartyWilsonConfig(const LhaID &id, const std::string &storage_block_name, fs::path model_path, std::shared_ptr< IMartyWilsonProxy< InterpretedParam > > proxy, std::shared_ptr< IMartyWilsonPathProxy > paths=nullptr)
Constructs config for a coefficient with a provided model path and proxy.
MartyWilsonConfig(const std::string &model_name, const LhaID &id, const std::string &storage_block_name, fs::path model_path, std::shared_ptr< IMartyWilsonProxy< InterpretedParam > > proxy, std::shared_ptr< IMartyWilsonPathProxy > paths=nullptr)
Constructs config including an explicit model name.
std::shared_ptr< IMartyWilsonPathProxy > path_provider
Path provider used to resolve MARTY generated outputs.