s0 = 652.
 
s1s0 = 3.97
 
s2s0 = 22.436666386143425
 
s3s0 = 475.5384558899199
 
f1ss0 = -2.5478411502507825
 
f2ss0 = 12.369442103283282
 
f3ss0 = 5.763755414295187
 
M0 = 2.5186175731138336
 
LLamb = 0.09863667668323592
 
L2 = 0.009729193987113216
 
Q2max = 0.11018235779546577
 
be0 = 25/12
 
c1 = 77/50
 
ce1 = 77/50
 
c2 = 6.368014229258296
 
c3 = 50.80245628155433
 
c4 = 74.21281104651922
 
c5 = 486.59102905996406
 
c2MS = 21943/7200
 
c3MS = 15.065962199999998
 
bt[x_] := beta[x]
 
beta[x_] := (-be0)*x^2*((1 + (a0*ce1)*x + (a1*ce1^2)*x^2)/
       (1 + (a0 - 1)*ce1*x + (a1*ce1^2)*x^2)/(1 - (a1*ce1^2)*x^2))
 
a0 = 4.729591566524808
 
a1 = 6.414704667072242
 
betaMS4l[x_] := (-be0)*x^2*(1 + ce1*x + ce2MS*x^2 + ce3MS*x^3)
 
ce2MS = 21943/7200
 
ce3MS = 15.065962199999998
 
nf = 4
 
mu2in = 6.4516
 
alphaMSMZ = 0.1185
 
ainMS = 0.0872462976811943
 
ain = 0.09094732180685569
 
apert[(Q2_)?NumberQ, (fi_)?NumberQ] := a[Q2/L2, fi]
 
a[u_, fi_] := If[fi >= 0, (2/ce1)*
      (1/(-(sqom2 + 1 + ProductLog[-1, zup[u, fi]]) + sqrtfipos[u, fi])), 
     (2/ce1)*(1/(-(sqom2 + 1 + ProductLog[1, zdo[u, fi]]) + 
        sqrtfineg[u, fi]))]
 
sqom2 = 3.7295915665248076
 
zup[u_, fi_] := ((1/ce1/E)*Exp[I*(Pi - (be0/ce1)*fi)])/u^(be0/ce1)
 
sqrtfipos[u_, fi_] := If[Arg[det[u, fi]] >= 0, Sqrt[Abs[det[u, fi]]]*
      Exp[I*(1/2)*Arg[det[u, fi]]], Sqrt[Abs[det[u, fi]]]*
      Exp[I*(1/2)*(Arg[det[u, fi]] + 2*Pi)]]
 
det[u_, fi_] := If[fi >= 0, (sqom2 + 1 + ProductLog[-1, zup[u, fi]])^2 - 
      4*(om1 + sqom2), (sqom2 + 1 + ProductLog[1, zdo[u, fi]])^2 - 
      4*(om1 + sqom2)]
 
om1 = 2.6851131005474347
 
zdo[u_, fi_] := ((1/ce1/E)*Exp[I*(-Pi - (be0/ce1)*fi)])/u^(be0/ce1)
 
sqrtfineg[u_, fi_] := If[Arg[det[u, fi]] <= 0, Sqrt[Abs[det[u, fi]]]*
      Exp[I*(1/2)*Arg[det[u, fi]]], Sqrt[Abs[det[u, fi]]]*
      Exp[I*(1/2)*(Arg[det[u, fi]] - 2*Pi)]]
 
A1[(Q2_)?NumberQ, (fi_)?NumberQ] := A1an[Q2/L2, fi]
 
A1an[(u_)?NumberQ, (fi_)?NumberQ] := 
    (1/Pi)*NIntegrate[tr1[Exp[w]]/(1 + u*Exp[I*fi]*Exp[-w]), {w, lns0, lnsm}, 
       MaxRecursion -> 20] + f1ss0/(u*Exp[I*fi] + s1s0) + 
     f2ss0/(u*Exp[I*fi] + s2s0) + f3ss0/(u*Exp[I*fi] + s3s0) + J0 - 
     u*Exp[I*fi]*J1 + u^2*Exp[I*2*fi]*J2
 
tr1[s_] := If[s > 0, Im[a[s, -Pi]], Im[a[-s, -10.^(-8)]]]
 
lns0 = 6.480044561926653
 
lnsm = 92.10340371976183
 
J0 = 0.00514649964605132
 
J1 = 5.4437085694221036*^-45
 
J2 = 2.7506012053844554*^-85
 
tA2[(Q2_)?NumberQ, (fi_)?NumberQ] := tA2an[Q2/L2, fi]
 
