Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
CP10.cpp
Go to the documentation of this file.
1#include <iostream>
2#include <string>
3
4// HYPERISO_MARTY_OPERATOR_NORM_ABI: ew-input-normalization-v1
5// HYPERISO_MARTY_TEMPLATE_ABI: semileptonic-cp10-tree-first-split-regprop-v20
6using namespace csl;
7using namespace mty;
8using namespace std;
9using namespace sm_input;
10
11namespace {
12
13enum class HyperisoMartyC9LinkerSelection {
14 NonPhotonVector,
15 PhotonOnly,
16 ScalarOnly,
17 VectorOnly
18};
19
20HyperisoMartyC9LinkerSelection hyperiso_marty_c9_linker_selection =
21 HyperisoMartyC9LinkerSelection::NonPhotonVector;
22
23void hyperiso_marty_set_c9_linker_selection(HyperisoMartyC9LinkerSelection selection) {
24 hyperiso_marty_c9_linker_selection = selection;
25}
26
27bool hyperiso_marty_tree_level_matching = false;
28
29void hyperiso_marty_set_semileptonic_order(mty::Order order) {
30 hyperiso_marty_tree_level_matching = (order == mty::Order::TreeLevel);
31}
32
33bool hyperiso_marty_is_photon_name(std::string const& name) {
34 return name == "A" || name == "A;\\gamma" || name.find("\\gamma") != std::string::npos;
35}
36
37bool hyperiso_marty_is_scalar_particle(const mty::Particle& particle) {
38 return particle->getSpinDimension() == 1;
39}
40
41bool hyperiso_marty_is_photon_linker_particle(const mty::Particle& particle) {
42 return hyperiso_marty_is_photon_name(std::string(particle->getName()));
43}
44
45bool hyperiso_marty_is_light_up_name(std::string const& name) {
46 // SuperIso's THDM C'_10 formula is the GIM-subtracted charged-Higgs top
47 // contribution, proportional to f20(m_t^2/M_H+^2). MARTY's raw THDM loop
48 // keeps u/c charged-Higgs diagrams before that EFT/GIM subtraction; after
49 // normalization by V_tb V_ts^* they generate the CKM-phase artefact seen in
50 // CP10. Veto only light up-type loop fermions.
51 return name == "u" || name == "c"
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;
56}
57
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()))) {
61 return true;
62 }
63 }
64 return false;
65}
66
67bool hyperiso_marty_is_forbidden_cp10_linker_particle(const mty::Particle& particle) {
68 // CP10 is different from C9/CP9: the finite charged-Higgs primed-C10
69 // term contains the non-photon penguin completion. In Feynman gauge MARTY
70 // can represent part of that completion through scalar / Goldstone linkers,
71 // so the CP10 non-photon branch must keep them. Only the raw photon linker
72 // is split out and evaluated with the dedicated reg_prop.
73 return hyperiso_marty_is_photon_linker_particle(particle);
74}
75
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);
79}
80
81bool hyperiso_marty_is_vector_non_photon_linker_particle(const mty::Particle& particle) {
82 // External fermions b/s/mu are also present when MARTY applies filters,
83 // so "not scalar" is not enough here. A vector linker must really be a
84 // spin-1 boson, and not the photon branch already split into *_A.
85 return !hyperiso_marty_is_photon_linker_particle(particle)
86 && particle->getSpinDimension() == 3;
87}
88
89template <typename Predicate>
90bool hyperiso_marty_has_linker_matching(mty::FeynmanDiagram const& diag, Predicate predicate) {
91 // In MARTY's 4-fermion construction the penguin linker X in b -> s X is
92 // often still External when filters are applied, and may appear as a
93 // Mediator only after connectAmplitudes(). Check both categories.
94 for (const auto& particle : diag.getParticles(mty::FeynmanDiagram::DiagramParticleType::External)) {
95 if (predicate(particle)) {
96 return true;
97 }
98 }
99 for (const auto& particle : diag.getParticles(mty::FeynmanDiagram::DiagramParticleType::Mediator)) {
100 if (predicate(particle)) {
101 return true;
102 }
103 }
104 return false;
105}
106
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);
110 });
111}
112
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);
116 });
117}
118
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);
122 });
123}
124
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);
128 });
129}
130
131bool hyperiso_marty_accept_c9_linker(mty::FeynmanDiagram const& diag) {
132 if (hyperiso_marty_tree_level_matching) {
133 return true;
134 }
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);
144 }
145 return !hyperiso_marty_has_forbidden_cp10_linker(diag);
146}
147
148// Backward-compatible aliases used by older generated C9/CP9 templates.
149bool hyperiso_marty_has_forbidden_c9_penguin_mediator(mty::FeynmanDiagram const& diag) {
150 return hyperiso_marty_has_forbidden_cp10_linker(diag);
151}
152
153bool hyperiso_marty_has_photon_mediator(mty::FeynmanDiagram const& diag) {
154 return hyperiso_marty_has_photon_linker(diag);
155}
156
157} // namespace
158
159void defineLibPath(Library &lib) {
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");
165#endif
166#ifdef MARTY_INCLUDE_PATH
167 lib.addIPath(MARTY_INCLUDE_PATH);
168#endif
169}
170
171int calculate_CP10mu(Model &model, gauge::Type gauge) {
172
173 model.getParticle("W")->setGaugeChoice(gauge);
174 model.getParticle("Z")->setGaugeChoice(gauge);
175
176 undefineNumericalValues(); // Allow for HIso to set all the parameters' values
177 mty::option::excludeExternalLegsCorrections = false;
178
179 Expr factorOperator = -4 * GetComplexConjugate(V_ts) * V_tb * G_F * pow_s(e_em / (4 * CSL_PI), 2) / csl::sqrt_s(2);
180 FeynOptions opts;
181 // CP10 uses the same split-reg_prop policy as C9/CP9 when generated in
182 // MARTY split mode:
183 // - NonPhotonVector -> CP10 / CP10_SM, evaluated with reg_prop = 1e-6.
184 // - PhotonOnly -> CP10_A / CP10_SM_A, evaluated with reg_prop = 1.
185 opts.addFilter([](mty::FeynmanDiagram const& diag) {
186 return hyperiso_marty_accept_c9_linker(diag);
187 });
188 opts.addFilter([](mty::FeynmanDiagram const& diag) {
189 return !hyperiso_marty_has_light_up_loop(diag);
190 });
191 opts.setFermionOrder({1, 0, 2, 3});
192 opts.setWilsonOperatorCoefficient(factorOperator);
193
194 auto wil = model.computeWilsonCoefficients(
195 mty::Order::OneLoop,
196 {Incoming("b"),
197 Outgoing("s"),
198 Outgoing("mu"),
199 Outgoing(AntiPart("mu"))},
200 opts
201 );
202
203
204 Expr CP10_mu = getWilsonCoefficient(
205 wil,
206 dimension6Operator(model, wil, DiracCoupling::VR, DiracCoupling::A)
207 );
208
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);
213 defineLibPath(wilsonLib);
214 wilsonLib.print();
215
216 return 0;
217}
218
219int main() {
220 SM_Model sm;
221 return calculate_CP10mu(sm, gauge::Type::Feynman);
222}
int calculate_CP10mu(Model &model, gauge::Type gauge)
Definition CP10.cpp:171
void defineLibPath(Library &lib)
Definition CP10.cpp:159
int main()
Definition CP10.cpp:219
Model
RealMatrix diag(const gsl_vector *X)
Builds a diagonal matrix from a GSL vector.
Definition Matrix.cpp:464
Standard Model of particle physics.
Definition sm.h:35
csl::Expr e_em
Definition sm.h:78
csl::Expr G_F
Definition sm.h:84
void undefineNumericalValues()
csl::Expr V_tb
Definition sm.h:244
csl::Expr V_ts
Definition sm.h:306
Definition sm.h:30
Hash specialization for SymbolId<Tag>.
Definition BlockName.h:353