9using namespace sm_input;
13enum class HyperisoMartyC9LinkerSelection {
18HyperisoMartyC9LinkerSelection hyperiso_marty_c9_linker_selection =
19 HyperisoMartyC9LinkerSelection::NonPhotonVector;
21void hyperiso_marty_set_c9_linker_selection(HyperisoMartyC9LinkerSelection selection) {
22 hyperiso_marty_c9_linker_selection = selection;
25bool hyperiso_marty_tree_level_matching =
false;
27void hyperiso_marty_set_semileptonic_order(mty::Order order) {
28 hyperiso_marty_tree_level_matching = (order == mty::Order::TreeLevel);
31bool hyperiso_marty_is_photon_name(std::string
const& name) {
32 return name ==
"A" ||
name ==
"A;\\gamma" ||
name.find(
"\\gamma") != std::string::npos;
35bool hyperiso_marty_is_scalar_particle(
const mty::Particle& particle) {
36 return particle->getSpinDimension() == 1;
39bool hyperiso_marty_is_photon_linker_particle(
const mty::Particle& particle) {
40 return hyperiso_marty_is_photon_name(std::string(particle->getName()));
43bool hyperiso_marty_is_forbidden_c9_linker_particle(
const mty::Particle& particle) {
49 if (hyperiso_marty_is_photon_linker_particle(particle)) {
58 if (hyperiso_marty_is_scalar_particle(particle)) {
65template <
typename Predicate>
66bool hyperiso_marty_has_linker_matching(mty::FeynmanDiagram
const&
diag, Predicate predicate) {
71 for (
const auto& particle :
diag.getParticles(
mty::FeynmanDiagram::DiagramParticleType::External)) {
72 if (predicate(particle)) {
76 for (
const auto& particle :
diag.getParticles(
mty::FeynmanDiagram::DiagramParticleType::Mediator)) {
77 if (predicate(particle)) {
84bool hyperiso_marty_has_photon_linker(mty::FeynmanDiagram
const&
diag) {
85 return hyperiso_marty_has_linker_matching(
diag, [](
const mty::Particle& particle) {
86 return hyperiso_marty_is_photon_linker_particle(particle);
90bool hyperiso_marty_has_forbidden_c9_linker(mty::FeynmanDiagram
const&
diag) {
91 return hyperiso_marty_has_linker_matching(
diag, [](
const mty::Particle& particle) {
92 return hyperiso_marty_is_forbidden_c9_linker_particle(particle);
96bool hyperiso_marty_accept_c9_linker(mty::FeynmanDiagram
const&
diag) {
101 if (hyperiso_marty_tree_level_matching) {
104 switch (hyperiso_marty_c9_linker_selection) {
105 case HyperisoMartyC9LinkerSelection::NonPhotonVector:
106 return !hyperiso_marty_has_forbidden_c9_linker(
diag);
107 case HyperisoMartyC9LinkerSelection::PhotonOnly:
108 return hyperiso_marty_has_photon_linker(
diag);
110 return !hyperiso_marty_has_forbidden_c9_linker(
diag);
116bool hyperiso_marty_has_forbidden_c9_penguin_mediator(mty::FeynmanDiagram
const&
diag) {
117 return hyperiso_marty_has_forbidden_c9_linker(
diag);
120bool hyperiso_marty_has_photon_mediator(mty::FeynmanDiagram
const&
diag) {
121 return hyperiso_marty_has_photon_linker(
diag);
127#ifdef MARTY_LIBRARY_PATH
128 lib.addLPath(MARTY_LIBRARY_PATH);
129 lib.addLPath(MARTY_LIBRARY_PATH
"/..");
130 lib.addLPath(MARTY_LIBRARY_PATH
"/marty");
131 lib.addLPath(MARTY_LIBRARY_PATH
"/marty/lha");
133#ifdef MARTY_INCLUDE_PATH
134 lib.addIPath(MARTY_INCLUDE_PATH);
140 model.getParticle(
"W")->setGaugeChoice(gauge);
141 model.getParticle(
"Z")->setGaugeChoice(gauge);
144 mty::option::excludeExternalLegsCorrections =
false;
146 Expr factorOperator = -4 * GetComplexConjugate(
V_ts) *
V_tb *
G_F * pow_s(
e_em / (4 * CSL_PI), 2) / csl::sqrt_s(2);
156 opts.addFilter([](mty::FeynmanDiagram
const&
diag) {
157 return hyperiso_marty_accept_c9_linker(
diag);
159 opts.setFermionOrder({1, 0, 2, 3});
160 opts.setWilsonOperatorCoefficient(factorOperator);
162 auto wil = model.computeWilsonCoefficients(
167 Outgoing(AntiPart(
"mu"))},
171 Expr C9_mu = getWilsonCoefficient(
173 dimension6Operator(model, wil, DiracCoupling::VL, DiracCoupling::V)
176 [[maybe_unused]]
int sysres = system(
"rm -rf libs/C9_SM");
177 mty::Library wilsonLib(
"C9_SM",
"libs");
178 wilsonLib.cleanExistingSources();
179 wilsonLib.addFunction(
"C9", C9_mu);
void defineLibPath(Library &lib)
int calculate_C9mu(Model &model, gauge::Type gauge)
RealMatrix diag(const gsl_vector *X)
Builds a diagonal matrix from a GSL vector.
Standard Model of particle physics.
Hash specialization for SymbolId<Tag>.