tA2an[(u_)?NumberQ, (fi_)?NumberQ] := (1/be0/Pi)*(u*Exp[I*fi])*
     (NIntegrate[Exp[-w]*(tr1[Exp[w]]/(1 + u*Exp[I*fi]*Exp[-w])^2), 
       {w, lns0, lnsm}, MaxRecursion -> 20] + 
      (f1ss0*Pi)/(u*Exp[I*fi] + s1s0)^2 + (f2ss0*Pi)/(u*Exp[I*fi] + s2s0)^2 + 
      (f3ss0*Pi)/(u*Exp[I*fi] + s3s0)^2 + J1 - 2*u*Exp[I*fi]*J2 + 
      3*u^2*Exp[I*2*fi]*J3)
 
J3 = 1.840257137546855*^-125
 
tA3[(Q2_)?NumberQ, (fi_)?NumberQ] := tA3an[Q2/L2, fi]
 
tA3an[(u_)?NumberQ, (fi_)?NumberQ] := (1/2/be0^2/Pi)*(u*Exp[I*fi])*
     (NIntegrate[Exp[-w]*(tr1[Exp[w]]/(1 + u*Exp[I*fi]*Exp[-w])^2), 
       {w, lns0, lnsm}, MaxRecursion -> 20] - 
      2*NIntegrate[Exp[-w]*(tr1[Exp[w]]/(1 + u*Exp[I*fi]*Exp[-w])^3), 
        {w, lns0, lnsm}, MaxRecursion -> 20] + 
      (f1ss0*Pi)*((-s1s0 + u*Exp[I*fi])/(s1s0 + u*Exp[I*fi])^3) + 
      (f2ss0*Pi)*((-s2s0 + u*Exp[I*fi])/(s2s0 + u*Exp[I*fi])^3) + 
      (f3ss0*Pi)*((-s3s0 + u*Exp[I*fi])/(s3s0 + u*Exp[I*fi])^3))
 
tA4[(Q2_)?NumberQ, (fi_)?NumberQ] := tA4an[Q2/L2, fi]
 
tA4an[(u_)?NumberQ, (fi_)?NumberQ] := (1/6/be0^3/Pi)*(u*Exp[I*fi])*
     (NIntegrate[Exp[-w]*(1 - 4*Exp[-w]*u*Exp[I*fi] + Exp[-2*w]*u^2*
          Exp[2*I*fi])*(tr1[Exp[w]]/(1 + u*Exp[I*fi]*Exp[-w])^4), 
       {w, lns0, lnsm}, MaxRecursion -> 20] + 
      (f1ss0*Pi)*((s1s0^2 - 4*s1s0*u*Exp[I*fi] + u^2*Exp[2*I*fi])/
        (s1s0 + u*Exp[I*fi])^4) + (f2ss0*Pi)*((s2s0^2 - 4*s2s0*u*Exp[I*fi] + 
         u^2*Exp[2*I*fi])/(s2s0 + u*Exp[I*fi])^4) + 
      (f3ss0*Pi)*((s3s0^2 - 4*s3s0*u*Exp[I*fi] + u^2*Exp[2*I*fi])/
        (s3s0 + u*Exp[I*fi])^4))
 
tA[nupp_, Q2_, fi_] := tAMA1l[nupp, Q2/L2, fi] + 
     (-(Pi*be0^(nupp - 1)*Gamma[nupp])^(-1))*
      ((Pi*(f1ss0/s1s0))*PolyLog[-nupp + 1, (-s1s0)*Exp[(-I)*fi]*(L2/Q2)] + 
       (Pi*(f2ss0/s2s0))*PolyLog[-nupp + 1, (-s2s0)*Exp[(-I)*fi]*(L2/Q2)] + 
       (Pi*(f3ss0/s3s0))*PolyLog[-nupp + 1, (-s3s0)*Exp[(-I)*fi]*(L2/Q2)] - 
       NIntegrate[(tr1MA1l[ssig]/ssig)*PolyLog[-nupp + 1, 
          (-ssig)*Exp[(-I)*fi]*(L2/Q2)], {ssig, 0, s0}, MaxRecursion -> 20] + 
       NIntegrate[((tr1[ssig] - tr1MA1l[ssig])/ssig)*PolyLog[-nupp + 1, 
          (-ssig)*Exp[(-I)*fi]*(L2/Q2)], {ssig, s0, 10*s0}, 
        MaxRecursion -> 20] + NIntegrate[(tr1[Exp[w]] - tr1MA1l[Exp[w]])*
         PolyLog[-nupp + 1, (-Exp[w])*Exp[(-I)*fi]*(L2/Q2)], 
        {w, Log[10*s0], 10^6}, MaxRecursion -> 20])
 
