|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
ModelModifier that rewrites SM templates into a target model. More...
#include <GeneralModelModifier.h>


Public Member Functions | |
| GeneralModelModifier (std::string wilson, std::string model, std::string model_path, std::optional< int > model_template_index=std::nullopt) | |
| Constructs a modifier for a given (Wilson, model) pair and model header. | |
| GeneralModelModifier (std::string wilson, std::string output_model, std::string target_model, std::string model_path, std::optional< int > model_template_index, bool disable_non_sm_particles, bool bsm_split_generation=false, bool full_target_generation=false, bool tree_first_fallback=false) | |
| Constructs a modifier with a separate output label and target model. | |
| void | modifyLine (std::string &line) override |
| Modifies a single line of source code in place. | |
| void | addLine (std::ofstream &outputFile, const std::string ¤tLine) override |
| Writes a (possibly modified) line to the output file. | |
Public Member Functions inherited from ModelModifier | |
| virtual | ~ModelModifier ()=default |
| Virtual destructor for safe polymorphic use. | |
Static Public Member Functions | |
| static std::string | resolveModelInstantiation (const std::string &model, const std::string &model_path, std::optional< int > model_template_index=std::nullopt) |
| Resolve the C++ model instantiation used by generated MARTY code. | |
| static std::string | modelSignature (const std::string &model, const std::string &model_path, std::optional< int > model_template_index=std::nullopt) |
| Build the cache signature written in generated analytical files. | |
Additional Inherited Members | |
Protected Attributes inherited from ModelModifier | |
| std::string | wilson {} |
| Name of the Wilson operator basis used in the model. | |
ModelModifier that rewrites SM templates into a target model.
Responsibilities:
SM_Model sm; with the resolved target model class, optionally instantiated with a template index when the target class is templated._SM with the matching model name.#include lines for the model header and MARTY's main include.The model class resolver does not force the historical _Model suffix. Given mty_model_name=THDM, it first looks for class THDM, then case variants, and only then tries THDM_Model and its case variants.
For SM-like generation inside a BSM model, the modifier can keep the output suffix _SM while instantiating the target model class and inserting a MARTY filter that disables every particle not present in SM_Model.
Definition at line 46 of file GeneralModelModifier.h.
| GeneralModelModifier::GeneralModelModifier | ( | std::string | wilson, |
| std::string | model, | ||
| std::string | model_path, | ||
| std::optional< int > | model_template_index = std::nullopt |
||
| ) |
Constructs a modifier for a given (Wilson, model) pair and model header.
| wilson | Name of the Wilson basis (stored in the base class). |
| model | Model name (e.g. "THDM"). |
| model_path | Path to the corresponding model header file. |
| model_template_index | Optional template index used when the resolved model class is templated, e.g. THDM_Model<2>. |
Definition at line 51 of file GeneralModelModifier.cpp.
| GeneralModelModifier::GeneralModelModifier | ( | std::string | wilson, |
| std::string | output_model, | ||
| std::string | target_model, | ||
| std::string | model_path, | ||
| std::optional< int > | model_template_index, | ||
| bool | disable_non_sm_particles, | ||
| bool | bsm_split_generation = false, |
||
| bool | full_target_generation = false, |
||
| bool | tree_first_fallback = false |
||
| ) |
Constructs a modifier with a separate output label and target model.
| wilson | Name of the Wilson basis. |
| output_model | Model label used in generated libraries/files, e.g. SM. |
| target_model | Model class name to instantiate, e.g. THDM. |
| model_path | Path to the target model header. |
| model_template_index | Optional template index for target templated models. |
| disable_non_sm_particles | If true, insert a MARTY filter disabling all particles of the target model that are not present in SM_Model. |
Definition at line 67 of file GeneralModelModifier.cpp.
|
overridevirtual |
Writes a (possibly modified) line to the output file.
Default behavior simply writes currentLine followed by a newline. Derived classes can override this to inject additional lines before or after the current one, depending on addBefore.
| outputFile | Output stream to write to. |
| currentLine | Line to be written. |
Reimplemented from ModelModifier.
Definition at line 411 of file GeneralModelModifier.cpp.
|
static |
Build the cache signature written in generated analytical files.
Definition at line 120 of file GeneralModelModifier.cpp.
|
overridevirtual |
Modifies a single line of source code in place.
Implementations may, for example, replace occurrences of "SM" with another model name, or adjust class templates.
| line | The line of code to modify. |
Implements ModelModifier.
Definition at line 376 of file GeneralModelModifier.cpp.
|
static |
Resolve the C++ model instantiation used by generated MARTY code.
Examples: SM, SM_Model, THDM<2>, THDM_Model<2>.
Definition at line 100 of file GeneralModelModifier.cpp.