1 Introduction

Important constraints on physics beyond the Standard Model (SM) are provided by the anomalous magnetic moment of the muon \(a_\mu =(g-2)_\mu /2\). The SM prediction and the experimental determination [1] have both reached sub-ppm precision, and there is a tantalizing deviation of more than 3 standard deviations,

$$\begin{aligned} a_\mu ^{\mathrm{Exp-SM}}= {\left\{ \begin{array}{ll} (28.7 \pm 8.0 ) \times 10^{-10}\quad [2], \\ (26.1 \pm 8.0 ) \times 10^{-10}\quad [3], \end{array}\right. } \end{aligned}$$
(1)

using the indicated references for the hadronic vacuum polarization contributions.Footnote 1 Importantly, a fourfold improvement in precision is expected from the new experiments at Fermilab and J-PARC [2528], which promises to further strengthen the power of \(a_\mu \) to constrain and identify new physics [22, 29].

Fig. 1
figure 1

SUSY one-loop diagrams (left) and sample diagram of class 2L(a) with closed stop loop inserted into an SM-like one-loop diagram with Higgs and photon exchange (right). The external photon can couple to each charged particle

The minimal supersymmetric standard model (MSSM) is one of the best motivated and most studied extensions of the SM. It could also provide a promising explanation of the deviation (1), as reviewed in Refs. [3033]. Therefore, \(a_\mu \) has been employed extensively as a constraint on the MSSM parameter space. Recent studies, which also focus on the complementarity to and correlations with other observables, are discussed in Refs. [3453]. The importance and the predictivity of the MSSM have led to the development of many advanced computer codes. The set of available programs ranges from spectrum generators (SOFTSUSY [54], SPheno [55, 56], Suspect [57], IsaSusy [58], SUSEFLAV [59], SARAH/SPheno [6063], FlexibleSUSY [64]) to calculators for specific observables. Codes which include the computation of \(a_\mu \) in the MSSM are SuperISO [65], FeynHiggs [66], SusyFlavor [67], and CPSuperH [68]. The SUSY Les Houches accord version 1 [69] (SLHA) has been established as an efficient standard for passing information between programs.

Here we present GM2Calc, a C++ program that calculates \(a_\mu \) in the MSSM.Footnote 2 It can be run with SLHA input or with a GM2Calc-specific input file, and it computes \(a_\mu \) in the MSSM fast and precisely, taking into account the recently computed two-loop contributions. In particular, in contrast to the existing public codes, it contains the fermion/sfermion-two-loop corrections [70, 71], which include the universal correction \(\Delta \rho \) and potentially large non-decoupling logarithms of heavy squark or slepton masses. GM2Calc further provides resummation of n-loop \((\tan \beta )^n\) contributions [72, 73], which allows for arbitrarily high \(\tan \beta \) (\(\tan \beta \) being the ratio of the vacuum expectation values of the two Higgs doublets). It goes beyond Refs. [7073] in that it implements the \(\tan \beta \)-resummation also for the two-loop contributions.

The code uses routines from FlexibleSUSY [64], but it is a standalone code which does not require an installation of FlexibleSUSY or any of its prerequisites such as SARAH [6063].

In Sect. 2 we describe the different contributions to \(a_\mu \), provide an estimate for the theory uncertainty, and define the input parameters which are relevant for the computation. Afterwards, an explanation of how to use and customize GM2Calc is given in Sect. 3, together with a description of the different input and output formats. Section 4 includes several examples for practical applications of GM2Calc, which can easily be extended and adapted to perform sophisticated studies. We summarize our explanations and provide some final comments in Sect. 5. The appendix describes all implemented formulas and lists sample input files.

2 Implemented contributions and definition of input

The implementation of the SUSY contributions to \(a_\mu \), i. e. the difference between the full MSSM and the full SM prediction for \(a_\mu \), follows the decomposition introduced in Ref. [32]. There, the SUSY two-loop corrections are split into class 2L(a), which corresponds to corrections to SM-like one-loop diagrams, and class 2L(b), which corresponds to corrections to SUSY one-loop diagrams. The contributions of class 2L(b) are further subdivided. The implementation of GM2Calc can be written as

$$\begin{aligned} a_\mu ^{\text {SUSY}}= & {} \left[ a_\mu ^\mathrm{1L}+a_\mu ^\mathrm{2L(a)}+ a_\mu ^\mathrm{2L,\ photonic}+a_\mu ^{\mathrm{2L,} f\tilde{f}}\right] _{t_\beta \text {-resummed}}\nonumber \\&+\cdots \end{aligned}$$
(2)

The dots represent further two-loop contributions of class 2L(b) and higher-order contributions, which are not known and which have not been implemented into GM2Calc. In the following we briefly describe the individual contributions and their phenomenological impact, and we provide an estimate of the theory uncertainty. The implemented formulas can be found in the appendix. Afterwards we describe the definitions of the input parameters and their renormalization scheme.

Fig. 2
figure 2

Sample two-loop diagrams corresponding to SUSY one-loop diagrams with additional photon loop (left), or with fermion/sfermion-loop insertion (right). The external photon can couple to each charged particle

2.1 Individual contributions to \(a_\mu \)

  • One-loop corrections, \(a_\mu ^\mathrm{1L}\) (see Fig. 1(left)):

    The one-loop contributions arise from Feynman diagrams with the exchange of the SUSY partners of the muon or neutrino, smuon \(\tilde{\mu }\) or sneutrino \(\tilde{\nu }_\mu \), and the SUSY partners of the Higgs and gauge bosons, the neutralinos and charginos \(\chi ^{0,\pm }\). They have been computed in full generality in Ref. [74]; see also Refs. [3133] for reviews and discussions. These one-loop corrections depend essentially on the bino/wino masses \(M_{1/2}\), the Higgsino mass \(\mu \), the left- and right-smuon mass parameters, \(M_{L2}, M_{E2}\), and the ratio of the two Higgs vacuum expectation values, \(\tan \beta \). They have a weak dependence on the second generation A-parameter \(A^e_{2,2}\), and show a simple scaling behavior \(\propto \tan \beta /M_{\text {SUSY}}^2\), where \(M_{\text {SUSY}}\) is a generic SUSY mass scale. However, the detailed dependence on the five relevant mass parameters is intricate. It can be understood particularly well with the help of mass-insertion diagrams, and it is possible to obtain large contributions even in the presence of very heavy SUSY particles [33, 70, 74].

  • Two-loop corrections to SM-like one-loop diagrams, \(a_\mu ^\mathrm{2L(a)}\) (see Fig. 1(right)):

    These class 2L(a) contributions are interesting since they do not depend on smuon masses but instead on Higgs boson masses and on the squark and slepton masses of all generations. They can be large in certain regions of parameter space, but they show decoupling behavior and become small as the masses of SUSY particles or heavy Higgs bosons become large. The exact results are reported in Refs. [75, 76]; in GM2Calc we have implemented the good approximation in terms of photonic Barr–Zee diagrams [77, 78], where a pure SUSY loop (of either charginos, neutralinos, or sfermions) is inserted into an effective Higgs–\(\gamma \)\(\gamma \) interaction in an SM-like diagram.

  • MSSM photonic two-loop corrections, \(a_\mu ^\mathrm{2L,\ photonic}\) (see Fig. 2(left)):

    These corrections correspond to SUSY one-loop diagrams with an additional photon exchange; they have been evaluated in Ref. [79]. They include the large QED logarithm \(\log (M_{\text {SUSY}}/m_\mu )\) [80], which has a negative prefactor and typically leads to a \((-7\cdots {-9})~\%\) correction, and further terms which depend on the individual SUSY masses and which can be positive or negative.

  • MSSM fermion/sfermion-loop corrections, \(a_\mu ^{\mathrm{2L,} f\tilde{f}}\) (see Fig. 2(right)):

    The two-loop fermion/sfermion-loop contributions presented in Refs. [70, 71] introduce a dependence of \(a_\mu \) on squarks and sleptons of all generations, which is phenomenologically interesting. Most notably, if the squark masses (or slepton masses of the first or third generation) become large, the contributions to \(a_{\mu }\) do not decouple but are logarithmically enhanced. Depending on the mass pattern, Refs. [70, 71] have found positive or negative corrections of \(\mathcal{O}(10~\%)\) for squark masses in the few-TeV region. The fermion/sfermion-loop contributions further contain the universal quantity \(\Delta \rho \) and significantly reduce the theory uncertainty arising from the possibility of different parametrizations of the fine-structure constant \(\alpha \) in the one-loop contributions.

  • \(\tan \beta \) resummation:

    The subscript \(_{t_\beta \text {-resummed}}\) indicates that n-loop terms \(\propto \left( \tan \beta \right) ^n\) have been resummed to all orders. According to Refs. [72, 73], the resummation is carried out by evaluating the muon Yukawa coupling not at tree level, but in the form

    $$\begin{aligned} y_\mu&= \frac{m_{\mu }\,e}{\sqrt{2}\,s_W M_{W} \cos {\beta }\; (1 + \Delta _\mu )}, \end{aligned}$$
    (3)

    where e is the positron charge and \(s_W=\sqrt{1-M_W^2/M_Z^2}\), and where \(\Delta _\mu \) contains \(\tan \beta \)-enhanced loop contributions to the muon self energy. Analogous replacements are carried out also for the third-generation down-type Yukawa couplings, \(y_\tau \) and \(y_b\), which appear in the two-loop contributions. For values of \(\tan \beta \) up to 50, these higher-order effects can amount to corrections of up to \(10~\%\) [72]. Including these resummations also allows setting \(\tan \beta \) to an arbitrarily high value which can be used to approximate the limit \(\tan \beta \rightarrow \infty \). As studied in Ref. [73],Footnote 3 this limit has a distinctive phenomenology and allows for large SUSY contributions to \(a_\mu \) even if all SUSY masses are at or above the TeV scale.

Fig. 3
figure 3

Left Sample muon sneutrino self energy diagram with squark loop, which gives rise to corrections of order \(m_{\tilde{q}}^2\) between the sneutrino pole and \(\overline{\text {DR}}\) masses. Right Two-loop diagram for \(a_\mu ^{\text {SUSY}}\) with an insertion of the left diagram

2.2 Estimate of theory uncertainty

It is important to estimate the theory uncertainty due to missing contributions. Reference [32] has given estimates for the still unknown two-loop contributions at the time, as well as for the employed approximation for \(a_\mu ^\mathrm{2L(a)}\). Updating this estimate with the now known fermion/sfermion-loop and photonic two-loop corrections and the \(\tan \beta \)-resummation, we obtain

$$\begin{aligned} \delta a_\mu ^{\text {SUSY}}=2.3\times 10^{-10} + 0.3\, \left( |a_\mu ^{(\chi \gamma H)}|+|a_\mu ^{(\tilde{f}\gamma H)}|\right) . \end{aligned}$$
(4)

We give the following comments on this error estimate:

  • The error is significantly smaller than the uncertainty of Eq. (1), but it will become critical once data from the improved Fermilab or J-PARC \((g-2)\) measurements is available.

  • The error estimate is deliberately conservative; see Ref. [32]. To improve the precision reliably, however, the full two-loop computation of \(a_\mu ^\text {SUSY}\) will be necessary.

  • The error estimate has been derived for our case of the on-shell renormalization scheme (see below). The difference between the result of GM2Calc and evaluations/codes using e.g. the \(\overline{\text {DR}}\) scheme can be much larger than Eq. (4). Figure 3(left) shows an example Feynman diagram which leads to differences of order \(m_{\tilde{q}}^2\) between the muon sneutrino pole and \(\overline{\text {DR}}\) masses. The differences can be arbitrarily large for large squark masses \(m_{\tilde{q}}\). Figure 3(right) shows a corresponding two-loop contribution to \(a_\mu ^{\text {SUSY}}\) which is quadratically sensitive to \(m_{\tilde{q}}\) in the \(\overline{\text {DR}}\) scheme. In the on-shell scheme used here these diagrams are canceled by counterterms and thus the large contributions are avoided.

2.3 Input parameters and renormalization scheme

The program can be run with two different input formats:

  1. 1.

    SLHA input format: contains the pole masses of the SM and SUSY particles as well as running \(\overline{\text {DR}}\) parameters. For this choice detailed knowledge of the renormalization scheme is not required; the program does all renormalization scheme conversions internally and automatically. It should only be noted that the values of the gauge couplings are not taken from the SLHA file, but from a hardcoded value of the fine-structure constant \(\alpha \) (this value can be overridden as described in Sect. 3). Readers who are only interested in using SLHA input can skip the remaining section and continue reading in Sect. 3, where the usage is explained in detail.

  2. 2.

    GM2Calc-specific input format: specifies SM and MSSM parameters as defined in the mostly on-shell renormalization scheme of Refs. [70, 71, 79].

In the following we describe in more detail the internally used input parameters and how they are obtained from the input files. The internal implementation uses the renormalization scheme of Refs. [70, 71, 79], which corresponds to on-shell renormalization of the MSSM as far as possible, similarly to the schemes of Refs. [8388].

The following parameters appear in the implementation of the one-loop contributions \(a_\mu ^\mathrm{1L}\):

$$\begin{aligned}&\alpha (M_Z), M_{W,Z}, m_\mu ; \quad \tan \beta (Q);\nonumber \\&\quad M_1, M_2, \mu , M_{L2}, M_{E2}; \quad A^e_{2,2}(Q). \end{aligned}$$
(5)

Here \(M_{W,Z}\) and \(m_\mu \) denote the SM masses of W, Z, and muon, defined as pole masses in the on-shell scheme. The fine-structure constant is defined as \(\alpha (M_{Z}) = {\alpha (0)}/(1 - \Delta \alpha (M_{Z}))\) where \(\alpha (0)\) is the value in the Thomson limit and \(\Delta \alpha (M_Z)\) arises from quark and lepton contributions to the on-shell renormalized photon vacuum polarization. Note that this definition is different from the \(\overline{\text {MS}}\) or \(\overline{\text {DR}}\) definitions, which would be provided by the SLHA standard.

All these SM input parameters can be given explicitly, or they can be omitted from the input files. In the latter case, hardcoded values are used. For the pole masses, the hardcoded values are the current PDG values [89]; in the case of the fine-structure constant the hardcoded value \(\alpha (M_Z)=1/128.944\) based on Ref. [3] is used.

The ratio of the Higgs vacuum expectation values \(\tan \beta \) is defined in the \(\overline{\text {DR}}\) scheme [90] at the scale Q. The \(\overline{\text {DR}}\) scheme at scale Q is also chosen for the trilinear soft breaking parameter \(A^e_{2,2}\) entering in the smuon mixing matrix.

The remaining five one-loop parameters are SUSY mass parameters, defined in the on-shell scheme according to the following conditions: in the chargino sector the wino and Higgsino masses \(M_2\) and \(\mu \) are chosen such that the two tree-level chargino masses coincide with the corresponding pole masses. In the neutralino sector the bino mass \(M_1\) is defined by the requirement that the tree-level mass and the pole mass of the bino-like neutralino coincide. Similarly, the two smuon mass parameters \(M_{L2}\), \(M_{E2}\) are chosen such that the tree-level and pole masses of the muon sneutrino and the mostly right-handed smuon coincide.

In case of the GM2Calc input format these five SUSY mass parameters are provided directly in the on-shell renormalization scheme, and no internal conversion is carried out. In case of the SLHA input format, the relevant information is provided by the pole masses of the charginos, the bino-like neutralino, the muon sneutrino and the mostly right-handed smuon. From these pole masses the five SUSY mass parameters are determined by iteration, such that the on-shell conditions are satisfied.Footnote 4 The corresponding \(\overline{\text {DR}}\) values of the SUSY mass parameters provided by SLHA are ignored.

At the two-loop level, the full spectrum of the MSSM enters, and \(a_\mu ^{\text {SUSY}}\) depends on parameters of all sectors. Here we highlight the parameters

$$\begin{aligned} M_{Q3}, M_{U3},A^u_{3,3}; M_A \end{aligned}$$
(6)

which are of particular phenomenological interest. Generally \(M_{Qi}\), \(M_{Ui}\), \(M_{Di}\), \(A^u_{i,i}\) denote the left- and right-handed squark mass parameters and the up-type trilinear coupling of generation i. Particularly the stops and their masses and mixings enter via the contributions of Fig. 1(right) and of Fig. 2(right). The CP-odd Higgs-boson mass \(M_A\) and all other heavy Higgs-boson masses enter via the class 2L(a) contribution of Fig. 1(right).

The renormalization scheme for those two-loop parameters is left unspecified, and the parameters are read directly from the respective input files.

3 Code details and usage

3.1 Quick start guide

From the Hepforge page https://gm2calc.hepforge.org the source code of GM2Calc can be obtained:Footnote 5

figure a

To compile the program run GNU :

 

figure b

Apart from a C++ compiler, the following headers are required to compile GM2Calc: BOOST (available at https://www.boost.org) and Eigen (available at http://eigen.tuxfamily.org). Please refer to the file for customization of the used C++ compiler as well as the locations of the BOOST and Eigen header files.

GM2Calc can be run from the command line by providing a file containing the input parameters. Two different input formats are accepted as explained in Sect. 2.3: the first is the standard SLHA version 1 format [69]. Using default settings and the provided sample SLHA input file , GM2Calc can be run as

figure c

This input format is especially useful for cases where e. g. a spectrum generator writes an SLHA output file to , which can then be streamed into GM2Calc using the dash as special input-file name. For example, using the spectrum generator SOFTSUSY with executable from the SOFTSUSY directory with path , one can write

figure d

Here SOFTSUSY reads the SLHA input in form of a stream from one of its example input files (CMSSM parameter point 10.1.1 [91]). The output of SOFTSUSY is then piped into GM2Calc which calculates \(a_\mu \).

The second possible input format is the GM2Calc-specific one. The example input file in this format can be passed to the program as

figure e

In the following we first present the input formats and possible options in detail and then describe the output.

3.2 General options

While the first input option is an SLHA file, the GM2Calc-specific input file also has a structure which is similar to the SLHA standard. The input files are organized in the form of blocks which start with the identifier followed by the block name and an optional scale specification. The parameters are stored linewise inside the blocks. To distinguish the different parameters in a certain block, each line starts with one or more indices, followed by the corresponding parameter value.

Common to both input formats are the options for the output format, the precision of the \(a_\mu \) calculation, and the SM input parameters. The output format of GM2Calc as well as the precision of the calculation of \(a_\mu \) can be customized by adding a dedicated block to the input file. The block with the default settings has the form

figure f

The entry specifies the form of the program output.Footnote 6 The default value is for the case of SLHA input, but for the case of GM2Calc-specific input. The different output formats are illustrated in Sect. 3.5. In the loop order of the calculation can be selected (default: ). The \(\tan \beta \) resummation can be switched on/off by setting the flag to or , respectively (default: ). With the flag , the program can be forced to print an output, even if a physical problem has occurred (for example if tachyons occur in the spectrum) (default: ). Additional information as regards the internally performed calculational steps, for example the determination of on-shell parameters from pole masses, can be displayed by setting the flag to (default: ). By setting entry to (default: ), the theory uncertainty \(\delta a_\mu ^{\text {SUSY}}\) is computed using Eq. (4). If has been set to (minimal output), the calculated uncertainty is written to as a single number, instead of the value of \(a_\mu ^{\text {SUSY}}\). If has been set to , or (SLHA-compliant output formats), \(\delta a_\mu ^{\text {SUSY}}\) is written to .

To specify the SM input parameters the block must be given, as defined in Ref. [69]. In addition, the W pole mass can be given in . Using GM2Calc’s default values for the SM input parameters, the block reads

figure g

Other SM input parameters are not needed and therefore ignored if specified. In particular, the SM \(\overline{\text {MS}}\) value of the inverse fine-structure constant, \([\alpha _\text {em}^{\overline{\text {MS}}}(M_Z)]^{-1}\), usually given in , is ignored.

The default values of \(\alpha (M_Z)\) and \(\alpha (0)\) as defined in Sect. 2.3 can be overridden by providing new values in the block. With the default values this block reads

figure h

3.3 Usage with SLHA input format

GM2Calc can be run by providing the input parameters in SLHA-compliant format [69]. An example SLHA input file suitable for GM2Calc can be found in Appendix B (MSSM parameter point in the style of BM1 [70]). This file also contains information as regards the loop order at which the different entries become relevant. Some parameter values, marked as irrelevant, are only included for the sake of completeness and not required by GM2Calc.

The entries are as follows: the running MSSM \(\overline{\text {DR}}\) parameters must be given in the SLHA parameter blocks , , , and as defined in Ref. [69]. The required pole masses of SUSY particles must be provided in the block as defined again in Ref. [69]. In particular, the two smuon pole masses and the muon sneutrino pole mass must be given in , , and , respectively, as defined in SLHA version 1 [69]. Inter-generation sfermion mixing, as defined in SLHA version 2 [92], would lead to a re-assignment of the sfermion pole masses to the entries of the block, which is currently not supported. Additionally, the W pole mass can be given in , which overrides the value provided in .

We strongly recommend to provide the \(\overline{\text {DR}}\) values of \(\mu \), \(M_1\) and \(M_2\) in the SLHA input file. They will be treated as an initial guess for the corresponding on-shell values, which are determined iteratively from the two chargino and the bino-like neutralino pole masses as described in Sect. 2.3. If the \(\overline{\text {DR}}\) values of \(\mu \), \(M_1\), and \(M_2\) are omitted, they will be treated as being zero, which might result in a bad initial guess for the corresponding on-shell values.

3.4 Usage with GM2Calc-specific input format

As an alternative to the SLHA input format, GM2Calc can be run by directly providing the input parameters in the renormalization scheme presented in Sect. 2.3. Using this GM2Calc-specific input format, the MSSM parameters must be provided in a dedicated block, which is exemplified by the complete input file in Appendix C.

3.5 Output formats

The output format of the program can be selected by setting the variable . In case of SLHA input, is by default set to (SPheno output). Then the complete SLHA input is written to with the calculated value of \(a_\mu \) added to :

figure i
figure j

The dots abbreviate the SLHA input. If the block or the entry does not exist, they are created and appended to the output. If the entry already exists, it is overwritten by the value of \(a_\mu \) calculated by GM2Calc.

If is set to (NMSSMTools output), the behavior is almost the same, except for \(a_\mu \) not being written to but to .Footnote 7 Providing the SLHA input of the example given in Appendix B, the NMSSMTools output readsFootnote 8

figure k
figure l

The dots again abbreviate the SLHA input which is written to the output. By setting to the output is the same as above, except that the value of \(a_\mu \) is written to . This choice is useful if interference with SPheno and NMSSMTools must be avoided.

If is set to (minimal output), the program writes only the value of \(a_\mu \) to . For the SLHA input given in Appendix B the minimal output looks as follows:

figure m
figure n

If is set to (detailed output), GM2Calc writes detailed information as regards the different contributions to \(a_\mu \) to :

figure o
figure p

The detailed output format is used by default if the input is provided in the GM2Calc-specific format and has not been set.

4 Examples of how to use GM2Calc

In this section several practical applications of GM2Calc are shown with the help of a few examples.

Fig. 4
figure 4

The two graphics show \(a_\mu ^{\text {SUSY}}\) as a function of \(\tan \beta \) for the MSSM calculated according to Eq. (2). In the left plot, \(a_\mu ^{\text {SUSY}}\) is calculated for the parameter point 10.1.1 [91]. The right plot shows \(a_\mu ^{\text {SUSY}}\) together with the uncertainty Eq. (4) for benchmark point 1 from Ref. [73], where the on-shell parameters relevant at the one-loop level are \(\mu = -M_2 = 30 \,\text {TeV}\), \(M_1 = M_{L2} = M_{E2} = 1 \,\text {TeV}\), \(A^e_{2,2}(Q) = 0\), and the parameters relevant at the two-loop level are set to \(M_3 = M_A = M_{Q1,Q2} = M_{U1,U2} = M_{D1,D2} = M_{L1} = M_{E1} = 1 \,\text {TeV}\), \(M_{Q3} = M_{U3} = M_{D3} = M_{L3} = M_{E3} = 3 \,\text {TeV}\), \(A^f_{ij} = 0\), and \(Q=866.36\,\text {GeV}\). Due to the \(\tan \beta \) resummation, \(a_\mu ^{\text {SUSY}}\) approaches the finite maximum value \(a_\mu ^{\text {SUSY}} = 26.8\cdot 10^{-10}\) in the limit \(\tan \beta \rightarrow \infty \). This finite limit of \(a_\mu ^{\text {SUSY}}\) decomposes into the individual one- and two-loop contributions \([a_\mu ^\mathrm{1L}]_{t_\beta \text {-resummed}} = 28.1 \cdot 10^{-10}\), \([a_\mu ^\mathrm{2L,\ photonic}]_{t_\beta \text {-resummed}} = -2.3 \cdot 10^{-10}\), \([a_\mu ^{\mathrm{2L,} f\tilde{f}}]_{t_\beta \text {-resummed}} = 0.9 \cdot 10^{-10}\), \([a_\mu ^\mathrm{2L(a)}]_{t_\beta \text {-resummed}} < 10^{-13}\)

4.1 Using input from spectrum generator, piping output to external programs

If a spectrum generator writes an SLHA output to , this output can be streamed into GM2Calc using the dash as special input-file name. As mentioned in Sect. 3.1, when using the spectrum generator SOFTSUSY one can write

figure q
figure r

Here is the SOFTSUSY executable which reads the SLHA input in form of a stream from one of SOFTSUSY’s default input files (CMSSM parameter point 10.1.1 [91]). The output of SOFTSUSY is then piped into GM2Calc which calculates \(a_\mu \) and writes the result to .

In the example given above the default settings of GM2Calc are used, since the output of SOFTSUSY does not contain any GM2Calc-specific blocks such as or . If an additional input block like shall be passed to GM2Calc, a simple and self-contained way is to modify the command to

figure s

 

figure t

By providing extra input blocks and writing loops at the command line, one can easily perform parameter scans at the command line without the need for creating temporary files. The output of a scan can directly be piped to a program for visualization, e.g. gnuplot. For instance, the following script first defines four auxiliary functions, each of which can easily be extended for further use. The script then calls the functions in a loop over \(\tan \beta \) and produces a plot similar to Fig. 4(left). It is easy to modify the script for more sophisticated scans like the one shown in Fig. 4(right).

figure u

4.2 C++ interface

GM2Calc provides a C++ interface which allows users to embed the calculation of \(a_\mu \) into an existing code or create a custom C++ program that calculates \(a_\mu \). The following source-code listing shows an example of a C++ program which calculates \(a_\mu \) up to the two-loop level including \(\tan \beta \) resummation using the GM2Calc-specific input format.

figure v

The object contains the model parameters. The function initializes this object by first defining input parameters in the GM2Calc-specific input format and then calculating the tree-level mass spectrum with the provided function . Afterwards, the function uses the initialized object to calculate \(a_\mu \).

The listed source code can be compiled using a C++ compiler and linking the static library as follows:

figure w

Afterwards, the created executable can be run via

 

figure x

which will produce the output:

 

figure y

It is also possible to use the SLHA input format at the C++ level, which is exemplified by the following source-code listing. Like in the previous example, there is a object and a function. But now, the function fills the pole masses of the relevant SUSY particles and \(\overline{\text {DR}}\) Lagrangian parameters into the object. Afterwards, the provided function is called, which determines the on-shell parameters \(\mu \), \(M_1\), \(M_2\), \(M_{E2}\), and \(M_{L2}\) from the corresponding pole masses as described in Sect. 2.3. Internally, this function finally calculates the tree-level mass spectrum using these on-shell parameters. In the function, this tree-level mass spectrum is used to calculate \(a_\mu \) up to the two-loop level, including \(\tan \beta \) resummation, and the result is printed to .

figure z

This program will produce the output:

 

figure aa

5 Summary and final comments

We have presented GM2Calc, a C++ program to calculate the anomalous magnetic moment of the muon \(a_\mu \) in the MSSM. It includes one-loop and Barr–Zee-like two-loop contributions as well as more recently computed two-loop photonic and fermion/sfermion-loop corrections. By default, \(\tan \beta \) resummation is performed, allowing for arbitrarily high values of \(\tan \beta \). The program input can be provided in either an SLHA (version 1) compliant or a GM2Calc-specific format. Internally, GM2Calc uses a physical, on-shell renormalization scheme to minimize two-loop contributions and theory uncertainties.

We have given simple usage examples where GM2Calc is run on its own or using the SLHA output of a spectrum generator, and we have illustrated how the output of GM2Calc can be passed to external programs like gnuplot. We have also discussed sample C++ programs which use the GM2Calc libraries and routines. All examples and their explanations can also be found on the web site https://gm2calc.hepforge.org. This web site further provides an online calculator, which allows users to type in parameters and compute \(a_\mu ^{\text {SUSY}}\) interactively without downloading the code.

The program has been thoroughly validated against the original routines of Refs. [32, 7073, 75, 76, 79]. The estimate of the theory uncertainty given in Sect. 2.2 follows the analysis of Ref. [32] of the missing contributions and is specific to the computation in the chosen renormalization scheme. When comparing GM2Calc to other codes/evaluations, differences can arise for several reasons. Particularly, GM2Calc differs from evaluations which use the \(\overline{\text {DR}}\) scheme to define the masses entering the one-loop contributions. In the latter case \(a_\mu ^\mathrm{1L}\) depends on the \(\overline{\text {DR}}\) scale and there are potentially very large two-loop corrections discussed in Sect. 2.1. Clearly, a more trivial reason for numerical differences is a different choice of the implemented two-loop contributions. To our knowledge the photonic, the fermion/sfermion-loop and the \(\tan \beta \)-resummation corrections are implemented in this form for the first time. Each of them can amount to \(\mathcal{O}(10~\%)\) corrections or more in parts of the parameter space.