tAMA1l[nu_, u_, fi_] := If[Abs[u*Exp[I*fi] - 1] > Delt[nu], 
     (1/be0^nu)*(1/(Log[u] + I*fi)^nu - PolyLog[-nu + 1, (1/u)*Exp[(-I)*fi]]/
        Gamma[nu]), (1/be0^nu)*Limt1l[u, nu, fi]]
 
Delt[nu_] := 10.^(-2) + (HeavisideTheta[nu - 3]*(nu - 3)*2)/10.^2
 
Limt1l[u_, nu_, fi_] := -(Zeta[1 - nu]/Gamma[nu]) + 
     ((u*Exp[I*fi] - 1)*Zeta[-nu])/Gamma[nu] - 
     ((u*Exp[I*fi] - 1)^2*(Zeta[-1 - nu] + Zeta[-nu]))/(2*Gamma[nu])
 
tr1MA1l[s_] := (Pi/be0)*(1/(Log[s]^2 + Pi^2))
 
AN3[3, nupp_, Q2_, fi_] := tA[3 + nupp, Q2, fi]
 
AN3[2, nupp_, Q2_, fi_] := tA[2 + nupp, Q2, fi] + 
     tk1f[2 + nupp]*tA[3 + nupp, Q2, fi]
 
AN3[1, nupp_, Q2_, fi_] := tA[1 + nupp, Q2, fi] + 
     tk1f[1 + nupp]*tA[2 + nupp, Q2, fi] + tk2f[1 + nupp]*tA[3 + nupp, Q2, fi]
 
AN3[0, nupp_, Q2_, fi_] := tA[nupp, Q2, fi] + 
     tk1f[nupp]*tA[1 + nupp, Q2, fi] + tk2f[nupp]*tA[2 + nupp, Q2, fi] + 
     tk3f[nupp]*tA[3 + nupp, Q2, fi]
 
tk1f[s_] := -k1f[s]
 
k1f[s_] := c1*s*(-1 + HarmonicNumber[s])
 
tk2f[s_] := k1f[s]*k1f[s + 1] - k2f[s]
 
k2f[s_] := ((s - 1)*(s/2))*c2 + 
     c1^2*((s*((s + 1)/2))*((PolyGamma[s + 1] - PolyGamma[1])^2 + 
         (PolyGamma[1, s + 1] - PolyGamma[1, 1]) + 1) - 
       s^2*(PolyGamma[s + 1] - PolyGamma[1]))
 
tk3f[s_] := (-k1f[s])*k1f[s + 1]*k1f[s + 2] + k1f[s]*k2f[s + 1] + 
     k1f[s + 2]*k2f[s] - k3f[s]
 
k3f[s_] := (s*(s - 1)*((s + 4)/12))*c3 + (s*(s + 1)*((s + 2)/2))*c1*c2*
      ((s/(s + 2))*ES[1, s + 1] + 2/(s + 1) + 1/(s + 2) - 11/6) + 
     (s*(s + 1)*((s + 2)/6))*c1^3*(Z3[s + 2] - 3*Z2[s + 1] + 3*ES[1, s] - 1)
 
ES[m_, n_] := ((-1)^(m - 1)/(m - 1)!)*(PolyGamma[m - 1, n + 1] - 
      PolyGamma[m - 1, 1])
 
Z3[n_] := ES[1, n]^3 - 3*ES[1, n]*ES[2, n] + 2*ES[3, n]
 
Z2[n_] := ES[1, n]^2 - ES[2, n]
 
A4N3[Q2_, fi_] := tA4[Q2, fi]
 
A3N3[Q2_, fi_] := tA3[Q2, fi] + tk1f[3]*tA4[Q2, fi]
 
A2N3[Q2_, fi_] := tA2[Q2, fi] + tk1f[2]*tA3[Q2, fi] + tk2f[2]*tA4[Q2, fi]
 
A1N3[Q2_, fi_] := A1[Q2, fi]
 
AN2[2, nupp_, Q2_, fi_] := tA[2 + nupp, Q2, fi]
 
AN2[1, nupp_, Q2_, fi_] := tA[1 + nupp, Q2, fi] + 
     tk1f[1 + nupp]*tA[2 + nupp, Q2, fi]
 
AN2[0, nupp_, Q2_, fi_] := tA[nupp, Q2, fi] + 
     tk1f[nupp]*tA[1 + nupp, Q2, fi] + tk2f[nupp]*tA[2 + nupp, Q2, fi]
 
A3N2[Q2_, fi_] := tA3[Q2, fi]
 
