9using namespace sm_input;
13enum class HyperisoMartyC9LinkerSelection {
20HyperisoMartyC9LinkerSelection hyperiso_marty_c9_linker_selection =
21 HyperisoMartyC9LinkerSelection::NonPhotonVector;
23void hyperiso_marty_set_c9_linker_selection(HyperisoMartyC9LinkerSelection selection) {
24 hyperiso_marty_c9_linker_selection = selection;
27bool hyperiso_marty_tree_level_matching =
false;
29void hyperiso_marty_set_semileptonic_order(mty::Order order) {
30 hyperiso_marty_tree_level_matching = (order == mty::Order::TreeLevel);
33bool hyperiso_marty_is_photon_name(std::string
const& name) {
34 return name ==
"A" ||
name ==
"A;\\gamma" ||
name.find(
"\\gamma") != std::string::npos;
37bool hyperiso_marty_is_scalar_particle(
const mty::Particle& particle) {
38 return particle->getSpinDimension() == 1;
41bool hyperiso_marty_is_photon_linker_particle(
const mty::Particle& particle) {
42 return hyperiso_marty_is_photon_name(std::string(particle->getName()));
45bool hyperiso_marty_is_light_up_name(std::string
const& name) {
52 ||
name.find(
"u_L") != std::string::npos
53 ||
name.find(
"u_R") != std::string::npos
54 ||
name.find(
"c_L") != std::string::npos
55 ||
name.find(
"c_R") != std::string::npos;
58bool hyperiso_marty_has_light_up_loop(mty::FeynmanDiagram
const&
diag) {
59 for (
const auto& particle :
diag.getParticles(
mty::FeynmanDiagram::DiagramParticleType::Loop)) {
60 if (hyperiso_marty_is_light_up_name(std::string(particle->getName()))) {
67bool hyperiso_marty_is_forbidden_cp10_linker_particle(
const mty::Particle& particle) {
73 return hyperiso_marty_is_photon_linker_particle(particle);
76bool hyperiso_marty_is_scalar_linker_particle(
const mty::Particle& particle) {
77 return !hyperiso_marty_is_photon_linker_particle(particle)
78 && hyperiso_marty_is_scalar_particle(particle);
81bool hyperiso_marty_is_vector_non_photon_linker_particle(
const mty::Particle& particle) {
85 return !hyperiso_marty_is_photon_linker_particle(particle)
86 && particle->getSpinDimension() == 3;
89template <
typename Predicate>
90bool hyperiso_marty_has_linker_matching(mty::FeynmanDiagram
const&
diag, Predicate predicate) {
94 for (
const auto& particle :
diag.getParticles(
mty::FeynmanDiagram::DiagramParticleType::External)) {
95 if (predicate(particle)) {
99 for (
const auto& particle :
diag.getParticles(
mty::FeynmanDiagram::DiagramParticleType::Mediator)) {
100 if (predicate(particle)) {
107bool hyperiso_marty_has_photon_linker(mty::FeynmanDiagram
const&
diag) {
108 return hyperiso_marty_has_linker_matching(
diag, [](
const mty::Particle& particle) {
109 return hyperiso_marty_is_photon_linker_particle(particle);
113bool hyperiso_marty_has_forbidden_cp10_linker(mty::FeynmanDiagram
const&
diag) {
114 return hyperiso_marty_has_linker_matching(
diag, [](
const mty::Particle& particle) {
115 return hyperiso_marty_is_forbidden_cp10_linker_particle(particle);
119bool hyperiso_marty_has_scalar_linker(mty::FeynmanDiagram
const&
diag) {
120 return hyperiso_marty_has_linker_matching(
diag, [](
const mty::Particle& particle) {
121 return hyperiso_marty_is_scalar_linker_particle(particle);
125bool hyperiso_marty_has_vector_non_photon_linker(mty::FeynmanDiagram
const&
diag) {
126 return hyperiso_marty_has_linker_matching(
diag, [](
const mty::Particle& particle) {
127 return hyperiso_marty_is_vector_non_photon_linker_particle(particle);
131bool hyperiso_marty_accept_c9_linker(mty::FeynmanDiagram
const&
diag) {
132 if (hyperiso_marty_tree_level_matching) {
135 switch (hyperiso_marty_c9_linker_selection) {
136 case HyperisoMartyC9LinkerSelection::NonPhotonVector:
137 return !hyperiso_marty_has_forbidden_cp10_linker(
diag);
138 case HyperisoMartyC9LinkerSelection::PhotonOnly:
139 return hyperiso_marty_has_photon_linker(
diag);
140 case HyperisoMartyC9LinkerSelection::ScalarOnly:
141 return hyperiso_marty_has_scalar_linker(
diag);
142 case HyperisoMartyC9LinkerSelection::VectorOnly:
143 return hyperiso_marty_has_vector_non_photon_linker(
diag);
145 return !hyperiso_marty_has_forbidden_cp10_linker(
diag);
149bool hyperiso_marty_has_forbidden_c9_penguin_mediator(mty::FeynmanDiagram
const&
diag) {
150 return hyperiso_marty_has_forbidden_cp10_linker(
diag);
153bool hyperiso_marty_has_photon_mediator(mty::FeynmanDiagram
const&
diag) {
154 return hyperiso_marty_has_photon_linker(
diag);
160#ifdef MARTY_LIBRARY_PATH
161 lib.addLPath(MARTY_LIBRARY_PATH);
162 lib.addLPath(MARTY_LIBRARY_PATH
"/..");
163 lib.addLPath(MARTY_LIBRARY_PATH
"/marty");
164 lib.addLPath(MARTY_LIBRARY_PATH
"/marty/lha");
166#ifdef MARTY_INCLUDE_PATH
167 lib.addIPath(MARTY_INCLUDE_PATH);
173 model.getParticle(
"W")->setGaugeChoice(gauge);
174 model.getParticle(
"Z")->setGaugeChoice(gauge);
177 mty::option::excludeExternalLegsCorrections =
false;
179 Expr factorOperator = -4 * GetComplexConjugate(
V_ts) *
V_tb *
G_F * pow_s(
e_em / (4 * CSL_PI), 2) / csl::sqrt_s(2);
185 opts.addFilter([](mty::FeynmanDiagram
const&
diag) {
186 return hyperiso_marty_accept_c9_linker(
diag);
188 opts.addFilter([](mty::FeynmanDiagram
const&
diag) {
189 return !hyperiso_marty_has_light_up_loop(
diag);
191 opts.setFermionOrder({1, 0, 2, 3});
192 opts.setWilsonOperatorCoefficient(factorOperator);
194 auto wil = model.computeWilsonCoefficients(
199 Outgoing(AntiPart(
"mu"))},
204 Expr CP10_mu = getWilsonCoefficient(
206 dimension6Operator(model, wil, DiracCoupling::VR, DiracCoupling::A)
209 [[maybe_unused]]
int sysres = system(
"rm -rf libs/CP10_SM");
210 mty::Library wilsonLib(
"CP10_SM",
"libs");
211 wilsonLib.cleanExistingSources();
212 wilsonLib.addFunction(
"CP10", CP10_mu);
int calculate_CP10mu(Model &model, gauge::Type gauge)
void defineLibPath(Library &lib)
RealMatrix diag(const gsl_vector *X)
Builds a diagonal matrix from a GSL vector.
Standard Model of particle physics.
Hash specialization for SymbolId<Tag>.