GM2Calc 2.3.0
Loading...
Searching...
No Matches
gm2calc.tm
Go to the documentation of this file.
1:Evaluate: BeginPackage["GM2Calc`"]
2
3:Evaluate: loopOrder::usage =
4 "Loop order of the calculation. Possible values: 0, 1, 2";
5
6:Evaluate: tanBetaResummation::usage =
7 "Enable/disable tan(beta) resummation. Possible values: True, False";
8
9:Evaluate: forceOutput::usage =
10 "Enforce output, even in case an error has occurred.";
11
12:Evaluate: runningCouplings::usage =
13 "Use running couplings in the THDM.";
14
15:Evaluate: alphaMZ::usage =
16 "Electromagnetic coupling in the MS-bar scheme at the scale MZ."
17
18:Evaluate: alpha0::usage =
19 "Electromagnetic coupling in the Thomson limit."
20
21:Evaluate: alphaS::usage =
22 "Strong coupling."
23
24:Evaluate: MW::usage =
25 "W-boson pole mass."
26
27:Evaluate: MZ::usage =
28 "Z-boson pole mass."
29
30:Evaluate: MT::usage =
31 "Top quark pole mass."
32
33:Evaluate: mcmc::usage =
34 "Charm quark MS-bar mass mc at the scale mc."
35
36:Evaluate: mu2GeV::usage =
37 "Up quark MS-bar mass mu at the scale 2 GeV."
38
39:Evaluate: mbmb::usage =
40 "Bottom quark MS-bar mass mb at the scale mb."
41
42:Evaluate: ms2GeV::usage =
43 "Strange quark MS-bar mass ms at the scale 2 GeV."
44
45:Evaluate: md2GeV::usage =
46 "Down quark MS-bar mass ms at the scale 2 GeV."
47
48:Evaluate: mbMZ::usage =
49 "Bottom quark DR-bar mass at the scale MZ."
50
51:Evaluate: ML::usage =
52 "Tau lepton pole mass."
53
54:Evaluate: MM::usage =
55 "Muon pole mass."
56
57:Evaluate: ME::usage =
58 "Electron pole mass."
59
60:Evaluate: Mv1::usage =
61 "Lightest neutrino pole mass."
62
63:Evaluate: Mv2::usage =
64 "2nd lightest neutrino pole mass."
65
66:Evaluate: Mv3::usage =
67 "Heaviest neutrino pole mass."
68
69:Evaluate: CKM::usage =
70 "CKM matrix."
71
72:Evaluate: amu::usage =
73 "Calculated value of the anomalous magnetic moment of the muon, amu = (g-2)/2.";
74
75:Evaluate: amu1L::usage =
76 "Calculated value of the anomalous magnetic moment of the muon, amu = (g-2)/2 (1-loop contribution only).";
77
78:Evaluate: amu2L::usage =
79 "Calculated value of the anomalous magnetic moment of the muon, amu = (g-2)/2 (2-loop contribution only).";
80
81:Evaluate: amu2LF::usage =
82 "Calculated value of the anomalous magnetic moment of the muon, amu = (g-2)/2 (2-loop fermionic contribution only).";
83
84:Evaluate: amu2LB::usage =
85 "Calculated value of the anomalous magnetic moment of the muon, amu = (g-2)/2 (2-loop bosonic contribution only).";
86
87:Evaluate: Damu::usage =
88 "Uncertainty of the calculated value of the anomalous magnetic moment of the muon.";
89
90:Evaluate: UM::usage =
91 "Mixing matrix of the negatively charged charginos.";
92
93:Evaluate: UP::usage =
94 "Mixing matrix of the positively charged charginos.";
95
96:Evaluate: ZN::usage =
97 "Mixing matrix of the neutralinos.";
98
99:Evaluate: USt::usage =
100 "Mixing matrix of the stops.";
101
102:Evaluate: USb::usage =
103 "Mixing matrix of the sbottoms.";
104
105:Evaluate: UStau::usage =
106 "Mixing matrix of the staus.";
107
108:Evaluate: USm::usage =
109 "Mixing matrix of the smuons.";
110
111:Evaluate: MSveL::usage =
112 "Electron-sneutrino mass.";
113
114:Evaluate: MSvmL::usage =
115 "Muon-sneutrino mass.";
116
117:Evaluate: MSvtL::usage =
118 "Tau-sneutrino mass.";
119
120:Evaluate: MSe::usage =
121 "Selectron masses.";
122
123:Evaluate: MSm::usage =
124 "Smuon masses.";
125
126:Evaluate: MStau::usage =
127 "Stau masses.";
128
129:Evaluate: MSu::usage =
130 "Sup masses.";
131
132:Evaluate: MSd::usage =
133 "Sdown masses.";
134
135:Evaluate: MSc::usage =
136 "Scharm masses.";
137
138:Evaluate: MSs::usage =
139 "Sstrange masses.";
140
141:Evaluate: MSt::usage =
142 "Stop masses.";
143
144:Evaluate: MSb::usage =
145 "Sbottom masses.";
146
147:Evaluate: MChi::usage =
148 "Neutralino masses.";
149
150:Evaluate: MCha::usage =
151 "Chargino masses.";
152
153:Evaluate: MhSM::usage =
154 "Standard Model Higgs boson mass.";
155
156:Evaluate: Mhh::usage =
157 "CP-even Higgs boson masses.";
158
159:Evaluate: MAh::usage =
160 "CP-odd Higgs boson mass.";
161
162:Evaluate: MHp::usage =
163 "charged Higgs boson mass.";
164
165:Evaluate: Mhh::usage =
166 "CP-even Higgs bosons masses.";
167
168:Evaluate: TB::usage =
169 "tan(beta) = v2/v1 (= vu/vd in the MSSM).";
170
171:Evaluate: Mu::usage =
172 "Superpotential mu-parameter.";
173
174:Evaluate: MassB::usage =
175 "Soft-breaking bino mass parameter.";
176
177:Evaluate: MassWB::usage =
178 "Soft-breaking wino mass parameter.";
179
180:Evaluate: MassG::usage =
181 "Soft-breaking gluino mass parameter.";
182
183:Evaluate: mq2::usage =
184 "Soft-breaking squared left-handed squark mass parameters.";
185
186:Evaluate: mu2::usage =
187 "Soft-breaking squared right-handed up-type squark mass parameters.";
188
189:Evaluate: md2::usage =
190 "Soft-breaking squared right-handed down-type squark mass parameters.";
191
192:Evaluate: ml2::usage =
193 "Soft-breaking squared left-handed slepton mass parameters.";
194
195:Evaluate: me2::usage =
196 "Soft-breaking squared right-handed down-type slepton mass parameters.";
197
198:Evaluate: Au::usage =
199 "Soft-breaking trilinear couplings between Higgs bosons and up-type squarks.";
200
201:Evaluate: Ad::usage =
202 "Soft-breaking trilinear couplings between Higgs bosons and down-type squarks.";
203
204:Evaluate: Ae::usage =
205 "Soft-breaking trilinear couplings between Higgs bosons and down-type sleptons.";
206
207:Evaluate: Q::usage =
208 "Renormalization scale.";
209
210:Evaluate: Yu::usage =
211 "Yukawa couplings of up-type quarks.";
212
213:Evaluate: Yd::usage =
214 "Yukawa couplings of down-type quarks.";
215
216:Evaluate: Ye::usage =
217 "Yukawa couplings of down-type leptons.";
218
219:Evaluate: yukawaType::usage =
220 "Yukawa type of the Two-Higgs Doublet Model.";
221
222:Evaluate: sinBetaMinusAlpha::usage =
223 "Mixing angle sin(beta - alpha) of the Higgs sector in the Two-Higgs Doublet Model.";
224
225:Evaluate: lambda::usage =
226 "Lagrangian parameters { lambda_1, ... , lambda_7 } in the Two-Higgs Doublet Model.";
227
228:Evaluate: lambda6::usage =
229 "Lagrangian parameter lambda_6 in the Two-Higgs Doublet Model.";
230
231:Evaluate: lambda7::usage =
232 "Lagrangian parameter lambda_7 in the Two-Higgs Doublet Model.";
233
234:Evaluate: m122::usage =
235 "Lagrangian parameter m_{12}^2 in the Two-Higgs Doublet Model.";
236
237:Evaluate: zetau::usage =
238 "Alignment parameter zeta_u in the Two-Higgs Doublet Model.";
239
240:Evaluate: zetad::usage =
241 "Alignment parameter zeta_d in the Two-Higgs Doublet Model.";
242
243:Evaluate: zetal::usage =
244 "Alignment parameter zeta_l in the Two-Higgs Doublet Model.";
245
246:Evaluate: Deltau::usage =
247 "Yukawa coupling Delta_u in the general Two-Higgs Doublet Model.";
248
249:Evaluate: Deltad::usage =
250 "Yukawa coupling Delta_d in the general Two-Higgs Doublet Model.";
251
252:Evaluate: Deltal::usage =
253 "Yukawa coupling Delta_l in the general Two-Higgs Doublet Model.";
254
255:Evaluate: Piu::usage =
256 "Yukawa coupling Pi_u in the general Two-Higgs Doublet Model.";
257
258:Evaluate: Pid::usage =
259 "Yukawa coupling Pi_d in the general Two-Higgs Doublet Model.";
260
261:Evaluate: Pil::usage =
262 "Yukawa coupling Pi_l in the general Two-Higgs Doublet Model.";
263
264:Evaluate: GM2CalcSetFlags::usage =
265 "GM2CalcSetFlags sets the configuration flags for GM2Calc. Available flags are: {loopOrder, tanBetaResummation, forceOutput, runningCouplings}. Unset flags are set to their default values, see Options[GM2CalcSetFlags]. Use GM2CalcGetFlags[] to retrieve the flags currently set."
266
267:Evaluate: GM2CalcGetFlags::usage =
268 "GM2CalcGetFlags returns the current configuration flags for GM2Calc."
269
270:Evaluate: GM2CalcSetSMParameters::usage =
271 "GM2CalcSetSMParameters sets the Standard Model parameters input parameters. Unset parameters are set to their default values, see Options[GM2CalcSetSMParameters]. Use GM2CalcGetSMParameters[] to retrieve the current values of the Standard Model parameters."
272
273:Evaluate: GM2CalcGetSMParameters::usage =
274 "GM2CalcGetSMParameters returns the Standard Model parameters."
275
276:Evaluate: GM2CalcAmuSLHAScheme::usage =
277 "GM2CalcAmuSLHAScheme calculates amu and its uncertainty in the MSSM using the given SLHA parameters (SLHA interface). Unset SLHA parameters are set to zero. See Options[GM2CalcAmuSLHAScheme] for all SLHA parameters and their default values."
278
279:Evaluate: GM2CalcAmuGM2CalcScheme::usage =
280 "GM2CalcAmuGM2CalcScheme calculates amu and its uncertainty in the MSSM using the given parameters in the GM2Calc-specific renormalization scheme (GM2Calc interface). Unset parameters are set to zero. See Options[GM2CalcAmuGM2CalcScheme] for all input parameters in the GM2Calc scheme and their default values."
281
282:Evaluate: GM2CalcAmuTHDMGaugeBasis::usage =
283 "GM2CalcAmuTHDMGaugeBasis calculates amu and its uncertainty in the Two-Higgs Doublet Model using the given input parameters in the gauge bassis. Unset input parameters are set to zero. See Options[GM2CalcAmuTHDMGaugeBasis] for all parameters and their default values."
284
285:Evaluate: GM2CalcAmuTHDMMassBasis::usage =
286 "GM2CalcAmuTHDMMassBasis calculates amu and its uncertainty in the Two-Higgs Doublet Model using the given input parameters. Unset input parameters are set to zero. See Options[GM2CalcAmuTHDMMassBasis] for all parameters and their default values."
287
288:Evaluate: GM2CalcAmuSLHAScheme::error = "`1`";
289:Evaluate: GM2CalcAmuSLHAScheme::warning = "`1`";
290
291:Evaluate: GM2CalcAmuGM2CalcScheme::error = "`1`";
292:Evaluate: GM2CalcAmuGM2CalcScheme::warning = "`1`";
293
294:Evaluate: GM2CalcAmuTHDMMassBasis::error = "`1`";
295:Evaluate: GM2CalcAmuTHDMGaugeBasis::error = "`1`";
296
297:Evaluate: Begin["`Private`"]
298
299:Begin:
300:Function: GM2CalcSetFlags
301:Pattern: GM2CalcSetFlags[OptionsPattern[]]
302:Arguments: {
303 OptionValue[loopOrder],
304 Boole[OptionValue[tanBetaResummation]],
305 Boole[OptionValue[forceOutput]],
306 Boole[OptionValue[runningCouplings]] }
307:ArgumentTypes: {Integer, Integer, Integer, Integer}
308:ReturnType: Integer
309:End:
310
311:Evaluate: Options[GM2CalcSetFlags] = {
312 loopOrder -> 2,
313 tanBetaResummation -> True,
314 forceOutput -> False,
315 runningCouplings -> False }
316
317:Evaluate: GM2CalcSetFlags::wronglooporder = "Unsupported loop order: `1`";
318
319:Begin:
320:Function: GM2CalcGetFlags
321:Pattern: GM2CalcGetFlags[]
322:Arguments: {}
323:ArgumentTypes: {}
324:ReturnType: Manual
325:End:
326
327:Begin:
328:Function: GM2CalcSetSMParameters
329:Pattern: GM2CalcSetSMParameters[OptionsPattern[]]
330:Arguments: {
331 N @ OptionValue[alpha0],
332 N @ OptionValue[alphaMZ],
333 N @ OptionValue[alphaS],
334 N @ OptionValue[MhSM],
335 N @ OptionValue[MW],
336 N @ OptionValue[MZ],
337 N @ OptionValue[MT],
338 N @ OptionValue[mcmc],
339 N @ OptionValue[mu2GeV],
340 N @ OptionValue[mbmb],
341 N @ OptionValue[ms2GeV],
342 N @ OptionValue[md2GeV],
343 N @ OptionValue[Mv1],
344 N @ OptionValue[Mv2],
345 N @ OptionValue[Mv3],
346 N @ OptionValue[ML],
347 N @ OptionValue[MM],
348 N @ OptionValue[ME],
349 Re @ N @ OptionValue[CKM][[1,1]],
350 Re @ N @ OptionValue[CKM][[1,2]],
351 Re @ N @ OptionValue[CKM][[1,3]],
352 Re @ N @ OptionValue[CKM][[2,1]],
353 Re @ N @ OptionValue[CKM][[2,2]],
354 Re @ N @ OptionValue[CKM][[2,3]],
355 Re @ N @ OptionValue[CKM][[3,1]],
356 Re @ N @ OptionValue[CKM][[3,2]],
357 Re @ N @ OptionValue[CKM][[3,3]],
358 Im @ N @ OptionValue[CKM][[1,1]],
359 Im @ N @ OptionValue[CKM][[1,2]],
360 Im @ N @ OptionValue[CKM][[1,3]],
361 Im @ N @ OptionValue[CKM][[2,1]],
362 Im @ N @ OptionValue[CKM][[2,2]],
363 Im @ N @ OptionValue[CKM][[2,3]],
364 Im @ N @ OptionValue[CKM][[3,1]],
365 Im @ N @ OptionValue[CKM][[3,2]],
366 Im @ N @ OptionValue[CKM][[3,3]] }
367:ArgumentTypes: {
368 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
369 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
370 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
371 Real, Real, Real, Real, Real, Real }
372:ReturnType: Integer
373:End:
374
375:Evaluate: Options[GM2CalcSetSMParameters] = {
376 alpha0 -> 0.00729735,
377 alphaMZ -> 0.0077552,
378 alphaS -> 0.1184,
379 MhSM -> 125.09,
380 MW -> 80.385,
381 MZ -> 91.1876,
382 MT -> 173.34,
383 mcmc -> 1.28,
384 mu2GeV -> 0.0022,
385 mbmb -> 4.18,
386 ms2GeV -> 0.096,
387 md2GeV -> 0.0047,
388 ML -> 1.777,
389 MM -> 0.1056583715,
390 ME -> 0.000510998928,
391 Mv1 -> 0,
392 Mv2 -> 0,
393 Mv3 -> 0,
394 CKM -> {{1,0,0}, {0,1,0}, {0,0,1}} }
395
396:Begin:
397:Function: GM2CalcGetSMParameters
398:Pattern: GM2CalcGetSMParameters[]
399:Arguments: {}
400:ArgumentTypes: {}
401:ReturnType: Manual
402:End:
403
404:Begin:
405:Function: GM2CalcAmuSLHAScheme
406:Pattern: GM2CalcAmuSLHAScheme[OptionsPattern[]]
407:Arguments: {
408 N @ OptionValue[MSvmL],
409 N @ OptionValue[MSm][[1]],
410 N @ OptionValue[MSm][[2]],
411 N @ OptionValue[MChi][[1]],
412 N @ OptionValue[MChi][[2]],
413 N @ OptionValue[MChi][[3]],
414 N @ OptionValue[MChi][[4]],
415 N @ OptionValue[MCha][[1]],
416 N @ OptionValue[MCha][[2]],
417 N @ OptionValue[MAh],
418 N @ OptionValue[TB],
419 N @ OptionValue[Mu],
420 N @ OptionValue[MassB],
421 N @ OptionValue[MassWB],
422 N @ OptionValue[MassG],
423 N @ OptionValue[mq2][[1,1]],
424 N @ OptionValue[mq2][[2,2]],
425 N @ OptionValue[mq2][[3,3]],
426 N @ OptionValue[ml2][[1,1]],
427 N @ OptionValue[ml2][[2,2]],
428 N @ OptionValue[ml2][[3,3]],
429 N @ OptionValue[mu2][[1,1]],
430 N @ OptionValue[mu2][[2,2]],
431 N @ OptionValue[mu2][[3,3]],
432 N @ OptionValue[md2][[1,1]],
433 N @ OptionValue[md2][[2,2]],
434 N @ OptionValue[md2][[3,3]],
435 N @ OptionValue[me2][[1,1]],
436 N @ OptionValue[me2][[2,2]],
437 N @ OptionValue[me2][[3,3]],
438 N @ OptionValue[Au][[3,3]],
439 N @ OptionValue[Ad][[3,3]],
440 N @ OptionValue[Ae][[2,2]],
441 N @ OptionValue[Ae][[3,3]],
442 N @ OptionValue[Q] }
443:ArgumentTypes: {
444 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
445 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
446 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
447 Real, Real, Real, Real, Real }
448:ReturnType: Manual
449:End:
450
451:Evaluate: Options[GM2CalcAmuSLHAScheme] = {
452 MSvmL -> 0,
453 MSm -> {0, 0},
454 MChi -> {0, 0, 0, 0},
455 MCha -> {0, 0},
456 MAh -> 0,
457 TB -> 0,
458 Mu -> 0,
459 MassB -> 0,
460 MassWB -> 0,
461 MassG -> 0,
462 mq2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
463 ml2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
464 mu2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
465 md2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
466 me2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
467 Au -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
468 Ad -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
469 Ae -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
470 Q -> 0 }
471
472:Begin:
473:Function: GM2CalcAmuGM2CalcScheme
474:Pattern: GM2CalcAmuGM2CalcScheme[OptionsPattern[]]
475:Arguments: {
476 N @ OptionValue[MAh],
477 N @ OptionValue[TB],
478 N @ OptionValue[Mu],
479 N @ OptionValue[MassB],
480 N @ OptionValue[MassWB],
481 N @ OptionValue[MassG],
482 N @ OptionValue[mq2][[1,1]],
483 N @ OptionValue[mq2][[2,2]],
484 N @ OptionValue[mq2][[3,3]],
485 N @ OptionValue[ml2][[1,1]],
486 N @ OptionValue[ml2][[2,2]],
487 N @ OptionValue[ml2][[3,3]],
488 N @ OptionValue[mu2][[1,1]],
489 N @ OptionValue[mu2][[2,2]],
490 N @ OptionValue[mu2][[3,3]],
491 N @ OptionValue[md2][[1,1]],
492 N @ OptionValue[md2][[2,2]],
493 N @ OptionValue[md2][[3,3]],
494 N @ OptionValue[me2][[1,1]],
495 N @ OptionValue[me2][[2,2]],
496 N @ OptionValue[me2][[3,3]],
497 N @ OptionValue[Au][[3,3]],
498 N @ OptionValue[Ad][[3,3]],
499 N @ OptionValue[Ae][[2,2]],
500 N @ OptionValue[Ae][[3,3]],
501 N @ OptionValue[Q] }
502:ArgumentTypes: {
503 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
504 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
505 Real, Real, Real, Real, Real, Real }
506:ReturnType: Manual
507:End:
508
509:Evaluate: Options[GM2CalcAmuGM2CalcScheme] = {
510 MAh -> 0,
511 TB -> 0,
512 Mu -> 0,
513 MassB -> 0,
514 MassWB -> 0,
515 MassG -> 0,
516 mq2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
517 ml2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
518 mu2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
519 md2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
520 me2 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
521 Au -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
522 Ad -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
523 Ae -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
524 Q -> 0 }
525
526:Begin:
527:Function: GM2CalcAmuTHDMGaugeBasis
528:Pattern: GM2CalcAmuTHDMGaugeBasis[OptionsPattern[]]
529:Arguments: {
530 N @ OptionValue[yukawaType],
531 N @ OptionValue[lambda][[1]],
532 N @ OptionValue[lambda][[2]],
533 N @ OptionValue[lambda][[3]],
534 N @ OptionValue[lambda][[4]],
535 N @ OptionValue[lambda][[5]],
536 N @ OptionValue[lambda][[6]],
537 N @ OptionValue[lambda][[7]],
538 N @ OptionValue[TB],
539 N @ OptionValue[m122],
540 N @ OptionValue[zetau],
541 N @ OptionValue[zetad],
542 N @ OptionValue[zetal],
543 Re @ N @ OptionValue[Deltau][[1,1]],
544 Re @ N @ OptionValue[Deltau][[1,2]],
545 Re @ N @ OptionValue[Deltau][[1,3]],
546 Re @ N @ OptionValue[Deltau][[2,1]],
547 Re @ N @ OptionValue[Deltau][[2,2]],
548 Re @ N @ OptionValue[Deltau][[2,3]],
549 Re @ N @ OptionValue[Deltau][[3,1]],
550 Re @ N @ OptionValue[Deltau][[3,2]],
551 Re @ N @ OptionValue[Deltau][[3,3]],
552 Re @ N @ OptionValue[Deltad][[1,1]],
553 Re @ N @ OptionValue[Deltad][[1,2]],
554 Re @ N @ OptionValue[Deltad][[1,3]],
555 Re @ N @ OptionValue[Deltad][[2,1]],
556 Re @ N @ OptionValue[Deltad][[2,2]],
557 Re @ N @ OptionValue[Deltad][[2,3]],
558 Re @ N @ OptionValue[Deltad][[3,1]],
559 Re @ N @ OptionValue[Deltad][[3,2]],
560 Re @ N @ OptionValue[Deltad][[3,3]],
561 Re @ N @ OptionValue[Deltal][[1,1]],
562 Re @ N @ OptionValue[Deltal][[1,2]],
563 Re @ N @ OptionValue[Deltal][[1,3]],
564 Re @ N @ OptionValue[Deltal][[2,1]],
565 Re @ N @ OptionValue[Deltal][[2,2]],
566 Re @ N @ OptionValue[Deltal][[2,3]],
567 Re @ N @ OptionValue[Deltal][[3,1]],
568 Re @ N @ OptionValue[Deltal][[3,2]],
569 Re @ N @ OptionValue[Deltal][[3,3]],
570 Re @ N @ OptionValue[Piu][[1,1]],
571 Re @ N @ OptionValue[Piu][[1,2]],
572 Re @ N @ OptionValue[Piu][[1,3]],
573 Re @ N @ OptionValue[Piu][[2,1]],
574 Re @ N @ OptionValue[Piu][[2,2]],
575 Re @ N @ OptionValue[Piu][[2,3]],
576 Re @ N @ OptionValue[Piu][[3,1]],
577 Re @ N @ OptionValue[Piu][[3,2]],
578 Re @ N @ OptionValue[Piu][[3,3]],
579 Re @ N @ OptionValue[Pid][[1,1]],
580 Re @ N @ OptionValue[Pid][[1,2]],
581 Re @ N @ OptionValue[Pid][[1,3]],
582 Re @ N @ OptionValue[Pid][[2,1]],
583 Re @ N @ OptionValue[Pid][[2,2]],
584 Re @ N @ OptionValue[Pid][[2,3]],
585 Re @ N @ OptionValue[Pid][[3,1]],
586 Re @ N @ OptionValue[Pid][[3,2]],
587 Re @ N @ OptionValue[Pid][[3,3]],
588 Re @ N @ OptionValue[Pil][[1,1]],
589 Re @ N @ OptionValue[Pil][[1,2]],
590 Re @ N @ OptionValue[Pil][[1,3]],
591 Re @ N @ OptionValue[Pil][[2,1]],
592 Re @ N @ OptionValue[Pil][[2,2]],
593 Re @ N @ OptionValue[Pil][[2,3]],
594 Re @ N @ OptionValue[Pil][[3,1]],
595 Re @ N @ OptionValue[Pil][[3,2]],
596 Re @ N @ OptionValue[Pil][[3,3]] }
597:ArgumentTypes: {
598 Integer, Real, Real, Real, Real, Real, Real, Real, Real, Real,
599 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
600 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
601 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
602 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
603 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
604 Real, Real, Real, Real, Real, Real, Real }
605:ReturnType: Manual
606:End:
607
608:Evaluate: Options[GM2CalcAmuTHDMGaugeBasis] = {
609 yukawaType -> 0,
610 lambda -> { 0, 0, 0, 0, 0, 0, 0 },
611 TB -> 0,
612 m122 -> 0,
613 zetau -> 0,
614 zetad -> 0,
615 zetal -> 0,
616 Deltau -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
617 Deltad -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
618 Deltal -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
619 Piu -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
620 Pid -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
621 Pil -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} }
622
623:Begin:
624:Function: GM2CalcAmuTHDMMassBasis
625:Pattern: GM2CalcAmuTHDMMassBasis[OptionsPattern[]]
626:Arguments: {
627 N @ OptionValue[yukawaType],
628 N @ OptionValue[Mhh][[1]],
629 N @ OptionValue[Mhh][[2]],
630 N @ OptionValue[MAh],
631 N @ OptionValue[MHp],
632 N @ OptionValue[sinBetaMinusAlpha],
633 N @ OptionValue[lambda6],
634 N @ OptionValue[lambda7],
635 N @ OptionValue[TB],
636 N @ OptionValue[m122],
637 N @ OptionValue[zetau],
638 N @ OptionValue[zetad],
639 N @ OptionValue[zetal],
640 Re @ N @ OptionValue[Deltau][[1,1]],
641 Re @ N @ OptionValue[Deltau][[1,2]],
642 Re @ N @ OptionValue[Deltau][[1,3]],
643 Re @ N @ OptionValue[Deltau][[2,1]],
644 Re @ N @ OptionValue[Deltau][[2,2]],
645 Re @ N @ OptionValue[Deltau][[2,3]],
646 Re @ N @ OptionValue[Deltau][[3,1]],
647 Re @ N @ OptionValue[Deltau][[3,2]],
648 Re @ N @ OptionValue[Deltau][[3,3]],
649 Re @ N @ OptionValue[Deltad][[1,1]],
650 Re @ N @ OptionValue[Deltad][[1,2]],
651 Re @ N @ OptionValue[Deltad][[1,3]],
652 Re @ N @ OptionValue[Deltad][[2,1]],
653 Re @ N @ OptionValue[Deltad][[2,2]],
654 Re @ N @ OptionValue[Deltad][[2,3]],
655 Re @ N @ OptionValue[Deltad][[3,1]],
656 Re @ N @ OptionValue[Deltad][[3,2]],
657 Re @ N @ OptionValue[Deltad][[3,3]],
658 Re @ N @ OptionValue[Deltal][[1,1]],
659 Re @ N @ OptionValue[Deltal][[1,2]],
660 Re @ N @ OptionValue[Deltal][[1,3]],
661 Re @ N @ OptionValue[Deltal][[2,1]],
662 Re @ N @ OptionValue[Deltal][[2,2]],
663 Re @ N @ OptionValue[Deltal][[2,3]],
664 Re @ N @ OptionValue[Deltal][[3,1]],
665 Re @ N @ OptionValue[Deltal][[3,2]],
666 Re @ N @ OptionValue[Deltal][[3,3]],
667 Re @ N @ OptionValue[Piu][[1,1]],
668 Re @ N @ OptionValue[Piu][[1,2]],
669 Re @ N @ OptionValue[Piu][[1,3]],
670 Re @ N @ OptionValue[Piu][[2,1]],
671 Re @ N @ OptionValue[Piu][[2,2]],
672 Re @ N @ OptionValue[Piu][[2,3]],
673 Re @ N @ OptionValue[Piu][[3,1]],
674 Re @ N @ OptionValue[Piu][[3,2]],
675 Re @ N @ OptionValue[Piu][[3,3]],
676 Re @ N @ OptionValue[Pid][[1,1]],
677 Re @ N @ OptionValue[Pid][[1,2]],
678 Re @ N @ OptionValue[Pid][[1,3]],
679 Re @ N @ OptionValue[Pid][[2,1]],
680 Re @ N @ OptionValue[Pid][[2,2]],
681 Re @ N @ OptionValue[Pid][[2,3]],
682 Re @ N @ OptionValue[Pid][[3,1]],
683 Re @ N @ OptionValue[Pid][[3,2]],
684 Re @ N @ OptionValue[Pid][[3,3]],
685 Re @ N @ OptionValue[Pil][[1,1]],
686 Re @ N @ OptionValue[Pil][[1,2]],
687 Re @ N @ OptionValue[Pil][[1,3]],
688 Re @ N @ OptionValue[Pil][[2,1]],
689 Re @ N @ OptionValue[Pil][[2,2]],
690 Re @ N @ OptionValue[Pil][[2,3]],
691 Re @ N @ OptionValue[Pil][[3,1]],
692 Re @ N @ OptionValue[Pil][[3,2]],
693 Re @ N @ OptionValue[Pil][[3,3]] }
694:ArgumentTypes: {
695 Integer, Real, Real, Real, Real, Real, Real, Real, Real, Real,
696 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
697 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
698 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
699 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
700 Real, Real, Real, Real, Real, Real, Real, Real, Real, Real,
701 Real, Real, Real, Real, Real, Real, Real }
702:ReturnType: Manual
703:End:
704
705:Evaluate: Options[GM2CalcAmuTHDMMassBasis] = {
706 yukawaType -> 0,
707 Mhh -> { 0, 0 },
708 MAh -> 0,
709 MHp -> 0,
710 sinBetaMinusAlpha -> 0,
711 lambda6 -> 0,
712 lambda7 -> 0,
713 TB -> 0,
714 m122 -> 0,
715 zetau -> 0,
716 zetad -> 0,
717 zetal -> 0,
718 Deltau -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
719 Deltad -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
720 Deltal -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
721 Piu -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
722 Pid -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
723 Pil -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} }
724
725:Evaluate: End[]
726
727:Evaluate: EndPackage[]
728
729
730#include "gm2calc/gm2_1loop.h"
731#include "gm2calc/gm2_2loop.h"
732#include "gm2calc/gm2_uncertainty.h"
733#include "gm2calc/gm2_version.h"
734#include "gm2calc/MSSMNoFV_onshell.h"
735#include "gm2calc/SM.h"
736#include "gm2calc/THDM.h"
737#include "gm2_uncertainty_helpers.h"
738
739#include <stdio.h>
740#include <stdlib.h>
741#include <string.h>
742#include <math.h>
743
744#include "mathlink.h"
745
746#ifndef M_PI
747#define M_PI 3.14159265358979323846
748#endif
749
750#define NELEMS(x) (sizeof(x) / sizeof((x)[0]))
751
752#define MLPutRule(link,s) \
753 do { \
754 MLPutFunction(link, "Rule", 2); \
755 MLPutSymbol(link, s); \
756 } while (0)
757
758#define MLPutRuleToReal(link,v,s) \
759 do { \
760 MLPutRule(link, s); \
761 MLPutReal(link, v); \
762 } while (0)
763
764#define MLPutRuleToInteger(link,v,s) \
765 do { \
766 MLPutRule(link, s); \
767 MLPutInteger(link, v); \
768 } while (0)
769
770#define MLPutRuleToString(link,v,s) \
771 do { \
772 MLPutRule(link, s); \
773 MLPutString(link, v); \
774 } while (0)
775
776#define MLPutRealMatrix(link,v,dim1,dim2) \
777 do { \
778 long dims[] = { dim1, dim2 }; \
779 MLPutDoubleArray(link, v, dims, NULL, NELEMS(dims)); \
780 } while (0)
781
782/* macros which access matrix/vector elements through GM2Calc interface
783 functions */
784
785#define MLPutRealVectorInterface(link,M,dim) \
786 do { \
787 double M[dim]; \
788 for (unsigned i = 0; i < dim; i++) { \
789 M[i] = gm2calc_mssmnofv_get_##M(model, i); \
790 } \
791 MLPutRealList(link, M, dim); \
792 } while (0)
793
794#define MLPutRealMatrixInterface(link,M,dim1,dim2) \
795 do { \
796 double M[dim1][dim2]; \
797 for (unsigned i = 0; i < dim1; i++) { \
798 for (unsigned k = 0; k < dim2; k++) { \
799 M[i][k] = gm2calc_mssmnofv_get_##M(model, i, k); \
800 } \
801 } \
802 MLPutRealMatrix(link, (double*)M, dim1, dim2); \
803 } while (0)
804
805#define MLPutComplexMatrixInterface(link,M,dim1,dim2) \
806 do { \
807 MLPutFunction(link, "List", dim1); \
808 for (unsigned i = 0; i < dim1; i++) { \
809 MLPutFunction(link, "List", dim2); \
810 for (unsigned k = 0; k < dim2; k++) { \
811 double re = 0., im = 0.; \
812 re = gm2calc_mssmnofv_get_##M(model, i, k, &im); \
813 MLPutComplex(link, re, im); \
814 } \
815 } \
816 } while (0)
817
818#define MLPutComplexMatrixTHDM(link,M,dim1,dim2) \
819 do { \
820 MLPutFunction(link, "List", dim1); \
821 for (unsigned i = 0; i < dim1; i++) { \
822 MLPutFunction(link, "List", dim2); \
823 for (unsigned k = 0; k < dim2; k++) { \
824 double re = M##_real[i][k]; \
825 double im = M##_imag[i][k]; \
826 MLPutComplex(link, re, im); \
827 } \
828 } \
829 } while (0)
830
831#define MLPutRuleToRealVectorInterface(link,M,name,dim) \
832 do { \
833 MLPutFunction(link, "Rule", 2); \
834 MLPutSymbol(link, name); \
835 MLPutRealVectorInterface(link,M,dim); \
836 } while (0)
837
838#define MLPutRuleToRealMatrixInterface(link,v,name,dim1,dim2) \
839 do { \
840 MLPutFunction(link, "Rule", 2); \
841 MLPutSymbol(link, name); \
842 MLPutRealMatrixInterface(link,v,dim1,dim2); \
843 } while (0)
844
845#define MLPutRuleToComplexMatrixInterface(link,M,name,dim1,dim2) \
846 do { \
847 MLPutFunction(link, "Rule", 2); \
848 MLPutSymbol(link, name); \
849 MLPutComplexMatrixInterface(link,M,dim1,dim2); \
850 } while (0)
851
852#define MLPutRuleToComplexMatrixTHDM(link,M,name,dim1,dim2) \
853 do { \
854 MLPutFunction(link, "Rule", 2); \
855 MLPutSymbol(link, name); \
856 MLPutComplexMatrixTHDM(link,M,dim1,dim2); \
857 } while (0)
858
859/* global configuration flags */
860struct Config_flags {
861 int loopOrder;
862 int tanBetaResummation;
863 int forceOutput;
864 int runningCouplings;
865} config_flags = {
866 .loopOrder = 2,
867 .tanBetaResummation = 1,
868 .forceOutput = 0,
869 .runningCouplings = 1
870};
871
872/* Standard Model parameters */
873gm2calc_SM sm;
874
875/* SUSY parameters for SLHA interface */
876struct SLHA_parameters {
877 double MSvmL;
878 double MSm[2];
879 double MChi[4];
880 double MCha[2];
881 double MAh;
882 double TB;
883 double Mu;
884 double MassB;
885 double MassWB;
886 double MassG;
887 double mq2[3][3];
888 double ml2[3][3];
889 double mu2[3][3];
890 double md2[3][3];
891 double me2[3][3];
892 double Au[3][3];
893 double Ad[3][3];
894 double Ae[3][3];
895 double Q;
896};
897
898/* SUSY parameters for GM2Calc interface */
899struct GM2Calc_parameters {
900 double MAh;
901 double TB;
902 double Mu;
903 double MassB;
904 double MassWB;
905 double MassG;
906 double mq2[3][3];
907 double ml2[3][3];
908 double mu2[3][3];
909 double md2[3][3];
910 double me2[3][3];
911 double Au[3][3];
912 double Ad[3][3];
913 double Ae[3][3];
914 double Q;
915};
916
917/******************************************************************/
918
919void initialize_slha_parameters(struct SLHA_parameters* pars)
920{
921 pars->MSvmL = 0.;
922 memset(pars->MSm, 0, sizeof(pars->MSm[0]) * 2);
923 memset(pars->MChi, 0, sizeof(pars->MChi[0]) * 4);
924 memset(pars->MCha, 0, sizeof(pars->MCha[0]) * 2);
925 pars->MAh = 0.;
926 pars->TB = 0.;
927 pars->Mu = 0.;
928 pars->MassB = 0.;
929 pars->MassWB = 0.;
930 pars->MassG = 0.;
931 memset(pars->mq2, 0, sizeof(pars->mq2[0][0]) * 3 * 3);
932 memset(pars->ml2, 0, sizeof(pars->ml2[0][0]) * 3 * 3);
933 memset(pars->mu2, 0, sizeof(pars->mu2[0][0]) * 3 * 3);
934 memset(pars->md2, 0, sizeof(pars->md2[0][0]) * 3 * 3);
935 memset(pars->me2, 0, sizeof(pars->me2[0][0]) * 3 * 3);
936 memset(pars->Au, 0, sizeof(pars->Au[0][0]) * 3 * 3);
937 memset(pars->Ad, 0, sizeof(pars->Ad[0][0]) * 3 * 3);
938 memset(pars->Ae, 0, sizeof(pars->Ae[0][0]) * 3 * 3);
939 pars->Q = 0.;
940}
941
942/******************************************************************/
943
944void initialize_gm2calc_parameters(struct GM2Calc_parameters* pars)
945{
946 pars->MAh = 0.;
947 pars->TB = 0.;
948 pars->Mu = 0.;
949 pars->MassB = 0.;
950 pars->MassWB = 0.;
951 pars->MassG = 0.;
952 memset(pars->mq2, 0, sizeof(pars->mq2[0][0]) * 3 * 3);
953 memset(pars->ml2, 0, sizeof(pars->ml2[0][0]) * 3 * 3);
954 memset(pars->mu2, 0, sizeof(pars->mu2[0][0]) * 3 * 3);
955 memset(pars->md2, 0, sizeof(pars->md2[0][0]) * 3 * 3);
956 memset(pars->me2, 0, sizeof(pars->me2[0][0]) * 3 * 3);
957 memset(pars->Au, 0, sizeof(pars->Au[0][0]) * 3 * 3);
958 memset(pars->Ad, 0, sizeof(pars->Ad[0][0]) * 3 * 3);
959 memset(pars->Ae, 0, sizeof(pars->Ae[0][0]) * 3 * 3);
960 pars->Q = 0.;
961}
962
963/******************************************************************/
964
965double sqr(double x) { return x*x; }
966
967/******************************************************************/
968
969void MLPutComplex(MLINK link, double re, double im)
970{
971 if (im == 0.) {
972 MLPutReal(link, re);
973 } else {
974 MLPutFunction(link, "Complex", 2);
975 MLPutReal(link, re);
976 MLPutReal(link, im);
977 }
978}
979
980/******************************************************************/
981
982void put_error_message(const char* function_name,
983 const char* message_tag,
984 const char* message_str)
985{
986 MLPutFunction(stdlink, "CompoundExpression", 2);
987 MLPutFunction(stdlink, "Message", 2);
988 MLPutFunction(stdlink, "MessageName", 2);
989 MLPutSymbol(stdlink, function_name);
990 MLPutString(stdlink, message_tag);
991 MLPutString(stdlink, message_str);
992}
993
994/******************************************************************/
995
996gm2calc_error setup_model_slha_scheme(MSSMNoFV_onshell* model,
997 const struct SLHA_parameters* pars)
998{
999 /* fill SM parameters */
1000 gm2calc_mssmnofv_set_alpha_MZ(model, sm.alpha_em_mz);
1001 gm2calc_mssmnofv_set_alpha_thompson(model, sm.alpha_em_0);
1002 gm2calc_mssmnofv_set_g3(model, sqrt(4 * M_PI * sm.alpha_s_mz));
1003 gm2calc_mssmnofv_set_MT_pole(model, sm.mu[2]);
1004 gm2calc_mssmnofv_set_MB_running(model, sm.md[2]);
1005 gm2calc_mssmnofv_set_MM_pole(model, sm.ml[1]);
1006 gm2calc_mssmnofv_set_ML_pole(model, sm.ml[2]);
1007 gm2calc_mssmnofv_set_MW_pole(model, sm.mw);
1008 gm2calc_mssmnofv_set_MZ_pole(model, sm.mz);
1009
1010 /* fill pole masses */
1011 gm2calc_mssmnofv_set_MSvmL_pole(model, pars->MSvmL);
1012 gm2calc_mssmnofv_set_MSm_pole(model, 0, pars->MSm[0]);
1013 gm2calc_mssmnofv_set_MSm_pole(model, 1, pars->MSm[1]);
1014 gm2calc_mssmnofv_set_MChi_pole(model, 0, pars->MChi[0]);
1015 gm2calc_mssmnofv_set_MChi_pole(model, 1, pars->MChi[1]);
1016 gm2calc_mssmnofv_set_MChi_pole(model, 2, pars->MChi[2]);
1017 gm2calc_mssmnofv_set_MChi_pole(model, 3, pars->MChi[3]);
1018 gm2calc_mssmnofv_set_MCha_pole(model, 0, pars->MCha[0]);
1019 gm2calc_mssmnofv_set_MCha_pole(model, 1, pars->MCha[1]);
1020 gm2calc_mssmnofv_set_MAh_pole(model, pars->MAh);
1021
1022 /* fill DR-bar parameters */
1023 gm2calc_mssmnofv_set_TB(model, pars->TB);
1024 gm2calc_mssmnofv_set_Mu(model, pars->Mu);
1025 gm2calc_mssmnofv_set_MassB(model, pars->MassB);
1026 gm2calc_mssmnofv_set_MassWB(model, pars->MassWB);
1027 gm2calc_mssmnofv_set_MassG(model, pars->MassG);
1028 for (unsigned i = 0; i < 3; i++) {
1029 for (unsigned k = 0; k < 3; k++) {
1030 gm2calc_mssmnofv_set_mq2(model, i, k, pars->mq2[i][k]);
1031 gm2calc_mssmnofv_set_ml2(model, i, k, pars->ml2[i][k]);
1032 gm2calc_mssmnofv_set_mu2(model, i, k, pars->mu2[i][k]);
1033 gm2calc_mssmnofv_set_md2(model, i, k, pars->md2[i][k]);
1034 gm2calc_mssmnofv_set_me2(model, i, k, pars->me2[i][k]);
1035 gm2calc_mssmnofv_set_Au(model, i, k, pars->Au[i][k]);
1036 gm2calc_mssmnofv_set_Ad(model, i, k, pars->Ad[i][k]);
1037 gm2calc_mssmnofv_set_Ae(model, i, k, pars->Ae[i][k]);
1038 }
1039 }
1040 gm2calc_mssmnofv_set_scale(model, pars->Q);
1041
1042 /* convert DR-bar parameters to on-shell */
1043 const gm2calc_error error = gm2calc_mssmnofv_convert_to_onshell(model);
1044
1045 return error;
1046}
1047
1048/******************************************************************/
1049
1050gm2calc_error setup_model_gm2calc_scheme(MSSMNoFV_onshell* model,
1051 const struct GM2Calc_parameters* pars)
1052{
1053 /* fill SM parameters */
1054 gm2calc_mssmnofv_set_alpha_MZ(model, sm.alpha_em_mz);
1055 gm2calc_mssmnofv_set_alpha_thompson(model, sm.alpha_em_0);
1056 gm2calc_mssmnofv_set_g3(model, sqrt(4 * M_PI * sm.alpha_s_mz));
1057 gm2calc_mssmnofv_set_MT_pole(model, sm.mu[2]);
1058 gm2calc_mssmnofv_set_MB_running(model, sm.md[2]);
1059 gm2calc_mssmnofv_set_MM_pole(model, sm.ml[1]);
1060 gm2calc_mssmnofv_set_ML_pole(model, sm.ml[2]);
1061 gm2calc_mssmnofv_set_MW_pole(model, sm.mw);
1062 gm2calc_mssmnofv_set_MZ_pole(model, sm.mz);
1063
1064 /* fill DR-bar parameters */
1065 gm2calc_mssmnofv_set_TB(model, pars->TB);
1066
1067 /* fill on-shell parameters */
1068 gm2calc_mssmnofv_set_Mu(model, pars->Mu);
1069 gm2calc_mssmnofv_set_MassB(model, pars->MassB);
1070 gm2calc_mssmnofv_set_MassWB(model, pars->MassWB);
1071 gm2calc_mssmnofv_set_MassG(model, pars->MassG);
1072 gm2calc_mssmnofv_set_MAh_pole(model, pars->MAh);
1073 gm2calc_mssmnofv_set_scale(model, pars->Q);
1074
1075 /* fill DR-bar parameters */
1076 for (unsigned i = 0; i < 3; i++) {
1077 for (unsigned k = 0; k < 3; k++) {
1078 gm2calc_mssmnofv_set_mq2(model, i, k, pars->mq2[i][k]);
1079 gm2calc_mssmnofv_set_ml2(model, i, k, pars->ml2[i][k]);
1080 gm2calc_mssmnofv_set_mu2(model, i, k, pars->mu2[i][k]);
1081 gm2calc_mssmnofv_set_md2(model, i, k, pars->md2[i][k]);
1082 gm2calc_mssmnofv_set_me2(model, i, k, pars->me2[i][k]);
1083 gm2calc_mssmnofv_set_Au(model, i, k, pars->Au[i][k]);
1084 gm2calc_mssmnofv_set_Ad(model, i, k, pars->Ad[i][k]);
1085 gm2calc_mssmnofv_set_Ae(model, i, k, pars->Ae[i][k]);
1086 }
1087 }
1088
1089 /* convert DR-bar parameters to on-shell */
1090 const gm2calc_error error = gm2calc_mssmnofv_calculate_masses(model);
1091
1092 return error;
1093}
1094
1095/******************************************************************/
1096
1097void calculate_amu_mssmnofv(MSSMNoFV_onshell* model, double* amu1L, double* amu2L)
1098{
1099 if (config_flags.loopOrder > 0) {
1100 if (config_flags.tanBetaResummation) {
1101 *amu1L = gm2calc_mssmnofv_calculate_amu_1loop(model);
1102 } else {
1103 *amu1L = gm2calc_mssmnofv_calculate_amu_1loop_non_tan_beta_resummed(model);
1104 }
1105 }
1106 if (config_flags.loopOrder > 1) {
1107 if (config_flags.tanBetaResummation) {
1108 *amu2L = gm2calc_mssmnofv_calculate_amu_2loop(model);
1109 } else {
1110 *amu2L = gm2calc_mssmnofv_calculate_amu_2loop_non_tan_beta_resummed(model);
1111 }
1112 }
1113}
1114
1115/******************************************************************/
1116
1117double calculate_uncertainty_mssmnofv(MSSMNoFV_onshell* model, double amu1L, double amu2L)
1118{
1119 double delta_amu = 0.;
1120
1121 if (config_flags.loopOrder == 0) {
1122 delta_amu = gm2calc_mssmnofv_calculate_uncertainty_amu_0loop_amu1L(model, amu1L);
1123 } else if (config_flags.loopOrder == 1) {
1124 delta_amu = gm2calc_mssmnofv_calculate_uncertainty_amu_1loop_amu2L(model, amu2L);
1125 } else if (config_flags.loopOrder > 1) {
1126 delta_amu = gm2calc_mssmnofv_calculate_uncertainty_amu_2loop(model);
1127 }
1128
1129 return delta_amu;
1130}
1131
1132/******************************************************************/
1133
1134void calculate_amu_thdm(gm2calc_THDM* model, double* amu1L, double* amu2LF, double* amu2LB)
1135{
1136 if (config_flags.loopOrder > 0) {
1137 *amu1L = gm2calc_thdm_calculate_amu_1loop(model);
1138 }
1139 if (config_flags.loopOrder > 1) {
1140 *amu2LF = gm2calc_thdm_calculate_amu_2loop_fermionic(model);
1141 *amu2LB = gm2calc_thdm_calculate_amu_2loop_bosonic(model);
1142 }
1143}
1144
1145/******************************************************************/
1146
1147double calculate_uncertainty_thdm(gm2calc_THDM* model, double amu1L, double amu2L)
1148{
1149 double delta_amu = 0.;
1150
1151 if (config_flags.loopOrder == 0) {
1152 delta_amu = gm2calc_thdm_calculate_uncertainty_amu_0loop_amu1L_amu2L(model, amu1L, amu2L);
1153 } else if (config_flags.loopOrder == 1) {
1154 delta_amu = gm2calc_thdm_calculate_uncertainty_amu_1loop_amu1L_amu2L(model, amu1L, amu2L);
1155 } else if (config_flags.loopOrder > 1) {
1156 delta_amu = gm2calc_thdm_calculate_uncertainty_amu_2loop_amu1L_amu2L(model, amu1L, amu2L);
1157 }
1158
1159 return delta_amu;
1160}
1161
1162/******************************************************************/
1163
1164static void print_package()
1165{
1166 static int do_print = 1;
1167
1168 if (do_print) {
1169 printf("===========================\n");
1170 printf("GM2Calc " GM2CALC_VERSION "\n");
1171 printf("http://gm2calc.hepforge.org\n");
1172 printf("===========================\n");
1173
1174 do_print = 0;
1175 }
1176}
1177
1178/******************************************************************/
1179
1180int GM2CalcSetFlags(int loopOrder_, int tanBetaResummation_, int forceOutput_,
1181 int runningCouplings_)
1182{
1183 char loop_order_str[12];
1184
1185 print_package();
1186
1187 if (loopOrder_ < 0 || loopOrder_ > 2) {
1188 snprintf(loop_order_str, sizeof(loop_order_str), "%d", loopOrder_);
1189 put_error_message("GM2CalcSetFlags", "wronglooporder", loop_order_str);
1190 }
1191
1192 config_flags.loopOrder = loopOrder_;
1193 config_flags.tanBetaResummation = tanBetaResummation_;
1194 config_flags.forceOutput = forceOutput_;
1195 config_flags.runningCouplings = runningCouplings_;
1196
1197 return 0;
1198}
1199
1200/******************************************************************/
1201
1202void GM2CalcGetFlags(void)
1203{
1204 MLPutFunction(stdlink, "List", 4);
1205 MLPutRuleToInteger(stdlink, config_flags.loopOrder, "loopOrder");
1206 MLPutRuleToString(stdlink, config_flags.tanBetaResummation ? "True" : "False", "tanBetaResummation");
1207 MLPutRuleToString(stdlink, config_flags.forceOutput ? "True" : "False", "forceOutput");
1208 MLPutRuleToString(stdlink, config_flags.runningCouplings ? "True" : "False", "runningCouplings");
1209 MLEndPacket(stdlink);
1210}
1211
1212/******************************************************************/
1213
1214int GM2CalcSetSMParameters(
1215 double alpha0_,
1216 double alphaMZ_,
1217 double alphaS_,
1218 double MhSM_,
1219 double MW_,
1220 double MZ_,
1221 double MT_,
1222 double mcmc_,
1223 double mu2GeV_,
1224 double mbmb_,
1225 double ms2GeV_,
1226 double md2GeV_,
1227 double Mv1_,
1228 double Mv2_,
1229 double Mv3_,
1230 double ML_,
1231 double MM_,
1232 double ME_,
1233 double CKM_real_11_,
1234 double CKM_real_12_,
1235 double CKM_real_13_,
1236 double CKM_real_21_,
1237 double CKM_real_22_,
1238 double CKM_real_23_,
1239 double CKM_real_31_,
1240 double CKM_real_32_,
1241 double CKM_real_33_,
1242 double CKM_imag_11_,
1243 double CKM_imag_12_,
1244 double CKM_imag_13_,
1245 double CKM_imag_21_,
1246 double CKM_imag_22_,
1247 double CKM_imag_23_,
1248 double CKM_imag_31_,
1249 double CKM_imag_32_,
1250 double CKM_imag_33_)
1251{
1252 sm.alpha_em_0 = alpha0_;
1253 sm.alpha_em_mz = alphaMZ_;
1254 sm.alpha_s_mz = alphaS_;
1255 sm.mh = MhSM_;
1256 sm.mw = MW_;
1257 sm.mz = MZ_;
1258 sm.mu[2] = MT_;
1259 sm.mu[1] = mcmc_;
1260 sm.mu[0] = mu2GeV_;
1261 sm.md[2] = mbmb_;
1262 sm.md[1] = ms2GeV_;
1263 sm.md[0] = md2GeV_;
1264 sm.mv[2] = Mv3_;
1265 sm.mv[1] = Mv2_;
1266 sm.mv[0] = Mv1_;
1267 sm.ml[2] = ML_;
1268 sm.ml[1] = MM_;
1269 sm.ml[0] = ME_;
1270 sm.ckm_real[0][0] = CKM_real_11_;
1271 sm.ckm_real[0][1] = CKM_real_12_;
1272 sm.ckm_real[0][2] = CKM_real_13_;
1273 sm.ckm_real[1][0] = CKM_real_21_;
1274 sm.ckm_real[1][1] = CKM_real_22_;
1275 sm.ckm_real[1][2] = CKM_real_23_;
1276 sm.ckm_real[2][0] = CKM_real_31_;
1277 sm.ckm_real[2][1] = CKM_real_32_;
1278 sm.ckm_real[2][2] = CKM_real_33_;
1279 sm.ckm_imag[0][0] = CKM_imag_11_;
1280 sm.ckm_imag[0][1] = CKM_imag_12_;
1281 sm.ckm_imag[0][2] = CKM_imag_13_;
1282 sm.ckm_imag[1][0] = CKM_imag_21_;
1283 sm.ckm_imag[1][1] = CKM_imag_22_;
1284 sm.ckm_imag[1][2] = CKM_imag_23_;
1285 sm.ckm_imag[2][0] = CKM_imag_31_;
1286 sm.ckm_imag[2][1] = CKM_imag_32_;
1287 sm.ckm_imag[2][2] = CKM_imag_33_;
1288
1289 return 0;
1290}
1291
1292/******************************************************************/
1293
1294void GM2CalcGetSMParameters(void)
1295{
1296 MLPutFunction(stdlink, "List", 19);
1297
1298 MLPutRuleToReal(stdlink, sm.alpha_em_0, "alpha0");
1299 MLPutRuleToReal(stdlink, sm.alpha_em_mz, "alphaMZ");
1300 MLPutRuleToReal(stdlink, sm.alpha_s_mz, "alphaS");
1301 MLPutRuleToReal(stdlink, sm.mh, "MhSM");
1302 MLPutRuleToReal(stdlink, sm.mw, "MW");
1303 MLPutRuleToReal(stdlink, sm.mz, "MZ");
1304 MLPutRuleToReal(stdlink, sm.mu[2], "MT");
1305 MLPutRuleToReal(stdlink, sm.mu[1], "mcmc");
1306 MLPutRuleToReal(stdlink, sm.mu[0], "mu2GeV");
1307 MLPutRuleToReal(stdlink, sm.md[2], "mbmb");
1308 MLPutRuleToReal(stdlink, sm.md[1], "ms2GeV");
1309 MLPutRuleToReal(stdlink, sm.md[0], "md2GeV");
1310 MLPutRuleToReal(stdlink, sm.mv[2], "Mv1");
1311 MLPutRuleToReal(stdlink, sm.mv[1], "Mv2");
1312 MLPutRuleToReal(stdlink, sm.mv[0], "Mv3");
1313 MLPutRuleToReal(stdlink, sm.ml[2], "ML");
1314 MLPutRuleToReal(stdlink, sm.ml[1], "MM");
1315 MLPutRuleToReal(stdlink, sm.ml[0], "ME");
1316 MLPutRuleToComplexMatrixTHDM(stdlink, sm.ckm, "CKM", 3, 3);
1317
1318 MLEndPacket(stdlink);
1319}
1320
1321/******************************************************************/
1322
1323void create_result_list(MSSMNoFV_onshell* model)
1324{
1325 double amu1L = 0, amu2L = 0;
1326 calculate_amu_mssmnofv(model, &amu1L, &amu2L);
1327 const double amu = amu1L + amu2L;
1328 const double Damu = calculate_uncertainty_mssmnofv(model, amu1L, amu2L);
1329
1330 MLPutFunction(stdlink, "List", 47);
1331 /* amu [4] */
1332 MLPutRuleToReal(stdlink, amu, "amu");
1333 MLPutRuleToReal(stdlink, amu1L, "amu1L");
1334 MLPutRuleToReal(stdlink, amu2L, "amu2L");
1335 MLPutRuleToReal(stdlink, Damu, "Damu");
1336 /* couplings [3] */
1337 MLPutRuleToReal(stdlink, sqr(gm2calc_mssmnofv_get_EL(model))/(4.*M_PI), "alphaMZ");
1338 MLPutRuleToReal(stdlink, sqr(gm2calc_mssmnofv_get_EL0(model))/(4.*M_PI), "alpha0");
1339 MLPutRuleToReal(stdlink, sqr(gm2calc_mssmnofv_get_g3(model))/(4.*M_PI), "alphaS");
1340 /* on-shell masses and parameters [40] */
1341 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MM(model), "MM");
1342 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MT(model), "MT");
1343 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MBMB(model), "mbmb");
1344 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MB(model), "mbMZ");
1345 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_ML(model), "ML");
1346 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MW(model), "MW");
1347 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MZ(model), "MZ");
1348 MLPutRuleToRealVectorInterface(stdlink, MSm, "MSm", 2);
1349 MLPutRuleToRealMatrixInterface(stdlink, USm, "USm", 2, 2);
1350 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MSvmL(model), "MSvmL");
1351 MLPutRuleToRealVectorInterface(stdlink, MStau, "MStau", 2);
1352 MLPutRuleToRealMatrixInterface(stdlink, UStau, "UStau", 2, 2);
1353 MLPutRuleToRealVectorInterface(stdlink, MSt, "MSt", 2);
1354 MLPutRuleToRealMatrixInterface(stdlink, USt, "USt", 2, 2);
1355 MLPutRuleToRealVectorInterface(stdlink, MSb, "MSb", 2);
1356 MLPutRuleToRealMatrixInterface(stdlink, USb, "USb", 2, 2);
1357 MLPutRuleToRealVectorInterface(stdlink, MCha, "MCha", 2);
1358 MLPutRuleToComplexMatrixInterface(stdlink, UM, "UM", 2, 2);
1359 MLPutRuleToComplexMatrixInterface(stdlink, UP, "UP", 2, 2);
1360 MLPutRuleToRealVectorInterface(stdlink, MChi, "MChi", 4);
1361 MLPutRuleToComplexMatrixInterface(stdlink, ZN, "ZN", 4, 4);
1362 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MAh(model), "MAh");
1363 MLPutRuleToRealVectorInterface(stdlink, Mhh, "Mhh", 2);
1364 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_TB(model), "TB");
1365 MLPutRuleToRealMatrixInterface(stdlink, Yu, "Yu", 3, 3);
1366 MLPutRuleToRealMatrixInterface(stdlink, Yd, "Yd", 3, 3);
1367 MLPutRuleToRealMatrixInterface(stdlink, Ye, "Ye", 3, 3);
1368 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_Mu(model), "Mu");
1369 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MassB(model), "MassB");
1370 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MassWB(model), "MassWB");
1371 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_MassG(model), "MassG");
1372 MLPutRuleToRealMatrixInterface(stdlink, mq2, "mq2", 3, 3);
1373 MLPutRuleToRealMatrixInterface(stdlink, ml2, "ml2", 3, 3);
1374 MLPutRuleToRealMatrixInterface(stdlink, mu2, "mu2", 3, 3);
1375 MLPutRuleToRealMatrixInterface(stdlink, md2, "md2", 3, 3);
1376 MLPutRuleToRealMatrixInterface(stdlink, me2, "me2", 3, 3);
1377 MLPutRuleToRealMatrixInterface(stdlink, Au, "Au", 3, 3);
1378 MLPutRuleToRealMatrixInterface(stdlink, Ad, "Ad", 3, 3);
1379 MLPutRuleToRealMatrixInterface(stdlink, Ae, "Ae", 3, 3);
1380 MLPutRuleToReal(stdlink, gm2calc_mssmnofv_get_scale(model), "Q");
1381 MLEndPacket(stdlink);
1382}
1383
1384/******************************************************************/
1385
1386void create_error_output(void)
1387{
1388 MLPutFunction(stdlink, "List", 0);
1389 MLEndPacket(stdlink);
1390}
1391
1392/******************************************************************/
1393
1394void GM2CalcAmuSLHAScheme(
1395 double MSvmL_,
1396 double MSm_1_,
1397 double MSm_2_,
1398 double MChi_1_,
1399 double MChi_2_,
1400 double MChi_3_,
1401 double MChi_4_,
1402 double MCha_1_,
1403 double MCha_2_,
1404 double MAh_,
1405 double TB_,
1406 double Mu_,
1407 double MassB_,
1408 double MassWB_,
1409 double MassG_,
1410 double mq2_11_,
1411 double mq2_22_,
1412 double mq2_33_,
1413 double ml2_11_,
1414 double ml2_22_,
1415 double ml2_33_,
1416 double mu2_11_,
1417 double mu2_22_,
1418 double mu2_33_,
1419 double md2_11_,
1420 double md2_22_,
1421 double md2_33_,
1422 double me2_11_,
1423 double me2_22_,
1424 double me2_33_,
1425 double Au_33_,
1426 double Ad_33_,
1427 double Ae_22_,
1428 double Ae_33_,
1429 double Q_
1430)
1431{
1432 struct SLHA_parameters pars;
1433 initialize_slha_parameters(&pars);
1434
1435 pars.MSvmL = MSvmL_;
1436 pars.MSm[0] = MSm_1_;
1437 pars.MSm[1] = MSm_2_;
1438 pars.MChi[0] = MChi_1_;
1439 pars.MChi[1] = MChi_2_;
1440 pars.MChi[2] = MChi_3_;
1441 pars.MChi[3] = MChi_4_;
1442 pars.MCha[0] = MCha_1_;
1443 pars.MCha[1] = MCha_2_;
1444 pars.MAh = MAh_;
1445 pars.TB = TB_;
1446 pars.Mu = Mu_;
1447 pars.MassB = MassB_;
1448 pars.MassWB = MassWB_;
1449 pars.MassG = MassG_;
1450 pars.mq2[0][0] = mq2_11_;
1451 pars.mq2[1][1] = mq2_22_;
1452 pars.mq2[2][2] = mq2_33_;
1453 pars.ml2[0][0] = ml2_11_;
1454 pars.ml2[1][1] = ml2_22_;
1455 pars.ml2[2][2] = ml2_33_;
1456 pars.mu2[0][0] = mu2_11_;
1457 pars.mu2[1][1] = mu2_22_;
1458 pars.mu2[2][2] = mu2_33_;
1459 pars.md2[0][0] = md2_11_;
1460 pars.md2[1][1] = md2_22_;
1461 pars.md2[2][2] = md2_33_;
1462 pars.me2[0][0] = me2_11_;
1463 pars.me2[1][1] = me2_22_;
1464 pars.me2[2][2] = me2_33_;
1465 pars.Au[2][2] = Au_33_;
1466 pars.Ad[2][2] = Ad_33_;
1467 pars.Ae[1][1] = Ae_22_;
1468 pars.Ae[2][2] = Ae_33_;
1469 pars.Q = Q_;
1470
1471 MSSMNoFV_onshell* model = gm2calc_mssmnofv_new();
1472 const gm2calc_error error = setup_model_slha_scheme(model, &pars);
1473
1474 if (gm2calc_mssmnofv_have_warning(model)) {
1475 char msg[400];
1476 gm2calc_mssmnofv_get_warnings(model, msg, sizeof(msg));
1477 put_error_message("GM2CalcAmuSLHAScheme", "warning", msg);
1478 }
1479
1480 if (error != gm2calc_NoError) {
1481 put_error_message("GM2CalcAmuSLHAScheme", "error",
1482 gm2calc_error_str(error));
1483 }
1484
1485 if (gm2calc_mssmnofv_have_problem(model)) {
1486 char msg[400];
1487 gm2calc_mssmnofv_get_problems(model, msg, sizeof(msg));
1488 put_error_message("GM2CalcAmuSLHAScheme", "error", msg);
1489 }
1490
1491 if (error == gm2calc_NoError || config_flags.forceOutput) {
1492 create_result_list(model);
1493 } else {
1494 create_error_output();
1495 }
1496
1497 gm2calc_mssmnofv_free(model);
1498}
1499
1500/******************************************************************/
1501
1502void GM2CalcAmuGM2CalcScheme(
1503 double MAh_,
1504 double TB_,
1505 double Mu_,
1506 double MassB_,
1507 double MassWB_,
1508 double MassG_,
1509 double mq2_11_,
1510 double mq2_22_,
1511 double mq2_33_,
1512 double ml2_11_,
1513 double ml2_22_,
1514 double ml2_33_,
1515 double mu2_11_,
1516 double mu2_22_,
1517 double mu2_33_,
1518 double md2_11_,
1519 double md2_22_,
1520 double md2_33_,
1521 double me2_11_,
1522 double me2_22_,
1523 double me2_33_,
1524 double Au_33_,
1525 double Ad_33_,
1526 double Ae_22_,
1527 double Ae_33_,
1528 double Q_)
1529{
1530 struct GM2Calc_parameters pars;
1531 initialize_gm2calc_parameters(&pars);
1532
1533 pars.MAh = MAh_;
1534 pars.TB = TB_;
1535 pars.Mu = Mu_;
1536 pars.MassB = MassB_;
1537 pars.MassWB = MassWB_;
1538 pars.MassG = MassG_;
1539 pars.mq2[0][0] = mq2_11_;
1540 pars.mq2[1][1] = mq2_22_;
1541 pars.mq2[2][2] = mq2_33_;
1542 pars.ml2[0][0] = ml2_11_;
1543 pars.ml2[1][1] = ml2_22_;
1544 pars.ml2[2][2] = ml2_33_;
1545 pars.mu2[0][0] = mu2_11_;
1546 pars.mu2[1][1] = mu2_22_;
1547 pars.mu2[2][2] = mu2_33_;
1548 pars.md2[0][0] = md2_11_;
1549 pars.md2[1][1] = md2_22_;
1550 pars.md2[2][2] = md2_33_;
1551 pars.me2[0][0] = me2_11_;
1552 pars.me2[1][1] = me2_22_;
1553 pars.me2[2][2] = me2_33_;
1554 pars.Au[2][2] = Au_33_;
1555 pars.Ad[2][2] = Ad_33_;
1556 pars.Ae[1][1] = Ae_22_;
1557 pars.Ae[2][2] = Ae_33_;
1558 pars.Q = Q_;
1559
1560 MSSMNoFV_onshell* model = gm2calc_mssmnofv_new();
1561 const gm2calc_error error = setup_model_gm2calc_scheme(model, &pars);
1562
1563 if (gm2calc_mssmnofv_have_warning(model)) {
1564 char msg[400];
1565 gm2calc_mssmnofv_get_warnings(model, msg, sizeof(msg));
1566 put_error_message("GM2CalcAmuGM2CalcScheme", "warning", msg);
1567 }
1568
1569 if (error != gm2calc_NoError) {
1570 put_error_message("GM2CalcAmuGM2CalcScheme", "error",
1571 gm2calc_error_str(error));
1572 }
1573
1574 if (gm2calc_mssmnofv_have_problem(model)) {
1575 char msg[400];
1576 gm2calc_mssmnofv_get_problems(model, msg, sizeof(msg));
1577 put_error_message("GM2CalcAmuGM2CalcScheme", "error", msg);
1578 }
1579
1580 if (error == gm2calc_NoError || config_flags.forceOutput) {
1581 create_result_list(model);
1582 } else {
1583 create_error_output();
1584 }
1585
1586 gm2calc_mssmnofv_free(model);
1587}
1588
1589/******************************************************************/
1590
1591void GM2CalcAmuTHDMGaugeBasis(
1592 int yukawa_type_,
1593 double lambda_1_,
1594 double lambda_2_,
1595 double lambda_3_,
1596 double lambda_4_,
1597 double lambda_5_,
1598 double lambda_6_,
1599 double lambda_7_,
1600 double TB_,
1601 double m122_,
1602 double zeta_u_,
1603 double zeta_d_,
1604 double zeta_l_,
1605 double Deltau_11_,
1606 double Deltau_12_,
1607 double Deltau_13_,
1608 double Deltau_21_,
1609 double Deltau_22_,
1610 double Deltau_23_,
1611 double Deltau_31_,
1612 double Deltau_32_,
1613 double Deltau_33_,
1614 double Deltad_11_,
1615 double Deltad_12_,
1616 double Deltad_13_,
1617 double Deltad_21_,
1618 double Deltad_22_,
1619 double Deltad_23_,
1620 double Deltad_31_,
1621 double Deltad_32_,
1622 double Deltad_33_,
1623 double Deltal_11_,
1624 double Deltal_12_,
1625 double Deltal_13_,
1626 double Deltal_21_,
1627 double Deltal_22_,
1628 double Deltal_23_,
1629 double Deltal_31_,
1630 double Deltal_32_,
1631 double Deltal_33_,
1632 double Piu_11_,
1633 double Piu_12_,
1634 double Piu_13_,
1635 double Piu_21_,
1636 double Piu_22_,
1637 double Piu_23_,
1638 double Piu_31_,
1639 double Piu_32_,
1640 double Piu_33_,
1641 double Pid_11_,
1642 double Pid_12_,
1643 double Pid_13_,
1644 double Pid_21_,
1645 double Pid_22_,
1646 double Pid_23_,
1647 double Pid_31_,
1648 double Pid_32_,
1649 double Pid_33_,
1650 double Pil_11_,
1651 double Pil_12_,
1652 double Pil_13_,
1653 double Pil_21_,
1654 double Pil_22_,
1655 double Pil_23_,
1656 double Pil_31_,
1657 double Pil_32_,
1658 double Pil_33_)
1659{
1660 if (yukawa_type_ < 1 || yukawa_type_ > 6) {
1661 put_error_message("GM2CalcAmuTHDMGaugeBasis", "error",
1662 "yukawaType must be between 1 and 6.");
1663 create_error_output();
1664 return;
1665 }
1666
1667 gm2calc_THDM_gauge_basis basis;
1668 basis.yukawa_type = int_to_c_yukawa_type(yukawa_type_);
1669 basis.lambda[0] = lambda_1_;
1670 basis.lambda[1] = lambda_2_;
1671 basis.lambda[2] = lambda_3_;
1672 basis.lambda[3] = lambda_4_;
1673 basis.lambda[4] = lambda_5_;
1674 basis.lambda[5] = lambda_6_;
1675 basis.lambda[6] = lambda_7_;
1676 basis.tan_beta = TB_;
1677 basis.m122 = m122_;
1678 basis.zeta_u = zeta_u_;
1679 basis.zeta_d = zeta_d_;
1680 basis.zeta_l = zeta_l_;
1681 basis.Delta_u[0][0] = Deltau_11_;
1682 basis.Delta_u[0][1] = Deltau_12_;
1683 basis.Delta_u[0][2] = Deltau_13_;
1684 basis.Delta_u[1][0] = Deltau_21_;
1685 basis.Delta_u[1][1] = Deltau_22_;
1686 basis.Delta_u[1][2] = Deltau_23_;
1687 basis.Delta_u[2][0] = Deltau_31_;
1688 basis.Delta_u[2][1] = Deltau_32_;
1689 basis.Delta_u[2][2] = Deltau_33_;
1690 basis.Delta_d[0][0] = Deltad_11_;
1691 basis.Delta_d[0][1] = Deltad_12_;
1692 basis.Delta_d[0][2] = Deltad_13_;
1693 basis.Delta_d[1][0] = Deltad_21_;
1694 basis.Delta_d[1][1] = Deltad_22_;
1695 basis.Delta_d[1][2] = Deltad_23_;
1696 basis.Delta_d[2][0] = Deltad_31_;
1697 basis.Delta_d[2][1] = Deltad_32_;
1698 basis.Delta_d[2][2] = Deltad_33_;
1699 basis.Delta_l[0][0] = Deltal_11_;
1700 basis.Delta_l[0][1] = Deltal_12_;
1701 basis.Delta_l[0][2] = Deltal_13_;
1702 basis.Delta_l[1][0] = Deltal_21_;
1703 basis.Delta_l[1][1] = Deltal_22_;
1704 basis.Delta_l[1][2] = Deltal_23_;
1705 basis.Delta_l[2][0] = Deltal_31_;
1706 basis.Delta_l[2][1] = Deltal_32_;
1707 basis.Delta_l[2][2] = Deltal_33_;
1708 basis.Pi_u[0][0] = Piu_11_;
1709 basis.Pi_u[0][1] = Piu_12_;
1710 basis.Pi_u[0][2] = Piu_13_;
1711 basis.Pi_u[1][0] = Piu_21_;
1712 basis.Pi_u[1][1] = Piu_22_;
1713 basis.Pi_u[1][2] = Piu_23_;
1714 basis.Pi_u[2][0] = Piu_31_;
1715 basis.Pi_u[2][1] = Piu_32_;
1716 basis.Pi_u[2][2] = Piu_33_;
1717 basis.Pi_d[0][0] = Pid_11_;
1718 basis.Pi_d[0][1] = Pid_12_;
1719 basis.Pi_d[0][2] = Pid_13_;
1720 basis.Pi_d[1][0] = Pid_21_;
1721 basis.Pi_d[1][1] = Pid_22_;
1722 basis.Pi_d[1][2] = Pid_23_;
1723 basis.Pi_d[2][0] = Pid_31_;
1724 basis.Pi_d[2][1] = Pid_32_;
1725 basis.Pi_d[2][2] = Pid_33_;
1726 basis.Pi_l[0][0] = Pil_11_;
1727 basis.Pi_l[0][1] = Pil_12_;
1728 basis.Pi_l[0][2] = Pil_13_;
1729 basis.Pi_l[1][0] = Pil_21_;
1730 basis.Pi_l[1][1] = Pil_22_;
1731 basis.Pi_l[1][2] = Pil_23_;
1732 basis.Pi_l[2][0] = Pil_31_;
1733 basis.Pi_l[2][1] = Pil_32_;
1734 basis.Pi_l[2][2] = Pil_33_;
1735
1736 gm2calc_THDM_config config;
1737 config.force_output = config_flags.forceOutput;
1738 config.running_couplings = config_flags.runningCouplings;
1739
1740 gm2calc_THDM* model = 0;
1741 gm2calc_error error = gm2calc_thdm_new_with_gauge_basis(&model, &basis, &sm, &config);
1742
1743 if (error == gm2calc_NoError) {
1744 double amu1L = 0, amu2LF = 0, amu2LB = 0;
1745 calculate_amu_thdm(model, &amu1L, &amu2LF, &amu2LB);
1746 const double damu = calculate_uncertainty_thdm(model, amu1L, amu2LF + amu2LB);
1747
1748 MLPutFunction(stdlink, "List", 5);
1749 MLPutRuleToReal(stdlink, amu1L + amu2LF + amu2LB, "amu");
1750 MLPutRuleToReal(stdlink, amu1L, "amu1L");
1751 MLPutRuleToReal(stdlink, amu2LF, "amu2LF");
1752 MLPutRuleToReal(stdlink, amu2LB, "amu2LB");
1753 MLPutRuleToReal(stdlink, damu, "Damu");
1754 MLEndPacket(stdlink);
1755 } else {
1756 put_error_message("GM2CalcAmuTHDMMassBasis", "error",
1757 gm2calc_error_str(error));
1758 create_error_output();
1759 }
1760
1761 gm2calc_thdm_free(model);
1762}
1763
1764/******************************************************************/
1765
1766void GM2CalcAmuTHDMMassBasis(
1767 int yukawa_type_,
1768 double Mhh_1_,
1769 double Mhh_2_,
1770 double MAh_,
1771 double MHp_,
1772 double sin_beta_minus_alpha_,
1773 double lambda_6_,
1774 double lambda_7_,
1775 double TB_,
1776 double m122_,
1777 double zeta_u_,
1778 double zeta_d_,
1779 double zeta_l_,
1780 double Deltau_11_,
1781 double Deltau_12_,
1782 double Deltau_13_,
1783 double Deltau_21_,
1784 double Deltau_22_,
1785 double Deltau_23_,
1786 double Deltau_31_,
1787 double Deltau_32_,
1788 double Deltau_33_,
1789 double Deltad_11_,
1790 double Deltad_12_,
1791 double Deltad_13_,
1792 double Deltad_21_,
1793 double Deltad_22_,
1794 double Deltad_23_,
1795 double Deltad_31_,
1796 double Deltad_32_,
1797 double Deltad_33_,
1798 double Deltal_11_,
1799 double Deltal_12_,
1800 double Deltal_13_,
1801 double Deltal_21_,
1802 double Deltal_22_,
1803 double Deltal_23_,
1804 double Deltal_31_,
1805 double Deltal_32_,
1806 double Deltal_33_,
1807 double Piu_11_,
1808 double Piu_12_,
1809 double Piu_13_,
1810 double Piu_21_,
1811 double Piu_22_,
1812 double Piu_23_,
1813 double Piu_31_,
1814 double Piu_32_,
1815 double Piu_33_,
1816 double Pid_11_,
1817 double Pid_12_,
1818 double Pid_13_,
1819 double Pid_21_,
1820 double Pid_22_,
1821 double Pid_23_,
1822 double Pid_31_,
1823 double Pid_32_,
1824 double Pid_33_,
1825 double Pil_11_,
1826 double Pil_12_,
1827 double Pil_13_,
1828 double Pil_21_,
1829 double Pil_22_,
1830 double Pil_23_,
1831 double Pil_31_,
1832 double Pil_32_,
1833 double Pil_33_)
1834{
1835 if (yukawa_type_ < 1 || yukawa_type_ > 6) {
1836 put_error_message("GM2CalcAmuTHDMMassBasis", "error",
1837 "yukawaType must be between 1 and 6.");
1838 create_error_output();
1839 return;
1840 }
1841
1842 gm2calc_THDM_mass_basis basis;
1843 basis.yukawa_type = int_to_c_yukawa_type(yukawa_type_);
1844 basis.mh = Mhh_1_;
1845 basis.mH = Mhh_2_;
1846 basis.mA = MAh_;
1847 basis.mHp = MHp_;
1848 basis.sin_beta_minus_alpha = sin_beta_minus_alpha_;
1849 basis.lambda_6 = lambda_6_;
1850 basis.lambda_7 = lambda_7_;
1851 basis.tan_beta = TB_;
1852 basis.m122 = m122_;
1853 basis.zeta_u = zeta_u_;
1854 basis.zeta_d = zeta_d_;
1855 basis.zeta_l = zeta_l_;
1856 basis.Delta_u[0][0] = Deltau_11_;
1857 basis.Delta_u[0][1] = Deltau_12_;
1858 basis.Delta_u[0][2] = Deltau_13_;
1859 basis.Delta_u[1][0] = Deltau_21_;
1860 basis.Delta_u[1][1] = Deltau_22_;
1861 basis.Delta_u[1][2] = Deltau_23_;
1862 basis.Delta_u[2][0] = Deltau_31_;
1863 basis.Delta_u[2][1] = Deltau_32_;
1864 basis.Delta_u[2][2] = Deltau_33_;
1865 basis.Delta_d[0][0] = Deltad_11_;
1866 basis.Delta_d[0][1] = Deltad_12_;
1867 basis.Delta_d[0][2] = Deltad_13_;
1868 basis.Delta_d[1][0] = Deltad_21_;
1869 basis.Delta_d[1][1] = Deltad_22_;
1870 basis.Delta_d[1][2] = Deltad_23_;
1871 basis.Delta_d[2][0] = Deltad_31_;
1872 basis.Delta_d[2][1] = Deltad_32_;
1873 basis.Delta_d[2][2] = Deltad_33_;
1874 basis.Delta_l[0][0] = Deltal_11_;
1875 basis.Delta_l[0][1] = Deltal_12_;
1876 basis.Delta_l[0][2] = Deltal_13_;
1877 basis.Delta_l[1][0] = Deltal_21_;
1878 basis.Delta_l[1][1] = Deltal_22_;
1879 basis.Delta_l[1][2] = Deltal_23_;
1880 basis.Delta_l[2][0] = Deltal_31_;
1881 basis.Delta_l[2][1] = Deltal_32_;
1882 basis.Delta_l[2][2] = Deltal_33_;
1883 basis.Pi_u[0][0] = Piu_11_;
1884 basis.Pi_u[0][1] = Piu_12_;
1885 basis.Pi_u[0][2] = Piu_13_;
1886 basis.Pi_u[1][0] = Piu_21_;
1887 basis.Pi_u[1][1] = Piu_22_;
1888 basis.Pi_u[1][2] = Piu_23_;
1889 basis.Pi_u[2][0] = Piu_31_;
1890 basis.Pi_u[2][1] = Piu_32_;
1891 basis.Pi_u[2][2] = Piu_33_;
1892 basis.Pi_d[0][0] = Pid_11_;
1893 basis.Pi_d[0][1] = Pid_12_;
1894 basis.Pi_d[0][2] = Pid_13_;
1895 basis.Pi_d[1][0] = Pid_21_;
1896 basis.Pi_d[1][1] = Pid_22_;
1897 basis.Pi_d[1][2] = Pid_23_;
1898 basis.Pi_d[2][0] = Pid_31_;
1899 basis.Pi_d[2][1] = Pid_32_;
1900 basis.Pi_d[2][2] = Pid_33_;
1901 basis.Pi_l[0][0] = Pil_11_;
1902 basis.Pi_l[0][1] = Pil_12_;
1903 basis.Pi_l[0][2] = Pil_13_;
1904 basis.Pi_l[1][0] = Pil_21_;
1905 basis.Pi_l[1][1] = Pil_22_;
1906 basis.Pi_l[1][2] = Pil_23_;
1907 basis.Pi_l[2][0] = Pil_31_;
1908 basis.Pi_l[2][1] = Pil_32_;
1909 basis.Pi_l[2][2] = Pil_33_;
1910
1911 gm2calc_THDM_config config;
1912 config.force_output = config_flags.forceOutput;
1913 config.running_couplings = config_flags.runningCouplings;
1914
1915 gm2calc_THDM* model = 0;
1916 gm2calc_error error = gm2calc_thdm_new_with_mass_basis(&model, &basis, &sm, &config);
1917
1918 if (error == gm2calc_NoError) {
1919 double amu1L = 0, amu2LF = 0, amu2LB = 0;
1920 calculate_amu_thdm(model, &amu1L, &amu2LF, &amu2LB);
1921 const double damu = calculate_uncertainty_thdm(model, amu1L, amu2LF + amu2LB);
1922
1923 MLPutFunction(stdlink, "List", 5);
1924 MLPutRuleToReal(stdlink, amu1L + amu2LF + amu2LB, "amu");
1925 MLPutRuleToReal(stdlink, amu1L, "amu1L");
1926 MLPutRuleToReal(stdlink, amu2LF, "amu2LF");
1927 MLPutRuleToReal(stdlink, amu2LB, "amu2LB");
1928 MLPutRuleToReal(stdlink, damu, "Damu");
1929 MLEndPacket(stdlink);
1930 } else {
1931 put_error_message("GM2CalcAmuTHDMMassBasis", "error",
1932 gm2calc_error_str(error));
1933 create_error_output();
1934 }
1935
1936 gm2calc_thdm_free(model);
1937}
1938
1939/******************************************************************/
1940
1941int main(int argc, char *argv[])
1942{
1943 gm2calc_sm_set_to_default(&sm);
1944 return MLMain(argc, argv);
1945}