A2N2[Q2_, fi_] := tA2[Q2, fi] + tk1f[2]*tA3[Q2, fi]
 
A1N2[Q2_, fi_] := A1[Q2, fi]
 
AN1[1, nupp_, Q2_, fi_] := tA[1 + nupp, Q2, fi]
 
AN1[0, nupp_, Q2_, fi_] := tA[nupp, Q2, fi] + tk1f[nupp]*tA[1 + nupp, Q2, fi]
 
A2N1[Q2_, fi_] := tA2[Q2, fi]
 
A1N1[Q2_, fi_] := A1[Q2, fi]
 
aMSnf4[Qf2_] := First[y[Log[Qf2/Q4^2]] /. sol1anf4]
 
Q4 = 2.54
 
sol1anf4 = {{y -> InterpolatingFunction[{{-2.6078647503623547, 
          22.392135249637647}}, {5, 7, 1, {96}, {4}, 0, 0, 0, 0, Automatic, 
         {}, {}, False}, {{-2.6078647503623547, -2.5870054589710967, 
         -2.5661461675798387, -2.5256635282909765, -2.4851808890021143, 
         -2.444698249713252, -2.40421561042439, -2.352556904665037, 
         -2.300898198905684, -2.2492394931463306, -2.1975807873869777, 
         -2.1316401587302094, -2.065699530073441, -1.9997589014166726, 
         -1.933818272759904, -1.8499654989252332, -1.7661127250905622, 
         -1.6822599512558911, -1.59840717742122, -1.4977030932881705, 
         -1.396999009155121, -1.2962949250220714, -1.1680133976194642, 
         -1.039731870216857, -0.9114503428142497, -0.7831688154116425, 
         -0.6288933893918427, -0.4746179633720429, -0.32034253735224305, 
         -0.12358025522216143, 0.07318202690792017, 0.26994430903800176, 
         0.46670659116808333, 0.663468873298165, 0.8602311554282466, 
         1.056993437558328, 1.2195667038843037, 1.3821399702102795, 
         1.544713236536255, 1.7072865028622306, 1.8698597691882064, 
         1.9727562402744978, 2.075652711360789, 2.178549182447081, 
         2.281445653533372, 2.318163756837681, 2.3548818601419903, 
         2.391599963446299, 2.391867606541972, 2.3921352496376453, 
         2.394402577840156, 2.3966699060426673, 2.4334288041632663, 
         2.470187702283866, 2.5069466004044654, 2.6121579007978704, 
         2.717369201191276, 2.8225805015846808, 2.9277918019780858, 
         3.1165298823698984, 3.3052679627617114, 3.494006043153524, 
         3.6827441235453366, 3.8714822039371497, 4.163219306266534, 
         4.454956408595918, 4.746693510925303, 5.038430613254688, 
         5.330167715584072, 5.621904817913457, 6.027506337192181, 
         6.4331078564709046, 6.8387093757496284, 7.244310895028352, 
         7.649912414307077, 8.0555139335858, 8.576490613072156, 
         9.09746729255851, 9.618443972044867, 10.139420651531221, 
         10.660397331017577, 11.181374010503932, 11.856466567267194, 
         12.531559124030458, 13.20665168079372, 13.881744237556983, 
         14.556836794320246, 15.231929351083508, 16.111283420908915, 
         16.990637490734322, 17.869991560559733, 18.74934563038514, 
         19.628699700210547, 20.508053770035957, 21.450094509836802, 
         22.392135249637647}}, {Developer`PackedArrayForm, {0, 2, 4, 6, 8, 
         10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 
         44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 
         78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 
         110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 
         136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 
         162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 
         188, 190, 192}, {0.22874274807686176, -0.18444424645517626, 
         0.22498095656649933, -0.17634536911617965, 0.22138164362608498, 
         -0.1688547701241448, 0.21481601687202478, -0.15581937366167667, 
         0.20874313866630587, -0.14445560700768104, 0.2031015598566651, 
         -0.13446845841439659, 0.19784040011000023, -0.12562789786364928, 
         0.19161240997376758, -0.11572734347118574, 0.1858617456427848, 
         -0.10710533498748974, 0.18052845462525038, -0.09953544472214355, 
         0.17556293154209313, -0.09284126342430116, 0.16969379534273757, 
         -0.08535057283161798, 0.16428535622880905, -0.07883554632421433, 
         0.15927923857521573, -0.07312275460320555, 0.15462717946480262, 
         -0.06807717188317497, 0.14915994086109566, -0.06245903247337639, 
         0.1441318624660737, -0.05757793985415081, 0.13948687382386227, 
         -0.05330271986316669, 0.13517862940523798, -0.04953121934868858, 
         0.1303954612088562, -0.0455548985466366, 0.1259866844309917, 
         -0.042079754342346606, 0.12190630471844756, -0.03902046423305319, 
         0.11712416050236442, -0.035620839570411164, 0.11274771951970379, 
         -0.032679670689401, 0.10872370802046195, -0.030114167283843862, 
         0.10500823117523077, -0.02786001455514877, 0.10089724621920838, 
         -0.025490563338774034, 0.09712723928483732, -0.023429594545090714, 
         0.09365492131052275, -0.021623606095738785, 0.08960194278644151, 
         -0.01962456503916337, 0.08591386070701988, -0.0179048711568832, 
         0.08254100329681768, -0.01641297142122409, 0.07944263521764393, 
         -0.01510897413750724, 0.07658498604665981, -0.013961561755790655, 
         0.07393978998808616, -0.012945837191386098, 0.07148316428254704, 
         -0.012041771358478467, 0.0695811358420872, -0.011367373990551842, 
         0.06778398401018476, -0.010750398979946795, 0.06608291771473965, 
         -0.010184317552871747, 0.0644701341969039, -0.009663524174128775, 
         0.06293866683811569, -0.009183180326082863, 0.06200853143884991, 
         -0.008898133771243924, 0.061107021005351134, -0.00862665122013021, 
         0.06023278536541116, -0.008367860950406307, 0.059384576606016044, 
         -0.008120969065484103, 0.05908795729713525, -0.008035601246576695, 
         0.058794447042414176, -0.007951621856345613, 0.058503995426606496, 
         -0.007869000107730433, 0.05850188934305781, -0.007868402762621409, 
         0.05849978341938442, -0.007867805488049063, 0.05848195598377708, 
         -0.007862750345363458, 0.058464139998392416, -0.007857700250423549, 
         0.05817679205204883, -0.0077764977824362, 0.05789240517020495, 
         -0.007696592891329875, 0.05761093217417536, -0.007617957349329248, 
         0.05682102529713212, -0.007399667375626892, 0.05605356075885017, 
         -0.007190939809233738, 0.0553075783123532, -0.006991212815046668, 
         0.05458215879423897, -0.006799964641802661, 0.05332964205899897, 
         -0.006476617070970944, 0.05213592197357805, -0.006176486326252471, 
         0.05099683788262355, -0.005897356669002963, 0.0499086103134843, 
         -0.005637270482161778, 0.04886781163201783, -0.005394497831337111, 
         0.04734517108738529, -0.005049788349682424, 0.045918202266923225, 
         -0.004737926973506412, 0.04457792841381811, -0.004454790964851859, 
         0.04331649556155419, -0.004196896155240251, 0.0421269839817612, 
         -0.003961278757770268, 0.04100327397117586, -0.003745402279150472, 
         0.03954022913141195, -0.003474032388831918, 0.038181209378538146, 
         -0.0032317119108733624, 0.03691528279970795, -0.0030143784556671536, 
         0.035733018639589484, -0.0028186636907954923, 0.03462623576815009, 
         -0.0026417541182753414, 0.03358780018869175, -0.002481284173008428, 
         0.032344300942403106, -0.002296107872137878, 0.0311918440558945, 
         -0.0021312418983934706, 0.03012062867749504, -0.0019837874392006458, 
         0.029122227080018274, -0.001851349604789971, 0.028189350901779344, 
         -0.001731934829404327, 0.027315663275120482, -0.001623872420582328, 
         0.026262599887632486, -0.0014984535963274688, 0.02528929284752223, 
         -0.0013872048516957098, 0.024386900855023895, 
         -0.0012880501889509437, 0.023547853735051454, 
         -0.0011992830432901655, 0.02276563098467342, -0.0011194894322892586, 
         0.02203458472905563, -0.0010474895815137072, 0.021151055282873043, 
         -0.0009637767034331516, 0.02033673346923899, -0.0008898110657733556, 
         0.019583715900292092, -0.0008241255046435584, 0.018885266193168136, 
         -0.0007655204527861483, 0.018235606676897737, 
         -0.0007130069806583644, 0.017629752815905612, 
         -0.0006657638490260633, 0.017024411318222757, -0.000620222510131409, 
         0.016459775117180518, -0.0005792364727812733}}, {Automatic}]}}
 
aMSnf4plot[(Q2_)?NumberQ] := If[Q2 > 0.3706, aMSnf4[Q2], 10.]
 
aLambplot[(Q2_)?NumberQ] := If[Q2 > 1.452876, a[Q2/L2, 0], 10.]
