Index: trunk/omega/tests/fermi_driver_UFO.sh =================================================================== --- trunk/omega/tests/fermi_driver_UFO.sh (revision 0) +++ trunk/omega/tests/fermi_driver_UFO.sh (revision 8275) @@ -0,0 +1,158 @@ +#! /bin/sh +# fermi_driver_UFO.sh -- +######################################################################## + +omega="$1" +shift + +models="sm_ufo" + +modules="" + +######################################################################## +while read prefix threshold abs_threshold n roots model i j eps mode process; do + + case $prefix in + + '#'*) # skip comments + ;; + + '') # skip empty lines + ;; + + '!'*) break + ;; + + *) + ######################################################################## + module=${prefix}_${i}_${j} + modules="$modules $module" + eval threshold_$module=$threshold + eval abs_threshold_$module=$abs_threshold + eval n_$module=$n + eval i_$module=$i + eval j_$module=$j + eval eps_$module=$eps + eval roots_$module=$roots + eval process_$module="'$process'" + ######################################################################## + + # echo "running $omega_bin -$mode '$process'" 1>&2 + $omega "$@" -model:exec \ + -target:parameter_module parameters_sm_ufo \ + -target:module amplitude_fermi_ufo_$module \ + -$mode "$process" 2>/dev/null + ;; + esac + +done +######################################################################## + +for module in $modules; do + +cat < number_particles_in + p%number_particles_out => number_particles_out + p%number_spin_states => number_spin_states + p%spin_states => spin_states + p%number_flavor_states => number_flavor_states + p%flavor_states => flavor_states + p%number_color_indices => number_color_indices + p%number_color_flows => number_color_flows + p%color_flows => color_flows + p%number_color_factors => number_color_factors + p%color_factors => color_factors + p%color_sum => color_sum + p%new_event => new_event + p%reset_helicity_selection => reset_helicity_selection + p%is_allowed => is_allowed + p%get_amplitude => get_amplitude + end function load +end module interface_fermi_ufo_${module} + +EOF + +done + +######################################################################## + +cat < load +EOF +done + +for model in $models; do +cat < setup_parameters +EOF +done + +cat < $j)" + call check (load_$module (), i = $i, j = $j, eps = $eps, & + roots = real ($roots, kind=default), & + threshold = real ($threshold, kind=default), & + abs_threshold = real ($abs_threshold, kind=default), & + n = $n, seed = SEED, & + failures = failures, attempts = attempts) + if (failures > 0) then + print *, failures, " failures in ", attempts, " attempts" + failed_processes = failed_processes + 1 + end if +EOF +done + +cat < 0) then + print *, failed_processes, " failed processes in ", attempted_processes, " attempts" + stop 1 + end if +end program fermi_ufo_driver +EOF + +exit 0 Index: trunk/omega/tests/parameters_MSSM.f90 =================================================================== --- trunk/omega/tests/parameters_MSSM.f90 (revision 0) +++ trunk/omega/tests/parameters_MSSM.f90 (revision 8275) @@ -0,0 +1,3958 @@ +! parameters.MSSM.omega.f90 +! +! Copyright (C) 1999-2019 by +! Wolfgang Kilian +! Thorsten Ohl +! Juergen Reuter +! with contributions from +! cf. main AUTHORS file +! +! WHIZARD is free software; you can redistribute it and/or modify it +! under the terms of the GNU General Public License as published by +! the Free Software Foundation; either version 2, or (at your option) +! any later version. +! +! WHIZARD is distributed in the hope that it will be useful, but +! WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU General Public License for more details. +! +! You should have received a copy of the GNU General Public License +! along with this program; if not, write to the Free Software +! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +module parameters_mssm + use kinds + use constants + implicit none + private + public :: init_parameters, model_update_alpha_s + real(kind=default), dimension(70), save, public :: mass = 0, width = 0 + real(kind=default), parameter, public :: GeV = 1.0_default + real(kind=default), parameter, public :: MeV = GeV / 1000 + real(kind=default), parameter, public :: keV = MeV / 1000 + real(kind=default), parameter, public :: TeV = GeV * 1000 + real(kind=default), save, public :: & + alpha = 1.0_default / 137.0359895_default, & + sin2thw = 0.23124_default + integer, save, public :: & + sign1 = +1, sign2 = +1, sign3 = +1, sign4 = +1 + real(kind=default), save, public :: & + sigch1 = +1, sigch2 = +1 + complex(kind=default), save, private :: vev + real(kind=default), public, save :: sind = 0._default, & + cosd = 1._default, sinckm12 = 0.223_default, & + sinckm13 = 0.004_default, sinckm23 = 0.04_default, & + tana = 30._default, tanb = 30._default, as = 0._default + real(kind=default), public, save :: cos2am2b, sin2am2b, sinamb, & + sinapb, cosamb, cosapb, cos4be, sin4be, sin4al, sin2al, sin2be, cos2al, & + cos2be, cosbe, sinbe, cosal, sinal, costhw, sinthw + real(kind=default), public, save :: q_lep, q_up, q_down + complex(kind=default), public, save :: gcc, qchar, qdwn, qup, qlep, & + gz, g, e, gs + complex(kind=default), save, public :: xia = 1, xi0 = 1, xipm = 1 + complex(kind=default), dimension(2), public, save :: gncdwn + complex(kind=default), dimension(2), public, save :: gncup + complex(kind=default), dimension(2), public, save :: gnclep + complex(kind=default), dimension(2), public, save :: gncneu + complex(kind=default), public, save :: g_yuk_ch1_sn1_2_c, & + g_yuk_ch1_sn1_2, g_yuk_ch1_sn1_1_c, g_yuk_ch1_sn1_1, g_yuk_ch2_sn1_2_c, & + g_yuk_ch2_sn1_2, g_yuk_ch2_sn1_1_c, g_yuk_ch2_sn1_1 + complex(kind=default), public, save :: g_yuk_ch2_su1_1_2_c, & + g_yuk_ch2_su1_1_2, g_yuk_ch2_sd1_1_2_c, g_yuk_ch2_sd1_1_2, & + g_yuk_ch1_su1_1_2_c, g_yuk_ch1_su1_1_2, g_yuk_ch1_sd1_1_2_c, & + g_yuk_ch1_sd1_1_2, g_yuk_ch2_su1_1_1_c, g_yuk_ch2_su1_1_1, & + g_yuk_ch2_sd1_1_1_c, g_yuk_ch2_sd1_1_1, g_yuk_ch1_su1_1_1_c, & + g_yuk_ch1_su1_1_1, g_yuk_ch1_sd1_1_1_c, g_yuk_ch1_sd1_1_1, & + g_yuk_ch2_su1_2_2_c, g_yuk_ch2_su1_2_2, g_yuk_ch2_sd1_2_2_c, & + g_yuk_ch2_sd1_2_2, g_yuk_ch1_su1_2_2_c, g_yuk_ch1_su1_2_2, & + g_yuk_ch1_sd1_2_2_c, g_yuk_ch1_sd1_2_2, g_yuk_ch2_su1_2_1_c, & + g_yuk_ch2_su1_2_1, g_yuk_ch2_sd1_2_1_c, g_yuk_ch2_sd1_2_1, & + g_yuk_ch1_su1_2_1_c, g_yuk_ch1_su1_2_1, g_yuk_ch1_sd1_2_1_c, & + g_yuk_ch1_sd1_2_1 + complex(kind=default), public, save :: g_yuk_n4_sn1_3_c, g_yuk_n4_sn1_3, & + g_yuk_n4_sn1_2_c, g_yuk_n4_sn1_2, g_yuk_n4_sn1_1_c, g_yuk_n4_sn1_1, & + g_yuk_n3_sn1_3_c, g_yuk_n3_sn1_3, g_yuk_n3_sn1_2_c, g_yuk_n3_sn1_2, & + g_yuk_n3_sn1_1_c, g_yuk_n3_sn1_1, g_yuk_n2_sn1_3_c, g_yuk_n2_sn1_3, & + g_yuk_n2_sn1_2_c, g_yuk_n2_sn1_2, g_yuk_n2_sn1_1_c, g_yuk_n2_sn1_1, & + g_yuk_n1_sn1_3_c, g_yuk_n1_sn1_3, g_yuk_n1_sn1_2_c, g_yuk_n1_sn1_2, & + g_yuk_n1_sn1_1_c, g_yuk_n1_sn1_1, g_yuk_ch2_sl2_3_c, g_yuk_ch2_sl2_3, & + g_yuk_ch2_sl1_3_c, g_yuk_ch2_sl1_3, g_yuk_ch2_sl1_2_c, g_yuk_ch2_sl1_2, & + g_yuk_ch2_sl1_1_c, g_yuk_ch2_sl1_1, g_yuk_ch1_sl2_3_c, g_yuk_ch1_sl2_3, & + g_yuk_ch1_sl1_3_c, g_yuk_ch1_sl1_3, g_yuk_ch1_sl1_2_c, g_yuk_ch1_sl1_2, & + g_yuk_ch1_sl1_1_c, g_yuk_ch1_sl1_1, ghsu2sd2_3_3_c, ghsu2sd2_3_3, & + ghsu2sd1_3_3_c, ghsu2sd1_3_3, ghsu1sd2_3_3_c, ghsu1sd2_3_3, ghsu1sd1_3_3_c, & + ghsu1sd1_3_3, ghsu2sd2_3_2_c, ghsu2sd2_3_2, ghsu2sd1_3_2_c, ghsu2sd1_3_2, & + ghsu1sd2_3_2_c, ghsu1sd2_3_2, ghsu1sd1_3_2_c, ghsu1sd1_3_2, ghsu2sd2_3_1_c, & + ghsu2sd2_3_1, ghsu2sd1_3_1_c, ghsu2sd1_3_1, ghsu1sd2_3_1_c + complex(kind=default), public, save :: ghsu1sd2_3_1, ghsu1sd1_3_1_c, & + ghsu1sd1_3_1, ghsu2sd2_2_3_c, ghsu2sd2_2_3, ghsu2sd1_2_3_c, ghsu2sd1_2_3, & + ghsu1sd2_2_3_c, ghsu1sd2_2_3, ghsu1sd1_2_3_c, ghsu1sd1_2_3, ghsu1sd1_2_2_c, & + ghsu1sd1_2_2, ghsu1sd1_2_1_c, ghsu1sd1_2_1, ghsu2sd2_1_3_c, ghsu2sd2_1_3, & + ghsu2sd1_1_3_c, ghsu2sd1_1_3, ghsu1sd2_1_3_c, ghsu1sd2_1_3, ghsu1sd1_1_3_c, & + ghsu1sd1_1_3, ghsu1sd1_1_2_c, ghsu1sd1_1_2, ghsu1sd1_1_1_c, ghsu1sd1_1_1, & + gh2sn1sn1_3, gh1sn1sn1_3, ghsnsl2_3_c, ghsnsl2_3, ghsnsl1_3_c, ghsnsl1_3, & + gh2sd2sd2_3, gh2su2su2_3, gh2sl2sl2_3, gh1sd2sd2_3, gh1su2su2_3, gh1sl2sl2_3 + complex(kind=default), public, save :: g_yuk_n4_sd2_2_c, g_yuk_n4_sd2_2, & + g_yuk_n4_su2_2_c, g_yuk_n4_su2_2, g_yuk_n4_sl2_2_c, g_yuk_n4_sl2_2, & + g_yuk_n3_sd2_2_c, g_yuk_n3_sd2_2, g_yuk_n3_su2_2_c, g_yuk_n3_su2_2, & + g_yuk_n3_sl2_2_c, g_yuk_n3_sl2_2, g_yuk_n2_sd2_2_c, g_yuk_n2_sd2_2, & + g_yuk_n2_su2_2_c, g_yuk_n2_su2_2, g_yuk_n2_sl2_2_c, g_yuk_n2_sl2_2, & + g_yuk_n1_sd2_2_c, g_yuk_n1_sd2_2, g_yuk_n1_su2_2_c, g_yuk_n1_su2_2, & + g_yuk_n1_sl2_2_c, g_yuk_n1_sl2_2, g_yuk_n4_sd1_2_c, g_yuk_n4_sd1_2, & + g_yuk_n4_su1_2_c, g_yuk_n4_su1_2, g_yuk_n4_sl1_2_c, g_yuk_n4_sl1_2, & + g_yuk_n3_sd1_2_c, g_yuk_n3_sd1_2, g_yuk_n3_su1_2_c, g_yuk_n3_su1_2, & + g_yuk_n3_sl1_2_c, g_yuk_n3_sl1_2, g_yuk_n2_sd1_2_c, g_yuk_n2_sd1_2, & + g_yuk_n2_su1_2_c, g_yuk_n2_su1_2, g_yuk_n2_sl1_2_c, g_yuk_n2_sl1_2, & + g_yuk_n1_sd1_2_c, g_yuk_n1_sd1_2, g_yuk_n1_su1_2_c, g_yuk_n1_su1_2, & + g_yuk_n1_sl1_2_c, g_yuk_n1_sl1_2, g_yuk_n4_sd2_1_c, g_yuk_n4_sd2_1, & + g_yuk_n4_su2_1_c, g_yuk_n4_su2_1, g_yuk_n4_sl2_1_c, g_yuk_n4_sl2_1, & + g_yuk_n3_sd2_1_c, g_yuk_n3_sd2_1, g_yuk_n3_su2_1_c, g_yuk_n3_su2_1, & + g_yuk_n3_sl2_1_c, g_yuk_n3_sl2_1, g_yuk_n2_sd2_1_c, g_yuk_n2_sd2_1, & + g_yuk_n2_su2_1_c, g_yuk_n2_su2_1, g_yuk_n2_sl2_1_c, g_yuk_n2_sl2_1, & + g_yuk_n1_sd2_1_c, g_yuk_n1_sd2_1, g_yuk_n1_su2_1_c, g_yuk_n1_su2_1, & + g_yuk_n1_sl2_1_c, g_yuk_n1_sl2_1, g_yuk_n4_sd1_1_c, g_yuk_n4_sd1_1, & + g_yuk_n4_su1_1_c, g_yuk_n4_su1_1, g_yuk_n4_sl1_1_c, g_yuk_n4_sl1_1, & + g_yuk_n3_sd1_1_c, g_yuk_n3_sd1_1, g_yuk_n3_su1_1_c, g_yuk_n3_su1_1, & + g_yuk_n3_sl1_1_c, g_yuk_n3_sl1_1, g_yuk_n2_sd1_1_c, g_yuk_n2_sd1_1, & + g_yuk_n2_su1_1_c, g_yuk_n2_su1_1, g_yuk_n2_sl1_1_c, g_yuk_n2_sl1_1, & + g_yuk_n1_sd1_1_c, g_yuk_n1_sd1_1, g_yuk_n1_su1_1_c, g_yuk_n1_su1_1, & + g_yuk_n1_sl1_1_c, g_yuk_n1_sl1_1 + complex(kind=default), public, save :: gh2sd2sd1_3, gh2su2su1_3, & + gh2sl2sl1_3, gh1sd2sd1_3, gh1su2su1_3, gh1sl2sl1_3, & + gh2sd1sd2_3, gh2su1su2_3, gh2sl1sl2_3, gh1sd1sd2_3, & + gh1su1su2_3, gh1sl1sl2_3, gh2sd1sd1_3, & + gh2su1su1_3, gh2sl1sl1_3, gh1sd1sd1_3, gh1su1su1_3, gh1sl1sl1_3, & + gh2sn1sn1_2, gh1sn1sn1_2, ghsnsl1_2_c, ghsnsl1_2, & + gh2sd2sd2_2, gh2su2su2_2, gh2sl2sl2_2, & + gh1sd2sd2_2, gh1su2su2_2, gh1sl2sl2_2, & + gh2sd1sd1_2, gh2su1su1_2, gh2sl1sl1_2, gh1sd1sd1_2, & + gh1su1su1_2, gh1sl1sl1_2, gh2sn1sn1_1, gh1sn1sn1_1 + !!! complex(kind=default), public, save :: ghsnsl2_1, ghsnsl2_1_c & + !!! ghsnsl2_2_c, ghsnsl2_2, + complex(kind=default), public, save :: ghsnsl1_1_c, ghsnsl1_1, & + gh2sd2sd2_1, gh2su2su2_1, gh2sl2sl2_1, & + gh1sd2sd2_1, gh1su2su2_1, gh1sl2sl2_1, & + gh2sd1sd1_1, gh2su1su1_1, gh2sl1sl1_1, gh1sd1sd1_1, & + gh1su1su1_1, gh1sl1sl1_1 + complex(kind=default), public, save :: gasl2sl2_3, gasl2sl1_3, & + gasl1sl2_3, gasl1sl1_3 !!! , gasl2sl2_2, gasl2sl1_2, gasl1sl2_2, & + !!! gasl1sl1_2, gasl2sl2_1, gasl2sl1_1, gasl1sl2_1, gasl1sl1_1 + complex(kind=default), public, save :: gasu2su2_3, gasu2su1_3, & + gasu1su2_3, gasu1su1_3 !!! , gasu2su2_2, gasu2su1_2, gasu1su2_2, & + !!! gasu1su1_2, gasu2su2_1, gasu2su1_1, gasu1su2_1, gasu1su1_1 + complex(kind=default), public, save :: gasd2sd2_3, gasd2sd1_3, & + gasd1sd2_3, gasd1sd1_3 !!! , gasd2sd2_2, gasd2sd1_2, gasd1sd2_2, & + !!! gasd1sd1_2, gasd2sd2_1, gasd2sd1_1, gasd1sd2_1, gasd1sd1_1 + complex(kind=default), public, save :: g_h43_321susd, g_h43_312susd, & + g_h43_322susd, g_h43_311susd, g_h43_221susd, g_h43_212susd, g_h43_222susd, & + g_h43_211susd, g_h43_121susd + complex(kind=default), public, save :: g_h43_112susd, g_h43_122susd, & + g_h43_111susd, g_h42_321susd, g_h42_312susd, g_h42_322susd, g_h42_311susd, & + g_h42_211susd, g_h42_111susd, g_h41_321susd, g_h41_312susd, g_h41_322susd, & + g_h41_311susd, g_h41_211susd, g_h41_111susd, & + g_h4312slsn, g_h4311slsn, g_h3321slsl, g_h3312slsl, g_h2321slsl, & + g_h2312slsl, g_h2322slsl, g_h2311slsl, g_h2311snsn, g_h1321slsl, & + g_h1312slsl, g_h1322slsl, g_h1311slsl, g_h1311snsn, g_h3321sdsd, & + g_h3312sdsd, g_h3321susu, g_h3312susu, g_h2321sdsd, g_h2312sdsd, & + g_h2322sdsd, g_h2311sdsd, g_h2321susu, g_h2312susu, g_h2322susu, & + g_h2311susu, g_h1321sdsd, g_h1312sdsd, g_h1322sdsd, g_h1311sdsd, & + g_h1321susu, g_h1312susu, g_h1322susu, g_h1311susu, g_h4211slsn, & + g_h2222slsl, g_h2211slsl + complex(kind=default), public, save :: g_h2211snsn, & + g_h1222slsl, g_h1211slsl, g_h1211snsn, g_h2222sdsd, g_h2211sdsd, & + g_h2222susu, g_h2211susu, g_h1222sdsd, g_h1211sdsd, g_h1222susu, & + g_h1211susu, g_h4111slsn, g_h2122slsl, g_h2111slsl, g_h2111snsn, & + g_h1122slsl, g_h1111slsl, g_h1111snsn, g_h2122sdsd, g_h2111sdsd, & + g_h2122susu, g_h2111susu, g_h1122sdsd, g_h1111sdsd, & + g_h1122susu, g_h1111susu, gnzn_4_4, gnzn_3_3, gnzn_2_2, & + gnzn_1_1, rnch_42, lnch_42, rnc_42 + complex(kind=default), public, save :: gcicih1_1_1, gcicih1_2_2, & + gcicih1_3_3, gcicih1_4_4, gcicih2_1_1, gcicih2_2_2, gcicih2_3_3, & + gcicih2_4_4, gcicia_1_1, gcicia_2_2, gcicia_3_3, gcicia_4_4 + !!! complex(kind=default), public, save :: g_h3112susu, g_h3121susu, & + !!! g_h3112sdsd, g_h3121sdsd, g_h3112slsl, g_h3121slsl, g_h3212susu, & + !!! g_h3221susu, g_h3212sdsd, g_h3221sdsd, g_h3212slsl, g_h3221slsl, & + !!! complex(kind=default), public, save :: g_h4112slsn, g_h4212slsn, & + complex(kind=default), public, save :: lnc_42, rnch_41, & + lnch_41, rnc_41, lnc_41, rnch_32, lnch_32, rnc_32, lnc_32, rnch_31, & + lnch_31, rnc_31, lnc_31, rnch_22, lnch_22, rnc_22, lnc_22, rnch_21, & + lnch_21, rnc_21, lnc_21, rnch_12, lnch_12, rnc_12, lnc_12, rnch_11, & + lnch_11, rnc_11, lnc_11, rcn_24, lcn_24, rcn_23, lcn_23, rcn_22, & + lcn_22, rcn_21, lcn_21 + complex(kind=default), public, save :: gch1c_1_1, gch1c_2_2, & + gch2c_1_1, gch2c_2_2, gcac_1_1, gcac_2_2 + complex(kind=default), public, save :: rcn_14, lcn_14, & + rcn_13, lcn_13, rcn_12, lcn_12, rcn_11, lcn_11, ap_22, vp_22, & + ap_21, vp_21, ap_12, vp_12, ap_11, vp_11, pnna_44, snna_44, & + pnnh2_44, snnh2_44, pnnh1_44 + complex(kind=default), public, save :: snnh1_44, axial0_44, vector0_44, & + pnna_34, snna_34, pnnh2_34, snnh2_34, pnnh1_34, & + snnh1_34, axial0_34, vector0_34, pnna_33, snna_33, & + pnnh2_33, snnh2_33, pnnh1_33, snnh1_33, axial0_33, vector0_33 + complex(kind=default), public, save :: pnna_24, & + snna_24, pnnh2_24, snnh2_24, pnnh1_24, snnh1_24, & + axial0_24, vector0_24, pnna_23, snna_23, pnnh2_23, snnh2_23, & + pnnh1_23, snnh1_23, axial0_23, vector0_23, pnna_22, snna_22, & + pnnh2_22, snnh2_22, pnnh1_22, snnh1_22, axial0_22, vector0_22, & + pnna_14, snna_14, pnnh2_14, snnh2_14, pnnh1_14, snnh1_14, & + axial0_14, vector0_14, pnna_13, snna_13, pnnh2_13, snnh2_13, & + pnnh1_13, snnh1_13, axial0_13, vector0_13, pnna_12, snna_12, & + pnnh2_12 + complex(kind=default), public, save :: snnh2_12, pnnh1_12, snnh1_12, & + axial0_12, vector0_12, pnna_11, snna_11, pnnh2_11, snnh2_11, & + pnnh1_11, snnh1_11, axial0_11, vector0_11, gglwsu2sd1_3_3_c, gglwsu1sd2_3_3_c, & + gglwsu2sd2_3_3_c, gglwsu1sd1_3_3_c, gglwsu2sd1_3_3, gglwsu1sd2_3_3, & + gglwsu2sd2_3_3, gglwsu1sd1_3_3, gglwsu2sd1_3_2_c, gglwsu1sd2_3_2_c, & + gglwsu2sd2_3_2_c, gglwsu1sd1_3_2_c, gglwsu2sd1_3_2, gglwsu1sd2_3_2, & + gglwsu2sd2_3_2, gglwsu1sd1_3_2, gglwsu2sd1_3_1_c, gglwsu1sd2_3_1_c, & + gglwsu2sd2_3_1_c, gglwsu1sd1_3_1_c, gglwsu2sd1_3_1, gglwsu1sd2_3_1, & + gglwsu2sd2_3_1, gglwsu1sd1_3_1, gglwsu2sd1_2_3_c, gglwsu1sd2_2_3_c, & + gglwsu2sd2_2_3_c, gglwsu1sd1_2_3_c, gglwsu2sd1_2_3, gglwsu1sd2_2_3, & + gglwsu2sd2_2_3, gglwsu1sd1_2_3, gglwsu2sd1_2_2_c, gglwsu1sd2_2_2_c, & + gglwsu2sd2_2_2_c, gglwsu1sd1_2_2_c, gglwsu2sd1_2_2, gglwsu1sd2_2_2, & + gglwsu2sd2_2_2, gglwsu1sd1_2_2, gglwsu2sd1_2_1_c, gglwsu1sd2_2_1_c, & + gglwsu2sd2_2_1_c, gglwsu1sd1_2_1_c, gglwsu2sd1_2_1, gglwsu1sd2_2_1, & + gglwsu2sd2_2_1, gglwsu1sd1_2_1, gglwsu2sd1_1_3_c, gglwsu1sd2_1_3_c, & + gglwsu2sd2_1_3_c, gglwsu1sd1_1_3_c, gglwsu2sd1_1_3, gglwsu1sd2_1_3 + complex(kind=default), public, save :: gglwsu2sd2_1_3, gglwsu1sd1_1_3, & + gglwsu2sd1_1_2_c, gglwsu1sd2_1_2_c, gglwsu2sd2_1_2_c, gglwsu1sd1_1_2_c, & + gglwsu2sd1_1_2, gglwsu1sd2_1_2, gglwsu2sd2_1_2, gglwsu1sd1_1_2, & + gglwsu2sd1_1_1_c, gglwsu1sd2_1_1_c, gglwsu2sd2_1_1_c, gglwsu1sd1_1_1_c, & + gglwsu2sd1_1_1, gglwsu1sd2_1_1, gglwsu2sd2_1_1, gglwsu1sd1_1_1, mix_sd322, & + mix_sd321, mix_sd312, mix_sd311, mix_sd222, mix_sd221, mix_sd212, & + mix_sd211, mix_sd122, mix_sd121, mix_sd112, mix_sd111, mix_su322, & + mix_su321, mix_su312, mix_su311, mix_su222, mix_su221, mix_su212, & + mix_su211, mix_su122, mix_su121, mix_su112, mix_su111, mix_sl322, & + mix_sl321, mix_sl312, mix_sl311, mix_sl222, mix_sl221, mix_sl212, & + mix_sl211, mix_sl122, mix_sl121, mix_sl112, mix_sl111, gglsd2sd1_3, & + gglsd1sd2_3, gglsd2sd2_3, gglsd1sd1_3, gglsu2su1_3, gglsu1su2_3, & + gglsu2su2_3, gglsu1su1_3, gglsd2sd1_2, gglsd1sd2_2, gglsd2sd2_2, & + gglsd1sd1_2, gglsu2su1_2, gglsu1su2_2, gglsu2su2_2 + complex(kind=default), public, save :: gglsu1su1_2, gglsd2sd1_1, & + gglsd1sd2_1, gglsd2sd2_1, gglsd1sd1_1, gglsu2su1_1, gglsu1su2_1, & + gglsu2su2_1, gglsu1su1_1, gglpsqsq, gglglsqsq, gzwpsu2sd1_3_3_c, & + gzwpsu1sd2_3_3_c, gzwpsu2sd2_3_3_c, gzwpsu1sd1_3_3_c, gzwpsu2sd1_3_3, & + gzwpsu1sd2_3_3, gzwpsu2sd2_3_3, gzwpsu1sd1_3_3, gpwpsu2sd1_3_3_c, & + gpwpsu1sd2_3_3_c, gpwpsu2sd2_3_3_c, gpwpsu1sd1_3_3_c, gpwpsu2sd1_3_3, & + gpwpsu1sd2_3_3, gpwpsu2sd2_3_3, gpwpsu1sd1_3_3, gzwpsu2sd1_3_2_c, & + gzwpsu1sd2_3_2_c, gzwpsu2sd2_3_2_c, gzwpsu1sd1_3_2_c, gzwpsu2sd1_3_2, & + gzwpsu1sd2_3_2, gzwpsu2sd2_3_2, gzwpsu1sd1_3_2, gpwpsu2sd1_3_2_c, & + gpwpsu1sd2_3_2_c, gpwpsu2sd2_3_2_c, gpwpsu1sd1_3_2_c, gpwpsu2sd1_3_2, & + gpwpsu1sd2_3_2, gpwpsu2sd2_3_2, gpwpsu1sd1_3_2, gzwpsu2sd1_3_1_c, & + gzwpsu1sd2_3_1_c, gzwpsu2sd2_3_1_c, gzwpsu1sd1_3_1_c, gzwpsu2sd1_3_1, & + gzwpsu1sd2_3_1, gzwpsu2sd2_3_1, gzwpsu1sd1_3_1, gpwpsu2sd1_3_1_c, & + gpwpsu1sd2_3_1_c, gpwpsu2sd2_3_1_c, gpwpsu1sd1_3_1_c, gpwpsu2sd1_3_1, & + gpwpsu1sd2_3_1, gpwpsu2sd2_3_1, gpwpsu1sd1_3_1, gzwpsu2sd1_2_3_c, & + gzwpsu1sd2_2_3_c, gzwpsu2sd2_2_3_c, gzwpsu1sd1_2_3_c, gzwpsu2sd1_2_3, & + gzwpsu1sd2_2_3, gzwpsu2sd2_2_3, gzwpsu1sd1_2_3, gpwpsu2sd1_2_3_c, & + gpwpsu1sd2_2_3_c + complex(kind=default), public, save :: gpwpsu2sd2_2_3_c, gpwpsu1sd1_2_3_c, & + gpwpsu2sd1_2_3, gpwpsu1sd2_2_3, gpwpsu2sd2_2_3, gpwpsu1sd1_2_3, & + gzwpsu2sd1_2_2_c, gzwpsu1sd2_2_2_c, gzwpsu2sd2_2_2_c, gzwpsu1sd1_2_2_c, & + gzwpsu2sd1_2_2, gzwpsu1sd2_2_2, gzwpsu2sd2_2_2, gzwpsu1sd1_2_2, & + gpwpsu2sd1_2_2_c, gpwpsu1sd2_2_2_c, gpwpsu2sd2_2_2_c, gpwpsu1sd1_2_2_c, & + gpwpsu2sd1_2_2, gpwpsu1sd2_2_2, gpwpsu2sd2_2_2, gpwpsu1sd1_2_2, & + gzwpsu2sd1_2_1_c, gzwpsu1sd2_2_1_c, gzwpsu2sd2_2_1_c, gzwpsu1sd1_2_1_c, & + gzwpsu2sd1_2_1, gzwpsu1sd2_2_1, gzwpsu2sd2_2_1, gzwpsu1sd1_2_1, & + gpwpsu2sd1_2_1_c, gpwpsu1sd2_2_1_c, gpwpsu2sd2_2_1_c, gpwpsu1sd1_2_1_c, & + gpwpsu2sd1_2_1, gpwpsu1sd2_2_1, gpwpsu2sd2_2_1, gpwpsu1sd1_2_1, & + gzwpsu2sd1_1_3_c, gzwpsu1sd2_1_3_c, gzwpsu2sd2_1_3_c, gzwpsu1sd1_1_3_c, & + gzwpsu2sd1_1_3, gzwpsu1sd2_1_3, gzwpsu2sd2_1_3, gzwpsu1sd1_1_3, & + gpwpsu2sd1_1_3_c, gpwpsu1sd2_1_3_c, gpwpsu2sd2_1_3_c, gpwpsu1sd1_1_3_c, & + gpwpsu2sd1_1_3, gpwpsu1sd2_1_3, gpwpsu2sd2_1_3, gpwpsu1sd1_1_3, & + gzwpsu2sd1_1_2_c, gzwpsu1sd2_1_2_c, gzwpsu2sd2_1_2_c, gzwpsu1sd1_1_2_c, & + gzwpsu2sd1_1_2, gzwpsu1sd2_1_2, gzwpsu2sd2_1_2, gzwpsu1sd1_1_2, & + gpwpsu2sd1_1_2_c, gpwpsu1sd2_1_2_c, gpwpsu2sd2_1_2_c, gpwpsu1sd1_1_2_c, & + gpwpsu2sd1_1_2, gpwpsu1sd2_1_2, gpwpsu2sd2_1_2 + complex(kind=default), public, save :: gpwpsu1sd1_1_2, gzwpsu2sd1_1_1_c, & + gzwpsu1sd2_1_1_c, gzwpsu2sd2_1_1_c, gzwpsu1sd1_1_1_c, gzwpsu2sd1_1_1, & + gzwpsu1sd2_1_1, gzwpsu2sd2_1_1, gzwpsu1sd1_1_1, gpwpsu2sd1_1_1_c, & + gpwpsu1sd2_1_1_c, gpwpsu2sd2_1_1_c, gpwpsu1sd1_1_1_c, gpwpsu2sd1_1_1, & + gpwpsu1sd2_1_1, gpwpsu2sd2_1_1, gpwpsu1sd1_1_1, gwzsl2sn_3_c, gwzsl1sn_3_c, & + gwzsl2sn_3, gwzsl1sn_3, gpwsl2sn_3_c, gpwsl1sn_3_c, gpwsl2sn_3, gpwsl1sn_3, & + gwwsd2sd1_3, gwwsd1sd2_3, gwwsd2sd2_3, gwwsd1sd1_3, gwwsu2su1_3, & + gwwsu1su2_3, gwwsu2su2_3, gwwsu1su1_3, gwwsn1sn1_3, gwwsl2sl1_3, & + gwwsl1sl2_3, gwwsl2sl2_3, gwwsl1sl1_3, gzpsd2sd1_3, gzpsd1sd2_3, & + gzpsd2sd2_3, gzpsd1sd1_3, gzpsu2su1_3, gzpsu1su2_3, gzpsu2su2_3, & + gzpsu1su1_3, gzpsl2sl1_3, gzpsl1sl2_3, gzpsl2sl2_3, gzpsl1sl1_3, & + gzzsd2sd1_3, gzzsd1sd2_3, gzzsd2sd2_3, gzzsd1sd1_3, gzzsu2su1_3, & + gzzsu1su2_3, gzzsu2su2_3, gzzsu1su1_3, gzzsn1sn1_3, gzzsl2sl1_3, & + gzzsl1sl2_3, gzzsl2sl2_3, gzzsl1sl1_3, gwzsl2sn_2_c, gwzsl1sn_2_c, & + gwzsl2sn_2, gwzsl1sn_2, gpwsl2sn_2_c, gpwsl1sn_2_c + complex(kind=default), public, save :: gpwsl2sn_2, gpwsl1sn_2, & + gwwsd2sd1_2, gwwsd1sd2_2, gwwsd2sd2_2, gwwsd1sd1_2, gwwsu2su1_2, & + gwwsu1su2_2, gwwsu2su2_2, gwwsu1su1_2, gwwsn1sn1_2, gwwsl2sl1_2, & + gwwsl1sl2_2, gwwsl2sl2_2, gwwsl1sl1_2, gzpsd2sd1_2, gzpsd1sd2_2, & + gzpsd2sd2_2, gzpsd1sd1_2, gzpsu2su1_2, gzpsu1su2_2, gzpsu2su2_2, & + gzpsu1su1_2, gzpsl2sl1_2, gzpsl1sl2_2, gzpsl2sl2_2, gzpsl1sl1_2, & + gzzsd2sd1_2, gzzsd1sd2_2, gzzsd2sd2_2, gzzsd1sd1_2, gzzsu2su1_2, & + gzzsu1su2_2, gzzsu2su2_2, gzzsu1su1_2, gzzsn1sn1_2, gzzsl2sl1_2, & + gzzsl1sl2_2, gzzsl2sl2_2, gzzsl1sl1_2, gwzsl2sn_1_c, gwzsl1sn_1_c, & + gwzsl2sn_1, gwzsl1sn_1, gpwsl2sn_1_c, gpwsl1sn_1_c, gpwsl2sn_1, gpwsl1sn_1, & + gwwsd2sd1_1, gwwsd1sd2_1, gwwsd2sd2_1, gwwsd1sd1_1, gwwsu2su1_1, & + gwwsu1su2_1, gwwsu2su2_1, gwwsu1su1_1, gwwsn1sn1_1, gwwsl2sl1_1, & + gwwsl1sl2_1, gwwsl2sl2_1, gwwsl1sl1_1, gzpsd2sd1_1, gzpsd1sd2_1, & + gzpsd2sd2_1, gzpsd1sd1_1, gzpsu2su1_1, gzpsu1su2_1, gzpsu2su2_1, & + gzpsu1su1_1 + complex(kind=default), public, save :: gzpsl2sl1_1, gzpsl1sl2_1, & + gzpsl2sl2_1, gzpsl1sl1_1, gzzsd2sd1_1, gzzsd1sd2_1, gzzsd2sd2_1, & + gzzsd1sd1_1, gzzsu2su1_1, gzzsu1su2_1, gzzsu2su2_1, gzzsu1su1_1, & + gzzsn1sn1_1, gzzsl2sl1_1, gzzsl1sl2_1, gzzsl2sl2_1, gzzsl1sl1_1, gppsdsd, & + gppsusu, gppslsl, gsl2_3snw_c, gsl1_3snw_c, gsl2_3snw, gsl1_3snw, & + gsd2zsd1_3, gsd1zsd2_3, gsd2zsd2_3, gsd1zsd1_3, gsu2zsu1_3, gsu1zsu2_3, & + gsu2zsu2_3, gsu1zsu1_3, gsn1zsn1_3, gsl2zsl1_3, gsl1zsl2_3, gsl2zsl2_3, & + gsl1zsl1_3, gsl2_2snw_c, gsl1_2snw_c, gsl2_2snw, gsl1_2snw, gsd2zsd1_2, & + gsd1zsd2_2, gsd2zsd2_2, gsd1zsd1_2, gsu2zsu1_2, gsu1zsu2_2, gsu2zsu2_2, & + gsu1zsu1_2, gsn1zsn1_2, gsl2zsl1_2, gsl1zsl2_2, gsl2zsl2_2, gsl1zsl1_2, & + gsl2_1snw_c, gsl1_1snw_c, gsl2_1snw, gsl1_1snw, gsd2zsd1_1, gsd1zsd2_1, & + gsd2zsd2_1, gsd1zsd1_1, gsu2zsu1_1, gsu1zsu2_1, gsu2zsu2_1, gsu1zsu1_1, & + gsn1zsn1_1, gsl2zsl1_1, gsl1zsl2_1 + complex(kind=default), public, save :: gsl2zsl2_1, gsl1zsl1_1, & + gs2ws1_3_3_c, gs1ws2_3_3_c, gs2ws2_3_3_c, gs1ws1_3_3_c, gs2ws1_3_3, & + gs1ws2_3_3, gs2ws2_3_3, gs1ws1_3_3, gs2ws1_3_2_c, gs1ws2_3_2_c, & + gs2ws2_3_2_c, gs1ws1_3_2_c, gs2ws1_3_2, gs1ws2_3_2, gs2ws2_3_2, & + gs1ws1_3_2, gs2ws1_3_1_c, gs1ws2_3_1_c, gs2ws2_3_1_c, gs1ws1_3_1_c, & + gs2ws1_3_1, gs1ws2_3_1, gs2ws2_3_1, gs1ws1_3_1, gs2ws1_2_3_c, & + gs1ws2_2_3_c, gs2ws2_2_3_c, gs1ws1_2_3_c, gs2ws1_2_3, gs1ws2_2_3, & + gs2ws2_2_3, gs1ws1_2_3, gs2ws1_2_2_c, gs1ws2_2_2_c, gs2ws2_2_2_c, & + gs1ws1_2_2_c, gs2ws1_2_2, gs1ws2_2_2, gs2ws2_2_2, gs1ws1_2_2, & + gs2ws1_2_1_c, gs1ws2_2_1_c, gs2ws2_2_1_c, gs1ws1_2_1_c, gs2ws1_2_1, & + gs1ws2_2_1, gs2ws2_2_1, gs1ws1_2_1, gs2ws1_1_3_c, gs1ws2_1_3_c, & + gs2ws2_1_3_c, gs1ws1_1_3_c, gs2ws1_1_3, gs1ws2_1_3, gs2ws2_1_3, & + gs1ws1_1_3, gs2ws1_1_2_c, gs1ws2_1_2_c, gs2ws2_1_2_c, gs1ws1_1_2_c, & + gs2ws1_1_2, gs1ws2_1_2, gs2ws2_1_2, gs1ws1_1_2, gs2ws1_1_1_c, & + gs1ws2_1_1_c + complex(kind=default), public, save :: gs2ws2_1_1_c, gs1ws1_1_1_c, & + gs2ws1_1_1, gs1ws2_1_1, gs2ws2_1_1, gs1ws1_1_1, g_yuk15_3, g_yuk14_3, & + g_yuk13_3, g_yuk12_3, g_yuk11_3, g_yuk10_3, g_yuk9_3, g_yuk8_3, & + g_yuk7_3, g_yuk6_3, g_yuk15_2, g_yuk14_2, g_yuk13_2, g_yuk12_2, & + g_yuk11_2, g_yuk10_2, g_yuk9_2, g_yuk8_2, g_yuk7_2, g_yuk6_2, g_yuk15_1, & + g_yuk14_1, g_yuk13_1, g_yuk12_1, g_yuk11_1, g_yuk10_1, g_yuk9_1, & + g_yuk8_1, g_yuk7_1, g_yuk6_1, ghhww, gh2h2ww, gh1h1ww, gaaww, ghh2wp, & + ghawp, ghawz, gh2az, gh1az, ghaw, ghh1wp, ghh2wz, ghh1wz, ghphmpz, & + ghphmpp, ghphmzz, gh2h2zz, gh1h1zz, gaazz, ghhp, ghhz, gh2zz, gh1zz, & + ghh2w, ghh1w, gh2ww, gh1ww, gh4_11, gh4_10, gh4_9, gh4_8, gh4_7, gh4_6, & + gh4_5, gh4_4 + complex(kind=default), public, save :: gh4_3, gh4_2, gh4_1, gh3_8, & + gh3_7, gh3_6, gh3_5, gh3_4, gh3_3, gh3_2, gh3_1, mu, ad_3, au_3, al_3, & + ad_2, au_2, al_2, ad_1, au_1, al_1, mv_22, mv_21, mv_12, mv_11, mu_22, & + mu_21, mu_12, mu_11, mn_44, mn_43, mn_42, mn_41, mn_34, mn_33, mn_32, & + mn_31, mn_24, mn_23, mn_22, mn_21, mn_14, mn_13, mn_12, mn_11 + !!! complex(kind=default), public, save :: sinthsu3, & + !!! sinthsu2, sinthsu1, sinthsd3, sinthsd2, sinthsd1, sinthsl3, sinthsl2, & + !!! sinthsl1, costhsu3, costhsu2, costhsu1, costhsd3, costhsd2, costhsd1, & + !!! costhsl3, costhsl2, costhsl1 + complex(kind=default), public, save :: eta1, eta2, eta3, eta4 + complex(kind=default), public, save :: eidelta, cosckm23, cosckm13, & + cosckm12, vckm_33, vckm_32, vckm_31, vckm_23, vckm_22, vckm_21, vckm_13, & + vckm_12, vckm_11, gpzww, gppww, gzzww, gw4, igwww, igzww, iqw, igs, & + gssq + complex(kind=default), public, save :: gccq_3_3_c, gccq_3_3, & + gccq_3_2_c, gccq_3_2, gccq_3_1_c, gccq_3_1, gccq_2_3_c, gccq_2_3, & + gccq_2_2_c, gccq_2_2, gccq_2_1_c, gccq_2_1, gccq_1_3_c, gccq_1_3, & + gccq_1_2_c, gccq_1_2, gccq_1_1_c, gccq_1_1 + complex(kind=default), dimension(2), public, save :: g_yuk_gsd2_3_c, & + g_yuk_gsd2_3, g_yuk_gsu2_3_c, g_yuk_gsu2_3, g_yuk_gsd1_3_c, & + g_yuk_gsd1_3, g_yuk_gsu1_3_c, g_yuk_gsu1_3, g_yuk_n4_sd2_3_c, & + g_yuk_n4_sd2_3, g_yuk_n4_su2_3_c, g_yuk_n4_su2_3, g_yuk_n4_sl2_3_c, & + g_yuk_n4_sl2_3, g_yuk_n3_sd2_3_c, g_yuk_n3_sd2_3, g_yuk_n3_su2_3_c, & + g_yuk_n3_su2_3, g_yuk_n3_sl2_3_c, g_yuk_n3_sl2_3, g_yuk_n2_sd2_3_c, & + g_yuk_n2_sd2_3, g_yuk_n2_su2_3_c, g_yuk_n2_su2_3, g_yuk_n2_sl2_3_c, & + g_yuk_n2_sl2_3, g_yuk_n1_sd2_3_c, g_yuk_n1_sd2_3, g_yuk_n1_su2_3_c, & + g_yuk_n1_su2_3, g_yuk_n1_sl2_3_c, g_yuk_n1_sl2_3, g_yuk_n4_sd1_3_c, & + g_yuk_n4_sd1_3, g_yuk_n4_su1_3_c, g_yuk_n4_su1_3, g_yuk_n4_sl1_3_c, & + g_yuk_n4_sl1_3, g_yuk_n3_sd1_3_c, g_yuk_n3_sd1_3, g_yuk_n3_su1_3_c, & + g_yuk_n3_su1_3, g_yuk_n3_sl1_3_c, g_yuk_n3_sl1_3, g_yuk_n2_sd1_3_c, & + g_yuk_n2_sd1_3, g_yuk_n2_su1_3_c, g_yuk_n2_su1_3, g_yuk_n2_sl1_3_c, & + g_yuk_n2_sl1_3, g_yuk_n1_sd1_3_c, g_yuk_n1_sd1_3, g_yuk_n1_su1_3_c, & + g_yuk_n1_su1_3, g_yuk_n1_sl1_3_c, g_yuk_n1_sl1_3 + complex(kind=default), dimension(2), public, save :: g_yuk_ch2_su2_3_3_c, & + g_yuk_ch2_su2_3_3, g_yuk_ch2_sd2_3_3_c, g_yuk_ch2_sd2_3_3, & + g_yuk_ch2_su1_3_3_c, g_yuk_ch2_su1_3_3, g_yuk_ch2_sd1_3_3_c, & + g_yuk_ch2_sd1_3_3, g_yuk_ch1_su2_3_3_c, g_yuk_ch1_su2_3_3, & + g_yuk_ch1_sd2_3_3_c, g_yuk_ch1_sd2_3_3, g_yuk_ch1_su1_3_3_c, & + g_yuk_ch1_su1_3_3, g_yuk_ch1_sd1_3_3_c, g_yuk_ch1_sd1_3_3, & + g_yuk_ch2_su2_3_2_c, g_yuk_ch2_su2_3_2, g_yuk_ch2_sd2_3_2_c, & + g_yuk_ch2_sd2_3_2, g_yuk_ch2_su1_3_2_c, g_yuk_ch2_su1_3_2, & + g_yuk_ch2_sd1_3_2_c, g_yuk_ch2_sd1_3_2, g_yuk_ch1_su2_3_2_c, & + g_yuk_ch1_su2_3_2, g_yuk_ch1_sd2_3_2_c, g_yuk_ch1_sd2_3_2, & + g_yuk_ch1_su1_3_2_c, g_yuk_ch1_su1_3_2, g_yuk_ch1_sd1_3_2_c, & + g_yuk_ch1_sd1_3_2, g_yuk_ch2_su2_3_1_c, g_yuk_ch2_su2_3_1, & + g_yuk_ch2_sd2_3_1_c, g_yuk_ch2_sd2_3_1, g_yuk_ch2_su1_3_1_c, & + g_yuk_ch2_su1_3_1, g_yuk_ch2_sd1_3_1_c, g_yuk_ch2_sd1_3_1, & + g_yuk_ch1_su2_3_1_c, g_yuk_ch1_su2_3_1, g_yuk_ch1_sd2_3_1_c, & + g_yuk_ch1_sd2_3_1, g_yuk_ch1_su1_3_1_c, g_yuk_ch1_su1_3_1, & + g_yuk_ch1_sd1_3_1_c, g_yuk_ch1_sd1_3_1, g_yuk_ch2_su2_2_3_c, & + g_yuk_ch2_su2_2_3, g_yuk_ch2_sd2_2_3_c, g_yuk_ch2_sd2_2_3, & + g_yuk_ch2_su1_2_3_c, g_yuk_ch2_su1_2_3, g_yuk_ch2_sd1_2_3_c, & + g_yuk_ch2_sd1_2_3, g_yuk_ch1_su2_2_3_c, g_yuk_ch1_su2_2_3, & + g_yuk_ch1_sd2_2_3_c, g_yuk_ch1_sd2_2_3, g_yuk_ch1_su1_2_3_c, & + g_yuk_ch1_su1_2_3, g_yuk_ch1_sd1_2_3_c, g_yuk_ch1_sd1_2_3, & + g_yuk_ch2_su2_1_3_c, g_yuk_ch2_su2_1_3, g_yuk_ch2_sd2_1_3_c, & + g_yuk_ch2_sd2_1_3, g_yuk_ch2_su1_1_3_c, g_yuk_ch2_su1_1_3, & + g_yuk_ch2_sd1_1_3_c, g_yuk_ch2_sd1_1_3, g_yuk_ch1_su2_1_3_c, & + g_yuk_ch1_su2_1_3, g_yuk_ch1_sd2_1_3_c, g_yuk_ch1_sd2_1_3, & + g_yuk_ch1_su1_1_3_c, g_yuk_ch1_su1_1_3, g_yuk_ch1_sd1_1_3_c, & + g_yuk_ch1_sd1_1_3, g_yuk_ch2_sn1_3_c, g_yuk_ch2_sn1_3, & + g_yuk_ch1_sn1_3_c, g_yuk_ch1_sn1_3 + complex(kind=default), dimension(2), public, save :: gcac_2_1, & + gch2c_2_1, gch1c_2_1, gcac_1_2, gch2c_1_2, gch1c_1_2, gcicia_3_4, & + gcicih2_3_4, gcicih1_3_4, gcicia_2_4, gcicih2_2_4, gcicih1_2_4, & + gcicia_2_3, gcicih2_2_3, gcicih1_2_3, gcicia_1_4, gcicih2_1_4, & + gcicih1_1_4, gcicia_1_3, gcicih2_1_3, gcicih1_1_3, gcicia_1_2, & + gcicih2_1_2, gcicih1_1_2, g_chn_4_2, gcwn_2_4, g_chn_3_2, gcwn_2_3, & + g_chn_2_2, gcwn_2_2, g_chn_1_2, gcwn_2_1, g_chn_4_1, gcwn_1_4, g_chn_3_1, & + gcwn_1_3, g_chn_2_1, gcwn_1_2, g_chn_1_1, gcwn_1_1, g_nhc_4_2, gnwc_4_2, & + g_nhc_4_1, gnwc_4_1, g_nhc_3_2, gnwc_3_2, g_nhc_3_1, gnwc_3_1, g_nhc_2_2, & + gnwc_2_2, g_nhc_2_1, gnwc_2_1, g_nhc_1_2, gnwc_1_2, g_nhc_1_1, gnwc_1_1, & + gczc_2_2, gczc_2_1, gczc_1_2, gczc_1_1, gnzn_3_4, gnzn_2_4, gnzn_2_3, & + gnzn_1_4, gnzn_1_3, gnzn_1_2, g_yuk2_3_3, g_yuk2_3_2, g_yuk2_3_1, & + g_yuk2_2_3, g_yuk2_1_3, g_yuk1_3_3, g_yuk1_3_2, g_yuk1_3_1, g_yuk1_2_3, & + g_yuk1_1_3 + +contains + + subroutine init_parameters + type :: parameter_set + real(default) :: gf + real(default) :: mZ + real(default) :: wZ + real(default) :: mW + real(default) :: wW + real(default) :: me + real(default) :: mmu + real(default) :: mtau + real(default) :: ms + real(default) :: mc + real(default) :: mb + real(default) :: mtop + real(default) :: wtop + real(default) :: alphas + real(default) :: mtype + real(default) :: m_zero + real(default) :: m_half + real(default) :: A0 + real(default) :: tanb + real(default) :: sgn_mu + real(default) :: lambda + real(default) :: m_mes + real(default) :: n5 + real(default) :: c_grav + real(default) :: m_grav + real(default) :: ae_33 + real(default) :: au_33 + real(default) :: ad_33 + real(default) :: mh + real(default) :: wh + real(default) :: mhh + real(default) :: mha + real(default) :: mhpm + real(default) :: whh + real(default) :: whpm + real(default) :: wha + real(default) :: al_h + real(default) :: mu_h + real(default) :: tanb_h + real(default) :: msu1 + real(default) :: msd1 + real(default) :: msc1 + real(default) :: mss1 + real(default) :: mstop1 + real(default) :: msb1 + real(default) :: msu2 + real(default) :: msd2 + real(default) :: msc2 + real(default) :: mss2 + real(default) :: mstop2 + real(default) :: msb2 + real(default) :: mse1 + real(default) :: msne + real(default) :: msmu1 + real(default) :: msnmu + real(default) :: mstau1 + real(default) :: msntau + real(default) :: mse2 + real(default) :: msmu2 + real(default) :: mstau2 + real(default) :: mgg + real(default) :: mch1 + real(default) :: mch2 + real(default) :: mneu1 + real(default) :: mneu2 + real(default) :: mneu3 + real(default) :: mneu4 + real(default) :: wsu1 + real(default) :: wsd1 + real(default) :: wsc1 + real(default) :: wss1 + real(default) :: wstop1 + real(default) :: wsb1 + real(default) :: wsu2 + real(default) :: wsd2 + real(default) :: wsc2 + real(default) :: wss2 + real(default) :: wstop2 + real(default) :: wsb2 + real(default) :: wse1 + real(default) :: wsne + real(default) :: wsmu1 + real(default) :: wsnmu + real(default) :: wstau1 + real(default) :: wsntau + real(default) :: wse2 + real(default) :: wsmu2 + real(default) :: wstau2 + real(default) :: wgg + real(default) :: wch1 + real(default) :: wch2 + real(default) :: wneu1 + real(default) :: wneu2 + real(default) :: wneu3 + real(default) :: wneu4 + real(default) :: mt_11 + real(default) :: mt_12 + real(default) :: mt_21 + real(default) :: mt_22 + real(default) :: mb_11 + real(default) :: mb_12 + real(default) :: mb_21 + real(default) :: mb_22 + real(default) :: ml_11 + real(default) :: ml_12 + real(default) :: ml_21 + real(default) :: ml_22 + real(default) :: mn_11 + real(default) :: mn_12 + real(default) :: mn_13 + real(default) :: mn_14 + real(default) :: mn_21 + real(default) :: mn_22 + real(default) :: mn_23 + real(default) :: mn_24 + real(default) :: mn_31 + real(default) :: mn_32 + real(default) :: mn_33 + real(default) :: mn_34 + real(default) :: mn_41 + real(default) :: mn_42 + real(default) :: mn_43 + real(default) :: mn_44 + real(default) :: mu_11 + real(default) :: mu_12 + real(default) :: mu_21 + real(default) :: mu_22 + real(default) :: mv_11 + real(default) :: mv_12 + real(default) :: mv_21 + real(default) :: mv_22 + real(default) :: v + real(default) :: cw + real(default) :: sw + real(default) :: ee + end type parameter_set + type(parameter_set) :: par + real(kind=default) :: qelep, qeup, qedwn, v + par%gf = 1.16639E-5 + par%mZ = 91.1882 + par%wZ = 2.443 + par%mW = 80.419 + par%wW = 2.049 + par%me = 0.000511 + par%mmu = 0.1057 + par%mtau = 1.777 + par%ms = 0.12 + par%mc = 1.25 + par%mb = 4.2 + par%mtop = 174 + par%wtop = 1.523 + par%alphas = 0.1178 + par%mtype = 1 + par%m_zero = 100 + par%m_half = 250 + par%A0 = -100 + par%tanb = 10 + par%sgn_mu = 1 + par%lambda = 40000 + par%m_mes = 80000 + par%n5 = 3 + par%c_grav = 1 + par%m_grav = 60000 + par%ae_33 = 0 + par%au_33 = 0 + par%ad_33 = 0 + par%mh = 125 + par%wh = 4.143E-3 + par%mhh = 1000 + par%mha = 1000 + par%mhpm = 1000 + par%whh = 0 + par%whpm = 0 + par%wha = 0 + par%al_h = 0 + par%mu_h = 1000 + par%tanb_h = 10 + par%msu1 = 1000 + par%msd1 = 1000 + par%msc1 = 1000 + par%mss1 = 1000 + par%mstop1 = 1000 + par%msb1 = 1000 + par%msu2 = 1000 + par%msd2 = 1000 + par%msc2 = 1000 + par%mss2 = 1000 + par%mstop2 = 1000 + par%msb2 = 1000 + par%mse1 = 1000 + par%msne = 1000 + par%msmu1 = 1000 + par%msnmu = 1000 + par%mstau1 = 1000 + par%msntau = 1000 + par%mse2 = 1000 + par%msmu2 = 1000 + par%mstau2 = 1000 + par%mgg = 1000 + par%mch1 = 1000 + par%mch2 = 1000 + par%mneu1 = 1000 + par%mneu2 = 1000 + par%mneu3 = 1000 + par%mneu4 = 1000 + par%wsu1 = 0 + par%wsd1 = 0 + par%wsc1 = 0 + par%wss1 = 0 + par%wstop1 = 0 + par%wsb1 = 0 + par%wsu2 = 0 + par%wsd2 = 0 + par%wsc2 = 0 + par%wss2 = 0 + par%wstop2 = 0 + par%wsb2 = 0 + par%wse1 = 0 + par%wsne = 0 + par%wsmu1 = 0 + par%wsnmu = 0 + par%wstau1 = 0 + par%wsntau = 0 + par%wse2 = 0 + par%wsmu2 = 0 + par%wstau2 = 0 + par%wgg = 0 + par%wch1 = 0 + par%wch2 = 0 + par%wneu1 = 0 + par%wneu2 = 0 + par%wneu3 = 0 + par%wneu4 = 0 + par%mt_11 = 1 + par%mt_12 = 0 + par%mt_21 = 0 + par%mt_22 = 1 + par%mb_11 = 1 + par%mb_12 = 0 + par%mb_21 = 0 + par%mb_22 = 1 + par%ml_11 = 1 + par%ml_12 = 0 + par%ml_21 = 0 + par%ml_22 = 1 + par%mn_11 = 1 + par%mn_12 = 0 + par%mn_13 = 0 + par%mn_14 = 0 + par%mn_21 = 0 + par%mn_22 = 1 + par%mn_23 = 0 + par%mn_24 = 0 + par%mn_31 = 0 + par%mn_32 = 0 + par%mn_33 = 1 + par%mn_34 = 0 + par%mn_41 = 0 + par%mn_42 = 0 + par%mn_43 = 0 + par%mn_44 = 1 + par%mu_11 = 1 + par%mu_12 = 0 + par%mu_21 = 0 + par%mu_22 = 1 + par%mv_11 = 1 + par%mv_12 = 0 + par%mv_21 = 0 + par%mv_22 = 1 + par%v = 1 / sqrt (sqrt (2.) * par%gf) + par%cw = par%mW / par%mZ + par%sw = sqrt (1-par%cw*par%cw) + par%ee = 2 * par%sw * par%mW / par%v + mass(1:70) = 0 + width(1:70) = 0 + mass(3) = par%ms + mass(4) = par%mc + mass(5) = par%mb + mass(6) = par%mtop + width(6) = par%wtop + mass(11) = par%me + mass(13) = par%mmu + mass(15) = par%mtau + mass(23) = par%mZ + width(23) = par%wZ + mass(24) = par%mW + width(24) = par%wW + mass(25) = par%mh + width(25) = par%wh + mass(26) = xi0 * mass(23) + width(26) = 0 + mass(27) = xipm * mass(24) + width(27) = 0 + mass(35) = par%mHH + width(35) = par%wHH + mass(36) = par%mHA + width(36) = par%wHA + mass(37) = par%mHpm + width(37) = par%wHpm + mass(41) = par%msd1 + width(41) = par%wsd1 + mass(42) = par%msu1 + width(42) = par%wsu1 + mass(43) = par%mss1 + width(43) = par%wss1 + mass(44) = par%msc1 + width(44) = par%wsc1 + mass(45) = par%msb1 + width(45) = par%wsb1 + mass(46) = par%mstop1 + width(46) = par%wstop1 + mass(47) = par%msd2 + width(47) = par%wsd2 + mass(48) = par%msu2 + width(48) = par%wsu2 + mass(49) = par%mss2 + width(49) = par%wss2 + mass(50) = par%msc2 + width(50) = par%wsc2 + mass(51) = par%msb2 + width(51) = par%wsb2 + mass(52) = par%mstop2 + width(52) = par%wstop2 + mass(53) = par%mse1 + width(53) = par%wse1 + mass(54) = par%msne + width(54) = par%wsne + mass(55) = par%msmu1 + width(55) = par%wsmu1 + mass(56) = par%msnmu + width(56) = par%wsnmu + mass(57) = par%mstau1 + width(57) = par%wstau1 + mass(58) = par%msntau + width(58) = par%wsntau + mass(59) = par%mse2 + width(59) = par%wse2 + mass(61) = par%msmu2 + width(61) = par%wsmu2 + mass(63) = par%mstau2 + width(63) = par%wstau2 + mass(64) = par%mgg + width(64) = par%wgg + mass(65) = abs(par%mneu1) + width(65) = par%wneu1 + mass(66) = abs(par%mneu2) + width(66) = par%wneu2 + mass(67) = abs(par%mneu3) + width(67) = par%wneu3 + mass(68) = abs(par%mneu4) + width(68) = par%wneu4 + mass(69) = abs(par%mch1) + width(69) = par%wch1 + mass(70) = abs(par%mch2) + width(70) = par%wch2 + sigch1 = sign (1._default, par%mch1) + sigch2 = sign (1._default, par%mch2) + sign1 = sign (1, int(par%mneu1)) + sign2 = sign (1, int(par%mneu2)) + sign3 = sign (1, int(par%mneu3)) + sign4 = sign (1, int(par%mneu4)) + vckm_11 = 1 + vckm_12 = 0 + vckm_13 = 0 + vckm_21 = 0 + vckm_22 = 1 + vckm_23 = 0 + vckm_31 = 0 + vckm_32 = 0 + vckm_33 = 1 + v = 2 * par%mW * par%sw / par%ee + e = par%ee + !!! This should not be in the color flow basis !!! + as = par%alphas + tanb = par%tanb_h + tana = tan(par%al_h) + select case (sign1) + case (1) + eta1 = (1.0_default,0.0_default) + case (-1) + eta1 = (0.0_default,1.0_default) + case default + print *, 'sign1', sign1 + stop "parameters_MSSM: No definite sign neutralino1" + end select + select case (sign2) + case (1) + eta2 = (1.0_default,0.0_default) + case (-1) + eta2 = (0.0_default,1.0_default) + case default + print *, 'sign2', sign2 + stop "parameters_MSSM: No definite sign neutralino2" + end select + select case (sign3) + case (1) + eta3 = (1.0_default,0.0_default) + case (-1) + eta3 = (0.0_default,1.0_default) + case default + print *, 'sign3', sign3 + stop "parameters_MSSM: No definite sign neutralino3" + end select + select case (sign4) + case (1) + eta4 = (1.0_default,0.0_default) + case (-1) + eta4 = (0.0_default,1.0_default) + case default + print *, 'sign4', sign4 + stop "parameters_MSSM: No definite sign neutralino4" + end select + sinthw = par%sw + sin2thw = sinthw**2 + costhw = par%cw + qelep = - 1.0_default + qeup = 2.0_default / 3.0_default + qedwn = - 1.0_default / 3.0_default + call setup_parameters1 + call setup_parameters2 + call setup_parameters3 + call setup_parameters4 + call setup_parameters5 + call setup_parameters6 + call setup_parameters7 + call setup_parameters8 + call setup_parameters9 + call setup_parameters10 + call setup_parameters11 + call setup_parameters12 + call setup_parameters13 + call setup_parameters14 + call setup_parameters15 + call setup_parameters16 +contains + subroutine setup_parameters1 () + g = (e / sinthw) + gz = (g / costhw) + !!! Color flow basis, divide by sqrt(2) + gs = sqrt(2.0_default * PI * par%alphas) + igs = (imago * gs) + q_lep = (- 1.0_default) + q_up = (2.0_default / 3.0_default) + q_down = (- 1.0_default / 3.0_default) + qlep = - e * qelep !!! This is the negative particle charge !!! + qup = - e * qeup !!! This is the negative particle charge !!! + qdwn = - e * qedwn !!! This is the negative particle charge !!! + qchar = ( - e) !!! This is the negative particle charge !!! + ! qlep = ((-1.0_default) * e) + ! qup = ((2.0_default / 3.0_default) * e) + ! qdwn = (((-1.0_default) / 3.0_default) * e) + gcc = (g / (2.0_default * sqrt (2.0_default))) + gssq = (gs / sqrt (2.0_default)) + iqw = imago * e + igzww = imago * g * costhw + gw4 = (g**2) + gzzww = ((g**2) * (costhw**2)) + gppww = (e**2) + gpzww = (e * g * costhw) + sinal = sin (par%al_h) + cosal = cos (par%al_h) + sinbe = (tanb / sqrt ((1.0_default + (tanb**2)))) + cosbe = (1.0_default / sqrt ((1.0_default + (tanb**2)))) + eidelta = (cosd + (imago * sind)) + cos2be = ((cosbe**2) - (sinbe**2)) + cos2al = ((cosal**2) - (sinal**2)) + sin2be = (2.0_default * cosbe * sinbe) + sin2al = (2.0_default * cosal * sinal) + sin4al = (2.0_default * cos2al * sin2al) + sin4be = (2.0_default * cos2be * sin2be) + cos4be = ((cos2be**2) - (sin2be**2)) + cosapb = ((cosal * cosbe) - (sinal * sinbe)) + cosamb = ((cosal * cosbe) + (sinal * sinbe)) + sinapb = ((cosal * sinbe) + (sinal * cosbe)) + sinamb = ((sinal * cosbe) - (sinbe * cosal)) + sin2am2b = (2.0_default * sinamb * cosamb) + cos2am2b = ((cosamb**2) - (sinamb**2)) + mn_11 = eta1 * par%mn_11 + mn_12 = eta1 * par%mn_12 + mn_13 = eta1 * par%mn_13 + mn_14 = eta1 * par%mn_14 + mn_21 = eta2 * par%mn_21 + mn_22 = eta2 * par%mn_22 + mn_23 = eta2 * par%mn_23 + mn_24 = eta2 * par%mn_24 + mn_31 = eta3 * par%mn_31 + mn_32 = eta3 * par%mn_32 + mn_33 = eta3 * par%mn_33 + mn_34 = eta3 * par%mn_34 + mn_41 = eta4 * par%mn_41 + mn_42 = eta4 * par%mn_42 + mn_43 = eta4 * par%mn_43 + mn_44 = eta4 * par%mn_44 + !!! Checked by JR !!! + mu_11 = par%mu_11 !!! Rotat. matrix containing phi_R + mu_12 = par%mu_12 !!! Rotat. matrix containing phi_R + mu_21 = par%mu_21 !!! Rotat. matrix containing phi_R + mu_22 = par%mu_22 !!! Rotat. matrix containing phi_R + mv_11 = sigch1 * par%mv_11 !!! Rotat. matrix containing phi_L + mv_12 = sigch1 * par%mv_12 !!! Rotat. matrix containing phi_L + mv_21 = sigch2 * par%mv_21 !!! Rotat. matrix containing phi_L + mv_22 = sigch2 * par%mv_22 !!! Rotat. matrix containing phi_L + al_1 = 0 + au_1 = 0 + ad_1 = 0 + al_2 = 0 + au_2 = 0 + ad_2 = 0 + al_3 = par%Ae_33 + au_3 = par%Au_33 + ad_3 = par%Ad_33 + mu = par%mu_h + mix_sl111 = 1.0_default + mix_sl112 = 0.0_default + mix_sl122 = 1.0_default + mix_sl121 = 0.0_default + mix_sl211 = 1.0_default + mix_sl212 = 0.0_default + mix_sl222 = 1.0_default + mix_sl221 = 0.0_default + mix_su111 = 1.0_default + mix_su112 = 0.0_default + mix_su122 = 1.0_default + mix_su121 = 0.0_default + mix_su211 = 1.0_default + mix_su212 = 0.0_default + mix_su222 = 1.0_default + mix_su221 = 0.0_default + mix_sd111 = 1.0_default + mix_sd112 = 0.0_default + mix_sd122 = 1.0_default + mix_sd121 = 0.0_default + mix_sd211 = 1.0_default + mix_sd212 = 0.0_default + mix_sd222 = 1.0_default + mix_sd221 = 0.0_default + !!! Checked by JR !!! + mix_sl311 = par%ml_11 + mix_sl312 = par%ml_12 + mix_sl321 = par%ml_21 + mix_sl322 = par%ml_22 + mix_su311 = par%mt_11 + mix_su312 = par%mt_12 + mix_su321 = par%mt_21 + mix_su322 = par%mt_22 + mix_sd311 = par%mb_11 + mix_sd312 = par%mb_12 + mix_sd321 = par%mb_21 + mix_sd322 = par%mb_22 + gh3_1 = ((mass(23) * (gz / 2.0_default) * cos2be * cosapb) - & + (mass(24) * g * cosamb)) + gh3_2 = ((mass(24) * g * sinamb) - ( & + (gz / 2.0_default) * mass(23) * cos2be * sinapb)) + gh3_3 = ((gz / 2.0_default) * mass(23) * ( & + (2.0_default * sin2al * cosapb) + (cos2al * sinapb))) + gh3_4 = ( - ( & + (3.0_default / 2.0_default) * gz * mass(23) * cos2al * cosapb)) + gh3_5 = ( - ( & + (3.0_default / 2.0_default) * gz * mass(23) * cos2al * sinapb)) + gh3_6 = ((gz / 2.0_default) * mass(23) * ((cos2al * cosapb) - & + (2.0_default * sin2al * sinapb))) + gh3_7 = ((gz / 2.0_default) * mass(23) * cos2be * cosapb) + gh3_8 = ( - ((gz / 2.0_default) * mass(23) * cos2be * sinapb)) + gh4_1 = ( - (((gz**2) / 2.0_default) * (cos2be**2))) + end subroutine setup_parameters1 + subroutine setup_parameters2 () + gh4_2 = ((((gz**2) / 4.0_default) * cos2al * cos2be) - (( & + (g**2) / 2.0_default) * (cosamb**2))) + gh4_3 = ( - ((((gz**2) / 4.0_default) * cos2al * cos2be) + (( & + (g**2) / 2.0_default) * (sinamb**2)))) + gh4_4 = ((((g**2) / 2.0_default) * cosamb * sinamb) - (( & + (gz**2) / 4.0_default) * sin2al * cos2be)) + gh4_5 = ( - (((gz**2) / 4.0_default) * (cos2be**2))) + gh4_6 = ( - ((3.0_default / 4.0_default) * (gz**2) * (cos2al**2))) + gh4_7 = (((gz**2) / 4.0_default) * (1.0_default - (3.0_default * & + (sin2al**2)))) + gh4_8 = ( - ((3.0_default / 8.0_default) * (gz**2) * sin4al)) + gh4_9 = (((gz**2) / 4.0_default) * cos2al * cos2be) + gh4_10 = ( - (((gz**2) / 4.0_default) * sin2al * cos2be)) + gh4_11 = ( - ((3.0_default / 4.0_default) * (gz**2) * (cos2be**2))) + ghaw = ( - (imago * (g / 2.0_default))) + gh1az = (imago * & + (gz / 2.0_default) * cosamb) + gh2az = (imago * & + (gz / 2.0_default) * sinamb) + gh1ww = ( - (g * mass(24) * sinamb)) + gh2ww = (g * mass(24) * cosamb) + ghh1w = ((g / 2.0_default) * cosamb) + ghh2w = ((g / 2.0_default) * sinamb) + gh1zz = ( - (gz * mass(23) * sinamb)) + gh2zz = (gz * mass(23) * cosamb) + ghhz = ((gz / 2.0_default) * (1.0_default - & + (2.0_default * sin2thw))) + ghhp = e + gaazz = ((gz**2) / 2.0_default) + gh1h1zz = gaazz + gh2h2zz = gaazz + ghphmzz = (gaazz * (((2.0_default * (costhw**2)) - 1.0_default)**2)) + ghphmpp = (2.0_default * (e**2)) + ghphmpz = (e * gz * ((2.0_default * (costhw**2)) - 1.0_default)) + ghh1wz = ( - ( & + (1.0_default / 2.0_default) * g * gz * sin2thw * cosamb)) + ghh2wz = ( - ( & + (1.0_default / 2.0_default) * g * gz * sin2thw * sinamb)) + ghh1wp = (e * (g / 2.0_default) * cosamb) + ghh2wp = (e * (g / 2.0_default) * sinamb) + gaaww = ((g**2) / 2.0_default) + gh1h1ww = gaaww + gh2h2ww = gaaww + ghhww = gaaww + ghawz = (imago * g * gz * & + (1.0_default / 2.0_default) * sin2thw) + ghawp = ( - (imago * e * g * & + (1.0_default / 2.0_default))) + g_yuk6_1 = (gcc * (mass(11) / mass(24)) * tanb) + g_yuk7_1 = ( - ((g / 2.0_default) * (mass(11) / mass(24)) * & + (cosal / cosbe))) + g_yuk8_1 = ((g / 2.0_default) * (mass(11) / mass(24)) * (sinal / cosbe)) + g_yuk9_1 = (imago * & + (g / 2.0_default) * (mass(11) / mass(24)) * tanb) + g_yuk10_1 = ( - ((g / 2.0_default) * (mass(2) / mass(24)) * & + (sinal / sinbe))) + g_yuk11_1 = ( - ((g / 2.0_default) * (mass(2) / mass(24)) * & + (cosal / sinbe))) + g_yuk12_1 = (imago * & + (g / 2.0_default) * (mass(2) / mass(24)) * (1.0_default / tanb)) + g_yuk13_1 = ( - ((g / 2.0_default) * (mass(1) / mass(24)) * & + (cosal / cosbe))) + g_yuk14_1 = ((g / 2.0_default) * (mass(1) / mass(24)) * (sinal / cosbe)) + g_yuk15_1 = (imago * & + (g / 2.0_default) * (mass(1) / mass(24)) * tanb) + g_yuk6_2 = (gcc * (mass(13) / mass(24)) * tanb) + g_yuk7_2 = ( - ((g / 2.0_default) * (mass(13) / mass(24)) * & + (cosal / cosbe))) + g_yuk8_2 = ((g / 2.0_default) * (mass(13) / mass(24)) * (sinal / cosbe)) + g_yuk9_2 = (imago * & + (g / 2.0_default) * (mass(13) / mass(24)) * tanb) + g_yuk10_2 = ( - ((g / 2.0_default) * (mass(4) / mass(24)) * & + (sinal / sinbe))) + g_yuk11_2 = ( - ((g / 2.0_default) * (mass(4) / mass(24)) * & + (cosal / sinbe))) + g_yuk12_2 = (imago * & + (g / 2.0_default) * (mass(4) / mass(24)) * (1.0_default / tanb)) + g_yuk13_2 = ( - ((g / 2.0_default) * (mass(3) / mass(24)) * & + (cosal / cosbe))) + g_yuk14_2 = ((g / 2.0_default) * (mass(3) / mass(24)) * (sinal / cosbe)) + g_yuk15_2 = (imago * & + (g / 2.0_default) * (mass(3) / mass(24)) * tanb) + g_yuk6_3 = (gcc * (mass(15) / mass(24)) * tanb) + g_yuk7_3 = ( - ((g / 2.0_default) * (mass(15) / mass(24)) * & + (cosal / cosbe))) + g_yuk8_3 = ((g / 2.0_default) * (mass(15) / mass(24)) * (sinal / cosbe)) + g_yuk9_3 = (imago * & + (g / 2.0_default) * (mass(15) / mass(24)) * tanb) + g_yuk10_3 = ( - ((g / 2.0_default) * (mass(6) / mass(24)) * & + (sinal / sinbe))) + g_yuk11_3 = ( - ((g / 2.0_default) * (mass(6) / mass(24)) * & + (cosal / sinbe))) + g_yuk12_3 = (imago * & + (g / 2.0_default) * (mass(6) / mass(24)) * (1.0_default / tanb)) + g_yuk13_3 = ( - ((g / 2.0_default) * (mass(5) / mass(24)) * & + (cosal / cosbe))) + g_yuk14_3 = ((g / 2.0_default) * (mass(5) / mass(24)) * (sinal / cosbe)) + g_yuk15_3 = (imago * & + (g / 2.0_default) * (mass(5) / mass(24)) * tanb) + gccq_1_1 = (gcc * vckm_11) + gccq_1_1_c = (gcc * conjg (vckm_11)) + gccq_1_2 = (gcc * vckm_12) + gccq_1_2_c = (gcc * conjg (vckm_12)) + gccq_1_3 = (gcc * vckm_13) + gccq_1_3_c = (gcc * conjg (vckm_13)) + gccq_2_1 = (gcc * vckm_21) + gccq_2_1_c = (gcc * conjg (vckm_21)) + gccq_2_2 = (gcc * vckm_22) + gccq_2_2_c = (gcc * conjg (vckm_22)) + gccq_2_3 = (gcc * vckm_23) + gccq_2_3_c = (gcc * conjg (vckm_23)) + gccq_3_1 = (gcc * vckm_31) + gccq_3_1_c = (gcc * conjg (vckm_31)) + gccq_3_2 = (gcc * vckm_32) + gccq_3_2_c = (gcc * conjg (vckm_32)) + gccq_3_3 = (gcc * vckm_33) + gccq_3_3_c = (gcc * conjg (vckm_33)) + gs1ws1_1_1 = ( - (gcc * 2.0_default * vckm_11 * & + conjg (mix_su111) * mix_sd111)) + gs2ws2_1_1 = ( - (gcc * 2.0_default * vckm_11 * & + conjg (mix_su121) * mix_sd121)) + gs1ws2_1_1 = ( - (gcc * 2.0_default * vckm_11 * & + conjg (mix_su111) * mix_sd121)) + gs2ws1_1_1 = ( - (gcc * 2.0_default * vckm_11 * & + conjg (mix_su121) * mix_sd111)) + gs1ws1_1_1_c = conjg (gs1ws1_1_1) + gs2ws2_1_1_c = conjg (gs2ws2_1_1) + gs1ws2_1_1_c = conjg (gs1ws2_1_1) + gs2ws1_1_1_c = conjg (gs2ws1_1_1) + gs1ws1_1_2 = ( - (gcc * 2.0_default * vckm_12 * & + conjg (mix_su111) * mix_sd211)) + gs2ws2_1_2 = ( - (gcc * 2.0_default * vckm_12 * & + conjg (mix_su121) * mix_sd221)) + gs1ws2_1_2 = ( - (gcc * 2.0_default * vckm_12 * & + conjg (mix_su111) * mix_sd221)) + gs2ws1_1_2 = ( - (gcc * 2.0_default * vckm_12 * & + conjg (mix_su121) * mix_sd211)) + gs1ws1_1_2_c = conjg (gs1ws1_1_2) + gs2ws2_1_2_c = conjg (gs2ws2_1_2) + gs1ws2_1_2_c = conjg (gs1ws2_1_2) + gs2ws1_1_2_c = conjg (gs2ws1_1_2) + gs1ws1_1_3 = ( - (gcc * 2.0_default * vckm_13 * & + conjg (mix_su111) * mix_sd311)) + gs2ws2_1_3 = ( - (gcc * 2.0_default * vckm_13 * & + conjg (mix_su121) * mix_sd321)) + gs1ws2_1_3 = ( - (gcc * 2.0_default * vckm_13 * & + conjg (mix_su111) * mix_sd321)) + gs2ws1_1_3 = ( - (gcc * 2.0_default * vckm_13 * & + conjg (mix_su121) * mix_sd311)) + gs1ws1_1_3_c = conjg (gs1ws1_1_3) + gs2ws2_1_3_c = conjg (gs2ws2_1_3) + gs1ws2_1_3_c = conjg (gs1ws2_1_3) + gs2ws1_1_3_c = conjg (gs2ws1_1_3) + gs1ws1_2_1 = ( - (gcc * 2.0_default * vckm_21 * & + conjg (mix_su211) * mix_sd111)) + gs2ws2_2_1 = ( - (gcc * 2.0_default * vckm_21 * & + conjg (mix_su221) * mix_sd121)) + gs1ws2_2_1 = ( - (gcc * 2.0_default * vckm_21 * & + conjg (mix_su211) * mix_sd121)) + gs2ws1_2_1 = ( - (gcc * 2.0_default * vckm_21 * & + conjg (mix_su221) * mix_sd111)) + gs1ws1_2_1_c = conjg (gs1ws1_2_1) + gs2ws2_2_1_c = conjg (gs2ws2_2_1) + gs1ws2_2_1_c = conjg (gs1ws2_2_1) + gs2ws1_2_1_c = conjg (gs2ws1_2_1) + gs1ws1_2_2 = ( - (gcc * 2.0_default * vckm_22 * & + conjg (mix_su211) * mix_sd211)) + gs2ws2_2_2 = ( - (gcc * 2.0_default * vckm_22 * & + conjg (mix_su221) * mix_sd221)) + gs1ws2_2_2 = ( - (gcc * 2.0_default * vckm_22 * & + conjg (mix_su211) * mix_sd221)) + gs2ws1_2_2 = ( - (gcc * 2.0_default * vckm_22 * & + conjg (mix_su221) * mix_sd211)) + gs1ws1_2_2_c = conjg (gs1ws1_2_2) + gs2ws2_2_2_c = conjg (gs2ws2_2_2) + gs1ws2_2_2_c = conjg (gs1ws2_2_2) + gs2ws1_2_2_c = conjg (gs2ws1_2_2) + gs1ws1_2_3 = ( - (gcc * 2.0_default * vckm_23 * & + conjg (mix_su211) * mix_sd311)) + gs2ws2_2_3 = ( - (gcc * 2.0_default * vckm_23 * & + conjg (mix_su221) * mix_sd321)) + gs1ws2_2_3 = ( - (gcc * 2.0_default * vckm_23 * & + conjg (mix_su211) * mix_sd321)) + gs2ws1_2_3 = ( - (gcc * 2.0_default * vckm_23 * & + conjg (mix_su221) * mix_sd311)) + gs1ws1_2_3_c = conjg (gs1ws1_2_3) + gs2ws2_2_3_c = conjg (gs2ws2_2_3) + gs1ws2_2_3_c = conjg (gs1ws2_2_3) + gs2ws1_2_3_c = conjg (gs2ws1_2_3) + gs1ws1_3_1 = ( - (gcc * 2.0_default * vckm_31 * & + conjg (mix_su311) * mix_sd111)) + gs2ws2_3_1 = ( - (gcc * 2.0_default * vckm_31 * & + conjg (mix_su321) * mix_sd121)) + end subroutine setup_parameters2 + subroutine setup_parameters3 () + gs1ws2_3_1 = ( - (gcc * 2.0_default * vckm_31 * & + conjg (mix_su311) * mix_sd121)) + gs2ws1_3_1 = ( - (gcc * 2.0_default * vckm_31 * & + conjg (mix_su321) * mix_sd111)) + gs1ws1_3_1_c = conjg (gs1ws1_3_1) + gs2ws2_3_1_c = conjg (gs2ws2_3_1) + gs1ws2_3_1_c = conjg (gs1ws2_3_1) + gs2ws1_3_1_c = conjg (gs2ws1_3_1) + gs1ws1_3_2 = ( - (gcc * 2.0_default * vckm_32 * & + conjg (mix_su311) * mix_sd211)) + gs2ws2_3_2 = ( - (gcc * 2.0_default * vckm_32 * & + conjg (mix_su321) * mix_sd221)) + gs1ws2_3_2 = ( - (gcc * 2.0_default * vckm_32 * & + conjg (mix_su311) * mix_sd221)) + gs2ws1_3_2 = ( - (gcc * 2.0_default * vckm_32 * & + conjg (mix_su321) * mix_sd211)) + gs1ws1_3_2_c = conjg (gs1ws1_3_2) + gs2ws2_3_2_c = conjg (gs2ws2_3_2) + gs1ws2_3_2_c = conjg (gs1ws2_3_2) + gs2ws1_3_2_c = conjg (gs2ws1_3_2) + gs1ws1_3_3 = ( - (gcc * 2.0_default * vckm_33 * & + conjg (mix_su311) * mix_sd311)) + gs2ws2_3_3 = ( - (gcc * 2.0_default * vckm_33 * & + conjg (mix_su321) * mix_sd321)) + gs1ws2_3_3 = ( - (gcc * 2.0_default * vckm_33 * & + conjg (mix_su311) * mix_sd321)) + gs2ws1_3_3 = ( - (gcc * 2.0_default * vckm_33 * & + conjg (mix_su321) * mix_sd311)) + gs1ws1_3_3_c = conjg (gs1ws1_3_3) + gs2ws2_3_3_c = conjg (gs2ws2_3_3) + gs1ws2_3_3_c = conjg (gs1ws2_3_3) + gs2ws1_3_3_c = conjg (gs2ws1_3_3) + gsl1zsl1_1 = ((gz / 2.0_default) * ((2.0_default * sin2thw) - & + (mix_sl111 * conjg (mix_sl111)))) + gsl2zsl2_1 = ((gz / 2.0_default) * ((2.0_default * sin2thw) - & + (mix_sl121 * conjg (mix_sl121)))) + gsl1zsl2_1 = ((( - gz) / 2.0_default) * conjg (mix_sl111) * mix_sl121) + gsl2zsl1_1 = conjg (gsl1zsl2_1) + gsn1zsn1_1 = (gz / 2.0_default) + gsu1zsu1_1 = ((gz / 2.0_default) * ((mix_su111 * conjg (mix_su111)) - ( & + (4.0_default / 3.0_default) * sin2thw))) + gsu2zsu2_1 = ((gz / 2.0_default) * ((mix_su121 * conjg (mix_su121)) - ( & + (4.0_default / 3.0_default) * sin2thw))) + gsu1zsu2_1 = ((gz / 2.0_default) * conjg (mix_su111) * mix_su121) + gsu2zsu1_1 = conjg (gsu1zsu2_1) + gsd1zsd1_1 = ((gz / 2.0_default) * (( & + (2.0_default / 3.0_default) * sin2thw) - (mix_sd111 * & + conjg (mix_sd111)))) + gsd2zsd2_1 = ((gz / 2.0_default) * (( & + (2.0_default / 3.0_default) * sin2thw) - (mix_sd121 * & + conjg (mix_sd121)))) + gsd1zsd2_1 = ((( - gz) / 2.0_default) * conjg (mix_sd111) * mix_sd121) + gsd2zsd1_1 = conjg (gsd1zsd2_1) + gsl1_1snw = (gcc * 2.0_default * mix_sl111) + gsl2_1snw = (gcc * 2.0_default * mix_sl121) + gsl1_1snw_c = (gcc * 2.0_default * conjg (mix_sl111)) + gsl2_1snw_c = (gcc * 2.0_default * conjg (mix_sl121)) + gsl1zsl1_2 = ((gz / 2.0_default) * ((2.0_default * sin2thw) - & + (mix_sl211 * conjg (mix_sl211)))) + gsl2zsl2_2 = ((gz / 2.0_default) * ((2.0_default * sin2thw) - & + (mix_sl221 * conjg (mix_sl221)))) + gsl1zsl2_2 = ((( - gz) / 2.0_default) * conjg (mix_sl211) * mix_sl221) + gsl2zsl1_2 = conjg (gsl1zsl2_2) + gsn1zsn1_2 = (gz / 2.0_default) + gsu1zsu1_2 = ((gz / 2.0_default) * ((mix_su211 * conjg (mix_su211)) - ( & + (4.0_default / 3.0_default) * sin2thw))) + gsu2zsu2_2 = ((gz / 2.0_default) * ((mix_su221 * conjg (mix_su221)) - ( & + (4.0_default / 3.0_default) * sin2thw))) + gsu1zsu2_2 = ((gz / 2.0_default) * conjg (mix_su211) * mix_su221) + gsu2zsu1_2 = conjg (gsu1zsu2_2) + gsd1zsd1_2 = ((gz / 2.0_default) * (( & + (2.0_default / 3.0_default) * sin2thw) - (mix_sd211 * & + conjg (mix_sd211)))) + gsd2zsd2_2 = ((gz / 2.0_default) * (( & + (2.0_default / 3.0_default) * sin2thw) - (mix_sd221 * & + conjg (mix_sd221)))) + gsd1zsd2_2 = ((( - gz) / 2.0_default) * conjg (mix_sd211) * mix_sd221) + gsd2zsd1_2 = conjg (gsd1zsd2_2) + gsl1_2snw = (gcc * 2.0_default * mix_sl211) + gsl2_2snw = (gcc * 2.0_default * mix_sl221) + gsl1_2snw_c = (gcc * 2.0_default * conjg (mix_sl211)) + gsl2_2snw_c = (gcc * 2.0_default * conjg (mix_sl221)) + gsl1zsl1_3 = ((gz / 2.0_default) * ((2.0_default * sin2thw) - & + (mix_sl311 * conjg (mix_sl311)))) + gsl2zsl2_3 = ((gz / 2.0_default) * ((2.0_default * sin2thw) - & + (mix_sl321 * conjg (mix_sl321)))) + gsl1zsl2_3 = ((( - gz) / 2.0_default) * conjg (mix_sl311) * mix_sl321) + gsl2zsl1_3 = conjg (gsl1zsl2_3) + gsn1zsn1_3 = (gz / 2.0_default) + gsu1zsu1_3 = ((gz / 2.0_default) * ((mix_su311 * conjg (mix_su311)) - ( & + (4.0_default / 3.0_default) * sin2thw))) + gsu2zsu2_3 = ((gz / 2.0_default) * ((mix_su321 * conjg (mix_su321)) - ( & + (4.0_default / 3.0_default) * sin2thw))) + gsu1zsu2_3 = ((gz / 2.0_default) * conjg (mix_su311) * mix_su321) + gsu2zsu1_3 = conjg (gsu1zsu2_3) + gsd1zsd1_3 = ((gz / 2.0_default) * (( & + (2.0_default / 3.0_default) * sin2thw) - (mix_sd311 * & + conjg (mix_sd311)))) + gsd2zsd2_3 = ((gz / 2.0_default) * (( & + (2.0_default / 3.0_default) * sin2thw) - (mix_sd321 * & + conjg (mix_sd321)))) + gsd1zsd2_3 = ((( - gz) / 2.0_default) * conjg (mix_sd311) * mix_sd321) + gsd2zsd1_3 = conjg (gsd1zsd2_3) + gsl1_3snw = (gcc * 2.0_default * mix_sl311) + gsl2_3snw = (gcc * 2.0_default * mix_sl321) + gsl1_3snw_c = (gcc * 2.0_default * conjg (mix_sl311)) + gsl2_3snw_c = (gcc * 2.0_default * conjg (mix_sl321)) + gppslsl = (2.0_default * (e**2)) + gppsusu = ((8.0_default / 9.0_default) * (e**2)) + gppsdsd = ((2.0_default / 9.0_default) * (e**2)) + gzzsl1sl1_1 = (((gz**2) / 2.0_default) * (((1.0_default - & + (4.0_default * sin2thw)) * (mix_sl111 * conjg (mix_sl111))) + & + (4.0_default * (sin2thw**2)))) + gzzsl2sl2_1 = (((gz**2) / 2.0_default) * (((1.0_default - & + (4.0_default * sin2thw)) * (mix_sl121 * conjg (mix_sl121))) + & + (4.0_default * (sin2thw**2)))) + gzzsl1sl2_1 = (((gz**2) / 2.0_default) * (1.0_default - & + (4.0_default * sin2thw)) * mix_sl111 * conjg (mix_sl121)) + gzzsl2sl1_1 = conjg(gzzsl1sl2_1) + gzzsn1sn1_1 = ((gz**2) / 2.0_default) + gzzsu1su1_1 = (((gz**2) / 2.0_default) * (((1.0_default - ( & + (8.0_default / 3.0_default) * sin2thw)) * (mix_su111 * & + conjg (mix_su111))) + ((sin2thw**2) * & + (16.0_default / 9.0_default)))) + gzzsu2su2_1 = (((gz**2) / 2.0_default) * (((1.0_default - ( & + (8.0_default / 3.0_default) * sin2thw)) * (mix_su121 * & + conjg (mix_su121))) + ((sin2thw**2) * & + (16.0_default / 9.0_default)))) + gzzsu1su2_1 = (((gz**2) / 2.0_default) * (1.0_default - (sin2thw * & + (8.0_default / 3.0_default))) * mix_su111 * conjg (mix_su121)) + gzzsu2su1_1 = conjg(gzzsu1su2_1) + gzzsd1sd1_1 = (((gz**2) / 2.0_default) * (((1.0_default - (sin2thw * & + (4.0_default / 3.0_default))) * (mix_sd111 * conjg (mix_sd111))) + & + ((sin2thw**2) * (4.0_default / 9.0_default)))) + gzzsd2sd2_1 = (((gz**2) / 2.0_default) * (((1.0_default - (sin2thw * & + (4.0_default / 3.0_default))) * (mix_sd121 * conjg (mix_sd121))) + & + ((sin2thw**2) * (4.0_default / 9.0_default)))) + gzzsd1sd2_1 = (((gz**2) / 2.0_default) * (1.0_default - (sin2thw * & + (4.0_default / 3.0_default))) * mix_sd111 * conjg (mix_sd121)) + gzzsd2sd1_1 = conjg(gzzsd1sd2_1) + gzpsl1sl1_1 = (e * gz * ((mix_sl111 * conjg (mix_sl111)) - & + (2.0_default * sin2thw))) + gzpsl2sl2_1 = (e * gz * ((mix_sl121 * conjg (mix_sl121)) - & + (2.0_default * sin2thw))) + gzpsl1sl2_1 = (e * gz * mix_sl111 * conjg (mix_sl121)) + gzpsl2sl1_1 = (e * gz * mix_sl121 * conjg (mix_sl111)) + gzpsu1su1_1 = (e * gz * (2.0_default / 3.0_default) * ((mix_su111 * & + conjg (mix_su111)) - (sin2thw * (4.0_default / 3.0_default)))) + gzpsu2su2_1 = (e * gz * (2.0_default / 3.0_default) * ((mix_su121 * & + conjg (mix_su121)) - (sin2thw * (4.0_default / 3.0_default)))) + gzpsu1su2_1 = (e * gz * (2.0_default / 3.0_default) * mix_su111 * & + conjg (mix_su121)) + gzpsu2su1_1 = (e * gz * (2.0_default / 3.0_default) * mix_su121 * & + conjg (mix_su111)) + gzpsd1sd1_1 = (e * gz * (1.0_default / 3.0_default) * ((mix_sd111 * & + conjg (mix_sd111)) - (sin2thw * (2.0_default / 3.0_default)))) + gzpsd2sd2_1 = (e * gz * (1.0_default / 3.0_default) * ((mix_sd121 * & + conjg (mix_sd121)) - (sin2thw * (2.0_default / 3.0_default)))) + gzpsd1sd2_1 = (e * gz * (1.0_default / 3.0_default) * mix_sd111 * & + conjg (mix_sd121)) + gzpsd2sd1_1 = (e * gz * (1.0_default / 3.0_default) * mix_sd121 * & + conjg (mix_sd111)) + gwwsl1sl1_1 = (((g**2) / 2.0_default) * (mix_sl111 * conjg (mix_sl111))) + gwwsl2sl2_1 = (((g**2) / 2.0_default) * (mix_sl121 * conjg (mix_sl121))) + gwwsl1sl2_1 = (((g**2) / 2.0_default) * mix_sl111 * conjg (mix_sl121)) + gwwsl2sl1_1 = (((g**2) / 2.0_default) * mix_sl121 * conjg (mix_sl111)) + gwwsn1sn1_1 = ((g**2) / 2.0_default) + gwwsu1su1_1 = (((g**2) / 2.0_default) * (mix_su111 * conjg (mix_su111))) + gwwsu2su2_1 = (((g**2) / 2.0_default) * (mix_su121 * conjg (mix_su121))) + gwwsu1su2_1 = (((g**2) / 2.0_default) * mix_su111 * conjg (mix_su121)) + gwwsu2su1_1 = (((g**2) / 2.0_default) * mix_su121 * conjg (mix_su111)) + gwwsd1sd1_1 = (((g**2) / 2.0_default) * (mix_sd111 * conjg (mix_sd111))) + gwwsd2sd2_1 = (((g**2) / 2.0_default) * (mix_sd121 * conjg (mix_sd121))) + gwwsd1sd2_1 = (((g**2) / 2.0_default) * mix_sd111 * conjg (mix_sd121)) + gwwsd2sd1_1 = (((g**2) / 2.0_default) * mix_sd121 * conjg (mix_sd111)) + gpwsl1sn_1 = ( - (e * 2.0_default * gcc * mix_sl111)) + gpwsl2sn_1 = ( - (e * 2.0_default * gcc * mix_sl121)) + gpwsl1sn_1_c = ( - (e * 2.0_default * gcc * conjg (mix_sl111))) + gpwsl2sn_1_c = ( - (e * 2.0_default * gcc * conjg (mix_sl121))) + gwzsl1sn_1 = (gcc * gz * 2.0_default * sin2thw * mix_sl111) + end subroutine setup_parameters3 + subroutine setup_parameters4 () + gwzsl2sn_1 = (gcc * gz * 2.0_default * sin2thw * mix_sl121) + gwzsl1sn_1_c = (gcc * gz * 2.0_default * sin2thw * conjg (mix_sl111)) + gwzsl2sn_1_c = (gcc * gz * 2.0_default * sin2thw * conjg (mix_sl121)) + gzzsl1sl1_2 = (((gz**2) / 2.0_default) * (((1.0_default - & + (4.0_default * sin2thw)) * (mix_sl211 * conjg (mix_sl211))) + & + (4.0_default * (sin2thw**2)))) + gzzsl2sl2_2 = (((gz**2) / 2.0_default) * (((1.0_default - & + (4.0_default * sin2thw)) * (mix_sl221 * conjg (mix_sl221))) + & + (4.0_default * (sin2thw**2)))) + gzzsl1sl2_2 = (((gz**2) / 2.0_default) * (1.0_default - & + (4.0_default * sin2thw)) * mix_sl211 * conjg (mix_sl221)) + gzzsl2sl1_2 = conjg(gzzsl1sl2_2) + gzzsn1sn1_2 = ((gz**2) / 2.0_default) + gzzsu1su1_2 = (((gz**2) / 2.0_default) * (((1.0_default - ( & + (8.0_default / 3.0_default) * sin2thw)) * (mix_su211 * & + conjg (mix_su211))) + ((sin2thw**2) * & + (16.0_default / 9.0_default)))) + gzzsu2su2_2 = (((gz**2) / 2.0_default) * (((1.0_default - ( & + (8.0_default / 3.0_default) * sin2thw)) * (mix_su221 * & + conjg (mix_su221))) + ((sin2thw**2) * & + (16.0_default / 9.0_default)))) + gzzsu1su2_2 = (((gz**2) / 2.0_default) * (1.0_default - (sin2thw * & + (8.0_default / 3.0_default))) * mix_su211 * conjg (mix_su221)) + gzzsu2su1_2 = conjg(gzzsu1su2_2) + gzzsd1sd1_2 = (((gz**2) / 2.0_default) * (((1.0_default - (sin2thw * & + (4.0_default / 3.0_default))) * (mix_sd211 * conjg (mix_sd211))) + & + ((sin2thw**2) * (4.0_default / 9.0_default)))) + gzzsd2sd2_2 = (((gz**2) / 2.0_default) * (((1.0_default - (sin2thw * & + (4.0_default / 3.0_default))) * (mix_sd221 * conjg (mix_sd221))) + & + ((sin2thw**2) * (4.0_default / 9.0_default)))) + gzzsd1sd2_2 = (((gz**2) / 2.0_default) * (1.0_default - (sin2thw * & + (4.0_default / 3.0_default))) * mix_sd211 * conjg (mix_sd221)) + gzzsd2sd1_2 = conjg(gzzsd1sd2_2) + gzpsl1sl1_2 = (e * gz * ((mix_sl211 * conjg (mix_sl211)) - & + (2.0_default * sin2thw))) + gzpsl2sl2_2 = (e * gz * ((mix_sl221 * conjg (mix_sl221)) - & + (2.0_default * sin2thw))) + gzpsl1sl2_2 = (e * gz * mix_sl211 * conjg (mix_sl221)) + gzpsl2sl1_2 = (e * gz * mix_sl221 * conjg (mix_sl211)) + gzpsu1su1_2 = (e * gz * (2.0_default / 3.0_default) * ((mix_su211 * & + conjg (mix_su211)) - (sin2thw * (4.0_default / 3.0_default)))) + gzpsu2su2_2 = (e * gz * (2.0_default / 3.0_default) * ((mix_su221 * & + conjg (mix_su221)) - (sin2thw * (4.0_default / 3.0_default)))) + gzpsu1su2_2 = (e * gz * (2.0_default / 3.0_default) * mix_su211 * & + conjg (mix_su221)) + gzpsu2su1_2 = (e * gz * (2.0_default / 3.0_default) * mix_su221 * & + conjg (mix_su211)) + gzpsd1sd1_2 = (e * gz * (1.0_default / 3.0_default) * ((mix_sd211 * & + conjg (mix_sd211)) - (sin2thw * (2.0_default / 3.0_default)))) + gzpsd2sd2_2 = (e * gz * (1.0_default / 3.0_default) * ((mix_sd221 * & + conjg (mix_sd221)) - (sin2thw * (2.0_default / 3.0_default)))) + gzpsd1sd2_2 = (e * gz * (1.0_default / 3.0_default) * mix_sd211 * & + conjg (mix_sd221)) + gzpsd2sd1_2 = (e * gz * (1.0_default / 3.0_default) * mix_sd221 * & + conjg (mix_sd211)) + gwwsl1sl1_2 = (((g**2) / 2.0_default) * (mix_sl211 * conjg (mix_sl211))) + gwwsl2sl2_2 = (((g**2) / 2.0_default) * (mix_sl221 * conjg (mix_sl221))) + gwwsl1sl2_2 = (((g**2) / 2.0_default) * mix_sl211 * conjg (mix_sl221)) + gwwsl2sl1_2 = (((g**2) / 2.0_default) * mix_sl221 * conjg (mix_sl211)) + gwwsn1sn1_2 = ((g**2) / 2.0_default) + gwwsu1su1_2 = (((g**2) / 2.0_default) * (mix_su211 * conjg (mix_su211))) + gwwsu2su2_2 = (((g**2) / 2.0_default) * (mix_su221 * conjg (mix_su221))) + gwwsu1su2_2 = (((g**2) / 2.0_default) * mix_su211 * conjg (mix_su221)) + gwwsu2su1_2 = (((g**2) / 2.0_default) * mix_su221 * conjg (mix_su211)) + gwwsd1sd1_2 = (((g**2) / 2.0_default) * (mix_sd211 * conjg (mix_sd211))) + gwwsd2sd2_2 = (((g**2) / 2.0_default) * (mix_sd221 * conjg (mix_sd221))) + gwwsd1sd2_2 = (((g**2) / 2.0_default) * mix_sd211 * conjg (mix_sd221)) + gwwsd2sd1_2 = (((g**2) / 2.0_default) * mix_sd221 * conjg (mix_sd211)) + gpwsl1sn_2 = ( - (e * 2.0_default * gcc * mix_sl211)) + gpwsl2sn_2 = ( - (e * 2.0_default * gcc * mix_sl221)) + gpwsl1sn_2_c = ( - (e * 2.0_default * gcc * conjg (mix_sl211))) + gpwsl2sn_2_c = ( - (e * 2.0_default * gcc * conjg (mix_sl221))) + gwzsl1sn_2 = (gcc * gz * 2.0_default * sin2thw * mix_sl211) + gwzsl2sn_2 = (gcc * gz * 2.0_default * sin2thw * mix_sl221) + gwzsl1sn_2_c = (gcc * gz * 2.0_default * sin2thw * conjg (mix_sl211)) + gwzsl2sn_2_c = (gcc * gz * 2.0_default * sin2thw * conjg (mix_sl221)) + gzzsl1sl1_3 = (((gz**2) / 2.0_default) * (((1.0_default - & + (4.0_default * sin2thw)) * (mix_sl311 * conjg (mix_sl311))) + & + (4.0_default * (sin2thw**2)))) + gzzsl2sl2_3 = (((gz**2) / 2.0_default) * (((1.0_default - & + (4.0_default * sin2thw)) * (mix_sl321 * conjg (mix_sl321))) + & + (4.0_default * (sin2thw**2)))) + gzzsl1sl2_3 = (((gz**2) / 2.0_default) * (1.0_default - & + (4.0_default * sin2thw)) * mix_sl311 * conjg (mix_sl321)) + gzzsl2sl1_3 = conjg(gzzsl1sl2_3) + gzzsn1sn1_3 = ((gz**2) / 2.0_default) + gzzsu1su1_3 = (((gz**2) / 2.0_default) * (((1.0_default - ( & + (8.0_default / 3.0_default) * sin2thw)) * (mix_su311 * & + conjg (mix_su311))) + ((sin2thw**2) * & + (16.0_default / 9.0_default)))) + gzzsu2su2_3 = (((gz**2) / 2.0_default) * (((1.0_default - ( & + (8.0_default / 3.0_default) * sin2thw)) * (mix_su321 * & + conjg (mix_su321))) + ((sin2thw**2) * & + (16.0_default / 9.0_default)))) + gzzsu1su2_3 = (((gz**2) / 2.0_default) * (1.0_default - (sin2thw * & + (8.0_default / 3.0_default))) * mix_su311 * conjg (mix_su321)) + gzzsu2su1_3 = conjg(gzzsu1su2_3) + gzzsd1sd1_3 = (((gz**2) / 2.0_default) * (((1.0_default - (sin2thw * & + (4.0_default / 3.0_default))) * (mix_sd311 * conjg (mix_sd311))) + & + ((sin2thw**2) * (4.0_default / 9.0_default)))) + gzzsd2sd2_3 = (((gz**2) / 2.0_default) * (((1.0_default - (sin2thw * & + (4.0_default / 3.0_default))) * (mix_sd321 * conjg (mix_sd321))) + & + ((sin2thw**2) * (4.0_default / 9.0_default)))) + gzzsd1sd2_3 = (((gz**2) / 2.0_default) * (1.0_default - (sin2thw * & + (4.0_default / 3.0_default))) * mix_sd311 * conjg (mix_sd321)) + gzzsd2sd1_3 = conjg(gzzsd1sd2_3) + gzpsl1sl1_3 = (e * gz * ((mix_sl311 * conjg (mix_sl311)) - & + (2.0_default * sin2thw))) + gzpsl2sl2_3 = (e * gz * ((mix_sl321 * conjg (mix_sl321)) - & + (2.0_default * sin2thw))) + gzpsl1sl2_3 = (e * gz * mix_sl311 * conjg (mix_sl321)) + gzpsl2sl1_3 = (e * gz * mix_sl321 * conjg (mix_sl311)) + gzpsu1su1_3 = (e * gz * (2.0_default / 3.0_default) * ((mix_su311 * & + conjg (mix_su311)) - (sin2thw * (4.0_default / 3.0_default)))) + gzpsu2su2_3 = (e * gz * (2.0_default / 3.0_default) * ((mix_su321 * & + conjg (mix_su321)) - (sin2thw * (4.0_default / 3.0_default)))) + gzpsu1su2_3 = (e * gz * (2.0_default / 3.0_default) * mix_su311 * & + conjg (mix_su321)) + gzpsu2su1_3 = (e * gz * (2.0_default / 3.0_default) * mix_su321 * & + conjg (mix_su311)) + gzpsd1sd1_3 = (e * gz * (1.0_default / 3.0_default) * ((mix_sd311 * & + conjg (mix_sd311)) - (sin2thw * (2.0_default / 3.0_default)))) + gzpsd2sd2_3 = (e * gz * (1.0_default / 3.0_default) * ((mix_sd321 * & + conjg (mix_sd321)) - (sin2thw * (2.0_default / 3.0_default)))) + gzpsd1sd2_3 = (e * gz * (1.0_default / 3.0_default) * mix_sd311 * & + conjg (mix_sd321)) + gzpsd2sd1_3 = (e * gz * (1.0_default / 3.0_default) * mix_sd321 * & + conjg (mix_sd311)) + gwwsl1sl1_3 = (((g**2) / 2.0_default) * (mix_sl311 * conjg (mix_sl311))) + gwwsl2sl2_3 = (((g**2) / 2.0_default) * (mix_sl321 * conjg (mix_sl321))) + gwwsl1sl2_3 = (((g**2) / 2.0_default) * mix_sl311 * conjg (mix_sl321)) + gwwsl2sl1_3 = (((g**2) / 2.0_default) * mix_sl321 * conjg (mix_sl311)) + gwwsn1sn1_3 = ((g**2) / 2.0_default) + gwwsu1su1_3 = (((g**2) / 2.0_default) * (mix_su311 * conjg (mix_su311))) + gwwsu2su2_3 = (((g**2) / 2.0_default) * (mix_su321 * conjg (mix_su321))) + gwwsu1su2_3 = (((g**2) / 2.0_default) * mix_su311 * conjg (mix_su321)) + gwwsu2su1_3 = (((g**2) / 2.0_default) * mix_su321 * conjg (mix_su311)) + gwwsd1sd1_3 = (((g**2) / 2.0_default) * (mix_sd311 * conjg (mix_sd311))) + gwwsd2sd2_3 = (((g**2) / 2.0_default) * (mix_sd321 * conjg (mix_sd321))) + gwwsd1sd2_3 = (((g**2) / 2.0_default) * mix_sd311 * conjg (mix_sd321)) + gwwsd2sd1_3 = (((g**2) / 2.0_default) * mix_sd321 * conjg (mix_sd311)) + gpwsl1sn_3 = ( - (e * 2.0_default * gcc * mix_sl311)) + gpwsl2sn_3 = ( - (e * 2.0_default * gcc * mix_sl321)) + gpwsl1sn_3_c = ( - (e * 2.0_default * gcc * conjg (mix_sl311))) + gpwsl2sn_3_c = ( - (e * 2.0_default * gcc * conjg (mix_sl321))) + gwzsl1sn_3 = (gcc * gz * 2.0_default * sin2thw * mix_sl311) + gwzsl2sn_3 = (gcc * gz * 2.0_default * sin2thw * mix_sl321) + gwzsl1sn_3_c = (gcc * gz * 2.0_default * sin2thw * conjg (mix_sl311)) + gwzsl2sn_3_c = (gcc * gz * 2.0_default * sin2thw * conjg (mix_sl321)) + gpwpsu1sd1_1_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_11 * & + conjg (mix_su111) * mix_sd111) + gpwpsu2sd2_1_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_11 * & + conjg (mix_su121) * mix_sd121) + gpwpsu1sd2_1_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_11 * & + conjg (mix_su111) * mix_sd121) + gpwpsu2sd1_1_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_11 * & + conjg (mix_su121) * mix_sd111) + gpwpsu1sd1_1_1_c = conjg (gpwpsu1sd1_1_1) + gpwpsu2sd2_1_1_c = conjg (gpwpsu2sd2_1_1) + gpwpsu1sd2_1_1_c = conjg (gpwpsu1sd2_1_1) + gpwpsu2sd1_1_1_c = conjg (gpwpsu2sd1_1_1) + gzwpsu1sd1_1_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_11 * & + conjg (mix_su111) * mix_sd111)) + gzwpsu2sd2_1_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_11 * & + conjg (mix_su121) * mix_sd121)) + gzwpsu1sd2_1_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_11 * & + conjg (mix_su111) * mix_sd121)) + gzwpsu2sd1_1_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_11 * & + conjg (mix_su121) * mix_sd111)) + gzwpsu1sd1_1_1_c = conjg (gzwpsu1sd1_1_1) + gzwpsu2sd2_1_1_c = conjg (gzwpsu2sd2_1_1) + gzwpsu1sd2_1_1_c = conjg (gzwpsu1sd2_1_1) + gzwpsu2sd1_1_1_c = conjg (gzwpsu2sd1_1_1) + gpwpsu1sd1_1_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_12 * & + conjg (mix_su111) * mix_sd211) + gpwpsu2sd2_1_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_12 * & + conjg (mix_su121) * mix_sd221) + gpwpsu1sd2_1_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_12 * & + conjg (mix_su111) * mix_sd221) + gpwpsu2sd1_1_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_12 * & + conjg (mix_su121) * mix_sd211) + gpwpsu1sd1_1_2_c = conjg (gpwpsu1sd1_1_2) + gpwpsu2sd2_1_2_c = conjg (gpwpsu2sd2_1_2) + gpwpsu1sd2_1_2_c = conjg (gpwpsu1sd2_1_2) + gpwpsu2sd1_1_2_c = conjg (gpwpsu2sd1_1_2) + gzwpsu1sd1_1_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_12 * & + conjg (mix_su111) * mix_sd211)) + end subroutine setup_parameters4 + subroutine setup_parameters5 () + gzwpsu2sd2_1_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_12 * & + conjg (mix_su121) * mix_sd221)) + gzwpsu1sd2_1_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_12 * & + conjg (mix_su111) * mix_sd221)) + gzwpsu2sd1_1_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_12 * & + conjg (mix_su121) * mix_sd211)) + gzwpsu1sd1_1_2_c = conjg (gzwpsu1sd1_1_2) + gzwpsu2sd2_1_2_c = conjg (gzwpsu2sd2_1_2) + gzwpsu1sd2_1_2_c = conjg (gzwpsu1sd2_1_2) + gzwpsu2sd1_1_2_c = conjg (gzwpsu2sd1_1_2) + gpwpsu1sd1_1_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_13 * & + conjg (mix_su111) * mix_sd311) + gpwpsu2sd2_1_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_13 * & + conjg (mix_su121) * mix_sd321) + gpwpsu1sd2_1_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_13 * & + conjg (mix_su111) * mix_sd321) + gpwpsu2sd1_1_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_13 * & + conjg (mix_su121) * mix_sd311) + gpwpsu1sd1_1_3_c = conjg (gpwpsu1sd1_1_3) + gpwpsu2sd2_1_3_c = conjg (gpwpsu2sd2_1_3) + gpwpsu1sd2_1_3_c = conjg (gpwpsu1sd2_1_3) + gpwpsu2sd1_1_3_c = conjg (gpwpsu2sd1_1_3) + gzwpsu1sd1_1_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_13 * & + conjg (mix_su111) * mix_sd311)) + gzwpsu2sd2_1_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_13 * & + conjg (mix_su121) * mix_sd321)) + gzwpsu1sd2_1_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_13 * & + conjg (mix_su111) * mix_sd321)) + gzwpsu2sd1_1_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_13 * & + conjg (mix_su121) * mix_sd311)) + gzwpsu1sd1_1_3_c = conjg (gzwpsu1sd1_1_3) + gzwpsu2sd2_1_3_c = conjg (gzwpsu2sd2_1_3) + gzwpsu1sd2_1_3_c = conjg (gzwpsu1sd2_1_3) + gzwpsu2sd1_1_3_c = conjg (gzwpsu2sd1_1_3) + gpwpsu1sd1_2_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_21 * & + conjg (mix_su211) * mix_sd111) + gpwpsu2sd2_2_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_21 * & + conjg (mix_su221) * mix_sd121) + gpwpsu1sd2_2_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_21 * & + conjg (mix_su211) * mix_sd121) + gpwpsu2sd1_2_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_21 * & + conjg (mix_su221) * mix_sd111) + gpwpsu1sd1_2_1_c = conjg (gpwpsu1sd1_2_1) + gpwpsu2sd2_2_1_c = conjg (gpwpsu2sd2_2_1) + gpwpsu1sd2_2_1_c = conjg (gpwpsu1sd2_2_1) + gpwpsu2sd1_2_1_c = conjg (gpwpsu2sd1_2_1) + gzwpsu1sd1_2_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_21 * & + conjg (mix_su211) * mix_sd111)) + gzwpsu2sd2_2_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_21 * & + conjg (mix_su221) * mix_sd121)) + gzwpsu1sd2_2_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_21 * & + conjg (mix_su211) * mix_sd121)) + gzwpsu2sd1_2_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_21 * & + conjg (mix_su221) * mix_sd111)) + gzwpsu1sd1_2_1_c = conjg (gzwpsu1sd1_2_1) + gzwpsu2sd2_2_1_c = conjg (gzwpsu2sd2_2_1) + gzwpsu1sd2_2_1_c = conjg (gzwpsu1sd2_2_1) + gzwpsu2sd1_2_1_c = conjg (gzwpsu2sd1_2_1) + gpwpsu1sd1_2_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_22 * & + conjg (mix_su211) * mix_sd211) + gpwpsu2sd2_2_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_22 * & + conjg (mix_su221) * mix_sd221) + gpwpsu1sd2_2_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_22 * & + conjg (mix_su211) * mix_sd221) + gpwpsu2sd1_2_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_22 * & + conjg (mix_su221) * mix_sd211) + gpwpsu1sd1_2_2_c = conjg (gpwpsu1sd1_2_2) + gpwpsu2sd2_2_2_c = conjg (gpwpsu2sd2_2_2) + gpwpsu1sd2_2_2_c = conjg (gpwpsu1sd2_2_2) + gpwpsu2sd1_2_2_c = conjg (gpwpsu2sd1_2_2) + gzwpsu1sd1_2_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_22 * & + conjg (mix_su211) * mix_sd211)) + gzwpsu2sd2_2_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_22 * & + conjg (mix_su221) * mix_sd221)) + gzwpsu1sd2_2_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_22 * & + conjg (mix_su211) * mix_sd221)) + gzwpsu2sd1_2_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_22 * & + conjg (mix_su221) * mix_sd211)) + gzwpsu1sd1_2_2_c = conjg (gzwpsu1sd1_2_2) + gzwpsu2sd2_2_2_c = conjg (gzwpsu2sd2_2_2) + gzwpsu1sd2_2_2_c = conjg (gzwpsu1sd2_2_2) + gzwpsu2sd1_2_2_c = conjg (gzwpsu2sd1_2_2) + gpwpsu1sd1_2_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_23 * & + conjg (mix_su211) * mix_sd311) + gpwpsu2sd2_2_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_23 * & + conjg (mix_su221) * mix_sd321) + gpwpsu1sd2_2_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_23 * & + conjg (mix_su211) * mix_sd321) + gpwpsu2sd1_2_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_23 * & + conjg (mix_su221) * mix_sd311) + gpwpsu1sd1_2_3_c = conjg (gpwpsu1sd1_2_3) + gpwpsu2sd2_2_3_c = conjg (gpwpsu2sd2_2_3) + gpwpsu1sd2_2_3_c = conjg (gpwpsu1sd2_2_3) + gpwpsu2sd1_2_3_c = conjg (gpwpsu2sd1_2_3) + gzwpsu1sd1_2_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_23 * & + conjg (mix_su211) * mix_sd311)) + gzwpsu2sd2_2_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_23 * & + conjg (mix_su221) * mix_sd321)) + gzwpsu1sd2_2_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_23 * & + conjg (mix_su211) * mix_sd321)) + gzwpsu2sd1_2_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_23 * & + conjg (mix_su221) * mix_sd311)) + gzwpsu1sd1_2_3_c = conjg (gzwpsu1sd1_2_3) + gzwpsu2sd2_2_3_c = conjg (gzwpsu2sd2_2_3) + gzwpsu1sd2_2_3_c = conjg (gzwpsu1sd2_2_3) + gzwpsu2sd1_2_3_c = conjg (gzwpsu2sd1_2_3) + gpwpsu1sd1_3_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_31 * & + conjg (mix_su311) * mix_sd111) + gpwpsu2sd2_3_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_31 * & + conjg (mix_su321) * mix_sd121) + gpwpsu1sd2_3_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_31 * & + conjg (mix_su311) * mix_sd121) + gpwpsu2sd1_3_1 = (e * gcc * (2.0_default / 3.0_default) * vckm_31 * & + conjg (mix_su321) * mix_sd111) + gpwpsu1sd1_3_1_c = conjg (gpwpsu1sd1_3_1) + gpwpsu2sd2_3_1_c = conjg (gpwpsu2sd2_3_1) + gpwpsu1sd2_3_1_c = conjg (gpwpsu1sd2_3_1) + gpwpsu2sd1_3_1_c = conjg (gpwpsu2sd1_3_1) + gzwpsu1sd1_3_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_31 * & + conjg (mix_su311) * mix_sd111)) + gzwpsu2sd2_3_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_31 * & + conjg (mix_su321) * mix_sd121)) + gzwpsu1sd2_3_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_31 * & + conjg (mix_su311) * mix_sd121)) + gzwpsu2sd1_3_1 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_31 * & + conjg (mix_su321) * mix_sd111)) + gzwpsu1sd1_3_1_c = conjg (gzwpsu1sd1_3_1) + gzwpsu2sd2_3_1_c = conjg (gzwpsu2sd2_3_1) + gzwpsu1sd2_3_1_c = conjg (gzwpsu1sd2_3_1) + gzwpsu2sd1_3_1_c = conjg (gzwpsu2sd1_3_1) + gpwpsu1sd1_3_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_32 * & + conjg (mix_su311) * mix_sd211) + gpwpsu2sd2_3_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_32 * & + conjg (mix_su321) * mix_sd221) + gpwpsu1sd2_3_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_32 * & + conjg (mix_su311) * mix_sd221) + gpwpsu2sd1_3_2 = (e * gcc * (2.0_default / 3.0_default) * vckm_32 * & + conjg (mix_su321) * mix_sd211) + gpwpsu1sd1_3_2_c = conjg (gpwpsu1sd1_3_2) + gpwpsu2sd2_3_2_c = conjg (gpwpsu2sd2_3_2) + gpwpsu1sd2_3_2_c = conjg (gpwpsu1sd2_3_2) + gpwpsu2sd1_3_2_c = conjg (gpwpsu2sd1_3_2) + gzwpsu1sd1_3_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_32 * & + conjg (mix_su311) * mix_sd211)) + gzwpsu2sd2_3_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_32 * & + conjg (mix_su321) * mix_sd221)) + gzwpsu1sd2_3_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_32 * & + conjg (mix_su311) * mix_sd221)) + gzwpsu2sd1_3_2 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_32 * & + conjg (mix_su321) * mix_sd211)) + gzwpsu1sd1_3_2_c = conjg (gzwpsu1sd1_3_2) + gzwpsu2sd2_3_2_c = conjg (gzwpsu2sd2_3_2) + gzwpsu1sd2_3_2_c = conjg (gzwpsu1sd2_3_2) + gzwpsu2sd1_3_2_c = conjg (gzwpsu2sd1_3_2) + gpwpsu1sd1_3_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_33 * & + conjg (mix_su311) * mix_sd311) + gpwpsu2sd2_3_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_33 * & + conjg (mix_su321) * mix_sd321) + gpwpsu1sd2_3_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_33 * & + conjg (mix_su311) * mix_sd321) + gpwpsu2sd1_3_3 = (e * gcc * (2.0_default / 3.0_default) * vckm_33 * & + conjg (mix_su321) * mix_sd311) + gpwpsu1sd1_3_3_c = conjg (gpwpsu1sd1_3_3) + gpwpsu2sd2_3_3_c = conjg (gpwpsu2sd2_3_3) + gpwpsu1sd2_3_3_c = conjg (gpwpsu1sd2_3_3) + gpwpsu2sd1_3_3_c = conjg (gpwpsu2sd1_3_3) + gzwpsu1sd1_3_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_33 * & + conjg (mix_su311) * mix_sd311)) + gzwpsu2sd2_3_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_33 * & + conjg (mix_su321) * mix_sd321)) + gzwpsu1sd2_3_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_33 * & + conjg (mix_su311) * mix_sd321)) + gzwpsu2sd1_3_3 = ( - (gcc * gz * & + (2.0_default / 3.0_default) * sin2thw * vckm_33 * & + conjg (mix_su321) * mix_sd311)) + gzwpsu1sd1_3_3_c = conjg (gzwpsu1sd1_3_3) + gzwpsu2sd2_3_3_c = conjg (gzwpsu2sd2_3_3) + gzwpsu1sd2_3_3_c = conjg (gzwpsu1sd2_3_3) + gzwpsu2sd1_3_3_c = conjg (gzwpsu2sd1_3_3) + gglglsqsq = (gs**2) + end subroutine setup_parameters5 + subroutine setup_parameters6 () + gglpsqsq = 2.0_default * e * gs / 3.0_default + gglsu1su1_1 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su111 * conjg (mix_su111))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu2su2_1 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su121 * conjg (mix_su121))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu1su2_1 = (gz * gs * (1.0_default / 2.0_default) * mix_su111 * & + conjg (mix_su121)) + gglsu2su1_1 = (gz * gs * (1.0_default / 2.0_default) * mix_su121 * & + conjg (mix_su111)) + gglsd1sd1_1 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd111 * conjg (mix_sd111))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd2sd2_1 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd121 * conjg (mix_sd121))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd1sd2_1 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd111 * conjg (mix_sd121))) + gglsd2sd1_1 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd121 * conjg (mix_sd111))) + gglsu1su1_2 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su211 * conjg (mix_su211))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu2su2_2 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su221 * conjg (mix_su221))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu1su2_2 = (gz * gs * (1.0_default / 2.0_default) * mix_su211 * & + conjg (mix_su221)) + gglsu2su1_2 = (gz * gs * (1.0_default / 2.0_default) * mix_su221 * & + conjg (mix_su211)) + gglsd1sd1_2 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd211 * conjg (mix_sd211))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd2sd2_2 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd221 * conjg (mix_sd221))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd1sd2_2 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd211 * conjg (mix_sd221))) + gglsd2sd1_2 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd221 * conjg (mix_sd211))) + gglsu1su1_3 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su311 * conjg (mix_su311))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu2su2_3 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su321 * conjg (mix_su321))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu1su2_3 = (gz * gs * (1.0_default / 2.0_default) * mix_su311 * & + conjg (mix_su321)) + gglsu2su1_3 = (gz * gs * (1.0_default / 2.0_default) * mix_su321 * & + conjg (mix_su311)) + gglsd1sd1_3 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd311 * conjg (mix_sd311))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd2sd2_3 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd321 * conjg (mix_sd321))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd1sd2_3 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd311 * conjg (mix_sd321))) + gglsd2sd1_3 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd321 * conjg (mix_sd311))) + gglwsu1sd1_1_1 = (g * gs * sqrt (2.0_default) * vckm_11 * & + conjg (mix_su111) * mix_sd111) + gglwsu2sd2_1_1 = (g * gs * sqrt (2.0_default) * vckm_11 * & + conjg (mix_su121) * mix_sd121) + gglwsu1sd2_1_1 = (g * gs * sqrt (2.0_default) * vckm_11 * & + conjg (mix_su111) * mix_sd121) + gglwsu2sd1_1_1 = (g * gs * sqrt (2.0_default) * vckm_11 * & + conjg (mix_su121) * mix_sd111) + gglwsu1sd1_1_1_c = conjg (gglwsu1sd1_1_1) + gglwsu2sd2_1_1_c = conjg (gglwsu2sd2_1_1) + gglwsu1sd2_1_1_c = conjg (gglwsu1sd2_1_1) + gglwsu2sd1_1_1_c = conjg (gglwsu2sd1_1_1) + gglwsu1sd1_1_2 = (g * gs * sqrt (2.0_default) * vckm_12 * & + conjg (mix_su111) * mix_sd211) + gglwsu2sd2_1_2 = (g * gs * sqrt (2.0_default) * vckm_12 * & + conjg (mix_su121) * mix_sd221) + gglwsu1sd2_1_2 = (g * gs * sqrt (2.0_default) * vckm_12 * & + conjg (mix_su111) * mix_sd221) + gglwsu2sd1_1_2 = (g * gs * sqrt (2.0_default) * vckm_12 * & + conjg (mix_su121) * mix_sd211) + gglwsu1sd1_1_2_c = conjg (gglwsu1sd1_1_2) + gglwsu2sd2_1_2_c = conjg (gglwsu2sd2_1_2) + gglwsu1sd2_1_2_c = conjg (gglwsu1sd2_1_2) + gglwsu2sd1_1_2_c = conjg (gglwsu2sd1_1_2) + gglwsu1sd1_1_3 = (g * gs * sqrt (2.0_default) * vckm_13 * & + conjg (mix_su111) * mix_sd311) + gglwsu2sd2_1_3 = (g * gs * sqrt (2.0_default) * vckm_13 * & + conjg (mix_su121) * mix_sd321) + gglwsu1sd2_1_3 = (g * gs * sqrt (2.0_default) * vckm_13 * & + conjg (mix_su111) * mix_sd321) + gglwsu2sd1_1_3 = (g * gs * sqrt (2.0_default) * vckm_13 * & + conjg (mix_su121) * mix_sd311) + gglwsu1sd1_1_3_c = conjg (gglwsu1sd1_1_3) + gglwsu2sd2_1_3_c = conjg (gglwsu2sd2_1_3) + gglwsu1sd2_1_3_c = conjg (gglwsu1sd2_1_3) + gglwsu2sd1_1_3_c = conjg (gglwsu2sd1_1_3) + gglwsu1sd1_2_1 = (g * gs * sqrt (2.0_default) * vckm_21 * & + conjg (mix_su211) * mix_sd111) + gglwsu2sd2_2_1 = (g * gs * sqrt (2.0_default) * vckm_21 * & + conjg (mix_su221) * mix_sd121) + gglwsu1sd2_2_1 = (g * gs * sqrt (2.0_default) * vckm_21 * & + conjg (mix_su211) * mix_sd121) + gglwsu2sd1_2_1 = (g * gs * sqrt (2.0_default) * vckm_21 * & + conjg (mix_su221) * mix_sd111) + gglwsu1sd1_2_1_c = conjg (gglwsu1sd1_2_1) + gglwsu2sd2_2_1_c = conjg (gglwsu2sd2_2_1) + gglwsu1sd2_2_1_c = conjg (gglwsu1sd2_2_1) + gglwsu2sd1_2_1_c = conjg (gglwsu2sd1_2_1) + gglwsu1sd1_2_2 = (g * gs * sqrt (2.0_default) * vckm_22 * & + conjg (mix_su211) * mix_sd211) + gglwsu2sd2_2_2 = (g * gs * sqrt (2.0_default) * vckm_22 * & + conjg (mix_su221) * mix_sd221) + gglwsu1sd2_2_2 = (g * gs * sqrt (2.0_default) * vckm_22 * & + conjg (mix_su211) * mix_sd221) + gglwsu2sd1_2_2 = (g * gs * sqrt (2.0_default) * vckm_22 * & + conjg (mix_su221) * mix_sd211) + gglwsu1sd1_2_2_c = conjg (gglwsu1sd1_2_2) + gglwsu2sd2_2_2_c = conjg (gglwsu2sd2_2_2) + gglwsu1sd2_2_2_c = conjg (gglwsu1sd2_2_2) + gglwsu2sd1_2_2_c = conjg (gglwsu2sd1_2_2) + gglwsu1sd1_2_3 = (g * gs * sqrt (2.0_default) * vckm_23 * & + conjg (mix_su211) * mix_sd311) + gglwsu2sd2_2_3 = (g * gs * sqrt (2.0_default) * vckm_23 * & + conjg (mix_su221) * mix_sd321) + gglwsu1sd2_2_3 = (g * gs * sqrt (2.0_default) * vckm_23 * & + conjg (mix_su211) * mix_sd321) + gglwsu2sd1_2_3 = (g * gs * sqrt (2.0_default) * vckm_23 * & + conjg (mix_su221) * mix_sd311) + gglwsu1sd1_2_3_c = conjg (gglwsu1sd1_2_3) + gglwsu2sd2_2_3_c = conjg (gglwsu2sd2_2_3) + gglwsu1sd2_2_3_c = conjg (gglwsu1sd2_2_3) + gglwsu2sd1_2_3_c = conjg (gglwsu2sd1_2_3) + gglwsu1sd1_3_1 = (g * gs * sqrt (2.0_default) * vckm_31 * & + conjg (mix_su311) * mix_sd111) + gglwsu2sd2_3_1 = (g * gs * sqrt (2.0_default) * vckm_31 * & + conjg (mix_su321) * mix_sd121) + gglwsu1sd2_3_1 = (g * gs * sqrt (2.0_default) * vckm_31 * & + conjg (mix_su311) * mix_sd121) + gglwsu2sd1_3_1 = (g * gs * sqrt (2.0_default) * vckm_31 * & + conjg (mix_su321) * mix_sd111) + gglwsu1sd1_3_1_c = conjg (gglwsu1sd1_3_1) + gglwsu2sd2_3_1_c = conjg (gglwsu2sd2_3_1) + gglwsu1sd2_3_1_c = conjg (gglwsu1sd2_3_1) + gglwsu2sd1_3_1_c = conjg (gglwsu2sd1_3_1) + gglwsu1sd1_3_2 = (g * gs * sqrt (2.0_default) * vckm_32 * & + conjg (mix_su311) * mix_sd211) + gglwsu2sd2_3_2 = (g * gs * sqrt (2.0_default) * vckm_32 * & + conjg (mix_su321) * mix_sd221) + gglwsu1sd2_3_2 = (g * gs * sqrt (2.0_default) * vckm_32 * & + conjg (mix_su311) * mix_sd221) + end subroutine setup_parameters6 + subroutine setup_parameters7 () + gglwsu2sd1_3_2 = (g * gs * sqrt (2.0_default) * vckm_32 * & + conjg (mix_su321) * mix_sd211) + gglwsu1sd1_3_2_c = conjg (gglwsu1sd1_3_2) + gglwsu2sd2_3_2_c = conjg (gglwsu2sd2_3_2) + gglwsu1sd2_3_2_c = conjg (gglwsu1sd2_3_2) + gglwsu2sd1_3_2_c = conjg (gglwsu2sd1_3_2) + gglwsu1sd1_3_3 = (g * gs * sqrt (2.0_default) * vckm_33 * & + conjg (mix_su311) * mix_sd311) + gglwsu2sd2_3_3 = (g * gs * sqrt (2.0_default) * vckm_33 * & + conjg (mix_su321) * mix_sd321) + gglwsu1sd2_3_3 = (g * gs * sqrt (2.0_default) * vckm_33 * & + conjg (mix_su311) * mix_sd321) + gglwsu2sd1_3_3 = (g * gs * sqrt (2.0_default) * vckm_33 * & + conjg (mix_su321) * mix_sd311) + gglwsu1sd1_3_3_c = conjg (gglwsu1sd1_3_3) + gglwsu2sd2_3_3_c = conjg (gglwsu2sd2_3_3) + gglwsu1sd2_3_3_c = conjg (gglwsu1sd2_3_3) + gglwsu2sd1_3_3_c = conjg (gglwsu2sd1_3_3) + axial0_11 = real ((mn_14 * conjg (mn_14)) - (mn_13 * conjg (mn_13))) & + / 2.0_default + snnh1_11 = 2.0_default * ( - real ((mn_12 - ( & + (sinthw / costhw) * mn_11)) * ((sinal * mn_13) + (cosal * mn_14)))) + snnh2_11 = 2.0_default * real ((mn_12 - ((sinthw / costhw) * mn_11)) * & + ((cosal * mn_13) - (sinal * mn_14))) + pnna_11 = 2.0_default * cmplx (0.0_default, real ((mn_12 - (mn_11 * (sinthw / costhw))) * ( & + (mn_13 * sinbe) - (mn_14 * cosbe))),kind=default) + vector0_12 = cmplx (0.0_default, aimag ((mn_14 * conjg (mn_24)) - & + (mn_13 * conjg (mn_23))), kind=default) / 2.0_default + axial0_12 = real ((mn_14 * conjg (mn_24)) - (mn_13 * conjg (mn_23))) & + / 2.0_default + snnh1_12 = ( - real (((mn_12 - ((sinthw / costhw) * mn_11)) * ((sinal & + * mn_23) + (cosal * mn_24))) + ((mn_22 - ((sinthw / costhw) * mn_21)) & + * ((sinal * mn_13) + (cosal * mn_14))))) + pnnh1_12 = ( - cmplx (0.0_default, aimag (((mn_12 - ( & + (sinthw / costhw) * mn_11)) * ((sinal * mn_23) + (cosal * mn_24))) + ( & + (mn_22 - ((sinthw / costhw) * mn_21)) * ((sinal * mn_13) + & + (cosal * mn_14)))), kind=default)) + snnh2_12 = real (((mn_12 - ((sinthw / costhw) * mn_11)) * ((cosal * & + mn_23) - (sinal * mn_24))) + ((mn_22 - ((sinthw / costhw) * mn_21)) * ( & + (cosal * mn_13) - (sinal * mn_14)))) + pnnh2_12 = cmplx (0.0_default, aimag (((mn_12 - ((sinthw / costhw) & + * mn_11)) * ((cosal * mn_23) - (sinal * mn_24))) + ((mn_22 - ( & + (sinthw / costhw) * mn_21)) * ((cosal * mn_13) - & + (sinal * mn_14)))), kind=default) + snna_12 = - aimag (((mn_12 - (mn_11 * & + (sinthw / costhw))) * ((mn_23 * sinbe) - (mn_24 * cosbe))) + ((mn_22 - & + (mn_21 * (sinthw / costhw))) * ((mn_13 * sinbe) - & + (mn_14 * cosbe)))) + pnna_12 = cmplx (0.0_default, real (((mn_12 - (mn_11 * (sinthw / costhw))) * ((mn_23 * sinbe) & + - (mn_24 * cosbe))) + ((mn_22 - (mn_21 * (sinthw / costhw))) * ( & + (mn_13 * sinbe) - (mn_14 * cosbe)))),kind=default) + vector0_13 = cmplx (0.0_default, aimag ((mn_14 * conjg (mn_34)) - (mn_13 * & + conjg (mn_33))), kind=default) / 2.0_default + axial0_13 = real ((mn_14 * conjg (mn_34)) - (mn_13 * conjg (mn_33))) & + / 2.0_default + snnh1_13 = ( - real (((mn_12 - ((sinthw / costhw) * mn_11)) * ((sinal * & + mn_33) + (cosal * mn_34))) + ((mn_32 - ((sinthw / costhw) * mn_31)) * ( & + (sinal * mn_13) + (cosal * mn_14))))) + pnnh1_13 = ( - cmplx (0.0_default, aimag (((mn_12 - ( & + (sinthw / costhw) * mn_11)) * ((sinal * mn_33) + (cosal * mn_34))) + ( & + (mn_32 - ((sinthw / costhw) * mn_31)) * ((sinal * mn_13) + & + (cosal * mn_14)))), kind=default)) + snnh2_13 = real (((mn_12 - ((sinthw / costhw) * mn_11)) * ((cosal * & + mn_33) - (sinal * mn_34))) + ((mn_32 - ((sinthw / costhw) * mn_31)) * ( & + (cosal * mn_13) - (sinal * mn_14)))) + pnnh2_13 = cmplx (0.0_default, aimag (((mn_12 - ((sinthw / costhw) * & + mn_11)) * ((cosal * mn_33) - (sinal * mn_34))) + ((mn_32 - ( & + (sinthw / costhw) * mn_31)) * ((cosal * mn_13) - & + (sinal * mn_14)))), kind=default) + snna_13 = - aimag (((mn_12 - (mn_11 * & + (sinthw / costhw))) * ((mn_33 * sinbe) - (mn_34 * cosbe))) + ((mn_32 - & + (mn_31 * (sinthw / costhw))) * ((mn_13 * sinbe) - & + (mn_14 * cosbe)))) + pnna_13 = cmplx (0.0_default, real (((mn_12 - (mn_11 * (sinthw / costhw))) * ((mn_33 * sinbe) & + - (mn_34 * cosbe))) + ((mn_32 - (mn_31 * (sinthw / costhw))) * ( & + (mn_13 * sinbe) - (mn_14 * cosbe)))),kind=default) + vector0_14 = cmplx (0.0_default, aimag ((mn_14 * conjg (mn_44)) - (mn_13 * & + conjg (mn_43))), kind=default) / 2.0_default + axial0_14 = real ((mn_14 * conjg (mn_44)) - (mn_13 * conjg (mn_43))) & + / 2.0_default + snnh1_14 = ( - real (((mn_12 - ((sinthw / costhw) * mn_11)) * ((sinal * & + mn_43) + (cosal * mn_44))) + ((mn_42 - ((sinthw / costhw) * mn_41)) * ( & + (sinal * mn_13) + (cosal * mn_14))))) + pnnh1_14 = ( - cmplx (0.0_default, aimag (((mn_12 - ( & + (sinthw / costhw) * mn_11)) * ((sinal * mn_43) + (cosal * mn_44))) + ( & + (mn_42 - ((sinthw / costhw) * mn_41)) * ((sinal * mn_13) + & + (cosal * mn_14)))), kind=default)) + snnh2_14 = real (((mn_12 - ((sinthw / costhw) * mn_11)) * ((cosal * & + mn_43) - (sinal * mn_44))) + ((mn_42 - ((sinthw / costhw) * mn_41)) * ( & + (cosal * mn_13) - (sinal * mn_14)))) + pnnh2_14 = cmplx (0.0_default, aimag (((mn_12 - ((sinthw / costhw) * & + mn_11)) * ((cosal * mn_43) - (sinal * mn_44))) + ((mn_42 - ( & + (sinthw / costhw) * mn_41)) * ((cosal * mn_13) - & + (sinal * mn_14)))), kind=default) + snna_14 = - aimag (((mn_12 - (mn_11 * & + (sinthw / costhw))) * ((mn_43 * sinbe) - (mn_44 * cosbe))) + ((mn_42 - & + (mn_41 * (sinthw / costhw))) * ((mn_13 * sinbe) - & + (mn_14 * cosbe)))) + pnna_14 = cmplx (0.0_default, real (((mn_12 - (mn_11 * (sinthw / costhw))) * ((mn_43 * sinbe) & + - (mn_44 * cosbe))) + ((mn_42 - (mn_41 * (sinthw / costhw))) * ( & + (mn_13 * sinbe) - (mn_14 * cosbe)))),kind=default) + axial0_22 = real ((mn_24 * conjg (mn_24)) - (mn_23 * conjg (mn_23))) & + / 2.0_default + snnh1_22 = 2.0_default * ( - real ((mn_22 - ( & + (sinthw / costhw) * mn_21)) * ((sinal * mn_23) + (cosal * mn_24)))) + snnh2_22 = 2.0_default * real ((mn_22 - ((sinthw / costhw) * mn_21)) & + * ((cosal * mn_23) - (sinal * mn_24))) + pnna_22 = 2.0_default * cmplx (0.0_default, real ((mn_22 - (mn_21 * (sinthw / costhw))) * ( & + (mn_23 * sinbe) - (mn_24 * cosbe))),kind=default) + vector0_23 = cmplx (0.0_default, aimag ((mn_24 * conjg (mn_34)) - (mn_23 * & + conjg (mn_33))), kind=default) / 2.0_default + axial0_23 = real ((mn_24 * conjg (mn_34)) - (mn_23 * conjg (mn_33))) & + / 2.0_default + snnh1_23 = ( - real (((mn_22 - ((sinthw / costhw) * mn_21)) * ((sinal * & + mn_33) + (cosal * mn_34))) + ((mn_32 - ((sinthw / costhw) * mn_31)) * ( & + (sinal * mn_23) + (cosal * mn_24))))) + pnnh1_23 = ( - cmplx (0.0_default, aimag (((mn_22 - ( & + (sinthw / costhw) * mn_21)) * ((sinal * mn_33) + (cosal * mn_34))) + ( & + (mn_32 - ((sinthw / costhw) * mn_31)) * ((sinal * mn_23) + & + (cosal * mn_24)))), kind=default)) + snnh2_23 = real (((mn_22 - ((sinthw / costhw) * mn_21)) * ((cosal * & + mn_33) - (sinal * mn_34))) + ((mn_32 - ((sinthw / costhw) * mn_31)) * ( & + (cosal * mn_23) - (sinal * mn_24)))) + pnnh2_23 = cmplx (0.0_default, aimag (((mn_22 - ((sinthw / costhw) * & + mn_21)) * ((cosal * mn_33) - (sinal * mn_34))) + ((mn_32 - ( & + (sinthw / costhw) * mn_31)) * ((cosal * mn_23) - & + (sinal * mn_24)))), kind=default) + snna_23 = - aimag (((mn_22 - (mn_21 * & + (sinthw / costhw))) * ((mn_33 * sinbe) - (mn_34 * cosbe))) + ((mn_32 - & + (mn_31 * (sinthw / costhw))) * ((mn_23 * sinbe) - & + (mn_24 * cosbe)))) + pnna_23 = cmplx (0.0_default, real (((mn_22 - (mn_21 * (sinthw / costhw))) * ((mn_33 * sinbe) & + - (mn_34 * cosbe))) + ((mn_32 - (mn_31 * (sinthw / costhw))) * ( & + (mn_23 * sinbe) - (mn_24 * cosbe)))),kind=default) + vector0_24 = cmplx (0.0_default, aimag ((mn_24 * conjg (mn_44)) - (mn_23 * & + conjg (mn_43))), kind=default) / 2.0_default + axial0_24 = real ((mn_24 * conjg (mn_44)) - (mn_23 * conjg (mn_43))) & + / 2.0_default + snnh1_24 = - real (((mn_22 - ((sinthw / costhw) * mn_21)) * ((sinal * & + mn_43) + (cosal * mn_44))) + ((mn_42 - ((sinthw / costhw) * mn_41)) * ( & + (sinal * mn_23) + (cosal * mn_24)))) + pnnh1_24 = ( - cmplx (0.0_default, aimag (((mn_22 - ( & + (sinthw / costhw) * mn_21)) * ((sinal * mn_43) + (cosal * mn_44))) + ( & + (mn_42 - ((sinthw / costhw) * mn_41)) * ((sinal * mn_23) + & + (cosal * mn_24)))), kind=default)) + snnh2_24 = real (((mn_22 - ((sinthw / costhw) * mn_21)) * ((cosal * & + mn_43) - (sinal * mn_44))) + ((mn_42 - ((sinthw / costhw) * mn_41)) * ( & + (cosal * mn_23) - (sinal * mn_24)))) + pnnh2_24 = cmplx (0.0_default, aimag (((mn_22 - ((sinthw / costhw) * & + mn_21)) * ((cosal * mn_43) - (sinal * mn_44))) + ((mn_42 - ( & + (sinthw / costhw) * mn_41)) * ((cosal * mn_23) - & + (sinal * mn_24)))), kind=default) + snna_24 = - aimag (((mn_22 - (mn_21 * & + (sinthw / costhw))) * ((mn_43 * sinbe) - (mn_44 * cosbe))) + ((mn_42 - & + (mn_41 * (sinthw / costhw))) * ((mn_23 * sinbe) - & + (mn_24 * cosbe)))) + pnna_24 = cmplx (0.0_default, real (((mn_22 - (mn_21 * (sinthw / costhw))) * ((mn_43 * sinbe) & + - (mn_44 * cosbe))) + ((mn_42 - (mn_41 * (sinthw / costhw))) * ( & + (mn_23 * sinbe) - (mn_24 * cosbe)))),kind=default) + axial0_33 = real ((mn_34 * conjg (mn_34)) - (mn_33 * conjg (mn_33))) & + / 2.0_default + snnh1_33 = 2.0_default * ( - real ((mn_32 - ( & + (sinthw / costhw) * mn_31)) * ((sinal * mn_33) + (cosal * mn_34)))) + snnh2_33 = 2.0_default * real ((mn_32 - ((sinthw / costhw) * mn_31)) & + * ((cosal * mn_33) - (sinal * mn_34))) + pnna_33 = 2.0_default * cmplx (0.0_default, real ((mn_32 - (mn_31 * (sinthw / costhw))) * ( & + (mn_33 * sinbe) - (mn_34 * cosbe))),kind=default) + end subroutine setup_parameters7 + subroutine setup_parameters8 () + vector0_34 = cmplx (0.0_default, aimag ((mn_34 * conjg (mn_44)) - (mn_33 * & + conjg (mn_43))), kind=default) / 2.0_default + axial0_34 = real ((mn_34 * conjg (mn_44)) - (mn_33 * conjg (mn_43))) & + / 2.0_default + snnh1_34 = ( - real (((mn_32 - ((sinthw / costhw) * mn_31)) * ((sinal * & + mn_43) + (cosal * mn_44))) + ((mn_42 - ((sinthw / costhw) * mn_41)) * ( & + (sinal * mn_33) + (cosal * mn_34))))) + pnnh1_34 = ( - cmplx (0.0_default, aimag (((mn_32 - ( & + (sinthw / costhw) * mn_31)) * ((sinal * mn_43) + (cosal * mn_44))) + ( & + (mn_42 - ((sinthw / costhw) * mn_41)) * ((sinal * mn_33) + & + (cosal * mn_34)))), kind=default)) + snnh2_34 = real (((mn_32 - ((sinthw / costhw) * mn_31)) * ((cosal * & + mn_43) - (sinal * mn_44))) + ((mn_42 - ((sinthw / costhw) * mn_41)) * ( & + (cosal * mn_33) - (sinal * mn_34)))) + pnnh2_34 = cmplx (0.0_default, aimag (((mn_32 - ((sinthw / costhw) * & + mn_31)) * ((cosal * mn_43) - (sinal * mn_44))) + ((mn_42 - ( & + (sinthw / costhw) * mn_41)) * ((cosal * mn_33) - & + (sinal * mn_34)))), kind=default) + snna_34 = - aimag (((mn_32 - (mn_31 * & + (sinthw / costhw))) * ((mn_43 * sinbe) - (mn_44 * cosbe))) + ((mn_42 - & + (mn_41 * (sinthw / costhw))) * ((mn_33 * sinbe) - & + (mn_34 * cosbe)))) + pnna_34 = cmplx (0.0_default, real (((mn_32 - (mn_31 * (sinthw / costhw))) * ((mn_43 * sinbe) & + - (mn_44 * cosbe))) + ((mn_42 - (mn_41 * (sinthw / costhw))) * ( & + (mn_33 * sinbe) - (mn_34 * cosbe)))),kind=default) + axial0_44 = real ((mn_44 * conjg (mn_44)) - (mn_43 * conjg (mn_43))) & + / 2.0_default + snnh1_44 = 2.0_default * ( - real ((mn_42 - ( & + (sinthw / costhw) * mn_41)) * ((sinal * mn_43) + (cosal * mn_44)))) + snnh2_44 = 2.0_default * real ((mn_42 - ((sinthw / costhw) * mn_41)) & + * ((cosal * mn_43) - (sinal * mn_44))) + pnna_44 = 2.0_default * cmplx (0.0_default, real ((mn_42 - (mn_41 * (sinthw / costhw))) * ( & + (mn_43 * sinbe) - (mn_44 * cosbe))),kind=default) + vp_11 = ((((1.0_default - & + (2.0_default * sin2thw)) / 4.0_default) * ((mv_12 * conjg (mv_12)) & + + (conjg (mu_12) * mu_12))) + (((costhw**2) / 2.0_default) * ( & + (mv_11 * conjg (mv_11)) + (conjg (mu_11) * mu_11)))) + ap_11 = ((((1.0_default - & + (2.0_default * sin2thw)) / 4.0_default) * ((mv_12 * & + conjg (mv_12)) - (conjg (mu_12) * mu_12))) + (( & + (costhw**2) / 2.0_default) * ((mv_11 * conjg (mv_11)) - ( & + conjg (mu_11) * mu_11)))) + vp_12 = ((((1.0_default - & + (2.0_default * sin2thw)) / 4.0_default) * ((mv_12 * conjg (mv_22)) & + + (conjg (mu_12) * mu_22))) + (((costhw**2) / 2.0_default) * ( & + (mv_11 * conjg (mv_21)) + (conjg (mu_11) * mu_21)))) + ap_12 = ((((1.0_default - & + (2.0_default * sin2thw)) / 4.0_default) * ((mv_12 * & + conjg (mv_22)) - (conjg (mu_12) * mu_22))) + (( & + (costhw**2) / 2.0_default) * ((mv_11 * conjg (mv_21)) - ( & + conjg (mu_11) * mu_21)))) + vp_21 = conjg (vp_12) + ap_21 = conjg (ap_12) + vp_22 = ((((1.0_default - & + (2.0_default * sin2thw)) / 4.0_default) * ((mv_22 * conjg (mv_22)) & + + (conjg (mu_22) * mu_22))) + (((costhw**2) / 2.0_default) * ( & + (mv_21 * conjg (mv_21)) + (conjg (mu_21) * mu_21)))) + ap_22 = ((((1.0_default - & + (2.0_default * sin2thw)) / 4.0_default) * ((mv_22 * & + conjg (mv_22)) - (conjg (mu_22) * mu_22))) + (( & + (costhw**2) / 2.0_default) * ((mv_21 * conjg (mv_21)) - ( & + conjg (mu_21) * mu_21)))) + lcn_11 = ((conjg (mn_12) * mv_11 * sqrt (2.0_default)) - ( & + conjg (mn_14) * mv_12)) + rcn_11 = ((mn_12 * conjg (mu_11) * sqrt (2.0_default)) + (mn_13 * & + conjg (mu_12))) + lnch_11 = (cosbe * ((conjg (mn_14) * conjg (mv_11)) + ((conjg (mv_12) / & + sqrt (2.0_default)) * (conjg (mn_12) + ((sinthw / costhw) * & + conjg (mn_11)))))) + rnch_11 = (sinbe * ((mn_13 * mu_11) - ((mu_12 / sqrt (2.0_default)) * & + (mn_12 + ((sinthw / costhw) * mn_11))))) + lcn_12 = ((conjg (mn_22) * mv_11 * sqrt (2.0_default)) - ( & + conjg (mn_24) * mv_12)) + rcn_12 = ((mn_22 * conjg (mu_11) * sqrt (2.0_default)) + (mn_23 * & + conjg (mu_12))) + lnch_21 = (cosbe * ((conjg (mn_24) * conjg (mv_11)) + ((conjg (mv_12) / & + sqrt (2.0_default)) * (conjg (mn_22) + ((sinthw / costhw) * & + conjg (mn_21)))))) + rnch_21 = (sinbe * ((mn_23 * mu_11) - ((mu_12 / sqrt (2.0_default)) * & + (mn_22 + ((sinthw / costhw) * mn_21))))) + lcn_13 = ((conjg (mn_32) * mv_11 * sqrt (2.0_default)) - ( & + conjg (mn_34) * mv_12)) + rcn_13 = ((mn_32 * conjg (mu_11) * sqrt (2.0_default)) + (mn_33 * & + conjg (mu_12))) + lnch_31 = (cosbe * ((conjg (mn_34) * conjg (mv_11)) + ((conjg (mv_12) / & + sqrt (2.0_default)) * (conjg (mn_32) + ((sinthw / costhw) * & + conjg (mn_31)))))) + rnch_31 = (sinbe * ((mn_33 * mu_11) - ((mu_12 / sqrt (2.0_default)) * & + (mn_32 + ((sinthw / costhw) * mn_31))))) + lcn_14 = ((conjg (mn_42) * mv_11 * sqrt (2.0_default)) - ( & + conjg (mn_44) * mv_12)) + rcn_14 = ((mn_42 * conjg (mu_11) * sqrt (2.0_default)) + (mn_43 * & + conjg (mu_12))) + lnch_41 = (cosbe * ((conjg (mn_44) * conjg (mv_11)) + ((conjg (mv_12) / & + sqrt (2.0_default)) * (conjg (mn_42) + ((sinthw / costhw) * & + conjg (mn_41)))))) + rnch_41 = (sinbe * ((mn_43 * mu_11) - ((mu_12 / sqrt (2.0_default)) * & + (mn_42 + ((sinthw / costhw) * mn_41))))) + lcn_21 = ((conjg (mn_12) * mv_21 * sqrt (2.0_default)) - ( & + conjg (mn_14) * mv_22)) + rcn_21 = ((mn_12 * conjg (mu_21) * sqrt (2.0_default)) + (mn_13 * & + conjg (mu_22))) + lnch_12 = (cosbe * ((conjg (mn_14) * conjg (mv_21)) + ((conjg (mv_22) / & + sqrt (2.0_default)) * (conjg (mn_12) + ((sinthw / costhw) * & + conjg (mn_11)))))) + end subroutine setup_parameters8 +subroutine setup_parameters9 () + rnch_12 = (sinbe * ((mn_13 * mu_21) - ((mu_22 / sqrt (2.0_default)) * & + (mn_12 + ((sinthw / costhw) * mn_11))))) + lcn_22 = ((conjg (mn_22) * mv_21 * sqrt (2.0_default)) - ( & + conjg (mn_24) * mv_22)) + rcn_22 = ((mn_22 * conjg (mu_21) * sqrt (2.0_default)) + (mn_23 * & + conjg (mu_22))) + lnch_22 = (cosbe * ((conjg (mn_24) * conjg (mv_21)) + ((conjg (mv_22) / & + sqrt (2.0_default)) * (conjg (mn_22) + ((sinthw / costhw) * & + conjg (mn_21)))))) + rnch_22 = (sinbe * ((mn_23 * mu_21) - ((mu_22 / sqrt (2.0_default)) * & + (mn_22 + ((sinthw / costhw) * mn_21))))) + lcn_23 = ((conjg (mn_32) * mv_21 * sqrt (2.0_default)) - ( & + conjg (mn_34) * mv_22)) + rcn_23 = ((mn_32 * conjg (mu_21) * sqrt (2.0_default)) + (mn_33 * & + conjg (mu_22))) + lnch_32 = (cosbe * ((conjg (mn_34) * conjg (mv_21)) + ((conjg (mv_22) / & + sqrt (2.0_default)) * (conjg (mn_32) + ((sinthw / costhw) * & + conjg (mn_31)))))) + rnch_32 = (sinbe * ((mn_33 * mu_21) - ((mu_22 / sqrt (2.0_default)) * & + (mn_32 + ((sinthw / costhw) * mn_31))))) + lcn_24 = ((conjg (mn_42) * mv_21 * sqrt (2.0_default)) - ( & + conjg (mn_44) * mv_22)) + rcn_24 = ((mn_42 * conjg (mu_21) * sqrt (2.0_default)) + (mn_43 * & + conjg (mu_22))) + lnch_42 = (cosbe * ((conjg (mn_44) * conjg (mv_21)) + ((conjg (mv_22) / & + sqrt (2.0_default)) * (conjg (mn_42) + ((sinthw / costhw) * & + conjg (mn_41)))))) + rnch_42 = (sinbe * ((mn_43 * mu_21) - ((mu_22 / sqrt (2.0_default)) * & + (mn_42 + ((sinthw / costhw) * mn_41))))) + lnc_11 = conjg (lcn_11) + rnc_11 = conjg (rcn_11) + lnc_12 = conjg (lcn_21) + rnc_12 = conjg (rcn_21) + lnc_21 = conjg (lcn_12) + rnc_21 = conjg (rcn_12) + lnc_22 = conjg (lcn_22) + rnc_22 = conjg (rcn_22) + lnc_31 = conjg (lcn_13) + rnc_31 = conjg (rcn_13) + lnc_32 = conjg (lcn_23) + rnc_32 = conjg (rcn_23) + lnc_41 = conjg (lcn_14) + rnc_41 = conjg (rcn_14) + lnc_42 = conjg (lcn_24) + rnc_42 = conjg (rcn_24) + gnzn_1_1 = (gz * axial0_11) + gnzn_2_2 = (gz * axial0_22) + gnzn_3_3 = (gz * axial0_33) + gnzn_4_4 = (gz * axial0_44) + !!! JR check 01.04.2005 + g_h1111susu = (gz * mass(23) * ((1.0_default / 2.0_default) - & + (sin2thw * q_up)) * sinapb) + g_h1122susu = (gz * mass(23) * q_up * sinapb * sin2thw) + g_h1111sdsd = (gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + (sin2thw * q_down)) * sinapb) + g_h1122sdsd = (gz * mass(23) * q_down * sinapb * sin2thw) + g_h2111susu = ( - (gz * mass(23) * ((1.0_default / 2.0_default) - & + (sin2thw * q_up)) * cosapb)) + g_h2122susu = ( - gz * mass(23) * q_up * cosapb * sin2thw) + g_h2111sdsd = ( - (gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + (sin2thw * q_down)) * cosapb)) + g_h2122sdsd = ( - gz * mass(23) * q_down * cosapb * sin2thw) + !!! g_h3112susu = - (imago * ((g * mass(2) * (( & + !!! conjg (au_1) * cosbe) + (mu * sinbe))) / & + !!! (2.0_default * mass(24) * sinbe))) + !!! g_h3121susu = conjg (g_h3112susu) + !!! g_h3112sdsd = - (imago * ((g * mass(1) * (( & + !!! conjg (ad_1) * tanb) + mu)) / (2.0_default * mass(24)))) + !!! g_h3121sdsd = conjg (g_h3112sdsd) + g_h1111snsn = (gz * mass(23) * (1.0_default / 2.0_default) * sinapb) + g_h1111slsl = (gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + (sin2thw * ( - 1.0_default))) * sinapb) + g_h1122slsl = (gz * mass(23) * ( - 1.0_default) * sinapb * sin2thw) + g_h2111snsn = ( - (gz * mass(23) * (1.0_default / 2.0_default)) * cosapb) + g_h2111slsl = ( - (gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + (sin2thw * ( - 1.0_default))) * cosapb)) + g_h2122slsl = ( - (gz * mass(23) * ( - 1.0_default) * cosapb * sin2thw)) + !!! g_h3112slsl = - (imago * ((g * mass(11) * (( & + !!! conjg (al_1) * tanb) + mu)) / (2.0_default * mass(24)))) + !!! g_h3121slsl = conjg (g_h3112slsl) + g_h4111slsn = ((- g / (sqrt (2.0_default) * mass(24))) * (mass(24)**2) * sin2be) + !!! g_h4112slsn = (sqrt (2.0_default) * ((g * mass(11) * ((conjg ( & + !!! al_1) * sinbe) + (mu * cosbe))) / & + !!! (2.0_default * mass(24) * cosbe))) + g_h1211susu = g_h1111susu + g_h1222susu = g_h1122susu + g_h1211sdsd = g_h1111sdsd + g_h1222sdsd = g_h1122sdsd + g_h2211susu = g_h2111susu + g_h2222susu = g_h2122susu + g_h2211sdsd = g_h2111sdsd + g_h2222sdsd = g_h2122sdsd + !!! g_h1211susu = (gz * mass(23) * ((1.0_default / 2.0_default) - & + !!! (sin2thw * q_up)) * sinapb) + !!! g_h1222susu = (gz * mass(23) * q_up * sinapb * sin2thw) + !!! g_h1211sdsd = (gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + !!! (sin2thw * q_down)) * sinapb) + !!! g_h1222sdsd = (gz * mass(23) * q_down * sinapb * sin2thw) + !!! g_h2211susu = ( - (gz * mass(23) * ((1.0_default / 2.0_default) - & + !!! (sin2thw * q_up)) * cosapb)) + !!! g_h2222susu = ( - gz * mass(23) * q_up * cosapb * sin2thw) +end subroutine setup_parameters9 + subroutine setup_parameters10 () + !!1 g_h2211sdsd = ( - (gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + !!1 (sin2thw * q_down)) * cosapb)) + !!1 g_h2222sdsd = ( - gz * mass(23) * q_down * cosapb * sin2thw) + !!! g_h3212susu = - (imago * ((g * mass(4) * (( & + !!! conjg (au_2) * cosbe) + (mu * sinbe))) / & + !!! (2.0_default * mass(24) * sinbe))) + !!! g_h3221susu = conjg (g_h3212susu) + !!! g_h3212sdsd = - (imago * ((g * mass(3) * (( & + !!! conjg (ad_2) * sinbe) + (mu * cosbe))) / & + !!! (2.0_default * mass(24) * cosbe))) + !!! g_h3221sdsd = conjg (g_h3212sdsd) + g_h1211snsn = g_h1111snsn + g_h1211slsl = g_h1111slsl + g_h1222slsl = g_h1122slsl + g_h2211snsn = g_h2111snsn + g_h2211slsl = g_h2111slsl + g_h2222slsl = g_h2122slsl + !!! g_h1211snsn = (gz * mass(23) * (1.0_default / 2.0_default)) + !!! g_h1211slsl = (gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + !!! (sin2thw * ( - 1.0_default))) * sinapb) + !!! g_h1222slsl = (gz * mass(23) * ( - 1.0_default) * sinapb * sin2thw) + !!! g_h2211snsn = ( - (gz * mass(23) * (1.0_default / 2.0_default))) + !!! g_h2211slsl = ( - (gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + !!! (sin2thw * ( - 1.0_default))) * cosapb)) + !!! g_h2222slsl = ( - (gz * mass(23) * ( - 1.0_default) * cosapb * sin2thw)) + !!! g_h3212slsl = - (imago * ((g * mass(13) * (( & + !!! conjg (al_2) * sinbe) + (mu * cosbe))) / & + !!! (2.0_default * mass(24) * cosbe))) + !!! g_h3221slsl = conjg (g_h3212slsl) + g_h4211slsn = ((- g / (sqrt (2.0_default) * mass(24))) * (mass(24)**2) * sin2be) + !!! g_h4212slsn = (sqrt (2.0_default) * ((g * mass(13) * ((conjg ( & + !!! al_2) * sinbe) + (mu * cosbe))) / & + !!! (2.0_default * mass(24) * cosbe))) + g_h1311susu = ((gz * mass(23) * ((1.0_default / 2.0_default) - & + (sin2thw * q_up)) * sinapb) - ((g * & + (mass(6)**2) * cosal) / (mass(24) * sinbe))) + g_h1322susu = ((gz * mass(23) * q_up * sinapb * sin2thw) - ((g * & + (mass(6)**2) * cosal) / (mass(24) * sinbe))) + g_h1312susu = - ((g * mass(6) * ((conjg (au_3) * cosal) + ( & + mu * sinal))) / (2.0_default * mass(24) * sinbe)) + g_h1321susu = conjg (g_h1312susu) + g_h1311sdsd = ((gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + (sin2thw * q_down)) * sinapb) + ((g * & + (mass(5)**2) * sinal) / (mass(24) * cosbe))) + g_h1322sdsd = ((gz * mass(23) * q_down * sinapb * sin2thw) + ((g * & + (mass(5)**2) * sinal) / (mass(24) * cosbe))) + g_h1312sdsd = ((g * mass(5) * ((conjg (ad_3) * sinal) + ( & + mu * cosal))) / (2.0_default * mass(24) * cosbe)) + g_h1321sdsd = conjg (g_h1312sdsd) + g_h2311susu = ( - ((gz * mass(23) * ((1.0_default / 2.0_default) - & + (sin2thw * q_up)) * cosapb) + ((g * & + (mass(6)**2) * sinal) / (mass(24) * sinbe)))) + g_h2322susu = ( - ((gz * mass(23) * q_up * cosapb * sin2thw) + ((g * & + (mass(6)**2) * sinal) / (mass(24) * sinbe)))) + g_h2312susu = ((g * mass(6) * ((conjg (- au_3) * sinal) + ( & + mu * cosal))) / (2.0_default * mass(24) * sinbe)) + g_h2321susu = conjg (g_h2312susu) + g_h2311sdsd = ( - ((gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + (sin2thw * q_down)) * cosapb) + ((g * & + (mass(5)**2) * cosal) / (mass(24) * cosbe)))) + g_h2322sdsd = ( - ((gz * mass(23) * q_down * cosapb * sin2thw) + ((g * & + (mass(5)**2) * cosal) / (mass(24) * cosbe)))) + g_h2312sdsd = ((g * mass(5) * ((conjg (- ad_3) * cosal) + ( & + mu * sinal))) / (2.0_default * mass(24) * cosbe)) + g_h2321sdsd = conjg (g_h2312sdsd) + g_h3312susu = - (imago * ((g * mass(6) * (( & + conjg (au_3) * cosbe) + (mu * sinbe))) / & + (2.0_default * mass(24) * sinbe))) + g_h3321susu = conjg (g_h3312susu) + g_h3312sdsd = - (imago * ((g * mass(5) * (( & + conjg (ad_3) * sinbe) + (mu * cosbe))) / & + (2.0_default * mass(24) * cosbe))) + g_h3321sdsd = conjg (g_h3312sdsd) + g_h1311snsn = (gz * mass(23) * (1.0_default / 2.0_default) * sinapb) + g_h1311slsl = ((gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + (sin2thw * ( - 1.0_default))) * sinapb) + ((g * & + (mass(15)**2) * sinal) / (mass(24) * cosbe))) + g_h1322slsl = ((gz * mass(23) * ( - 1.0_default) * sinapb * sin2thw) + ( & + (g * (mass(15)**2) * sinal) / (mass(24) * cosbe))) + g_h1312slsl = ((g * mass(15) * ((conjg (al_3) * sinal) + ( & + mu * cosal))) / (2.0_default * mass(24) * cosbe)) + g_h1321slsl = conjg (g_h1312slsl) + g_h2311snsn = ( - (gz * mass(23) * (1.0_default / 2.0_default) * cosapb)) + g_h2311slsl = ( - ((gz * mass(23) * (( - (1.0_default / 2.0_default)) - & + (sin2thw * ( - 1.0_default))) * cosapb) + ((g * & + (mass(15)**2) * cosal) / (mass(24) * cosbe)))) + g_h2322slsl = ( - ((gz * mass(23) * ( - 1.0_default) * cosapb * sin2thw) + ( & + (g * (mass(15)**2) * cosal) / (mass(24) * cosbe)))) + g_h2312slsl = ((g * mass(15) * ((conjg (- al_3) * cosal) + ( & + mu * sinal))) / (2.0_default * mass(24) * cosbe)) + g_h2321slsl = conjg (g_h2312slsl) + g_h3312slsl = - (imago * ((g * mass(15) * (( & + conjg (al_3) * sinbe) + (mu * cosbe))) / & + (2.0_default * mass(24) * cosbe))) + g_h3321slsl = conjg (g_h3312slsl) + g_h4311slsn = ((g / (sqrt (2.0_default) * mass(24))) * (( & + (mass(15)**2) * tanb) - ((mass(24)**2) * sin2be))) + g_h4312slsn = (sqrt (2.0_default) * ((g * mass(15) * ((conjg ( & + al_3) * sinbe) + (mu * cosbe))) / & + (2.0_default * mass(24) * cosbe))) + g_h41_111susd = ((g / (sqrt (2.0_default) * mass(24))) * vckm_11 * ( - ( & + (mass(24)**2) * sin2be))) + g_h41_211susd = ((g / (sqrt (2.0_default) * mass(24))) * vckm_12 * ( - ( & + (mass(24)**2) * sin2be))) + g_h41_311susd = ((g / (sqrt (2.0_default) * mass(24))) * vckm_13 * (( - ( & + (mass(24)**2) * sin2be)) + (((mass(5)**2) * tanb) + ((mass(2)**2) / tanb)))) + g_h41_322susd = ((sqrt (2.0_default) * g * mass(2) * mass(5) * vckm_13) / & + (mass(24) * sin2be)) + g_h41_312susd = (((g * mass(5)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_13 * (mu + ( & + conjg (ad_3) * tanb))) + g_h41_321susd = (((g * mass(2)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_13 * (conjg (mu) + & + (au_1 / tanb))) + g_h42_111susd = ((g / (sqrt (2.0_default) * mass(24))) * vckm_21 * ( - ( & + (mass(24)**2) * sin2be))) + g_h42_211susd = ((g / (sqrt (2.0_default) * mass(24))) * vckm_22 * ( - ( & + (mass(24)**2) * sin2be))) + g_h42_311susd = ((g / (sqrt (2.0_default) * mass(24))) * vckm_23 * (( - ( & + (mass(24)**2) * sin2be)) + (((mass(5)**2) * tanb) + ((mass(4)**2) / tanb)))) + g_h42_322susd = ((sqrt (2.0_default) * g * mass(4) * mass(5) * vckm_23) / & + (mass(24) * sin2be)) + g_h42_312susd = (((g * mass(5)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_23 * (mu + ( & + conjg (ad_3) * tanb))) + g_h42_321susd = (((g * mass(4)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_23 * (conjg (mu) + & + (au_2 / tanb))) + g_h43_111susd = ((g / (sqrt (2.0_default) * mass(24))) * vckm_31 * (( - ( & + (mass(24)**2) * sin2be)) + (((mass(1)**2) * tanb) + ((mass(6)**2) / tanb)))) + g_h43_122susd = ((sqrt (2.0_default) * g * mass(6) * mass(1) * vckm_31) / & + (mass(24) * sin2be)) + g_h43_112susd = (((g * mass(1)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_31 * (mu + ( & + conjg (ad_1) * tanb))) + g_h43_121susd = (((g * mass(6)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_31 * (conjg (mu) + & + (au_3 / tanb))) + g_h43_211susd = ((g / (sqrt (2.0_default) * mass(24))) * vckm_32 * (( - ( & + (mass(24)**2) * sin2be)) + (((mass(3)**2) * tanb) + ((mass(6)**2) / tanb)))) + g_h43_222susd = ((sqrt (2.0_default) * g * mass(6) * mass(3) * vckm_32) / & + (mass(24) * sin2be)) + g_h43_212susd = (((g * mass(3)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_32 * (mu + ( & + conjg (ad_2) * tanb))) + g_h43_221susd = (((g * mass(6)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_32 * (conjg (mu) + & + (au_3 / tanb))) + g_h43_311susd = ((g / (sqrt (2.0_default) * mass(24))) * vckm_33 * (( - ( & + (mass(24)**2) * sin2be)) + (((mass(5)**2) * tanb) + ((mass(6)**2) / tanb)))) + g_h43_322susd = ((sqrt (2.0_default) * g * mass(6) * mass(5) * vckm_33) / & + (mass(24) * sin2be)) + g_h43_312susd = (((g * mass(5)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_33 * (mu + ( & + conjg (ad_3) * tanb))) + g_h43_321susd = (((g * mass(6)) / ( & + sqrt (2.0_default) * mass(24))) * vckm_33 * (conjg (mu) + & + (au_3 / tanb))) + end subroutine setup_parameters10 + subroutine setup_parameters11 () + gh1sl1sl1_1 = g_h1111slsl + gh1su1su1_1 = g_h1111susu + gh1sd1sd1_1 = g_h1111sdsd + gh2sl1sl1_1 = g_h2111slsl + gh2su1su1_1 = g_h2111susu + gh2sd1sd1_1 = g_h2111sdsd + !!! gasl1sl1_1 = ((conjg (mix_sl111) * mix_sl112 * g_h3112slsl) + ( & + !!! conjg (mix_sl112) * mix_sl111 * g_h3121slsl)) + !!! gasu1su1_1 = ((conjg (mix_su111) * mix_su112 * g_h3112susu) + ( & + !!! conjg (mix_su112) * mix_su111 * g_h3121susu)) + !!! gasd1sd1_1 = ((conjg (mix_sd111) * mix_sd112 * g_h3112sdsd) + ( & + !!! conjg (mix_sd112) * mix_sd111 * g_h3121sdsd)) + !!! gasl1sl2_1 = ((conjg (mix_sl111) * mix_sl122 * g_h3112slsl) + ( & + !!! conjg (mix_sl112) * mix_sl121 * g_h3121slsl)) + !!! gasu1su2_1 = ((conjg (mix_su111) * mix_su122 * g_h3112susu) + ( & + !!! conjg (mix_su112) * mix_su121 * g_h3121susu)) + !!! gasd1sd2_1 = ((conjg (mix_sd111) * mix_sd122 * g_h3112sdsd) + ( & + !!! conjg (mix_sd112) * mix_sd121 * g_h3121sdsd)) + !!! gasl2sl1_1 = ((conjg (mix_sl121) * mix_sl112 * g_h3112slsl) + ( & + !!! conjg (mix_sl122) * mix_sl111 * g_h3121slsl)) + !!! gasu2su1_1 = ((conjg (mix_su121) * mix_su112 * g_h3112susu) + ( & + !!! conjg (mix_su122) * mix_su111 * g_h3121susu)) + !!! gasd2sd1_1 = ((conjg (mix_sd121) * mix_sd112 * g_h3112sdsd) + ( & + !!! conjg (mix_sd122) * mix_sd111 * g_h3121sdsd)) + gh1sl2sl2_1 = g_h1122slsl + gh1su2su2_1 = g_h1122susu + gh1sd2sd2_1 = g_h1122sdsd + gh2sl2sl2_1 = g_h2122slsl + gh2su2su2_1 = g_h2122susu + gh2sd2sd2_1 = g_h2122sdsd + !!! gasl2sl2_1 = ((conjg (mix_sl121) * mix_sl122 * g_h3112slsl) + ( & + !!! conjg (mix_sl122) * mix_sl121 * g_h3121slsl)) + !!! gasu2su2_1 = ((conjg (mix_su121) * mix_su122 * g_h3112susu) + ( & + !!! conjg (mix_su122) * mix_su121 * g_h3121susu)) + !!! gasd2sd2_1 = ((conjg (mix_sd121) * mix_sd122 * g_h3112sdsd) + ( & + !!! conjg (mix_sd122) * mix_sd121 * g_h3121sdsd)) + !!! ghsnsl1_1 = g_h4111slsn + !!! ghsnsl1_1 = ((conjg (mix_sl111) * g_h4111slsn) + ( & + !!! conjg (mix_sl112) * g_h4112slsn)) + !!! ghsnsl1_1_c = conjg (ghsnsl1_1) + ghsnsl1_1 = g_h4111slsn + !!! ghsnsl2_1 = ((conjg (mix_sl121) * g_h4111slsn) + ( & + !!! conjg (mix_sl122) * g_h4112slsn)) + ghsnsl1_1_c = conjg (ghsnsl1_1) + gh1sn1sn1_1 = g_h1111snsn + gh2sn1sn1_1 = g_h2111snsn + gh1sl1sl1_2 = g_h1211slsl + gh1su1su1_2 = g_h1211susu + gh1sd1sd1_2 = g_h1211sdsd + gh2sl1sl1_2 = g_h2211slsl + gh2su1su1_2 = g_h2211susu + gh2sd1sd1_2 = g_h2211sdsd + !!! gasl1sl1_2 = ((conjg (mix_sl211) * mix_sl212 * g_h3212slsl) + ( & + !!! conjg (mix_sl212) * mix_sl211 * g_h3221slsl)) + !!! gasu1su1_2 = ((conjg (mix_su211) * mix_su212 * g_h3212susu) + ( & + !!! conjg (mix_su212) * mix_su211 * g_h3221susu)) + !!! gasd1sd1_2 = ((conjg (mix_sd211) * mix_sd212 * g_h3212sdsd) + ( & + !!! conjg (mix_sd212) * mix_sd211 * g_h3221sdsd)) + !!! gasl1sl2_2 = ((conjg (mix_sl211) * mix_sl222 * g_h3212slsl) + ( & + !!! conjg (mix_sl212) * mix_sl221 * g_h3221slsl)) + !!! gasu1su2_2 = ((conjg (mix_su211) * mix_su222 * g_h3212susu) + ( & + !!! conjg (mix_su212) * mix_su221 * g_h3221susu)) + !!! gasd1sd2_2 = ((conjg (mix_sd211) * mix_sd222 * g_h3212sdsd) + ( & + !!! conjg (mix_sd212) * mix_sd221 * g_h3221sdsd)) + !!! gasl2sl1_2 = ((conjg (mix_sl221) * mix_sl212 * g_h3212slsl) + ( & + !!! conjg (mix_sl222) * mix_sl211 * g_h3221slsl)) + !!! gasu2su1_2 = ((conjg (mix_su221) * mix_su212 * g_h3212susu) + ( & + !!! conjg (mix_su222) * mix_su211 * g_h3221susu)) + !!! gasd2sd1_2 = ((conjg (mix_sd221) * mix_sd212 * g_h3212sdsd) + ( & + !!! conjg (mix_sd222) * mix_sd211 * g_h3221sdsd)) + gh1sl2sl2_2 = g_h1222slsl + gh1su2su2_2 = g_h1222susu + gh1sd2sd2_2 = g_h1222sdsd + gh2sl2sl2_2 = g_h2222slsl + gh2su2su2_2 = g_h2222susu + gh2sd2sd2_2 = g_h2222sdsd + !!! gasl2sl2_2 = ((conjg (mix_sl221) * mix_sl222 * g_h3212slsl) + ( & + !!! conjg (mix_sl222) * mix_sl221 * g_h3221slsl)) + !!! gasu2su2_2 = ((conjg (mix_su221) * mix_su222 * g_h3212susu) + ( & + !!! conjg (mix_su222) * mix_su221 * g_h3221susu)) + !!! gasd2sd2_2 = ((conjg (mix_sd221) * mix_sd222 * g_h3212sdsd) + ( & + !!! conjg (mix_sd222) * mix_sd221 * g_h3221sdsd)) + ghsnsl1_2 = g_h4211slsn + !!! ghsnsl1_2 = ((conjg (mix_sl211) * g_h4211slsn) + ( & + !!! conjg (mix_sl212) * g_h4212slsn)) + ghsnsl1_2_c = conjg (ghsnsl1_2) + !!! ghsnsl2_2 = g_h4211slsn + !!! ghsnsl2_2 = ((conjg (mix_sl221) * g_h4211slsn) + ( & + !!! conjg (mix_sl222) * g_h4212slsn)) + !!! ghsnsl2_2_c = conjg (ghsnsl2_2) + gh1sn1sn1_2 = g_h1211snsn + gh2sn1sn1_2 = g_h2211snsn + gh1sl1sl1_3 = ((conjg (mix_sl311) * mix_sl311 * g_h1311slsl) + ( & + conjg (mix_sl312) * mix_sl312 * g_h1322slsl) + ( & + conjg (mix_sl311) * mix_sl312 * g_h1312slsl) + ( & + conjg (mix_sl312) * mix_sl311 * g_h1321slsl)) + gh1su1su1_3 = ((conjg (mix_su311) * mix_su311 * g_h1311susu) + ( & + conjg (mix_su312) * mix_su312 * g_h1322susu) + ( & + conjg (mix_su311) * mix_su312 * g_h1312susu) + ( & + conjg (mix_su312) * mix_su311 * g_h1321susu)) + gh1sd1sd1_3 = ((conjg (mix_sd311) * mix_sd311 * g_h1311sdsd) + ( & + conjg (mix_sd312) * mix_sd312 * g_h1322sdsd) + ( & + conjg (mix_sd311) * mix_sd312 * g_h1312sdsd) + ( & + conjg (mix_sd312) * mix_sd311 * g_h1321sdsd)) + gh2sl1sl1_3 = ((conjg (mix_sl311) * mix_sl311 * g_h2311slsl) + ( & + conjg (mix_sl312) * mix_sl312 * g_h2322slsl) + ( & + conjg (mix_sl311) * mix_sl312 * g_h2312slsl) + ( & + conjg (mix_sl312) * mix_sl311 * g_h2321slsl)) + gh2su1su1_3 = ((conjg (mix_su311) * mix_su311 * g_h2311susu) + ( & + conjg (mix_su312) * mix_su312 * g_h2322susu) + ( & + conjg (mix_su311) * mix_su312 * g_h2312susu) + ( & + conjg (mix_su312) * mix_su311 * g_h2321susu)) + gh2sd1sd1_3 = ((conjg (mix_sd311) * mix_sd311 * g_h2311sdsd) + ( & + conjg (mix_sd312) * mix_sd312 * g_h2322sdsd) + ( & + conjg (mix_sd311) * mix_sd312 * g_h2312sdsd) + ( & + conjg (mix_sd312) * mix_sd311 * g_h2321sdsd)) + gasl1sl1_3 = ((conjg (mix_sl311) * mix_sl312 * g_h3312slsl) + ( & + conjg (mix_sl312) * mix_sl311 * g_h3321slsl)) + gasu1su1_3 = ((conjg (mix_su311) * mix_su312 * g_h3312susu) + ( & + conjg (mix_su312) * mix_su311 * g_h3321susu)) + gasd1sd1_3 = ((conjg (mix_sd311) * mix_sd312 * g_h3312sdsd) + ( & + conjg (mix_sd312) * mix_sd311 * g_h3321sdsd)) + gh1sl1sl2_3 = ((conjg (mix_sl311) * mix_sl321 * g_h1311slsl) + ( & + conjg (mix_sl312) * mix_sl322 * g_h1322slsl) + ( & + conjg (mix_sl311) * mix_sl322 * g_h1312slsl) + ( & + conjg (mix_sl312) * mix_sl321 * g_h1321slsl)) + gh1su1su2_3 = ((conjg (mix_su311) * mix_su321 * g_h1311susu) + ( & + conjg (mix_su312) * mix_su322 * g_h1322susu) + ( & + conjg (mix_su311) * mix_su322 * g_h1312susu) + ( & + conjg (mix_su312) * mix_su321 * g_h1321susu)) + gh1sd1sd2_3 = ((conjg (mix_sd311) * mix_sd321 * g_h1311sdsd) + ( & + conjg (mix_sd312) * mix_sd322 * g_h1322sdsd) + ( & + conjg (mix_sd311) * mix_sd322 * g_h1312sdsd) + ( & + conjg (mix_sd312) * mix_sd321 * g_h1321sdsd)) + gh2sl1sl2_3 = ((conjg (mix_sl311) * mix_sl321 * g_h2311slsl) + ( & + conjg (mix_sl312) * mix_sl322 * g_h2322slsl) + ( & + conjg (mix_sl311) * mix_sl322 * g_h2312slsl) + ( & + conjg (mix_sl312) * mix_sl321 * g_h2321slsl)) + gh2su1su2_3 = ((conjg (mix_su311) * mix_su321 * g_h2311susu) + ( & + conjg (mix_su312) * mix_su322 * g_h2322susu) + ( & + conjg (mix_su311) * mix_su322 * g_h2312susu) + ( & + conjg (mix_su312) * mix_su321 * g_h2321susu)) + gh2sd1sd2_3 = ((conjg (mix_sd311) * mix_sd321 * g_h2311sdsd) + ( & + conjg (mix_sd312) * mix_sd322 * g_h2322sdsd) + ( & + conjg (mix_sd311) * mix_sd322 * g_h2312sdsd) + ( & + conjg (mix_sd312) * mix_sd321 * g_h2321sdsd)) + gasl1sl2_3 = ((conjg (mix_sl311) * mix_sl322 * g_h3312slsl) + ( & + conjg (mix_sl312) * mix_sl321 * g_h3321slsl)) + gasu1su2_3 = ((conjg (mix_su311) * mix_su322 * g_h3312susu) + ( & + conjg (mix_su312) * mix_su321 * g_h3321susu)) + gasd1sd2_3 = ((conjg (mix_sd311) * mix_sd322 * g_h3312sdsd) + ( & + conjg (mix_sd312) * mix_sd321 * g_h3321sdsd)) + gh1sl2sl1_3 = ((conjg (mix_sl321) * mix_sl311 * g_h1311slsl) + ( & + conjg (mix_sl322) * mix_sl312 * g_h1322slsl) + ( & + conjg (mix_sl321) * mix_sl312 * g_h1312slsl) + ( & + conjg (mix_sl322) * mix_sl311 * g_h1321slsl)) + gh1su2su1_3 = ((conjg (mix_su321) * mix_su311 * g_h1311susu) + ( & + conjg (mix_su322) * mix_su312 * g_h1322susu) + ( & + conjg (mix_su321) * mix_su312 * g_h1312susu) + ( & + conjg (mix_su322) * mix_su311 * g_h1321susu)) + gh1sd2sd1_3 = ((conjg (mix_sd321) * mix_sd311 * g_h1311sdsd) + ( & + conjg (mix_sd322) * mix_sd312 * g_h1322sdsd) + ( & + conjg (mix_sd321) * mix_sd312 * g_h1312sdsd) + ( & + conjg (mix_sd322) * mix_sd311 * g_h1321sdsd)) + gh2sl2sl1_3 = ((conjg (mix_sl321) * mix_sl311 * g_h2311slsl) + ( & + conjg (mix_sl322) * mix_sl312 * g_h2322slsl) + ( & + conjg (mix_sl321) * mix_sl312 * g_h2312slsl) + ( & + conjg (mix_sl322) * mix_sl311 * g_h2321slsl)) + gh2su2su1_3 = ((conjg (mix_su321) * mix_su311 * g_h2311susu) + ( & + conjg (mix_su322) * mix_su312 * g_h2322susu) + ( & + conjg (mix_su321) * mix_su312 * g_h2312susu) + ( & + conjg (mix_su322) * mix_su311 * g_h2321susu)) + gh2sd2sd1_3 = ((conjg (mix_sd321) * mix_sd311 * g_h2311sdsd) + ( & + conjg (mix_sd322) * mix_sd312 * g_h2322sdsd) + ( & + conjg (mix_sd321) * mix_sd312 * g_h2312sdsd) + ( & + conjg (mix_sd322) * mix_sd311 * g_h2321sdsd)) + gasl2sl1_3 = ((conjg (mix_sl321) * mix_sl312 * g_h3312slsl) + ( & + conjg (mix_sl322) * mix_sl311 * g_h3321slsl)) + end subroutine setup_parameters11 +subroutine setup_parameters12 () + gasu2su1_3 = ((conjg (mix_su321) * mix_su312 * g_h3312susu) + ( & + conjg (mix_su322) * mix_su311 * g_h3321susu)) + gasd2sd1_3 = ((conjg (mix_sd321) * mix_sd312 * g_h3312sdsd) + ( & + conjg (mix_sd322) * mix_sd311 * g_h3321sdsd)) + gh1sl2sl2_3 = ((conjg (mix_sl321) * mix_sl321 * g_h1311slsl) + ( & + conjg (mix_sl322) * mix_sl322 * g_h1322slsl) + ( & + conjg (mix_sl321) * mix_sl322 * g_h1312slsl) + ( & + conjg (mix_sl322) * mix_sl321 * g_h1321slsl)) + gh1su2su2_3 = ((conjg (mix_su321) * mix_su321 * g_h1311susu) + ( & + conjg (mix_su322) * mix_su322 * g_h1322susu) + ( & + conjg (mix_su321) * mix_su322 * g_h1312susu) + ( & + conjg (mix_su322) * mix_su321 * g_h1321susu)) + gh1sd2sd2_3 = ((conjg (mix_sd321) * mix_sd321 * g_h1311sdsd) + ( & + conjg (mix_sd322) * mix_sd322 * g_h1322sdsd) + ( & + conjg (mix_sd321) * mix_sd322 * g_h1312sdsd) + ( & + conjg (mix_sd322) * mix_sd321 * g_h1321sdsd)) + gh2sl2sl2_3 = ((conjg (mix_sl321) * mix_sl321 * g_h2311slsl) + ( & + conjg (mix_sl322) * mix_sl322 * g_h2322slsl) + ( & + conjg (mix_sl321) * mix_sl322 * g_h2312slsl) + ( & + conjg (mix_sl322) * mix_sl321 * g_h2321slsl)) + gh2su2su2_3 = ((conjg (mix_su321) * mix_su321 * g_h2311susu) + ( & + conjg (mix_su322) * mix_su322 * g_h2322susu) + ( & + conjg (mix_su321) * mix_su322 * g_h2312susu) + ( & + conjg (mix_su322) * mix_su321 * g_h2321susu)) + gh2sd2sd2_3 = ((conjg (mix_sd321) * mix_sd321 * g_h2311sdsd) + ( & + conjg (mix_sd322) * mix_sd322 * g_h2322sdsd) + ( & + conjg (mix_sd321) * mix_sd322 * g_h2312sdsd) + ( & + conjg (mix_sd322) * mix_sd321 * g_h2321sdsd)) + gasl2sl2_3 = ((conjg (mix_sl321) * mix_sl322 * g_h3312slsl) + ( & + conjg (mix_sl322) * mix_sl321 * g_h3321slsl)) + gasu2su2_3 = ((conjg (mix_su321) * mix_su322 * g_h3312susu) + ( & + conjg (mix_su322) * mix_su321 * g_h3321susu)) + gasd2sd2_3 = ((conjg (mix_sd321) * mix_sd322 * g_h3312sdsd) + ( & + conjg (mix_sd322) * mix_sd321 * g_h3321sdsd)) + ghsnsl1_3 = ((conjg (mix_sl311) * g_h4311slsn) + ( & + conjg (mix_sl312) * g_h4312slsn)) + ghsnsl1_3_c = conjg (ghsnsl1_3) + ghsnsl2_3 = ((conjg (mix_sl321) * g_h4311slsn) + ( & + conjg (mix_sl322) * g_h4312slsn)) + ghsnsl2_3_c = conjg (ghsnsl2_3) + gh1sn1sn1_3 = g_h1311snsn + gh2sn1sn1_3 = g_h2311snsn + ghsu1sd1_1_1 = g_h41_111susd + ghsu1sd1_1_1_c = conjg (ghsu1sd1_1_1) + ghsu1sd1_1_2 = g_h41_211susd + ghsu1sd1_1_2_c = conjg (ghsu1sd1_1_2) + ghsu1sd1_1_3 = ((conjg (mix_su111) * mix_sd311 * g_h41_311susd) + ( & + conjg (mix_su112) * mix_sd312 * g_h41_322susd) + ( & + conjg (mix_su111) * mix_sd312 * g_h41_312susd) + ( & + conjg (mix_su112) * mix_sd311 * g_h41_321susd)) + ghsu1sd1_1_3_c = conjg (ghsu1sd1_1_3) + ghsu1sd2_1_3 = ((conjg (mix_su111) * mix_sd321 * g_h41_311susd) + ( & + conjg (mix_su112) * mix_sd322 * g_h41_322susd) + ( & + conjg (mix_su111) * mix_sd322 * g_h41_312susd) + ( & + conjg (mix_su112) * mix_sd321 * g_h41_321susd)) + ghsu1sd2_1_3_c = conjg (ghsu1sd2_1_3) + ghsu2sd1_1_3 = ((conjg (mix_su121) * mix_sd311 * g_h41_311susd) + ( & + conjg (mix_su122) * mix_sd312 * g_h41_322susd) + ( & + conjg (mix_su121) * mix_sd312 * g_h41_312susd) + ( & + conjg (mix_su122) * mix_sd311 * g_h41_321susd)) + ghsu2sd1_1_3_c = conjg (ghsu2sd1_1_3) + ghsu2sd2_1_3 = ((conjg (mix_su121) * mix_sd321 * g_h41_311susd) + ( & + conjg (mix_su122) * mix_sd322 * g_h41_322susd) + ( & + conjg (mix_su121) * mix_sd322 * g_h41_312susd) + ( & + conjg (mix_su122) * mix_sd321 * g_h41_321susd)) + ghsu2sd2_1_3_c = conjg (ghsu2sd2_1_3) + ghsu1sd1_2_1 = g_h42_111susd + ghsu1sd1_2_1_c = conjg (ghsu1sd1_2_1) + ghsu1sd1_2_2 = g_h42_211susd + ghsu1sd1_2_2_c = conjg (ghsu1sd1_2_2) + ghsu1sd1_2_3 = ((conjg (mix_su211) * mix_sd311 * g_h42_311susd) + ( & + conjg (mix_su212) * mix_sd312 * g_h42_322susd) + ( & + conjg (mix_su211) * mix_sd312 * g_h42_312susd) + ( & + conjg (mix_su212) * mix_sd311 * g_h42_321susd)) + ghsu1sd1_2_3_c = conjg (ghsu1sd1_2_3) + ghsu1sd2_2_3 = ((conjg (mix_su211) * mix_sd321 * g_h42_311susd) + ( & + conjg (mix_su212) * mix_sd322 * g_h42_322susd) + ( & + conjg (mix_su211) * mix_sd322 * g_h42_312susd) + ( & + conjg (mix_su212) * mix_sd321 * g_h42_321susd)) + ghsu1sd2_2_3_c = conjg (ghsu1sd2_2_3) + ghsu2sd1_2_3 = ((conjg (mix_su221) * mix_sd311 * g_h42_311susd) + ( & + conjg (mix_su222) * mix_sd312 * g_h42_322susd) + ( & + conjg (mix_su221) * mix_sd312 * g_h42_312susd) + ( & + conjg (mix_su222) * mix_sd311 * g_h42_321susd)) + ghsu2sd1_2_3_c = conjg (ghsu2sd1_2_3) + ghsu2sd2_2_3 = ((conjg (mix_su221) * mix_sd321 * g_h42_311susd) + ( & + conjg (mix_su222) * mix_sd322 * g_h42_322susd) + ( & + conjg (mix_su221) * mix_sd322 * g_h42_312susd) + ( & + conjg (mix_su222) * mix_sd321 * g_h42_321susd)) + ghsu2sd2_2_3_c = conjg (ghsu2sd2_2_3) + ghsu1sd1_3_1 = ((conjg (mix_su311) * mix_sd111 * g_h43_111susd) + ( & + conjg (mix_su312) * mix_sd112 * g_h43_122susd) + ( & + conjg (mix_su311) * mix_sd112 * g_h43_112susd) + ( & + conjg (mix_su312) * mix_sd111 * g_h43_121susd)) + ghsu1sd1_3_1_c = conjg (ghsu1sd1_3_1) + ghsu1sd2_3_1 = ((conjg (mix_su311) * mix_sd121 * g_h43_111susd) + ( & + conjg (mix_su312) * mix_sd122 * g_h43_122susd) + ( & + conjg (mix_su311) * mix_sd122 * g_h43_112susd) + ( & + conjg (mix_su312) * mix_sd121 * g_h43_121susd)) + ghsu1sd2_3_1_c = conjg (ghsu1sd2_3_1) + ghsu2sd1_3_1 = ((conjg (mix_su321) * mix_sd111 * g_h43_111susd) + ( & + conjg (mix_su322) * mix_sd112 * g_h43_122susd) + ( & + conjg (mix_su321) * mix_sd112 * g_h43_112susd) + ( & + conjg (mix_su322) * mix_sd111 * g_h43_121susd)) + ghsu2sd1_3_1_c = conjg (ghsu2sd1_3_1) + ghsu2sd2_3_1 = ((conjg (mix_su321) * mix_sd121 * g_h43_111susd) + ( & + conjg (mix_su322) * mix_sd122 * g_h43_122susd) + ( & + conjg (mix_su321) * mix_sd122 * g_h43_112susd) + ( & + conjg (mix_su322) * mix_sd121 * g_h43_121susd)) + ghsu2sd2_3_1_c = conjg (ghsu2sd2_3_1) + ghsu1sd1_3_2 = ((conjg (mix_su311) * mix_sd211 * g_h43_211susd) + ( & + conjg (mix_su312) * mix_sd212 * g_h43_222susd) + ( & + conjg (mix_su311) * mix_sd212 * g_h43_212susd) + ( & + conjg (mix_su312) * mix_sd211 * g_h43_221susd)) + ghsu1sd1_3_2_c = conjg (ghsu1sd1_3_2) + ghsu1sd2_3_2 = ((conjg (mix_su311) * mix_sd221 * g_h43_211susd) + ( & + conjg (mix_su312) * mix_sd222 * g_h43_222susd) + ( & + conjg (mix_su311) * mix_sd222 * g_h43_212susd) + ( & + conjg (mix_su312) * mix_sd221 * g_h43_221susd)) + ghsu1sd2_3_2_c = conjg (ghsu1sd2_3_2) + ghsu2sd1_3_2 = ((conjg (mix_su321) * mix_sd211 * g_h43_211susd) + ( & + conjg (mix_su322) * mix_sd212 * g_h43_222susd) + ( & + conjg (mix_su321) * mix_sd212 * g_h43_212susd) + ( & + conjg (mix_su322) * mix_sd211 * g_h43_221susd)) + ghsu2sd1_3_2_c = conjg (ghsu2sd1_3_2) + ghsu2sd2_3_2 = ((conjg (mix_su321) * mix_sd221 * g_h43_211susd) + ( & + conjg (mix_su322) * mix_sd222 * g_h43_222susd) + ( & + conjg (mix_su321) * mix_sd222 * g_h43_212susd) + ( & + conjg (mix_su322) * mix_sd221 * g_h43_221susd)) + ghsu2sd2_3_2_c = conjg (ghsu2sd2_3_2) + ghsu1sd1_3_3 = ((conjg (mix_su311) * mix_sd311 * g_h43_311susd) + ( & + conjg (mix_su312) * mix_sd312 * g_h43_322susd) + ( & + conjg (mix_su311) * mix_sd312 * g_h43_312susd) + ( & + conjg (mix_su312) * mix_sd311 * g_h43_321susd)) + ghsu1sd1_3_3_c = conjg (ghsu1sd1_3_3) + ghsu1sd2_3_3 = ((conjg (mix_su311) * mix_sd321 * g_h43_311susd) + ( & + conjg (mix_su312) * mix_sd322 * g_h43_322susd) + ( & + conjg (mix_su311) * mix_sd322 * g_h43_312susd) + ( & + conjg (mix_su312) * mix_sd321 * g_h43_321susd)) + ghsu1sd2_3_3_c = conjg (ghsu1sd2_3_3) + ghsu2sd1_3_3 = ((conjg (mix_su321) * mix_sd311 * g_h43_311susd) + ( & + conjg (mix_su322) * mix_sd312 * g_h43_322susd) + ( & + conjg (mix_su321) * mix_sd312 * g_h43_312susd) + ( & + conjg (mix_su322) * mix_sd311 * g_h43_321susd)) + ghsu2sd1_3_3_c = conjg (ghsu2sd1_3_3) + ghsu2sd2_3_3 = ((conjg (mix_su321) * mix_sd321 * g_h43_311susd) + ( & + conjg (mix_su322) * mix_sd322 * g_h43_322susd) + ( & + conjg (mix_su321) * mix_sd322 * g_h43_312susd) + ( & + conjg (mix_su322) * mix_sd321 * g_h43_321susd)) + ghsu2sd2_3_3_c = conjg (ghsu2sd2_3_3) + g_yuk_ch1_sl1_1_c = ((( - g) / 2.0_default) * mu_11) + g_yuk_ch1_sl1_1 = conjg (g_yuk_ch1_sl1_1_c) + g_yuk_ch1_sl1_2_c = ((( - g) / 2.0_default) * mu_11) + g_yuk_ch1_sl1_2 = conjg (g_yuk_ch1_sl1_2_c) + g_yuk_ch1_sl1_3_c = ((((( - g) / 2.0_default) * mu_11) * & + conjg (mix_sl311)) + (((gcc * mass(15) * mu_12) / (mass(24) * cosbe)) * & + conjg (mix_sl312))) + g_yuk_ch1_sl1_3 = conjg (g_yuk_ch1_sl1_3_c) + g_yuk_ch1_sl2_3_c = ((((( - g) / 2.0_default) * mu_11) * & + conjg (mix_sl321)) + (((gcc * mass(15) * mu_12) / (mass(24) * cosbe)) * & + conjg (mix_sl322))) + g_yuk_ch1_sl2_3 = conjg (g_yuk_ch1_sl2_3_c) + g_yuk_ch1_sn1_1_c = ( - ((g / 2.0_default) * mv_11)) + g_yuk_ch1_sn1_1 = conjg (g_yuk_ch1_sn1_1_c) + g_yuk_ch1_sn1_2_c = ( - ((g / 2.0_default) * mv_11)) + g_yuk_ch1_sn1_2 = conjg (g_yuk_ch1_sn1_2_c) + g_yuk_ch2_sl1_1_c = ((( - g) / 2.0_default) * mu_21) + g_yuk_ch2_sl1_1 = conjg (g_yuk_ch2_sl1_1_c) + g_yuk_ch2_sl1_2_c = ((( - g) / 2.0_default) * mu_21) + g_yuk_ch2_sl1_2 = conjg (g_yuk_ch2_sl1_2_c) + g_yuk_ch2_sl1_3_c = ((((( - g) / 2.0_default) * mu_21) * & + conjg (mix_sl311)) + (((gcc * mass(15) * mu_22) / (mass(24) * cosbe)) * & + conjg (mix_sl312))) + g_yuk_ch2_sl1_3 = conjg (g_yuk_ch2_sl1_3_c) + g_yuk_ch2_sl2_3_c = ((((( - g) / 2.0_default) * mu_21) * & + conjg (mix_sl321)) + (((gcc * mass(15) * mu_22) / (mass(24) * cosbe)) * & + conjg (mix_sl322))) + g_yuk_ch2_sl2_3 = conjg (g_yuk_ch2_sl2_3_c) + g_yuk_ch2_sl2_3_c = conjg (g_yuk_ch2_sl2_3) + g_yuk_ch2_sn1_1_c = ( - ((g / 2.0_default) * mv_21)) + g_yuk_ch2_sn1_1 = conjg (g_yuk_ch2_sn1_1_c) + g_yuk_ch2_sn1_2_c = ( - ((g / 2.0_default) * mv_21)) + g_yuk_ch2_sn1_2 = conjg (g_yuk_ch2_sn1_2_c) + g_yuk_ch1_sd1_1_1 = ( - ((g / 2.0_default) * conjg (mu_11) * vckm_11)) + g_yuk_ch1_sd1_1_1_c = conjg (g_yuk_ch1_sd1_1_1) + g_yuk_ch1_su1_1_1 = ( - ((g / 2.0_default) * conjg (mv_11) * vckm_11)) + g_yuk_ch1_su1_1_1_c = conjg (g_yuk_ch1_su1_1_1) + g_yuk_ch1_sd1_1_2 = ( - ((g / 2.0_default) * conjg (mu_11) * vckm_12)) + g_yuk_ch1_sd1_1_2_c = conjg (g_yuk_ch1_sd1_1_2) + g_yuk_ch1_su1_1_2 = ( - ((g / 2.0_default) * conjg (mv_11) * vckm_12)) + g_yuk_ch1_su1_1_2_c = conjg (g_yuk_ch1_su1_1_2) + g_yuk_ch1_sd1_2_1 = ( - ((g / 2.0_default) * conjg (mu_11) * vckm_21)) + g_yuk_ch1_sd1_2_1_c = conjg (g_yuk_ch1_sd1_2_1) + g_yuk_ch1_su1_2_1 = ( - ((g / 2.0_default) * conjg (mv_11) * vckm_21)) + g_yuk_ch1_su1_2_1_c = conjg (g_yuk_ch1_su1_2_1) + g_yuk_ch1_sd1_2_2 = ( - ((g / 2.0_default) * conjg (mu_11) * vckm_22)) + g_yuk_ch1_sd1_2_2_c = conjg (g_yuk_ch1_sd1_2_2) + g_yuk_ch1_su1_2_2 = ( - ((g / 2.0_default) * conjg (mv_11) * vckm_22)) + g_yuk_ch1_su1_2_2_c = conjg (g_yuk_ch1_su1_2_2) + g_yuk_ch2_sd1_1_1 = ( - ((g / 2.0_default) * conjg (mu_21) * vckm_11)) + g_yuk_ch2_sd1_1_1_c = conjg (g_yuk_ch2_sd1_1_1) + g_yuk_ch2_su1_1_1 = ( - ((g / 2.0_default) * conjg (mv_21) * vckm_11)) + g_yuk_ch2_su1_1_1_c = conjg (g_yuk_ch2_su1_1_1) + g_yuk_ch2_sd1_1_2 = ( - ((g / 2.0_default) * conjg (mu_21) * vckm_12)) + g_yuk_ch2_sd1_1_2_c = conjg (g_yuk_ch2_sd1_1_2) + g_yuk_ch2_su1_1_2 = ( - ((g / 2.0_default) * conjg (mv_21) * vckm_12)) + g_yuk_ch2_su1_1_2_c = conjg (g_yuk_ch2_su1_1_2) + g_yuk_ch2_sd1_2_1 = ( - ((g / 2.0_default) * conjg (mu_21) * vckm_21)) + g_yuk_ch2_sd1_2_1_c = conjg (g_yuk_ch2_sd1_2_1) + g_yuk_ch2_su1_2_1 = ( - ((g / 2.0_default) * conjg (mv_21) * vckm_21)) + g_yuk_ch2_su1_2_1_c = conjg (g_yuk_ch2_su1_2_1) + g_yuk_ch2_sd1_2_2 = ( - ((g / 2.0_default) * conjg (mu_21) * vckm_22)) + g_yuk_ch2_sd1_2_2_c = conjg (g_yuk_ch2_sd1_2_2) + g_yuk_ch2_su1_2_2 = ( - ((g / 2.0_default) * conjg (mv_21) * vckm_22)) + g_yuk_ch2_su1_2_2_c = conjg (g_yuk_ch2_su1_2_2) + g_yuk_n1_sn1_1 = (gcc * ((mn_11 * (sinthw / costhw)) - mn_12)) + g_yuk_n1_sn1_1_c = conjg (g_yuk_n1_sn1_1) + g_yuk_n1_sn1_2 = (gcc * ((mn_11 * (sinthw / costhw)) - mn_12)) + g_yuk_n1_sn1_2_c = conjg (g_yuk_n1_sn1_2) + g_yuk_n1_sn1_3 = (gcc * ((mn_11 * (sinthw / costhw)) - mn_12)) + g_yuk_n1_sn1_3_c = conjg (g_yuk_n1_sn1_3) + g_yuk_n2_sn1_1 = (gcc * ((mn_21 * (sinthw / costhw)) - mn_22)) + g_yuk_n2_sn1_1_c = conjg (g_yuk_n2_sn1_1) + g_yuk_n2_sn1_2 = (gcc * ((mn_21 * (sinthw / costhw)) - mn_22)) + g_yuk_n2_sn1_2_c = conjg (g_yuk_n2_sn1_2) + g_yuk_n2_sn1_3 = (gcc * ((mn_21 * (sinthw / costhw)) - mn_22)) + g_yuk_n2_sn1_3_c = conjg (g_yuk_n2_sn1_3) + g_yuk_n3_sn1_1 = (gcc * ((mn_31 * (sinthw / costhw)) - mn_32)) + g_yuk_n3_sn1_1_c = conjg (g_yuk_n3_sn1_1) + g_yuk_n3_sn1_2 = (gcc * ((mn_31 * (sinthw / costhw)) - mn_32)) + g_yuk_n3_sn1_2_c = conjg (g_yuk_n3_sn1_2) + g_yuk_n3_sn1_3 = (gcc * ((mn_31 * (sinthw / costhw)) - mn_32)) + g_yuk_n3_sn1_3_c = conjg (g_yuk_n3_sn1_3) + g_yuk_n4_sn1_1 = (gcc * ((mn_41 * (sinthw / costhw)) - mn_42)) + g_yuk_n4_sn1_1_c = conjg (g_yuk_n4_sn1_1) + g_yuk_n4_sn1_2 = (gcc * ((mn_41 * (sinthw / costhw)) - mn_42)) + g_yuk_n4_sn1_2_c = conjg (g_yuk_n4_sn1_2) + g_yuk_n4_sn1_3 = (gcc * ((mn_41 * (sinthw / costhw)) - mn_42)) + g_yuk_n4_sn1_3_c = conjg (g_yuk_n4_sn1_3) + g_yuk_n1_sl1_1 = (gcc * (mn_12 + ((sinthw * mn_11) / costhw))) + g_yuk_n1_sl1_1_c = conjg (g_yuk_n1_sl1_1) + g_yuk_n1_sl2_1 = ((gcc * 2.0_default * q_lep * sinthw * & + conjg (mn_11)) / costhw) + g_yuk_n1_sl2_1_c = conjg (g_yuk_n1_sl2_1) + g_yuk_n1_su1_1 = (( - gcc) * (mn_12 + ((sinthw * mn_11) / & + (3.0_default * costhw)))) + g_yuk_n1_su1_1_c = conjg (g_yuk_n1_su1_1) + g_yuk_n1_su2_1 = ((gcc * 2.0_default * q_up * sinthw * & + conjg (mn_11)) / costhw) + g_yuk_n1_su2_1_c = conjg (g_yuk_n1_su2_1) + g_yuk_n1_sd1_1 = (gcc * (mn_12 - ((sinthw * mn_11) / & + (costhw * 3.0_default)))) + g_yuk_n1_sd1_1_c = conjg (g_yuk_n1_sd1_1) + g_yuk_n1_sd2_1 = ((gcc * 2.0_default * q_down * sinthw * & + conjg (mn_11)) / costhw) + g_yuk_n1_sd2_1_c = conjg (g_yuk_n1_sd2_1) + g_yuk_n2_sl1_1 = (gcc * (mn_22 + ((sinthw * mn_21) / costhw))) + g_yuk_n2_sl1_1_c = conjg (g_yuk_n2_sl1_1) + g_yuk_n2_sl2_1 = ((gcc * 2.0_default * q_lep * sinthw * & + conjg (mn_21)) / costhw) + g_yuk_n2_sl2_1_c = conjg (g_yuk_n2_sl2_1) + g_yuk_n2_su1_1 = (( - gcc) * (mn_22 + ((sinthw * mn_21) / & + (3.0_default * costhw)))) + g_yuk_n2_su1_1_c = conjg (g_yuk_n2_su1_1) + g_yuk_n2_su2_1 = ((gcc * 2.0_default * q_up * sinthw * & + conjg (mn_21)) / costhw) + g_yuk_n2_su2_1_c = conjg (g_yuk_n2_su2_1) + g_yuk_n2_sd1_1 = (gcc * (mn_22 - ((sinthw * mn_21) / & + (costhw * 3.0_default)))) + g_yuk_n2_sd1_1_c = conjg (g_yuk_n2_sd1_1) + g_yuk_n2_sd2_1 = ((gcc * 2.0_default * q_down * sinthw * & + conjg (mn_21)) / costhw) + g_yuk_n2_sd2_1_c = conjg (g_yuk_n2_sd2_1) + g_yuk_n3_sl1_1 = (gcc * (mn_32 + ((sinthw * mn_31) / costhw))) + g_yuk_n3_sl1_1_c = conjg (g_yuk_n3_sl1_1) + g_yuk_n3_sl2_1 = ((gcc * 2.0_default * q_lep * sinthw * & + conjg (mn_31)) / costhw) + g_yuk_n3_sl2_1_c = conjg (g_yuk_n3_sl2_1) + g_yuk_n3_su1_1 = (( - gcc) * (mn_32 + ((sinthw * mn_31) / & + (3.0_default * costhw)))) + g_yuk_n3_su1_1_c = conjg (g_yuk_n3_su1_1) + g_yuk_n3_su2_1 = ((gcc * 2.0_default * q_up * sinthw * & + conjg (mn_31)) / costhw) + g_yuk_n3_su2_1_c = conjg (g_yuk_n3_su2_1) + g_yuk_n3_sd1_1 = (gcc * (mn_32 - ((sinthw * mn_31) / & + (costhw * 3.0_default)))) + g_yuk_n3_sd1_1_c = conjg (g_yuk_n3_sd1_1) + g_yuk_n3_sd2_1 = ((gcc * 2.0_default * q_down * sinthw * & + conjg (mn_31)) / costhw) + g_yuk_n3_sd2_1_c = conjg (g_yuk_n3_sd2_1) + g_yuk_n4_sl1_1 = (gcc * (mn_42 + ((sinthw * mn_41) / costhw))) + g_yuk_n4_sl1_1_c = conjg (g_yuk_n4_sl1_1) + g_yuk_n4_sl2_1 = ((gcc * 2.0_default * q_lep * sinthw * & + conjg (mn_41)) / costhw) + g_yuk_n4_sl2_1_c = conjg (g_yuk_n4_sl2_1) + g_yuk_n4_su1_1 = (( - gcc) * (mn_42 + ((sinthw * mn_41) / & + (3.0_default * costhw)))) + g_yuk_n4_su1_1_c = conjg (g_yuk_n4_su1_1) + g_yuk_n4_su2_1 = ((gcc * 2.0_default * q_up * sinthw * & + conjg (mn_41)) / costhw) + g_yuk_n4_su2_1_c = conjg (g_yuk_n4_su2_1) + g_yuk_n4_sd1_1 = (gcc * (mn_42 - ((sinthw * mn_41) / & + (costhw * 3.0_default)))) + g_yuk_n4_sd1_1_c = conjg (g_yuk_n4_sd1_1) + g_yuk_n4_sd2_1 = ((gcc * 2.0_default * q_down * sinthw * & + conjg (mn_41)) / costhw) + g_yuk_n4_sd2_1_c = conjg (g_yuk_n4_sd2_1) + g_yuk_n1_sl1_2 = (gcc * (mn_12 + ((sinthw * mn_11) / costhw))) + g_yuk_n1_sl1_2_c = conjg (g_yuk_n1_sl1_2) + g_yuk_n1_sl2_2 = ((gcc * 2.0_default * q_lep * sinthw * & + conjg (mn_11)) / costhw) + g_yuk_n1_sl2_2_c = conjg (g_yuk_n1_sl2_2) + g_yuk_n1_su1_2 = (( - gcc) * (mn_12 + ((sinthw * mn_11) / & + (3.0_default * costhw)))) + g_yuk_n1_su1_2_c = conjg (g_yuk_n1_su1_2) + g_yuk_n1_su2_2 = ((gcc * 2.0_default * q_up * sinthw * & + conjg (mn_11)) / costhw) + g_yuk_n1_su2_2_c = conjg (g_yuk_n1_su2_2) + g_yuk_n1_sd1_2 = (gcc * (mn_12 - ((sinthw * mn_11) / & + (costhw * 3.0_default)))) + g_yuk_n1_sd1_2_c = conjg (g_yuk_n1_sd1_2) + g_yuk_n1_sd2_2 = ((gcc * 2.0_default * q_down * sinthw * & + conjg (mn_11)) / costhw) + g_yuk_n1_sd2_2_c = conjg (g_yuk_n1_sd2_2) + g_yuk_n2_sl1_2 = (gcc * (mn_22 + ((sinthw * mn_21) / costhw))) + g_yuk_n2_sl1_2_c = conjg (g_yuk_n2_sl1_2) + g_yuk_n2_sl2_2 = ((gcc * 2.0_default * q_lep * sinthw * & + conjg (mn_21)) / costhw) + g_yuk_n2_sl2_2_c = conjg (g_yuk_n2_sl2_2) + g_yuk_n2_su1_2 = (( - gcc) * (mn_22 + ((sinthw * mn_21) / & + (3.0_default * costhw)))) + g_yuk_n2_su1_2_c = conjg (g_yuk_n2_su1_2) + g_yuk_n2_su2_2 = ((gcc * 2.0_default * q_up * sinthw * & + conjg (mn_21)) / costhw) + g_yuk_n2_su2_2_c = conjg (g_yuk_n2_su2_2) + g_yuk_n2_sd1_2 = (gcc * (mn_22 - ((sinthw * mn_21) / & + (costhw * 3.0_default)))) + g_yuk_n2_sd1_2_c = conjg (g_yuk_n2_sd1_2) + g_yuk_n2_sd2_2 = ((gcc * 2.0_default * q_down * sinthw * & + conjg (mn_21)) / costhw) + g_yuk_n2_sd2_2_c = conjg (g_yuk_n2_sd2_2) + g_yuk_n3_sl1_2 = (gcc * (mn_32 + ((sinthw * mn_31) / costhw))) + g_yuk_n3_sl1_2_c = conjg (g_yuk_n3_sl1_2) + g_yuk_n3_sl2_2 = ((gcc * 2.0_default * q_lep * sinthw * & + conjg (mn_31)) / costhw) + g_yuk_n3_sl2_2_c = conjg (g_yuk_n3_sl2_2) + g_yuk_n3_su1_2 = (( - gcc) * (mn_32 + ((sinthw * mn_31) / & + (3.0_default * costhw)))) + g_yuk_n3_su1_2_c = conjg (g_yuk_n3_su1_2) + g_yuk_n3_su2_2 = ((gcc * 2.0_default * q_up * sinthw * & + conjg (mn_31)) / costhw) + g_yuk_n3_su2_2_c = conjg (g_yuk_n3_su2_2) + g_yuk_n3_sd1_2 = (gcc * (mn_32 - ((sinthw * mn_31) / & + (costhw * 3.0_default)))) + g_yuk_n3_sd1_2_c = conjg (g_yuk_n3_sd1_2) + g_yuk_n3_sd2_2 = ((gcc * 2.0_default * q_down * sinthw * & + conjg (mn_31)) / costhw) + g_yuk_n3_sd2_2_c = conjg (g_yuk_n3_sd2_2) + g_yuk_n4_sl1_2 = (gcc * (mn_42 + ((sinthw * mn_41) / costhw))) + g_yuk_n4_sl1_2_c = conjg (g_yuk_n4_sl1_2) + g_yuk_n4_sl2_2 = ((gcc * 2.0_default * q_lep * sinthw * & + conjg (mn_41)) / costhw) + g_yuk_n4_sl2_2_c = conjg (g_yuk_n4_sl2_2) + g_yuk_n4_su1_2 = (( - gcc) * (mn_42 + ((sinthw * mn_41) / & + (3.0_default * costhw)))) + g_yuk_n4_su1_2_c = conjg (g_yuk_n4_su1_2) + g_yuk_n4_su2_2 = ((gcc * 2.0_default * q_up * sinthw * & + conjg (mn_41)) / costhw) + g_yuk_n4_su2_2_c = conjg (g_yuk_n4_su2_2) + g_yuk_n4_sd1_2 = (gcc * (mn_42 - ((sinthw * mn_41) / & + (costhw * 3.0_default)))) + g_yuk_n4_sd1_2_c = conjg (g_yuk_n4_sd1_2) + g_yuk_n4_sd2_2 = ((gcc * 2.0_default * q_down * sinthw * & + conjg (mn_41)) / costhw) + g_yuk_n4_sd2_2_c = conjg (g_yuk_n4_sd2_2) +end subroutine setup_parameters12 +subroutine setup_parameters13 () + gncneu(1) = ((gz / 2.0_default) * ( & + (2.0_default * 0.0_default * sin2thw) - & + (1.0_default / 2.0_default))) + gncneu(2) = ((( - gz) / 2.0_default) * & + (1.0_default / 2.0_default)) + gnclep(1) = ((gz / 2.0_default) * ( & + (2.0_default * (-1.0_default) * sin2thw) - ( - & + (1.0_default / 2.0_default)))) + gnclep(2) = ((( - gz) / 2.0_default) * ( - & + (1.0_default / 2.0_default))) + gncup(1) = ((gz / 2.0_default) * ((2.0_default * & + (2.0_default / 3.0_default) * sin2thw) - & + (1.0_default / 2.0_default))) + gncup(2) = ((( - gz) / 2.0_default) * (1.0_default / 2.0_default)) + gncdwn(1) = ((gz / 2.0_default) * ((2.0_default * & + ((-1.0_default) / 3.0_default) * sin2thw) - ( - & + (1.0_default / 2.0_default)))) + gncdwn(2) = ((( - gz) / 2.0_default) * ( - & + (1.0_default / 2.0_default))) + g_yuk1_1_3(1) = ((gcc / mass(24)) * vckm_13 * (mass(2) / tanb)) + g_yuk1_1_3(2) = ((gcc / mass(24)) * vckm_13 * tanb * mass(5)) + g_yuk1_2_3(1) = ((gcc / mass(24)) * vckm_23 * (mass(4) / tanb)) + g_yuk1_2_3(2) = ((gcc / mass(24)) * vckm_23 * tanb * mass(5)) + g_yuk1_3_3(1) = ((gcc / mass(24)) * vckm_33 * (mass(6) / tanb)) + g_yuk1_3_3(2) = ((gcc / mass(24)) * vckm_33 * tanb * mass(5)) + g_yuk1_3_2(1) = ((gcc / mass(24)) * vckm_32 * (mass(6) / tanb)) + g_yuk1_3_2(2) = ((gcc / mass(24)) * vckm_32 * tanb * mass(3)) + g_yuk1_3_1(1) = ((gcc / mass(24)) * vckm_31 * (mass(6) / tanb)) + g_yuk1_3_1(2) = ((gcc / mass(24)) * vckm_31 * tanb * mass(1)) + g_yuk2_1_3(1) = conjg (g_yuk1_1_3(2)) + g_yuk2_1_3(2) = conjg (g_yuk1_1_3(1)) + g_yuk2_2_3(1) = conjg (g_yuk1_2_3(2)) + g_yuk2_2_3(2) = conjg (g_yuk1_2_3(1)) + g_yuk2_3_1(1) = conjg (g_yuk1_3_1(2)) + g_yuk2_3_1(2) = conjg (g_yuk1_3_1(1)) + g_yuk2_3_2(1) = conjg (g_yuk1_3_2(2)) + g_yuk2_3_2(2) = conjg (g_yuk1_3_2(1)) + g_yuk2_3_3(1) = conjg (g_yuk1_3_3(2)) + g_yuk2_3_3(2) = conjg (g_yuk1_3_3(1)) + gnzn_1_2(1) = (gz * vector0_12) + gnzn_1_2(2) = (gz * axial0_12) + gnzn_1_3(1) = (gz * vector0_13) + gnzn_1_3(2) = (gz * axial0_13) + gnzn_1_4(1) = (gz * vector0_14) + gnzn_1_4(2) = (gz * axial0_14) + gnzn_2_3(1) = (gz * vector0_23) + gnzn_2_3(2) = (gz * axial0_23) + gnzn_2_4(1) = (gz * vector0_24) + gnzn_2_4(2) = (gz * axial0_24) + gnzn_3_4(1) = (gz * vector0_34) + gnzn_3_4(2) = (gz * axial0_34) + gczc_1_1(1) = (gz * vp_11) + gczc_1_1(2) = (gz * ap_11) + gczc_1_2(1) = (gz * vp_12) + gczc_1_2(2) = (gz * ap_12) + gczc_2_1(1) = (gz * vp_21) + gczc_2_1(2) = (gz * ap_21) + gczc_2_2(1) = (gz * vp_22) + gczc_2_2(2) = (gz * ap_22) + gnwc_1_1(1) = (gcc * lnc_11) + gnwc_1_1(2) = (gcc * rnc_11) + g_nhc_1_1(1) = ((g / 2.0_default) * lnch_11) + g_nhc_1_1(2) = ((g / 2.0_default) * rnch_11) + gnwc_1_2(1) = (gcc * lnc_12) + gnwc_1_2(2) = (gcc * rnc_12) + g_nhc_1_2(1) = ((g / 2.0_default) * lnch_12) + g_nhc_1_2(2) = ((g / 2.0_default) * rnch_12) + gnwc_2_1(1) = (gcc * lnc_21) + gnwc_2_1(2) = (gcc * rnc_21) + g_nhc_2_1(1) = ((g / 2.0_default) * lnch_21) + g_nhc_2_1(2) = ((g / 2.0_default) * rnch_21) + gnwc_2_2(1) = (gcc * lnc_22) + gnwc_2_2(2) = (gcc * rnc_22) + g_nhc_2_2(1) = ((g / 2.0_default) * lnch_22) + g_nhc_2_2(2) = ((g / 2.0_default) * rnch_22) + gnwc_3_1(1) = (gcc * lnc_31) + gnwc_3_1(2) = (gcc * rnc_31) + g_nhc_3_1(1) = ((g / 2.0_default) * lnch_31) + g_nhc_3_1(2) = ((g / 2.0_default) * rnch_31) + gnwc_3_2(1) = (gcc * lnc_32) + gnwc_3_2(2) = (gcc * rnc_32) + g_nhc_3_2(1) = ((g / 2.0_default) * lnch_32) + g_nhc_3_2(2) = ((g / 2.0_default) * rnch_32) + gnwc_4_1(1) = (gcc * lnc_41) + gnwc_4_1(2) = (gcc * rnc_41) + g_nhc_4_1(1) = ((g / 2.0_default) * lnch_41) + g_nhc_4_1(2) = ((g / 2.0_default) * rnch_41) + gnwc_4_2(1) = (gcc * lnc_42) + gnwc_4_2(2) = (gcc * rnc_42) + g_nhc_4_2(1) = ((g / 2.0_default) * lnch_42) + g_nhc_4_2(2) = ((g / 2.0_default) * rnch_42) + gcwn_1_1(1) = (gcc * lcn_11) + gcwn_1_1(2) = (gcc * rcn_11) + g_chn_1_1(1) = ((g / 2.0_default) * conjg (rnch_11)) + g_chn_1_1(2) = ((g / 2.0_default) * conjg (lnch_11)) + gcwn_1_2(1) = (gcc * lcn_12) + gcwn_1_2(2) = (gcc * rcn_12) + g_chn_2_1(1) = ((g / 2.0_default) * conjg (rnch_21)) + g_chn_2_1(2) = ((g / 2.0_default) * conjg (lnch_21)) + gcwn_1_3(1) = (gcc * lcn_13) + gcwn_1_3(2) = (gcc * rcn_13) + g_chn_3_1(1) = ((g / 2.0_default) * conjg (rnch_31)) + g_chn_3_1(2) = ((g / 2.0_default) * conjg (lnch_31)) + gcwn_1_4(1) = (gcc * lcn_14) + gcwn_1_4(2) = (gcc * rcn_14) + g_chn_4_1(1) = ((g / 2.0_default) * conjg (rnch_41)) + g_chn_4_1(2) = ((g / 2.0_default) * conjg (lnch_41)) + gcwn_2_1(1) = (gcc * lcn_21) + gcwn_2_1(2) = (gcc * rcn_21) + g_chn_1_2(1) = ((g / 2.0_default) * conjg (rnch_12)) + g_chn_1_2(2) = ((g / 2.0_default) * conjg (lnch_12)) + gcwn_2_2(1) = (gcc * lcn_22) + gcwn_2_2(2) = (gcc * rcn_22) + g_chn_2_2(1) = ((g / 2.0_default) * conjg (rnch_22)) + g_chn_2_2(2) = ((g / 2.0_default) * conjg (lnch_22)) + gcwn_2_3(1) = (gcc * lcn_23) + gcwn_2_3(2) = (gcc * rcn_23) + g_chn_3_2(1) = ((g / 2.0_default) * conjg (rnch_32)) + g_chn_3_2(2) = ((g / 2.0_default) * conjg (lnch_32)) + gcwn_2_4(1) = (gcc * lcn_24) + gcwn_2_4(2) = (gcc * rcn_24) + g_chn_4_2(1) = ((g / 2.0_default) * conjg (rnch_42)) + g_chn_4_2(2) = ((g / 2.0_default) * conjg (lnch_42)) + gcicih1_1_1 = ((( - g ) / 2.0_default) * snnh1_11) + gcicih2_1_1 = ((( - g ) / 2.0_default) * snnh2_11) + gcicia_1_1 = ((( - g ) / 2.0_default) * pnna_11) + gcicih1_1_2(1) = ((( - g ) / 2.0_default) * snnh1_12) + gcicih1_1_2(2) = ((( - g ) / 2.0_default) * pnnh1_12) + gcicih2_1_2(1) = ((( - g ) / 2.0_default) * snnh2_12) + gcicih2_1_2(2) = ((( - g ) / 2.0_default) * pnnh2_12) + gcicia_1_2(1) = ((( - g ) / 2.0_default) * snna_12) + gcicia_1_2(2) = ((( - g ) / 2.0_default) * pnna_12) + gcicih1_1_3(1) = ((( - g ) / 2.0_default) * snnh1_13) + gcicih1_1_3(2) = ((( - g ) / 2.0_default) * pnnh1_13) + gcicih2_1_3(1) = ((( - g ) / 2.0_default) * snnh2_13) + gcicih2_1_3(2) = ((( - g ) / 2.0_default) * pnnh2_13) + gcicia_1_3(1) = ((( - g ) / 2.0_default) * snna_13) + gcicia_1_3(2) = ((( - g ) / 2.0_default) * pnna_13) + gcicih1_1_4(1) = ((( - g ) / 2.0_default) * snnh1_14) + gcicih1_1_4(2) = ((( - g ) / 2.0_default) * pnnh1_14) + gcicih2_1_4(1) = ((( - g ) / 2.0_default) * snnh2_14) + gcicih2_1_4(2) = ((( - g ) / 2.0_default) * pnnh2_14) + gcicia_1_4(1) = ((( - g ) / 2.0_default) * snna_14) + gcicia_1_4(2) = ((( - g ) / 2.0_default) * pnna_14) + gcicih1_2_2 = ((( - g ) / 2.0_default) * snnh1_22) + gcicih2_2_2 = ((( - g ) / 2.0_default) * snnh2_22) + gcicia_2_2 = ((( - g ) / 2.0_default) * pnna_22) + gcicih1_2_3(1) = ((( - g ) / 2.0_default) * snnh1_23) + gcicih1_2_3(2) = ((( - g ) / 2.0_default) * pnnh1_23) + gcicih2_2_3(1) = ((( - g ) / 2.0_default) * snnh2_23) + gcicih2_2_3(2) = ((( - g ) / 2.0_default) * pnnh2_23) + end subroutine setup_parameters13 + subroutine setup_parameters14 () +!!! JR checked gch[x]h_[x]_[x] + gcicia_2_3(1) = ((( - g ) / 2.0_default) * snna_23) + gcicia_2_3(2) = ((( - g ) / 2.0_default) * pnna_23) + gcicih1_2_4(1) = ((( - g ) / 2.0_default) * snnh1_24) + gcicih1_2_4(2) = ((( - g ) / 2.0_default) * pnnh1_24) + gcicih2_2_4(1) = ((( - g ) / 2.0_default) * snnh2_24) + gcicih2_2_4(2) = ((( - g ) / 2.0_default) * pnnh2_24) + gcicia_2_4(1) = ((( - g ) / 2.0_default) * snna_24) + gcicia_2_4(2) = ((( - g ) / 2.0_default) * pnna_24) + gcicih1_3_3 = ((( - g ) / 2.0_default) * snnh1_33) + gcicih2_3_3 = ((( - g ) / 2.0_default) * snnh2_33) + gcicia_3_3 = ((( - g ) / 2.0_default) * pnna_33) + gcicih1_3_4(1) = ((( - g ) / 2.0_default) * snnh1_34) + gcicih1_3_4(2) = ((( - g ) / 2.0_default) * pnnh1_34) + gcicih2_3_4(1) = ((( - g ) / 2.0_default) * snnh2_34) + gcicih2_3_4(2) = ((( - g ) / 2.0_default) * pnnh2_34) + gcicia_3_4(1) = ((( - g ) / 2.0_default) * snna_34) + gcicia_3_4(2) = ((( - g ) / 2.0_default) * pnna_34) + gcicih1_4_4 = ((( - g ) / 2.0_default) * snnh1_44) + gcicih2_4_4 = ((( - g ) / 2.0_default) * snnh2_44) + gcicia_4_4 = ((( - g ) / 2.0_default) * pnna_44) + gch1c_1_1 = (( - (g / sqrt (2.0_default))) * ((conjg (mu_11) * & + conjg (mv_12) * cosal) - (conjg (mu_12) * conjg (mv_11) * sinal))) + gch2c_1_1 = (( - (g / sqrt (2.0_default))) * ((conjg (mu_12) * & + conjg (mv_11) * cosal) + (conjg (mu_11) * conjg (mv_12) * sinal))) + gcac_1_1 = (imago * ( - (g / & + sqrt (2.0_default))) * ((mv_11 * mu_12 * sinbe) + & + (mv_12 * mu_11 * cosbe))) + gch1c_1_2(1) = (( - gcc) * ((conjg (mu_11) * & + conjg (mv_22) * cosal) - (conjg (mu_12) * conjg (mv_21) * sinal))) + gch1c_1_2(2) = (( - gcc) * ( & + (mv_12 * mu_21 * cosal) - (mv_11 * mu_22 * sinal))) + gch2c_1_2(1) = (( - gcc) * ((conjg (mu_12) * & + conjg (mv_21) * cosal) + (conjg (mu_11) * conjg (mv_22) * sinal))) + gch2c_1_2(2) = (( - gcc) * ((mv_11 * mu_22 * cosal) & + + (mv_12 * mu_21 * sinal))) + gcac_1_2(1) = (imago * gcc * (( & + conjg (mu_12) * conjg (mv_21) * sinbe) + ( & + conjg (mu_11) * conjg (mv_22) * cosbe))) + gcac_1_2(2) = (( - imago) * gcc * (( & + mv_11 * mu_22 * sinbe) + (mv_12 * mu_21 * cosbe))) + gch1c_2_1(1) = conjg (gch1c_1_2(2)) + gch1c_2_1(2) = conjg (gch1c_1_2(1)) + gch2c_2_1(1) = conjg (gch2c_1_2(2)) + gch2c_2_1(2) = conjg (gch2c_1_2(1)) + gcac_2_1(1) = conjg (gcac_1_2(2)) + gcac_2_1(2) = conjg (gcac_1_2(1)) + gch1c_2_2 = (( - (g / sqrt (2.0_default))) * ((conjg (mu_21) * & + conjg (mv_22) * cosal) - (conjg (mu_22) * conjg (mv_21) * sinal))) + gch2c_2_2 = (( - (g / sqrt (2.0_default))) * ((conjg (mu_22) * & + conjg (mv_21) * cosal) + (conjg (mu_21) * conjg (mv_22) * sinal))) + gcac_2_2 = (imago * ( - (g / & + sqrt (2.0_default))) * ((mv_21 * mu_22 * sinbe) + & + (mv_22 * mu_21 * cosbe))) + g_yuk_ch1_sn1_3_c(1) = ((gcc * mass(15) * conjg (mu_12)) / (mass(24) & + * cosbe)) + g_yuk_ch1_sn1_3_c(2) = ( - ((g * mv_11) / 2.0_default)) + g_yuk_ch1_sn1_3(1) = conjg (g_yuk_ch1_sn1_3_c(2)) + g_yuk_ch1_sn1_3(2) = conjg (g_yuk_ch1_sn1_3_c(1)) + g_yuk_ch2_sn1_3_c(1) = ((gcc * mass(15) * conjg (mu_22)) / (mass(24) & + * cosbe)) + g_yuk_ch2_sn1_3_c(2) = ( - ((g * mv_21) / 2.0_default)) + g_yuk_ch2_sn1_3(1) = conjg (g_yuk_ch2_sn1_3_c(2)) + g_yuk_ch2_sn1_3(2) = conjg (g_yuk_ch2_sn1_3_c(1)) + g_yuk_ch1_sd1_1_3(1) = ((vckm_13 * gcc * mv_12 * mass(2) * & + conjg (mix_sd311)) / (mass(24) * sinbe)) + g_yuk_ch1_sd1_1_3(2) = (vckm_13 * gcc * (((conjg (mu_12) * mass(5) * & + conjg (mix_sd312)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd311)))) + g_yuk_ch1_sd1_1_3_c(1) = conjg (g_yuk_ch1_sd1_1_3(2)) + g_yuk_ch1_sd1_1_3_c(2) = conjg (g_yuk_ch1_sd1_1_3(1)) + g_yuk_ch1_su1_1_3(1) = (vckm_13 * gcc * (((conjg (mv_12) * mass(2) * & + conjg (mix_su112)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su111)))) + g_yuk_ch1_su1_1_3(2) = ((vckm_13 * gcc * mu_12 * mass(5) * & + conjg (mix_su111)) / (mass(24) * cosbe)) + g_yuk_ch1_su1_1_3_c(1) = conjg (g_yuk_ch1_su1_1_3(2)) + g_yuk_ch1_su1_1_3_c(2) = conjg (g_yuk_ch1_su1_1_3(1)) + end subroutine setup_parameters14 + subroutine setup_parameters15 () + g_yuk_ch1_sd1_2_3(1) = ((vckm_23 * gcc * mv_12 * mass(4) * & + conjg (mix_sd311)) / (mass(24) * sinbe)) + g_yuk_ch1_sd1_2_3(2) = (vckm_23 * gcc * (((conjg (mu_12) * mass(5) * & + conjg (mix_sd312)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd311)))) + g_yuk_ch1_sd1_2_3_c(1) = conjg (g_yuk_ch1_sd1_2_3(2)) + g_yuk_ch1_sd1_2_3_c(2) = conjg (g_yuk_ch1_sd1_2_3(1)) + g_yuk_ch1_su1_2_3(1) = (vckm_23 * gcc * (((conjg (mv_12) * mass(4) * & + conjg (mix_su212)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su211)))) + g_yuk_ch1_su1_2_3(2) = ((vckm_23 * gcc * mu_12 * mass(5) * & + conjg (mix_su211)) / (mass(24) * cosbe)) + g_yuk_ch1_su1_2_3_c(1) = conjg (g_yuk_ch1_su1_2_3(2)) + g_yuk_ch1_su1_2_3_c(2) = conjg (g_yuk_ch1_su1_2_3(1)) + g_yuk_ch1_sd1_3_3(1) = ((vckm_33 * gcc * mv_12 * mass(6) * & + conjg (mix_sd311)) / (mass(24) * sinbe)) + g_yuk_ch1_sd1_3_3(2) = (vckm_33 * gcc * (((conjg (mu_12) * mass(5) * & + conjg (mix_sd312)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd311)))) + g_yuk_ch1_sd1_3_3_c(1) = conjg (g_yuk_ch1_sd1_3_3(2)) + g_yuk_ch1_sd1_3_3_c(2) = conjg (g_yuk_ch1_sd1_3_3(1)) + g_yuk_ch1_su1_3_3(1) = (vckm_33 * gcc * (((conjg (mv_12) * mass(6) * & + conjg (mix_su312)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su311)))) + g_yuk_ch1_su1_3_3(2) = ((vckm_33 * gcc * mu_12 * mass(5) * & + conjg (mix_su311)) / (mass(24) * cosbe)) + g_yuk_ch1_su1_3_3_c(1) = conjg (g_yuk_ch1_su1_3_3(2)) + g_yuk_ch1_su1_3_3_c(2) = conjg (g_yuk_ch1_su1_3_3(1)) + g_yuk_ch1_sd1_3_2(1) = ((vckm_32 * gcc * mv_12 * mass(6) * & + conjg (mix_sd211)) / (mass(24) * sinbe)) + g_yuk_ch1_sd1_3_2(2) = (vckm_32 * gcc * (((conjg (mu_12) * mass(3) * & + conjg (mix_sd212)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd211)))) + g_yuk_ch1_sd1_3_2_c(1) = conjg (g_yuk_ch1_sd1_3_2(2)) + g_yuk_ch1_sd1_3_2_c(2) = conjg (g_yuk_ch1_sd1_3_2(1)) + g_yuk_ch1_su1_3_2(1) = (vckm_32 * gcc * (((conjg (mv_12) * mass(6) * & + conjg (mix_su312)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su311)))) + g_yuk_ch1_su1_3_2(2) = ((vckm_32 * gcc * mu_12 * mass(3) * & + conjg (mix_su311)) / (mass(24) * cosbe)) + g_yuk_ch1_su1_3_2_c(1) = conjg (g_yuk_ch1_su1_3_2(2)) + g_yuk_ch1_su1_3_2_c(2) = conjg (g_yuk_ch1_su1_3_2(1)) + g_yuk_ch1_sd1_3_1(1) = ((vckm_31 * gcc * mv_12 * mass(6) * & + conjg (mix_sd111)) / (mass(24) * sinbe)) + g_yuk_ch1_sd1_3_1(2) = (vckm_31 * gcc * (((conjg (mu_12) * mass(1) * & + conjg (mix_sd112)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd111)))) + g_yuk_ch1_sd1_3_1_c(1) = conjg (g_yuk_ch1_sd1_3_1(2)) + g_yuk_ch1_sd1_3_1_c(2) = conjg (g_yuk_ch1_sd1_3_1(1)) + g_yuk_ch1_su1_3_1(1) = (vckm_31 * gcc * (((conjg (mv_12) * mass(6) * & + conjg (mix_su312)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su311)))) + g_yuk_ch1_su1_3_1(2) = ((vckm_31 * gcc * mu_12 * mass(1) * & + conjg (mix_su311)) / (mass(24) * cosbe)) + g_yuk_ch1_su1_3_1_c(1) = conjg (g_yuk_ch1_su1_3_1(2)) + g_yuk_ch1_su1_3_1_c(2) = conjg (g_yuk_ch1_su1_3_1(1)) + g_yuk_ch1_sd2_1_3(1) = ((vckm_13 * gcc * mv_12 * mass(2) * & + conjg (mix_sd321)) / (mass(24) * sinbe)) + g_yuk_ch1_sd2_1_3(2) = (vckm_13 * gcc * (((conjg (mu_12) * mass(5) * & + conjg (mix_sd322)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd321)))) + g_yuk_ch1_sd2_1_3_c(1) = conjg (g_yuk_ch1_sd2_1_3(2)) + g_yuk_ch1_sd2_1_3_c(2) = conjg (g_yuk_ch1_sd2_1_3(1)) + g_yuk_ch1_su2_1_3(1) = (vckm_13 * gcc * (((conjg (mv_12) * mass(2) * & + conjg (mix_su122)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su121)))) + g_yuk_ch1_su2_1_3(2) = ((vckm_13 * gcc * mu_12 * mass(5) * & + conjg (mix_su121)) / (mass(24) * cosbe)) + g_yuk_ch1_su2_1_3_c(1) = conjg (g_yuk_ch1_su2_1_3(2)) + g_yuk_ch1_su2_1_3_c(2) = conjg (g_yuk_ch1_su2_1_3(1)) + g_yuk_ch1_sd2_2_3(1) = ((vckm_23 * gcc * mv_12 * mass(4) * & + conjg (mix_sd321)) / (mass(24) * sinbe)) + g_yuk_ch1_sd2_2_3(2) = (vckm_23 * gcc * (((conjg (mu_12) * mass(5) * & + conjg (mix_sd322)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd321)))) + g_yuk_ch1_sd2_2_3_c(1) = conjg (g_yuk_ch1_sd2_2_3(2)) + g_yuk_ch1_sd2_2_3_c(2) = conjg (g_yuk_ch1_sd2_2_3(1)) + g_yuk_ch1_su2_2_3(1) = (vckm_23 * gcc * (((conjg (mv_12) * mass(4) * & + conjg (mix_su222)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su221)))) + g_yuk_ch1_su2_2_3(2) = ((vckm_23 * gcc * mu_12 * mass(5) * & + conjg (mix_su221)) / (mass(24) * cosbe)) + g_yuk_ch1_su2_2_3_c(1) = conjg (g_yuk_ch1_su2_2_3(2)) + g_yuk_ch1_su2_2_3_c(2) = conjg (g_yuk_ch1_su2_2_3(1)) + g_yuk_ch1_sd2_3_3(1) = ((vckm_33 * gcc * mv_12 * mass(6) * & + conjg (mix_sd321)) / (mass(24) * sinbe)) + g_yuk_ch1_sd2_3_3(2) = (vckm_33 * gcc * (((conjg (mu_12) * mass(5) * & + conjg (mix_sd322)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd321)))) + g_yuk_ch1_sd2_3_3_c(1) = conjg (g_yuk_ch1_sd2_3_3(2)) + g_yuk_ch1_sd2_3_3_c(2) = conjg (g_yuk_ch1_sd2_3_3(1)) + g_yuk_ch1_su2_3_3(1) = (vckm_33 * gcc * (((conjg (mv_12) * mass(6) * & + conjg (mix_su322)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su321)))) + g_yuk_ch1_su2_3_3(2) = ((vckm_33 * gcc * mu_12 * mass(5) * & + conjg (mix_su321)) / (mass(24) * cosbe)) + g_yuk_ch1_su2_3_3_c(1) = conjg (g_yuk_ch1_su2_3_3(2)) + g_yuk_ch1_su2_3_3_c(2) = conjg (g_yuk_ch1_su2_3_3(1)) + g_yuk_ch1_sd2_3_2(1) = ((vckm_32 * gcc * mv_12 * mass(6) * & + conjg (mix_sd221)) / (mass(24) * sinbe)) + g_yuk_ch1_sd2_3_2(2) = (vckm_32 * gcc * (((conjg (mu_12) * mass(3) * & + conjg (mix_sd222)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd221)))) + g_yuk_ch1_sd2_3_2_c(1) = conjg (g_yuk_ch1_sd2_3_2(2)) + g_yuk_ch1_sd2_3_2_c(2) = conjg (g_yuk_ch1_sd2_3_2(1)) + g_yuk_ch1_su2_3_2(1) = (vckm_32 * gcc * (((conjg (mv_12) * mass(6) * & + conjg (mix_su322)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su321)))) + g_yuk_ch1_su2_3_2(2) = ((vckm_32 * gcc * mu_12 * mass(3) * & + conjg (mix_su321)) / (mass(24) * cosbe)) + g_yuk_ch1_su2_3_2_c(1) = conjg (g_yuk_ch1_su2_3_3(2)) + g_yuk_ch1_su2_3_2_c(2) = conjg (g_yuk_ch1_su2_3_3(1)) + g_yuk_ch1_sd2_3_1(1) = ((vckm_31 * gcc * mv_12 * mass(6) * & + conjg (mix_sd121)) / (mass(24) * sinbe)) + g_yuk_ch1_sd2_3_1(2) = (vckm_31 * gcc * (((conjg (mu_12) * mass(1) * & + conjg (mix_sd122)) / (mass(24) * cosbe)) - (conjg (mu_11) * & + sqrt (2.0_default) * conjg (mix_sd121)))) + g_yuk_ch1_sd2_3_1_c(1) = conjg (g_yuk_ch1_sd2_3_1(2)) + g_yuk_ch1_sd2_3_1_c(2) = conjg (g_yuk_ch1_sd2_3_1(1)) + g_yuk_ch1_su2_3_1(1) = (vckm_31 * gcc * (((conjg (mv_12) * mass(6) * & + conjg (mix_su322)) / (mass(24) * sinbe)) - (conjg (mv_11) * & + sqrt (2.0_default) * conjg (mix_su321)))) + g_yuk_ch1_su2_3_1(2) = ((vckm_31 * gcc * mu_12 * mass(1) * & + conjg (mix_su321)) / (mass(24) * cosbe)) + g_yuk_ch1_su2_3_1_c(1) = conjg (g_yuk_ch1_su2_3_1(2)) + g_yuk_ch1_su2_3_1_c(2) = conjg (g_yuk_ch1_su2_3_1(1)) + g_yuk_ch2_sd1_1_3(1) = ((vckm_13 * gcc * mv_22 * mass(2) * & + conjg (mix_sd311)) / (mass(24) * sinbe)) + g_yuk_ch2_sd1_1_3(2) = (vckm_13 * gcc * (((conjg (mu_22) * mass(5) * & + conjg (mix_sd312)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd311)))) + g_yuk_ch2_sd1_1_3_c(1) = conjg (g_yuk_ch2_sd1_1_3(2)) + g_yuk_ch2_sd1_1_3_c(2) = conjg (g_yuk_ch2_sd1_1_3(1)) + g_yuk_ch2_su1_1_3(1) = (vckm_13 * gcc * (((conjg (mv_22) * mass(2) * & + conjg (mix_su112)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su111)))) + g_yuk_ch2_su1_1_3(2) = ((vckm_13 * gcc * mu_22 * mass(5) * & + conjg (mix_su111)) / (mass(24) * cosbe)) + g_yuk_ch2_su1_1_3_c(1) = conjg (g_yuk_ch2_su1_1_3(2)) + g_yuk_ch2_su1_1_3_c(2) = conjg (g_yuk_ch2_su1_1_3(1)) + g_yuk_ch2_sd1_2_3(1) = ((vckm_23 * gcc * mv_22 * mass(4) * & + conjg (mix_sd311)) / (mass(24) * sinbe)) + g_yuk_ch2_sd1_2_3(2) = (vckm_23 * gcc * (((conjg (mu_22) * mass(5) * & + conjg (mix_sd312)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd311)))) + g_yuk_ch2_sd1_2_3_c(1) = conjg (g_yuk_ch2_sd1_2_3(2)) + g_yuk_ch2_sd1_2_3_c(2) = conjg (g_yuk_ch2_sd1_2_3(1)) + g_yuk_ch2_su1_2_3(1) = (vckm_23 * gcc * (((conjg (mv_22) * mass(4) * & + conjg (mix_su212)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su211)))) + g_yuk_ch2_su1_2_3(2) = ((vckm_23 * gcc * mu_22 * mass(5) * & + conjg (mix_su211)) / (mass(24) * cosbe)) + g_yuk_ch2_su1_2_3_c(1) = conjg (g_yuk_ch2_su1_2_3(2)) + g_yuk_ch2_su1_2_3_c(2) = conjg (g_yuk_ch2_su1_2_3(1)) + g_yuk_ch2_sd1_3_3(1) = ((vckm_33 * gcc * mv_22 * mass(6) * & + conjg (mix_sd311)) / (mass(24) * sinbe)) + g_yuk_ch2_sd1_3_3(2) = (vckm_33 * gcc * (((conjg (mu_22) * mass(5) * & + conjg (mix_sd312)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd311)))) + g_yuk_ch2_sd1_3_3_c(1) = conjg (g_yuk_ch2_sd1_3_3(2)) + g_yuk_ch2_sd1_3_3_c(2) = conjg (g_yuk_ch2_sd1_3_3(1)) + g_yuk_ch2_su1_3_3(1) = (vckm_33 * gcc * (((conjg (mv_22) * mass(6) * & + conjg (mix_su312)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su311)))) + g_yuk_ch2_su1_3_3(2) = ((vckm_33 * gcc * mu_22 * mass(5) * & + conjg (mix_su311)) / (mass(24) * cosbe)) + g_yuk_ch2_su1_3_3_c(1) = conjg (g_yuk_ch2_su1_3_3(2)) + g_yuk_ch2_su1_3_3_c(2) = conjg (g_yuk_ch2_su1_3_3(1)) + g_yuk_ch2_sd1_3_2(1) = ((vckm_32 * gcc * mv_22 * mass(6) * & + conjg (mix_sd211)) / (mass(24) * sinbe)) + g_yuk_ch2_sd1_3_2(2) = (vckm_32 * gcc * (((conjg (mu_22) * mass(3) * & + conjg (mix_sd212)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd211)))) + g_yuk_ch2_sd1_3_2_c(1) = conjg (g_yuk_ch2_sd1_3_2(2)) + g_yuk_ch2_sd1_3_2_c(2) = conjg (g_yuk_ch2_sd1_3_2(1)) + g_yuk_ch2_su1_3_2(1) = (vckm_32 * gcc * (((conjg (mv_22) * mass(6) * & + conjg (mix_su312)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su311)))) + g_yuk_ch2_su1_3_2(2) = ((vckm_32 * gcc * mu_22 * mass(3) * & + conjg (mix_su311)) / (mass(24) * cosbe)) + g_yuk_ch2_su1_3_2_c(1) = conjg (g_yuk_ch2_su1_3_2(2)) + g_yuk_ch2_su1_3_2_c(2) = conjg (g_yuk_ch2_su1_3_2(1)) + g_yuk_ch2_sd1_3_1(1) = ((vckm_31 * gcc * mv_22 * mass(6) * & + conjg (mix_sd111)) / (mass(24) * sinbe)) + g_yuk_ch2_sd1_3_1(2) = (vckm_31 * gcc * (((conjg (mu_22) * mass(1) * & + conjg (mix_sd112)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd111)))) + g_yuk_ch2_sd1_3_1_c(1) = conjg (g_yuk_ch2_sd1_3_1(2)) + g_yuk_ch2_sd1_3_1_c(2) = conjg (g_yuk_ch2_sd1_3_1(1)) + g_yuk_ch2_su1_3_1(1) = (vckm_31 * gcc * (((conjg (mv_22) * mass(6) * & + conjg (mix_su312)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su311)))) + g_yuk_ch2_su1_3_1(2) = ((vckm_31 * gcc * mu_22 * mass(1) * & + conjg (mix_su311)) / (mass(24) * cosbe)) + g_yuk_ch2_su1_3_1_c(1) = conjg (g_yuk_ch2_su1_3_1(2)) + g_yuk_ch2_su1_3_1_c(2) = conjg (g_yuk_ch2_su1_3_1(1)) + g_yuk_ch2_sd2_1_3(1) = ((vckm_13 * gcc * mv_22 * mass(2) * & + conjg (mix_sd321)) / (mass(24) * sinbe)) + g_yuk_ch2_sd2_1_3(2) = (vckm_13 * gcc * (((conjg (mu_22) * mass(5) * & + conjg (mix_sd322)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd321)))) + g_yuk_ch2_sd2_1_3_c(1) = conjg (g_yuk_ch2_sd2_1_3(2)) + g_yuk_ch2_sd2_1_3_c(2) = conjg (g_yuk_ch2_sd2_1_3(1)) + g_yuk_ch2_su2_1_3(1) = (vckm_13 * gcc * (((conjg (mv_22) * mass(2) * & + conjg (mix_su122)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su121)))) + g_yuk_ch2_su2_1_3(2) = ((vckm_13 * gcc * mu_22 * mass(5) * & + conjg (mix_su121)) / (mass(24) * cosbe)) + g_yuk_ch2_su2_1_3_c(1) = conjg (g_yuk_ch2_su2_1_3(2)) + g_yuk_ch2_su2_1_3_c(2) = conjg (g_yuk_ch2_su2_1_3(1)) + g_yuk_ch2_sd2_2_3(1) = ((vckm_23 * gcc * mv_22 * mass(4) * & + conjg (mix_sd321)) / (mass(24) * sinbe)) + g_yuk_ch2_sd2_2_3(2) = (vckm_23 * gcc * (((conjg (mu_22) * mass(5) * & + conjg (mix_sd322)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd321)))) + g_yuk_ch2_sd2_2_3_c(1) = conjg (g_yuk_ch2_sd2_2_3(2)) + g_yuk_ch2_sd2_2_3_c(2) = conjg (g_yuk_ch2_sd2_2_3(1)) + g_yuk_ch2_su2_2_3(1) = (vckm_23 * gcc * (((conjg (mv_22) * mass(4) * & + conjg (mix_su222)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su221)))) + g_yuk_ch2_su2_2_3(2) = ((vckm_23 * gcc * mu_22 * mass(5) * & + conjg (mix_su221)) / (mass(24) * cosbe)) + g_yuk_ch2_su2_2_3_c(1) = conjg (g_yuk_ch2_su2_2_3(2)) + g_yuk_ch2_su2_2_3_c(2) = conjg (g_yuk_ch2_su2_2_3(1)) + g_yuk_ch2_sd2_3_3(1) = ((vckm_33 * gcc * mv_22 * mass(6) * & + conjg (mix_sd321)) / (mass(24) * sinbe)) + g_yuk_ch2_sd2_3_3(2) = (vckm_33 * gcc * (((conjg (mu_22) * mass(5) * & + conjg (mix_sd322)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd321)))) + g_yuk_ch2_sd2_3_3_c(1) = conjg (g_yuk_ch2_sd2_3_3(2)) + g_yuk_ch2_sd2_3_3_c(2) = conjg (g_yuk_ch2_sd2_3_3(1)) + g_yuk_ch2_su2_3_3(1) = (vckm_33 * gcc * (((conjg (mv_22) * mass(6) * & + conjg (mix_su322)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su321)))) + g_yuk_ch2_su2_3_3(2) = ((vckm_33 * gcc * mu_22 * mass(5) * & + conjg (mix_su321)) / (mass(24) * cosbe)) + g_yuk_ch2_su2_3_3_c(1) = conjg (g_yuk_ch2_su2_3_3(2)) + g_yuk_ch2_su2_3_3_c(2) = conjg (g_yuk_ch2_su2_3_3(1)) + g_yuk_ch2_sd2_3_2(1) = ((vckm_32 * gcc * mv_22 * mass(6) * & + conjg (mix_sd221)) / (mass(24) * sinbe)) + g_yuk_ch2_sd2_3_2(2) = (vckm_32 * gcc * (((conjg (mu_22) * mass(3) * & + conjg (mix_sd222)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd221)))) + g_yuk_ch2_sd2_3_2_c(1) = conjg (g_yuk_ch2_sd2_3_2(2)) + g_yuk_ch2_sd2_3_2_c(2) = conjg (g_yuk_ch2_sd2_3_2(1)) + g_yuk_ch2_su2_3_2(1) = (vckm_32 * gcc * (((conjg (mv_22) * mass(6) * & + conjg (mix_su322)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su321)))) + g_yuk_ch2_su2_3_2(2) = ((vckm_32 * gcc * mu_22 * mass(3) * & + conjg (mix_su321)) / (mass(24) * cosbe)) + g_yuk_ch2_su2_3_2_c(1) = conjg (g_yuk_ch2_su2_3_2(2)) + g_yuk_ch2_su2_3_2_c(2) = conjg (g_yuk_ch2_su2_3_2(1)) + g_yuk_ch2_sd2_3_1(1) = ((vckm_31 * gcc * mv_22 * mass(6) * & + conjg (mix_sd121)) / (mass(24) * sinbe)) + g_yuk_ch2_sd2_3_1(2) = (vckm_31 * gcc * (((conjg (mu_22) * mass(1) * & + conjg (mix_sd122)) / (mass(24) * cosbe)) - (conjg (mu_21) * & + sqrt (2.0_default) * conjg (mix_sd121)))) + g_yuk_ch2_sd2_3_1_c(1) = conjg (g_yuk_ch2_sd2_3_1(2)) + g_yuk_ch2_sd2_3_1_c(2) = conjg (g_yuk_ch2_sd2_3_1(1)) + g_yuk_ch2_su2_3_1(1) = (vckm_31 * gcc * (((conjg (mv_22) * mass(6) * & + conjg (mix_su322)) / (mass(24) * sinbe)) - (conjg (mv_21) * & + sqrt (2.0_default) * conjg (mix_su321)))) + g_yuk_ch2_su2_3_1(2) = ((vckm_31 * gcc * mu_22 * mass(1) * & + conjg (mix_su321)) / (mass(24) * cosbe)) + g_yuk_ch2_su2_3_1_c(1) = conjg (g_yuk_ch2_su2_3_1(2)) + g_yuk_ch2_su2_3_1_c(2) = conjg (g_yuk_ch2_su2_3_1(1)) + end subroutine setup_parameters15 + subroutine setup_parameters16 () + g_yuk_n1_sl1_3(1) = ( - (gcc * ((2.0_default * ( - & + q_lep) * conjg (mn_11) * (sinthw / costhw) * mix_sl312) & + + ((conjg (mn_13) * mass(15) * mix_sl311) / (mass(24) * cosbe))))) + g_yuk_n1_sl1_3(2) = (gcc * ((1.0_default * (mn_12 + (1.0_default * & + (sinthw / costhw) * mn_11)) * mix_sl311) - ( & + (mn_13 * mass(15) * mix_sl312) / (mass(24) * cosbe)))) + g_yuk_n1_sl1_3_c(1) = conjg (g_yuk_n1_sl1_3(2)) + g_yuk_n1_sl1_3_c(2) = conjg (g_yuk_n1_sl1_3(1)) + g_yuk_n1_su1_3(1) = ( - (gcc * ((2.0_default * ( - & + q_up) * conjg (mn_11) * & + (sinthw / costhw) * mix_su312) + ((conjg (mn_14) * mass(6) * mix_su311) / & + (mass(24) * sinbe))))) + g_yuk_n1_su1_3(2) = (gcc * (((-1.0_default) * (mn_12 + ( & + (1.0_default / 3.0_default) * & + (sinthw / costhw) * mn_11)) * mix_su311) - ( & + (mn_14 * mass(6) * mix_su312) / (mass(24) * sinbe)))) + g_yuk_n1_su1_3_c(1) = conjg (g_yuk_n1_su1_3(2)) + g_yuk_n1_su1_3_c(2) = conjg (g_yuk_n1_su1_3(1)) + g_yuk_n1_sd1_3(1) = ( - (gcc * ((2.0_default * ( - ( - & + (1.0_default / 3.0_default))) * conjg (mn_11) * & + (sinthw / costhw) * mix_sd312) + ((conjg (mn_13) * mass(5) * mix_sd311) / & + (mass(24) * cosbe))))) + g_yuk_n1_sd1_3(2) = (gcc * ((1.0_default * (mn_12 + (( - & + (1.0_default / 3.0_default)) * & + (sinthw / costhw) * mn_11)) * mix_sd311) - ( & + (mn_13 * mass(5) * mix_sd312) / (mass(24) * cosbe)))) + g_yuk_n1_sd1_3_c(1) = conjg (g_yuk_n1_sd1_3(2)) + g_yuk_n1_sd1_3_c(2) = conjg (g_yuk_n1_sd1_3(1)) + g_yuk_n2_sl1_3(1) = ( - (gcc * ((2.0_default * ( - & + q_lep) * conjg (mn_21) * (sinthw / costhw) * mix_sl312) + ( & + (conjg (mn_23) * mass(15) * mix_sl311) / (mass(24) * cosbe))))) + g_yuk_n2_sl1_3(2) = (gcc * ((1.0_default * (mn_22 + (1.0_default * & + (sinthw / costhw) * mn_21)) * mix_sl311) - ( & + (mn_23 * mass(15) * mix_sl312) / (mass(24) * cosbe)))) + g_yuk_n2_sl1_3_c(1) = conjg (g_yuk_n2_sl1_3(2)) + g_yuk_n2_sl1_3_c(2) = conjg (g_yuk_n2_sl1_3(1)) + g_yuk_n2_su1_3(1) = ( - (gcc * ((2.0_default * ( - & + q_up) * conjg (mn_21) * & + (sinthw / costhw) * mix_su312) + ((conjg (mn_24) * mass(6) * mix_su311) / & + (mass(24) * sinbe))))) + g_yuk_n2_su1_3(2) = (gcc * (((-1.0_default) * (mn_22 + ( & + (1.0_default / 3.0_default) * & + (sinthw / costhw) * mn_21)) * mix_su311) - ( & + (mn_24 * mass(6) * mix_su312) / (mass(24) * sinbe)))) + g_yuk_n2_su1_3_c(1) = conjg (g_yuk_n2_su1_3(2)) + g_yuk_n2_su1_3_c(2) = conjg (g_yuk_n2_su1_3(1)) + g_yuk_n2_sd1_3(1) = ( - (gcc * ((2.0_default * ( - ( - & + (1.0_default / 3.0_default))) * conjg (mn_21) * & + (sinthw / costhw) * mix_sd312) + ((conjg (mn_23) * mass(5) * mix_sd311) / & + (mass(24) * cosbe))))) + g_yuk_n2_sd1_3(2) = (gcc * ((1.0_default * (mn_22 + (( - & + (1.0_default / 3.0_default)) * & + (sinthw / costhw) * mn_21)) * mix_sd311) - ( & + (mn_23 * mass(5) * mix_sd312) / (mass(24) * cosbe)))) + g_yuk_n2_sd1_3_c(1) = conjg (g_yuk_n2_sd1_3(2)) + g_yuk_n2_sd1_3_c(2) = conjg (g_yuk_n2_sd1_3(1)) + g_yuk_n3_sl1_3(1) = ( - (gcc * ((2.0_default * ( - & + q_lep) * conjg (mn_31) * (sinthw / costhw) * mix_sl312) + ( & + (conjg (mn_33) * mass(15) * mix_sl311) / (mass(24) * cosbe))))) + g_yuk_n3_sl1_3(2) = (gcc * ((1.0_default * (mn_32 + (1.0_default * & + (sinthw / costhw) * mn_31)) * mix_sl311) - ( & + (mn_33 * mass(15) * mix_sl312) / (mass(24) * cosbe)))) + g_yuk_n3_sl1_3_c(1) = conjg (g_yuk_n3_sl1_3(2)) + g_yuk_n3_sl1_3_c(2) = conjg (g_yuk_n3_sl1_3(1)) + g_yuk_n3_su1_3(1) = ( - (gcc * ((2.0_default * ( - & + q_up) * conjg (mn_31) * & + (sinthw / costhw) * mix_su312) + ((conjg (mn_34) * mass(6) * mix_su311) / & + (mass(24) * sinbe))))) + g_yuk_n3_su1_3(2) = (gcc * (((-1.0_default) * (mn_32 + ( & + (1.0_default / 3.0_default) * & + (sinthw / costhw) * mn_31)) * mix_su311) - ( & + (mn_34 * mass(6) * mix_su312) / (mass(24) * sinbe)))) + g_yuk_n3_su1_3_c(1) = conjg (g_yuk_n3_su1_3(2)) + g_yuk_n3_su1_3_c(2) = conjg (g_yuk_n3_su1_3(1)) + g_yuk_n3_sd1_3(1) = ( - (gcc * ((2.0_default * ( - ( - & + (1.0_default / 3.0_default))) * conjg (mn_31) * & + (sinthw / costhw) * mix_sd312) + ((conjg (mn_33) * mass(5) * mix_sd311) / & + (mass(24) * cosbe))))) + g_yuk_n3_sd1_3(2) = (gcc * ((1.0_default * (mn_32 + (( - & + (1.0_default / 3.0_default)) * & + (sinthw / costhw) * mn_31)) * mix_sd311) - ( & + (mn_33 * mass(5) * mix_sd312) / (mass(24) * cosbe)))) + g_yuk_n3_sd1_3_c(1) = conjg (g_yuk_n3_sd1_3(2)) + g_yuk_n3_sd1_3_c(2) = conjg (g_yuk_n3_sd1_3(1)) + g_yuk_n4_sl1_3(1) = ( - (gcc * ((2.0_default * ( - & + q_lep) * conjg (mn_41) * (sinthw / costhw) * mix_sl312) + ( & + (conjg (mn_43) * mass(15) * mix_sl311) / (mass(24) * cosbe))))) + g_yuk_n4_sl1_3(2) = (gcc * ((1.0_default * (mn_42 + (1.0_default * & + (sinthw / costhw) * mn_41)) * mix_sl311) - ( & + (mn_43 * mass(15) * mix_sl312) / (mass(24) * cosbe)))) + g_yuk_n4_sl1_3_c(1) = conjg (g_yuk_n4_sl1_3(2)) + g_yuk_n4_sl1_3_c(2) = conjg (g_yuk_n4_sl1_3(1)) + g_yuk_n4_su1_3(1) = ( - (gcc * ((2.0_default * ( - & + q_up) * conjg (mn_41) * & + (sinthw / costhw) * mix_su312) + ((conjg (mn_44) * mass(6) * mix_su311) / & + (mass(24) * sinbe))))) + g_yuk_n4_su1_3(2) = (gcc * (((-1.0_default) * (mn_42 + ( & + (1.0_default / 3.0_default) * & + (sinthw / costhw) * mn_41)) * mix_su311) - ( & + (mn_44 * mass(6) * mix_su312) / (mass(24) * sinbe)))) + g_yuk_n4_su1_3_c(1) = conjg (g_yuk_n4_su1_3(2)) + g_yuk_n4_su1_3_c(2) = conjg (g_yuk_n4_su1_3(1)) + g_yuk_n4_sd1_3(1) = ( - (gcc * ((2.0_default * ( - ( - & + (1.0_default / 3.0_default))) * conjg (mn_41) * & + (sinthw / costhw) * mix_sd312) + ((conjg (mn_43) * mass(5) * mix_sd311) / & + (mass(24) * cosbe))))) + g_yuk_n4_sd1_3(2) = (gcc * ((1.0_default * (mn_42 + (( - & + (1.0_default / 3.0_default)) * & + (sinthw / costhw) * mn_41)) * mix_sd311) - ( & + (mn_43 * mass(5) * mix_sd312) / (mass(24) * cosbe)))) + g_yuk_n4_sd1_3_c(1) = conjg (g_yuk_n4_sd1_3(2)) + g_yuk_n4_sd1_3_c(2) = conjg (g_yuk_n4_sd1_3(1)) + g_yuk_n1_sl2_3(1) = ( - (gcc * ((2.0_default * ( - & + q_lep) * conjg (mn_11) * (sinthw / costhw) * mix_sl322) + ( & + (conjg (mn_13) * mass(15) * mix_sl321) / (mass(24) * cosbe))))) + g_yuk_n1_sl2_3(2) = (gcc * ((1.0_default * (mn_12 + (1.0_default * & + (sinthw / costhw) * mn_11)) * mix_sl321) - ( & + (mn_13 * mass(15) * mix_sl322) / (mass(24) * cosbe)))) + g_yuk_n1_sl2_3_c(1) = conjg (g_yuk_n1_sl2_3(2)) + g_yuk_n1_sl2_3_c(2) = conjg (g_yuk_n1_sl2_3(1)) + g_yuk_n1_su2_3(1) = ( - (gcc * ((2.0_default * ( - & + q_up) * conjg (mn_11) * & + (sinthw / costhw) * mix_su322) + ((conjg (mn_14) * mass(6) * mix_su321) / & + (mass(24) * sinbe))))) + g_yuk_n1_su2_3(2) = (gcc * (((-1.0_default) * (mn_12 + ( & + (1.0_default / 3.0_default) * & + (sinthw / costhw) * mn_11)) * mix_su321) - ( & + (mn_14 * mass(6) * mix_su322) / (mass(24) * sinbe)))) + g_yuk_n1_su2_3_c(1) = conjg (g_yuk_n1_su2_3(2)) + g_yuk_n1_su2_3_c(2) = conjg (g_yuk_n1_su2_3(1)) + g_yuk_n1_sd2_3(1) = ( - (gcc * ((2.0_default * ( - ( - & + (1.0_default / 3.0_default))) * conjg (mn_11) * & + (sinthw / costhw) * mix_sd322) + ((conjg (mn_13) * mass(5) * mix_sd321) / & + (mass(24) * cosbe))))) + g_yuk_n1_sd2_3(2) = (gcc * ((1.0_default * (mn_12 + (( - & + (1.0_default / 3.0_default)) * & + (sinthw / costhw) * mn_11)) * mix_sd321) - ( & + (mn_13 * mass(5) * mix_sd322) / (mass(24) * cosbe)))) + g_yuk_n1_sd2_3_c(1) = conjg (g_yuk_n1_sd2_3(2)) + g_yuk_n1_sd2_3_c(2) = conjg (g_yuk_n1_sd2_3(1)) + g_yuk_n2_sl2_3(1) = ( - (gcc * ((2.0_default * ( - & + q_lep) * conjg (mn_21) * (sinthw / costhw) * mix_sl322) + ( & + (conjg (mn_23) * mass(15) * mix_sl321) / (mass(24) * cosbe))))) + g_yuk_n2_sl2_3(2) = (gcc * ((1.0_default * (mn_22 + (1.0_default * & + (sinthw / costhw) * mn_21)) * mix_sl321) - ( & + (mn_23 * mass(15) * mix_sl322) / (mass(24) * cosbe)))) + g_yuk_n2_sl2_3_c(1) = conjg (g_yuk_n2_sl2_3(2)) + g_yuk_n2_sl2_3_c(2) = conjg (g_yuk_n2_sl2_3(1)) + g_yuk_n2_su2_3(1) = ( - (gcc * ((2.0_default * ( - & + q_up) * conjg (mn_21) * & + (sinthw / costhw) * mix_su322) + ((conjg (mn_24) * mass(6) * mix_su321) / & + (mass(24) * sinbe))))) + g_yuk_n2_su2_3(2) = (gcc * (((-1.0_default) * (mn_22 + ( & + (1.0_default / 3.0_default) * & + (sinthw / costhw) * mn_21)) * mix_su321) - ( & + (mn_24 * mass(6) * mix_su322) / (mass(24) * sinbe)))) + g_yuk_n2_su2_3_c(1) = conjg (g_yuk_n2_su2_3(2)) + g_yuk_n2_su2_3_c(2) = conjg (g_yuk_n2_su2_3(1)) + g_yuk_n2_sd2_3(1) = ( - (gcc * ((2.0_default * ( - ( - & + (1.0_default / 3.0_default))) * conjg (mn_21) * & + (sinthw / costhw) * mix_sd322) + ((conjg (mn_23) * mass(5) * mix_sd321) / & + (mass(24) * cosbe))))) + g_yuk_n2_sd2_3(2) = (gcc * ((1.0_default * (mn_22 + (( - & + (1.0_default / 3.0_default)) * & + (sinthw / costhw) * mn_21)) * mix_sd321) - ( & + (mn_23 * mass(5) * mix_sd322) / (mass(24) * cosbe)))) + g_yuk_n2_sd2_3_c(1) = conjg (g_yuk_n2_sd2_3(2)) + g_yuk_n2_sd2_3_c(2) = conjg (g_yuk_n2_sd2_3(1)) + g_yuk_n3_sl2_3(1) = ( - (gcc * ((2.0_default * ( - & + q_lep) * conjg (mn_31) * (sinthw / costhw) * mix_sl322) + ( & + (conjg (mn_33) * mass(15) * mix_sl321) / (mass(24) * cosbe))))) + g_yuk_n3_sl2_3(2) = (gcc * ((1.0_default * (mn_32 + (1.0_default * & + (sinthw / costhw) * mn_31)) * mix_sl321) - ( & + (mn_33 * mass(15) * mix_sl322) / (mass(24) * cosbe)))) + g_yuk_n3_sl2_3_c(1) = conjg (g_yuk_n3_sl2_3(2)) + g_yuk_n3_sl2_3_c(2) = conjg (g_yuk_n3_sl2_3(1)) + g_yuk_n3_su2_3(1) = ( - (gcc * ((2.0_default * ( - & + q_up) * conjg (mn_31) * & + (sinthw / costhw) * mix_su322) + ((conjg (mn_34) * mass(6) * mix_su321) / & + (mass(24) * sinbe))))) + g_yuk_n3_su2_3(2) = (gcc * (((-1.0_default) * (mn_32 + ( & + (1.0_default / 3.0_default) * & + (sinthw / costhw) * mn_31)) * mix_su321) - ( & + (mn_34 * mass(6) * mix_su322) / (mass(24) * sinbe)))) + g_yuk_n3_su2_3_c(1) = conjg (g_yuk_n3_su2_3(2)) + g_yuk_n3_su2_3_c(2) = conjg (g_yuk_n3_su2_3(1)) + g_yuk_n3_sd2_3(1) = ( - (gcc * ((2.0_default * ( - ( - & + (1.0_default / 3.0_default))) * conjg (mn_31) * & + (sinthw / costhw) * mix_sd322) + ((conjg (mn_33) * mass(5) * mix_sd321) / & + (mass(24) * cosbe))))) + g_yuk_n3_sd2_3(2) = (gcc * ((1.0_default * (mn_32 + (( - & + (1.0_default / 3.0_default)) * & + (sinthw / costhw) * mn_31)) * mix_sd321) - ( & + (mn_33 * mass(5) * mix_sd322) / (mass(24) * cosbe)))) + g_yuk_n3_sd2_3_c(1) = conjg (g_yuk_n3_sd2_3(2)) + g_yuk_n3_sd2_3_c(2) = conjg (g_yuk_n3_sd2_3(1)) + g_yuk_n4_sl2_3(1) = ( - (gcc * ((2.0_default * ( - & + q_lep) * conjg (mn_41) * (sinthw / costhw) * mix_sl322) + ( & + (conjg (mn_43) * mass(15) * mix_sl321) / (mass(24) * cosbe))))) + g_yuk_n4_sl2_3(2) = (gcc * ((1.0_default * (mn_42 + (1.0_default * & + (sinthw / costhw) * mn_41)) * mix_sl321) - ( & + (mn_43 * mass(15) * mix_sl322) / (mass(24) * cosbe)))) + g_yuk_n4_sl2_3_c(1) = conjg (g_yuk_n4_sl2_3(2)) + g_yuk_n4_sl2_3_c(2) = conjg (g_yuk_n4_sl2_3(1)) + g_yuk_n4_su2_3(1) = ( - (gcc * ((2.0_default * ( - & + q_up) * conjg (mn_41) * & + (sinthw / costhw) * mix_su322) + ((conjg (mn_44) * mass(6) * mix_su321) / & + (mass(24) * sinbe))))) + g_yuk_n4_su2_3(2) = (gcc * (((-1.0_default) * (mn_42 + ( & + (1.0_default / 3.0_default) * & + (sinthw / costhw) * mn_41)) * mix_su321) - ( & + (mn_44 * mass(6) * mix_su322) / (mass(24) * sinbe)))) + g_yuk_n4_su2_3_c(1) = conjg (g_yuk_n4_su2_3(2)) + g_yuk_n4_su2_3_c(2) = conjg (g_yuk_n4_su2_3(1)) + g_yuk_n4_sd2_3(1) = ( - (gcc * ((2.0_default * ( - ( - & + (1.0_default / 3.0_default))) * conjg (mn_41) * & + (sinthw / costhw) * mix_sd322) + ((conjg (mn_43) * mass(5) * mix_sd321) / & + (mass(24) * cosbe))))) + g_yuk_n4_sd2_3(2) = (gcc * ((1.0_default * (mn_42 + (( - & + (1.0_default / 3.0_default)) * & + (sinthw / costhw) * mn_41)) * mix_sd321) - ( & + (mn_43 * mass(5) * mix_sd322) / (mass(24) * cosbe)))) + !!! For the adjoint color flow method these constants have to be + !!! divided by a factor of sqrt(2). + g_yuk_n4_sd2_3_c(1) = conjg (g_yuk_n4_sd2_3(2)) + g_yuk_n4_sd2_3_c(2) = conjg (g_yuk_n4_sd2_3(1)) + !!! For the diagram-wise color calculation this has not to be + !!! divided by an additional factor of sqrt(2) + g_yuk_gsu1_3(1) = ( - (mix_su312 * (gs / sqrt (2.0_default)))) + g_yuk_gsu1_3(2) = (mix_su311 * (gs / sqrt (2.0_default))) + g_yuk_gsu1_3_c(1) = conjg (g_yuk_gsu1_3(2)) + g_yuk_gsu1_3_c(2) = conjg (g_yuk_gsu1_3(1)) + g_yuk_gsd1_3(1) = ( - (mix_sd312 * (gs / sqrt (2.0_default)))) + g_yuk_gsd1_3(2) = (mix_sd311 * (gs / sqrt (2.0_default))) + g_yuk_gsd1_3_c(1) = conjg (g_yuk_gsd1_3(2)) + g_yuk_gsd1_3_c(2) = conjg (g_yuk_gsd1_3(1)) + g_yuk_gsu2_3(1) = ( - (mix_su322 * (gs / sqrt (2.0_default)))) + g_yuk_gsu2_3(2) = (mix_su321 * (gs / sqrt (2.0_default))) + g_yuk_gsu2_3_c(1) = conjg (g_yuk_gsu2_3(2)) + g_yuk_gsu2_3_c(2) = conjg (g_yuk_gsu2_3(1)) + g_yuk_gsd2_3(1) = ( - (mix_sd322 * (gs / sqrt (2.0_default)))) + g_yuk_gsd2_3(2) = (mix_sd321 * (gs / sqrt (2.0_default))) + g_yuk_gsd2_3_c(1) = conjg (g_yuk_gsd2_3(2)) + g_yuk_gsd2_3_c(2) = conjg (g_yuk_gsd2_3(1)) + end subroutine setup_parameters16 + end subroutine init_parameters + + subroutine model_update_alpha_s (alpha_s) + real(default), intent(in) :: alpha_s + gs = sqrt(2.0_default * PI * alpha_s) + igs = cmplx(0.0_default, 1.0_default, kind=default) * gs + gssq = (gs / sqrt (2.0_default)) + g_yuk_gsu1_3(1) = ( - (mix_su312 * (gs / sqrt (2.0_default)))) + g_yuk_gsu1_3(2) = (mix_su311 * (gs / sqrt (2.0_default))) + g_yuk_gsu1_3_c(1) = conjg (g_yuk_gsu1_3(2)) + g_yuk_gsu1_3_c(2) = conjg (g_yuk_gsu1_3(1)) + g_yuk_gsd1_3(1) = ( - (mix_sd312 * (gs / sqrt (2.0_default)))) + g_yuk_gsd1_3(2) = (mix_sd311 * (gs / sqrt (2.0_default))) + g_yuk_gsd1_3_c(1) = conjg (g_yuk_gsd1_3(2)) + g_yuk_gsd1_3_c(2) = conjg (g_yuk_gsd1_3(1)) + g_yuk_gsu2_3(1) = ( - (mix_su322 * (gs / sqrt (2.0_default)))) + g_yuk_gsu2_3(2) = (mix_su321 * (gs / sqrt (2.0_default))) + g_yuk_gsu2_3_c(1) = conjg (g_yuk_gsu2_3(2)) + g_yuk_gsu2_3_c(2) = conjg (g_yuk_gsu2_3(1)) + g_yuk_gsd2_3(1) = ( - (mix_sd322 * (gs / sqrt (2.0_default)))) + g_yuk_gsd2_3(2) = (mix_sd321 * (gs / sqrt (2.0_default))) + g_yuk_gsd2_3_c(1) = conjg (g_yuk_gsd2_3(2)) + g_yuk_gsd2_3_c(2) = conjg (g_yuk_gsd2_3(1)) + gglglsqsq = (gs**2) + gglpsqsq = 2.0_default * e * gs / 3.0_default + gglsu1su1_1 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su111 * conjg (mix_su111))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu2su2_1 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su121 * conjg (mix_su121))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu1su2_1 = (gz * gs * (1.0_default / 2.0_default) * mix_su111 * & + conjg (mix_su121)) + gglsu2su1_1 = (gz * gs * (1.0_default / 2.0_default) * mix_su121 * & + conjg (mix_su111)) + gglsd1sd1_1 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd111 * conjg (mix_sd111))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd2sd2_1 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd121 * conjg (mix_sd121))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd1sd2_1 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd111 * conjg (mix_sd121))) + gglsd2sd1_1 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd121 * conjg (mix_sd111))) + gglsu1su1_2 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su211 * conjg (mix_su211))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu2su2_2 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su221 * conjg (mix_su221))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu1su2_2 = (gz * gs * (1.0_default / 2.0_default) * mix_su211 * & + conjg (mix_su221)) + gglsu2su1_2 = (gz * gs * (1.0_default / 2.0_default) * mix_su221 * & + conjg (mix_su211)) + gglsd1sd1_2 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd211 * conjg (mix_sd211))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd2sd2_2 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd221 * conjg (mix_sd221))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd1sd2_2 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd211 * conjg (mix_sd221))) + gglsd2sd1_2 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd221 * conjg (mix_sd211))) + gglsu1su1_3 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su311 * conjg (mix_su311))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu2su2_3 = (gz * gs * (((1.0_default / 2.0_default) * & + (mix_su321 * conjg (mix_su321))) - (sin2thw * & + (2.0_default / 3.0_default)))) + gglsu1su2_3 = (gz * gs * (1.0_default / 2.0_default) * mix_su311 * & + conjg (mix_su321)) + gglsu2su1_3 = (gz * gs * (1.0_default / 2.0_default) * mix_su321 * & + conjg (mix_su311)) + gglsd1sd1_3 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd311 * conjg (mix_sd311))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd2sd2_3 = ( - (gz * gs * (((1.0_default / 2.0_default) * & + (mix_sd321 * conjg (mix_sd321))) - (sin2thw * & + (1.0_default / 3.0_default))))) + gglsd1sd2_3 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd311 * conjg (mix_sd321))) + gglsd2sd1_3 = ( - (gz * gs * & + (1.0_default / 2.0_default) * mix_sd321 * conjg (mix_sd311))) + gglwsu1sd1_1_1 = (g * gs * sqrt (2.0_default) * vckm_11 * & + conjg (mix_su111) * mix_sd111) + gglwsu2sd2_1_1 = (g * gs * sqrt (2.0_default) * vckm_11 * & + conjg (mix_su121) * mix_sd121) + gglwsu1sd2_1_1 = (g * gs * sqrt (2.0_default) * vckm_11 * & + conjg (mix_su111) * mix_sd121) + gglwsu2sd1_1_1 = (g * gs * sqrt (2.0_default) * vckm_11 * & + conjg (mix_su121) * mix_sd111) + gglwsu1sd1_1_1_c = conjg (gglwsu1sd1_1_1) + gglwsu2sd2_1_1_c = conjg (gglwsu2sd2_1_1) + gglwsu1sd2_1_1_c = conjg (gglwsu1sd2_1_1) + gglwsu2sd1_1_1_c = conjg (gglwsu2sd1_1_1) + gglwsu1sd1_1_2 = (g * gs * sqrt (2.0_default) * vckm_12 * & + conjg (mix_su111) * mix_sd211) + gglwsu2sd2_1_2 = (g * gs * sqrt (2.0_default) * vckm_12 * & + conjg (mix_su121) * mix_sd221) + gglwsu1sd2_1_2 = (g * gs * sqrt (2.0_default) * vckm_12 * & + conjg (mix_su111) * mix_sd221) + gglwsu2sd1_1_2 = (g * gs * sqrt (2.0_default) * vckm_12 * & + conjg (mix_su121) * mix_sd211) + gglwsu1sd1_1_2_c = conjg (gglwsu1sd1_1_2) + gglwsu2sd2_1_2_c = conjg (gglwsu2sd2_1_2) + gglwsu1sd2_1_2_c = conjg (gglwsu1sd2_1_2) + gglwsu2sd1_1_2_c = conjg (gglwsu2sd1_1_2) + gglwsu1sd1_1_3 = (g * gs * sqrt (2.0_default) * vckm_13 * & + conjg (mix_su111) * mix_sd311) + gglwsu2sd2_1_3 = (g * gs * sqrt (2.0_default) * vckm_13 * & + conjg (mix_su121) * mix_sd321) + gglwsu1sd2_1_3 = (g * gs * sqrt (2.0_default) * vckm_13 * & + conjg (mix_su111) * mix_sd321) + gglwsu2sd1_1_3 = (g * gs * sqrt (2.0_default) * vckm_13 * & + conjg (mix_su121) * mix_sd311) + gglwsu1sd1_1_3_c = conjg (gglwsu1sd1_1_3) + gglwsu2sd2_1_3_c = conjg (gglwsu2sd2_1_3) + gglwsu1sd2_1_3_c = conjg (gglwsu1sd2_1_3) + gglwsu2sd1_1_3_c = conjg (gglwsu2sd1_1_3) + gglwsu1sd1_2_1 = (g * gs * sqrt (2.0_default) * vckm_21 * & + conjg (mix_su211) * mix_sd111) + gglwsu2sd2_2_1 = (g * gs * sqrt (2.0_default) * vckm_21 * & + conjg (mix_su221) * mix_sd121) + gglwsu1sd2_2_1 = (g * gs * sqrt (2.0_default) * vckm_21 * & + conjg (mix_su211) * mix_sd121) + gglwsu2sd1_2_1 = (g * gs * sqrt (2.0_default) * vckm_21 * & + conjg (mix_su221) * mix_sd111) + gglwsu1sd1_2_1_c = conjg (gglwsu1sd1_2_1) + gglwsu2sd2_2_1_c = conjg (gglwsu2sd2_2_1) + gglwsu1sd2_2_1_c = conjg (gglwsu1sd2_2_1) + gglwsu2sd1_2_1_c = conjg (gglwsu2sd1_2_1) + gglwsu1sd1_2_2 = (g * gs * sqrt (2.0_default) * vckm_22 * & + conjg (mix_su211) * mix_sd211) + gglwsu2sd2_2_2 = (g * gs * sqrt (2.0_default) * vckm_22 * & + conjg (mix_su221) * mix_sd221) + gglwsu1sd2_2_2 = (g * gs * sqrt (2.0_default) * vckm_22 * & + conjg (mix_su211) * mix_sd221) + gglwsu2sd1_2_2 = (g * gs * sqrt (2.0_default) * vckm_22 * & + conjg (mix_su221) * mix_sd211) + gglwsu1sd1_2_2_c = conjg (gglwsu1sd1_2_2) + gglwsu2sd2_2_2_c = conjg (gglwsu2sd2_2_2) + gglwsu1sd2_2_2_c = conjg (gglwsu1sd2_2_2) + gglwsu2sd1_2_2_c = conjg (gglwsu2sd1_2_2) + gglwsu1sd1_2_3 = (g * gs * sqrt (2.0_default) * vckm_23 * & + conjg (mix_su211) * mix_sd311) + gglwsu2sd2_2_3 = (g * gs * sqrt (2.0_default) * vckm_23 * & + conjg (mix_su221) * mix_sd321) + gglwsu1sd2_2_3 = (g * gs * sqrt (2.0_default) * vckm_23 * & + conjg (mix_su211) * mix_sd321) + gglwsu2sd1_2_3 = (g * gs * sqrt (2.0_default) * vckm_23 * & + conjg (mix_su221) * mix_sd311) + gglwsu1sd1_2_3_c = conjg (gglwsu1sd1_2_3) + gglwsu2sd2_2_3_c = conjg (gglwsu2sd2_2_3) + gglwsu1sd2_2_3_c = conjg (gglwsu1sd2_2_3) + gglwsu2sd1_2_3_c = conjg (gglwsu2sd1_2_3) + gglwsu1sd1_3_1 = (g * gs * sqrt (2.0_default) * vckm_31 * & + conjg (mix_su311) * mix_sd111) + gglwsu2sd2_3_1 = (g * gs * sqrt (2.0_default) * vckm_31 * & + conjg (mix_su321) * mix_sd121) + gglwsu1sd2_3_1 = (g * gs * sqrt (2.0_default) * vckm_31 * & + conjg (mix_su311) * mix_sd121) + gglwsu2sd1_3_1 = (g * gs * sqrt (2.0_default) * vckm_31 * & + conjg (mix_su321) * mix_sd111) + gglwsu1sd1_3_1_c = conjg (gglwsu1sd1_3_1) + gglwsu2sd2_3_1_c = conjg (gglwsu2sd2_3_1) + gglwsu1sd2_3_1_c = conjg (gglwsu1sd2_3_1) + gglwsu2sd1_3_1_c = conjg (gglwsu2sd1_3_1) + gglwsu1sd1_3_2 = (g * gs * sqrt (2.0_default) * vckm_32 * & + conjg (mix_su311) * mix_sd211) + gglwsu2sd2_3_2 = (g * gs * sqrt (2.0_default) * vckm_32 * & + conjg (mix_su321) * mix_sd221) + gglwsu1sd2_3_2 = (g * gs * sqrt (2.0_default) * vckm_32 * & + conjg (mix_su311) * mix_sd221) + gglwsu2sd1_3_2 = (g * gs * sqrt (2.0_default) * vckm_32 * & + conjg (mix_su321) * mix_sd211) + gglwsu1sd1_3_2_c = conjg (gglwsu1sd1_3_2) + gglwsu2sd2_3_2_c = conjg (gglwsu2sd2_3_2) + gglwsu1sd2_3_2_c = conjg (gglwsu1sd2_3_2) + gglwsu2sd1_3_2_c = conjg (gglwsu2sd1_3_2) + gglwsu1sd1_3_3 = (g * gs * sqrt (2.0_default) * vckm_33 * & + conjg (mix_su311) * mix_sd311) + gglwsu2sd2_3_3 = (g * gs * sqrt (2.0_default) * vckm_33 * & + conjg (mix_su321) * mix_sd321) + gglwsu1sd2_3_3 = (g * gs * sqrt (2.0_default) * vckm_33 * & + conjg (mix_su311) * mix_sd321) + gglwsu2sd1_3_3 = (g * gs * sqrt (2.0_default) * vckm_33 * & + conjg (mix_su321) * mix_sd311) + gglwsu1sd1_3_3_c = conjg (gglwsu1sd1_3_3) + gglwsu2sd2_3_3_c = conjg (gglwsu2sd2_3_3) + gglwsu1sd2_3_3_c = conjg (gglwsu1sd2_3_3) + gglwsu2sd1_3_3_c = conjg (gglwsu2sd1_3_3) + end subroutine model_update_alpha_s +end module parameters_mssm + Index: trunk/omega/tests/Makefile.am =================================================================== --- trunk/omega/tests/Makefile.am (revision 8274) +++ trunk/omega/tests/Makefile.am (revision 8275) @@ -1,729 +1,869 @@ # Makefile.am -- Makefile for O'Mega within and without WHIZARD ## ## Process this file with automake to produce Makefile.in ## ######################################################################## # # Copyright (C) 1999-2019 by # Wolfgang Kilian # Thorsten Ohl # Juergen Reuter # with contributions from # cf. main AUTHORS file # # WHIZARD is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # WHIZARD is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ######################################################################## SUBDIRS = UFO DIST_SUBDIRS = UFO # OMEGA_SPLIT = -target:single_function OMEGA_SPLIT = -target:split_function 10 # OMEGA_SPLIT = -target:split_module 10 # OMEGA_SPLIT = -target:split_file 10 OMEGA_QED = $(top_builddir)/omega/bin/omega_QED$(OCAML_NATIVE_EXT) OMEGA_QED_OPTS = $(OMEGA_SPLIT) -target:parameter_module parameters_QED OMEGA_QCD = $(top_builddir)/omega/bin/omega_QCD$(OCAML_NATIVE_EXT) OMEGA_QCD_OPTS = $(OMEGA_SPLIT) -target:parameter_module parameters_QCD OMEGA_SYM = $(top_builddir)/omega/bin/omega_SYM$(OCAML_NATIVE_EXT) OMEGA_SYM_OPTS = $(OMEGA_SPLIT) -target:parameter_module parameters_SYM OMEGA_SM = $(top_builddir)/omega/bin/omega_SM$(OCAML_NATIVE_EXT) OMEGA_SM_OPTS = $(OMEGA_SPLIT) -target:parameter_module parameters_SM OMEGA_SM_CKM = $(top_builddir)/omega/bin/omega_SM_CKM$(OCAML_NATIVE_EXT) OMEGA_SM_Higgs = $(top_builddir)/omega/bin/omega_SM_Higgs$(OCAML_NATIVE_EXT) OMEGA_THDM = $(top_builddir)/omega/bin/omega_THDM$(OCAML_NATIVE_EXT) OMEGA_THDM_CKM = $(top_builddir)/omega/bin/omega_THDM_CKM$(OCAML_NATIVE_EXT) OMEGA_HSExt = $(top_builddir)/omega/bin/omega_HSExt$(OCAML_NATIVE_EXT) OMEGA_Zprime = $(top_builddir)/omega/bin/omega_Zprime$(OCAML_NATIVE_EXT) OMEGA_SM_top_anom = $(top_builddir)/omega/bin/omega_SM_top_anom$(OCAML_NATIVE_EXT) OMEGA_SM_top_anom_OPTS = $(OMEGA_SPLIT) -target:parameter_module parameters_SM_top_anom OMEGA_UFO = $(top_builddir)/omega/bin/omega_UFO$(OCAML_NATIVE_EXT) OMEGA_UFO_OPTS = -target:parameter_module parameters_UFO OMEGA_XXX = $(top_builddir)/omega/bin/omega_%%%$(OCAML_NATIVE_EXT) OMEGA_XXX_OPTS = -target:parameter_module parameters_%%% OMEGA_UFO_XXX_OPTS = \ "-model:UFO_dir $(top_srcdir)/omega/tests/UFO/%%%/ -model:exec" OMEGA_QED_VM = $(top_builddir)/omega/bin/omega_QED_VM$(OCAML_NATIVE_EXT) OMEGA_QCD_VM = $(top_builddir)/omega/bin/omega_QCD_VM$(OCAML_NATIVE_EXT) OMEGA_SM_VM = $(top_builddir)/omega/bin/omega_SM_VM$(OCAML_NATIVE_EXT) OMEGA_SM_CKM_VM = $(top_builddir)/omega/bin/omega_SM_CKM_VM$(OCAML_NATIVE_EXT) OMEGA_THDM_VM = $(top_builddir)/omega/bin/omega_THDM_VM$(OCAML_NATIVE_EXT) OMEGA_THDM_CKM_VM = $(top_builddir)/omega/bin/omega_THDM_CKM_VM$(OCAML_NATIVE_EXT) OMEGA_HSExt_VM = $(top_builddir)/omega/bin/omega_HSExt_VM$(OCAML_NATIVE_EXT) OMEGA_Zprime_VM = $(top_builddir)/omega/bin/omega_Zprime_VM$(OCAML_NATIVE_EXT) OMEGA_SM_Higgs_VM = $(top_builddir)/omega/bin/omega_SM_Higgs_VM$(OCAML_NATIVE_EXT) OMEGA_XXX_VM = $(top_builddir)/omega/bin/omega_%%%_VM$(OCAML_NATIVE_EXT) OMEGA_XXX_VM_PARAMS_OPTS = -params -target:parameter_module_external \ parameters_%%% -target:wrapper_module %% -target:bytecode_file % AM_FCFLAGS = -I$(top_builddir)/omega/src AM_LDFLAGS = ######################################################################## ## Default Fortran compiler options ## OpenMP if FC_USE_OPENMP AM_FCFLAGS += $(FCFLAGS_OPENMP) AM_TESTS_ENVIRONMENT = \ export OMP_NUM_THREADS=1; endif ######################################################################## TESTS = XFAIL_TESTS = EXTRA_PROGRAMS = EXTRA_DIST = ######################################################################## include $(top_srcdir)/omega/src/Makefile.ocaml if OCAML_AVAILABLE OCAMLFLAGS += -I $(top_builddir)/omega/src OMEGA_CORE = $(top_builddir)/omega/src/omega_core.cmxa OMEGA_MODELS = $(top_builddir)/omega/src/omega_models.cmxa TESTS += omega_unit EXTRA_PROGRAMS += omega_unit omega_unit_SOURCES = omega_unit.ml omega_unit: $(OMEGA_CORE) omega_unit.cmx @if $(AM_V_P); then :; else echo " OCAMLOPT " $@; fi $(AM_V_at)$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) -o omega_unit \ unix.cmxa $(OMEGA_CORE) omega_unit.cmx omega_unit.cmx: omega_unit.ml omega_unit.cmx: $(OMEGA_CORE) endif ######################################################################## KINDS = $(top_builddir)/omega/src/kinds.lo TESTS += test_omega95 test_omega95_bispinors EXTRA_PROGRAMS += test_omega95 test_omega95_bispinors test_omega95_SOURCES = test_omega95.f90 omega_testtools.f90 test_omega95_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la test_omega95_bispinors_SOURCES = test_omega95_bispinors.f90 omega_testtools.f90 test_omega95_bispinors_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la test_omega95.o test_omega95_bispinors.o: omega_testtools.o if NOWEB_AVAILABLE test_omega95.f90: $(top_srcdir)/omega/src/omegalib.nw $(NOTANGLE) -R[[$@]] $< | $(CPIF) $@ test_omega95_bispinors.f90: $(top_srcdir)/omega/src/omegalib.nw $(NOTANGLE) -R[[$@]] $< | $(CPIF) $@ omega_testtools.f90: $(top_srcdir)/omega/src/omegalib.nw $(NOTANGLE) -R[[$@]] $< | $(CPIF) $@ endif NOWEB_AVAILABLE ######################################################################## TESTS += test_qed_eemm EXTRA_PROGRAMS += test_qed_eemm test_qed_eemm_SOURCES = test_qed_eemm.f90 parameters_QED.f90 nodist_test_qed_eemm_SOURCES = amplitude_qed_eemm.f90 test_qed_eemm_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la amplitude_qed_eemm.f90: $(OMEGA_QED) Makefile $(OMEGA_QED) $(OMEGA_QED_OPTS) -target:module amplitude_qed_eemm \ -scatter "e+ e- -> m+ m-" > $@ test_qed_eemm.o: amplitude_qed_eemm.o test_qed_eemm.o: parameters_QED.o amplitude_qed_eemm.o: parameters_QED.o ######################################################################## EXTENDED_COLOR_TESTS = \ $(srcdir)/fc_s.ects \ $(srcdir)/fc_a.ects $(srcdir)/cf_a.ects $(srcdir)/fa_f.ects \ $(srcdir)/ca_c.ects $(srcdir)/af_f.ects $(srcdir)/ac_c.ects \ $(srcdir)/aa_a.ects \ $(srcdir)/fc_fc.ects \ $(srcdir)/aa_s.ects $(srcdir)/as_a.ects $(srcdir)/sa_a.ects TESTS += ects EXTRA_PROGRAMS += ects EXTRA_DIST += ects_driver.sh $(EXTENDED_COLOR_TESTS) # Explicitly state dependence on model files ects.f90: $(OMEGA_QCD) $(OMEGA_SYM) $(OMEGA_SM) ects.f90: ects_driver.sh $(EXTENDED_COLOR_TESTS) @if $(AM_V_P); then :; else echo " ECTS_DRIVER"; fi $(AM_V_at)$(SHELL) $(srcdir)/ects_driver.sh \ $(OMEGA_XXX) $(EXTENDED_COLOR_TESTS) > $@ ects_SOURCES = color_test_lib.f90 \ parameters_SM.f90 parameters_QED.f90 parameters_QCD.f90 parameters_SYM.f90 nodist_ects_SOURCES = ects.f90 ects_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la ######################################################################## TESTS += cascade +# if there is some debugging output ... +# XFAIL_TESTS += cascade CASCADE_TESTS = \ bhabha-s-channel.cascade bhabha-t-channel.cascade bhabha-full.cascade \ ww-onlycc.cascade ww-notgc.cascade \ jjj-notgc.cascade \ vbf-noh.cascade cascade: cascade_driver.sh Makefile $(SED) -e 's|%%cascade_tests%%|$(CASCADE_TESTS)|' \ -e 's|%%srcdir%%|$(srcdir)|' \ -e 's|%%SED%%|$(SED)|' \ -e 's|%%top_builddir%%|$(top_builddir)|' \ -e 's|%%OCAML_NATIVE_EXT%%|$(OCAML_NATIVE_EXT)|' $< >$@ chmod +x $@ EXTRA_DIST += cascade_driver.sh $(CASCADE_TESTS) ######################################################################## TESTS += phase_space PHASE_SPACE_TESTS = eeee.phs qqggg.phs phase_space: phase_space_driver.sh Makefile $(SED) -e 's|%%phase_space_tests%%|$(PHASE_SPACE_TESTS)|' \ -e 's|%%srcdir%%|$(srcdir)|' \ -e 's|%%SED%%|$(SED)|' \ -e 's|%%top_builddir%%|$(top_builddir)|' \ -e 's|%%OCAML_NATIVE_EXT%%|$(OCAML_NATIVE_EXT)|' $< >$@ chmod +x $@ EXTRA_DIST += phase_space_driver.sh $(PHASE_SPACE_TESTS) ######################################################################## +TESTS += fermi +# XFAIL_TESTS += fermi + +EXTRA_PROGRAMS += fermi +EXTRA_DIST += fermi_driver.sh +EXTRA_DIST += fermi.list + +FERMI_SUPPORT_F90 = \ + omega_interface.f90 omega_testtools.f90 tao_random_numbers.f90 \ + parameters_QED.f90 parameters_QCD.f90 parameters_SYM.f90 \ + parameters_SM.f90 parameters_MSSM.f90 parameters_SM_top_anom.f90 +FERMI_SUPPORT_O = $(FERMI_SUPPORT_F90:.f90=.o) +fermi_lib.o: $(FERMI_SUPPORT_O) + +FERMI_LIB_F90 = fermi_lib.f90 $(FERMI_SUPPORT_F90) +FERMI_LIB_O = $(FERMI_LIB_F90:.f90=.o) + +run_fermi: fermi + ./fermi + +fermi.f90: fermi_driver.sh $(OMEGA_QED) $(OMEGA_QCD) $(OMEGA_SYM) +fermi.f90: $(OMEGA_SM) $(OMEGA_SM_top_anom) +fermi.f90: fermi.list + @if $(AM_V_P); then :; else echo " FERMI_DRIVER"; fi + $(AM_V_at)$(SHELL) $(srcdir)/fermi_driver.sh \ + $(OMEGA_XXX) $(OMEGA_SPLIT) < $< > $@ + +fermi_SOURCES = $(FERMI_LIB_F90) +nodist_fermi_SOURCES = fermi.f90 +fermi_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la + +fermi.o: $(FERMI_LIB_O) + +######################################################################## + TESTS += ward EXTRA_PROGRAMS += ward EXTRA_DIST += ward_driver.sh EXTRA_DIST += ward_identities.list WARD_SUPPORT_F90 = \ omega_interface.f90 omega_testtools.f90 tao_random_numbers.f90 \ parameters_QED.f90 parameters_QCD.f90 parameters_SYM.f90 \ parameters_SM.f90 parameters_SM_top_anom.f90 WARD_SUPPORT_O = $(WARD_SUPPORT_F90:.f90=.o) ward_lib.o: $(WARD_SUPPORT_O) WARD_LIB_F90 = ward_lib.f90 $(WARD_SUPPORT_F90) WARD_LIB_O = $(WARD_LIB_F90:.f90=.o) run_ward: ward ./ward ward.f90: ward_driver.sh $(OMEGA_QED) $(OMEGA_QCD) $(OMEGA_SYM) ward.f90: $(OMEGA_SM) $(OMEGA_SM_top_anom) ward.f90: ward_identities.list @if $(AM_V_P); then :; else echo " WARD_DRIVER"; fi $(AM_V_at)$(SHELL) $(srcdir)/ward_driver.sh \ $(OMEGA_XXX) $(OMEGA_SPLIT) < $< > $@ ward_SOURCES = $(WARD_LIB_F90) nodist_ward_SOURCES = ward.f90 ward_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la ward.o: $(WARD_LIB_O) ######################################################################## EXTRA_PROGRAMS += ward_long EXTRA_DIST += ward_identities_long.list run_ward_long: ward_long ./ward_long ward_long.f90: ward_driver.sh ward_long.f90: ward_identities_long.list @if $(AM_V_P); then :; else echo " WARD_DRIVER"; fi $(AM_V_at)$(SHELL) $(srcdir)/ward_driver.sh \ $(OMEGA_XXX) $(OMEGA_SPLIT) < $< > $@ ward_long_SOURCES = $(WARD_LIB_F90) nodist_ward_long_SOURCES = ward_long.f90 ward_long_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la # ward_long.o: ward_long.f90 # $(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) -O0 $< ward_long.o: $(WARD_LIB_O) ######################################################################## EXTRA_PROGRAMS += ward_fail EXTRA_DIST += ward_identities_fail.list run_ward_fail: ward_fail ./ward_fail ward_fail.f90: ward_driver.sh ward_fail.f90: ward_identities_fail.list @if $(AM_V_P); then :; else echo " WARD_DRIVER"; fi $(AM_V_at)$(SHELL) $(srcdir)/ward_driver.sh \ $(OMEGA_XXX) $(OMEGA_SPLIT) < $< > $@ ward_fail_SOURCES = $(WARD_LIB_F90) nodist_ward_fail_SOURCES = ward_fail.f90 ward_fail_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la ward_fail.o: ward_fail.f90 $(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) -O0 $< ward_fail.o: $(WARD_LIB_O) ######################################################################## TESTS += compare_split_function compare_split_module EXTRA_PROGRAMS += compare_split_function compare_split_module EXTRA_DIST += compare_driver.sh EXTRA_DIST += comparisons.list COMPARE_SUPPORT_F90 = $(WARD_SUPPORT_F90) COMPARE_SUPPORT_O = $(WARD_SUPPORT_O) compare_lib.o: $(COMPARE_SUPPORT_O) COMPARE_LIB_F90 = compare_lib.f90 $(COMPARE_SUPPORT_F90) COMPARE_LIB_O = $(COMPARE_LIB_F90:.f90=.o) run_compare: compare_split_function compare_split_module ./compare_split_function ./compare_split_module compare_split_function.f90: comparisons.list @if $(AM_V_P); then :; else echo " COMPARE_DRIVER"; fi $(AM_V_at)$(SHELL) $(srcdir)/compare_driver.sh SF \ "$(OMEGA_XXX) -target:single_function" \ "$(OMEGA_XXX) -target:split_function 10" < $< > $@ compare_split_module.f90: comparisons.list @if $(AM_V_P); then :; else echo " COMPARE_DRIVER"; fi $(AM_V_at)$(SHELL) $(srcdir)/compare_driver.sh SM \ "$(OMEGA_XXX) -target:single_function" \ "$(OMEGA_XXX) -target:split_module 10" < $< > $@ compare_split_function.f90 compare_split_module.f90: \ compare_driver.sh $(OMEGA_QCD) $(OMEGA_SM) compare_split_function_SOURCES = $(COMPARE_LIB_F90) nodist_compare_split_function_SOURCES = compare_split_function.f90 compare_split_function_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la compare_split_module_SOURCES = $(COMPARE_LIB_F90) nodist_compare_split_module_SOURCES = compare_split_module.f90 compare_split_module_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la compare_split_function.o compare_split_module.o: $(COMPARE_LIB_O) ######################################################################## # At quadruple or extended precision, these tests take waaaaaayyyy too long! if FC_PREC else TESTS += compare_amplitude_UFO # XFAIL_TESTS += compare_amplitude_UFO EXTRA_PROGRAMS += compare_amplitude_UFO EXTRA_DIST += compare_driver_UFO.sh EXTRA_DIST += comparisons_UFO.list compare_amplitude_UFO_SOURCES = \ parameters_SM_from_UFO.f90 compare_lib.f90 \ omega_interface.f90 omega_testtools.f90 tao_random_numbers.f90 compare_amplitude_UFO.f90: comparisons_UFO.list compare_driver_UFO.sh $(OMEGA_UFO) @if $(AM_V_P); then :; else echo " COMPARE_DRIVER_UFO"; fi $(AM_V_at)$(SHELL) $(srcdir)/compare_driver_UFO.sh UFO \ "$(OMEGA_XXX) -model:constant_width" \ "$(OMEGA_UFO) -model:UFO_dir $(top_srcdir)/omega/tests/UFO/%%%/ -model:exec" \ < $< > $@ # -model:long_flavors parameters_SM_UFO.f90: $(OMEGA_UFO) $(OMEGA_UFO) \ -model:UFO_dir $(top_srcdir)/omega/tests/UFO/SM/ -model:exec \ -target:parameter_module parameters_sm_ufo -params > $@ nodist_compare_amplitude_UFO_SOURCES = \ compare_amplitude_UFO.f90 parameters_SM_UFO.f90 compare_amplitude_UFO_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la parameters_SM_from_UFO.o: parameters_SM_UFO.o compare_amplitude_UFO.o: parameters_SM_UFO.o parameters_SM_from_UFO.o compare_amplitude_UFO.o: $(COMPARE_LIB_O) endif ######################################################################## # At quadruple or extended precision, these tests take waaaaaayyyy too long! if FC_PREC else +TESTS += fermi_UFO +# XFAIL_TESTS += fermi_UFO + +# We need more work on the parameters to pass the tests +# at quadruple or extended precision. +if FC_PREC +XFAIL_TESTS += fermi_UFO +endif + +EXTRA_PROGRAMS += fermi_UFO +EXTRA_DIST += fermi_driver_UFO.sh +EXTRA_DIST += fermi_UFO.list + +FERMI_UFO_SUPPORT_F90 = \ + omega_interface.f90 omega_testtools.f90 tao_random_numbers.f90 + +FERMI_UFO_SUPPORT_O = $(FERMI_UFO_SUPPORT_F90:.f90=.o) +fermi_UFO_lib.o: $(FERMI_SUPPORT_O) + +FERMI_UFO_LIB_F90 = fermi_lib.f90 $(FERMI_UFO_SUPPORT_F90) +FERMI_UFO_LIB_O = $(FERMI_UFO_LIB_F90:.f90=.o) + +run_fermi_UFO: fermi_UFO + ./fermi_UFO + +fermi_UFO.f90: fermi_UFO.list fermi_driver_UFO.sh $(OMEGA_UFO) + @if $(AM_V_P); then :; else echo " FERMI_UFO_DRIVER"; fi + $(AM_V_at)$(SHELL) $(srcdir)/fermi_driver_UFO.sh \ + $(OMEGA_UFO) -model:UFO_dir $(top_srcdir)/omega/tests/UFO/SM/ \ + $(OMEGA_SPLIT) < $< > $@ + +fermi_UFO_SOURCES = $(FERMI_UFO_LIB_F90) +nodist_fermi_UFO_SOURCES = fermi_UFO.f90 parameters_SM_UFO.f90 +fermi_UFO_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la + +fermi_UFO.o: $(FERMI_UFO_LIB_O) + +endif + +######################################################################## + +# At quadruple or extended precision, these tests take waaaaaayyyy too long! +if FC_PREC +else + TESTS += ward_UFO # We need more work on the parameters to pass the tests # at quadruple or extended precision. if FC_PREC XFAIL_TESTS += ward_UFO endif EXTRA_PROGRAMS += ward_UFO EXTRA_DIST += ward_driver_UFO.sh EXTRA_DIST += ward_identities_UFO.list WARD_UFO_SUPPORT_F90 = \ omega_interface.f90 omega_testtools.f90 tao_random_numbers.f90 WARD_UFO_SUPPORT_O = $(WARD_UFO_SUPPORT_F90:.f90=.o) ward_UFO_lib.o: $(WARD_SUPPORT_O) WARD_UFO_LIB_F90 = ward_lib.f90 $(WARD_UFO_SUPPORT_F90) WARD_UFO_LIB_O = $(WARD_UFO_LIB_F90:.f90=.o) run_ward_UFO: ward_UFO ./ward_UFO ward_UFO.f90: ward_identities_UFO.list ward_driver_UFO.sh $(OMEGA_UFO) @if $(AM_V_P); then :; else echo " WARD_UFO_DRIVER"; fi $(AM_V_at)$(SHELL) $(srcdir)/ward_driver_UFO.sh \ $(OMEGA_UFO) -model:UFO_dir $(top_srcdir)/omega/tests/UFO/SM/ \ $(OMEGA_SPLIT) < $< > $@ ward_UFO_SOURCES = $(WARD_UFO_LIB_F90) nodist_ward_UFO_SOURCES = ward_UFO.f90 parameters_SM_UFO.f90 ward_UFO_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la ward_UFO.o: $(WARD_UFO_LIB_O) endif ######################################################################## TESTS += compare_amplitude_VM EXTRA_PROGRAMS += compare_amplitude_VM EXTRA_DIST += compare_driver_VM.sh compare_driver_VM_wrappers.sh EXTRA_DIST += comparisons_VM.list compare_amplitude_VM.f90: comparisons_VM.list comparisons_VM.wrappers.o @if $(AM_V_P); then :; else echo " COMPARE_DRIVER_VM"; fi $(AM_V_at)$(SHELL) $(srcdir)/compare_driver_VM.sh \ "$(OMEGA_XXX) " "$(OMEGA_XXX_VM) " "$(OMEGA_XXX_VM_PARAMS_OPTS)" < $< > $@ comparisons_VM.wrappers.f90: comparisons_VM.list @if $(AM_V_P); then :; else echo " COMPARE_DRIVER_VM_WRAPPERS"; fi $(AM_V_at)$(SHELL) $(srcdir)/compare_driver_VM_wrappers.sh \ "$(OMEGA_XXX) " "$(OMEGA_XXX_VM) " "$(OMEGA_XXX_VM_PARAMS_OPTS)" < $< > $@ # Explicitly state dependence on model files compare_amplitude_VM.f90: compare_driver_VM.sh \ $(OMEGA_QED) $(OMEGA_QED_VM) \ $(OMEGA_QCD) $(OMEGA_QCD_VM) \ $(OMEGA_SM) $(OMEGA_SM_VM) \ $(OMEGA_SM_CKM) $(OMEGA_SM_CKM_VM) \ $(OMEGA_SM_Higgs) $(OMEGA_SM_Higgs_VM) \ $(OMEGA_THDM) $(OMEGA_THDM_VM) \ $(OMEGA_THDM_CKM) $(OMEGA_THDM_CKM_VM) \ $(OMEGA_HSExt) $(OMEGA_HSExt_VM) \ $(OMEGA_Zprime) $(OMEGA_Zprime_VM) COMPARE_EXTRA_MODELS = parameters_SM_CKM.f90 parameters_SM_Higgs.f90 \ parameters_THDM.f90 parameters_THDM_CKM.f90 parameters_HSExt.f90 \ parameters_Zprime.f90 compare_amplitude_VM_SOURCES = $(COMPARE_LIB_F90) $(COMPARE_EXTRA_MODELS) nodist_compare_amplitude_VM_SOURCES = compare_amplitude_VM.f90 comparisons_VM.wrappers.f90 compare_amplitude_VM_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la compare_amplitude_VM.o: $(COMPARE_LIB_O) ######################################################################## if FC_USE_OPENMP TESTS += test_openmp EXTRA_PROGRAMS += test_openmp TESTOPENMP_SUPPORT_F90 = $(WARD_SUPPORT_F90) TESTOPENMP_SUPPORT_O = $(WARD_SUPPORT_O) test_openmp_SOURCES = test_openmp.f90 $(TESTOPENMP_SUPPORT_F90) nodist_test_openmp_SOURCES = amplitude_openmp.f90 test_openmp_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la amplitude_openmp.f90: $(OMEGA_QCD) Makefile $(OMEGA_QCD) $(OMEGA_QCD_OPTS) -target:openmp \ -target:module amplitude_openmp -scatter "gl gl -> gl gl gl" > $@ test_openmp.o: amplitude_openmp.o test_openmp.o: $(TESTOPENMP_SUPPORT_O) amplitude_openmp.o: parameters_QCD.o endif ######################################################################## EXTRA_PROGRAMS += benchmark_VM_vs_Fortran EXTRA_DIST += benchmark_VM_vs_Fortran_driver.sh BENCHMARK_LIB_F90 = benchmark_lib.f90 $(WARD_SUPPORT_F90) BENCHMARK_LIB_O = $(BENCHMARK_LIB_F90:.f90=.o) benchmark_VM_vs_Fortran.f90: benchmark_processes.list benchmark_processes.wrappers.o @if $(AM_V_P); then :; else echo " BENCHMARK_VM_DRIVER"; fi $(AM_V_at)$(SHELL) $(srcdir)/benchmark_VM_vs_Fortran_driver.sh \ "$(OMEGA_XXX) " "$(OMEGA_XXX_VM) " "$(OMEGA_XXX_VM_PARAMS_OPTS)" < $< > $@ benchmark_processes.wrappers.f90: benchmark_processes.list @if $(AM_V_P); then :; else echo " BENCHMARK_DRIVER_WRAPPERS"; fi $(AM_V_at)$(SHELL) $(srcdir)/benchmark_driver_wrappers.sh \ "$(OMEGA_XXX) " "$(OMEGA_XXX_VM) " "$(OMEGA_XXX_VM_PARAMS_OPTS)" < $< > $@ # Explicitly state dependence on model files benchmark_VM_vs_Fortran.f90: benchmark_VM_vs_Fortran_driver.sh \ $(OMEGA_QED) $(OMEGA_QED_VM) \ $(OMEGA_QCD) $(OMEGA_QCD_VM) \ $(OMEGA_SM) $(OMEGA_SM_VM) benchmark_VM_vs_Fortran_SOURCES = $(BENCHMARK_LIB_F90) nodist_benchmark_VM_vs_Fortran_SOURCES = benchmark_VM_vs_Fortran.f90 benchmark_processes.wrappers.f90 benchmark_VM_vs_Fortran_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la benchmark_VM_vs_Fortran.o: $(BENCHMARK_LIB_O) ######################################################################## if FC_USE_OPENMP EXTRA_PROGRAMS += benchmark_amp_parallel benchmark_amp_parallel.f90: benchmark_processes.list benchmark_processes.wrappers.o @if $(AM_V_P); then :; else echo " BENCHMARK_PARALLEL_DRIVER"; fi $(AM_V_at)$(SHELL) $(srcdir)/benchmark_amp_parallel_driver.sh \ "$(OMEGA_XXX) " "$(OMEGA_XXX_VM) " "$(OMEGA_XXX_VM_PARAMS_OPTS)" < $< > $@ # Explicitly state dependence on model files benchmark_amp_parallel.f90: benchmark_amp_parallel_driver.sh \ $(OMEGA_QED) $(OMEGA_QED_VM) \ $(OMEGA_QCD) $(OMEGA_QCD_VM) \ $(OMEGA_SM) $(OMEGA_SM_VM) benchmark_amp_parallel_SOURCES = $(BENCHMARK_LIB_F90) nodist_benchmark_amp_parallel_SOURCES = benchmark_amp_parallel.f90 benchmark_processes.wrappers.f90 benchmark_amp_parallel_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la benchmark_amp_parallel.o: $(BENCHMARK_LIB_O) endif ######################################################################## EXTRA_PROGRAMS += benchmark run_benchmark: benchmark ./benchmark BENCHMARK_PROCESS = -scatter "gl gl -> gl gl gl" BENCHMARK_SPLIT_SIZE = 10 benchmark_SOURCES = benchmark.f90 parameters_QCD.f90 nodist_benchmark_SOURCES = \ amplitude_benchmark_v1.f90 amplitude_benchmark_v2.f90 \ amplitude_benchmark_v3.f90 # amplitude_benchmark_v4.f90 benchmark_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la amplitude_benchmark_v1.f90: $(OMEGA_QCD) Makefile $(OMEGA_QCD) $(OMEGA_QCD_OPTS) -target:module amplitude_benchmark_v1 \ $(BENCHMARK_PROCESS) -target:single_function > $@ amplitude_benchmark_v2.f90: $(OMEGA_QCD) Makefile $(OMEGA_QCD) $(OMEGA_QCD_OPTS) -target:module amplitude_benchmark_v2 \ $(BENCHMARK_PROCESS) -target:split_function $(BENCHMARK_SPLIT_SIZE) > $@ amplitude_benchmark_v3.f90: $(OMEGA_QCD) Makefile $(OMEGA_QCD) $(OMEGA_QCD_OPTS) -target:module amplitude_benchmark_v3 \ $(BENCHMARK_PROCESS) -target:split_module $(BENCHMARK_SPLIT_SIZE) > $@ amplitude_benchmark_v4.f90: $(OMEGA_QCD) Makefile $(OMEGA_QCD) $(OMEGA_QCD_OPTS) -target:module amplitude_benchmark_v4 \ $(BENCHMARK_PROCESS) -target:split_file $(BENCHMARK_SPLIT_SIZE) > $@ benchmark.o: \ amplitude_benchmark_v1.o amplitude_benchmark_v2.o \ amplitude_benchmark_v3.o # amplitude_benchmark_v4.o benchmark.o: parameters_QCD.o amplitude_benchmark_v1.o amplitude_benchmark_v2.o \ amplitude_benchmark_v3.o amplitude_benchmark_v4.o: parameters_QCD.o ######################################################################## if OCAML_AVAILABLE TESTS += vertex_unit EXTRA_PROGRAMS += vertex_unit vertex_unit_SOURCES = vertex_unit.ml vertex_unit: $(OMEGA_CORE) vertex_unit.cmx @if $(AM_V_P); then :; else echo " OCAMLOPT " $@; fi $(AM_V_at)$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) -o vertex_unit \ unix.cmxa $(OMEGA_CORE) $(OMEGA_MODELS) vertex_unit.cmx vertex_unit.cmx: vertex_unit.ml vertex_unit.cmx: $(OMEGA_CORE) $(OMEGA_MODELS) endif ######################################################################## if OCAML_AVAILABLE TESTS += ufo_unit EXTRA_PROGRAMS += ufo_unit ufo_unit_SOURCES = ufo_unit.ml ufo_unit: $(OMEGA_CORE) ufo_unit.cmx @if $(AM_V_P); then :; else echo " OCAMLOPT " $@; fi $(AM_V_at)$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) -o ufo_unit \ unix.cmxa $(OMEGA_CORE) $(OMEGA_MODELS) ufo_unit.cmx ufo_unit.cmx: ufo_unit.ml ufo_unit.cmx: $(OMEGA_CORE) $(OMEGA_MODELS) endif ######################################################################## +if OCAML_AVAILABLE + +TESTS += keystones_omegalib keystones_UFO +# XFAIL_TESTS += keystones_UFO + +EXTRA_PROGRAMS += keystones_omegalib keystones_UFO + +keystones_omegalib_SOURCES = omega_testtools.f90 keystones_tools.f90 +nodist_keystones_omegalib_SOURCES = keystones_omegalib.f90 +keystones_omegalib_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la + +keystones_UFO_SOURCES = omega_testtools.f90 keystones_tools.f90 +nodist_keystones_UFO_SOURCES = keystones_UFO.f90 +keystones_UFO_LDADD = $(KINDS) $(top_builddir)/omega/src/libomega_core.la + +EXTRA_PROGRAMS += keystones_omegalib_generate keystones_UFO_generate +keystones_omegalib_generate_SOURCES = \ + keystones.ml keystones.mli keystones_omegalib_generate.ml +keystones_UFO_generate_SOURCES = \ + keystones.ml keystones.mli keystones_UFO_generate.ml + +keystones_omegalib.f90: keystones_omegalib_generate + ./keystones_omegalib_generate -cat > $@ + +keystones_UFO.f90: keystones_UFO_generate + ./keystones_UFO_generate -cat > $@ + +keystones_omegalib_generate: $(OMEGA_CORE) keystones_omegalib_generate.cmx + @if $(AM_V_P); then :; else echo " OCAMLOPT " $@; fi + $(AM_V_at)$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) \ + -o keystones_omegalib_generate \ + unix.cmxa $(OMEGA_CORE) $(OMEGA_MODELS) \ + keystones.cmx keystones_omegalib_generate.cmx + +keystones_UFO_generate: $(OMEGA_CORE) keystones_UFO_generate.cmx + @if $(AM_V_P); then :; else echo " OCAMLOPT " $@; fi + $(AM_V_at)$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) \ + -o keystones_UFO_generate \ + unix.cmxa $(OMEGA_CORE) $(OMEGA_MODELS) \ + keystones.cmx keystones_UFO_generate.cmx + +keystones_omegalib_generate.cmx: \ + keystones.cmi keystones.cmx keystones_omegalib_generate.ml +keystones_omegalib_generate.cmx: $(OMEGA_CORE) $(OMEGA_MODELS) + +keystones_UFO_generate.cmx: \ + keystones.cmi keystones.cmx keystones_UFO_generate.ml +keystones_UFO_generate.cmx: $(OMEGA_CORE) $(OMEGA_MODELS) + +keystones.cmx: keystones.ml keystones.cmi +keystones.cmx: $(OMEGA_CORE) $(OMEGA_MODELS) +keystones.cmi: keystones.mli + +endif + +######################################################################## + if RECOLA_AVAILABLE TESTS += compare_amplitude_recola # We need more work on the parameters to pass the tests # at quadruple or extended precision if FC_PREC XFAIL_TESTS += compare_amplitude_recola endif EXTRA_PROGRAMS += compare_amplitude_recola AM_FCFLAGS += $(RECOLA_INCLUDES) compare_amplitude_recola_SOURCES = \ parameters_SM_Higgs_recola.f90 \ omega_interface.f90 compare_lib.f90 compare_lib_recola.f90 \ omega_testtools.f90 tao_random_numbers.f90 nodist_compare_amplitude_recola_SOURCES = compare_amplitude_recola.f90 compare_amplitude_recola.f90: comparisons_recola.list compare_driver_recola.sh @if $(AM_V_P); then :; else echo " COMPARE_DRIVER_RECOLA"; fi $(AM_V_at)$(SHELL) $(srcdir)/compare_driver_recola.sh \ "$(OMEGA_XXX) -model:constant_width" < $< > $@ compare_amplitude_recola.o: \ omega_testtools.f90 compare_lib.o compare_lib_recola.o \ tao_random_numbers.o \ parameters_SM_Higgs_recola.o compare_lib_recola.o: \ omega_testtools.f90 compare_lib.o tao_random_numbers.o \ parameters_SM_Higgs_recola.o compare_amplitude_recola_LDADD = \ $(LDFLAGS_RECOLA) \ $(KINDS) $(top_builddir)/omega/src/libomega_core.la run_compare_recola: compare_amplitude_recola ./compare_amplitude_recola endif ######################################################################## installcheck-local: PATH=$(DESTDIR)$(bindir):$$PATH; export PATH; \ LD_LIBRARY_PATH=$(DESTDIR)$(libdir):$(DESTDIR)$(pkglibdir):$$LD_LIBRARY_PATH; \ export LD_LIBRARY_PATH; \ omega_QED.opt $(OMEGA_QED_OPTS) -scatter "e+ e- -> m+ m-" \ -target:module amplitude_qed_eemm > amplitude_qed_eemm.f90; \ $(FC) $(AM_FCFLAGS) $(FCFLAGS) -I$(pkgincludedir) \ -L$(DESTDIR)$(libdir) -L$(DESTDIR)$(pkglibdir) \ $(srcdir)/parameters_QED.f90 amplitude_qed_eemm.f90 \ $(srcdir)/test_qed_eemm.f90 -lomega_core; \ ./a.out ######################################################################## ### Remove DWARF debug information on MAC OS X clean-macosx: -rm -rf a.out.dSYM -rm -rf compare_amplitude_UFO.dSYM -rm -rf compare_amplitude_VM.dSYM -rm -rf compare_split_function.dSYM -rm -rf compare_split_module.dSYM -rm -rf ects.dSYM -rm -rf test_omega95.dSYM -rm -rf test_omega95_bispinors.dSYM -rm -rf test_qed_eemm.dSYM -rm -rf ward.dSYM .PHONY: clean-macosx clean-local: clean-macosx rm -f a.out gmon.out *.$(FC_MODULE_EXT) \ *.o *.cmi *.cmo *.cmx amplitude_*.f90 \ - $(EXTRA_PROGRAMS) ects.f90 ward.f90 ward_UFO.f90 compare_*.f90 \ + $(EXTRA_PROGRAMS) ects.f90 ward.f90 ward_UFO.f90 \ + fermi.f90 fermi_UFO.f90 compare_*.f90 \ parameters_SM_UFO.f90 keystones_omegalib.f90 keystones_UFO.f90 \ omega_testtools.f90 test_omega95*.f90 benchmark*.f90 \ *.hbc *wrappers.f90 cascade phase_space \ output.rcl recola.log rm -fr output_cll if FC_SUBMODULES -rm -f *.smod endif ######################################################################## ## The End. ######################################################################## Index: trunk/omega/tests/keystones_UFO_generate.ml =================================================================== --- trunk/omega/tests/keystones_UFO_generate.ml (revision 8274) +++ trunk/omega/tests/keystones_UFO_generate.ml (revision 8275) @@ -1,297 +1,339 @@ (* keystones_UFO_generate.ml -- Copyright (C) 2019-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) open Coupling open Keystones open Format_Fortran type ufo_vertex = { ufo_tag : string; spins : lorentz array; tensor : UFOx.Lorentz.t } module P = Permutation.Default let permute_spins p s = P.array p s (* We must permute only the free indices, of course. Note that we apply the \emph{inverse} permutation to the indices in order to match the permutation of the particles/spins. *) let permute_structure n p l = let permuted = P.array (P.inverse p) (Array.init n succ) in let permute_index i = if i > 0 then permuted.(pred i) else i in UFOx.Lorentz.map_indices permute_index l let permute_vertex n v p = { ufo_tag = v.ufo_tag ^ "_p" ^ P.to_string p; spins = permute_spins p v.spins; tensor = permute_structure n p v.tensor } let vertex_permutations v = let n = Array.length v.spins in List.map (permute_vertex n v) (P.cyclic n) let keystones_of_ufo_vertex { ufo_tag; spins } = { tag = ufo_tag; keystones = let fields = Array.mapi (fun i s -> (s, i)) spins in let n = Array.length fields in List.map (fun p -> let permuted = P.array p fields in match Array.to_list permuted with | [] -> invalid_arg "keystones_of_ufo_vertex" | ket :: args -> { ket = ket; name = ufo_tag ^ "_p" ^ P.to_string p; args = G (0) :: (ThoList.flatmap (fun (s, i) -> [ F (s, i); P (i) ]) args) }) (P.cyclic n) } let merge (ufo_list, omegalib) = match ufo_list with | [] -> omegalib | ufo1 :: _ -> { tag = ufo1.ufo_tag; keystones = (ThoList.flatmap (fun ufo -> (keystones_of_ufo_vertex ufo).keystones) ufo_list) @ omegalib.keystones } let fusions ff module_name vertices = let printf fmt = fprintf ff fmt and nl () = pp_newline ff () in printf "module %s" module_name; nl (); printf " use kinds"; nl (); printf " use omega95"; nl (); printf " implicit none"; nl (); printf " ! private"; nl (); UFO_targets.Fortran.eps4_g4_g44_decl std_formatter (); UFO_targets.Fortran.eps4_g4_g44_init std_formatter (); printf "contains"; nl (); List.iter (fun v -> List.iter (fun v' -> + let tensor = UFO_Lorentz.parse (Array.to_list v'.spins) v'.tensor in printf " ! %s" (String.make 68 '='); nl (); - printf " ! %s" (UFOx.Lorentz.to_string v'.tensor); nl (); + printf " ! %s" (UFO_Lorentz.to_string tensor); nl (); UFO_targets.Fortran.lorentz - std_formatter v'.ufo_tag v'.spins v'.tensor) + std_formatter v'.ufo_tag v'.spins tensor) (vertex_permutations v)) vertices; printf "end module %s" module_name; nl () let generate ?reps ?threshold module_name vertices = fusions std_formatter module_name (ThoList.flatmap fst vertices); Keystones.generate ?reps ?threshold ~modules:[module_name] (List.map merge vertices) let equivalent_tensors spins alternatives = List.map (fun (ufo_tag, tensor) -> { ufo_tag; spins; tensor = UFOx.Lorentz.of_string tensor }) alternatives let qed = equivalent_tensors [| ConjSpinor; Vector; Spinor |] [ ("qed", "Gamma(2,1,3)") ] let axial = equivalent_tensors [| ConjSpinor; Vector; Spinor |] [ ("axial1", "Gamma5(1,-1)*Gamma(2,-1,3)"); ("axial2", "-Gamma(2,1,-3)*Gamma5(-3,3)") ] let left = equivalent_tensors [| ConjSpinor; Vector; Spinor |] [ ("left1", "(Identity(1,-1)+Gamma5(1,-1))*Gamma(2,-1,3)"); ("left2", "2*ProjP(1,-1)*Gamma(2,-1,3)"); ("left3", "Gamma(2,1,-3)*(Identity(-3,3)-Gamma5(-3,3))"); ("left4", "2*Gamma(2,1,-3)*ProjM(-3,3)") ] let right = equivalent_tensors [| ConjSpinor; Vector; Spinor |] [ ("right1", "(Identity(1,-1)-Gamma5(1,-1))*Gamma(2,-1,3)"); ("right2", "2*ProjM(1,-1)*Gamma(2,-1,3)"); ("right3", "Gamma(2,1,-3)*(Identity(-3,3)+Gamma5(-3,3))"); ("right4", "2*Gamma(2,1,-3)*ProjP(-3,3)") ] let vector_spinor_current tag = { tag = Printf.sprintf "vector_spinor_current__%s_ff" tag; keystones = [ { ket = (ConjSpinor, 0); name = Printf.sprintf "f_%sf" tag; args = [G (0); F (Vector, 1); F (Spinor, 2)] }; { ket = (Vector, 1); name = Printf.sprintf "%s_ff" tag; args = [G (0); F (ConjSpinor, 0); F (Spinor, 2)] }; { ket = (Spinor, 2); name = Printf.sprintf "f_f%s" tag; args = [G (0); F (ConjSpinor, 0); F (Vector, 1)] } ] } let fermi_ss = equivalent_tensors [| ConjSpinor; Spinor; ConjSpinor; Spinor |] [ ("fermi_ss", "Identity(1,2)*Identity(3,4)"); ("fermi_ss_f", " (1/4) * Identity(1,4)*Identity(3,2)" ^ " + (1/4) * Gamma(-1,1,4)*Gamma(-1,3,2)" ^ " + (1/8) * Sigma(-1,-2,1,4)*Sigma(-1,-2,3,2)" ^ " - (1/4) * Gamma(-1,1,-4)*Gamma5(-4,4)*Gamma(-1,3,-2)*Gamma5(-2,2)" ^ " + (1/4) * Gamma5(1,4)*Gamma5(3,2)") ] let fermi_vv = equivalent_tensors [| ConjSpinor; Spinor; ConjSpinor; Spinor |] [ ("fermi_vv", "Gamma(-1,1,2)*Gamma(-1,3,4)"); ("fermi_vv_f", " Identity(1,4)*Identity(3,2)" ^ " - (1/2) * Gamma(-1,1,4)*Gamma(-1,3,2)" ^ " - (1/2) * Gamma(-1,1,-4)*Gamma5(-4,4)*Gamma(-1,3,-2)*Gamma5(-2,2)" ^ " - Gamma5(1,4)*Gamma5(3,2)") ] let fermi_tt = equivalent_tensors [| ConjSpinor; Spinor; ConjSpinor; Spinor |] [ ("fermi_tt1", " Sigma(-1,-2,1,2)*Sigma(-1,-2,3,4)"); ("fermi_tt2", " - Sigma(-1,-2,1,2)*Sigma(-2,-1,3,4)"); ("fermi_tt3", " - Sigma(-2,-1,1,2)*Sigma(-1,-2,3,4)"); ("fermi_tt_f", " 3 * Identity(1,4)*Identity(3,2)" ^ " - (1/2) * Sigma(-1,-2,1,4)*Sigma(-1,-2,3,2)" ^ " + 3 * Gamma5(1,4)*Gamma5(3,2)") ] let fermi_aa = equivalent_tensors [| ConjSpinor; Spinor; ConjSpinor; Spinor |] [ ("fermi_aa", "Gamma5(1,-2)*Gamma(-1,-2,2)*Gamma5(3,-3)*Gamma(-1,-3,4)"); ("fermi_aa_f", " - Identity(1,4)*Identity(3,2)" ^ " - (1/2) * Gamma(-1,1,4)*Gamma(-1,3,2)" ^ " - (1/2) * Gamma(-1,1,-4)*Gamma5(-4,4)*Gamma(-1,3,-2)*Gamma5(-2,2)" ^ " + Gamma5(1,4)*Gamma5(3,2)") ] let fermi_pp = equivalent_tensors [| ConjSpinor; Spinor; ConjSpinor; Spinor |] [ ("fermi_pp", "Gamma5(1,2)*Gamma5(3,4)"); ("fermi_pp_f", " (1/4) * Identity(1,4)*Identity(3,2)" ^ " - (1/4) * Gamma(-1,1,4)*Gamma(-1,3,2)" ^ " + (1/8) * Sigma(-1,-2,1,4)*Sigma(-1,-2,3,2)" ^ " + (1/4) * Gamma(-1,1,-4)*Gamma5(-4,4)*Gamma(-1,3,-2)*Gamma5(-2,2)" ^ " + (1/4) * Gamma5(1,4)*Gamma5(3,2)") ] let fermi_ll = equivalent_tensors [| ConjSpinor; Spinor; ConjSpinor; Spinor |] [ ("fermi_ll", " Gamma(-1,1,-2)*ProjM(-2,2)*Gamma(-1,3,-4)*ProjM(-4,4)"); ("fermi_ll_f", " - Gamma(-1,1,-2)*ProjM(-2,4)*Gamma(-1,3,-4)*ProjM(-4,2)") ] let fermi_va = equivalent_tensors [| ConjSpinor; Spinor; ConjSpinor; Spinor |] [ ("fermi_va", "Gamma(-1,1,2)*Gamma5(3,-3)*Gamma(-1,-3,4)") ] let fermi_av = equivalent_tensors [| ConjSpinor; Spinor; ConjSpinor; Spinor |] [ ("fermi_av", "Gamma5(1,-2)*Gamma(-1,-2,2)*Gamma(-1,3,4)") ] let sqed = equivalent_tensors [| Scalar; Vector; Scalar |] [ ("sqed1", "P(2,3)-P(2,1)"); ("sqed2", "2*P(2,3)+P(2,2)"); ("sqed3", "-P(2,2)-2*P(2,1)") ] let vector_scalar_current = { tag = "vector_scalar_current__v_ss"; keystones = [ { ket = (Vector, 1); name = "v_ss"; args = [G (0); F (Scalar, 2); P (2); F (Scalar, 0); P (0)] }; { ket = (Scalar, 0); name = "s_vs"; args = [G (0); F (Vector, 1); P (1); F (Scalar, 2); P (2)] } ] } let svv_t = equivalent_tensors [| Scalar; Vector; Vector |] [ ("svv_t", "P(-1,2)*P(-1,3)*Metric(2,3)-P(2,3)*P(3,2)") ] let scalar_vector_current tag = { tag = Printf.sprintf "transversal_vector_current__s_vv_%s" tag; keystones = [ { ket = (Scalar, 0); name = Printf.sprintf "s_vv_%s" tag; args = [G (0); F (Vector, 1); P (1); F (Vector, 2); P (2)] }; { ket = (Vector, 1); name = Printf.sprintf "v_sv_%s" tag; args = [G (0); F (Scalar, 0); P (0); F (Vector, 2); P (2)] } ] } let gauge = equivalent_tensors [| Vector; Vector; Vector |] [ ("gauge", " Metric(1,2)*P(3,1) - Metric(1,2)*P(3,2) \ + Metric(3,1)*P(2,3) - Metric(3,1)*P(2,1) \ + Metric(2,3)*P(1,2) - Metric(2,3)*P(1,3)") ] let gauge_omega = { tag = "g_gg"; keystones = [ { ket = (Vector, 0); name = "(0,1)*g_gg"; args = [G (0); F (Vector, 1); P (1); F (Vector, 2); P (2)] } ] } +(* Note that $C^{-1}=-C$ for the charge conjugation matrix.*) +let charge_conjugate_s = + equivalent_tensors + [| Scalar; ConjSpinor; Spinor |] + [ ("gamma1", "Identity(2,3)"); + ("gamma1_cc", "C(3,-3)*Identity(-3,-2)*(-C(-2,2))"); + ("gamma1_cx", "C(3,-1)*(-C(-1,2))") ] + +(* $C \gamma_5 C^{-1} = \gamma_5^T$ *) +let charge_conjugate_p = + equivalent_tensors + [| Scalar; ConjSpinor; Spinor |] + [ ("gamma5", "Gamma5(2,3)"); + ("gamma5_cc", "C(3,-3)*Gamma5(-3,-2)*(-C(-2,2))") ] + +(* $C \gamma_\mu C^{-1} = - \gamma_\mu^T$ *) +let charge_conjugate_v = + equivalent_tensors + [| Vector; ConjSpinor; Spinor |] + [ ("gamma_mu", "Gamma(1,2,3)"); + ("gamma_mu_cc", "-C(3,-3)*Gamma(1,-3,-2)*(-C(-2,2))") ] + +(* $C \gamma_5\gamma_\mu C^{-1} = (\gamma_5\gamma_\mu)^T$ *) +let charge_conjugate_a = + equivalent_tensors + [| Vector; ConjSpinor; Spinor |] + [ ("gamma_5mu", "Gamma5(2,-2)*Gamma(1,-2,3)"); + ("gamma_5mu_cc", "C(3,-3)*Gamma5(-3,-1)*Gamma(1,-1,-2)*(-C(-2,2))") ] + +(* $C \sigma_{\mu\nu} C^{-1} = - \sigma_{\mu\nu}^T$ *) +let charge_conjugate_t = + equivalent_tensors + [| Vector; Vector; ConjSpinor; Spinor |] + [ ("sigma_munu", "Sigma(1,2,3,4)"); + ("sigma_munu_cc", "-C(4,-4)*Sigma(1,2,-4,-3)*(-C(-3,3))") ] + let empty = { tag = "empty"; keystones = [ ] } let vertices = [ (qed, vector_spinor_current "v"); (axial, vector_spinor_current "a"); (left, vector_spinor_current "vl"); (right, vector_spinor_current "vr"); (sqed, vector_scalar_current); (fermi_ss, empty); (fermi_vv, empty); (fermi_tt, empty); (fermi_aa, empty); (fermi_pp, empty); (fermi_ll, empty); (fermi_va, empty); (fermi_av, empty); (svv_t, scalar_vector_current "t"); - (gauge, gauge_omega) ] + (gauge, gauge_omega); + (charge_conjugate_s, empty); + (charge_conjugate_p, empty); + (charge_conjugate_v, empty); + (charge_conjugate_a, empty); + (charge_conjugate_t, empty) ] let _ = generate ~reps:10000 ~threshold:0.70 "fusions" vertices; exit 0 Index: trunk/omega/tests/fermi_lib.f90 =================================================================== --- trunk/omega/tests/fermi_lib.f90 (revision 0) +++ trunk/omega/tests/fermi_lib.f90 (revision 8275) @@ -0,0 +1,296 @@ +! fermi_lib.f90 -- check On Shell Ward Identities in O'Mega +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! +! Copyright (C) 1999-2019 by +! Wolfgang Kilian +! Thorsten Ohl +! Juergen Reuter +! Christian Speckner +! +! WHIZARD is free software; you can redistribute it and/or modify it +! under the terms of the GNU General Public License as published by +! the Free Software Foundation; either version 2, or (at your option) +! any later version. +! +! WHIZARD is distributed in the hope that it will be useful, but +! WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU General Public License for more details. +! +! You should have received a copy of the GNU General Public License +! along with this program; if not, write to the Free Software +! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +module fermi_lib + ! use ieee_arithmetic + use kinds + use constants + use tao_random_numbers + use omega95 + use omega_interface + use omega_testtools + implicit none + private + public :: check +contains + + elemental function ieee_is_nan (x) result (yorn) + logical :: yorn + real (kind=default), intent(in) :: x + yorn = (x /= x) + end function ieee_is_nan + + subroutine check (process, i, j, eps, roots, threshold, abs_threshold, & + n, failures, attempts, seed) + type(omega_procedures), intent(in) :: process + integer, intent(in) :: i, j, eps + real(kind=default), intent(in) :: roots, threshold, abs_threshold + integer, intent(in) :: n + integer, intent(out) :: failures, attempts + integer, intent(in), optional :: seed + logical :: match, passed + integer :: n_in, n_out, n_prt, n_flv, n_hel, n_col, n_cix + integer :: k, k_flv, k_hel, k_col, k_xhl, k_xcl + ! integer :: k_prt + integer, dimension(:,:,:), allocatable :: color_states + logical, dimension(:,:), allocatable :: ghost_flags + integer, dimension(:,:), allocatable :: spin_states + integer, dimension(:), allocatable :: spin_map, color_map + real(kind=default), dimension(:,:), allocatable :: p + complex(kind=default), dimension(:,:,:), allocatable :: a1, a2 + complex(kind=default) :: aa1, aa2 + character(len=80) :: msg + failures = 0 + attempts = 0 + if (present (seed)) then + call tao_random_seed (seed) + end if + n_in = process%number_particles_in () + n_out = process%number_particles_out () + n_prt = n_in + n_out + n_flv = process%number_flavor_states () + n_hel = process%number_spin_states () + n_col = process%number_color_flows () + n_cix = process%number_color_indices () + if (max (i, j) > n_prt .or. min (i, j) < 1) then + print *, "invalid #particles, i or j!" + stop 2 + end if + call process%reset_helicity_selection (-1.0_default, -1) + allocate (p(0:3,n_prt)) + allocate (a1(n_flv,n_hel,n_col), a2(n_flv,n_hel,n_col)) + allocate (spin_states(n_prt,n_hel)) + allocate (spin_map(n_hel)) + allocate (color_states(n_cix,n_prt,n_col)) + allocate (ghost_flags(n_prt,n_col)) + allocate (color_map(n_col)) + call process%spin_states(spin_states) + call spin_exchange (spin_map, spin_states, i, j) + call process%color_flows (color_states,ghost_flags) + ! call color_exchange (color_map, color_states, i, j) + if (n_in == 2) then + call beams (ROOTS, 0.0_default, 0.0_default, p(:,1), p(:,2)) + else if (n_in == 1) then + p(0,1) = ROOTS + p(1:3,1) = 0 + else + stop + end if + do k = 1, N + attempts = attempts + 1 + passed = .true. + call massless_isotropic_decay (ROOTS, p(:,3:)) + call process%new_event (p) + do k_flv = 1, n_flv + do k_col = 1, n_col + do k_hel = 1, n_hel + a1(k_flv,k_hel,k_col) & + = process%get_amplitude (k_flv, k_hel, k_col) + end do + end do + end do + ! print *, p + call exchange_momentum (p, i, j) + ! print *, p + call process%new_event (p) + do k_flv = 1, n_flv + do k_col = 1, n_col + do k_hel = 1, n_hel + a2(k_flv,k_hel,k_col) & + = process%get_amplitude (k_flv, k_hel, k_col) + end do + end do + end do + do k_flv = 1, n_flv + do k_col = 1, n_col + k_xcl = k_col + ! k_xcl = color_map(k_col) + ! print *, 'c (', k_col, ') = ', color_states(:,:,k_col) + ! print *, 'cx(', k_xcl, ') = ', color_states(:,:,k_xcl) + do k_hel = 1, n_hel + k_xhl = spin_map(k_hel) + ! print *, 'h = ', spin_states(:,k_hel) + ! print *, 'hx = ', spin_states(:,k_xhl) + aa1 = a1(k_flv,k_hel,k_col) + aa2 = a2(k_flv,k_xhl,k_xcl) + if (ieee_is_nan (real (aa1)) .or. ieee_is_nan (aimag (aa1))) then + write (*, "(1X,'evt=',I5,', flv=',I3, & + &', hel=',I3,', col=',I3,': ', A)") & + k, k_flv, k_hel, k_col, "v1 amplitude NaN" + end if + if (ieee_is_nan (real (aa2)) .or. ieee_is_nan (aimag (aa2))) then + write (*, "(1X,'evt=',I5,', flv=',I3, & + &', hel=',I3,', col=',I3,': ', A)") & + k, k_flv, k_xhl, k_xcl, "v2 amplitude NaN" + end if + write (msg, "(1X,'evt=',I5,', flv=',I3, & + &', col=',I3,',',I3,', hel=',I3,',',I3)") & + k, k_flv, k_col, k_xcl, k_hel, k_xhl + call expect (aa1, eps * aa2, trim(msg), passed, & + quiet=.true., threshold=threshold, & + abs_threshold=abs_threshold) + if (.not.passed) then + failures = failures + 1 + end if + end do + end do + end do + end do + deallocate (p) + deallocate (a1, a2) + deallocate (spin_states) + end subroutine check + + subroutine exchange_momentum (p, i, j) + real(kind=default), dimension(0:,:), intent(inout) :: p + integer, intent(in) :: i, j + real(kind=default), dimension(0:ubound(p,1)) :: tmp + tmp = p(:,j) + p(:,j) = p(:,i) + p(:,i) = tmp + end subroutine exchange_momentum + + subroutine exchange_spins (h, i, j) + integer, dimension(:,:), intent(inout) :: h + integer, intent(in) :: i, j + integer, dimension(size(h,2)) :: tmp + tmp = h(j,:) + h(j,:) = h(i,:) + h(i,:) = tmp + end subroutine exchange_spins + + subroutine spin_exchange (map, h, i, j) + integer, dimension(:), intent(inout) :: map + integer, dimension(:,:), intent(in) :: h + integer, intent(in) :: i, j + integer, dimension(size(h,1),size(h,2)) :: hx + integer :: k, l + hx = h + call exchange_spins (hx, i, j) + do l = 1, size (h, 2) + find: do k = 1, size (h, 2) + if (all (hx(:,k) == h(:,l))) then + map(l) = k + exit find + endif + end do find + end do + end subroutine spin_exchange + + subroutine exchange_colors (c, i, j) + integer, dimension(:,:,:), intent(inout) :: c + integer, intent(in) :: i, j + integer, dimension(size(c,1),size(c,3)) :: tmp + tmp = c(:,j,:) + c(:,j,:) = c(:,i,:) + c(:,i,:) = tmp + end subroutine exchange_colors + + subroutine color_exchange (map, c, i, j) + integer, dimension(:), intent(inout) :: map + integer, dimension(:,:,:), intent(in) :: c + integer, intent(in) :: i, j + integer, dimension(size(c,1),size(c,2),size(c,3)) :: cx + integer :: k, l + cx = c + call exchange_colors (cx, i, j) + do l = 1, size (c, 3) + print *, 'c (', l, ') = ', c(:,:,l) + end do + do l = 1, size (c, 3) + print *, 'cx(', l, ') = ', cx(:,:,l) + end do + do l = 1, size (c, 3) + map(l) = l + find: do k = 1, size (c, 3) + ! this does NOT work!!! + ! color flow indices can be renamed + ! for equivalent flows ... + if (all (cx(:,:,k) == c(:,:,l))) then + print *, 'map: ', l, ' -> ', k + map(l) = k + exit find + endif + end do find + end do + end subroutine color_exchange + + pure function dot (p, q) result (pq) + real(kind=default), dimension(0:), intent(in) :: p, q + real(kind=default) :: pq + pq = p(0)*q(0) - dot_product (p(1:), q(1:)) + end function dot + + pure subroutine beams (roots, m1, m2, p1, p2) + real(kind=default), intent(in) :: roots, m1, m2 + real(kind=default), dimension(0:), intent(out) :: p1, p2 + real(kind=default) :: m12, m22 + m12 = m1**2 + m22 = m2**2 + p1(0) = (roots**2 + m12 - m22) / (2*roots) + p1(1:2) = 0 + p1(3) = sqrt (p1(0)**2 - m12) + p2(0) = roots - p1(0) + p2(1:3) = - p1(1:3) + end subroutine beams + + ! The massless RAMBO algorithm + subroutine massless_isotropic_decay (roots, p) + real(kind=default), intent(in) :: roots + real(kind=default), dimension(0:,:), intent(out) :: p + real(kind=default), dimension(0:3,size(p,dim=2)) :: q + real(kind=default), dimension(0:3) :: qsum + real(kind=double), dimension(4) :: ran_double + real(kind=default), dimension(4) :: ran + real(kind=default) :: c, s, f, qabs, x, r, z + integer :: k + ! Generate isotropic null vectors + do k = 1, size (p, dim = 2) + ! if default is not double or single, we can't use + ! tao_random_number directly ... + call tao_random_number (ran_double) + ran = ran_double + ! generate a x*exp(-x) distribution for q(0,k) + q(0,k)= -log(ran(1)*ran(2)) + c = 2*ran(3)-1 + f = 2*PI*ran(4) + s = sqrt(1-c*c) + q(2,k) = q(0,k)*s*sin(f) + q(3,k) = q(0,k)*s*cos(f) + q(1,k) = q(0,k)*c + enddo + ! Boost and rescale the vectors + qsum = sum (q, dim = 2) + qabs = sqrt (dot (qsum, qsum)) + x = roots/qabs + do k = 1, size (p, dim = 2) + r = dot (q(0:,k), qsum) / qabs + z = (q(0,k)+r)/(qsum(0)+qabs) + p(1:3,k) = x*(q(1:3,k)-qsum(1:3)*z) + p(0,k) = x*r + enddo + end subroutine massless_isotropic_decay + +end module fermi_lib Index: trunk/omega/tests/fermi_driver.sh =================================================================== --- trunk/omega/tests/fermi_driver.sh (revision 0) +++ trunk/omega/tests/fermi_driver.sh (revision 8275) @@ -0,0 +1,160 @@ +#! /bin/sh +# fermi_driver.sh -- +######################################################################## + +omega="$1" +shift + +models="qed qcd sym sm sm_top_anom mssm" + +modules="" + +######################################################################## +while read prefix threshold abs_threshold n roots model i j eps mode process; do + + case $prefix in + + '#'*) # skip comments + ;; + + '') # skip empty lines + ;; + + '!'*) break + ;; + + *) + ######################################################################## + module=${prefix}_${i}_${j} + modules="$modules $module" + eval threshold_$module=$threshold + eval abs_threshold_$module=$abs_threshold + eval n_$module=$n + eval i_$module=$i + eval j_$module=$j + eval eps_$module=$eps + eval roots_$module=$roots + eval process_$module="'$process'" + ######################################################################## + + + omega_bin="`echo $omega | sed s/%%%/$model/g`" + # echo "running $omega_bin -$mode '$process'" 1>&2 + $omega_bin "$@" \ + -target:parameter_module parameters_$model \ + -target:module amplitude_fermi_$module \ + -$mode "$process" 2>/dev/null + ;; + esac + +done +######################################################################## + +for module in $modules; do + +cat < number_particles_in + p%number_particles_out => number_particles_out + p%number_spin_states => number_spin_states + p%spin_states => spin_states + p%number_flavor_states => number_flavor_states + p%flavor_states => flavor_states + p%number_color_indices => number_color_indices + p%number_color_flows => number_color_flows + p%color_flows => color_flows + p%number_color_factors => number_color_factors + p%color_factors => color_factors + p%color_sum => color_sum + p%new_event => new_event + p%reset_helicity_selection => reset_helicity_selection + p%is_allowed => is_allowed + p%get_amplitude => get_amplitude + end function load +end module interface_fermi_${module} + +EOF + +done + +######################################################################## + +cat < load +EOF +done + +for model in $models; do +cat < init_parameters +EOF +done + +cat < $j)" + call check (load_$module (), i = $i, j = $j, eps = $eps, & + roots = real ($roots, kind=default), & + threshold = real ($threshold, kind=default), & + abs_threshold = real ($abs_threshold, kind=default), & + n = $n, seed = SEED, & + failures = failures, attempts = attempts) + if (failures > 0) then + print *, failures, " failures in ", attempts, " attempts" + failed_processes = failed_processes + 1 + end if +EOF +done + +cat < 0) then + print *, failed_processes, " failed processes in ", attempted_processes, " attempts" + stop 1 + end if +end program fermi_driver +EOF + +exit 0 Index: trunk/omega/tests/fermi.list =================================================================== --- trunk/omega/tests/fermi.list (revision 0) +++ trunk/omega/tests/fermi.list (revision 8275) @@ -0,0 +1,29 @@ +# fermi.list -- +# ---------------------------------------------------------------------- +# thr abs_thr n roots model i j eps process ... +# ---------------------------------------------------------------------- +eeee 0.75 1E-11 1000 1000 SM 1 2 -1 scatter e- e- -> e- e- +eeee 0.80 1E-11 1000 1000 SM 3 4 -1 scatter e- e- -> e- e- +eeeea 0.65 1E-11 1000 1000 SM 1 2 -1 scatter e- e- -> e- e- A +eeeea 0.80 1E-11 1000 1000 SM 3 4 -1 scatter e- e- -> e- e- A +eeeeaa 0.72 1E-11 1000 1000 SM 1 2 -1 scatter e- e- -> e- e- A A +eeeeaa 0.75 1E-11 1000 1000 SM 3 4 -1 scatter e- e- -> e- e- A A +eeeeaa 0.75 1E-11 1000 1000 SM 5 6 1 scatter e- e- -> e- e- A A +eeeeee 0.75 1E-11 1000 1000 SM 3 4 -1 scatter e+ e- -> e+ e+ e- e- +eeeeee 0.75 1E-11 1000 1000 SM 5 6 -1 scatter e+ e- -> e+ e+ e- e- +Seeee 0.70 1E-11 1000 1000 MSSM 1 2 -1 scatter e- e- -> e- e- +Seeee 0.75 1E-11 1000 1000 MSSM 3 4 -1 scatter e- e- -> e- e- +Seeeea 0.75 1E-11 1000 1000 MSSM 3 4 -1 scatter e- e- -> e- e- A +Seenn 0.75 1E-11 1000 1000 MSSM 3 4 -1 scatter e+ e- -> neu1 neu1 +Seen4 0.75 1E-11 1000 1000 MSSM 3 4 -1 scatter e+ e- -> neu1 neu1 neu1 neu1 +Seen4 0.75 1E-11 1000 1000 MSSM 3 5 -1 scatter e+ e- -> neu1 neu1 neu1 neu1 +Seen4 0.75 1E-11 1000 1000 MSSM 3 6 -1 scatter e+ e- -> neu1 neu1 neu1 neu1 +Seen4 0.75 1E-11 1000 1000 MSSM 4 5 -1 scatter e+ e- -> neu1 neu1 neu1 neu1 +Seen4 0.75 1E-11 1000 1000 MSSM 4 6 -1 scatter e+ e- -> neu1 neu1 neu1 neu1 +Seen4 0.75 1E-11 1000 1000 MSSM 5 6 -1 scatter e+ e- -> neu1 neu1 neu1 neu1 +Seess 0.75 1E-11 1000 1000 MSSM 1 2 -1 scatter e- e- -> se1- se1- +Seess 0.75 1E-11 1000 1000 MSSM 3 4 1 scatter e- e- -> se1- se1- +Sees4 0.75 1E-11 1000 1000 MSSM 3 4 1 scatter e+ e- -> se1+ se1+ se1- se1- +Sees4 0.75 1E-11 1000 1000 MSSM 5 6 1 scatter e+ e- -> se1+ se1+ se1- se1- +! +uuuu 0.75 1E-11 1000 1000 SM 3 4 -1 scatter u u -> u u Index: trunk/omega/tests/fermi_UFO.list =================================================================== --- trunk/omega/tests/fermi_UFO.list (revision 0) +++ trunk/omega/tests/fermi_UFO.list (revision 8275) @@ -0,0 +1,13 @@ +# fermi_UFO.list -- +# ---------------------------------------------------------------------- +# thr abs_thr n roots model i j eps process ... +# ---------------------------------------------------------------------- +eeee 0.70 1E-11 1000 1000 SM 1 2 -1 scatter e- e- -> e- e- +eeee 0.75 1E-11 1000 1000 SM 3 4 -1 scatter e- e- -> e- e- +eeeea 0.60 1E-11 1000 1000 SM 1 2 -1 scatter e- e- -> e- e- a +eeeea 0.75 1E-11 1000 1000 SM 3 4 -1 scatter e- e- -> e- e- a +eeeeaa 0.70 1E-11 1000 1000 SM 1 2 -1 scatter e- e- -> e- e- a a +eeeeaa 0.75 1E-11 1000 1000 SM 3 4 -1 scatter e- e- -> e- e- a a +eeeeaa 0.75 1E-11 1000 1000 SM 5 6 1 scatter e- e- -> e- e- a a +eeeeee 0.75 1E-11 1000 1000 SM 3 4 -1 scatter e+ e- -> e+ e+ e- e- +eeeeee 0.75 1E-11 1000 1000 SM 5 6 -1 scatter e+ e- -> e+ e+ e- e- Index: trunk/omega/tests/omega_unit.ml =================================================================== --- trunk/omega/tests/omega_unit.ml (revision 8274) +++ trunk/omega/tests/omega_unit.ml (revision 8275) @@ -1,201 +1,205 @@ (* omega_unit.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) open OUnit let unattended = ref true let skip_if_unattended () = skip_if !unattended "not suitable for unattended tests" let trivial_test = "trivial" >:: (bracket (fun () -> true) (fun b -> assert_bool "always true" b) (fun b -> ())) let short_random_list n = let l = ref [] in for i = 1 to n do l := Random.int 1024 :: !l done; !l let allowed_recursion_depth () = let rec allowed_recursion_depth' n = try allowed_recursion_depth' (succ n) with | Stack_overflow -> n in allowed_recursion_depth' 0 let long_random_list factor = let n = factor * allowed_recursion_depth () in let l = ref [] in for i = 1 to n do l := Random.int n :: !l done; !l module Integer = struct type t = int let compare = compare let pp_printer = Format.pp_print_int let pp_print_sep = OUnitDiff.pp_comma_separator end module Integer_List = OUnitDiff.ListSimpleMake(Integer) module ThoList_Unit_Tests = struct let inner_list = ThoList.range 1 5 let outer_list = List.map (( * ) 10) (ThoList.range 1 4) let f n = List.map ((+) n) inner_list let flatmap = "flatmap" >:: (fun () -> let result = ThoList.flatmap f outer_list and expected = List.flatten (List.map f outer_list) in assert_equal expected result) let rev_flatmap = "rev_flatmap" >:: (fun () -> let result = ThoList.rev_flatmap f outer_list and expected = List.rev (ThoList.flatmap f outer_list) in Integer_List.assert_equal expected result) let flatmap_stack_overflow = "flatmap_stack_overflow" >:: (fun () -> skip_if !unattended "memory limits not suitable for unattended tests"; let l = long_random_list 2 in let f n = List.map ((+) n) (short_random_list 2) in assert_raises Stack_overflow (fun () -> ThoList.flatmap f l)) let rev_flatmap_no_stack_overflow = "rev_flatmap_no_stack_overflow" >:: (fun () -> skip_if !unattended "memory limits not suitable for unattended tests"; let l = long_random_list 10 in let f n = List.map ((+) n) (short_random_list 10) in ignore (ThoList.rev_flatmap f l); assert_bool "always true" true) let suite = "ThoList" >::: [flatmap; flatmap_stack_overflow; rev_flatmap; rev_flatmap_no_stack_overflow ] end module IListSet = Set.Make (struct type t = int list let compare = compare end) let list_elements_unique l = let rec list_elements_unique' set = function | [] -> true | x :: rest -> if IListSet.mem x set then false else list_elements_unique' (IListSet.add x set) rest in list_elements_unique' IListSet.empty l let ilistset_test = "IListSet" >:: (fun () -> assert_bool "true" (list_elements_unique [[1];[2]]); assert_bool "false" (not (list_elements_unique [[1];[1]]))) module Combinatorics_Unit_Tests = struct let permute = "permute" >:: (fun () -> let n = 8 in let l = ThoList.range 1 n in let result = Combinatorics.permute l in assert_equal (Combinatorics.factorial n) (List.length result); assert_bool "unique" (list_elements_unique result)) let permute_no_stack_overflow = "permute_no_stack_overflow" >:: (fun () -> skip_if !unattended "memory limits not suitable for unattended tests"; let n = 10 in (* n = 10 needs 1 GB, n = 11 needs 7.3 GB *) let l = ThoList.range 1 n in let result = Combinatorics.permute l in assert_equal (Combinatorics.factorial n) (List.length result)) let suite = "Combinatorics" >::: [permute; permute_no_stack_overflow] end let selftest_suite = "testsuite" >::: [trivial_test; ilistset_test] module Permutation_Test_Using_Lists = Permutation.Test(Permutation.Using_Lists) module Permutation_Test_Using_Arrays = Permutation.Test(Permutation.Using_Arrays) -module Dirac = UFO_targets.Dirac - let suite = "omega" >::: [selftest_suite; ThoList_Unit_Tests.suite; ThoList.Test.suite; ThoArray.Test.suite; Partial.Test.suite; Permutation_Test_Using_Lists.suite; Permutation_Test_Using_Arrays.suite; Combinatorics_Unit_Tests.suite; Combinatorics.Test.suite; + Algebra.Laurent.Test.suite; + Color.Arrow.Test.suite; + Color.Birdtracks.Test.suite; + Color.SU3.Test.suite; + Color.U3.Test.suite; + UFO.Test.suite; Format_Fortran.Test.suite; - Dirac.test_suite] + Dirac.Chiral.test_suite] let _ = ignore (run_test_tt_main ~arg_specs:[("-attended", Arg.Clear unattended, " run tests that depend on the environment"); ("-unattended", Arg.Set unattended, " don't run tests depend on the environment")] suite); exit 0 Index: trunk/omega/tests/ufo_unit.ml =================================================================== --- trunk/omega/tests/ufo_unit.ml (revision 8274) +++ trunk/omega/tests/ufo_unit.ml (revision 8275) @@ -1,132 +1,131 @@ (* omega_unit.ml -- Copyright (C) 1999-2016 by Wolfgang Kilian Thorsten Ohl Juergen Reuter WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) let lorentz_of_string = function | "Scalar" -> Coupling.Scalar | "Spinor" -> Coupling.Spinor | "ConjSpinor" -> Coupling.ConjSpinor | "Majorana" -> Coupling.Majorana | "Maj_Ghost" -> Coupling.Maj_Ghost | "Vector" -> Coupling.Vector | "Massive_Vector" -> Coupling.Massive_Vector | "Vectorspinor" -> Coupling.Vectorspinor | "Tensor_1" -> Coupling.Tensor_1 | "Tensor_2" -> Coupling.Tensor_2 | s -> invalid_arg ("lorentz_of_string: " ^ s) let _ = let my_name = Sys.argv.(0) in let file = ref None and line = ref None and dir = ref None and lorentz = ref None and color = ref None and targets = ref None and dirac = ref false and spins = ref [] and skip_tests = ref false and skip_example = ref false and timing = ref false and verbose = ref false and usage = "usage: " ^ my_name ^ " ..." in Arg.parse (Arg.align [ ("-dir", Arg.String (fun s -> dir := Some s), "name UFO output files"); ("-file", Arg.String (fun s -> file := Some s), "name UFO output file"); ("-line", Arg.String (fun s -> line := Some s), "line UFO fragment"); ("-lorentz", Arg.String (fun s -> lorentz := Some s), "expr UFO Lorentz tensor"); ("-color", Arg.String (fun s -> color := Some s), "expr UFO color tensor"); ("-targets", Arg.String (fun s -> targets := Some s), "expr UFO lorentz tensor parsing"); ("-dirac", Arg.Set dirac, " check Dirac matrices"); ("-spin", Arg.String (fun s -> spins := s :: !spins), "name add a lorentz representation"); ("-skip-tests", Arg.Set skip_tests, " skip the tests"); ("-skip-example", Arg.Set skip_example, " skip the example"); ("-timing", Arg.Set timing, " provide timing information"); ("-v", Arg.Set verbose, " be more verbose"); ("-verbose", Arg.Set verbose, " be more verbose") ]) (fun s -> raise (Arg.Bad s)) usage; begin match !file with | None -> () | Some name -> ignore (UFO.parse_file name) end; begin match !line with | None -> () | Some s -> ignore (UFO.parse_string s) end; begin match !dir with | None -> () | Some s -> ignore (UFO.parse_directory s) end; begin match !color with | None -> () | Some s -> let t = UFOx.Color.of_string s in print_endline (UFOx.Color.to_string t); print_endline (UFOx.Index.classes_to_string UFOx.Color.rep_to_string (UFOx.Color.classify_indices t)) end; begin match !lorentz with | None -> () | Some s -> let t = UFOx.Lorentz.of_string s in print_endline (UFOx.Lorentz.to_string t); print_endline (UFOx.Index.classes_to_string UFOx.Lorentz.rep_to_string (UFOx.Lorentz.classify_indices t)) end; begin match !targets with | None -> () | Some s -> let open Format_Fortran in let nl = newline in let t = UFOx.Lorentz.of_string s in let spins = List.rev_map lorentz_of_string !spins in let buffer = Buffer.create 1024 in print_endline (UFOx.Lorentz.to_string t); - print_endline - (UFO_targets.Lorentz_Fusion.to_string - (UFO_targets.Lorentz_Fusion.parse spins t)); + let t' = UFO_Lorentz.parse spins t in + print_endline (UFO_Lorentz.to_string t'); UFO_targets.Fortran.lorentz (formatter_of_buffer buffer) - "foo" (Array.of_list spins) t; + "foo" (Array.of_list spins) t'; printf "module omega_amplitude"; nl (); printf " use kinds"; nl (); printf " use omega95"; nl (); printf " implicit none"; nl (); printf " private"; nl (); UFO_targets.Fortran.eps4_g4_g44_decl std_formatter (); UFO_targets.Fortran.eps4_g4_g44_init std_formatter (); printf "contains"; nl (); printf "%s" (Buffer.contents buffer); Buffer.reset buffer; printf "end module omega_amplitude"; nl () end; exit 0 Index: trunk/omega/src/opam_versions.sh =================================================================== --- trunk/omega/src/opam_versions.sh (revision 8274) +++ trunk/omega/src/opam_versions.sh (revision 8275) @@ -1,35 +1,40 @@ #! /bin/sh ######################################################################## # This script is for developers only and needs not to be portable. # This script assumes an opam installation with many versions of # O'Caml available as switches. ######################################################################## # tl;dr : don't try this at home, kids ;) ######################################################################## src=$(dirname $(realpath $0)) root=$(dirname $(dirname $src)) build=$root/_build log=$src/opam_versions.out +versions="$1" +if [ -z "$versions" ]; then + versions="$(opam switch -s)" +fi + rm -f $log -for switch in $(opam switch -s); do +for switch in $versions; do opam switch $switch >/dev/null || exit 2 opam switch show eval $(opam env) mkdir -p $build-$switch cd $build-$switch if [ ! -e config.status ]; then cp -a $build/config.status . ./config.status --recheck ./config.status fi make -j $(getconf _NPROCESSORS_ONLN) -C omega && \ make -j $(getconf _NPROCESSORS_ONLN) -C omega check if [ "$?" = 0 ]; then echo "$switch PASS" >> $log else echo "$switch FAIL" >> $log fi done Index: trunk/omega/src/color.mli =================================================================== --- trunk/omega/src/color.mli (revision 8274) +++ trunk/omega/src/color.mli (revision 8275) @@ -1,156 +1,203 @@ (* color.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Quantum Numbers} *) (* Color is not necessarily the~$\textrm{SU}(3)$ of QCD. Conceptually, it can be any \emph{unbroken} symmetry (\emph{broken} symmetries correspond to [Model.flavor]). In order to keep the group theory simple, we confine ourselves to the fundamental and adjoint representation of a single~$\textrm{SU}(N_C)$ for the moment. Therefore, particles are either color singlets or live in the defining representation of $\textrm{SU}(N_C)$: [SUN]$(|N_C|)$, its conjugate [SUN]$(-|N_C|)$ or in the adjoint representation of $\textrm{SU}(N_C)$: [AdjSUN]$(N_C)$. *) type t = Singlet | SUN of int | AdjSUN of int val conjugate : t -> t val compare : t -> t -> int (* \thocwmodulesection{Color Flows} *) module type Flow = sig type color type t = color list * color list val rank : t -> int val of_list : int list -> color val ghost : unit -> color val to_lists : t -> int list list val in_to_lists : t -> int list list val out_to_lists : t -> int list list val ghost_flags : t -> bool list val in_ghost_flags : t -> bool list val out_ghost_flags : t -> bool list (* A factor is a list of powers \begin{equation} \sum_{i} \left( \frac{\ocwlowerid{num}_i}{\ocwlowerid{den}_i} \right)^{\ocwlowerid{power}_i} \end{equation} *) type power = { num : int; den : int; power : int } type factor = power list val factor : t -> t -> factor val zero : factor end module Flow : Flow -(* \thocwmodulesection{Color Structure of Vertices } *) +(* \thocwmodulesection{Vertex Color Flows} *) -(* In order for the [Colorize]r to work on fusions, we must - permit to choose any permutation of the color tensors. *) +(* \begin{dubious} + It might be beneficial, to use the color flow representation + here. This will simplify the colorizer at the price of + some complexity in [UFO] or here. + \end{dubious} *) -(* Since $f_{a_1a_2a_3}$ and $\epsilon_{i_1i_2i_3}$ are totally - antisymmetric, we can take care of the permutations with a sign. +module type Test = + sig + val suite : OUnit.test + end + +module type Arrow = + sig + type endpoint + val position : endpoint -> int + val relocate : (int -> int) -> endpoint -> endpoint + type tip = endpoint + type tail = endpoint + type ghost = endpoint + type ('tail, 'tip, 'ghost) t = + | Arrow of 'tail * 'tip + | Ghost of 'ghost + type free = (tail, tip, ghost) t + type factor + val free_to_string : free -> string + val factor_to_string : factor -> string + val map : (endpoint -> endpoint) -> free -> free + val to_left_factor : (endpoint -> bool) -> free -> factor + val to_right_factor : (endpoint -> bool) -> free -> factor + val of_factor : factor -> free + val negatives : free -> endpoint list + val is_free : factor -> bool + val is_ghost : free -> bool + val single : endpoint -> endpoint -> free + val double : endpoint -> endpoint -> free list + val ghost : endpoint -> free + val chain : int list -> free list + val cycle : int list -> free list + type merge = + | Match of factor + | Ghost_Match + | Loop_Match + | Mismatch + | No_Match + val merge : factor -> factor -> merge + module BinOps : sig + val (=>) : int -> int -> free + val (==>) : int -> int -> free list + val (<=>) : int -> int -> free list + val (>=>) : int * int -> int -> free + val (=>>) : int -> int * int -> free + val (>=>>) : int * int -> int * int -> free + val (??) : int -> free + end + module Test : Test + end + +module Arrow : Arrow + +module type Propagator = + sig + type cf_in = int + type cf_out = int + type t = W | I of cf_in | O of cf_out | IO of cf_in * cf_out | G + val to_string : t -> string + end + +module Propagator : Propagator + +module type Birdtracks = + sig + type t + val to_string : t -> string + val pp : Format.formatter -> t -> unit + val trivial : t -> bool + val is_null : t -> bool + val unit : t + val null : t + val two : t + val half : t + val third : t + val minus : t + val nc : t + val imag : t + val ints : (int * int) list -> t + val const : Algebra.Laurent.t -> t + val times : t -> t -> t + val multiply : t list -> t + val scale : Algebra.Q.t -> t -> t + val sum : t list -> t + val diff : t -> t -> t + val f_of_rep : (int -> int -> int -> t) -> int -> int -> int -> t + val d_of_rep : (int -> int -> int -> t) -> int -> int -> int -> t + module BinOps : sig + val ( +++ ) : t -> t -> t + val ( --- ) : t -> t -> t + val ( *** ) : t -> t -> t + end + val map : (int -> int) -> t -> t + val fuse : int -> t -> Propagator.t list -> (Algebra.QC.t * Propagator.t) list + module Test : Test + end + +module Birdtracks : Birdtracks + +module type SU3 = + sig + include Birdtracks + val delta3 : int -> int -> t + val delta8 : int -> int -> t + val delta8_loop : int -> int -> t + val gluon : int -> int -> t + val t : int -> int -> int -> t + val f : int -> int -> int -> t + val d : int -> int -> int -> t + val epsilon : int -> int -> int -> t + val epsilonbar : int -> int -> int -> t + val t6 : int -> int -> int -> t + val k6 : int -> int -> int -> t + val k6bar : int -> int -> int -> t + end - For the other invariant tensors of rank $\le 3$, it suffices - to specify a pair, which is symmetric in the case of the adjoint - representation, but \emph{not} in the case of $N\otimes\bar N$. - We can however disambiguate the order in the latter case by - looking at the color representation of of the particles involved. *) - -(* TODO: support $d_{abc}$. *) - -type pair3 = - | P3_12 | P3_23 | P3_31 - | P3_21 | P3_32 | P3_13 - -type vertex3 = - | Legacy3 (* only for debugging *) - | Trivial3 - | Delta3 of pair3 (* $\delta_{\bar\imath_2i_3}$ *) - | Delta8 of pair3 (* $\delta^{a_2a_3}$ *) - | T of pair3 (* $T^{a_1}_{\bar\imath_2i_3}$ *) - | F (* $f^{a_1a_2a_3}$ *) - | Eps (* $\epsilon_{i_2i_3i_4}$ - and $\epsilon_{\bar\imath_2\bar\imath_3\bar\imath_4}$ *) - -(* For invariant tensors of rank $\le 4$, there are more - possibilities. We can choose a pair, which is equivalent - to choosing two pairs, as long as the order is irrelevant - or can be recovered. *) - -type pair4 = - | P4_12 - | P4_13 - | P4_14 - | P4_23 - | P4_24 - | P4_34 - -(* We can choose a triplet. *) - -type triplet4 = - | P4_123 - | P4_234 - | P4_341 - | P4_412 - -(* We can choose a cyclic permutation of three indices, when the - choice of the first index is irrelevant by symmetry. *) - -type cyclic4 = - | C4_234 - | C4_342 - | C4_423 - -type vertex4 = - | Legacy4 (* only for debugging *) - | Trivial4 - | Delta13 of pair4 (* $\delta_{\bar\imath_3i_4}$ *) - | Delta18 of pair4 (* $\delta^{a_3a_4}$ *) - | Delta38 of pair4 (* $\delta_{\bar\imath_1i_2}\delta^{a_3a_4}$ *) - | Delta33 of cyclic4 (* $\delta_{\bar\imath_1i_2}\delta_{\bar\imath_3i_4}$ *) - | Delta88 of cyclic4 (* $\delta^{a_1a_2}\delta^{a_3a_4}$ *) - | TT of cyclic4 (* $T^a_{\bar\imath_1i_2}T^a_{\bar\imath_3i_4}$ *) - | FF of (int * int) * (int * int) (* $f^{aa_1a_2}f^{aa_3a_4}$ *) - | TF of pair4 (* $T^a_{\bar\imath_1i_2}f^{aa_3a_4}$ *) - | T4 of triplet4 (* $T^{a_2}_{\bar\imath_3i_4}$ *) - | F4 of triplet4 (* $f^{a_2a_3a_4}$ *) - | Eps4 of triplet4 (* $\epsilon_{i_2i_3i_4}$ - and $\epsilon_{\bar\imath_2\bar\imath_3\bar\imath_4}$ *) - -type vertex = - | Legacy (* only for debugging *) - | Trivial +module SU3 : SU3 +module U3 : SU3 -val canonicalize_ff : - (int * int) * (int * int) -> int * ((int * int) * (int * int)) +module Vertex : SU3 Index: trunk/omega/src/Makefile.sources =================================================================== --- trunk/omega/src/Makefile.sources (revision 8274) +++ trunk/omega/src/Makefile.sources (revision 8275) @@ -1,293 +1,296 @@ # Makefile.sources -- Makefile component for O'Mega ## ## Process Makefile.am with automake to include this file in Makefile.in ## ######################################################################## # # Copyright (C) 1999-2019 by # Wolfgang Kilian # Thorsten Ohl # Juergen Reuter # with contributions from # cf. main AUTHORS file # # WHIZARD is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # WHIZARD is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ######################################################################## ## ## We define the source files in a separate file so that they can be ## include by Makefiles in multiple directories. ## ######################################################################## ######################################################################## # # O'Caml sources # ######################################################################## # # NB: # # * all modules MUST be given in the correct sequence for linking # # * foo.ml as a source file implies foo.mli as a source files # # * we must use ocamlc -i to generate *_lexer.mli from *_lexer.ml in # order to treat *_lexer.ml like all other modules # # * automake conditionals are not available here, use # autoconf substitutions that expand to '#' or '' # ######################################################################## CASCADE_MLL = cascade_lexer.mll CASCADE_MLY = cascade_parser.mly CASCADE_MLD = $(CASCADE_MLL:.mll=.ml) $(CASCADE_MLY:.mly=.ml) CASCADE_ML_PRIMARY = cascade_syntax.ml cascade.ml CASCADE_ML = cascade_syntax.ml $(CASCADE_MLD) cascade.ml VERTEX_MLL = vertex_lexer.mll VERTEX_MLY = vertex_parser.mly VERTEX_MLD = $(VERTEX_MLL:.mll=.ml) $(VERTEX_MLY:.mly=.ml) VERTEX_ML_PRIMARY = vertex_syntax.ml vertex.ml VERTEX_ML = vertex_syntax.ml $(VERTEX_MLD) vertex.ml UFO_MLL = UFOx_lexer.mll UFO_lexer.mll UFO_MLY = UFOx_parser.mly UFO_parser.mly UFO_MLD = $(UFO_MLL:.mll=.ml) $(UFO_MLY:.mly=.ml) -UFO_ML_PRIMARY = UFOx_syntax.ml UFOx.ml UFO_syntax.ml UFO_targets.ml UFO.ml -UFO_ML = UFOx_syntax.ml UFO_syntax.ml $(UFO_MLD) UFOx.ml UFO_targets.ml UFO.ml +UFO_ML_PRIMARY = UFOx_syntax.ml UFOx.ml UFO_syntax.ml UFO_Lorentz.ml UFO_targets.ml UFO.ml +UFO_ML = UFOx_syntax.ml UFO_syntax.ml $(UFO_MLD) UFOx.ml UFO_Lorentz.ml UFO_targets.ml UFO.ml OMEGA_MLL = $(CASCADE_MLL) $(VERTEX_MLL) $(UFO_MLL) OMEGA_MLY = $(CASCADE_MLY) $(VERTEX_MLY) $(UFO_MLY) OMEGA_DERIVED_CAML = \ $(OMEGA_MLL:.mll=.mli) $(OMEGA_MLL:.mll=.ml) \ $(OMEGA_MLY:.mly=.mli) $(OMEGA_MLY:.mly=.ml) OMEGA_INTERFACES_MLI = \ coupling.mli \ model.mli \ target.mli ######################################################################## # We need lists of all modules including and excluding derived # files (*_PRIMARY). Unfortunately, we need the longer list in # proper linking order, so we can't just tack the additional # files to the end of the shorter list. ######################################################################## OMEGA_CORE_ML_PART1 = \ OUnit.ml OUnitDiff.ml \ config.ml partial.ml pmap.ml sets.ml format_Fortran.ml \ thoList.ml thoArray.ml thoString.ml bundle.ml powSet.ml \ thoFilename.ml cache.ml progress.ml trie.ml linalg.ml tree2.ml \ algebra.ml options.ml product.ml combinatorics.ml \ permutation.ml partition.ml tree.ml \ tuple.ml topology.ml DAG.ml momentum.ml phasespace.ml \ - charges.ml color.ml modeltools.ml whizard.ml + charges.ml color.ml modeltools.ml whizard.ml dirac.ml OMEGA_CORE_ML_PART2 = \ $(VERTEX_ML) $(UFO_ML) $(CASCADE_ML) OMEGA_CORE_ML_PART2_PRIMARY = \ $(VERTEX_ML_PRIMARY) $(UFO_ML_PRIMARY) $(CASCADE_ML_PRIMARY) OMEGA_CORE_ML_PART3 = \ - colorize.ml process.ml fusion.ml omega.ml + colorize.ml process.ml fusion.ml fusion_vintage.ml omega.ml OMEGA_CORE_ML_PRIMARY = \ $(OMEGA_CORE_ML_PART1) $(OMEGA_CORE_ML_PART2_PRIMARY) $(OMEGA_CORE_ML_PART3) OMEGA_CORE_ML = \ $(OMEGA_CORE_ML_PART1) $(OMEGA_CORE_ML_PART2) $(OMEGA_CORE_ML_PART3) OMEGA_CORE_MLI_PRIMARY = $(OMEGA_INTERFACES_MLI) $(OMEGA_CORE_ML_PRIMARY:.ml=.mli) OMEGA_CORE_MLI = $(OMEGA_INTERFACES_MLI) $(OMEGA_CORE_ML:.ml=.mli) OMEGA_MODELLIB_ML = \ modellib_SM.ml \ modellib_MSSM.ml \ modellib_NoH.ml \ modellib_NMSSM.ml \ modellib_PSSSM.ml \ modellib_BSM.ml \ modellib_WZW.ml \ modellib_Zprime.ml OMEGA_MODELLIB_MLI = $(OMEGA_MODELLIB_ML:.ml=.mli) OMEGA_TARGETLIB_ML = \ targets_Kmatrix.ml \ targets_Kmatrix_2.ml \ targets.ml OMEGA_TARGETLIB_MLI = $(OMEGA_TARGETLIB_ML:.ml=.mli) ######################################################################## # The supported models: ######################################################################## OMEGA_MINIMAL_APPLICATIONS_ML = \ omega_QED.ml \ omega_QCD.ml \ omega_SM.ml OMEGA_APPLICATIONS_ML = \ omega_QED.ml \ omega_QED_VM.ml \ omega_QCD.ml \ omega_QCD_VM.ml \ omega_SM.ml \ omega_SM_VM.ml \ omega_SM_CKM.ml \ omega_SM_CKM_VM.ml \ omega_SM_ac.ml \ omega_SM_ac_CKM.ml \ omega_SM_dim6.ml \ omega_SM_top.ml \ omega_SM_top_anom.ml \ omega_SM_tt_threshold.ml \ omega_SM_Higgs.ml \ omega_SM_Higgs_VM.ml \ omega_SM_Higgs_CKM.ml \ omega_SM_Higgs_CKM_VM.ml \ omega_THDM.ml \ omega_THDM_VM.ml \ omega_THDM_CKM.ml \ omega_THDM_CKM_VM.ml \ omega_MSSM.ml \ omega_MSSM_CKM.ml \ omega_MSSM_Grav.ml \ omega_MSSM_Hgg.ml \ omega_NMSSM.ml \ omega_NMSSM_CKM.ml \ omega_NMSSM_Hgg.ml \ omega_PSSSM.ml \ omega_Littlest.ml \ omega_Littlest_Eta.ml \ omega_Littlest_Tpar.ml \ omega_Simplest.ml \ omega_Simplest_univ.ml \ omega_Xdim.ml \ omega_GravTest.ml \ omega_NoH_rx.ml \ omega_AltH.ml \ omega_SM_rx.ml \ omega_SM_ul.ml \ omega_SSC.ml \ omega_SSC_2.ml \ omega_SSC_AltT.ml \ omega_UED.ml \ omega_WZW.ml \ omega_Zprime.ml \ omega_Zprime_VM.ml \ omega_Threeshl.ml \ omega_Threeshl_nohf.ml \ omega_HSExt.ml \ omega_HSExt_VM.ml \ omega_Template.ml \ omega_SYM.ml \ omega_UFO.ml +### Not ready for primetime yet!!! +# omega_UFO_Majorana.ml + OMEGA_CORE_CMO = $(OMEGA_CORE_ML:.ml=.cmo) OMEGA_CORE_CMX = $(OMEGA_CORE_ML:.ml=.cmx) OMEGA_TARGETS_CMO = $(OMEGA_TARGETLIB_ML:.ml=.cmo) OMEGA_TARGETS_CMX = $(OMEGA_TARGETLIB_ML:.ml=.cmx) OMEGA_MODELS_CMO = $(OMEGA_MODELLIB_ML:.ml=.cmo) OMEGA_MODELS_CMX = $(OMEGA_MODELLIB_ML:.ml=.cmx) OMEGA_APPLICATIONS_CMO = $(OMEGA_APPLICATIONS_ML:.ml=.cmo) OMEGA_APPLICATIONS_CMX = $(OMEGA_APPLICATIONS_ML:.ml=.cmx) OMEGA_APPLICATIONS_BYTECODE = $(OMEGA_APPLICATIONS_ML:.ml=$(OCAML_BYTECODE_EXT)) OMEGA_APPLICATIONS_NATIVE = $(OMEGA_APPLICATIONS_ML:.ml=$(OCAML_NATIVE_EXT)) OMEGA_CACHES = $(OMEGA_APPLICATIONS_ML:.ml=.$(OMEGA_CACHE_SUFFIX)) OMEGA_MINIMAL_APPLICATIONS_BYTECODE = $(OMEGA_MINIMAL_APPLICATIONS_ML:.ml=$(OCAML_BYTECODE_EXT)) OMEGA_MINIMAL_APPLICATIONS_NATIVE = $(OMEGA_MINIMAL_APPLICATIONS_ML:.ml=$(OCAML_NATIVE_EXT)) OMEGA_MINIMAL_CACHES = $(OMEGA_MINIMAL_APPLICATIONS_ML:.ml=.$(OMEGA_CACHE_SUFFIX)) # Only primary sources, excluding generated parsers and lexers # (used for dependency generation) OMEGA_ML_PRIMARY = \ $(OMEGA_CORE_ML_PRIMARY) \ $(OMEGA_MODELLIB_ML) \ $(OMEGA_TARGETLIB_ML) \ $(OMEGA_APPLICATIONS_ML) OMEGA_MLI_PRIMARY = \ $(OMEGA_CORE_MLI_PRIMARY) \ $(OMEGA_MODELLIB_MLI) \ $(OMEGA_TARGETLIB_MLI) OMEGA_CAML_PRIMARY = $(OMEGA_ML_PRIMARY) $(OMEGA_MLI_PRIMARY) $(OMEGA_MLL) $(OMEGA_MLY) # All sources, including generated parsers and lexers # (used for linking and distribution) OMEGA_ML = \ $(OMEGA_CORE_ML) \ $(OMEGA_MODELLIB_ML) \ $(OMEGA_TARGETLIB_ML) \ $(OMEGA_APPLICATIONS_ML) OMEGA_MLI = \ $(OMEGA_CORE_MLI) \ $(OMEGA_MODELLIB_MLI) \ $(OMEGA_TARGETLIB_MLI) OMEGA_CAML = $(OMEGA_ML) $(OMEGA_MLI) $(OMEGA_MLL) $(OMEGA_MLY) $(OMEGA_DERIVED_CAML) ######################################################################## # # Fortran 90/95/2003 sources # ######################################################################## AM_FCFLAGS = ## Profiling if FC_USE_PROFILING AM_FCFLAGS += $(FCFLAGS_PROFILING) endif ## OpenMP if FC_USE_OPENMP AM_FCFLAGS += $(FCFLAGS_OPENMP) endif KINDS_F90 = kinds.f90 CONSTANTS_F90 = constants.f90 STRINGS_F90 = iso_varying_string.f90 OMEGA_PARAMETERS_F90 = # omega_parameters.f90 omega_parameters_madgraph.f90 OMEGALIB_DERIVED_F90 = \ omega_spinors.f90 omega_bispinors.f90 omega_vectors.f90 \ omega_vectorspinors.f90 omega_tensors.f90 \ omega_couplings.f90 omega_spinor_couplings.f90 omega_bispinor_couplings.f90 \ omega_polarizations.f90 omega_polarizations_madgraph.f90 \ omega_tensor_polarizations.f90 omega_vspinor_polarizations.f90 \ omega_color.f90 omega_utils.f90 \ omega95.f90 omega95_bispinors.f90 omegavm95.f90 OMEGALIB_F90 = \ $(CONSTANTS_F90) $(STRINGS_F90) \ $(OMEGALIB_DERIVED_F90) \ $(OMEGA_PARAMETERS_F90) OMEGALIB_MOD = $(KINDS_F90:.f90=.mod) $(OMEGALIB_F90:.f90=.mod) ######################################################################## ## The End. ######################################################################## Index: trunk/omega/src/UFO.ml =================================================================== --- trunk/omega/src/UFO.ml (revision 8274) +++ trunk/omega/src/UFO.ml (revision 8275) @@ -1,2294 +1,2266 @@ (* UFO.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* Unfortunately, \texttt{ocamlweb} will not typeset all multi character operators nicely. E.\,g.~\verb+f @< g+ comes out as [f @< g]. *) let (@@) f g x = f (g x) let (@@@) f g x y = f (g x y) let error_in_string text start_pos end_pos = let i = start_pos.Lexing.pos_cnum and j = end_pos.Lexing.pos_cnum in String.sub text i (j - i) let error_in_file name start_pos end_pos = Printf.sprintf "%s:%d.%d-%d.%d" name start_pos.Lexing.pos_lnum (start_pos.Lexing.pos_cnum - start_pos.Lexing.pos_bol) end_pos.Lexing.pos_lnum (end_pos.Lexing.pos_cnum - end_pos.Lexing.pos_bol) let parse_string text = try UFO_parser.file UFO_lexer.token (UFO_lexer.init_position "" (Lexing.from_string text)) with | UFO_syntax.Syntax_Error (msg, start_pos, end_pos) -> invalid_arg (Printf.sprintf "syntax error (%s) at: `%s'" msg (error_in_string text start_pos end_pos)) | Parsing.Parse_error -> invalid_arg ("parse error: " ^ text) let parse_file name = let ic = open_in name in let result = begin try UFO_parser.file UFO_lexer.token (UFO_lexer.init_position name (Lexing.from_channel ic)) with | UFO_syntax.Syntax_Error (msg, start_pos, end_pos) -> begin close_in ic; invalid_arg (Printf.sprintf "%s: syntax error (%s)" (error_in_file name start_pos end_pos) msg) end | Parsing.Parse_error -> begin close_in ic; invalid_arg ("parse error: " ^ name) end end in close_in ic; result (* These are the contents of the Python files after lexical analysis as context-free variable declarations, before any semantic interpretation. *) module type Files = sig type t = private { particles : UFO_syntax.t; couplings : UFO_syntax.t; coupling_orders : UFO_syntax.t; vertices : UFO_syntax.t; lorentz : UFO_syntax.t; parameters : UFO_syntax.t; propagators : UFO_syntax.t; decays : UFO_syntax.t } val parse_directory : string -> t end module Files : Files = struct type t = { particles : UFO_syntax.t; couplings : UFO_syntax.t; coupling_orders : UFO_syntax.t; vertices : UFO_syntax.t; lorentz : UFO_syntax.t; parameters : UFO_syntax.t; propagators : UFO_syntax.t; decays : UFO_syntax.t } let parse_directory dir = let parse stem = parse_file (Filename.concat dir (stem ^ ".py")) in { particles = parse "particles"; couplings = parse "couplings"; coupling_orders = (try parse "coupling_orders" with _ -> []); vertices = parse "vertices"; lorentz = parse "lorentz"; parameters = parse "parameters"; propagators = (try parse "propagators" with _ -> []); decays = (try parse "decays" with _ -> []) } end let dump_file pfx f = List.iter (fun s -> print_endline (pfx ^ ": " ^ s)) (UFO_syntax.to_strings f) type charge = | Q_Integer of int | Q_Fraction of int * int let charge_to_string = function | Q_Integer i -> Printf.sprintf "%d" i | Q_Fraction (n, d) -> Printf.sprintf "%d/%d" n d module S = UFO_syntax let find_attrib name attribs = try (List.find (fun a -> name = a.S.a_name) attribs).S.a_value with | Not_found -> failwith ("UFO.find_attrib: \"" ^ name ^ "\" not found") let find_attrib name attribs = (List.find (fun a -> name = a.S.a_name) attribs).S.a_value let name_to_string ?strip name = let stripped = begin match strip, List.rev name with | Some pfx, head :: tail -> if pfx = head then tail else failwith ("UFO.name_to_string: expected prefix '" ^ pfx ^ "', got '" ^ head ^ "'") | _, name -> name end in String.concat "." stripped let name_attrib ?strip name attribs = match find_attrib name attribs with | S.Name n -> name_to_string ?strip n | _ -> invalid_arg name let integer_attrib name attribs = match find_attrib name attribs with | S.Integer i -> i | _ -> invalid_arg name let charge_attrib name attribs = match find_attrib name attribs with | S.Integer i -> Q_Integer i | S.Fraction (n, d) -> Q_Fraction (n, d) | _ -> invalid_arg name let string_attrib name attribs = match find_attrib name attribs with | S.String s -> s | _ -> invalid_arg name let boolean_attrib name attribs = try match String.lowercase (name_attrib name attribs) with | "true" -> true | "false" -> false | _ -> invalid_arg name with | Not_found -> false type value = | Integer of int | Fraction of int * int | Float of float | String of string | Name of string list let value_to_string = function | Integer i -> Printf.sprintf "%d" i | Fraction (n, d) -> Printf.sprintf "%d/%d" n d | Float x -> string_of_float x | String s -> Printf.sprintf "'%s'" s | Name n -> name_to_string n let value_to_expr substitutions = function | Integer i -> Printf.sprintf "%d" i | Fraction (n, d) -> Printf.sprintf "%d/%d" n d | Float x -> string_of_float x | String s -> UFOx.Value.to_string (UFOx.Value.of_expr (substitutions (UFOx.Expr.of_string s))) | Name n -> name_to_string n let value_to_coupling substitutions atom = function - | Integer i -> Coupling.Const i - | Fraction (n, d) -> Coupling.Quot (Coupling.Const n, Coupling.Const d) - | Float x -> failwith "UFO.value_to_coupling: Float not supported yet!" + | Integer i -> Coupling.Integer i + | Fraction (n, d) -> Coupling.Quot (Coupling.Integer n, Coupling.Integer d) + | Float x -> Coupling.Float x | String s -> UFOx.Value.to_coupling atom (UFOx.Value.of_expr (substitutions (UFOx.Expr.of_string s))) | Name n -> failwith "UFO.value_to_coupling: Name not supported yet!" let value_to_numeric = function | Integer i -> Printf.sprintf "%d" i | Fraction (n, d) -> Printf.sprintf "%g" (float n /. float d) | Float x -> Printf.sprintf "%g" x | String s -> invalid_arg ("UFO.value_to_numeric: string = " ^ s) | Name n -> invalid_arg ("UFO.value_to_numeric: name = " ^ name_to_string n) let value_to_float = function | Integer i -> float i | Fraction (n, d) -> float n /. float d | Float x -> x | String s -> invalid_arg ("UFO.value_to_float: string = " ^ s) | Name n -> invalid_arg ("UFO.value_to_float: name = " ^ name_to_string n) let value_attrib name attribs = match find_attrib name attribs with | S.Integer i -> Integer i | S.Fraction (n, d) -> Fraction (n, d) | S.Float x -> Float x | S.String s -> String s | S.Name n -> Name n | _ -> invalid_arg name let string_list_attrib name attribs = match find_attrib name attribs with | S.String_List l -> l | _ -> invalid_arg name let name_list_attrib ~strip name attribs = match find_attrib name attribs with | S.Name_List l -> List.map (name_to_string ~strip) l | _ -> invalid_arg name let integer_list_attrib name attribs = match find_attrib name attribs with | S.Integer_List l -> l | _ -> invalid_arg name let order_dictionary_attrib name attribs = match find_attrib name attribs with | S.Order_Dictionary d -> d | _ -> invalid_arg name let coupling_dictionary_attrib ~strip name attribs = match find_attrib name attribs with | S.Coupling_Dictionary d -> List.map (fun (i, j, c) -> (i, j, name_to_string ~strip c)) d | _ -> invalid_arg name let decay_dictionary_attrib name attribs = match find_attrib name attribs with | S.Decay_Dictionary d -> List.map (fun (p, w) -> (List.map List.hd p, w)) d | _ -> invalid_arg name module SMap = Map.Make (struct type t = string let compare = compare end) let map_to_alist map = SMap.fold (fun key value acc -> (key, value) :: acc) map [] let keys map = SMap.fold (fun key _ acc -> key :: acc) map [] let values map = SMap.fold (fun _ value acc -> value :: acc) map [] module SKey = struct type t = string let hash = Hashtbl.hash let equal = (=) end module SHash = Hashtbl.Make (SKey) module type Particle = sig type t = private { pdg_code : int; name : string; antiname : string; spin : UFOx.Lorentz.r; color : UFOx.Color.r; mass : string; width : string; texname : string; antitexname : string; charge : charge; ghost_number : int; lepton_number : int; y : int; goldstone : bool; propagating : bool; (* NOT HANDLED YET! *) line : string option; (* NOT HANDLED YET! *) is_anti : bool } val of_file : S.t -> t SMap.t val to_string : string -> t -> string val conjugate : t -> t + val force_spinor : t -> t + val force_conjspinor : t -> t + val force_majorana : t -> t + val is_majorana : t -> bool val is_ghost : t -> bool val is_goldstone : t -> bool val is_physical : t -> bool val filter : (t -> bool) -> t SMap.t -> t SMap.t end module Particle : Particle = struct type t = { pdg_code : int; name : string; antiname : string; spin : UFOx.Lorentz.r; color : UFOx.Color.r; mass : string; width : string; texname : string; antitexname : string; charge : charge; ghost_number : int; lepton_number : int; y : int; goldstone : bool; propagating : bool; (* NOT HANDLED YET! *) line : string option; (* NOT HANDLED YET! *) is_anti : bool } let to_string symbol p = Printf.sprintf "particle: %s => [pdg = %d, name = '%s'/'%s', \ spin = %s, color = %s, \ mass = %s, width = %s, \ Q = %s, G = %d, L = %d, Y = %d, \ TeX = '%s'/'%s'%s]" symbol p.pdg_code p.name p.antiname (UFOx.Lorentz.rep_to_string p.spin) (UFOx.Color.rep_to_string p.color) p.mass p.width (charge_to_string p.charge) p.ghost_number p.lepton_number p.y p.texname p.antitexname (if p.goldstone then ", GB" else "") let conjugate_charge = function | Q_Integer i -> Q_Integer (-i) | Q_Fraction (n, d) -> Q_Fraction (-n, d) let is_neutral p = (p.name = p.antiname) (* We \emph{must not} mess with [pdg_code] and [color] if the particle is neutral! *) let conjugate p = if is_neutral p then p else { pdg_code = - p.pdg_code; name = p.antiname; antiname = p.name; spin = UFOx.Lorentz.rep_conjugate p.spin; color = UFOx.Color.rep_conjugate p.color; mass = p.mass; width = p.width; texname = p.antitexname; antitexname = p.texname; charge = conjugate_charge p.charge; ghost_number = p.ghost_number; lepton_number = p.lepton_number; y = p.y; goldstone = p.goldstone; propagating = p.propagating; line = p.line; is_anti = not p.is_anti } let of_file1 map d = let symbol = d.S.name in match d.S.kind, d.S.attribs with | [ "Particle" ], attribs -> + let name = string_attrib "name" attribs + and antiname = string_attrib "antiname" attribs in + let neutral = (name = antiname) in SMap.add symbol { pdg_code = integer_attrib "pdg_code" attribs; - name = string_attrib "name" attribs; - antiname = string_attrib "antiname" attribs; - spin = UFOx.Lorentz.rep_of_int (integer_attrib "spin" attribs); - color = UFOx.Color.rep_of_int (integer_attrib "color" attribs); + name; antiname; + spin = + UFOx.Lorentz.rep_of_int neutral (integer_attrib "spin" attribs); + color = + UFOx.Color.rep_of_int neutral (integer_attrib "color" attribs); mass = name_attrib ~strip:"Param" "mass" attribs; width = name_attrib ~strip:"Param" "width" attribs; texname = string_attrib "texname" attribs; antitexname = string_attrib "antitexname" attribs; charge = charge_attrib "charge" attribs; ghost_number = integer_attrib "GhostNumber" attribs; - lepton_number = integer_attrib "LeptonNumber" attribs; + lepton_number = + (try integer_attrib "LeptonNumber" attribs with _ -> 0); y = (try integer_attrib "Y" attribs with _ -> 0); goldstone = (try boolean_attrib "goldstone" attribs with _ -> false); propagating = true; line = None; is_anti = false} map | [ "anti"; p ], [] -> begin try SMap.add symbol (conjugate (SMap.find p map)) map with | Not_found -> invalid_arg ("Particle.of_file: " ^ p ^ ".anti() not yet defined!") end | _ -> invalid_arg ("Particle.of_file: " ^ name_to_string d.S.kind) let of_file particles = List.fold_left of_file1 SMap.empty particles + let is_spinor p = + match UFOx.Lorentz.omega p.spin with + | Coupling.Spinor | Coupling.ConjSpinor | Coupling.Majorana -> true + | _ -> false + + let force_spinor p = + if is_spinor p then + { p with spin = UFOx.Lorentz.rep_of_int false 2 } + else + p + + let force_conjspinor p = + if is_spinor p then + { p with spin = UFOx.Lorentz.rep_of_int false (-2) } + else + p + + let force_majorana p = + if is_spinor p then + { p with spin = UFOx.Lorentz.rep_of_int true 2 } + else + p + + let is_majorana p = + match UFOx.Lorentz.omega p.spin with + | Coupling.Majorana -> true + | _ -> false + let is_ghost p = p.ghost_number <> 0 let is_goldstone p = p.goldstone let is_physical p = not (is_ghost p || is_goldstone p) let filter predicate map = SMap.filter (fun symbol p -> predicate p) map end module type UFO_Coupling = sig type t = private { name : string; value : string; order : (string * int) list } val of_file : S.t -> t SMap.t val to_string : string -> t -> string val to_string_expanded : string -> t -> string end module UFO_Coupling : UFO_Coupling = struct type t = { name : string; value : string; order : (string * int) list } let order_to_string orders = String.concat ", " (List.map (fun (s, i) -> Printf.sprintf "'%s':%d" s i) orders) let to_string symbol c = Printf.sprintf "coupling: %s => [name = '%s', value = '%s', order = [%s]]" symbol c.name c.value (order_to_string c.order) let to_string_expanded symbol c = let expansion = UFOx.Value.to_string (UFOx.Value.of_expr (UFOx.Expr.of_string c.value)) in Printf.sprintf "coupling: %s => [name = '%s', value = '%s', value' = '%s', order = [%s]]" symbol c.name c.value expansion (order_to_string c.order) let of_file1 map d = let symbol = d.S.name in match d.S.kind, d.S.attribs with | [ "Coupling" ], attribs -> let name = string_attrib "name" attribs in if name <> symbol then Printf.eprintf "UFO_Coupling.of_file: warning: symbol '%s' <> name '%s'\n" symbol name; SMap.add symbol - { name = name; + { name = name; value = string_attrib "value" attribs; order = order_dictionary_attrib "order" attribs } map | _ -> invalid_arg ("UFO_Coupling.of_file: " ^ name_to_string d.S.kind) let of_file couplings = List.fold_left of_file1 SMap.empty couplings end module type Coupling_Order = sig type t = private { name : string; expansion_order : int; hierarchy : int } val of_file : S.t -> t SMap.t val to_string : string -> t -> string end module Coupling_Order : Coupling_Order = struct type t = { name : string; expansion_order : int; hierarchy : int } let to_string symbol c = Printf.sprintf "coupling_order: %s => [name = '%s', \ expansion_order = '%d', \ hierarchy = %d]" symbol c.name c.expansion_order c.hierarchy let of_file1 map d = let symbol = d.S.name in match d.S.kind, d.S.attribs with | [ "CouplingOrder" ], attribs -> SMap.add symbol { name = string_attrib "name" attribs; expansion_order = integer_attrib "expansion_order" attribs; hierarchy = integer_attrib "hierarchy" attribs } map | _ -> invalid_arg ("Coupling_order.of_file: " ^ name_to_string d.S.kind) let of_file coupling_orders = List.fold_left of_file1 SMap.empty coupling_orders end module type Lorentz_UFO = sig type t = private { name : string; spins : int list; structure : UFOx.Lorentz.t } val of_file : S.t -> t SMap.t val to_string : string -> t -> string end module Lorentz_UFO : Lorentz_UFO = struct type t = { name : string; spins : int list; structure : UFOx.Lorentz.t } let to_string symbol l = Printf.sprintf "lorentz: %s => [name = '%s', spins = [%s], \ structure = %s]" symbol l.name (String.concat ", " (List.map string_of_int l.spins)) (UFOx.Lorentz.to_string l.structure) let of_file1 map d = let symbol = d.S.name in match d.S.kind, d.S.attribs with | [ "Lorentz" ], attribs -> SMap.add symbol { name = string_attrib "name" attribs; spins = integer_list_attrib "spins" attribs; structure = UFOx.Lorentz.of_string (string_attrib "structure" attribs) } map | _ -> invalid_arg ("Lorentz.of_file: " ^ name_to_string d.S.kind) let of_file lorentz = List.fold_left of_file1 SMap.empty lorentz end module type Vertex = sig type lcc = private (* Lorentz-color-coupling *) { lorentz : string; color : UFOx.Color.t; coupling : string } type t = private { name : string; particles : string array; lcc : lcc list } val of_file : Particle.t SMap.t -> S.t -> t SMap.t val to_string : string -> t -> string val to_string_expanded : Lorentz_UFO.t SMap.t -> UFO_Coupling.t SMap.t -> t -> string val contains : Particle.t SMap.t -> (Particle.t -> bool) -> t -> bool val filter : (t -> bool) -> t SMap.t -> t SMap.t end module Vertex : Vertex = struct type lcc = { lorentz : string; color : UFOx.Color.t; coupling : string } type t = { name : string; particles : string array; lcc : lcc list } let to_string symbol c = Printf.sprintf "vertex: %s => [name = '%s', particles = [%s], \ - lorentz-color-couplings = [%s]]" + lorentz-color-couplings = [%s]" symbol c.name (String.concat ", " (Array.to_list c.particles)) (String.concat ", " (List.map (fun lcc -> Printf.sprintf "%s * %s * %s" lcc.coupling lcc.lorentz (UFOx.Color.to_string lcc.color)) c.lcc)) let to_string_expanded lorentz couplings c = let expand_lorentz s = try UFOx.Lorentz.to_string (SMap.find s lorentz).Lorentz_UFO.structure with | Not_found -> "?" in Printf.sprintf "expanded: [%s] -> { lorentz-color-couplings = [%s] }" (String.concat ", " (Array.to_list c.particles)) (String.concat ", " (List.map (fun lcc -> Printf.sprintf "%s * %s * %s" lcc.coupling (expand_lorentz lcc.lorentz) (UFOx.Color.to_string lcc.color)) c.lcc)) let contains particles predicate v = let p = v.particles in let rec contains' i = if i < 0 then false else if predicate (SMap.find p.(i) particles) then true else contains' (pred i) in contains' (Array.length p - 1) let force_adj_identity1 adj_indices = function | UFOx.Color_Atom.Identity (a, b) as atom -> begin match List.mem a adj_indices, List.mem b adj_indices with | true, true -> UFOx.Color_Atom.Identity8 (a, b) | false, false -> atom | true, false | false, true -> invalid_arg "force_adj_identity: mixed representations!" end | atom -> atom let force_adj_identity adj_indices tensor = UFOx.Color.map_atoms (force_adj_identity1 adj_indices) tensor let find_adj_indices map particles = let adj_indices = ref [] in Array.iteri (fun i p -> (* We must pattern match against the O'Mega representation, because [UFOx.Color.r] is abstract. *) match UFOx.Color.omega (SMap.find p map).Particle.color with | Color.AdjSUN _ -> adj_indices := succ i :: !adj_indices | _ -> ()) particles; !adj_indices let classify_color_indices map particles = let fund_indices = ref [] and conj_indices = ref [] and adj_indices = ref [] in Array.iteri (fun i p -> (* We must pattern match against the O'Mega representation, because [UFOx.Color.r] is abstract. *) match UFOx.Color.omega (SMap.find p map).Particle.color with | Color.SUN n -> if n > 0 then fund_indices := succ i :: !fund_indices else if n < 0 then conj_indices := succ i :: !conj_indices else failwith "classify_color_indices: SU(0)" | Color.AdjSUN n -> if n <> 0 then adj_indices := succ i :: !adj_indices else failwith "classify_color_indices: SU(0)" | _ -> ()) particles; (!fund_indices, !conj_indices, !adj_indices) (* FIXME: would have expected the opposite order \ldots *) let force_identity1 (fund_indices, conj_indices, adj_indices) = function | UFOx.Color_Atom.Identity (a, b) as atom -> if List.mem a fund_indices then begin if List.mem b conj_indices then UFOx.Color_Atom.Identity (b, a) else invalid_arg "force_adj_identity: mixed representations!" end else if List.mem a conj_indices then begin if List.mem b fund_indices then UFOx.Color_Atom.Identity (a, b) else invalid_arg "force_adj_identity: mixed representations!" end else if List.mem a adj_indices then begin if List.mem b adj_indices then UFOx.Color_Atom.Identity8 (a, b) else invalid_arg "force_adj_identity: mixed representations!" end else atom | atom -> atom let force_identity indices tensor = UFOx.Color.map_atoms (force_identity1 indices) tensor + (* Here we don't have the Lorentz structures available yet. + Thus we set [fermion_lines = []] for now and correct this + later. *) let of_file1 particle_map map d = let symbol = d.S.name in match d.S.kind, d.S.attribs with | [ "Vertex" ], attribs -> let particles = Array.of_list (name_list_attrib ~strip:"P" "particles" attribs) in let color = let indices = classify_color_indices particle_map particles in Array.of_list (List.map (force_identity indices @@ UFOx.Color.of_string) (string_list_attrib "color" attribs)) and lorentz = Array.of_list (name_list_attrib ~strip:"L" "lorentz" attribs) and couplings_alist = coupling_dictionary_attrib ~strip:"C" "couplings" attribs in let lcc = List.map (fun (i, j, c) -> { lorentz = lorentz.(j); color = color.(i); coupling = c }) couplings_alist in SMap.add symbol { name = string_attrib "name" attribs; particles; lcc } map | _ -> invalid_arg ("Vertex.of_file: " ^ name_to_string d.S.kind) let of_file particles vertices = List.fold_left (of_file1 particles) SMap.empty vertices let filter predicate map = SMap.filter (fun symbol p -> predicate p) map end module type Parameter = sig type nature = private Internal | External type ptype = private Real | Complex type t = private { name : string; nature : nature; ptype : ptype; value : value; texname : string; lhablock : string option; lhacode : int list option; sequence : int } val of_file : S.t -> t SMap.t val to_string : string -> t -> string end module Parameter : Parameter = struct type nature = Internal | External let nature_to_string = function | Internal -> "internal" | External -> "external" let nature_of_string = function | "internal" -> Internal | "external" -> External | s -> invalid_arg ("Parameter.nature_of_string: " ^ s) type ptype = Real | Complex let ptype_to_string = function | Real -> "real" | Complex -> "complex" let ptype_of_string = function | "real" -> Real | "complex" -> Complex | s -> invalid_arg ("Parameter.ptype_of_string: " ^ s) type t = { name : string; nature : nature; ptype : ptype; value : value; texname : string; lhablock : string option; lhacode : int list option; sequence : int } let to_string symbol p = Printf.sprintf "parameter: %s => [#%d, name = '%s', nature = %s, type = %s, \ value = %s, texname = '%s', \ lhablock = %s, lhacode = [%s]]" symbol p.sequence p.name (nature_to_string p.nature) (ptype_to_string p.ptype) (value_to_string p.value) p.texname (match p.lhablock with None -> "???" | Some s -> s) (match p.lhacode with | None -> "" | Some c -> String.concat ", " (List.map string_of_int c)) let of_file1 (map, n) d = let symbol = d.S.name in match d.S.kind, d.S.attribs with | [ "Parameter" ], attribs -> (SMap.add symbol { name = string_attrib "name" attribs; nature = nature_of_string (string_attrib "nature" attribs); ptype = ptype_of_string (string_attrib "type" attribs); value = value_attrib "value" attribs; texname = string_attrib "texname" attribs; lhablock = (try Some (string_attrib "lhablock" attribs) with Not_found -> None); lhacode = (try Some (integer_list_attrib "lhacode" attribs) with Not_found -> None); sequence = n } map, succ n) | _ -> invalid_arg ("Parameter.of_file: " ^ name_to_string d.S.kind) let of_file parameters = let map, _ = List.fold_left of_file1 (SMap.empty, 0) parameters in map end module type Propagator = sig type t = private { name : string; numerator : string; denominator : string } val of_file : S.t -> t SMap.t val to_string : string -> t -> string end module Propagator : Propagator = struct type t = { name : string; numerator : string; denominator : string } let to_string symbol p = Printf.sprintf "propagator: %s => [name = '%s', numerator = '%s', \ denominator = '%s']" symbol p.name p.numerator p.denominator (* The parser will turn [foo = "bar"] into [foo = "bar"."$"], which will be interpreted as a macro definition for [foo] expanding to ["bar"]. The dollar is used to distinguish it from an empty attribute list. This could also be implemented with a union type for the declarations. *) let of_file1 (macros, map) d = let symbol = d.S.name in match d.S.kind, d.S.attribs with | [ "Propagator" ], attribs -> let denominator = begin match find_attrib "denominator" attribs with | S.String s -> s | S.Name [n] -> SMap.find n macros | _ -> invalid_arg "Propagator.denominator: " end in (macros, SMap.add symbol { name = string_attrib "name" attribs; numerator = string_attrib "numerator" attribs; denominator = denominator } map) | [ "$"; s ], [] -> (SMap.add symbol s macros, map) | _ -> invalid_arg ("Propagator:of_file: " ^ name_to_string d.S.kind) let of_file propagators = let _, propagators' = List.fold_left of_file1 (SMap.empty, SMap.empty) propagators in propagators' end module type Decay = sig type t = private { name : string; particle : string; widths : (string list * string) list } val of_file : S.t -> t SMap.t val to_string : string -> t -> string end module Decay : Decay = struct type t = { name : string; particle : string; widths : (string list * string) list } let width_to_string ws = String.concat ", " (List.map (fun (ps, w) -> "(" ^ String.concat ", " ps ^ ") -> '" ^ w ^ "'") ws) let to_string symbol d = Printf.sprintf "decay: %s => [name = '%s', particle = '%s', widths = [%s]]" symbol d.name d.particle (width_to_string d.widths) let of_file1 map d = let symbol = d.S.name in match d.S.kind, d.S.attribs with | [ "Decay" ], attribs -> SMap.add symbol { name = string_attrib "name" attribs; particle = name_attrib ~strip:"P" "particle" attribs; widths = decay_dictionary_attrib "partial_widths" attribs } map | _ -> invalid_arg ("Decay.of_file: " ^ name_to_string d.S.kind) let of_file decays = List.fold_left of_file1 SMap.empty decays end +(* We can read the spinor representations off the + vertices to check for consistency. *) +(* \begin{dubious} + Note that we have to conjugate the representations! + \end{dubious} *) + +let collect_spinor_reps_of_vertex particles lorentz v sets = + List.fold_left + (fun sets' lcc -> + let l = (SMap.find lcc.Vertex.lorentz lorentz).Lorentz_UFO.structure in + List.fold_left + (fun (spinors, conj_spinors as sets'') (i, rep) -> + let p = v.Vertex.particles.(pred i) in + match UFOx.Lorentz.omega rep with + | Coupling.ConjSpinor -> (Sets.String.add p spinors, conj_spinors) + | Coupling.Spinor -> (spinors, Sets.String.add p conj_spinors) + | _ -> sets'') + sets' (UFOx.Lorentz.classify_indices l)) + sets v.Vertex.lcc + +let collect_spinor_reps_of_vertices particles lorentz vertices = + SMap.fold + (fun _ v -> collect_spinor_reps_of_vertex particles lorentz v) + vertices (Sets.String.empty, Sets.String.empty) + let lorentz_reps_of_vertex particles v = ThoList.alist_of_list ~predicate:(not @@ UFOx.Lorentz.rep_trivial) ~offset:1 (List.map (fun p -> (* Why do we need to conjugate??? *) UFOx.Lorentz.rep_conjugate (SMap.find p particles).Particle.spin) (Array.to_list v.Vertex.particles)) +let rep_compatible rep_vertex rep_particle = + let open UFOx.Lorentz in + let open Coupling in + match omega rep_vertex, omega rep_particle with + | (Spinor | ConjSpinor), Majorana -> true + | r1, r2 -> r1 = r2 + +let reps_compatible reps_vertex reps_particles = + List.for_all2 + (fun (iv, rv) (ip, rp) -> iv = ip && rep_compatible rv rp) + reps_vertex reps_particles + let check_lorentz_reps_of_vertex particles lorentz v = let reps_particles = List.sort compare (lorentz_reps_of_vertex particles v) in List.iter (fun lcc -> let l = (SMap.find lcc.Vertex.lorentz lorentz).Lorentz_UFO.structure in let reps_vertex = List.sort compare (UFOx.Lorentz.classify_indices l) in - if reps_vertex <> reps_particles then begin - Printf.printf "%s <> %s\n" + if not (reps_compatible reps_vertex reps_particles) then begin + Printf.eprintf "%s <> %s [%s]\n" (UFOx.Index.classes_to_string UFOx.Lorentz.rep_to_string reps_particles) (UFOx.Index.classes_to_string - UFOx.Lorentz.rep_to_string reps_vertex); - invalid_arg "check_lorentz_reps_of_vertex" + UFOx.Lorentz.rep_to_string reps_vertex) + v.Vertex.name (* [(Vertex.to_string v.Vertex.name v)] *); + (* [invalid_arg "check_lorentz_reps_of_vertex"] *) () end) v.Vertex.lcc let color_reps_of_vertex particles v = ThoList.alist_of_list ~predicate:(not @@ UFOx.Color.rep_trivial) ~offset:1 (List.map (fun p -> (SMap.find p particles).Particle.color) (Array.to_list v.Vertex.particles)) let check_color_reps_of_vertex particles v = let reps_particles = List.sort compare (color_reps_of_vertex particles v) in List.iter (fun lcc -> let reps_vertex = List.sort compare (UFOx.Color.classify_indices lcc.Vertex.color) in if reps_vertex <> reps_particles then begin Printf.printf "%s <> %s\n" (UFOx.Index.classes_to_string UFOx.Color.rep_to_string reps_particles) (UFOx.Index.classes_to_string UFOx.Color.rep_to_string reps_vertex); invalid_arg "check_color_reps_of_vertex" end) v.Vertex.lcc module P = Permutation.Default module type Lorentz = sig type spins = private | Unused | Unique of Coupling.lorentz array | Ambiguous of Coupling.lorentz array SMap.t type t = private { name : string; n : int; spins : spins; - structure : UFOx.Lorentz.t } + structure : UFO_Lorentz.t; + fermion_lines : Coupling.fermion_lines } val permute : P.t -> t -> t val of_lorentz_UFO : Particle.t SMap.t -> Vertex.t SMap.t -> Lorentz_UFO.t SMap.t -> t SMap.t val to_string : string -> t -> string end module Lorentz : Lorentz = struct + let rec lorentz_to_string = function + | Coupling.Scalar -> "Scalar" + | Coupling.Spinor -> "Spinor" + | Coupling.ConjSpinor -> "ConjSpinor" + | Coupling.Majorana -> "Majorana" + | Coupling.Maj_Ghost -> "Maj_Ghost" + | Coupling.Vector -> "Vector" + | Coupling.Massive_Vector -> "Massive_Vector" + | Coupling.Vectorspinor -> "Vectorspinor" + | Coupling.Tensor_1 -> "Tensor_1" + | Coupling.Tensor_2 -> "Tensor_2" + | Coupling.BRS l -> "BRS(" ^ lorentz_to_string l ^ ")" + (* Unlike UFO, O'Mega distinguishes bewteen spinors and conjugate spinors. However, we can inspect the particles in the vertices in which a Lorentz structure is used to determine the correct quantum numbers. Most model files in the real world contain unused Lorentz - structures. This is not a problem, we can just ignore them. - - TODO: check if UFO files for models with Majorana - fermions need further disambiguation, because the - same Lorentz structure is used for Dirac and Majorana - fermions. *) + structures. This is not a problem, we can just ignore them. *) type spins = | Unused | Unique of Coupling.lorentz array | Ambiguous of Coupling.lorentz array SMap.t type t = { name : string; n : int; spins : spins; - structure : UFOx.Lorentz.t } + structure : UFO_Lorentz.t; + fermion_lines : Coupling.fermion_lines } let permute_spins p = function | Unused -> Unused | Unique s -> Unique (P.array p s) | Ambiguous map -> Ambiguous (SMap.map (P.array p) map) - (* We must permute only the free indices, of course. - Note that we apply the \emph{inverse} permutation to + (* Note that we apply the \emph{inverse} permutation to the indices in order to match the permutation of the particles/spins. *) - let permute_structure n p l = + let permute_structure n p (l, f) = let permuted = P.array (P.inverse p) (Array.init n succ) in let permute_index i = if i > 0 then permuted.(pred i) else i in - UFOx.Lorentz.map_indices permute_index l + (UFO_Lorentz.map_indices permute_index l, + UFO_Lorentz.map_fermion_lines permute_index f) let permute p l = + let structure, fermion_lines = + permute_structure l.n p (l.structure, l.fermion_lines) in { name = l.name ^ "_p" ^ P.to_string (P.inverse p); n = l.n; spins = permute_spins p l.spins; - structure = permute_structure l.n p l.structure } + structure; + fermion_lines } let omega_lorentz_reps n alist = let reps = Array.make n Coupling.Scalar in List.iter (fun (i, rep) -> reps.(pred i) <- UFOx.Lorentz.omega rep) alist; reps let contained lorentz vertex = List.exists (fun lcc1 -> lcc1.Vertex.lorentz = lorentz.Lorentz_UFO.name) vertex.Vertex.lcc (* Find all vertices in with the Lorentz structure [lorentz] is used and build a map from those vertices to the O'Mega Lorentz representations inferred from UFO's Lorentz structure and the [particles] involved. Then scan the bindings and check that we have inferred the same Lorentz representation from all vertices. *) let lorentz_reps_of_structure particles vertices lorentz = let uses = SMap.fold (fun name v acc -> if contained lorentz v then SMap.add name (omega_lorentz_reps (Array.length v.Vertex.particles) (lorentz_reps_of_vertex particles v)) acc else acc) vertices SMap.empty in let variants = ThoList.uniq (List.sort compare (List.map snd (SMap.bindings uses))) in match variants with | [] -> Unused | [s] -> Unique s - | _ -> Ambiguous uses + | _ -> + Printf.eprintf "UFO.Lorentz.lorentz_reps_of_structure: AMBIGUOUS!\n"; + List.iter + (fun variant -> + Printf.eprintf + "UFO.Lorentz.lorentz_reps_of_structure: %s\n" + (ThoList.to_string lorentz_to_string (Array.to_list variant))) + variants; + Ambiguous uses + + let of_lorentz_tensor spins lorentz = + match spins with + | Unique s -> + begin + try + Some (UFO_Lorentz.parse (Array.to_list s) lorentz) + with + | Failure msg -> + begin + prerr_endline msg; + Some (UFO_Lorentz.dummy) + end + end + | Unused -> + Printf.eprintf + "UFO.Lorentz: stripping unused structure %s\n" + (UFOx.Lorentz.to_string lorentz); + None + | Ambiguous _ -> invalid_arg "UFO.Lorentz.of_lorentz_tensor: Ambiguous" let of_lorentz_UFO particles vertices lorentz_UFO = - SMap.map - (fun l -> - { name = l.Lorentz_UFO.name; - n = List.length l.Lorentz_UFO.spins; - spins = lorentz_reps_of_structure particles vertices l; - structure = l.Lorentz_UFO.structure }) - lorentz_UFO - - let rec lorentz_to_string = function - | Coupling.Scalar -> "Scalar" - | Coupling.Spinor -> "Spinor" - | Coupling.ConjSpinor -> "ConjSpinor" - | Coupling.Majorana -> "Majorana" - | Coupling.Maj_Ghost -> "Maj_Ghost" - | Coupling.Vector -> "Vector" - | Coupling.Massive_Vector -> "Massive_Vector" - | Coupling.Vectorspinor -> "Vectorspinor" - | Coupling.Tensor_1 -> "Tensor_1" - | Coupling.Tensor_2 -> "Tensor_2" - | Coupling.BRS l -> "BRS(" ^ lorentz_to_string l ^ ")" + SMap.fold + (fun name l acc -> + let spins = lorentz_reps_of_structure particles vertices l in + match of_lorentz_tensor spins l.Lorentz_UFO.structure with + | None -> acc + | Some structure -> + SMap.add + name + { name = l.Lorentz_UFO.name; + n = List.length l.Lorentz_UFO.spins; + spins; + structure; + fermion_lines = UFO_Lorentz.fermion_lines structure } + acc) + lorentz_UFO SMap.empty let to_string symbol l = Printf.sprintf "lorentz: %s => [name = '%s', spins = %s, \ - structure = %s]" + structure = %s, fermion_lines = %s]" symbol l.name (match l.spins with | Unique s -> "[" ^ String.concat ", " (List.map lorentz_to_string (Array.to_list s)) ^ "]" | Ambiguous _ -> "AMBIGUOUS!" | Unused -> "UNUSED!") - (UFOx.Lorentz.to_string l.structure) + (UFO_Lorentz.to_string l.structure) + (UFO_Lorentz.fermion_lines_to_string l.fermion_lines) end type t = { particles : Particle.t SMap.t; particle_array : Particle.t array; (* for diagnostics *) couplings : UFO_Coupling.t SMap.t; coupling_orders : Coupling_Order.t SMap.t; vertices : Vertex.t SMap.t; lorentz_UFO : Lorentz_UFO.t SMap.t; lorentz : Lorentz.t SMap.t; parameters : Parameter.t SMap.t; propagators : Propagator.t SMap.t; - decays : Decay.t SMap.t } + decays : Decay.t SMap.t; + nc : int } + +let use_majorana_spinors = ref false + +let fallback_to_majorana_if_necessary particles vertices lorentz_UFO = + let majoranas = + SMap.fold + (fun p particle acc -> + if Particle.is_majorana particle then + Sets.String.add p acc + else + acc) + particles Sets.String.empty in + let spinors, conj_spinors = + collect_spinor_reps_of_vertices particles lorentz_UFO vertices in + let ambiguous = + Sets.String.diff (Sets.String.inter spinors conj_spinors) majoranas in + let no_majoranas = Sets.String.is_empty majoranas + and no_ambiguities = Sets.String.is_empty ambiguous in + if no_majoranas && no_ambiguities && not !use_majorana_spinors then + SMap.mapi + (fun p particle -> + if Sets.String.mem p spinors then + Particle.force_spinor particle + else if Sets.String.mem p conj_spinors then + Particle.force_conjspinor particle + else + particle) + particles + else + begin + if !use_majorana_spinors then + Printf.eprintf "O'Mega: Majorana fermions requested.\n"; + if not no_majoranas then + Printf.eprintf "O'Mega: found Majorana fermions!\n"; + if not no_ambiguities then + Printf.eprintf + "O'Mega: found ambiguous spinor representations for %s!\n" + (String.concat ", " (Sets.String.elements ambiguous)); + Printf.eprintf + "O'Mega: falling back to the Majorana representation for all fermions.\n"; + SMap.map Particle.force_majorana particles + end + +let nc_of_particles particles = + let nc_set = + List.fold_left + (fun nc_set (_, p) -> + match UFOx.Color.omega p.Particle.color with + | Color.Singlet -> nc_set + | Color.SUN nc -> Sets.Int.add (abs nc) nc_set + | Color.AdjSUN nc -> Sets.Int.add (abs nc) nc_set) + Sets.Int.empty (SMap.bindings particles) in + match Sets.Int.elements nc_set with + | [] -> 0 + | [n] -> n + | nc_list -> + invalid_arg + ("UFO.Model: more than one value of N_C: " ^ + String.concat ", " (List.map string_of_int nc_list)) let of_file u = let particles = Particle.of_file u.Files.particles in - let particle_array = Array.of_list (values particles) in - let vertices = Vertex.of_file particles u.Files.vertices in - let lorentz_UFO = Lorentz_UFO.of_file u.Files.lorentz in - let lorentz = Lorentz.of_lorentz_UFO particles vertices lorentz_UFO in + let vertices = Vertex.of_file particles u.Files.vertices + and lorentz_UFO = Lorentz_UFO.of_file u.Files.lorentz in + let particles = + fallback_to_majorana_if_necessary particles vertices lorentz_UFO in + let particle_array = Array.of_list (values particles) + and lorentz = Lorentz.of_lorentz_UFO particles vertices lorentz_UFO in let model = { particles; particle_array; couplings = UFO_Coupling.of_file u.Files.couplings; coupling_orders = Coupling_Order.of_file u.Files.coupling_orders; vertices; lorentz_UFO; lorentz; parameters = Parameter.of_file u.Files.parameters; propagators = Propagator.of_file u.Files.propagators; - decays = Decay.of_file u.Files.decays } in + decays = Decay.of_file u.Files.decays; + nc = nc_of_particles particles } in SMap.iter (fun _ v -> check_color_reps_of_vertex model.particles v; check_lorentz_reps_of_vertex model.particles model.lorentz_UFO v) model.vertices; model let parse_directory dir = of_file (Files.parse_directory dir) let dump model = + Printf.printf "NC = %d\n" model.nc; SMap.iter (print_endline @@@ Particle.to_string) model.particles; SMap.iter (print_endline @@@ UFO_Coupling.to_string_expanded) model.couplings; SMap.iter (print_endline @@@ Coupling_Order.to_string) model.coupling_orders; (* [SMap.iter (print_endline @@@ Vertex.to_string) model.vertices;] *) SMap.iter (fun symbol v -> (print_endline @@@ Vertex.to_string) symbol v; print_endline (Vertex.to_string_expanded model.lorentz_UFO model.couplings v); check_color_reps_of_vertex model.particles v; check_lorentz_reps_of_vertex model.particles model.lorentz_UFO v) model.vertices; SMap.iter (print_endline @@@ Lorentz_UFO.to_string) model.lorentz_UFO; SMap.iter (print_endline @@@ Lorentz.to_string) model.lorentz; SMap.iter (print_endline @@@ Parameter.to_string) model.parameters; SMap.iter (print_endline @@@ Propagator.to_string) model.propagators; SMap.iter (print_endline @@@ Decay.to_string) model.decays; SMap.iter (fun symbol d -> List.iter (fun (_, w) -> ignore (UFOx.Expr.of_string w)) d.Decay.widths) model.decays exception Unhandled of string let unhandled s = raise (Unhandled s) module Model = struct (* NB: we could use [type flavor = Particle.t], but that would be very inefficient, because we will use [flavor] as a key for maps below. *) type flavor = int type constant = string type gauge = unit module M = Modeltools.Mutable (struct type f = flavor type g = gauge type c = constant end) let flavors = M.flavors let external_flavors = M.external_flavors let external_flavors = M.external_flavors let lorentz = M.lorentz let color = M.color + let nc = M.nc let propagator = M.propagator let width = M.width let goldstone = M.goldstone let conjugate = M.conjugate let fermion = M.fermion let vertices = M.vertices let fuse2 = M.fuse2 let fuse3 = M.fuse3 let fuse = M.fuse let max_degree = M.max_degree let parameters = M.parameters let flavor_of_string = M.flavor_of_string let flavor_to_string = M.flavor_to_string let flavor_to_TeX = M.flavor_to_TeX let flavor_symbol = M.flavor_symbol let gauge_symbol = M.gauge_symbol let pdg = M.pdg let mass_symbol = M.mass_symbol let width_symbol = M.width_symbol let constant_symbol = M.constant_symbol module Ch = M.Ch let charges = M.charges let rec fermion_of_lorentz = function | Coupling.Spinor -> 1 | Coupling.ConjSpinor -> -1 - | Coupling.Majorana -> 1 - | Coupling.Maj_Ghost -> 1 + | Coupling.Majorana -> 2 + | Coupling.Maj_Ghost -> 2 | Coupling.Vectorspinor -> 1 | Coupling.Vector | Coupling.Massive_Vector -> 0 | Coupling.Scalar | Coupling.Tensor_1 | Coupling.Tensor_2 -> 0 | Coupling.BRS f -> fermion_of_lorentz f - let rec conjugate_lorentz = function - | Coupling.Spinor -> Coupling.ConjSpinor - | Coupling.ConjSpinor -> Coupling.Spinor - | Coupling.BRS f -> Coupling.BRS (conjugate_lorentz f) - | f -> f - - module F = Modeltools.Fusions (struct - type f = flavor - type c = constant - let compare = compare - let conjugate = conjugate - end) - module Q = Algebra.Q module QC = Algebra.QC let dummy_tensor3 = Coupling.Scalar_Scalar_Scalar 1 let dummy_tensor4 = Coupling.Scalar4 1 let triplet p = (p.(0), p.(1), p.(2)) let quartet p = (p.(0), p.(1), p.(2), p.(3)) let half_times q1 q2 = Q.mul (Q.make 1 2) (Q.mul q1 q2) let name g = g.UFO_Coupling.name let fractional_coupling g r = let g = name g in match Q.to_ratio r with | 0, _ -> "0.0_default" | 1, 1 -> g | -1, 1 -> Printf.sprintf "(-%s)" g | n, 1 -> Printf.sprintf "(%d*%s)" n g | 1, d -> Printf.sprintf "(%s/%d)" g d | -1, d -> Printf.sprintf "(-%s/%d)" g d | n, d -> Printf.sprintf "(%d*%s/%d)" n g d let lorentz_of_symbol model symbol = try SMap.find symbol model.lorentz with | Not_found -> invalid_arg ("lorentz_of_symbol: " ^ symbol) let lorentz_UFO_of_symbol model symbol = try SMap.find symbol model.lorentz_UFO with | Not_found -> invalid_arg ("lorentz_UFO_of_symbol: " ^ symbol) let coupling_of_symbol model symbol = try SMap.find symbol model.couplings with | Not_found -> invalid_arg ("coupling_of_symbol: " ^ symbol) let spin_triplet model name = match (lorentz_of_symbol model name).Lorentz.spins with | Lorentz.Unique [|s0; s1; s2|] -> (s0, s1, s2) | Lorentz.Unique _ -> invalid_arg "spin_triplet: wrong number of spins" | Lorentz.Unused -> invalid_arg "spin_triplet: Unused" | Lorentz.Ambiguous _ -> invalid_arg "spin_triplet: Ambiguous" let spin_quartet model name = match (lorentz_of_symbol model name).Lorentz.spins with | Lorentz.Unique [|s0; s1; s2; s3|] -> (s0, s1, s2, s3) | Lorentz.Unique _ -> invalid_arg "spin_quartet: wrong number of spins" | Lorentz.Unused -> invalid_arg "spin_quartet: Unused" | Lorentz.Ambiguous _ -> invalid_arg "spin_quartet: Ambiguous" let spin_multiplet model name = match (lorentz_of_symbol model name).Lorentz.spins with | Lorentz.Unique sarray -> sarray | Lorentz.Unused -> invalid_arg "spin_multiplet: Unused" | Lorentz.Ambiguous _ -> invalid_arg "spin_multiplet: Ambiguous" - let force_integer q = - try - Q.to_integer q - with - | _ -> invalid_arg "translate_color?: non-integer coefficient" - - let pair3_of_indices i j = - match i, j with - | 1, 2 -> Color.P3_12 - | 2, 3 -> Color.P3_23 - | 3, 1 -> Color.P3_31 - | 2, 1 -> Color.P3_21 - | 3, 2 -> Color.P3_32 - | 1, 3 -> Color.P3_13 - | _ -> - if i = j then - invalid_arg "pair3_of_indices: equal" + (* If we have reason to belive that a $\delta_{ab}$-vertex is + an effective $\tr(T_aT_b)$-vertex generated at loop + level, like~$gg\to H\ldots$ in the SM, we should interpret + it as such and use the expression~(6.2) from~\cite{Kilian:2012pz}. *) + + (* AFAIK, there is no way to distinguish these cases directly + in a UFO file. Instead we rely in a heuristic, in which + each massless color octet vector particle or ghost is a gluon + and colorless scalars are potential Higgses. *) + + let is_massless p = + match String.uppercase p.Particle.mass with + | "ZERO" -> true + | _ -> false + + let is_gluon model f = + let p = model.particle_array.(f) in + match UFOx.Color.omega p.Particle.color, + UFOx.Lorentz.omega p.Particle.spin with + | Color.AdjSUN _, Coupling.Vector -> is_massless p + | Color.AdjSUN _, Coupling.Scalar -> + if p.Particle.ghost_number <> 0 then + is_massless p else - invalid_arg "pair3_of_indices: out of range" + false + | _ -> false - let of_rational q = - QC.make q Q.null - - let of_int n = - of_rational (Q.make n 1) - - let translate_color_atom3 c = - let open UFOx.Color_Atom in - match c with - | Identity (i, j) -> Color.Delta3 (pair3_of_indices i j) - | Identity8 (a, b) -> Color.Delta8 (pair3_of_indices a b) - | T (a, i, j) -> Color.T (pair3_of_indices i j) - | F (a, b, c) -> Color.F - | Epsilon (i, j, k) | EpsilonBar (i, j, k) -> Color.Eps - | D (a, b, c) -> invalid_arg "d-tensor not supported yet" - | T6 (a, i, j) -> invalid_arg "T6-tensor not supported yet" - | K6 (i, j, k) -> invalid_arg "K6-tensor not supported yet" - | K6Bar (i, j, k) -> invalid_arg "K6-tensor not supported yet" - - (* TODO: translate [lcc.Vertex.color] to [Color.vertex3], permuting - indices, if necessary. *) - let trivialize_color3 = function - | [ ([], q) ] -> (of_rational q, Color.Trivial3) - | color -> - Printf.eprintf - "translate_color3: trivializing '%s'\n" - (UFOx.Color.to_string color); - (QC.one, Color.Trivial3) - - let translate_color3_legacy color = - (QC.one, Color.Legacy3) - - let translate_color3 = function - | [] -> invalid_arg "translate_color3: empty" - | [ ([], q) ] -> (of_rational q, Color.Trivial3) - | [ ([atom], q) ] -> (of_rational q, translate_color_atom3 atom) - | [ (atoms, q) ] as term -> - failwith - (Printf.sprintf - "translate_color3: nonatomic term '%s' not supported yet!" - (UFOx.Color.to_string term)) - | terms -> - failwith - (Printf.sprintf - "translate_color3: sum '%s' not supported yet!" - (UFOx.Color.to_string terms)) - - let translate_color3_mostly_legacy color = - let open UFOx.Color_Atom in - match color with - | [] -> invalid_arg "translate_color3_mostly_legacy: empty" - | [ ([], q) ] -> (of_rational q, Color.Trivial3) - | [ ([Identity (i, j)], q) ] -> - (of_rational q, Color.Delta3 (pair3_of_indices i j)) - | [ ([F (a, b, c)], q) ] -> - let eps = Combinatorics.sign [a;b;c] in - (QC.mul (of_int eps) (of_rational q), Color.F) - | _ -> (QC.one, Color.Legacy3) - - (* TODO: translate [lcc.Vertex.color] to [Color.vertex4], permuting - indices, if necessary. *) - let trivialize_color4 = function - | [ ([], q) ] -> (of_rational q, Color.Trivial4) - | color -> - Printf.eprintf - "translate_color4: trivializing '%s'\n" - (UFOx.Color.to_string color); - (QC.one, Color.Trivial4) - - let translate_color4_legacy color = - (QC.one, Color.Legacy4) - - let translate_color4 = function - | [] -> invalid_arg "translate_color4: empty" - | [ ([], q) ] -> (of_rational q, Color.Trivial4) - | [ ([atom], q) ] as term -> - failwith - (Printf.sprintf - "translate_color4: atomic terms '%s' not supported yet!" - (UFOx.Color.to_string term)) - | [ ([atom1; atom2], q) ] as term -> - failwith - (Printf.sprintf - "translate_color4: twoatomic terms '%s' not supported yet!" - (UFOx.Color.to_string term)) - | [ (atoms, q) ] as term -> - failwith - (Printf.sprintf - "translate_color4: multiatomic terms '%s' not supported yet!" - (UFOx.Color.to_string term)) - | terms -> - failwith - (Printf.sprintf - "translate_color4: sum '%s' not supported yet!" - (UFOx.Color.to_string terms)) - - let cmp_int i j = - if i < j then - -1 - else if i = j then - 0 + let is_color_singlet model f = + let p = model.particle_array.(f) in + match UFOx.Color.omega p.Particle.color with + | Color.Singlet -> true + | _ -> false + + let is_higgs_gluon_vertex model p adjoints = + if Array.length p > List.length adjoints then + List.for_all + (fun (i, p) -> + if List.mem i adjoints then + is_gluon model p + else + is_color_singlet model p) + (ThoList.enumerate 1 (Array.to_list p)) else - 1 + false - (* FIXME: verify that this does the right thing! *) - (* FIXME: this will need to be generalized for vertices - with more than 4 legs! *) - let permutation_of_ff indices1 indices2 = - let eps1, indices1 = Combinatorics.sort_signed ~cmp:cmp_int indices1 - and eps2, indices2 = Combinatorics.sort_signed ~cmp:cmp_int indices2 in - let eps = eps1 * eps2 - and indices1, indices2 = - if ThoList.lexicographic ~cmp:cmp_int indices1 indices2 < 0 then - (indices1, indices2) - else - (indices2, indices1) in - match indices1, indices2 with - | [a; a1; a2], [a'; a3; a4] -> - if a > 0 || a' > 0 || a <> a' then - invalid_arg "permutation_of_ff: no summation index" - else if a1 < 1 || a3 < 1 then - invalid_arg "permutation_of_ff: to many summation indices" - else if eps < 0 then - Color.FF ((a1, a2), (a4, a3)) - else - Color.FF ((a1, a2), (a3, a4)) - | _ -> invalid_arg "permutation_of_ff" + let delta8_heuristics model p a b = + if is_higgs_gluon_vertex model p [a; b] then + Color.Vertex.delta8_loop a b + else + Color.Vertex.delta8 a b - let translate_color4_legacy_plus_ff color = - let open UFOx.Color_Atom in - match color with - | [ ([F (a, b, c); F (a', b', c')], q) ] as term -> - (of_rational q, permutation_of_ff [a;b;c] [a';b';c']) - | _ -> (QC.one, Color.Legacy4) - - (* Backstop \ldots *) - let translate_color3 = translate_color3_mostly_legacy - let translate_color4 = translate_color4_legacy_plus_ff - - let translate_coupling3_1 model p lcc = - let p = triplet p - and l = lcc.Vertex.lorentz - and s = spin_triplet model lcc.Vertex.lorentz - and c = name (coupling_of_symbol model lcc.Vertex.coupling) - and eps, col = translate_color3 lcc.Vertex.color in - (p, Coupling.UFO3 (eps, l, s, col), c) + let verbatim_higgs_glue = ref false - let translate_coupling3 model p lcc = - List.map (translate_coupling3_1 model p) lcc + let translate_color_atom model p = function + | UFOx.Color_Atom.Identity (i, j) -> Color.Vertex.delta3 i j + | UFOx.Color_Atom.Identity8 (a, b) -> + if !verbatim_higgs_glue then + Color.Vertex.delta8 a b + else + delta8_heuristics model p a b + | UFOx.Color_Atom.T (a, i, j) -> Color.Vertex.t a i j + | UFOx.Color_Atom.F (a, b, c) -> Color.Vertex.f a b c + | UFOx.Color_Atom.D (a, b, c) -> Color.Vertex.d a b c + | UFOx.Color_Atom.Epsilon (i, j, k) -> Color.Vertex.epsilon i j k + | UFOx.Color_Atom.EpsilonBar (i, j, k) -> Color.Vertex.epsilonbar i j k + | UFOx.Color_Atom.T6 (a, i, j) -> Color.Vertex.t6 a i j + | UFOx.Color_Atom.K6 (i, j, k) -> Color.Vertex.k6 i j k + | UFOx.Color_Atom.K6Bar (i, j, k) -> Color.Vertex.k6bar i j k + + let translate_color_term model p = function + | [], q -> + Color.Vertex.scale q Color.Vertex.unit + | [atom], q -> + Color.Vertex.scale q (translate_color_atom model p atom) + | atoms, q -> + let atoms = List.map (translate_color_atom model p) atoms in + Color.Vertex.scale q (Color.Vertex.multiply atoms) + + let translate_color model p terms = + match terms with + | [] -> invalid_arg "translate_color: empty" + | [ term ] -> translate_color_term model p term + | terms -> + Color.Vertex.sum (List.map (translate_color_term model p) terms) - let translate_coupling4_1 model p lcc = - let p = quartet p - and l = lcc.Vertex.lorentz - and s = spin_quartet model lcc.Vertex.lorentz + let translate_coupling_1 model p lcc = + let l = lcc.Vertex.lorentz in + let s = Array.to_list (spin_multiplet model l) + and fl = (SMap.find l model.lorentz).Lorentz.fermion_lines and c = name (coupling_of_symbol model lcc.Vertex.coupling) - and eps, col = translate_color4 lcc.Vertex.color in - (p, Coupling.UFO4 (eps, l, s, col), c) + and col = translate_color model p lcc.Vertex.color in + (Array.to_list p, Coupling.UFO (QC.one, l, s, fl, col), c) - let translate_coupling4 model p lcc = - List.map (translate_coupling4_1 model p) lcc + let translate_coupling model p lcc = + List.map (translate_coupling_1 model p) lcc let long_flavors = ref false module type Lookup = sig type f = private { flavors : flavor list; flavor_of_string : string -> flavor; flavor_of_symbol : string -> flavor; particle : flavor -> Particle.t; flavor_symbol : flavor -> string; conjugate : flavor -> flavor } type flavor_format = | Long | Decimal | Hexadecimal val flavor_format : flavor_format ref val of_model : t -> f end module Lookup : Lookup = struct type f = { flavors : flavor list; flavor_of_string : string -> flavor; flavor_of_symbol : string -> flavor; particle : flavor -> Particle.t; flavor_symbol : flavor -> string; conjugate : flavor -> flavor } type flavor_format = | Long | Decimal | Hexadecimal let flavor_format = ref Hexadecimal let conjugate_of_particle_array particles = Array.init (Array.length particles) (fun i -> let f' = Particle.conjugate particles.(i) in match ThoArray.match_all f' particles with | [i'] -> i' | [] -> invalid_arg ("no charge conjugate: " ^ f'.Particle.name) | _ -> invalid_arg ("multiple charge conjugates: " ^ f'.Particle.name)) let invert_flavor_array a = let table = SHash.create 37 in Array.iteri (fun i s -> SHash.add table s i) a; (fun name -> try SHash.find table name with | Not_found -> invalid_arg ("not found: " ^ name)) let digits base n = let rec digits' acc n = if n < 1 then acc else digits' (succ acc) (n / base) in if n < 0 then digits' 1 (-n) else if n = 0 then 1 else digits' 0 n let of_model model = let particle_array = Array.of_list (values model.particles) in let conjugate_array = conjugate_of_particle_array particle_array and name_array = Array.map (fun f -> f.Particle.name) particle_array and symbol_array = Array.of_list (keys model.particles) in let flavor_symbol f = begin match !flavor_format with | Long -> symbol_array.(f) | Decimal -> let w = digits 10 (Array.length particle_array - 1) in Printf.sprintf "%0*d" w f | Hexadecimal -> let w = digits 16 (Array.length particle_array - 1) in Printf.sprintf "%0*X" w f end in { flavors = ThoList.range 0 (Array.length particle_array - 1); flavor_of_string = invert_flavor_array name_array; flavor_of_symbol = invert_flavor_array symbol_array; particle = Array.get particle_array; flavor_symbol = flavor_symbol; conjugate = Array.get conjugate_array } end (* \begin{dubious} We appear to need to conjugate all flavors. Why??? \end{dubious} *) let translate_vertices model tables = - List.fold_left - (fun (v3, v4, vn) v -> - let p = Array.map tables.Lookup.flavor_of_symbol v.Vertex.particles - and lcc = v.Vertex.lcc in - let p = Array.map conjugate p in (* FIXME: why? *) - match Array.length p with - | 3 -> (translate_coupling3 model p lcc @ v3, v4, vn) - | 4 -> (v3, translate_coupling4 model p lcc @ v4, vn) - | _ -> invalid_arg "UFO.Model.init: only 3- and 4-vertices for now!") - ([], [], []) (values model.vertices) + let vn = + List.fold_left + (fun acc v -> + let p = Array.map tables.Lookup.flavor_of_symbol v.Vertex.particles + and lcc = v.Vertex.lcc in + let p = Array.map conjugate p in (* FIXME: why? *) + translate_coupling model p lcc @ acc) + [] (values model.vertices) in + ([], [], vn) let propagator_of_lorentz = function | Coupling.Scalar -> Coupling.Prop_Scalar | Coupling.Spinor -> Coupling.Prop_Spinor | Coupling.ConjSpinor -> Coupling.Prop_ConjSpinor | Coupling.Majorana -> Coupling.Prop_Majorana | Coupling.Maj_Ghost -> invalid_arg "UFO.Model.propagator_of_lorentz: SUSY ghosts do not propagate" | Coupling.Vector -> Coupling.Prop_Feynman | Coupling.Massive_Vector -> Coupling.Prop_Unitarity | Coupling.Vectorspinor -> invalid_arg "UFO.Model.propagator_of_lorentz: Vectorspinor" | Coupling.Tensor_1 -> invalid_arg "UFO.Model.propagator_of_lorentz: Tensor_1" | Coupling.Tensor_2 -> invalid_arg "UFO.Model.propagator_of_lorentz: Tensor_2" | Coupling.BRS _ -> invalid_arg "UFO.Model.propagator_of_lorentz: no BRST" let filter_unphysical model = let physical_particles = Particle.filter Particle.is_physical model.particles in let physical_particle_array = Array.of_list (values physical_particles) in let physical_vertices = Vertex.filter (not @@ (Vertex.contains model.particles (not @@ Particle.is_physical))) model.vertices in { model with particles = physical_particles; particle_array = physical_particle_array; vertices = physical_vertices } let whizard_constants = [ "ZERO" ] let filter_constants parameters = List.filter (fun p -> not (List.mem (String.uppercase p.Parameter.name) whizard_constants)) parameters let classify_parameters model = let compare_parameters p1 p2 = compare p1.Parameter.sequence p2.Parameter.sequence in - let rec classify (input, derived) = function - | [] -> (List.sort compare_parameters input, - List.sort compare_parameters derived) - | p :: rest -> - classify (match p.Parameter.nature with - | Parameter.Internal -> (input, p :: derived) - | Parameter.External -> (p :: input, derived)) rest in - classify ([], []) (filter_constants (values model.parameters)) + let input, derived = + List.fold_left + (fun (input, derived) p -> + match p.Parameter.nature with + | Parameter.Internal -> (input, p :: derived) + | Parameter.External -> + begin match p.Parameter.ptype with + | Parameter.Real -> () + | Parameter.Complex -> + Printf.eprintf + "UFO warning: invalid complex declaration of input \ + parameter `%s' ignored!\n" + p.Parameter.name + end; + (p :: input, derived)) + ([], []) (filter_constants (values model.parameters)) in + (List.sort compare_parameters input, + List.sort compare_parameters derived) + + let translate_name map name = + try SMap.find name map with Not_found -> name - let translate_input p = - (p.Parameter.name, value_to_float p.Parameter.value) + let translate_input map p = + (translate_name map p.Parameter.name, value_to_float p.Parameter.value) let alpha_s_half e = UFOx.Expr.substitute "aS" (UFOx.Expr.half "aS") e - let translate_derived p = + let alpha_s_half_etc map e = + UFOx.Expr.rename (map_to_alist map) (alpha_s_half e) + + let translate_derived map p = let make_atom s = s in - let c = make_atom p.Parameter.name in - let v = - value_to_coupling alpha_s_half make_atom p.Parameter.value in + let c = make_atom (translate_name map p.Parameter.name) + and v = + value_to_coupling (alpha_s_half_etc map) make_atom p.Parameter.value in match p.Parameter.ptype with | Parameter.Real -> (Coupling.Real c, v) | Parameter.Complex -> (Coupling.Complex c, v) - let translate_coupling_constant c = + let translate_coupling_constant map c = let make_atom s = s in (Coupling.Complex c.UFO_Coupling.name, - Coupling.Quot (value_to_coupling alpha_s_half make_atom (String c.UFO_Coupling.value), - Coupling.I)) + Coupling.Quot + (value_to_coupling + (alpha_s_half_etc map) make_atom + (String c.UFO_Coupling.value), + Coupling.I)) + + module LCP = + struct + type elt = string + type base = string + let compare_elt = compare + let compare_base = compare + let pi = String.lowercase + end + + module LCB = Bundle.Make (LCP) + + let coupling_names model = + SMap.fold + (fun _ c acc -> c.UFO_Coupling.name :: acc) + model.couplings [] + + let parameter_names model = + SMap.fold + (fun _ c acc -> c.Parameter.name :: acc) + model.parameters [] + + let ambiguous_parameters model = + let all_names = + List.rev_append (coupling_names model) (parameter_names model) in + let lc_bundle = LCB.of_list all_names in + let lc_set = + List.fold_left + (fun acc s -> Sets.String.add s acc) + Sets.String.empty (LCB.base lc_bundle) + and ambiguities = + List.filter + (fun (_, names) -> List.length names > 1) + (LCB.fibers lc_bundle) in + (lc_set, ambiguities) + + let disambiguate1 lc_set name = + let rec disambiguate1' i = + let name' = Printf.sprintf "%s_%d" name i in + let lc_name' = String.lowercase name' in + if Sets.String.mem lc_name' lc_set then + disambiguate1' (succ i) + else + (Sets.String.add lc_name' lc_set, name') in + disambiguate1' 1 + + let disambiguate lc_set names = + let _, replacements = + List.fold_left + (fun (lc_set', acc) name -> + let lc_set'', name' = disambiguate1 lc_set' name in + (lc_set'', SMap.add name name' acc)) + (lc_set, SMap.empty) names in + replacements let translate_parameters model = + let lc_set, ambiguities = ambiguous_parameters model in + let replacements = + disambiguate lc_set (ThoList.flatmap snd ambiguities) in + SMap.iter + (Printf.eprintf + "warning: case sensitive parameter names: renaming '%s' -> '%s'\n") + replacements; let input_parameters, derived_parameters = classify_parameters model and couplings = values model.couplings in - { Coupling.input = List.map translate_input input_parameters; + { Coupling.input = + List.map (translate_input replacements) input_parameters; Coupling.derived = - List.map translate_derived derived_parameters @ - List.map translate_coupling_constant couplings; + List.map (translate_derived replacements) derived_parameters @ + List.map (translate_coupling_constant replacements) couplings; Coupling.derived_arrays = [] } (* UFO requires us to look up the mass parameter to distinguish between massless and massive vectors. TODO: this is a candidate for another lookup table. *) let lorentz_of_particle p = match UFOx.Lorentz.omega p.Particle.spin with | Coupling.Vector -> begin match String.uppercase p.Particle.mass with | "ZERO" -> Coupling.Vector | _ -> Coupling.Massive_Vector end | s -> s type state = { directory : string; model : t } let initialized = ref None let is_initialized_from dir = match !initialized with | None -> false | Some state -> dir = state.directory let dump_raw = ref false let init dir = let model = filter_unphysical (parse_directory dir) in if !dump_raw then dump model; let tables = Lookup.of_model model in let vertices () = translate_vertices model tables in let particle f = tables.Lookup.particle f in let lorentz f = lorentz_of_particle (particle f) in let gauge_symbol () = "?GAUGE?" in let constant_symbol s = s in let parameters = translate_parameters model in M.setup ~color:(fun f -> UFOx.Color.omega (particle f).Particle.color) + ~nc:(fun () -> model.nc) ~pdg:(fun f -> (particle f).Particle.pdg_code) ~lorentz ~propagator:(fun f -> propagator_of_lorentz (lorentz f)) ~width:(fun f -> Coupling.Constant) ~goldstone:(fun f -> None) ~conjugate:tables.Lookup.conjugate ~fermion:(fun f -> fermion_of_lorentz (lorentz f)) ~vertices ~flavors:[("All Flavors", tables.Lookup.flavors)] ~parameters:(fun () -> parameters) ~flavor_of_string:tables.Lookup.flavor_of_string ~flavor_to_string:(fun f -> (particle f).Particle.name) ~flavor_to_TeX:(fun f -> (particle f).Particle.texname) ~flavor_symbol:tables.Lookup.flavor_symbol ~gauge_symbol ~mass_symbol:(fun f -> (particle f).Particle.mass) ~width_symbol:(fun f -> (particle f).Particle.width) ~constant_symbol; initialized := Some { directory = dir; model = model } let ufo_directory = ref Config.default_UFO_dir let load () = if is_initialized_from !ufo_directory then () else init !ufo_directory let include_all_fusions = ref false let fusions_of_model ?only model = let include_fusion = match !include_all_fusions, only with | true, _ | false, None -> (fun name -> true) | false, Some names -> (fun name -> Sets.String.mem name names) in SMap.fold (fun name l acc -> if include_fusion name then List.fold_left (fun acc p -> let l' = Lorentz.permute p l in match l'.Lorentz.spins with | Lorentz.Unused -> acc | Lorentz.Unique spins -> (l'.Lorentz.name, spins, l'.Lorentz.structure) :: acc | Lorentz.Ambiguous _ -> failwith "fusions: Lorentz.Ambiguous") [] (Permutation.Default.cyclic l.Lorentz.n) @ acc else acc) model.lorentz [] let fusions ?only () = match !initialized with | None -> [] | Some { model = model } -> fusions_of_model ?only model + let include_hadrons = ref true + module Whizard : sig val write : unit -> unit end = struct let write_header dir = Printf.printf "# WHIZARD Model file derived from UFO directory\n"; Printf.printf "# '%s'\n\n" dir; Printf.printf "model \"%s\"\n\n" (Filename.basename dir) let write_input_parameters parameters = let open Parameter in Printf.printf "# Independent (input) Parameters\n"; List.iter (fun p -> Printf.printf "parameter %s = %s\n" p.name (value_to_numeric p.value)) parameters; Printf.printf "\n" let write_derived_parameters parameters = let open Parameter in Printf.printf "# Dependent (derived) Parameters\n"; List.iter (fun p -> Printf.printf "derived %s = %s\n" p.name (value_to_expr alpha_s_half p.value)) - parameters; - Printf.printf "\n" + parameters let write_particles particles = let open Particle in Printf.printf "# Particles\n"; Printf.printf "# NB: hypercharge assignments appear to be unreliable\n"; Printf.printf "# therefore we can't infer the isospin\n"; Printf.printf "# NB: parton-, gauge- & handedness are unavailable\n"; List.iter (fun p -> if not p.is_anti then begin Printf.printf "particle \"%s\" %d ### parton? gauge? left?\n" p.name p.pdg_code; Printf.printf " spin %s charge %s color %s ### isospin?\n" - (UFOx.Lorentz.rep_to_string p.spin) + (UFOx.Lorentz.rep_to_string_whizard p.spin) (charge_to_string p.charge) - (UFOx.Color.rep_to_string p.color); + (UFOx.Color.rep_to_string_whizard p.color); Printf.printf " name \"%s\"\n" p.name; if p.antiname <> p.name then Printf.printf " anti \"%s\"\n" p.antiname; Printf.printf " tex_name \"%s\"\n" p.texname; if p.antiname <> p.name then Printf.printf " tex_anti \"%s\"\n" p.antitexname; Printf.printf " mass %s width %s\n\n" p.mass p.width end) (values particles); Printf.printf "\n" + let write_hadrons () = + Printf.printf "# Hadrons (protons and beam remnants)\n"; + Printf.printf "# NB: these are NOT part of the UFO model\n"; + Printf.printf "# but added for WHIZARD's convenience!\n"; + Printf.printf "particle PROTON 2212\n"; + Printf.printf " spin 1/2 charge 1\n"; + Printf.printf " name p \"p+\"\n"; + Printf.printf " anti pbar \"p-\"\n"; + Printf.printf "particle HADRON_REMNANT 90\n"; + Printf.printf " name hr\n"; + Printf.printf " tex_name \"had_r\"\n"; + Printf.printf "particle HADRON_REMNANT_SINGLET 91\n"; + Printf.printf " name hr1\n"; + Printf.printf " tex_name \"had_r^{(1)}\"\n"; + Printf.printf "particle HADRON_REMNANT_TRIPLET 92\n"; + Printf.printf " color 3\n"; + Printf.printf " name hr3\n"; + Printf.printf " tex_name \"had_r^{(3)}\"\n"; + Printf.printf " anti hr3bar\n"; + Printf.printf " tex_anti \"had_r^{(\\bar 3)}\"\n"; + Printf.printf "particle HADRON_REMNANT_OCTET 93\n"; + Printf.printf " color 8\n"; + Printf.printf " name hr8\n"; + Printf.printf " tex_name \"had_r^{(8)}\"\n"; + Printf.printf "\n" + let write_vertices model vertices = Printf.printf "# Vertices (for phasespace generation only)\n"; Printf.printf "# NB: particles should be sorted increasing in mass.\n"; Printf.printf "# This is NOT implemented yet!\n"; List.iter (fun v -> let particles = String.concat " " (List.map (fun s -> "\"" ^ (SMap.find s model.particles).Particle.name ^ "\"") (Array.to_list v.Vertex.particles)) in Printf.printf "vertex %s\n" particles) (values vertices); Printf.printf "\n" let write () = match !initialized with | None -> failwith "UFO.Whizard.write: UFO model not initialized" | Some { directory = dir; model = model } -> let input_parameters, derived_parameters = classify_parameters model in write_header dir; write_input_parameters input_parameters; write_derived_parameters derived_parameters; write_particles model.particles; + if !include_hadrons then + write_hadrons (); write_vertices model model.vertices; exit 0 end let options = Options.create [ ("UFO_dir", Arg.String (fun name -> ufo_directory := name), "UFO model directory (default: " ^ !ufo_directory ^ ")"); + ("Majorana", Arg.Set use_majorana_spinors, + "use Majorana spinors (must come _before_ exec!)"); + ("verbatim_Hg", Arg.Set verbatim_higgs_glue, + "don't correct the color flows for effective Higgs Gluon couplings"); ("write_WHIZARD", Arg.Unit Whizard.write, "write the WHIZARD model file (required once per model)"); ("long_flavors", Arg.Unit (fun () -> Lookup.flavor_format := Lookup.Long), "write use the UFO flavor names instead of integers"); ("dump", Arg.Set dump_raw, "dump UFO model for debugging the parser (must come _before_ exec!)"); ("all_fusions", Arg.Set include_all_fusions, "include all fusions in the fortran module"); + ("no_hadrons", Arg.Clear include_hadrons, + "don't add any particle not in the UFO file"); + ("add_hadrons", Arg.Set include_hadrons, + "add protons and beam remants for WHIZARD"); ("exec", Arg.Unit load, "load the UFO model files (required _before_ using particles names)"); ("help", Arg.Unit (fun () -> prerr_endline "..."), "print information on the model")] end module type Fortran_Target = sig - val fusion2 : - Algebra.QC.t -> string -> Coupling.lorentz3 -> - string -> string -> string -> string -> string -> Coupling.fuse2 -> unit - val fusion3 : - Algebra.QC.t -> string -> Coupling.lorentz4 -> - string -> string -> string -> string -> string -> - string -> string -> Coupling.fuse3 -> unit - val fusionn : + val fuse : Algebra.QC.t -> string -> Coupling.lorentzn -> string -> string list -> string list -> Coupling.fusen -> unit val lorentz : ?only:Sets.String.t -> Format_Fortran.formatter -> unit -> unit val lorentz_module : - ?only:Sets.String.t -> ?name:string -> + ?only:Sets.String.t -> ?name:string -> ?fortran_module:string -> Format_Fortran.formatter -> unit -> unit end module Targets = struct module Fortran : Fortran_Target = struct open Format_Fortran - let fusion2 = UFO_targets.Fortran.fusion2 - let fusion3 = UFO_targets.Fortran.fusion3 - let fusionn = UFO_targets.Fortran.fusionn + let fuse = UFO_targets.Fortran.fuse let lorentz_functions ff fusions () = List.iter (fun (name, s, l) -> UFO_targets.Fortran.lorentz ff name s l) fusions let lorentz ?only ff () = lorentz_functions ff (Model.fusions ?only ()) () - let lorentz_module ?only ?(name="omega_amplitude_ufo") ff () = + let lorentz_module + ?only ?(name="omega_amplitude_ufo") + ?(fortran_module="omega95") ff () = let printf fmt = fprintf ff fmt and nl = pp_newline ff in printf "module %s" name; nl (); printf " use kinds"; nl (); - printf " use omega95"; nl (); + printf " use %s" fortran_module; nl (); printf " implicit none"; nl (); printf " private"; nl (); let fusions = Model.fusions ?only () in List.iter (fun (name, _, _) -> printf " public :: %s" name; nl ()) fusions; UFO_targets.Fortran.eps4_g4_g44_decl ff (); UFO_targets.Fortran.eps4_g4_g44_init ff (); printf "contains"; nl (); - lorentz_functions ff (Model.fusions ?only ()) (); + lorentz_functions ff fusions (); printf "end module %s" name; nl (); pp_flush ff () end end module type Test = sig - val example : unit -> unit val suite : OUnit.test end -(* \thocwmodulesection{Obsolete} - Kept around as a source of ideas. *) - -module Unused = +module Test : Test = struct - module Q = Algebra.Q + open OUnit - let translate_color_atom c = - let open UFOx.Color_Atom in - match c with - | Identity (i, j) -> 1 - | Identity8 (a, b) -> 1 - | T (a, i, j) -> 1 - | F (a, b, c) -> Combinatorics.sign [a;b;c] - | D (a, b, c) -> invalid_arg "d-tensor not supported yet" - | Epsilon (i, j, k) -> invalid_arg "epsilon-tensor not supported yet" - | EpsilonBar (i, j, k) -> invalid_arg "epsilon-tensor not supported yet" - | T6 (a, i, j) -> invalid_arg "T6-tensor not supported yet" - | K6 (i, j, k) -> invalid_arg "K6-tensor not supported yet" - | K6Bar (i, j, k) -> invalid_arg "K6-tensor not supported yet" - - let translate_color3_1 c = - match c with - | [ ([], q) ] -> q - | [ ([c1], q) ] -> Q.mul q (Q.make (translate_color_atom c1) 1) - | [] -> invalid_arg "translate_color3_1: empty" - | _ -> invalid_arg "translate_color3_1: sums of tensors not supported yet" - - let translate_color3 = function - | [| c |] -> translate_color3_1 c - | c -> - invalid_arg - (Printf.sprintf - "translate_color3: #color structures: %d > 1" (Array.length c)) - - let translate_color3 _ = - Color.Trivial3 - - (* Move the smallest index first, using antisymmetry - in $a,b$ and $c,d$ as well as symmetry in $(ab)(cd)$: *) - let normalize_quartet a b c d = - let a0 = List.hd (List.sort compare [a; b; c; d]) in - if a0 = a then - (a, b, c, d) - else if a0 = b then - (b, a, d, c) - else if a0 = c then - (c, d, a, b) - else - (d, c, b, a) + let lexer s = + UFO_lexer.token (UFO_lexer.init_position "" (Lexing.from_string s)) - (* [FF_1 (q, a, b, c, d)] represents the tensor $q f_{abe}f_{ecd}$ - and we assume that [normalize_quartet] has been applied to the - indices. *) - type color4_1 = - | C3_1 of Q.t - | FF_1 of Q.t * int * int * int * int - - (* [FF123 (q1, q2, q3, a, b, c, d)] represents the tensor triple - $(q_1 f_{abe}f_{ecd}, q_2 f_{ace}f_{edb}, q_3 f_{ade}f_{ecb})$ - and [FF132 (q1, q2, q3, a, b, c, d)] the triple - $(q_1 f_{abe}f_{ecd}, q_2 f_{ade}f_{ecb}, q_3 f_{ace}f_{edb})$ *) - - type color4 = - | C3 of Q.t - | FF123 of Q.t * Q.t * Q.t * int * int * int * int - | FF132 of Q.t * Q.t * Q.t * int * int * int * int - - let q2s q = - match Q.to_ratio q with - | n, 1 -> string_of_int n - | n, d -> string_of_int n ^ "/" ^ string_of_int d - - let color4_to_string = function - | C3 (q) -> q2s q - | FF123 (q1, q2, q3, a, b, c, d) -> - Printf.sprintf - "[%s*f(%d,%d,-1)*f(-1,%d,%d); \ - %s*f(%d,%d,-1)*f(-1,%d,%d); \ - %s*f(%d,%d,-1)*f(-1,%d,%d)]" - (q2s q1) a b c d - (q2s q2) a c d b - (q2s q3) a d b c - | FF132 (q1, q2, q3, a, b, c, d) -> - Printf.sprintf - "[%s*f(%d,%d,-1)*f(-1,%d,%d); \ - %s*f(%d,%d,-1)*f(-1,%d,%d); \ - %s*f(%d,%d,-1)*f(-1,%d,%d)]" - (q2s q1) a b c d - (q2s q2) a d b c - (q2s q3) a c d b - - let translate_color4_1_1 c = - Q.make (translate_color_atom c) 1 - -(* Take two lists of three indices each, find exactly one common index, - check that it is a summation index (i.\,e. not positive) and return - the remaining four indices in normal order (see [normalize_quartet]) - together with the sign of the permutations. *) - let translate_color4_ff abc abc' = - match ThoList.common abc abc' with - | [] -> invalid_arg "translate_color4_ff: not summation index" - | [s] -> - if s >= 1 then - invalid_arg "translate_color4_ff: invalid summation index" - else - begin match (Combinatorics.sort_signed abc, - Combinatorics.sort_signed abc') with - | (eps, [_; b; c]), (eps', [_; b'; c']) -> - let a, b, c, d = normalize_quartet b c b' c' in - FF_1 (Q.make (eps * eps') 1, a, b, c, d) - | _ -> failwith "translate_color4_ff: can't happen" - end - | _ -> - invalid_arg "translate_color4_ff: multiple summation indices" + let suite_lexer_escapes = + "escapes" >::: - exception Unsupported_Color_Atom_Pair of string - let unsupported_color_atom_pair s = - raise (Unsupported_Color_Atom_Pair s) - - let translate_color_atom_pair c1 c2 = - let open UFOx.Color_Atom in - match c1, c2 with - | Identity8 (_, _), _ | _, Identity8 (_, _) -> - unsupported_color_atom_pair "quartic 8-8-couplings" - | Identity (i, j), Identity (i', l') -> - unsupported_color_atom_pair "quartic 3-3bar-couplings" - | T (a, i, j), T (a', i', j') -> - unsupported_color_atom_pair "quartic 3-3bar-couplings" - | F (a, b, c), F (a', b', c') -> - translate_color4_ff [a; b; c] [a'; b'; c'] - | T (a, i, j), F (a', b', c') - | F (a', b', c'), T (a, i, j) -> - unsupported_color_atom_pair "quartic 8-8-3-3bar-couplings" - | Identity (i, j), T (a', i', l') - | T (a', i', l'), Identity (i, j) -> - invalid_arg "open index" - | Identity (i, j), F (a', b', c') - | F (a', b', c'), Identity (i, j) -> - invalid_arg "open index" - | D (a, b, c), _ | _, D (a, b, c) -> - unsupported_color_atom_pair "d-tensor" - | Epsilon (i, j, k), _ | _, Epsilon (i, j, k) - | EpsilonBar (i, j, k), _| _, EpsilonBar (i, j, k) -> - unsupported_color_atom_pair "epsilon-tensor" - | T6 (a, i, j), _ | _, T6 (a, i, j) -> - unsupported_color_atom_pair "T6-tensor" - | K6 (i, j, k), _ | _, K6 (i, j, k) - | K6Bar (i, j, k), _ | _, K6Bar (i, j, k) -> - unsupported_color_atom_pair "K6-tensor" - - let translate_color4_1 c = - match c with - | [ ([], q) ] -> C3_1 (q) - | [ ([c1], q) ] -> - C3_1 (Q.mul q (translate_color4_1_1 c1)) - | [ ([c1; c2], q) ] -> - begin - try - match translate_color_atom_pair c1 c2 with - | FF_1 (eps, a, b, c, d) -> FF_1 (Q.mul q eps, a, b, c, d) - | C3_1 (eps) -> C3_1 (Q.mul q eps) - with - | Unsupported_Color_Atom_Pair s -> - prerr_endline - ("warning: translate_color4: passed through: " ^ - "unsupported color atom pair: " ^ s); - C3_1 Q.unit - end - | _ -> invalid_arg "translate_color4_1: too many atoms" + [ "single-quote" >:: + (fun () -> + assert_equal (UFO_parser.STRING "a'b'c") (lexer "'a\\'b\\'c'")); + + "unterminated" >:: + (fun () -> + assert_raises End_of_file (fun () -> lexer "'a\\'b\\'c")) ] -(*l -We can not handle color tensors on their own, because UFO -allows to exchange signs between color and Lorentz tensors. - -Indeed, the \texttt{FeynRulesSM} file has -\begin{verbatim} - color = [ 'f(-1,1,2)*f(3,4,-1)', - 'f(-1,1,3)*f(2,4,-1)', - 'f(-1,1,4)*f(2,3,-1)' ], - lorentz = [ 'Metric(1,4)*Metric(2,3) - Metric(1,3)*Metric(2,4)', - 'Metric(1,4)*Metric(2,3) - Metric(1,2)*Metric(3,4)', - 'Metric(1,3)*Metric(2,4) - Metric(1,2)*Metric(3,4)' ], - couplings = {(1,1):C.GC_12,(0,0):C.GC_12,(2,2):C.GC_12}) -\end{verbatim} -i.e. -\begin{verbatim} - f(-1,1,2)*f(3,4,-1) * (Metric(1,4)*Metric(2,3) - Metric(1,3)*Metric(2,4)) - + f(-1,1,3)*f(2,4,-1) * (Metric(1,4)*Metric(2,3) - Metric(1,2)*Metric(3,4)) - + f(-1,1,4)*f(2,3,-1) * (Metric(1,3)*Metric(2,4) - Metric(1,2)*Metric(3,4)) -= - f(-1,1,2)*f(3,4,-1) * (Metric(1,4)*Metric(2,3) - Metric(1,3)*Metric(4,2)) - + f(-1,1,3)*f(4,2,-1) * (Metric(1,2)*Metric(3,4) - Metric(1,4)*Metric(3,2)) - + f(-1,1,4)*f(2,3,-1) * (Metric(1,3)*Metric(2,4) - Metric(1,2)*Metric(3,4)) -\end{verbatim} -*) - - let translate_color4 c = - match Array.map translate_color4_1 c with - | [| C3_1 (q) |] -> C3 q - | [| FF_1 (q1, a1, b1, c1, d1); - FF_1 (q2, a2, b2, c2, d2); - FF_1 (q3, a3, b3, c3, d3) |] -> - if Q.abs q1 = Q.abs q2 && Q.abs q2 = Q.abs q3 then - if a1 = a2 && a2 = a3 then - let bcd1 = [b1; c1; d1] - and bcd2 = [b2; c2; d2] - and bcd3 = [b3; c3; d3] in - let eps1 = Combinatorics.sign bcd1 in - let eps2, bcd2 = - let eps = Combinatorics.sign bcd2 in - if eps = eps1 then - (Q.make eps 1, bcd2) - else - (Q.make eps 1, [b2; d2; c2]) - and eps3, bcd3 = - let eps = Combinatorics.sign bcd3 in - if eps = eps1 then - (Q.make eps 1, bcd3) - else - (Q.make eps 1, [b3; d3; c3]) in - if bcd2 = [c1; d1; b1] then - if bcd3 = [d1; b1; c1] then - FF123 (q1, Q.mul eps2 q2, Q.mul eps3 q3, a1, b1, c1, d1) - else - invalid_arg "translate_color4: mismatched indices b, c, d" - else if bcd2 = [d1; b1; c1] then - if bcd3 = [c1; d1; b1] then - FF132 (q1, Q.mul eps2 q2, Q.mul eps3 q3, a1, b1, c1, d1) - else - invalid_arg "translate_color4: mismatched indices b, c, d" - else - invalid_arg "translate_color4: mismatched indices b, c, d" - else - invalid_arg "translate_color4: mismatched indices a" - else - invalid_arg "translate_color4: mismatched couplings" - | c -> - (Printf.eprintf - "warning: translate_color4: passed through #color structures: %d\n" - (Array.length c)); - C3 Q.unit + let suite_lexer = + "lexer" >::: + [suite_lexer_escapes] - let translate_color4 _ = - Color.Trivial4 + let suite = + "UFO" >::: + [suite_lexer] end Index: trunk/omega/src/omega_NMSSM_Hgg.ml =================================================================== --- trunk/omega/src/omega_NMSSM_Hgg.ml (revision 8274) +++ trunk/omega/src/omega_NMSSM_Hgg.ml (revision 8275) @@ -1,36 +1,36 @@ (* omega_NMSSM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner and Felix Braam (parts of this file only) WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23_Majorana)(Targets.Fortran_Majorana) +module O = Omega.Make(Fusion_vintage.Mixed23_Majorana)(Targets.Fortran_Majorana) (Modellib_NMSSM.NMSSM_func(Modellib_NMSSM.NMSSM_Hgg)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/modellib_NoH.ml =================================================================== --- trunk/omega/src/modellib_NoH.ml (revision 8274) +++ trunk/omega/src/modellib_NoH.ml (revision 8275) @@ -1,2916 +1,2920 @@ (* modellib_NoH.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner Marco Sekulla Fabian Bach (only parts of this file) WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Minimal Higgsless Model (Unitarity Gauge)} *) module type NoH_flags = sig val triple_anom : bool val quartic_anom : bool val k_matrix : bool val ckm_present : bool val top_anom : bool val top_anom_4f : bool end module NoH_k_matrix : NoH_flags = struct let triple_anom = false let quartic_anom = false let k_matrix = true let ckm_present = false let top_anom = false let top_anom_4f = false end (* \thocwmodulesection{Minimal Higgsless Model including unitarization} *) module NoH (Flags : NoH_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type f_aux_top = TTGG | TBWA | TBWZ | TTWW | BBWW | (*i top auxiliary field "flavors" *) QGUG | QBUB | QW | DL | DR | QUQD1L | QUQD1R | QUQD8L | QUQD8R type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | Aux_top of int*int*int*bool*f_aux_top (*i lorentz*color*charge*top-side*flavor *) type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib.NoH.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let rec aux_top_flavors (f,l,co,ch) = List.append ( List.map other [ Aux_top(l,co,ch/2,true,f); Aux_top(l,co,ch/2,false,f) ] ) ( if ch > 1 then List.append ( List.map other [ Aux_top(l,co,-ch/2,true,f); Aux_top(l,co,-ch/2,false,f) ] ) ( aux_top_flavors (f,l,co,(ch-2)) ) else [] ) let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = List.append ( ThoList.flatmap snd (external_flavors ()) ) ( ThoList.flatmap aux_top_flavors [ (TTGG,2,1,1); (TBWA,2,0,2); (TBWZ,2,0,2); (TTWW,2,0,1); (BBWW,2,0,1); (QGUG,1,1,1); (QBUB,1,0,1); (QW,1,0,3); (DL,0,0,3); (DR,0,0,3); (QUQD1L,0,0,3); (QUQD1R,0,0,3); (QUQD8L,0,1,3); (QUQD8R,0,1,3) ] ) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz_aux = function | 2 -> Tensor_1 | 1 -> Vector | 0 -> Scalar | _ -> invalid_arg ("NoH.lorentz_aux: wrong value") let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> begin match f with | Aux_top (l,_,_,_,_) -> lorentz_aux l | _ -> Scalar end let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | O (Aux_top (_,co,_,_,_)) -> if co == 0 then Color.Singlet else Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let prop_aux = function | 2 -> Aux_Tensor_1 | 1 -> Aux_Vector | 0 -> Aux_Scalar | _ -> invalid_arg ("NoH.prop_aux: wrong value") let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | Aux_top (l,_,_,_,_) -> prop_aux l end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | Aux_top (l,co,ch,n,f) -> Aux_top (l,co,(-ch),(not n),f) end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 (* Electrical charge, lepton number, baryon number. We could avoid the rationals altogether by multiplying the first and last by 3 \ldots *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("NoH.generation': " ^ string_of_int n) let generation f = if Flags.ckm_present then [] else match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | Phi0 -> 0//1 | Phip -> 1//1 | Phim -> -1//1 | Aux_top (_,_,ch,_,_) -> ch//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Half | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | I_G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_CCQ of int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_TVA_ttA | G_TVA_bbA | G_VLR_ttZ | G_TVA_ttZ | G_TVA_bbZ | G_VLR_btW | G_VLR_tbW | G_TLR_btW | G_TRL_tbW | G_TLR_btWZ | G_TRL_tbWZ | G_TLR_btWA | G_TRL_tbWA | G_TVA_ttWW | G_TVA_bbWW | G_TVA_ttG | G_TVA_ttGG | G_VLR_qGuG | G_VLR_qBuB | G_VLR_qBuB_u | G_VLR_qBuB_d | G_VLR_qBuB_e | G_VL_qBuB_n | G_VL_qW | G_VL_qW_u | G_VL_qW_d | G_SL_DttR | G_SR_DttR | G_SL_DttL | G_SLR_DbtR | G_SL_DbtL | C_quqd1R_bt | C_quqd1R_tb | C_quqd1L_bt | C_quqd1L_tb | C_quqd8R_bt | C_quqd8R_tb | C_quqd8L_bt | C_quqd8L_tb | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | I_G1_AWW | I_G1_ZWW | I_G1_plus_kappa_plus_G4_AWW | I_G1_plus_kappa_plus_G4_ZWW | I_G1_plus_kappa_minus_G4_AWW | I_G1_plus_kappa_minus_G4_ZWW | I_G1_minus_kappa_plus_G4_AWW | I_G1_minus_kappa_plus_G4_ZWW | I_G1_minus_kappa_minus_G4_AWW | I_G1_minus_kappa_minus_G4_ZWW | I_lambda_AWW | I_lambda_ZWW | G5_AWW | G5_ZWW | I_kappa5_AWW | I_kappa5_ZWW | I_lambda5_AWW | I_lambda5_ZWW | Alpha_WWWW0 | Alpha_ZZWW1 | Alpha_WWWW2 | Alpha_ZZWW0 | Alpha_ZZZZ | D_Alpha_ZZWW0_S | D_Alpha_ZZWW0_T | D_Alpha_ZZWW1_S | D_Alpha_ZZWW1_T | D_Alpha_ZZWW1_U | D_Alpha_WWWW0_S | D_Alpha_WWWW0_T | D_Alpha_WWWW0_U | D_Alpha_WWWW2_S | D_Alpha_WWWW2_T | D_Alpha_ZZZZ_S | D_Alpha_ZZZZ_T | Gs | I_Gs | G2 | Mass of flavor | Width of flavor | K_Matrix_Coeff of int | K_Matrix_Pole of int (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | Q_lepton | Q_up | Q_down | G_NC_lepton | G_NC_neutrino | G_NC_up | G_NC_down | G_CC | G_CCQ _ | I_Q_W | I_G_ZWW | I_G1_AWW | I_G1_ZWW | I_G_weak | Half | Unit | I_G1_plus_kappa_plus_G4_AWW | I_G1_plus_kappa_plus_G4_ZWW | I_G1_minus_kappa_plus_G4_AWW | I_G1_minus_kappa_plus_G4_ZWW | I_G1_plus_kappa_minus_G4_AWW | I_G1_plus_kappa_minus_G4_ZWW | I_G1_minus_kappa_minus_G4_AWW | I_G1_minus_kappa_minus_G4_ZWW | I_kappa5_AWW | I_kappa5_ZWW | G5_AWW | G5_ZWW | I_lambda_AWW | I_lambda_ZWW | I_lambda5_AWW | I_lambda5_ZWW | G_TVA_ttA | G_TVA_bbA | G_VLR_ttZ | G_TVA_ttZ | G_TVA_bbZ | G_VLR_btW | G_VLR_tbW | G_TLR_btW | G_TRL_tbW | G_TLR_btWA | G_TRL_tbWA | G_TLR_btWZ | G_TRL_tbWZ | G_VLR_qBuB | G_VLR_qBuB_u | G_VLR_qBuB_d | G_VLR_qBuB_e | G_VL_qBuB_n | G_VL_qW | G_VL_qW_u | G_VL_qW_d | G_SL_DttR | G_SR_DttR | G_SL_DttL | G_SLR_DbtR | G_SL_DbtL | G_TVA_ttWW | G_TVA_bbWW -> (0,1) | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | Alpha_WWWW0 | Alpha_WWWW2 | Alpha_ZZWW0 | Alpha_ZZWW1 | Alpha_ZZZZ | D_Alpha_WWWW0_S | D_Alpha_WWWW0_T | D_Alpha_WWWW0_U | D_Alpha_WWWW2_S | D_Alpha_WWWW2_T | D_Alpha_ZZWW0_S | D_Alpha_ZZWW0_T | D_Alpha_ZZWW1_S | D_Alpha_ZZWW1_T | D_Alpha_ZZWW1_U | D_Alpha_ZZZZ_S | D_Alpha_ZZZZ_T -> (0,2) | Gs | I_Gs | G_TVA_ttG | G_TVA_ttGG | G_VLR_qGuG | C_quqd1R_bt | C_quqd1R_tb | C_quqd1L_bt | C_quqd1L_tb | C_quqd8R_bt | C_quqd8R_tb | C_quqd8L_bt | C_quqd8L_tb -> (1,0) | G2 -> (2,0) (* These constants are not used, hence initialized to zero. *) | Sinthw | Sin2thw | Costhw | Pi | Alpha_QED | G_weak | K_Matrix_Coeff _ | K_Matrix_Pole _ | Mass _ | Width _ | Vev | E -> (0,0) (* \begin{dubious} The current abstract syntax for parameter dependencies is admittedly tedious. Later, there will be a parser for a convenient concrete syntax as a part of a concrete syntax for models. But as these examples show, it should include simple functions. \end{dubious} *) (* \begin{subequations} \begin{align} \alpha_{\text{QED}} &= \frac{1}{137.0359895} \\ \sin^2\theta_w &= 0.23124 \end{align} \end{subequations} *) let input_parameters = [ Alpha_QED, 1. /. 137.0359895; Sin2thw, 0.23124; Mass (G Z), 91.187; Mass (M (N 1)), 0.0; Mass (M (L 1)), 0.51099907e-3; Mass (M (N 2)), 0.0; Mass (M (L 2)), 0.105658389; Mass (M (N 3)), 0.0; Mass (M (L 3)), 1.77705; Mass (M (U 1)), 5.0e-3; Mass (M (D 1)), 3.0e-3; Mass (M (U 2)), 1.2; Mass (M (D 2)), 0.1; Mass (M (U 3)), 174.0; Mass (M (D 3)), 4.2 ] (* \begin{subequations} \begin{align} e &= \sqrt{4\pi\alpha} \\ \sin\theta_w &= \sqrt{\sin^2\theta_w} \\ \cos\theta_w &= \sqrt{1-\sin^2\theta_w} \\ g &= \frac{e}{\sin\theta_w} \\ m_W &= \cos\theta_w m_Z \\ v &= \frac{2m_W}{g} \\ g_{CC} = -\frac{g}{2\sqrt2} &= -\frac{e}{2\sqrt2\sin\theta_w} \\ Q_{\text{lepton}} = -q_{\text{lepton}}e &= e \\ Q_{\text{up}} = -q_{\text{up}}e &= -\frac{2}{3}e \\ Q_{\text{down}} = -q_{\text{down}}e &= \frac{1}{3}e \\ \ii q_We = \ii g_{\gamma WW} &= \ii e \\ \ii g_{ZWW} &= \ii g \cos\theta_w \\ \ii g_{WWW} &= \ii g \end{align} \end{subequations} *) let derived_parameters = - [ Real E, Sqrt (Prod [Const 4; Atom Pi; Atom Alpha_QED]); + [ Real E, Sqrt (Prod [Integer 4; Atom Pi; Atom Alpha_QED]); Real Sinthw, Sqrt (Atom Sin2thw); - Real Costhw, Sqrt (Diff (Const 1, Atom Sin2thw)); + Real Costhw, Sqrt (Diff (Integer 1, Atom Sin2thw)); Real G_weak, Quot (Atom E, Atom Sinthw); Real (Mass (G Wp)), Prod [Atom Costhw; Atom (Mass (G Z))]; - Real Vev, Quot (Prod [Const 2; Atom (Mass (G Wp))], Atom G_weak); + Real Vev, Quot (Prod [Integer 2; Atom (Mass (G Wp))], Atom G_weak); Real Q_lepton, Atom E; - Real Q_up, Prod [Quot (Const (-2), Const 3); Atom E]; - Real Q_down, Prod [Quot (Const 1, Const 3); Atom E]; - Real G_CC, Neg (Quot (Atom G_weak, Prod [Const 2; Sqrt (Const 2)])); + Real Q_up, Prod [Quot (Integer (-2), Integer 3); Atom E]; + Real Q_down, Prod [Quot (Integer 1, Integer 3); Atom E]; + Real G_CC, Neg (Quot (Atom G_weak, Prod [Integer 2; Sqrt (Integer 2)])); Complex I_Q_W, Prod [I; Atom E]; Complex I_G_weak, Prod [I; Atom G_weak]; Complex I_G_ZWW, Prod [I; Atom G_weak; Atom Costhw] ] (* \begin{equation} - \frac{g}{2\cos\theta_w} \end{equation} *) let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) (* \begin{subequations} \begin{align} - \frac{g}{2\cos\theta_w} g_V &= - \frac{g}{2\cos\theta_w} (T_3 - 2 q \sin^2\theta_w) \\ - \frac{g}{2\cos\theta_w} g_A &= - \frac{g}{2\cos\theta_w} T_3 \end{align} \end{subequations} *) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* \begin{equation} \mathcal{L}_{\textrm{EM}} = - e \sum_i q_i \bar\psi_i\fmslash{A}\psi_i \end{equation} *) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{NC}} = - \frac{g}{2\cos\theta_W} \sum_i \bar\psi_i\fmslash{Z}(g_V^i-g_A^i\gamma_5)\psi_i \end{equation} *) let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents' n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents'' n = List.map mgm [ ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents_triv = ThoList.flatmap charged_currents' [1;2;3] @ ThoList.flatmap charged_currents'' [1;2;3] let charged_currents_ckm = let charged_currents_2 n1 n2 = List.map mgm [ ((D (-n1), Wm, U n2), FBF (1, Psibar, VL, Psi), G_CCQ (n2,n1)); ((U (-n1), Wp, D n2), FBF (1, Psibar, VL, Psi), G_CCQ (n1,n2)) ] in ThoList.flatmap charged_currents' [1;2;3] @ List.flatten (Product.list2 charged_currents_2 [1;2;3] [1;2;3]) (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let standard_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] (* \begin{multline} \mathcal{L}_{\textrm{TGC}}(g_1,\kappa) = g_1 \mathcal{L}_T(V,W^+,W^-) \\ + \frac{\kappa+g_1}{2} \Bigl(\mathcal{L}_T(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr)\\ + \frac{\kappa-g_1}{2} \Bigl(\mathcal{L}_L(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr) \end{multline} *) (* \begin{dubious} The whole thing in the LEP2 workshop notation: \begin{multline} \ii\mathcal{L}_{\textrm{TGC},V} / g_{WWV} = \\ g_1^V V^\mu (W^-_{\mu\nu}W^{+,\nu}-W^+_{\mu\nu}W^{-,\nu}) + \kappa_V W^+_\mu W^-_\nu V^{\mu\nu} + \frac{\lambda_V}{m_W^2} V_{\mu\nu} W^-_{\rho\mu} W^{+,\hphantom{\nu}\rho}_{\hphantom{+,}\nu} \\ + \ii g_5^V \epsilon_{\mu\nu\rho\sigma} \left( (\partial^\rho W^{-,\mu}) W^{+,\nu} - W^{-,\mu}(\partial^\rho W^{+,\nu}) \right) V^\sigma \\ + \ii g_4^V W^-_\mu W^+_\nu (\partial^\mu V^\nu + \partial^\nu V^\mu) - \frac{\tilde\kappa_V}{2} W^-_\mu W^+_\nu \epsilon^{\mu\nu\rho\sigma} V_{\rho\sigma} - \frac{\tilde\lambda_V}{2m_W^2} W^-_{\rho\mu} W^{+,\mu}_{\hphantom{+,\mu}\nu} \epsilon^{\nu\rho\alpha\beta} V_{\alpha\beta} \end{multline} using the conventions of Itzykson and Zuber with $\epsilon^{0123} = +1$. \end{dubious} *) (* \begin{dubious} This is equivalent to the notation of Hagiwara et al.~\cite{HPZH87}, if we remember that they have opposite signs for~$g_{WWV}$: \begin{multline} \mathcal{L}_{WWV} / (-g_{WWV}) = \\ \ii g_1^V \left( W^\dagger_{\mu\nu} W^\mu - W^\dagger_\mu W^\mu_{\hphantom{\mu}\nu} \right) V^\nu + \ii \kappa_V W^\dagger_\mu W_\nu V^{\mu\nu} + \ii \frac{\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} V^{\nu\lambda} \\ - g_4^V W^\dagger_\mu W_\nu \left(\partial^\mu V^\nu + \partial^\nu V^\mu \right) + g_5^V \epsilon^{\mu\nu\lambda\sigma} \left( W^\dagger_\mu \stackrel{\leftrightarrow}{\partial_\lambda} W_\nu \right) V_\sigma\\ + \ii \tilde\kappa_V W^\dagger_\mu W_\nu \tilde{V}^{\mu\nu} + \ii\frac{\tilde\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} \tilde{V}^{\nu\lambda} \end{multline} Here $V^\mu$ stands for either the photon or the~$Z$ field, $W^\mu$ is the $W^-$ field, $W_{\mu\nu} = \partial_\mu W_\nu - \partial_\nu W_\mu$, $V_{\mu\nu} = \partial_\mu V_\nu - \partial_\nu V_\mu$, and $\tilde{V}_{\mu\nu} = \frac{1}{2} \epsilon_{\mu\nu\lambda\sigma} V^{\lambda\sigma}$. \end{dubious} *) let anomalous_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_ZWW) ] let triple_gauge = if Flags.triple_anom then anomalous_triple_gauge else standard_triple_gauge (* \begin{equation} \mathcal{L}_{\textrm{QGC}} = - g^2 W_{+,\mu} W_{-,\nu} W_+^\mu W_-^\nu + \ldots \end{equation} *) (* Actually, quartic gauge couplings are a little bit more straightforward using auxiliary fields. Here we have to impose the antisymmetry manually: \begin{subequations} \begin{multline} (W^{+,\mu}_1 W^{-,\nu}_2 - W^{+,\nu}_1 W^{-,\mu}_2) (W^+_{3,\mu} W^-_{4,\nu} - W^+_{3,\nu} W^-_{4,\mu}) \\ = 2(W^+_1W^+_3)(W^-_2W^-_4) - 2(W^+_1W^-_4)(W^-_2W^+_3) \end{multline} also ($V$ can be $A$ or $Z$) \begin{multline} (W^{+,\mu}_1 V^\nu_2 - W^{+,\nu}_1 V^\mu_2) (W^-_{3,\mu} V_{4,\nu} - W^-_{3,\nu} V_{4,\mu}) \\ = 2(W^+_1W^-_3)(V_2V_4) - 2(W^+_1V_4)(V_2W^-_3) \end{multline} \end{subequations} *) (* \begin{subequations} \begin{multline} W^{+,\mu} W^{-,\nu} W^+_\mu W^-_\nu \end{multline} \end{subequations} *) let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2 ] (* \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \left( \frac{g^4}{2}\left( (W^+_\mu W^{-,\mu})^2 + W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} \right)\right.\notag \\ &\qquad\qquad\qquad \left. + \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \\ \mathcal{L}_5 &= \alpha_5 \left( g^4 (W^+_\mu W^{-,\mu})^2 + \frac{g^4}{\cos^2\theta_w} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \end{align} \end{subequations} or \begin{multline} \mathcal{L}_4 + \mathcal{L}_5 = (\alpha_4+2\alpha_5) g^4 \frac{1}{2} (W^+_\mu W^{-,\mu})^2 \\ + 2\alpha_4 g^4 \frac{1}{4} W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} + \alpha_4 \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu \\ + 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \frac{1}{2} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \frac{1}{8} (Z_\mu Z^\mu)^2 \end{multline} and therefore \begin{subequations} \begin{align} \alpha_{(WW)_0} &= (\alpha_4+2\alpha_5) g^4 \\ \alpha_{(WW)_2} &= 2\alpha_4 g^4 \\ \alpha_{(WZ)_0} &= 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{(WZ)_1} &= \alpha_4 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{ZZ} &= (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \end{align} \end{subequations} *) let anomalous_quartic_gauge = if Flags.quartic_anom then List.map qgc [ ((Wm, Wm, Wp, Wp), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4 [1, C_12_34], Alpha_WWWW2); ((Wm, Wp, Z, Z), Vector4 [1, C_12_34], Alpha_ZZWW0); ((Wm, Wp, Z, Z), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_ZZWW1); ((Z, Z, Z, Z), Vector4 [(1, C_12_34); (1, C_13_42); (1, C_14_23)], Alpha_ZZZZ) ] else [] (* In any diagonal channel~$\chi$, the scattering amplitude~$a_\chi(s)$ is unitary iff\footnote{% Trivial proof: \begin{equation} -1 = \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = \frac{\textrm{Im}(a_\chi^*(s))}{ |a_\chi(s)|^2 } = - \frac{\textrm{Im}(a_\chi(s))}{ |a_\chi(s)|^2 } \end{equation} i.\,e.~$\textrm{Im}(a_\chi(s)) = |a_\chi(s)|^2$.} \begin{equation} \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = -1 \end{equation} For a real perturbative scattering amplitude~$r_\chi(s)$ this can be enforced easily--and arbitrarily--by \begin{equation} \frac{1}{a_\chi(s)} = \frac{1}{r_\chi(s)} - \mathrm{i} \end{equation} *) let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_WWWW2_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZWW0_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_14_23)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_13_42); (1, C_12_34)]), D_Alpha_ZZZZ_T)] else [] (*i Thorsten's original implementation of the K matrix, which we keep since it still might be usefull for the future. let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 2, K_Matrix_Pole 2]), Alpha_WWWW2); ((Wm, Wp, Z, Z), Vector4_K_Matrix_tho (0, [(K_Matrix_Coeff 0, K_Matrix_Pole 0); (K_Matrix_Coeff 2, K_Matrix_Pole 2)]), Alpha_ZZWW0); ((Wm, Z, Wp, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 1, K_Matrix_Pole 1]), Alpha_ZZWW1); ((Z, Z, Z, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_ZZZZ) ] else [] i*) let quartic_gauge = standard_quartic_gauge @ anomalous_quartic_gauge @ k_matrix_quartic_gauge (* WK's couplings (apparently, he still intends to divide by $\Lambda^2_{\text{EWSB}}=16\pi^2v_{\mathrm{F}}^2$): \begin{subequations} \begin{align} \mathcal{L}^{\tau}_4 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) + \frac{g^2v_{\mathrm{F}}^2}{4} V_{\mu} V^{\mu} \right\rbrack^2 \\ \mathcal{L}^{\tau}_5 &= \left\lbrack (\partial_{\mu}H)(\partial_{\nu}H) + \frac{g^2v_{\mathrm{F}}^2}{4} V_{\mu} V_{\nu} \right\rbrack^2 \end{align} \end{subequations} with \begin{equation} V_{\mu} V_{\nu} = \frac{1}{2} \left( W^+_{\mu} W^-_{\nu} + W^+_{\nu} W^-_{\mu} \right) + \frac{1}{2\cos^2\theta_{w}} Z_{\mu} Z_{\nu} \end{equation} (note the symmetrization!), i.\,e. \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V_{\nu})^2 \\ \mathcal{L}_5 &= \alpha_5 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V^{\mu})^2 \end{align} \end{subequations} *) let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] (* Anomalous trilinear interactions $f_i f_j V$ : \begin{equation} \Delta\mathcal{L}_{tt\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{t} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) t A_\mu \end{equation} *) let anomalous_ttA = if Flags.top_anom then [ ((M (U (-3)), G Ga, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bb\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{b} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) b A_\mu \end{equation} *) let anomalous_bbA = if Flags.top_anom then [ ((M (D (-3)), G Ga, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttg} = - g_s \frac{\upsilon}{\Lambda^2} \bar{t}\lambda^a i\sigma^{\mu\nu}k_\nu (d_V(k^2)+id_A(k^2)\gamma_5)tG^a_\mu \end{equation} *) let anomalous_ttG = if Flags.top_anom then [ ((M (U (-3)), G Gl, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttG) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{t} \fmslash{Z} (X_L(k^2) P_L + X_R(k^2) P_R) t + \bar{t}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)tZ_\mu\right\rbrack \end{equation} *) let anomalous_ttZ = if Flags.top_anom then [ ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_ttZ); ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2} \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)bZ_\mu \end{equation} *) let anomalous_bbZ = if Flags.top_anom then [ ((M (D (-3)), G Z, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbW} = - \frac{g}{\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\fmslash{W}^-(V_L(k^2) P_L+V_R(k^2) P_R) t + \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)tW^-_\mu\right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbW = if Flags.top_anom then [ ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_tbW); ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, TLRM, Psi), G_TLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, TRLM, Psi), G_TRL_tbW) ] else [] (* quartic fermion-gauge interactions $f_i f_j V_1 V_2$ emerging from gauge-invariant effective operators: \begin{equation} \Delta\mathcal{L}_{ttgg} = - \frac{g_s^2}{2} f_{abc} \frac{\upsilon}{\Lambda^2} \bar{t} \lambda^a \sigma^{\mu\nu} (d_V(k^2)+id_A(k^2)\gamma_5)t G^b_\mu G^c_\nu \end{equation} *) let anomalous_ttGG = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,1,0,true,TTGG)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttGG); ((O (Aux_top (2,1,0,false,TTGG)), G Gl, G Gl), Aux_Gauge_Gauge 1, I_Gs) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWA} = - i\sin\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t A_\mu W^-_\nu \right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbWA = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWA)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWA); ((O (Aux_top (2,0,1,false,TBWA)), G Ga, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWA)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWA); ((O (Aux_top (2,0,-1,false,TBWA)), G Wp, G Ga), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWZ} = - i\cos\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t Z_\mu W^-_\nu \right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbWZ = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWZ)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWZ); ((O (Aux_top (2,0,1,false,TBWZ)), G Z, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWZ)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWZ); ((O (Aux_top (2,0,-1,false,TBWZ)), G Wp, G Z), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{t} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)t W^-_\mu W^+_\nu \end{equation} *) let anomalous_ttWW = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,0,0,true,TTWW)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttWW); ((O (Aux_top (2,0,0,false,TTWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{b} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)b W^-_\mu W^+_\nu \end{equation} *) let anomalous_bbWW = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,0,true,BBWW)), M (D 3)), FBF (1, Psibar, TVA, Psi), G_TVA_bbWW); ((O (Aux_top (2,0,0,false,BBWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* 4-fermion contact terms emerging from operator rewriting: *) let anomalous_top_qGuG_tt = [ ((M (U (-3)), O (Aux_top (1,1,0,true,QGUG)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qGuG) ] let anomalous_top_qGuG_ff n = List.map mom [ ((U (-n), Aux_top (1,1,0,false,QGUG), U n), FBF (1, Psibar, V, Psi), Unit); ((D (-n), Aux_top (1,1,0,false,QGUG), D n), FBF (1, Psibar, V, Psi), Unit) ] let anomalous_top_qGuG = if Flags.top_anom_4f then anomalous_top_qGuG_tt @ ThoList.flatmap anomalous_top_qGuG_ff [1;2;3] else [] let anomalous_top_qBuB_tt = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QBUB)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB) ] let anomalous_top_qBuB_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QBUB), U n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_u); ((D (-n), Aux_top (1,0,0,false,QBUB), D n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_d); ((L (-n), Aux_top (1,0,0,false,QBUB), L n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_e); ((N (-n), Aux_top (1,0,0,false,QBUB), N n), FBF (1, Psibar, VL, Psi), G_VL_qBuB_n) ] let anomalous_top_qBuB = if Flags.top_anom_4f then anomalous_top_qBuB_tt @ ThoList.flatmap anomalous_top_qBuB_ff [1;2;3] else [] let anomalous_top_qW_tq = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (D (-3)), O (Aux_top (1,0,-1,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (U (-3)), O (Aux_top (1,0,1,true,QW)), M (D 3)), FBF (1, Psibar, VL, Psi), G_VL_qW) ] let anomalous_top_qW_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QW), U n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((D (-n), Aux_top (1,0,0,false,QW), D n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((N (-n), Aux_top (1,0,0,false,QW), N n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((L (-n), Aux_top (1,0,0,false,QW), L n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((D (-n), Aux_top (1,0,-1,false,QW), U n), FBF (1, Psibar, VL, Psi), Half); ((U (-n), Aux_top (1,0,1,false,QW), D n), FBF (1, Psibar, VL, Psi), Half); ((L (-n), Aux_top (1,0,-1,false,QW), N n), FBF (1, Psibar, VL, Psi), Half); ((N (-n), Aux_top (1,0,1,false,QW), L n), FBF (1, Psibar, VL, Psi), Half) ] let anomalous_top_qW = if Flags.top_anom_4f then anomalous_top_qW_tq @ ThoList.flatmap anomalous_top_qW_ff [1;2;3] else [] let anomalous_top_DuDd = if Flags.top_anom_4f then [ ((M (U (-3)), O (Aux_top (0,0,0,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,0,false,DR)), M (U 3)), FBF (1, Psibar, SL, Psi), G_SL_DttR); ((M (D (-3)), O (Aux_top (0,0,0,false,DR)), M (D 3)), FBF (1, Psibar, SR, Psi), G_SR_DttR); ((M (U (-3)), O (Aux_top (0,0,0,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (D (-3)), O (Aux_top (0,0,0,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DttL); ((M (D (-3)), O (Aux_top (0,0,-1,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DR)), M (D 3)), FBF (1, Psibar, SLR, Psi), G_SLR_DbtR); ((M (D (-3)), O (Aux_top (0,0,-1,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DbtL) ] else [] let anomalous_top_quqd1_tq = [ ((M (D (-3)), O (Aux_top (0,0,-1,true,QUQD1R)), M (U 3)), FBF (1, Psibar, SR, Psi), C_quqd1R_bt); ((M (U (-3)), O (Aux_top (0,0, 1,true,QUQD1R)), M (D 3)), FBF (1, Psibar, SL, Psi), C_quqd1R_tb); ((M (D (-3)), O (Aux_top (0,0,-1,true,QUQD1L)), M (U 3)), FBF (1, Psibar, SL, Psi), C_quqd1L_bt); ((M (U (-3)), O (Aux_top (0,0, 1,true,QUQD1L)), M (D 3)), FBF (1, Psibar, SR, Psi), C_quqd1L_tb) ] let anomalous_top_quqd1_ff n = List.map mom [ ((U (-n), Aux_top (0,0, 1,false,QUQD1R), D n), FBF (1, Psibar, SR, Psi), Half); ((D (-n), Aux_top (0,0,-1,false,QUQD1R), U n), FBF (1, Psibar, SL, Psi), Half); ((U (-n), Aux_top (0,0, 1,false,QUQD1L), D n), FBF (1, Psibar, SL, Psi), Half); ((D (-n), Aux_top (0,0,-1,false,QUQD1L), U n), FBF (1, Psibar, SR, Psi), Half) ] let anomalous_top_quqd1 = if Flags.top_anom_4f then anomalous_top_quqd1_tq @ ThoList.flatmap anomalous_top_quqd1_ff [1;2;3] else [] let anomalous_top_quqd8_tq = [ ((M (D (-3)), O (Aux_top (0,1,-1,true,QUQD8R)), M (U 3)), FBF (1, Psibar, SR, Psi), C_quqd8R_bt); ((M (U (-3)), O (Aux_top (0,1, 1,true,QUQD8R)), M (D 3)), FBF (1, Psibar, SL, Psi), C_quqd8R_tb); ((M (D (-3)), O (Aux_top (0,1,-1,true,QUQD8L)), M (U 3)), FBF (1, Psibar, SL, Psi), C_quqd8L_bt); ((M (U (-3)), O (Aux_top (0,1, 1,true,QUQD8L)), M (D 3)), FBF (1, Psibar, SR, Psi), C_quqd8L_tb) ] let anomalous_top_quqd8_ff n = List.map mom [ ((U (-n), Aux_top (0,1, 1,false,QUQD8R), D n), FBF (1, Psibar, SR, Psi), Half); ((D (-n), Aux_top (0,1,-1,false,QUQD8R), U n), FBF (1, Psibar, SL, Psi), Half); ((U (-n), Aux_top (0,1, 1,false,QUQD8L), D n), FBF (1, Psibar, SL, Psi), Half); ((D (-n), Aux_top (0,1,-1,false,QUQD8L), U n), FBF (1, Psibar, SR, Psi), Half) ] let anomalous_top_quqd8 = if Flags.top_anom_4f then anomalous_top_quqd8_tq @ ThoList.flatmap anomalous_top_quqd8_ff [1;2;3] else [] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ (if Flags.ckm_present then charged_currents_ckm else charged_currents_triv) @ triple_gauge @ goldstone_vertices @ anomalous_ttA @ anomalous_bbA @ anomalous_ttZ @ anomalous_bbZ @ anomalous_tbW @ anomalous_tbWA @ anomalous_tbWZ @ anomalous_ttWW @ anomalous_bbWW @ anomalous_ttG @ anomalous_ttGG @ anomalous_top_qGuG @ anomalous_top_qBuB @ anomalous_top_qW @ anomalous_top_DuDd @ anomalous_top_quqd1 @ anomalous_top_quqd8) let vertices4 = quartic_gauge let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "Aux_t_ttGG0" -> O (Aux_top (2,1, 0,true,TTGG)) | "Aux_ttGG0" -> O (Aux_top (2,1, 0,false,TTGG)) | "Aux_t_tbWA+" -> O (Aux_top (2,0, 1,true,TBWA)) | "Aux_tbWA+" -> O (Aux_top (2,0, 1,false,TBWA)) | "Aux_t_tbWA-" -> O (Aux_top (2,0,-1,true,TBWA)) | "Aux_tbWA-" -> O (Aux_top (2,0,-1,false,TBWA)) | "Aux_t_tbWZ+" -> O (Aux_top (2,0, 1,true,TBWZ)) | "Aux_tbWZ+" -> O (Aux_top (2,0, 1,false,TBWZ)) | "Aux_t_tbWZ-" -> O (Aux_top (2,0,-1,true,TBWZ)) | "Aux_tbWZ-" -> O (Aux_top (2,0,-1,false,TBWZ)) | "Aux_t_ttWW0" -> O (Aux_top (2,0, 0,true,TTWW)) | "Aux_ttWW0" -> O (Aux_top (2,0, 0,false,TTWW)) | "Aux_t_bbWW0" -> O (Aux_top (2,0, 0,true,BBWW)) | "Aux_bbWW0" -> O (Aux_top (2,0, 0,false,BBWW)) | "Aux_t_qGuG0" -> O (Aux_top (1,1, 0,true,QGUG)) | "Aux_qGuG0" -> O (Aux_top (1,1, 0,false,QGUG)) | "Aux_t_qBuB0" -> O (Aux_top (1,0, 0,true,QBUB)) | "Aux_qBuB0" -> O (Aux_top (1,0, 0,false,QBUB)) | "Aux_t_qW0" -> O (Aux_top (1,0, 0,true,QW)) | "Aux_qW0" -> O (Aux_top (1,0, 0,false,QW)) | "Aux_t_qW+" -> O (Aux_top (1,0, 1,true,QW)) | "Aux_qW+" -> O (Aux_top (1,0, 1,false,QW)) | "Aux_t_qW-" -> O (Aux_top (1,0,-1,true,QW)) | "Aux_qW-" -> O (Aux_top (1,0,-1,false,QW)) | "Aux_t_dL0" -> O (Aux_top (0,0, 0,true,DL)) | "Aux_dL0" -> O (Aux_top (0,0, 0,false,DL)) | "Aux_t_dL+" -> O (Aux_top (0,0, 1,true,DL)) | "Aux_dL+" -> O (Aux_top (0,0, 1,false,DL)) | "Aux_t_dL-" -> O (Aux_top (0,0,-1,true,DL)) | "Aux_dL-" -> O (Aux_top (0,0,-1,false,DL)) | "Aux_t_dR0" -> O (Aux_top (0,0, 0,true,DR)) | "Aux_dR0" -> O (Aux_top (0,0, 0,false,DR)) | "Aux_t_dR+" -> O (Aux_top (0,0, 1,true,DR)) | "Aux_dR+" -> O (Aux_top (0,0, 1,false,DR)) | "Aux_t_dR-" -> O (Aux_top (0,0,-1,true,DR)) | "Aux_dR-" -> O (Aux_top (0,0,-1,false,DR)) | "Aux_t_quqd1L+" -> O (Aux_top (0,0, 1,true,QUQD1L)) | "Aux_quqd1L+" -> O (Aux_top (0,0, 1,false,QUQD1L)) | "Aux_t_quqd1L-" -> O (Aux_top (0,0,-1,true,QUQD1L)) | "Aux_quqd1L-" -> O (Aux_top (0,0,-1,false,QUQD1L)) | "Aux_t_quqd1R+" -> O (Aux_top (0,0, 1,true,QUQD1R)) | "Aux_quqd1R+" -> O (Aux_top (0,0, 1,false,QUQD1R)) | "Aux_t_quqd1R-" -> O (Aux_top (0,0,-1,true,QUQD1R)) | "Aux_quqd1R-" -> O (Aux_top (0,0,-1,false,QUQD1R)) | "Aux_t_quqd8L+" -> O (Aux_top (0,1, 1,true,QUQD8L)) | "Aux_quqd8L+" -> O (Aux_top (0,1, 1,false,QUQD8L)) | "Aux_t_quqd8L-" -> O (Aux_top (0,1,-1,true,QUQD8L)) | "Aux_quqd8L-" -> O (Aux_top (0,1,-1,false,QUQD8L)) | "Aux_t_quqd8R+" -> O (Aux_top (0,1, 1,true,QUQD8R)) | "Aux_quqd8R+" -> O (Aux_top (0,1, 1,false,QUQD8R)) | "Aux_t_quqd8R-" -> O (Aux_top (0,1,-1,true,QUQD8R)) | "Aux_quqd8R-" -> O (Aux_top (0,1,-1,false,QUQD8R)) | _ -> invalid_arg "Modellib.NoH.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib.NoH.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib.NoH.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib.NoH.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib.NoH.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "gl" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | Aux_top (_,_,ch,n,v) -> "Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" | QUQD1L -> "quqd1L" | QUQD1R -> "quqd1R" | QUQD8L -> "quqd8L" | QUQD8R -> "quqd8R" end ) ^ ( if ch > 0 then "+" else if ch < 0 then "-" else "0" ) end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib.NoH.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib.NoH.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib.NoH.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib.NoH.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | Aux_top (_,_,ch,n,v) -> "\\textnormal{Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" | QUQD1L -> "quqd1L" | QUQD1R -> "quqd1R" | QUQD8L -> "quqd8L" | QUQD8R -> "quqd8R" end ) ^ ( if ch > 0 then "^+" else if ch < 0 then "^-" else "^0" ) ^ "}" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | Aux_top (_,_,ch,n,v) -> "aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttgg" | TBWA -> "tbwa" | TBWZ -> "tbwz" | TTWW -> "ttww" | BBWW -> "bbww" | QGUG -> "qgug" | QBUB -> "qbub" | QW -> "qw" | DL -> "dl" | DR -> "dr" | QUQD1L -> "quqd1l" | QUQD1R -> "quqd1r" | QUQD8L -> "quqd8l" | QUQD8R -> "quqd8r" end ) ^ "_" ^ ( if ch > 0 then "p" else if ch < 0 then "m" else "0" ) end let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | Aux_top (_,_,ch,t,f) -> let n = begin match f with | QW -> 0 | QUQD1R -> 1 | QUQD1L -> 2 | QUQD8R -> 3 | QUQD8L -> 4 | _ -> 5 end in (602 + 3*n - ch) * ( if t then (1) else (-1) ) end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Half -> "half" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | I_G_weak -> "ig" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_TVA_ttA -> "gtva_tta" | G_TVA_bbA -> "gtva_bba" | G_VLR_ttZ -> "gvlr_ttz" | G_TVA_ttZ -> "gtva_ttz" | G_TVA_bbZ -> "gtva_bbz" | G_VLR_btW -> "gvlr_btw" | G_VLR_tbW -> "gvlr_tbw" | G_TLR_btW -> "gtlr_btw" | G_TRL_tbW -> "gtrl_tbw" | G_TLR_btWA -> "gtlr_btwa" | G_TRL_tbWA -> "gtrl_tbwa" | G_TLR_btWZ -> "gtlr_btwz" | G_TRL_tbWZ -> "gtrl_tbwz" | G_TVA_ttWW -> "gtva_ttww" | G_TVA_bbWW -> "gtva_bbww" | G_TVA_ttG -> "gtva_ttg" | G_TVA_ttGG -> "gtva_ttgg" | G_VLR_qGuG -> "gvlr_qgug" | G_VLR_qBuB -> "gvlr_qbub" | G_VLR_qBuB_u -> "gvlr_qbub_u" | G_VLR_qBuB_d -> "gvlr_qbub_d" | G_VLR_qBuB_e -> "gvlr_qbub_e" | G_VL_qBuB_n -> "gvl_qbub_n" | G_VL_qW -> "gvl_qw" | G_VL_qW_u -> "gvl_qw_u" | G_VL_qW_d -> "gvl_qw_d" | G_SL_DttR -> "gsl_dttr" | G_SR_DttR -> "gsr_dttr" | G_SL_DttL -> "gsl_dttl" | G_SLR_DbtR -> "gslr_dbtr" | G_SL_DbtL -> "gsl_dbtl" | C_quqd1R_bt -> "c_quqd1_1" | C_quqd1R_tb -> "conjg(c_quqd1_1)" | C_quqd1L_bt -> "conjg(c_quqd1_2)" | C_quqd1L_tb -> "c_quqd1_2" | C_quqd8R_bt -> "c_quqd8_1" | C_quqd8R_tb -> "conjg(c_quqd8_1)" | C_quqd8L_bt -> "conjg(c_quqd8_2)" | C_quqd8L_tb -> "c_quqd8_2" | G_CC -> "gcc" | G_CCQ (n1,n2) -> "gccq" ^ string_of_int n1 ^ string_of_int n2 | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | I_G1_AWW -> "ig1a" | I_G1_ZWW -> "ig1z" | I_G1_plus_kappa_plus_G4_AWW -> "ig1pkpg4a" | I_G1_plus_kappa_plus_G4_ZWW -> "ig1pkpg4z" | I_G1_plus_kappa_minus_G4_AWW -> "ig1pkmg4a" | I_G1_plus_kappa_minus_G4_ZWW -> "ig1pkmg4z" | I_G1_minus_kappa_plus_G4_AWW -> "ig1mkpg4a" | I_G1_minus_kappa_plus_G4_ZWW -> "ig1mkpg4z" | I_G1_minus_kappa_minus_G4_AWW -> "ig1mkmg4a" | I_G1_minus_kappa_minus_G4_ZWW -> "ig1mkmg4z" | I_lambda_AWW -> "ila" | I_lambda_ZWW -> "ilz" | G5_AWW -> "rg5a" | G5_ZWW -> "rg5z" | I_kappa5_AWW -> "ik5a" | I_kappa5_ZWW -> "ik5z" | I_lambda5_AWW -> "il5a" | I_lambda5_ZWW -> "il5z" | Alpha_WWWW0 -> "alww0" | Alpha_WWWW2 -> "alww2" | Alpha_ZZWW0 -> "alzw0" | Alpha_ZZWW1 -> "alzw1" | Alpha_ZZZZ -> "alzz" | D_Alpha_ZZWW0_S -> "dalzz0_s(gkm,mkm," | D_Alpha_ZZWW0_T -> "dalzz0_t(gkm,mkm," | D_Alpha_ZZWW1_S -> "dalzz1_s(gkm,mkm," | D_Alpha_ZZWW1_T -> "dalzz1_t(gkm,mkm," | D_Alpha_ZZWW1_U -> "dalzz1_u(gkm,mkm," | D_Alpha_WWWW0_S -> "dalww0_s(gkm,mkm," | D_Alpha_WWWW0_T -> "dalww0_t(gkm,mkm," | D_Alpha_WWWW0_U -> "dalww0_u(gkm,mkm," | D_Alpha_WWWW2_S -> "dalww2_s(gkm,mkm," | D_Alpha_WWWW2_T -> "dalww2_t(gkm,mkm," | D_Alpha_ZZZZ_S -> "dalz4_s(gkm,mkm," | D_Alpha_ZZZZ_T -> "dalz4_t(gkm,mkm," | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f | K_Matrix_Coeff i -> "kc" ^ string_of_int i | K_Matrix_Pole i -> "kp" ^ string_of_int i end (* \thocwmodulesection{Minimal Higgsless Model including additional Resonances} *) module AltH (Flags : NoH_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type f_aux_top = TTGG | TBWA | TBWZ | TTWW | BBWW | (*i top auxiliary field "flavors" *) QGUG | QBUB | QW | DL | DR type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | Rsigma | Rphin | Rphip | Rphim | Rphipp | Rphimm | Rf | Rtn | Rtp | Rtm | Rtpp | Rtmm | Aux_top of int*int*int*bool*f_aux_top (*i lorentz*color*charge*top-side*flavor *) type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_NoH.AltH.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let rec aux_top_flavors (f,l,co,ch) = List.append ( List.map other [ Aux_top(l,co,ch/2,true,f); Aux_top(l,co,ch/2,false,f) ] ) ( if ch > 1 then List.append ( List.map other [ Aux_top(l,co,-ch/2,true,f); Aux_top(l,co,-ch/2,false,f) ] ) ( aux_top_flavors (f,l,co,(ch-2)) ) else [] ) let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Scalar Resonances", List.map other [Rsigma; Rphin; Rphip; Rphim; Rphipp; Rphimm]; "Tensor Resonances", List.map other [Rf; Rtn; Rtp; Rtm; Rtpp; Rtmm]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = List.append ( ThoList.flatmap snd (external_flavors ()) ) ( ThoList.flatmap aux_top_flavors [ (TTGG,2,1,1); (TBWA,2,0,2); (TBWZ,2,0,2); (TTWW,2,0,1); (BBWW,2,0,1); (QGUG,1,1,1); (QBUB,1,0,1); (QW,1,0,3); (DL,0,0,3); (DR,0,0,3) ] ) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz_aux = function | 2 -> Tensor_1 | 1 -> Vector | 0 -> Scalar | _ -> invalid_arg ("SM.lorentz_aux: wrong value") let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> begin match f with | Aux_top (l,_,_,_,_) -> lorentz_aux l | Rf | Rtn | Rtp | Rtm | Rtpp | Rtmm -> Tensor_2 | _ -> Scalar end let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | O (Aux_top (_,co,_,_,_)) -> if co == 0 then Color.Singlet else Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let prop_aux = function | 2 -> Aux_Tensor_1 | 1 -> Aux_Vector | 0 -> Aux_Scalar | _ -> invalid_arg ("SM.prop_aux: wrong value") let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | Rsigma -> Prop_Scalar | Rphin | Rphip | Rphim | Rphipp | Rphimm -> Prop_Scalar | Rf -> Prop_Tensor_2 | Rtn | Rtp | Rtm | Rtpp | Rtmm -> Prop_Tensor_2 | Aux_top (l,_,_,_,_) -> prop_aux l end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | Rsigma -> Rsigma | Rphin -> Rphin | Rphip -> Rphim | Rphim -> Rphip | Rphipp -> Rphimm | Rphimm -> Rphipp | Rf -> Rf | Rtn -> Rtn | Rtp -> Rtm | Rtm -> Rtp | Rtpp -> Rtmm | Rtmm -> Rtpp | Aux_top (l,co,ch,n,f) -> Aux_top (l,co,(-ch),(not n),f) end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 (* Electrical charge, lepton number, baryon number. We could avoid the rationals altogether by multiplying the first and last by 3 \ldots *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("SM.generation': " ^ string_of_int n) let generation f = if Flags.ckm_present then [] else match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | Rsigma | Phi0 | Rphin | Rf | Rtn -> 0//1 | Phip | Rphip | Rtp -> 1//1 | Phim | Rphim | Rtm -> -1//1 | Rphipp | Rtpp -> 2//1 | Rphimm | Rtmm -> -2//1 | Aux_top (_,_,ch,_,_) -> ch//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Half | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | I_G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_CCQ of int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_TVA_ttA | G_TVA_bbA | G_VLR_ttZ | G_TVA_ttZ | G_TVA_bbZ | G_VLR_btW | G_VLR_tbW | G_TLR_btW | G_TRL_tbW | G_TLR_btWZ | G_TRL_tbWZ | G_TLR_btWA | G_TRL_tbWA | G_TVA_ttWW | G_TVA_bbWW | G_TVA_ttG | G_TVA_ttGG | G_VLR_qGuG | G_VLR_qBuB | G_VLR_qBuB_u | G_VLR_qBuB_d | G_VLR_qBuB_e | G_VL_qBuB_n | G_VL_qW | G_VL_qW_u | G_VL_qW_d | G_SL_DttR | G_SR_DttR | G_SL_DttL | G_SLR_DbtR | G_SL_DbtL | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | I_G1_AWW | I_G1_ZWW | I_G1_plus_kappa_plus_G4_AWW | I_G1_plus_kappa_plus_G4_ZWW | I_G1_plus_kappa_minus_G4_AWW | I_G1_plus_kappa_minus_G4_ZWW | I_G1_minus_kappa_plus_G4_AWW | I_G1_minus_kappa_plus_G4_ZWW | I_G1_minus_kappa_minus_G4_AWW | I_G1_minus_kappa_minus_G4_ZWW | I_lambda_AWW | I_lambda_ZWW | G5_AWW | G5_ZWW | I_kappa5_AWW | I_kappa5_ZWW | I_lambda5_AWW | I_lambda5_ZWW | Alpha_WWWW0 | Alpha_ZZWW1 | Alpha_WWWW2 | Alpha_ZZWW0 | Alpha_ZZZZ | D_Alpha_ZZWW0_S | D_Alpha_ZZWW0_T | D_Alpha_ZZWW1_S | D_Alpha_ZZWW1_T | D_Alpha_ZZWW1_U | D_Alpha_WWWW0_S | D_Alpha_WWWW0_T | D_Alpha_WWWW0_U | D_Alpha_WWWW2_S | D_Alpha_WWWW2_T | D_Alpha_ZZZZ_S | D_Alpha_ZZZZ_T | G_SWW | G_SWW_T | G_SSWW | G_SZZ | G_SZZ_T | G_SSZZ | G_PNWW | G_PNZZ | G_PWZ | G_PWW | G_FWW | G_FZZ | G_FWW_T | G_FZZ_T | G_TNWW | G_TNZZ | G_TWZ | G_TWW | Gs | I_Gs | G2 | Mass of flavor | Width of flavor | K_Matrix_Coeff of int | K_Matrix_Pole of int (* \begin{dubious} The current abstract syntax for parameter dependencies is admittedly tedious. Later, there will be a parser for a convenient concrete syntax as a part of a concrete syntax for models. But as these examples show, it should include simple functions. \end{dubious} *) type orders = int * int let orders = function | _ -> (0,0) (* \begin{subequations} \begin{align} \alpha_{\text{QED}} &= \frac{1}{137.0359895} \\ \sin^2\theta_w &= 0.23124 \end{align} \end{subequations} *) let input_parameters = [ Alpha_QED, 1. /. 137.0359895; Sin2thw, 0.23124; Mass (G Z), 91.187; Mass (M (N 1)), 0.0; Mass (M (L 1)), 0.51099907e-3; Mass (M (N 2)), 0.0; Mass (M (L 2)), 0.105658389; Mass (M (N 3)), 0.0; Mass (M (L 3)), 1.77705; Mass (M (U 1)), 5.0e-3; Mass (M (D 1)), 3.0e-3; Mass (M (U 2)), 1.2; Mass (M (D 2)), 0.1; Mass (M (U 3)), 174.0; Mass (M (D 3)), 4.2 ] (* \begin{subequations} \begin{align} e &= \sqrt{4\pi\alpha} \\ \sin\theta_w &= \sqrt{\sin^2\theta_w} \\ \cos\theta_w &= \sqrt{1-\sin^2\theta_w} \\ g &= \frac{e}{\sin\theta_w} \\ m_W &= \cos\theta_w m_Z \\ v &= \frac{2m_W}{g} \\ g_{CC} = -\frac{g}{2\sqrt2} &= -\frac{e}{2\sqrt2\sin\theta_w} \\ Q_{\text{lepton}} = -q_{\text{lepton}}e &= e \\ Q_{\text{up}} = -q_{\text{up}}e &= -\frac{2}{3}e \\ Q_{\text{down}} = -q_{\text{down}}e &= \frac{1}{3}e \\ \ii q_We = \ii g_{\gamma WW} &= \ii e \\ \ii g_{ZWW} &= \ii g \cos\theta_w \\ \ii g_{WWW} &= \ii g \end{align} \end{subequations} *) let derived_parameters = - [ Real E, Sqrt (Prod [Const 4; Atom Pi; Atom Alpha_QED]); + [ Real E, Sqrt (Prod [Integer 4; Atom Pi; Atom Alpha_QED]); Real Sinthw, Sqrt (Atom Sin2thw); - Real Costhw, Sqrt (Diff (Const 1, Atom Sin2thw)); + Real Costhw, Sqrt (Diff (Integer 1, Atom Sin2thw)); Real G_weak, Quot (Atom E, Atom Sinthw); Real (Mass (G Wp)), Prod [Atom Costhw; Atom (Mass (G Z))]; - Real Vev, Quot (Prod [Const 2; Atom (Mass (G Wp))], Atom G_weak); + Real Vev, Quot (Prod [Integer 2; Atom (Mass (G Wp))], Atom G_weak); Real Q_lepton, Atom E; - Real Q_up, Prod [Quot (Const (-2), Const 3); Atom E]; - Real Q_down, Prod [Quot (Const 1, Const 3); Atom E]; - Real G_CC, Neg (Quot (Atom G_weak, Prod [Const 2; Sqrt (Const 2)])); + Real Q_up, Prod [Quot (Integer (-2), Integer 3); Atom E]; + Real Q_down, Prod [Quot (Integer 1, Integer 3); Atom E]; + Real G_CC, Neg (Quot (Atom G_weak, Prod [Integer 2; Sqrt (Integer 2)])); Complex I_Q_W, Prod [I; Atom E]; Complex I_G_weak, Prod [I; Atom G_weak]; Complex I_G_ZWW, Prod [I; Atom G_weak; Atom Costhw] ] (* \begin{equation} - \frac{g}{2\cos\theta_w} \end{equation} *) let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) (* \begin{subequations} \begin{align} - \frac{g}{2\cos\theta_w} g_V &= - \frac{g}{2\cos\theta_w} (T_3 - 2 q \sin^2\theta_w) \\ - \frac{g}{2\cos\theta_w} g_A &= - \frac{g}{2\cos\theta_w} T_3 \end{align} \end{subequations} *) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* \begin{equation} \mathcal{L}_{\textrm{EM}} = - e \sum_i q_i \bar\psi_i\fmslash{A}\psi_i \end{equation} *) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{NC}} = - \frac{g}{2\cos\theta_W} \sum_i \bar\psi_i\fmslash{Z}(g_V^i-g_A^i\gamma_5)\psi_i \end{equation} *) let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents' n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents'' n = List.map mgm [ ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents_triv = ThoList.flatmap charged_currents' [1;2;3] @ ThoList.flatmap charged_currents'' [1;2;3] let charged_currents_ckm = let charged_currents_2 n1 n2 = List.map mgm [ ((D (-n1), Wm, U n2), FBF (1, Psibar, VL, Psi), G_CCQ (n2,n1)); ((U (-n1), Wp, D n2), FBF (1, Psibar, VL, Psi), G_CCQ (n1,n2)) ] in ThoList.flatmap charged_currents' [1;2;3] @ List.flatten (Product.list2 charged_currents_2 [1;2;3] [1;2;3]) (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let standard_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] (* \begin{multline} \mathcal{L}_{\textrm{TGC}}(g_1,\kappa) = g_1 \mathcal{L}_T(V,W^+,W^-) \\ + \frac{\kappa+g_1}{2} \Bigl(\mathcal{L}_T(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr)\\ + \frac{\kappa-g_1}{2} \Bigl(\mathcal{L}_L(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr) \end{multline} *) (* \begin{dubious} The whole thing in the LEP2 workshop notation: \begin{multline} \ii\mathcal{L}_{\textrm{TGC},V} / g_{WWV} = \\ g_1^V V^\mu (W^-_{\mu\nu}W^{+,\nu}-W^+_{\mu\nu}W^{-,\nu}) + \kappa_V W^+_\mu W^-_\nu V^{\mu\nu} + \frac{\lambda_V}{m_W^2} V_{\mu\nu} W^-_{\rho\mu} W^{+,\hphantom{\nu}\rho}_{\hphantom{+,}\nu} \\ + \ii g_5^V \epsilon_{\mu\nu\rho\sigma} \left( (\partial^\rho W^{-,\mu}) W^{+,\nu} - W^{-,\mu}(\partial^\rho W^{+,\nu}) \right) V^\sigma \\ + \ii g_4^V W^-_\mu W^+_\nu (\partial^\mu V^\nu + \partial^\nu V^\mu) - \frac{\tilde\kappa_V}{2} W^-_\mu W^+_\nu \epsilon^{\mu\nu\rho\sigma} V_{\rho\sigma} - \frac{\tilde\lambda_V}{2m_W^2} W^-_{\rho\mu} W^{+,\mu}_{\hphantom{+,\mu}\nu} \epsilon^{\nu\rho\alpha\beta} V_{\alpha\beta} \end{multline} using the conventions of Itzykson and Zuber with $\epsilon^{0123} = +1$. \end{dubious} *) (* \begin{dubious} This is equivalent to the notation of Hagiwara et al.~\cite{HPZH87}, if we remember that they have opposite signs for~$g_{WWV}$: \begin{multline} \mathcal{L}_{WWV} / (-g_{WWV}) = \\ \ii g_1^V \left( W^\dagger_{\mu\nu} W^\mu - W^\dagger_\mu W^\mu_{\hphantom{\mu}\nu} \right) V^\nu + \ii \kappa_V W^\dagger_\mu W_\nu V^{\mu\nu} + \ii \frac{\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} V^{\nu\lambda} \\ - g_4^V W^\dagger_\mu W_\nu \left(\partial^\mu V^\nu + \partial^\nu V^\mu \right) + g_5^V \epsilon^{\mu\nu\lambda\sigma} \left( W^\dagger_\mu \stackrel{\leftrightarrow}{\partial_\lambda} W_\nu \right) V_\sigma\\ + \ii \tilde\kappa_V W^\dagger_\mu W_\nu \tilde{V}^{\mu\nu} + \ii\frac{\tilde\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} \tilde{V}^{\nu\lambda} \end{multline} Here $V^\mu$ stands for either the photon or the~$Z$ field, $W^\mu$ is the $W^-$ field, $W_{\mu\nu} = \partial_\mu W_\nu - \partial_\nu W_\mu$, $V_{\mu\nu} = \partial_\mu V_\nu - \partial_\nu V_\mu$, and $\tilde{V}_{\mu\nu} = \frac{1}{2} \epsilon_{\mu\nu\lambda\sigma} V^{\lambda\sigma}$. \end{dubious} *) let anomalous_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_ZWW) ] let triple_gauge = if Flags.triple_anom then anomalous_triple_gauge else standard_triple_gauge (* \begin{equation} \mathcal{L}_{\textrm{QGC}} = - g^2 W_{+,\mu} W_{-,\nu} W_+^\mu W_-^\nu + \ldots \end{equation} *) (* Actually, quartic gauge couplings are a little bit more straightforward using auxiliary fields. Here we have to impose the antisymmetry manually: \begin{subequations} \begin{multline} (W^{+,\mu}_1 W^{-,\nu}_2 - W^{+,\nu}_1 W^{-,\mu}_2) (W^+_{3,\mu} W^-_{4,\nu} - W^+_{3,\nu} W^-_{4,\mu}) \\ = 2(W^+_1W^+_3)(W^-_2W^-_4) - 2(W^+_1W^-_4)(W^-_2W^+_3) \end{multline} also ($V$ can be $A$ or $Z$) \begin{multline} (W^{+,\mu}_1 V^\nu_2 - W^{+,\nu}_1 V^\mu_2) (W^-_{3,\mu} V_{4,\nu} - W^-_{3,\nu} V_{4,\mu}) \\ = 2(W^+_1W^-_3)(V_2V_4) - 2(W^+_1V_4)(V_2W^-_3) \end{multline} \end{subequations} *) (* \begin{subequations} \begin{multline} W^{+,\mu} W^{-,\nu} W^+_\mu W^-_\nu \end{multline} \end{subequations} *) let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2 ] (* \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \left( \frac{g^4}{2}\left( (W^+_\mu W^{-,\mu})^2 + W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} \right)\right.\notag \\ &\qquad\qquad\qquad \left. + \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \\ \mathcal{L}_5 &= \alpha_5 \left( g^4 (W^+_\mu W^{-,\mu})^2 + \frac{g^4}{\cos^2\theta_w} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \end{align} \end{subequations} or \begin{multline} \mathcal{L}_4 + \mathcal{L}_5 = (\alpha_4+2\alpha_5) g^4 \frac{1}{2} (W^+_\mu W^{-,\mu})^2 \\ + 2\alpha_4 g^4 \frac{1}{4} W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} + \alpha_4 \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu \\ + 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \frac{1}{2} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \frac{1}{8} (Z_\mu Z^\mu)^2 \end{multline} and therefore \begin{subequations} \begin{align} \alpha_{(WW)_0} &= (\alpha_4+2\alpha_5) g^4 \\ \alpha_{(WW)_2} &= 2\alpha_4 g^4 \\ \alpha_{(WZ)_0} &= 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{(WZ)_1} &= \alpha_4 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{ZZ} &= (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \end{align} \end{subequations} *) let anomalous_quartic_gauge = if Flags.quartic_anom then List.map qgc [ ((Wm, Wm, Wp, Wp), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4 [1, C_12_34], Alpha_WWWW2); ((Wm, Wp, Z, Z), Vector4 [1, C_12_34], Alpha_ZZWW0); ((Wm, Wp, Z, Z), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_ZZWW1); ((Z, Z, Z, Z), Vector4 [(1, C_12_34); (1, C_13_42); (1, C_14_23)], Alpha_ZZZZ) ] else [] (* In any diagonal channel~$\chi$, the scattering amplitude~$a_\chi(s)$ is unitary iff\footnote{% Trivial proof: \begin{equation} -1 = \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = \frac{\textrm{Im}(a_\chi^*(s))}{ |a_\chi(s)|^2 } = - \frac{\textrm{Im}(a_\chi(s))}{ |a_\chi(s)|^2 } \end{equation} i.\,e.~$\textrm{Im}(a_\chi(s)) = |a_\chi(s)|^2$.} \begin{equation} \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = -1 \end{equation} For a real perturbative scattering amplitude~$r_\chi(s)$ this can be enforced easily--and arbitrarily--by \begin{equation} \frac{1}{a_\chi(s)} = \frac{1}{r_\chi(s)} - \mathrm{i} \end{equation} *) let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_WWWW2_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZWW0_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_14_23)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_13_42); (1, C_12_34)]), D_Alpha_ZZZZ_T)] else [] (*i Thorsten's original implementation of the K matrix, which we keep since it still might be usefull for the future. let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 2, K_Matrix_Pole 2]), Alpha_WWWW2); ((Wm, Wp, Z, Z), Vector4_K_Matrix_tho (0, [(K_Matrix_Coeff 0, K_Matrix_Pole 0); (K_Matrix_Coeff 2, K_Matrix_Pole 2)]), Alpha_ZZWW0); ((Wm, Z, Wp, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 1, K_Matrix_Pole 1]), Alpha_ZZWW1); ((Z, Z, Z, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_ZZZZ) ] else [] i*) let quartic_gauge = standard_quartic_gauge @ anomalous_quartic_gauge @ k_matrix_quartic_gauge (* WK's couplings (apparently, he still intends to divide by $\Lambda^2_{\text{EWSB}}=16\pi^2v_{\mathrm{F}}^2$): with \begin{equation} V_{\mu} V_{\nu} = \frac{1}{2} \left( W^+_{\mu} W^-_{\nu} + W^+_{\nu} W^-_{\mu} \right) + \frac{1}{2\cos^2\theta_{w}} Z_{\mu} Z_{\nu} \end{equation} (note the symmetrization!), i.\,e. \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V_{\nu})^2 \\ \mathcal{L}_5 &= \alpha_5 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V^{\mu})^2 \end{align} \end{subequations} *) let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] (* New Resonances *) (* \begin{dubious} There is an extra minus in the Lagrangian to have the same sign as HWW or HZZ vertex. Effectivly this doesn't matter for VBS, because $(-1)^2=1$. This is only for completeness. \end{dubious} \begin{subequations} \begin{align} \mathbf{V}_\mu &= -\mathrm{i} g\mathbf{W}_\mu+\mathrm{i} g^\prime\mathbf{B}_\mu \\ \mathbf{W}_\mu &= W_\mu^a\frac{\tau^a}{2} \\ \mathbf{B}_\mu &= W_\mu^a\frac{\tau^3}{2} \\ \tau^{++}&= \tau^+ \otimes \tau^+ \\ \tau^+ &= \frac{1}{2} \left (\tau^+ \otimes \tau^3 + \tau^3+\tau^+ \right ) \\ \tau^0 &= \frac{1}{\sqrt{6}} \left (\tau^3\otimes\tau^3 -\tau^+ \otimes \tau^- - \tau^-+\tau^+ \right ) \\ \tau^- &= \frac{1}{2} \left (\tau^- \otimes \tau^3 + \tau^3+\tau^- \right ) \\ \tau^{--}&= \tau^- \otimes \tau^- \end{align} \end{subequations} *) (* Scalar Isoscalar \begin{equation} \mathcal{L}_{\sigma}= -\frac{g_\sigma v}{2} \text{tr} \left\lbrack \mathbf{V}_\mu \mathbf{V}^\mu \right\rbrack \sigma \end{equation} *) let rsigma3 = [ ((O Rsigma, G Wp, G Wm), Scalar_Vector_Vector 1, G_SWW); ((O Rsigma, G Z, G Z), Scalar_Vector_Vector 1, G_SZZ) ] let rsigma3t = [ ((O Rsigma, G Wp, G Wm), Scalar_Vector_Vector_t 1, G_SWW_T); ((O Rsigma, G Z, G Z), Scalar_Vector_Vector_t 1, G_SZZ_T) ] let rsigma4 = [ (O Rsigma, O Rsigma, G Wp, G Wm), Scalar2_Vector2 1, G_SSWW; (O Rsigma, O Rsigma, G Z, G Z), Scalar2_Vector2 1, G_SSZZ ] (* Scalar Isotensor \begin{subequations} \begin{align} \mathcal{L}_{\phi}&= \frac{g_\phi v}{4} \text{Tr} \left \lbrack \left ( \mathbf{V}_\mu \otimes \mathbf{V}^\mu - \frac{\tau^{aa}}{6} \text{Tr} \left \lbrack \mathbf{V}_\mu \mathbf{V}^\mu \right \rbrack\right ) {\mathbf{\phi}} \right \rbrack\\ \phi&=\sqrt{2} \left (\phi^{++}\tau^{++}+\phi^+\tau^++\phi^0\tau^0+\phi^-\tau^- + \phi^{--}\tau^{--} \right ) \end{align} \end{subequations} *) let rphi3 = [ ((O Rphin, G Wp, G Wm), Scalar_Vector_Vector 1, G_PNWW); ((O Rphin, G Z, G Z), Scalar_Vector_Vector 1, G_PNZZ) ; ((O Rphip, G Z, G Wm), Scalar_Vector_Vector 1, G_PWZ) ; ((O Rphipp, G Wm, G Wm), Scalar_Vector_Vector 1, G_PWW) ; ((O Rphim, G Wp, G Z), Scalar_Vector_Vector 1, G_PWZ) ; ((O Rphimm, G Wp, G Wp), Scalar_Vector_Vector 1, G_PWW) ] (* Tensor IsoScalar *) let rf3 = [ ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector_1 1, G_FWW); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector_1 1, G_FZZ) ] let rf3t = [ ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector_t 1, G_FWW_T); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector_t 1, G_FZZ_T) ] (* Tensor Isotensor \begin{subequations} \begin{align} \mathcal{L}_{t} \end{align} \end{subequations} *) let rt3 = [ ((O Rtn, G Wp, G Wm), Tensor_2_Vector_Vector_1 1, G_TNWW); ((O Rtn, G Z, G Z), Tensor_2_Vector_Vector_1 1, G_TNZZ) ; ((O Rtp, G Z, G Wm), Tensor_2_Vector_Vector_1 1, G_TWZ) ; ((O Rtpp, G Wm, G Wm), Tensor_2_Vector_Vector_1 1, G_TWW) ; ((O Rtm, G Wp, G Z), Tensor_2_Vector_Vector_1 1, G_TWZ) ; ((O Rtmm, G Wp, G Wp), Tensor_2_Vector_Vector_1 1, G_TWW) ] (* Anomalous trilinear interactions $f_i f_j V$ : \begin{equation} \Delta\mathcal{L}_{tt\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{t} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) t A_\mu \end{equation} *) let anomalous_ttA = if Flags.top_anom then [ ((M (U (-3)), G Ga, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bb\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{b} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) b A_\mu \end{equation} *) let anomalous_bbA = if Flags.top_anom then [ ((M (D (-3)), G Ga, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttg} = - g_s \frac{\upsilon}{\Lambda^2} \bar{t}\lambda^a i\sigma^{\mu\nu}k_\nu (d_V(k^2)+id_A(k^2)\gamma_5)tG^a_\mu \end{equation} *) let anomalous_ttG = if Flags.top_anom then [ ((M (U (-3)), G Gl, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttG) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{t} \fmslash{Z} (X_L(k^2) P_L + X_R(k^2) P_R) t + \bar{t}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)tZ_\mu\right\rbrack \end{equation} *) let anomalous_ttZ = if Flags.top_anom then [ ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_ttZ); ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2} \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)bZ_\mu \end{equation} *) let anomalous_bbZ = if Flags.top_anom then [ ((M (D (-3)), G Z, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbW} = - \frac{g}{\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\fmslash{W}^-(V_L(k^2) P_L+V_R(k^2) P_R) t + \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)tW^-_\mu\right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbW = if Flags.top_anom then [ ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_tbW); ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, TLRM, Psi), G_TLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, TRLM, Psi), G_TRL_tbW) ] else [] (* quartic fermion-gauge interactions $f_i f_j V_1 V_2$ emerging from gauge-invariant effective operators: \begin{equation} \Delta\mathcal{L}_{ttgg} = - \frac{g_s^2}{2} f_{abc} \frac{\upsilon}{\Lambda^2} \bar{t} \lambda^a \sigma^{\mu\nu} (d_V(k^2)+id_A(k^2)\gamma_5)t G^b_\mu G^c_\nu \end{equation} *) let anomalous_ttGG = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,1,0,true,TTGG)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttGG); ((O (Aux_top (2,1,0,false,TTGG)), G Gl, G Gl), Aux_Gauge_Gauge 1, I_Gs) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWA} = - i\sin\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t A_\mu W^-_\nu \right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbWA = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWA)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWA); ((O (Aux_top (2,0,1,false,TBWA)), G Ga, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWA)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWA); ((O (Aux_top (2,0,-1,false,TBWA)), G Wp, G Ga), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWZ} = - i\cos\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t Z_\mu W^-_\nu \right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbWZ = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWZ)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWZ); ((O (Aux_top (2,0,1,false,TBWZ)), G Z, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWZ)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWZ); ((O (Aux_top (2,0,-1,false,TBWZ)), G Wp, G Z), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{t} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)t W^-_\mu W^+_\nu \end{equation} *) let anomalous_ttWW = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,0,0,true,TTWW)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttWW); ((O (Aux_top (2,0,0,false,TTWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{b} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)b W^-_\mu W^+_\nu \end{equation} *) let anomalous_bbWW = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,0,true,BBWW)), M (D 3)), FBF (1, Psibar, TVA, Psi), G_TVA_bbWW); ((O (Aux_top (2,0,0,false,BBWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* 4-fermion contact terms emerging from operator rewriting: *) let anomalous_top_qGuG_tt = [ ((M (U (-3)), O (Aux_top (1,1,0,true,QGUG)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qGuG) ] let anomalous_top_qGuG_ff n = List.map mom [ ((U (-n), Aux_top (1,1,0,false,QGUG), U n), FBF (1, Psibar, V, Psi), Unit); ((D (-n), Aux_top (1,1,0,false,QGUG), D n), FBF (1, Psibar, V, Psi), Unit) ] let anomalous_top_qGuG = if Flags.top_anom_4f then anomalous_top_qGuG_tt @ ThoList.flatmap anomalous_top_qGuG_ff [1;2;3] else [] let anomalous_top_qBuB_tt = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QBUB)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB) ] let anomalous_top_qBuB_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QBUB), U n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_u); ((D (-n), Aux_top (1,0,0,false,QBUB), D n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_d); ((L (-n), Aux_top (1,0,0,false,QBUB), L n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_e); ((N (-n), Aux_top (1,0,0,false,QBUB), N n), FBF (1, Psibar, VL, Psi), G_VL_qBuB_n) ] let anomalous_top_qBuB = if Flags.top_anom_4f then anomalous_top_qBuB_tt @ ThoList.flatmap anomalous_top_qBuB_ff [1;2;3] else [] let anomalous_top_qW_tq = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (D (-3)), O (Aux_top (1,0,-1,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (U (-3)), O (Aux_top (1,0,1,true,QW)), M (D 3)), FBF (1, Psibar, VL, Psi), G_VL_qW) ] let anomalous_top_qW_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QW), U n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((D (-n), Aux_top (1,0,0,false,QW), D n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((N (-n), Aux_top (1,0,0,false,QW), N n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((L (-n), Aux_top (1,0,0,false,QW), L n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((D (-n), Aux_top (1,0,-1,false,QW), U n), FBF (1, Psibar, VL, Psi), Half); ((U (-n), Aux_top (1,0,1,false,QW), D n), FBF (1, Psibar, VL, Psi), Half); ((L (-n), Aux_top (1,0,-1,false,QW), N n), FBF (1, Psibar, VL, Psi), Half); ((N (-n), Aux_top (1,0,1,false,QW), L n), FBF (1, Psibar, VL, Psi), Half) ] let anomalous_top_qW = if Flags.top_anom_4f then anomalous_top_qW_tq @ ThoList.flatmap anomalous_top_qW_ff [1;2;3] else [] let anomalous_top_DuDd = if Flags.top_anom_4f then [ ((M (U (-3)), O (Aux_top (0,0,0,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,0,false,DR)), M (U 3)), FBF (1, Psibar, SL, Psi), G_SL_DttR); ((M (D (-3)), O (Aux_top (0,0,0,false,DR)), M (D 3)), FBF (1, Psibar, SR, Psi), G_SR_DttR); ((M (U (-3)), O (Aux_top (0,0,0,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (D (-3)), O (Aux_top (0,0,0,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DttL); ((M (D (-3)), O (Aux_top (0,0,-1,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DR)), M (D 3)), FBF (1, Psibar, SLR, Psi), G_SLR_DbtR); ((M (D (-3)), O (Aux_top (0,0,-1,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DbtL) ] else [] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ (if Flags.ckm_present then charged_currents_ckm else charged_currents_triv) @ triple_gauge @ goldstone_vertices @ rsigma3 @ rsigma3t @ rphi3 @ rf3 @ rf3t @ rt3 @ anomalous_ttA @ anomalous_bbA @ anomalous_ttZ @ anomalous_bbZ @ anomalous_tbW @ anomalous_tbWA @ anomalous_tbWZ @ anomalous_ttWW @ anomalous_bbWW @ anomalous_ttG @ anomalous_ttGG @ anomalous_top_qGuG @ anomalous_top_qBuB @ anomalous_top_qW @ anomalous_top_DuDd) let vertices4 = quartic_gauge @ rsigma4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "Rsigma" -> O Rsigma | "Rphi0" -> O Rphin | "Rphi+" -> O Rphip | "Rphi-" -> O Rphim | "Rphi++" -> O Rphip | "Rphi--" -> O Rphimm | "Rf" -> O Rf | "Rt0" -> O Rtn | "Rt+" -> O Rtp | "Rt-" -> O Rtm | "Rt++" -> O Rtp | "Rt--" -> O Rtmm | "Aux_t_ttGG0" -> O (Aux_top (2,1, 0,true,TTGG)) | "Aux_ttGG0" -> O (Aux_top (2,1, 0,false,TTGG)) | "Aux_t_tbWA+" -> O (Aux_top (2,0, 1,true,TBWA)) | "Aux_tbWA+" -> O (Aux_top (2,0, 1,false,TBWA)) | "Aux_t_tbWA-" -> O (Aux_top (2,0,-1,true,TBWA)) | "Aux_tbWA-" -> O (Aux_top (2,0,-1,false,TBWA)) | "Aux_t_tbWZ+" -> O (Aux_top (2,0, 1,true,TBWZ)) | "Aux_tbWZ+" -> O (Aux_top (2,0, 1,false,TBWZ)) | "Aux_t_tbWZ-" -> O (Aux_top (2,0,-1,true,TBWZ)) | "Aux_tbWZ-" -> O (Aux_top (2,0,-1,false,TBWZ)) | "Aux_t_ttWW0" -> O (Aux_top (2,0, 0,true,TTWW)) | "Aux_ttWW0" -> O (Aux_top (2,0, 0,false,TTWW)) | "Aux_t_bbWW0" -> O (Aux_top (2,0, 0,true,BBWW)) | "Aux_bbWW0" -> O (Aux_top (2,0, 0,false,BBWW)) | "Aux_t_qGuG0" -> O (Aux_top (1,1, 0,true,QGUG)) | "Aux_qGuG0" -> O (Aux_top (1,1, 0,false,QGUG)) | "Aux_t_qBuB0" -> O (Aux_top (1,0, 0,true,QBUB)) | "Aux_qBuB0" -> O (Aux_top (1,0, 0,false,QBUB)) | "Aux_t_qW0" -> O (Aux_top (1,0, 0,true,QW)) | "Aux_qW0" -> O (Aux_top (1,0, 0,false,QW)) | "Aux_t_qW+" -> O (Aux_top (1,0, 1,true,QW)) | "Aux_qW+" -> O (Aux_top (1,0, 1,false,QW)) | "Aux_t_qW-" -> O (Aux_top (1,0,-1,true,QW)) | "Aux_qW-" -> O (Aux_top (1,0,-1,false,QW)) | "Aux_t_dL0" -> O (Aux_top (0,0, 0,true,DL)) | "Aux_dL0" -> O (Aux_top (0,0, 0,false,DL)) | "Aux_t_dL+" -> O (Aux_top (0,0, 1,true,DL)) | "Aux_dL+" -> O (Aux_top (0,0, 1,false,DL)) | "Aux_t_dL-" -> O (Aux_top (0,0,-1,true,DL)) | "Aux_dL-" -> O (Aux_top (0,0,-1,false,DL)) | "Aux_t_dR0" -> O (Aux_top (0,0, 0,true,DR)) | "Aux_dR0" -> O (Aux_top (0,0, 0,false,DR)) | "Aux_t_dR+" -> O (Aux_top (0,0, 1,true,DR)) | "Aux_dR+" -> O (Aux_top (0,0, 1,false,DR)) | "Aux_t_dR-" -> O (Aux_top (0,0,-1,true,DR)) | "Aux_dR-" -> O (Aux_top (0,0,-1,false,DR)) | _ -> invalid_arg "Modellib_NoH.AltH.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_NoH.AltH.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_NoH.AltH.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_NoH.AltH.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_NoH.AltH.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "gl" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | Rsigma -> "Rsigma" | Rphin -> "Rphin" | Rphip -> "Rphi+" | Rphim -> "Rphi-" | Rphipp -> "Rphi++" | Rphimm -> "Rphi--" | Rf -> "Rf" | Rtn -> "Rtn" | Rtp -> "Rt+" | Rtm -> "Rt-" | Rtpp -> "Rt++" | Rtmm -> "Rt--" | Aux_top (_,_,ch,n,v) -> "Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" end ) ^ ( if ch > 0 then "+" else if ch < 0 then "-" else "0" ) end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_NoH.AltH.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_NoH.AltH.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_NoH.AltH.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_NoH.AltH.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | Rsigma -> "\\sigma" | Rphip -> "\\phi^+" | Rphim -> "\\phi^-" | Rphin -> "\\phi^0" | Rphipp -> "\\phi^{++}" | Rphimm -> "\\phi^{--}" | Rf -> "f" | Rtp -> "t^+" | Rtm -> "t^-" | Rtn -> "t^0" | Rtpp -> "t^{++}" | Rtmm -> "t^{--}" | Aux_top (_,_,ch,n,v) -> "\\textnormal{Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" end ) ^ ( if ch > 0 then "^+" else if ch < 0 then "^-" else "^0" ) ^ "}" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | Rsigma -> "rsi" | Rphip -> "rpp" | Rphim -> "rpm" | Rphin -> "rpn" | Rphipp -> "rppp" | Rphimm -> "rpmm" | Rf -> "rf" | Rtp -> "rtp" | Rtm -> "rtm" | Rtn -> "rtn" | Rtpp -> "rtpp" | Rtmm -> "rtmm" | Aux_top (_,_,ch,n,v) -> "aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttgg" | TBWA -> "tbwa" | TBWZ -> "tbwz" | TTWW -> "ttww" | BBWW -> "bbww" | QGUG -> "qgug" | QBUB -> "qbub" | QW -> "qw" | DL -> "dl" | DR -> "dr" end ) ^ "_" ^ ( if ch > 0 then "p" else if ch < 0 then "m" else "0" ) end (* Introducing new Resonances from 45, there are no PDG values *) let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | Rsigma -> 45 | Rphin -> 46 | Rphip | Rphim -> 47 | Rphipp | Rphimm -> 48 | Rf -> 52 | Rtn -> 53 | Rtp | Rtm -> 54 | Rtpp | Rtmm -> 55 | Aux_top (_,_,_,_,_) -> 81 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Half -> "half" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | I_G_weak -> "ig" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_TVA_ttA -> "gtva_tta" | G_TVA_bbA -> "gtva_bba" | G_VLR_ttZ -> "gvlr_ttz" | G_TVA_ttZ -> "gtva_ttz" | G_TVA_bbZ -> "gtva_bbz" | G_VLR_btW -> "gvlr_btw" | G_VLR_tbW -> "gvlr_tbw" | G_TLR_btW -> "gtlr_btw" | G_TRL_tbW -> "gtrl_tbw" | G_TLR_btWA -> "gtlr_btwa" | G_TRL_tbWA -> "gtrl_tbwa" | G_TLR_btWZ -> "gtlr_btwz" | G_TRL_tbWZ -> "gtrl_tbwz" | G_TVA_ttWW -> "gtva_ttww" | G_TVA_bbWW -> "gtva_bbww" | G_TVA_ttG -> "gtva_ttg" | G_TVA_ttGG -> "gtva_ttgg" | G_VLR_qGuG -> "gvlr_qgug" | G_VLR_qBuB -> "gvlr_qbub" | G_VLR_qBuB_u -> "gvlr_qbub_u" | G_VLR_qBuB_d -> "gvlr_qbub_d" | G_VLR_qBuB_e -> "gvlr_qbub_e" | G_VL_qBuB_n -> "gvl_qbub_n" | G_VL_qW -> "gvl_qw" | G_VL_qW_u -> "gvl_qw_u" | G_VL_qW_d -> "gvl_qw_d" | G_SL_DttR -> "gsl_dttr" | G_SR_DttR -> "gsr_dttr" | G_SL_DttL -> "gsl_dttl" | G_SLR_DbtR -> "gslr_dbtr" | G_SL_DbtL -> "gsl_dbtl" | G_CC -> "gcc" | G_CCQ (n1,n2) -> "gccq" ^ string_of_int n1 ^ string_of_int n2 | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | I_G1_AWW -> "ig1a" | I_G1_ZWW -> "ig1z" | I_G1_plus_kappa_plus_G4_AWW -> "ig1pkpg4a" | I_G1_plus_kappa_plus_G4_ZWW -> "ig1pkpg4z" | I_G1_plus_kappa_minus_G4_AWW -> "ig1pkmg4a" | I_G1_plus_kappa_minus_G4_ZWW -> "ig1pkmg4z" | I_G1_minus_kappa_plus_G4_AWW -> "ig1mkpg4a" | I_G1_minus_kappa_plus_G4_ZWW -> "ig1mkpg4z" | I_G1_minus_kappa_minus_G4_AWW -> "ig1mkmg4a" | I_G1_minus_kappa_minus_G4_ZWW -> "ig1mkmg4z" | I_lambda_AWW -> "ila" | I_lambda_ZWW -> "ilz" | G5_AWW -> "rg5a" | G5_ZWW -> "rg5z" | I_kappa5_AWW -> "ik5a" | I_kappa5_ZWW -> "ik5z" | I_lambda5_AWW -> "il5a" | I_lambda5_ZWW -> "il5z" | Alpha_WWWW0 -> "alww0" | Alpha_WWWW2 -> "alww2" | Alpha_ZZWW0 -> "alzw0" | Alpha_ZZWW1 -> "alzw1" | Alpha_ZZZZ -> "alzz" | D_Alpha_ZZWW0_S -> "dalzz0_s(gkm,mkm," | D_Alpha_ZZWW0_T -> "dalzz0_t(gkm,mkm," | D_Alpha_ZZWW1_S -> "dalzz1_s(gkm,mkm," | D_Alpha_ZZWW1_T -> "dalzz1_t(gkm,mkm," | D_Alpha_ZZWW1_U -> "dalzz1_u(gkm,mkm," | D_Alpha_WWWW0_S -> "dalww0_s(gkm,mkm," | D_Alpha_WWWW0_T -> "dalww0_t(gkm,mkm," | D_Alpha_WWWW0_U -> "dalww0_u(gkm,mkm," | D_Alpha_WWWW2_S -> "dalww2_s(gkm,mkm," | D_Alpha_WWWW2_T -> "dalww2_t(gkm,mkm," | D_Alpha_ZZZZ_S -> "dalz4_s(gkm,mkm," | D_Alpha_ZZZZ_T -> "dalz4_t(gkm,mkm," | G_SWW -> "gsww" | G_SZZ -> "gszz" | G_SWW_T -> "gswwt" | G_SZZ_T -> "gszzt" | G_PNWW -> "gpnww" | G_PNZZ -> "gpnzz" | G_PWZ -> "gpwz" | G_PWW -> "gpww" | G_FWW -> "gfww" | G_FZZ -> "gfzz" | G_FWW_T -> "gfwwt" | G_FZZ_T -> "gfzzt" | G_TNWW -> "gtnww" | G_TNZZ -> "gtnzz" | G_TWZ -> "gtwz" | G_TWW -> "gtww" | G_SSWW -> "gssww" | G_SSZZ -> "gsszz" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f | K_Matrix_Coeff i -> "kc" ^ string_of_int i | K_Matrix_Pole i -> "kp" ^ string_of_int i end Index: trunk/omega/src/algebra.mli =================================================================== --- trunk/omega/src/algebra.mli (revision 8274) +++ trunk/omega/src/algebra.mli (revision 8275) @@ -1,223 +1,261 @@ (* algebra.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) +module type Test = + sig + val suite : OUnit.test + end + (* \thocwmodulesection{Coefficients} *) (* For our algebra, we need coefficient rings. *) module type CRing = sig type t val null : t val unit : t val mul : t -> t -> t val add : t -> t -> t val sub : t -> t -> t val neg : t -> t val to_string : t -> string end (* And rational numbers provide a particularly important example: *) module type Rational = sig include CRing val is_null : t -> bool val is_unit : t -> bool val is_positive : t -> bool val is_negative : t -> bool val is_integer : t -> bool val make : int -> int -> t val abs : t -> t val inv : t -> t val div : t -> t -> t val pow : t -> int -> t val sum : t list -> t val to_ratio : t -> int * int val to_float : t -> float val to_integer : t -> int end (* \thocwmodulesection{Naive Rational Arithmetic} *) (* \begin{dubious} This \emph{is} dangerous and will overflow even for simple applications. The production code will have to be linked to a library for large integer arithmetic. \end{dubious} *) module Small_Rational : Rational module Q : Rational (* \thocwmodulesection{Rational Complex Numbers} *) module type QComplex = sig type q type t val make : q -> q -> t val null : t val one : t val real : t -> q val imag : t -> q val conj : t -> t val neg : t -> t val add : t -> t -> t val sub : t -> t -> t val mul : t -> t -> t + val inv : t -> t end module QComplex : functor (Q' : Rational) -> QComplex with type q = Q'.t module QC : QComplex with type q = Q.t +(* \thocwmodulesection{Laurent Polynomials} *) + +module type Laurent = + sig + type c + type t + val null : t + val unit : t + val is_null : t -> bool + val atom : c -> int -> t + val const : c -> t + val scale : c -> t -> t + val add : t -> t -> t + val diff : t -> t -> t + val sum : t list -> t + val mul : t -> t -> t + val product : t list -> t + val pow : int -> t -> t + val eval : c -> t -> c + val to_string : string -> t -> string + val compare : t -> t -> int + val pp : Format.formatter -> t -> unit + module Test : Test + end + +(* \begin{dubious} + Could (should?) be functorialized over [QComplex], but + wait until we upgrade our O'Caml requirements to 4.02 \ldots + \end{dubious} *) + +module Laurent : Laurent with type c = QC.t + (* \thocwmodulesection{Expressions: Terms, Rings and Linear Combinations} *) (* The tensor algebra will be spanned by an abelian monoid: *) module type Term = sig type 'a t val unit : unit -> 'a t val is_unit : 'a t -> bool val atom : 'a -> 'a t val power : int -> 'a t -> 'a t val mul : 'a t -> 'a t -> 'a t val map : ('a -> 'b) -> 'a t -> 'b t val to_string : ('a -> string) -> 'a t -> string (* The derivative of a term is \emph{not} a term, but a sum of terms instead: \begin{equation} D (f_1^{p_1}f_2^{p_2}\cdots f_n^{p_n}) = \sum_i (Df_i) p_i f_1^{p_1}f_2^{p_2}\cdots f_i^{p_i-1} \cdots f_n^{p_n} \end{equation} The function returns the sum as a list of triples $(Df_i,p_i, f_1^{p_1}f_2^{p_2}\cdots f_i^{p_i-1} \cdots f_n^{p_n})$. Summing the terms is left to the calling module and the $Df_i$ are \emph{not} guaranteed to be different. NB: The function implementating the inner derivative, is supposed to return~[Some]~$Df_i$ and [None], iff~$Df_i$ vanishes. *) val derive : ('a -> 'b option) -> 'a t -> ('b * int * 'a t) list (* convenience function *) val product : 'a t list -> 'a t val atoms : 'a t -> 'a list end module type Ring = sig module C : Rational type 'a t val null : unit -> 'a t val unit : unit -> 'a t val is_null : 'a t -> bool val is_unit : 'a t -> bool val atom : 'a -> 'a t val scale : C.t -> 'a t -> 'a t val add : 'a t -> 'a t -> 'a t val sub : 'a t -> 'a t -> 'a t val mul : 'a t -> 'a t -> 'a t val neg : 'a t -> 'a t (* Again \begin{equation} D (f_1^{p_1}f_2^{p_2}\cdots f_n^{p_n}) = \sum_i (Df_i) p_i f_1^{p_1}f_2^{p_2}\cdots f_i^{p_i-1} \cdots f_n^{p_n} \end{equation} but, iff~$Df_i$ can be identified with a~$f'$, we know how to perform the sum. *) val derive_inner : ('a -> 'a t) -> 'a t -> 'a t (* this? *) val derive_inner' : ('a -> 'a t option) -> 'a t -> 'a t (* or that? *) (* Below, we will need partial derivatives that lead out of the ring: [derive_outer derive_atom term] returns a list of partial derivatives ['b] with non-zero coefficients ['a t]: *) val derive_outer : ('a -> 'b option) -> 'a t -> ('b * 'a t) list (* convenience functions *) val sum : 'a t list -> 'a t val product : 'a t list -> 'a t (* The list of all generators appearing in an expression: *) val atoms : 'a t -> 'a list val to_string : ('a -> string) -> 'a t -> string end module type Linear = sig module C : Ring type ('a, 'c) t val null : unit -> ('a, 'c) t val atom : 'a -> ('a, 'c) t val singleton : 'c C.t -> 'a -> ('a, 'c) t val scale : 'c C.t -> ('a, 'c) t -> ('a, 'c) t val add : ('a, 'c) t -> ('a, 'c) t -> ('a, 'c) t val sub : ('a, 'c) t -> ('a, 'c) t -> ('a, 'c) t (* A partial derivative w.\,r.\,t.~a vector maps from a coefficient ring to the dual vector space. *) val partial : ('c -> ('a, 'c) t) -> 'c C.t -> ('a, 'c) t (* A linear combination of vectors \begin{equation} \text{[linear]} \lbrack (v_1, c_1); (v_2, c_2); \ldots; (v_n, c_n)\rbrack = \sum_{i=1}^{n} c_i\cdot v_i \end{equation} *) val linear : (('a, 'c) t * 'c C.t) list -> ('a, 'c) t (* Some convenience functions *) val map : ('a -> 'c C.t -> ('b, 'd) t) -> ('a, 'c) t -> ('b, 'd) t val sum : ('a, 'c) t list -> ('a, 'c) t (* The list of all generators and the list of all generators of coefficients appearing in an expression: *) val atoms : ('a, 'c) t -> 'a list * 'c list val to_string : ('a -> string) -> ('c -> string) -> ('a, 'c) t -> string end module Term : Term module Make_Ring (C : Rational) (T : Term) : Ring module Make_Linear (C : Ring) : Linear with module C = C (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * compile-command:"ocamlc -o vertex thoList.ml{i,} pmap.ml{i,} vertex.ml" * End: i*) Index: trunk/omega/src/targets.ml =================================================================== --- trunk/omega/src/targets.ml (revision 8274) +++ trunk/omega/src/targets.ml (revision 8275) @@ -1,8256 +1,8282 @@ (* targets.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner Fabian Bach (only parts of this file) Marco Sekulla (only parts of this file) Bijan Chokoufe Nejad (only parts of this file) So Young Shim WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) module Dummy (F : Fusion.Maker) (P : Momentum.T) (M : Model.T) = struct type amplitudes = Fusion.Multi(F)(P)(M).amplitudes type diagnostic = All | Arguments | Momenta | Gauge let options = Options.empty let amplitudes_to_channel _ _ _ = failwith "Targets.Dummy" let parameters_to_channel _ = failwith "Targets.Dummy" end (* \thocwmodulesection{O'Mega Virtual Machine with \texttt{Fortran\;90/95}} *) (* \thocwmodulesubsection{Preliminaries} *) module VM (Fusion_Maker : Fusion.Maker) (P : Momentum.T) (M : Model.T) = struct open Coupling open Format module CM = Colorize.It(M) module F = Fusion_Maker(P)(M) module CF = Fusion.Multi(Fusion_Maker)(P)(M) module CFlow = Color.Flow type amplitudes = CF.amplitudes (* Options. *) type diagnostic = All | Arguments | Momenta | Gauge let wrapper_module = ref "ovm_wrapper" let parameter_module_external = ref "some_external_module_with_model_info" let bytecode_file = ref "bytecode.hbc" let md5sum = ref None let openmp = ref false let kind = ref "default" let whizard = ref false let options = Options.create [ "wrapper_module", Arg.String (fun s -> wrapper_module := s), "name of wrapper module"; "bytecode_file", Arg.String (fun s -> bytecode_file := s), "bytecode file to be used in wrapper"; "parameter_module_external", Arg.String (fun s -> parameter_module_external := s), "external parameter module to be used in wrapper"; "md5sum", Arg.String (fun s -> md5sum := Some s), "transfer MD5 checksum in wrapper"; "whizard", Arg.Set whizard, "include WHIZARD interface in wrapper"; "openmp", Arg.Set openmp, "activate parallel computation of amplitude with OpenMP"] (* This is part of OCaml 4.01. *) let (|>) fn x = x fn let (@@) fn x = fn x (* Integers encode the opcodes (operation codes). *) let ovm_ADD_MOMENTA = 1 let ovm_CALC_BRAKET = 2 let ovm_LOAD_SCALAR = 10 let ovm_LOAD_SPINOR_INC = 11 let ovm_LOAD_SPINOR_OUT = 12 let ovm_LOAD_CONJSPINOR_INC = 13 let ovm_LOAD_CONJSPINOR_OUT = 14 let ovm_LOAD_MAJORANA_INC = 15 let ovm_LOAD_MAJORANA_OUT = 16 let ovm_LOAD_VECTOR_INC = 17 let ovm_LOAD_VECTOR_OUT = 18 let ovm_LOAD_VECTORSPINOR_INC = 19 let ovm_LOAD_VECTORSPINOR_OUT = 20 let ovm_LOAD_TENSOR2_INC = 21 let ovm_LOAD_TENSOR2_OUT = 22 let ovm_LOAD_BRS_SCALAR = 30 let ovm_LOAD_BRS_SPINOR_INC = 31 let ovm_LOAD_BRS_SPINOR_OUT = 32 let ovm_LOAD_BRS_CONJSPINOR_INC = 33 let ovm_LOAD_BRS_CONJSPINOR_OUT = 34 let ovm_LOAD_BRS_VECTOR_INC = 37 let ovm_LOAD_BRS_VECTOR_OUT = 38 let ovm_LOAD_MAJORANA_GHOST_INC = 23 let ovm_LOAD_MAJORANA_GHOST_OUT = 24 let ovm_LOAD_BRS_MAJORANA_INC = 35 let ovm_LOAD_BRS_MAJORANA_OUT = 36 let ovm_PROPAGATE_SCALAR = 51 let ovm_PROPAGATE_COL_SCALAR = 52 let ovm_PROPAGATE_GHOST = 53 let ovm_PROPAGATE_SPINOR = 54 let ovm_PROPAGATE_CONJSPINOR = 55 let ovm_PROPAGATE_MAJORANA = 56 let ovm_PROPAGATE_COL_MAJORANA = 57 let ovm_PROPAGATE_UNITARITY = 58 let ovm_PROPAGATE_COL_UNITARITY = 59 let ovm_PROPAGATE_FEYNMAN = 60 let ovm_PROPAGATE_COL_FEYNMAN = 61 let ovm_PROPAGATE_VECTORSPINOR = 62 let ovm_PROPAGATE_TENSOR2 = 63 (* \begin{dubious} [ovm_PROPAGATE_NONE] has to be split up to different types to work in conjunction with color MC \dots \end{dubious} *) let ovm_PROPAGATE_NONE = 64 let ovm_FUSE_V_FF = -1 let ovm_FUSE_F_VF = -2 let ovm_FUSE_F_FV = -3 let ovm_FUSE_VA_FF = -4 let ovm_FUSE_F_VAF = -5 let ovm_FUSE_F_FVA = -6 let ovm_FUSE_VA2_FF = -7 let ovm_FUSE_F_VA2F = -8 let ovm_FUSE_F_FVA2 = -9 let ovm_FUSE_A_FF = -10 let ovm_FUSE_F_AF = -11 let ovm_FUSE_F_FA = -12 let ovm_FUSE_VL_FF = -13 let ovm_FUSE_F_VLF = -14 let ovm_FUSE_F_FVL = -15 let ovm_FUSE_VR_FF = -16 let ovm_FUSE_F_VRF = -17 let ovm_FUSE_F_FVR = -18 let ovm_FUSE_VLR_FF = -19 let ovm_FUSE_F_VLRF = -20 let ovm_FUSE_F_FVLR = -21 let ovm_FUSE_SP_FF = -22 let ovm_FUSE_F_SPF = -23 let ovm_FUSE_F_FSP = -24 let ovm_FUSE_S_FF = -25 let ovm_FUSE_F_SF = -26 let ovm_FUSE_F_FS = -27 let ovm_FUSE_P_FF = -28 let ovm_FUSE_F_PF = -29 let ovm_FUSE_F_FP = -30 let ovm_FUSE_SL_FF = -31 let ovm_FUSE_F_SLF = -32 let ovm_FUSE_F_FSL = -33 let ovm_FUSE_SR_FF = -34 let ovm_FUSE_F_SRF = -35 let ovm_FUSE_F_FSR = -36 let ovm_FUSE_SLR_FF = -37 let ovm_FUSE_F_SLRF = -38 let ovm_FUSE_F_FSLR = -39 let ovm_FUSE_G_GG = -40 let ovm_FUSE_V_SS = -41 let ovm_FUSE_S_VV = -42 let ovm_FUSE_S_VS = -43 let ovm_FUSE_V_SV = -44 let ovm_FUSE_S_SS = -45 let ovm_FUSE_S_SVV = -46 let ovm_FUSE_V_SSV = -47 let ovm_FUSE_S_SSS = -48 let ovm_FUSE_V_VVV = -49 let ovm_FUSE_S_G2 = -50 let ovm_FUSE_G_SG = -51 let ovm_FUSE_G_GS = -52 let ovm_FUSE_S_G2_SKEW = -53 let ovm_FUSE_G_SG_SKEW = -54 let ovm_FUSE_G_GS_SKEW = -55 let inst_length = 8 (* Some helper functions. *) let printi ~lhs:l ~rhs1:r1 ?coupl:(cp = 0) ?coeff:(co = 0) ?rhs2:(r2 = 0) ?rhs3:(r3 = 0) ?rhs4:(r4 = 0) code = printf "@\n%d %d %d %d %d %d %d %d" code cp co l r1 r2 r3 r4 let nl () = printf "@\n" let print_int_lst lst = nl (); lst |> List.iter (printf "%d ") let print_str_lst lst = nl (); lst |> List.iter (printf "%s ") let break () = printi ~lhs:0 ~rhs1:0 0 (* Copied from below. Needed for header. *) (* \begin{dubious} Could be fused with [lorentz_ordering]. \end{dubious} *) type declarations = { scalars : F.wf list; spinors : F.wf list; conjspinors : F.wf list; realspinors : F.wf list; ghostspinors : F.wf list; vectorspinors : F.wf list; vectors : F.wf list; ward_vectors : F.wf list; massive_vectors : F.wf list; tensors_1 : F.wf list; tensors_2 : F.wf list; brs_scalars : F.wf list; brs_spinors : F.wf list; brs_conjspinors : F.wf list; brs_realspinors : F.wf list; brs_vectorspinors : F.wf list; brs_vectors : F.wf list; brs_massive_vectors : F.wf list } let rec classify_wfs' acc = function | [] -> acc | wf :: rest -> classify_wfs' (match CM.lorentz (F.flavor wf) with | Scalar -> {acc with scalars = wf :: acc.scalars} | Spinor -> {acc with spinors = wf :: acc.spinors} | ConjSpinor -> {acc with conjspinors = wf :: acc.conjspinors} | Majorana -> {acc with realspinors = wf :: acc.realspinors} | Maj_Ghost -> {acc with ghostspinors = wf :: acc.ghostspinors} | Vectorspinor -> {acc with vectorspinors = wf :: acc.vectorspinors} | Vector -> {acc with vectors = wf :: acc.vectors} | Massive_Vector -> {acc with massive_vectors = wf :: acc.massive_vectors} | Tensor_1 -> {acc with tensors_1 = wf :: acc.tensors_1} | Tensor_2 -> {acc with tensors_2 = wf :: acc.tensors_2} | BRS Scalar -> {acc with brs_scalars = wf :: acc.brs_scalars} | BRS Spinor -> {acc with brs_spinors = wf :: acc.brs_spinors} | BRS ConjSpinor -> {acc with brs_conjspinors = wf :: acc.brs_conjspinors} | BRS Majorana -> {acc with brs_realspinors = wf :: acc.brs_realspinors} | BRS Vectorspinor -> {acc with brs_vectorspinors = wf :: acc.brs_vectorspinors} | BRS Vector -> {acc with brs_vectors = wf :: acc.brs_vectors} | BRS Massive_Vector -> {acc with brs_massive_vectors = wf :: acc.brs_massive_vectors} | BRS _ -> invalid_arg "Targets.classify_wfs': not needed here") rest let classify_wfs wfs = classify_wfs' { scalars = []; spinors = []; conjspinors = []; realspinors = []; ghostspinors = []; vectorspinors = []; vectors = []; ward_vectors = []; massive_vectors = []; tensors_1 = []; tensors_2 = []; brs_scalars = []; brs_spinors = []; brs_conjspinors = []; brs_realspinors = []; brs_vectorspinors = []; brs_vectors = []; brs_massive_vectors = [] } wfs (* \thocwmodulesubsection{Sets and maps} *) (* The OVM identifies all objects via integers. Therefore, we need maps which assign the abstract object a unique ID. *) (* I want [int list]s with less elements to come first. Used in conjunction with the int list representation of momenta, this will set the outer particles at first position and allows the OVM to set them without further instructions. *) (* \begin{dubious} Using the Momentum module might give better performance than integer lists? \end{dubious} *) let rec int_lst_compare (e1 : int list) (e2 : int list) = match e1,e2 with | [], [] -> 0 | _, [] -> +1 | [], _ -> -1 | [_;_], [_] -> +1 | [_], [_;_] -> -1 | hd1 :: tl1, hd2 :: tl2 -> let c = compare hd1 hd2 in if (c != 0 && List.length tl1 = List.length tl2) then c else int_lst_compare tl1 tl2 (* We need a canonical ordering for the different types of wfs. Copied, and slightly modified to order [wf]s, from \texttt{fusion.ml}. *) let lorentz_ordering wf = match CM.lorentz (F.flavor wf) with | Scalar -> 0 | Spinor -> 1 | ConjSpinor -> 2 | Majorana -> 3 | Vector -> 4 | Massive_Vector -> 5 | Tensor_2 -> 6 | Tensor_1 -> 7 | Vectorspinor -> 8 | BRS Scalar -> 9 | BRS Spinor -> 10 | BRS ConjSpinor -> 11 | BRS Majorana -> 12 | BRS Vector -> 13 | BRS Massive_Vector -> 14 | BRS Tensor_2 -> 15 | BRS Tensor_1 -> 16 | BRS Vectorspinor -> 17 | Maj_Ghost -> invalid_arg "lorentz_ordering: not implemented" | BRS _ -> invalid_arg "lorentz_ordering: not needed" let wf_compare (wf1, mult1) (wf2, mult2) = let c1 = compare (lorentz_ordering wf1) (lorentz_ordering wf2) in if c1 <> 0 then c1 else let c2 = compare wf1 wf2 in if c2 <> 0 then c2 else compare mult1 mult2 let amp_compare amp1 amp2 = let cflow a = CM.flow (F.incoming a) (F.outgoing a) in let c1 = compare (cflow amp1) (cflow amp2) in if c1 <> 0 then c1 else let process_sans_color a = (List.map CM.flavor_sans_color (F.incoming a), List.map CM.flavor_sans_color (F.outgoing a)) in compare (process_sans_color amp1) (process_sans_color amp2) let level_compare (f1, amp1) (f2, amp2) = let p1 = F.momentum_list (F.lhs f1) and p2 = F.momentum_list (F.lhs f2) in let c1 = int_lst_compare p1 p2 in if c1 <> 0 then c1 else let c2 = compare f1 f2 in if c2 <> 0 then c2 else amp_compare amp1 amp2 module ISet = Set.Make (struct type t = int list let compare = int_lst_compare end) module WFSet = Set.Make (struct type t = CF.wf * int let compare = wf_compare end) module CSet = Set.Make (struct type t = CM.constant let compare = compare end) module FSet = Set.Make (struct type t = F.fusion * F.amplitude let compare = level_compare end) (* \begin{dubious} It might be preferable to use a [PMap] which maps mom to int, instead of this way. More standard functions like [mem] could be used. Also, [get_ID] would be faster, $\mathcal{O}(\log N)$ instead of $\mathcal{O}(N)$, and simpler. For 8 gluons: N=127 momenta. Minor performance issue. \end{dubious} *) module IMap = Map.Make (struct type t = int let compare = compare end) (* For [wf]s it is crucial for the performance to use a different type of [Map]s. *) module WFMap = Map.Make (struct type t = CF.wf * int let compare = wf_compare end) type lookups = { pmap : int list IMap.t; wfmap : int WFMap.t; cmap : CM.constant IMap.t * CM.constant IMap.t; amap : F.amplitude IMap.t; n_wfs : int list; amplitudes : CF.amplitudes; dict : F.amplitude -> F.wf -> int } let largest_key imap = if (IMap.is_empty imap) then failwith "largest_key: Map is empty!" else fst (IMap.max_binding imap) (* OCaml's [compare] from pervasives cannot compare functional types, e.g. for type [amplitude], if no specific equality function is given ("equal: functional value"). Therefore, we allow to specify the ordering. *) let get_ID' comp map elt : int = let smallmap = IMap.filter (fun _ x -> (comp x elt) = 0 ) map in if IMap.is_empty smallmap then raise Not_found else fst (IMap.min_binding smallmap) (* \begin{dubious} Trying to curry [map] here leads to type errors of the polymorphic function [get_ID]? \end{dubious} *) let get_ID map = match map with | map -> get_ID' compare map let get_const_ID map x = match map with | (map1, map2) -> try get_ID' compare map1 x with _ -> try get_ID' compare map2 x with _ -> failwith "Impossible" (* Creating an integer map of a list with an optional argument that indicates where the map should start counting. *) let map_of_list ?start:(st=1) lst = let g (ind, map) wf = (succ ind, IMap.add ind wf map) in lst |> List.fold_left g (st, IMap.empty) |> snd let wf_map_of_list ?start:(st=1) lst = let g (ind, map) wf = (succ ind, WFMap.add wf ind map) in lst |> List.fold_left g (st, WFMap.empty) |> snd (* \thocwmodulesubsection{Header} *) (* \begin{dubious} It would be nice to safe the creation date as comment. However, the Unix module doesn't seem to be loaded on default. \end{dubious} *) let version = String.concat " " [Config.version; Config.status; Config.date] let model_name = let basename = Filename.basename Sys.executable_name in try Filename.chop_extension basename with | _ -> basename let print_description cmdline = printf "Model %s\n" model_name; printf "OVM %s\n" version; printf "@\nBytecode file generated automatically by O'Mega for OVM"; printf "@\nDo not delete any lines. You called O'Mega with"; printf "@\n %s" cmdline; (*i let t = Unix.localtime (Unix.time() ) in printf "@\n on %5d %5d %5d" (succ t.Unix.tm_mon) t.Unix.tm_mday t.Unix.tm_year; i*) printf "@\n" let num_classified_wfs wfs = let wfs' = classify_wfs wfs in List.map List.length [ wfs'.scalars @ wfs'.brs_scalars; wfs'.spinors @ wfs'.brs_spinors; wfs'.conjspinors @ wfs'.brs_conjspinors; wfs'.realspinors @ wfs'.brs_realspinors @ wfs'.ghostspinors; wfs'.vectors @ wfs'.massive_vectors @ wfs'.brs_vectors @ wfs'.brs_massive_vectors @ wfs'.ward_vectors; wfs'.tensors_2; wfs'.tensors_1; wfs'.vectorspinors ] let description_classified_wfs = [ "N_scalars"; "N_spinors"; "N_conjspinors"; "N_bispinors"; "N_vectors"; "N_tensors_2"; "N_tensors_1"; "N_vectorspinors" ] let num_particles_in amp = match CF.flavors amp with | [] -> 0 | (fin, _) :: _ -> List.length fin let num_particles_out amp = match CF.flavors amp with | [] -> 0 | (_, fout) :: _ -> List.length fout let num_particles amp = match CF.flavors amp with | [] -> 0 | (fin, fout) :: _ -> List.length fin + List.length fout let num_color_indices_default = 2 (* Standard model and non-color-exotica *) let num_color_indices amp = try CFlow.rank (List.hd (CF.color_flows amp)) with _ -> num_color_indices_default let num_color_factors amp = let table = CF.color_factors amp in let n_cflow = Array.length table and n_cfactors = ref 0 in for c1 = 0 to pred n_cflow do for c2 = 0 to pred n_cflow do if c1 <= c2 then begin match table.(c1).(c2) with | [] -> () | _ -> incr n_cfactors end done done; !n_cfactors let num_helicities amp = amp |> CF.helicities |> List.length let num_flavors amp = amp |> CF.flavors |> List.length let num_ks amp = amp |> CF.processes |> List.length let num_color_flows amp = amp |> CF.color_flows |> List.length (* Use [fst] since [WFSet.t = F.wf * int]. *) let num_wfs wfset = wfset |> WFSet.elements |> List.map fst |> num_classified_wfs (* [largest_key] gives the number of momenta if applied to [pmap]. *) let num_lst lookups wfset = [ largest_key lookups.pmap; num_particles lookups.amplitudes; num_particles_in lookups.amplitudes; num_particles_out lookups.amplitudes; num_ks lookups.amplitudes; num_helicities lookups.amplitudes; num_color_flows lookups.amplitudes; num_color_indices lookups.amplitudes; num_flavors lookups.amplitudes; num_color_factors lookups.amplitudes ] @ num_wfs wfset let description_lst = [ "N_momenta"; "N_particles"; "N_prt_in"; "N_prt_out"; "N_amplitudes"; "N_helicities"; "N_col_flows"; "N_col_indices"; "N_flavors"; "N_col_factors" ] @ description_classified_wfs let print_header' numbers = let chopped_num_lst = ThoList.chopn inst_length numbers and chopped_desc_lst = ThoList.chopn inst_length description_lst and printer a b = print_str_lst a; print_int_lst b in List.iter2 printer chopped_desc_lst chopped_num_lst let print_header lookups wfset = print_header' (num_lst lookups wfset) let print_zero_header () = let rec zero_list' j = if j < 1 then [] else 0 :: zero_list' (j - 1) in let zero_list i = zero_list' (i + 1) in description_lst |> List.length |> zero_list |> print_header' (* \thocwmodulesubsection{Tables} *) let print_spin_table' tuples = match tuples with | [] -> () | _ -> tuples |> List.iter ( fun (tuple1, tuple2) -> tuple1 @ tuple2 |> List.map (Printf.sprintf "%d ") |> String.concat "" |> printf "@\n%s" ) let print_spin_table amplitudes = printf "@\nSpin states table"; print_spin_table' @@ CF.helicities amplitudes let print_flavor_table tuples = match tuples with | [] -> () | _ -> List.iter ( fun tuple -> tuple |> List.map (fun f -> Printf.sprintf "%d " @@ M.pdg f) |> String.concat "" |> printf "@\n%s" ) tuples let print_flavor_tables amplitudes = printf "@\nFlavor states table"; print_flavor_table @@ List.map (fun (fin, fout) -> fin @ fout) @@ CF.flavors amplitudes let print_color_flows_table' tuple = match CFlow.to_lists tuple with | [] -> () | cfs -> printf "@\n%s" @@ String.concat "" @@ List.map ( fun cf -> cf |> List.map (Printf.sprintf "%d ") |> String.concat "" ) cfs let print_color_flows_table tuples = match tuples with | [] -> () | _ -> List.iter print_color_flows_table' tuples let print_ghost_flags_table tuples = match tuples with | [] -> () | _ -> List.iter (fun tuple -> match CFlow.ghost_flags tuple with | [] -> () | gfs -> printf "@\n"; List.iter (fun gf -> printf "%s " (if gf then "1" else "0") ) gfs ) tuples let format_power { CFlow.num = num; CFlow.den = den; CFlow.power = pwr } = match num, den, pwr with | _, 0, _ -> invalid_arg "targets.format_power: zero denominator" | n, d, p -> [n; d; p] let format_powers = function | [] -> [0] | powers -> List.flatten (List.map format_power powers) (*i (* We go through the array line by line and collect all colorfactors which * are nonzero because their corresponding color flows match. * With the gained intset, we would be able to print only the necessary * coefficients of the symmetric matrix and indicate from where the OVM * can copy the rest. However, this approach gets really slow for many * gluons and we can save at most 3 numbers per line.*) let print_color_factor_table_funct table = let n_cflow = Array.length table in let (intset, _, _ ) = let rec fold_array (set, cf1, cf2) = if cf1 > pred n_cflow then (set, 0, 0) else let returnset = match table.(cf1).(cf2) with | [] -> set | cf -> ISet.add ([succ cf1; succ cf2] @ (format_powers cf)) set in if cf2 < pred n_cflow then fold_array (returnset, cf1, succ cf2) else fold_array (returnset, succ cf1, 0) in fold_array (ISet.empty, 0, 0) in let map = map_of_list (ISet.elements intset) in List.iter (fun x -> printf "@\n"; let xth = List.nth x in if (xth 0 <= xth 1) then List.iter (printf "%d ") x else printf "%d %d" 0 (get_ID map x)) (ISet.elements intset) let print_color_factor_table_old table = let n_cflow = Array.length table in let (intlsts, _, _ ) = let rec fold_array (lsts, cf1, cf2) = if cf1 > pred n_cflow then (lsts, 0, 0) else let returnlsts = match table.(cf1).(cf2) with | [] -> lsts | cf -> ([succ cf1; succ cf2] @ (format_powers cf)) :: lsts in if cf2 < pred n_cflow then fold_array (returnlsts, cf1, succ cf2) else fold_array (returnlsts, succ cf1, 0) in fold_array ([], 0, 0) in let intlsts = List.rev intlsts in List.iter (fun x -> printf "@\n"; List.iter (printf "%d ") x ) intlsts i*) (* Straightforward iteration gives a great speedup compared to the fancier approach which only collects nonzero colorfactors. *) let print_color_factor_table table = let n_cflow = Array.length table in if n_cflow > 0 then begin for c1 = 0 to pred n_cflow do for c2 = 0 to pred n_cflow do if c1 <= c2 then begin match table.(c1).(c2) with | [] -> () | cf -> printf "@\n"; List.iter (printf "%9d") ([succ c1; succ c2] @ (format_powers cf)); end done done end let option_to_binary = function | Some _ -> "1" | None -> "0" let print_flavor_color_table n_flv n_cflow table = if n_flv > 0 then begin for c = 0 to pred n_cflow do printf "@\n"; for f = 0 to pred n_flv do printf "%s " (option_to_binary table.(f).(c)) done; done; end let print_color_tables amplitudes = let cflows = CF.color_flows amplitudes and cfactors = CF.color_factors amplitudes in printf "@\nColor flows table: [ (i, j) (k, l) -> (m, n) ...]"; print_color_flows_table cflows; printf "@\nColor ghost flags table:"; print_ghost_flags_table cflows; printf "@\nColor factors table: [ i, j: num den power], %s" "i, j are indexed color flows"; print_color_factor_table cfactors; printf "@\nFlavor color combination is allowed:"; print_flavor_color_table (num_flavors amplitudes) (List.length (CF.color_flows amplitudes)) (CF.process_table amplitudes) (* \thocwmodulesubsection{Momenta} *) (* Add the momenta of a WFSet to a Iset. For now, we are throwing away the information to which amplitude the momentum belongs. This could be optimized for random color flow computations. *) let momenta_set wfset = let get_mom wf = wf |> fst |> F.momentum_list in let momenta = List.map get_mom (WFSet.elements wfset) in momenta |> List.fold_left (fun set x -> set |> ISet.add x) ISet.empty let chop_in_3 lst = let ceil_div i j = if (i mod j = 0) then i/j else i/j + 1 in ThoList.chopn (ceil_div (List.length lst) 3) lst (* Assign momenta via instruction code. External momenta [[_]] are already set by the OVM. To avoid unnecessary look-ups of IDs we seperate two cases. If we have more, we split up in two or three parts. *) let add_mom p pmap = let print_mom lhs rhs1 rhs2 rhs3 = if (rhs1!= 0) then printi ~lhs:lhs ~rhs1:rhs1 ~rhs2:rhs2 ~rhs3:rhs3 ovm_ADD_MOMENTA in let get_p_ID = get_ID pmap in match p with | [] | [_] -> print_mom 0 0 0 0 | [rhs1;rhs2] -> print_mom (get_p_ID [rhs1;rhs2]) rhs1 rhs2 0 | [rhs1;rhs2;rhs3] -> print_mom (get_p_ID [rhs1;rhs2;rhs3]) rhs1 rhs2 rhs3 | more -> let ids = List.map get_p_ID (chop_in_3 more) in if (List.length ids = 3) then print_mom (get_p_ID more) (List.nth ids 0) (List.nth ids 1) (List.nth ids 2) else print_mom (get_p_ID more) (List.nth ids 0) (List.nth ids 1) 0 (* Hand through the current level and print level seperators if necessary. *) let add_all_mom lookups pset = let add_all' level p = let level' = List.length p in if (level' > level && level' > 3) then break (); add_mom p lookups.pmap; level' in ignore (pset |> ISet.elements |> List.fold_left add_all' 1) (* Expand a set of momenta to contain all needed momenta for the computation in the OVM. For this, we create a list of sets which contains the chopped momenta and unify them afterwards. If the set has become larger, we expand again. *) let rec expand_pset p = let momlst = ISet.elements p in let pset_of lst = List.fold_left (fun s x -> ISet.add x s) ISet.empty lst in let sets = List.map (fun x -> pset_of (chop_in_3 x) ) momlst in let bigset = List.fold_left ISet.union ISet.empty sets in let biggerset = ISet.union bigset p in if (List.length momlst < List.length (ISet.elements biggerset) ) then expand_pset biggerset else biggerset let mom_ID pmap wf = get_ID pmap (F.momentum_list wf) (* \thocwmodulesubsection{Wavefunctions and externals} *) (* [mult_wf] is needed because the [wf] with same combination of flavor and momentum can have different dependencies and content. *) let mult_wf dict amplitude wf = try wf, dict amplitude wf with | Not_found -> wf, 0 (* Build the union of all [wf]s of all amplitudes and a map of the amplitudes. *) let wfset_amps amplitudes = let amap = amplitudes |> CF.processes |> List.sort amp_compare |> map_of_list and dict = CF.dictionary amplitudes in let wfset_amp amp = let f = mult_wf dict amp in let lst = List.map f ((F.externals amp) @ (F.variables amp)) in lst |> List.fold_left (fun s x -> WFSet.add x s) WFSet.empty in let list_of_sets = amplitudes |> CF.processes |> List.map wfset_amp in List.fold_left WFSet.union WFSet.empty list_of_sets, amap (* To obtain the Fortran index, we substract the number of precedent wave functions. *) let lorentz_ordering_reduced wf = match CM.lorentz (F.flavor wf) with | Scalar | BRS Scalar -> 0 | Spinor | BRS Spinor -> 1 | ConjSpinor | BRS ConjSpinor -> 2 | Majorana | BRS Majorana -> 3 | Vector | BRS Vector | Massive_Vector | BRS Massive_Vector -> 4 | Tensor_2 | BRS Tensor_2 -> 5 | Tensor_1 | BRS Tensor_1 -> 6 | Vectorspinor | BRS Vectorspinor -> 7 | Maj_Ghost -> invalid_arg "lorentz_ordering: not implemented" | BRS _ -> invalid_arg "lorentz_ordering: not needed" let wf_index wfmap num_lst (wf, i) = let wf_ID = WFMap.find (wf, i) wfmap and sum lst = List.fold_left (fun x y -> x+y) 0 lst in wf_ID - sum (ThoList.hdn (lorentz_ordering_reduced wf) num_lst) let print_ext lookups amp_ID inc (wf, i) = let mom = (F.momentum_list wf) in let outer_index = if List.length mom = 1 then List.hd mom else failwith "targets.print_ext: called with non-external particle" and f = F.flavor wf in let pdg = CM.pdg f and wf_code = match CM.lorentz f with | Scalar -> ovm_LOAD_SCALAR | BRS Scalar -> ovm_LOAD_BRS_SCALAR | Spinor -> if inc then ovm_LOAD_SPINOR_INC else ovm_LOAD_SPINOR_OUT | BRS Spinor -> if inc then ovm_LOAD_BRS_SPINOR_INC else ovm_LOAD_BRS_SPINOR_OUT | ConjSpinor -> if inc then ovm_LOAD_CONJSPINOR_INC else ovm_LOAD_CONJSPINOR_OUT | BRS ConjSpinor -> if inc then ovm_LOAD_BRS_CONJSPINOR_INC else ovm_LOAD_BRS_CONJSPINOR_OUT | Vector | Massive_Vector -> if inc then ovm_LOAD_VECTOR_INC else ovm_LOAD_VECTOR_OUT | BRS Vector | BRS Massive_Vector -> if inc then ovm_LOAD_BRS_VECTOR_INC else ovm_LOAD_BRS_VECTOR_OUT | Tensor_2 -> if inc then ovm_LOAD_TENSOR2_INC else ovm_LOAD_TENSOR2_OUT | Vectorspinor | BRS Vectorspinor -> if inc then ovm_LOAD_VECTORSPINOR_INC else ovm_LOAD_VECTORSPINOR_OUT | Majorana -> if inc then ovm_LOAD_MAJORANA_INC else ovm_LOAD_MAJORANA_OUT | BRS Majorana -> if inc then ovm_LOAD_BRS_MAJORANA_INC else ovm_LOAD_BRS_MAJORANA_OUT | Maj_Ghost -> if inc then ovm_LOAD_MAJORANA_GHOST_INC else ovm_LOAD_MAJORANA_GHOST_OUT | Tensor_1 -> invalid_arg "targets.print_ext: Tensor_1 only internal" | BRS _ -> failwith "targets.print_ext: Not implemented" and wf_ind = wf_index lookups.wfmap lookups.n_wfs (wf, i) in printi wf_code ~lhs:wf_ind ~coupl:(abs(pdg)) ~rhs1:outer_index ~rhs4:amp_ID let print_ext_amp lookups amplitude = let incoming = (List.map (fun _ -> true) (F.incoming amplitude) @ List.map (fun _ -> false) (F.outgoing amplitude)) and amp_ID = get_ID' amp_compare lookups.amap amplitude in let wf_tpl wf = mult_wf lookups.dict amplitude wf in let print_ext_wf inc wf = wf |> wf_tpl |> print_ext lookups amp_ID inc in List.iter2 print_ext_wf incoming (F.externals amplitude) let print_externals lookups seen_wfs amplitude = let externals = List.combine (F.externals amplitude) (List.map (fun _ -> true) (F.incoming amplitude) @ List.map (fun _ -> false) (F.outgoing amplitude)) in List.fold_left (fun seen (wf, incoming) -> let amp_ID = get_ID' amp_compare lookups.amap amplitude in let wf_tpl = mult_wf lookups.dict amplitude wf in if not (WFSet.mem wf_tpl seen) then begin wf_tpl |> print_ext lookups amp_ID incoming end; WFSet.add wf_tpl seen) seen_wfs externals (* [print_externals] and [print_ext_amp] do in principle the same thing but [print_externals] filters out dublicate external wave functions. Even with [print_externals] the same (numerically) external wave function will be loaded if it belongs to a different color flow, just as in the native Fortran code. For color MC, [print_ext_amp] has to be used (redundant instructions but only one flow is computed) and the filtering of duplicate fusions has to be disabled. *) let print_ext_amps lookups = let print_external_amp s x = print_externals lookups s x in ignore ( List.fold_left print_external_amp WFSet.empty (CF.processes lookups.amplitudes) ) (*i List.iter (print_ext_amp lookups) (CF.processes lookups.amplitudes) i*) (* \thocwmodulesubsection{Currents} *) (* Parallelization issues: All fusions have to be completed before the propagation takes place. Preferably each fusion and propagation is done by one thread. Solution: All fusions are subinstructions, i.e. if they are read by the main loop they are skipped. If a propagation occurs, all fusions have to be computed first. The additional control bit is the sign of the first int of an instruction. *) (*i TODO: (bcn 2014-07-21) Majorana support will come some day maybe i*) let print_fermion_current code_a code_b code_c coeff lhs c wf1 wf2 fusion = let printc code r1 r2 = printi code ~lhs:lhs ~coupl:c ~coeff:coeff ~rhs1:r1 ~rhs2:r2 in match fusion with | F13 -> printc code_a wf1 wf2 | F31 -> printc code_a wf2 wf1 | F23 -> printc code_b wf1 wf2 | F32 -> printc code_b wf2 wf1 | F12 -> printc code_c wf1 wf2 | F21 -> printc code_c wf2 wf1 let ferm_print_current = function | coeff, Psibar, V, Psi -> print_fermion_current ovm_FUSE_V_FF ovm_FUSE_F_VF ovm_FUSE_F_FV coeff | coeff, Psibar, VA, Psi -> print_fermion_current ovm_FUSE_VA_FF ovm_FUSE_F_VAF ovm_FUSE_F_FVA coeff | coeff, Psibar, VA2, Psi -> print_fermion_current ovm_FUSE_VA2_FF ovm_FUSE_F_VA2F ovm_FUSE_F_FVA2 coeff | coeff, Psibar, A, Psi -> print_fermion_current ovm_FUSE_A_FF ovm_FUSE_F_AF ovm_FUSE_F_FA coeff | coeff, Psibar, VL, Psi -> print_fermion_current ovm_FUSE_VL_FF ovm_FUSE_F_VLF ovm_FUSE_F_FVL coeff | coeff, Psibar, VR, Psi -> print_fermion_current ovm_FUSE_VR_FF ovm_FUSE_F_VRF ovm_FUSE_F_FVR coeff | coeff, Psibar, VLR, Psi -> print_fermion_current ovm_FUSE_VLR_FF ovm_FUSE_F_VLRF ovm_FUSE_F_FVLR coeff | coeff, Psibar, SP, Psi -> print_fermion_current ovm_FUSE_SP_FF ovm_FUSE_F_SPF ovm_FUSE_F_FSP coeff | coeff, Psibar, S, Psi -> print_fermion_current ovm_FUSE_S_FF ovm_FUSE_F_SF ovm_FUSE_F_FS coeff | coeff, Psibar, P, Psi -> print_fermion_current ovm_FUSE_P_FF ovm_FUSE_F_PF ovm_FUSE_F_FP coeff | coeff, Psibar, SL, Psi -> print_fermion_current ovm_FUSE_SL_FF ovm_FUSE_F_SLF ovm_FUSE_F_FSL coeff | coeff, Psibar, SR, Psi -> print_fermion_current ovm_FUSE_SR_FF ovm_FUSE_F_SRF ovm_FUSE_F_FSR coeff | coeff, Psibar, SLR, Psi -> print_fermion_current ovm_FUSE_SLR_FF ovm_FUSE_F_SLRF ovm_FUSE_F_FSLR coeff | _, Psibar, _, Psi -> invalid_arg "Targets.Fortran.VM: no superpotential here" | _, Chibar, _, _ | _, _, _, Chi -> invalid_arg "Targets.Fortran.VM: Majorana spinors not handled" | _, Gravbar, _, _ | _, _, _, Grav -> invalid_arg "Targets.Fortran.VM: Gravitinos not handled" let children2 rhs = match F.children rhs with | [wf1; wf2] -> (wf1, wf2) | _ -> failwith "Targets.children2: can't happen" let children3 rhs = match F.children rhs with | [wf1; wf2; wf3] -> (wf1, wf2, wf3) | _ -> invalid_arg "Targets.children3: can't happen" let print_vector4 c lhs wf1 wf2 wf3 fusion (coeff, contraction) = let printc r1 r2 r3 = printi ovm_FUSE_V_VVV ~lhs:lhs ~coupl:c ~coeff:coeff ~rhs1:r1 ~rhs2:r2 ~rhs3:r3 in match contraction, fusion with | C_12_34, (F341|F431|F342|F432|F123|F213|F124|F214) | C_13_42, (F241|F421|F243|F423|F132|F312|F134|F314) | C_14_23, (F231|F321|F234|F324|F142|F412|F143|F413) -> printc wf1 wf2 wf3 | C_12_34, (F134|F143|F234|F243|F312|F321|F412|F421) | C_13_42, (F124|F142|F324|F342|F213|F231|F413|F431) | C_14_23, (F123|F132|F423|F432|F214|F241|F314|F341) -> printc wf2 wf3 wf1 | C_12_34, (F314|F413|F324|F423|F132|F231|F142|F241) | C_13_42, (F214|F412|F234|F432|F123|F321|F143|F341) | C_14_23, (F213|F312|F243|F342|F124|F421|F134|F431) -> printc wf1 wf3 wf2 let print_current lookups lhs amplitude rhs = let f = mult_wf lookups.dict amplitude in match F.coupling rhs with | V3 (vertex, fusion, constant) -> let ch1, ch2 = children2 rhs in let wf1 = wf_index lookups.wfmap lookups.n_wfs (f ch1) and wf2 = wf_index lookups.wfmap lookups.n_wfs (f ch2) and p1 = mom_ID lookups.pmap ch1 and p2 = mom_ID lookups.pmap ch2 and const_ID = get_const_ID lookups.cmap constant in let c = if (F.sign rhs) < 0 then - const_ID else const_ID in begin match vertex with | FBF (coeff, fb, b, f) -> begin match coeff, fb, b, f with | _, Psibar, VLRM, Psi | _, Psibar, SPM, Psi | _, Psibar, TVA, Psi | _, Psibar, TVAM, Psi | _, Psibar, TLR, Psi | _, Psibar, TLRM, Psi | _, Psibar, TRL, Psi | _, Psibar, TRLM, Psi -> failwith "print_current: V3: Momentum dependent fermion couplings not implemented" | _, _, _, _ -> ferm_print_current (coeff, fb, b, f) lhs c wf1 wf2 fusion end | PBP (_, _, _, _) -> failwith "print_current: V3: PBP not implemented" | BBB (_, _, _, _) -> failwith "print_current: V3: BBB not implemented" | GBG (_, _, _, _) -> failwith "print_current: V3: GBG not implemented" | Gauge_Gauge_Gauge coeff -> let printc r1 r2 r3 r4 = printi ovm_FUSE_G_GG ~lhs:lhs ~coupl:c ~coeff:coeff ~rhs1:r1 ~rhs2:r2 ~rhs3:r3 ~rhs4:r4 in begin match fusion with | (F23|F31|F12) -> printc wf1 p1 wf2 p2 | (F32|F13|F21) -> printc wf2 p2 wf1 p1 end | I_Gauge_Gauge_Gauge _ -> failwith "print_current: I_Gauge_Gauge_Gauge: not implemented" | Scalar_Vector_Vector coeff -> let printc code r1 r2 = printi code ~lhs:lhs ~coupl:c ~coeff:coeff ~rhs1:r1 ~rhs2:r2 in begin match fusion with | (F23|F32) -> printc ovm_FUSE_S_VV wf1 wf2 | (F12|F13) -> printc ovm_FUSE_V_SV wf1 wf2 | (F21|F31) -> printc ovm_FUSE_V_SV wf2 wf1 end | Scalar_Scalar_Scalar coeff -> printi ovm_FUSE_S_SS ~lhs:lhs ~coupl:c ~coeff:coeff ~rhs1:wf1 ~rhs2:wf2 | Vector_Scalar_Scalar coeff -> let printc code ?flip:(f = 1) r1 r2 r3 r4 = printi code ~lhs:lhs ~coupl:(c*f) ~coeff:coeff ~rhs1:r1 ~rhs2:r2 ~rhs3:r3 ~rhs4:r4 in begin match fusion with | F23 -> printc ovm_FUSE_V_SS wf1 p1 wf2 p2 | F32 -> printc ovm_FUSE_V_SS wf2 p2 wf1 p1 | F12 -> printc ovm_FUSE_S_VS wf1 p1 wf2 p2 | F21 -> printc ovm_FUSE_S_VS wf2 p2 wf1 p1 | F13 -> printc ovm_FUSE_S_VS wf1 p1 wf2 p2 ~flip:(-1) | F31 -> printc ovm_FUSE_S_VS wf2 p2 wf1 p1 ~flip:(-1) end | Aux_Vector_Vector _ -> failwith "print_current: V3: not implemented" | Aux_Scalar_Scalar _ -> failwith "print_current: V3: not implemented" | Aux_Scalar_Vector _ -> failwith "print_current: V3: not implemented" | Graviton_Scalar_Scalar _ -> failwith "print_current: V3: not implemented" | Graviton_Vector_Vector _ -> failwith "print_current: V3: not implemented" | Graviton_Spinor_Spinor _ -> failwith "print_current: V3: not implemented" | Dim4_Vector_Vector_Vector_T _ -> failwith "print_current: V3: not implemented" | Dim4_Vector_Vector_Vector_L _ -> failwith "print_current: V3: not implemented" | Dim6_Gauge_Gauge_Gauge _ -> failwith "print_current: V3: not implemented" | Dim4_Vector_Vector_Vector_T5 _ -> failwith "print_current: V3: not implemented" | Dim4_Vector_Vector_Vector_L5 _ -> failwith "print_current: V3: not implemented" | Dim6_Gauge_Gauge_Gauge_5 _ -> failwith "print_current: V3: not implemented" | Aux_DScalar_DScalar _ -> failwith "print_current: V3: not implemented" | Aux_Vector_DScalar _ -> failwith "print_current: V3: not implemented" | Dim5_Scalar_Gauge2 coeff -> let printc code r1 r2 r3 r4 = printi code ~lhs:lhs ~coupl:c ~coeff:coeff ~rhs1:r1 ~rhs2:r2 ~rhs3:r3 ~rhs4:r4 in begin match fusion with | (F23|F32) -> printc ovm_FUSE_S_G2 wf1 p1 wf2 p2 | (F12|F13) -> printc ovm_FUSE_G_SG wf1 p1 wf2 p2 | (F21|F31) -> printc ovm_FUSE_G_GS wf2 p2 wf1 p1 end | Dim5_Scalar_Gauge2_Skew coeff -> let printc code ?flip:(f = 1) r1 r2 r3 r4 = printi code ~lhs:lhs ~coupl:(c*f) ~coeff:coeff ~rhs1:r1 ~rhs2:r2 ~rhs3:r3 ~rhs4:r4 in begin match fusion with | (F23|F32) -> printc ovm_FUSE_S_G2_SKEW wf1 p1 wf2 p2 | (F12|F13) -> printc ovm_FUSE_G_SG_SKEW wf1 p1 wf2 p2 | (F21|F31) -> printc ovm_FUSE_G_GS_SKEW wf2 p1 wf1 p2 ~flip:(-1) end | Dim5_Scalar_Vector_Vector_T _ -> failwith "print_current: V3: not implemented" | Dim5_Scalar_Vector_Vector_U _ -> failwith "print_current: V3: not implemented" | Dim5_Scalar_Scalar2 _ -> failwith "print_current: V3: not implemented" | Dim6_Vector_Vector_Vector_T _ -> failwith "print_current: V3: not implemented" | Tensor_2_Vector_Vector _ -> failwith "print_current: V3: not implemented" | Tensor_2_Scalar_Scalar _ -> failwith "print_current: V3: not implemented" | Dim5_Tensor_2_Vector_Vector_1 _ -> failwith "print_current: V3: not implemented" | Dim5_Tensor_2_Vector_Vector_2 _ -> failwith "print_current: V3: not implemented" | Dim7_Tensor_2_Vector_Vector_T _ -> failwith "print_current: V3: not implemented" | Dim5_Scalar_Vector_Vector_TU _ -> failwith "print_current: V3: not implemented" | Scalar_Vector_Vector_t _ -> failwith "print_current: V3: not implemented" | Tensor_2_Vector_Vector_cf _ -> failwith "print_current: V3: not implemented" | Tensor_2_Scalar_Scalar_cf _ -> failwith "print_current: V3: not implemented" | Tensor_2_Vector_Vector_1 _ -> failwith "print_current: V3: not implemented" | Tensor_2_Vector_Vector_t _ -> failwith "print_current: V3: not implemented" | TensorVector_Vector_Vector _ -> failwith "print_current: V3: not implemented" | TensorVector_Vector_Vector_cf _ -> failwith "print_current: V3: not implemented" | TensorVector_Scalar_Scalar _ -> failwith "print_current: V3: not implemented" | TensorVector_Scalar_Scalar_cf _ -> failwith "print_current: V3: not implemented" | TensorScalar_Vector_Vector _ -> failwith "print_current: V3: not implemented" | TensorScalar_Vector_Vector_cf _ -> failwith "print_current: V3: not implemented" | TensorScalar_Scalar_Scalar _ -> failwith "print_current: V3: not implemented" | TensorScalar_Scalar_Scalar_cf _ -> failwith "print_current: V3: not implemented" | Dim6_Scalar_Vector_Vector_D _ -> failwith "print_current: V3: not implemented" | Dim6_Scalar_Vector_Vector_DP _ -> failwith "print_current: V3: not implemented" | Dim6_HAZ_D _ -> failwith "print_current: V3: not implemented" | Dim6_HAZ_DP _ -> failwith "print_current: V3: not implemented" | Dim6_HHH _ -> failwith "print_current: V3: not implemented" | Dim6_Gauge_Gauge_Gauge_i _ -> failwith "print_current: V3: not implemented" | Gauge_Gauge_Gauge_i _ -> failwith "print_current: V3: not implemented" | Dim6_GGG _ -> failwith "print_current: V3: not implemented" | Dim6_AWW_DP _ -> failwith "print_current: V3: not implemented" | Dim6_AWW_DW _ -> failwith "print_current: V3: not implemented" | Dim6_WWZ_DPWDW _ -> failwith "print_current: V3: not implemented" | Dim6_WWZ_DW _ -> failwith "print_current: V3: not implemented" | Dim6_WWZ_D _ -> failwith "print_current: V3: not implemented" | Aux_Gauge_Gauge _ -> failwith "print_current: V3 (Aux_Gauge_Gauge): not implemented" - | UFO3 (c, v, s, Color.Trivial3) -> - failwith "print_current: V3 (UFO3): not implemented yet" - - | UFO3 (c, v, s, _) -> - failwith "print_current: V3 (UFO3): unexpected color" - end (* Flip the sign in [c] to account for the~$\mathrm{i}^2$ relative to diagrams with only cubic couplings. *) | V4 (vertex, fusion, constant) -> let ch1, ch2, ch3 = children3 rhs in let wf1 = wf_index lookups.wfmap lookups.n_wfs (f ch1) and wf2 = wf_index lookups.wfmap lookups.n_wfs (f ch2) and wf3 = wf_index lookups.wfmap lookups.n_wfs (f ch3) (*i (*and p1 = mom_ID lookups.pmap ch1*) (*and p2 = mom_ID lookups.pmap ch2*) (*and p3 = mom_ID lookups.pmap ch2*) i*) and const_ID = get_const_ID lookups.cmap constant in let c = if (F.sign rhs) < 0 then const_ID else - const_ID in begin match vertex with | Scalar4 coeff -> printi ovm_FUSE_S_SSS ~lhs:lhs ~coupl:c ~coeff:coeff ~rhs1:wf1 ~rhs2:wf2 ~rhs3:wf3 | Scalar2_Vector2 coeff -> let printc code r1 r2 r3 = printi code ~lhs:lhs ~coupl:c ~coeff:coeff ~rhs1:r1 ~rhs2:r2 ~rhs3:r3 in begin match fusion with | F134 | F143 | F234 | F243 -> printc ovm_FUSE_S_SVV wf1 wf2 wf3 | F314 | F413 | F324 | F423 -> printc ovm_FUSE_S_SVV wf2 wf1 wf3 | F341 | F431 | F342 | F432 -> printc ovm_FUSE_S_SVV wf3 wf1 wf2 | F312 | F321 | F412 | F421 -> printc ovm_FUSE_V_SSV wf2 wf3 wf1 | F231 | F132 | F241 | F142 -> printc ovm_FUSE_V_SSV wf1 wf3 wf2 | F123 | F213 | F124 | F214 -> printc ovm_FUSE_V_SSV wf1 wf2 wf3 end | Vector4 contractions -> List.iter (print_vector4 c lhs wf1 wf2 wf3 fusion) contractions | Vector4_K_Matrix_tho _ | Vector4_K_Matrix_jr _ | Vector4_K_Matrix_cf_t0 _ | Vector4_K_Matrix_cf_t1 _ | Vector4_K_Matrix_cf_t2 _ | Vector4_K_Matrix_cf_t_rsi _ | Vector4_K_Matrix_cf_m0 _ | Vector4_K_Matrix_cf_m1 _ | Vector4_K_Matrix_cf_m7 _ | DScalar2_Vector2_K_Matrix_ms _ | DScalar2_Vector2_m_0_K_Matrix_cf _ | DScalar2_Vector2_m_1_K_Matrix_cf _ | DScalar2_Vector2_m_7_K_Matrix_cf _ | DScalar4_K_Matrix_ms _ -> failwith "print_current: V4: K_Matrix not implemented" | Dim8_Scalar2_Vector2_1 _ | Dim8_Scalar2_Vector2_2 _ | Dim8_Scalar2_Vector2_m_0 _ | Dim8_Scalar2_Vector2_m_1 _ | Dim8_Scalar2_Vector2_m_7 _ | Dim8_Scalar4 _ -> failwith "print_current: V4: not implemented" | Dim8_Vector4_t_0 _ -> failwith "print_current: V4: not implemented" | Dim8_Vector4_t_1 _ -> failwith "print_current: V4: not implemented" | Dim8_Vector4_t_2 _ -> failwith "print_current: V4: not implemented" | Dim8_Vector4_m_0 _ -> failwith "print_current: V4: not implemented" | Dim8_Vector4_m_1 _ -> failwith "print_current: V4: not implemented" | Dim8_Vector4_m_7 _ -> failwith "print_current: V4: not implemented" | GBBG _ -> failwith "print_current: V4: GBBG not implemented" | DScalar4 _ | DScalar2_Vector2 _ -> failwith "print_current: V4: DScalars not implemented" | Dim6_H4_P2 _ -> failwith "print_current: V4: not implemented" | Dim6_AHWW_DPB _ -> failwith "print_current: V4: not implemented" | Dim6_AHWW_DPW _ -> failwith "print_current: V4: not implemented" | Dim6_AHWW_DW _ -> failwith "print_current: V4: not implemented" | Dim6_Vector4_DW _ -> failwith "print_current: V4: not implemented" | Dim6_Vector4_W _ -> failwith "print_current: V4: not implemented" | Dim6_Scalar2_Vector2_D _ -> failwith "print_current: V4: not implemented" | Dim6_Scalar2_Vector2_DP _ -> failwith "print_current: V4: not implemented" | Dim6_HWWZ_DW _ -> failwith "print_current: V4: not implemented" | Dim6_HWWZ_DPB _ -> failwith "print_current: V4: not implemented" | Dim6_HWWZ_DDPW _ -> failwith "print_current: V4: not implemented" | Dim6_HWWZ_DPW _ -> failwith "print_current: V4: not implemented" | Dim6_AHHZ_D _ -> failwith "print_current: V4: not implemented" | Dim6_AHHZ_DP _ -> failwith "print_current: V4: not implemented" | Dim6_AHHZ_PB _ -> failwith "print_current: V4: not implemented" | Dim6_Scalar2_Vector2_PB _ -> failwith "print_current: V4: not implemented" | Dim6_HHZZ_T _ -> failwith "print_current: V4: not implemented" - | UFO4 (c, v, s, Color.Trivial4) -> - failwith "print_current: V4 (UFO4): not implemented yet" - - | UFO4 (c, v, s, _) -> - failwith "print_current: V4 (UFO4): unexpected color" - end | Vn (_, _, _) -> invalid_arg "Targets.print_current: n-ary fusion." (* \thocwmodulesubsection{Fusions} *) let print_fusion lookups lhs_momID fusion amplitude = if F.on_shell amplitude (F.lhs fusion) then failwith "print_fusion: on_shell projectors not implemented!"; if F.is_gauss amplitude (F.lhs fusion) then failwith "print_fusion: gauss amplitudes not implemented!"; let lhs_wf = mult_wf lookups.dict amplitude (F.lhs fusion) in let lhs_wfID = wf_index lookups.wfmap lookups.n_wfs lhs_wf in let f = F.flavor (F.lhs fusion) in let pdg = CM.pdg f in let w = begin match CM.width f with | Vanishing | Fudged -> 0 | Constant -> 1 | Timelike -> 2 | Complex_Mass -> 3 | Running -> failwith "Targets.VM: running width not available" | Custom _ -> failwith "Targets.VM: custom width not available" end in let propagate code = printi code ~lhs:lhs_wfID ~rhs1:lhs_momID ~coupl:(abs(pdg)) ~coeff:w ~rhs4:(get_ID' amp_compare lookups.amap amplitude) in begin match CM.propagator f with | Prop_Scalar -> propagate ovm_PROPAGATE_SCALAR | Prop_Col_Scalar -> propagate ovm_PROPAGATE_COL_SCALAR | Prop_Ghost -> propagate ovm_PROPAGATE_GHOST | Prop_Spinor -> propagate ovm_PROPAGATE_SPINOR | Prop_ConjSpinor -> propagate ovm_PROPAGATE_CONJSPINOR | Prop_Majorana -> propagate ovm_PROPAGATE_MAJORANA | Prop_Col_Majorana -> propagate ovm_PROPAGATE_COL_MAJORANA | Prop_Unitarity -> propagate ovm_PROPAGATE_UNITARITY | Prop_Col_Unitarity -> propagate ovm_PROPAGATE_COL_UNITARITY | Prop_Feynman -> propagate ovm_PROPAGATE_FEYNMAN | Prop_Col_Feynman -> propagate ovm_PROPAGATE_COL_FEYNMAN | Prop_Vectorspinor -> propagate ovm_PROPAGATE_VECTORSPINOR | Prop_Tensor_2 -> propagate ovm_PROPAGATE_TENSOR2 | Aux_Col_Scalar | Aux_Col_Vector | Aux_Col_Tensor_1 -> failwith "print_fusion: Aux_Col_* not implemented!" | Aux_Vector | Aux_Tensor_1 | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana | Only_Insertion -> propagate ovm_PROPAGATE_NONE | Prop_Gauge _ -> failwith "print_fusion: Prop_Gauge not implemented!" | Prop_Tensor_pure -> failwith "print_fusion: Prop_Tensor_pure not implemented!" | Prop_Vector_pure -> failwith "print_fusion: Prop_Vector_pure not implemented!" | Prop_Rxi _ -> failwith "print_fusion: Prop_Rxi not implemented!" end; (* Since the OVM knows that we want to propagate a wf, we can send the necessary fusions now. *) List.iter (print_current lookups lhs_wfID amplitude) (F.rhs fusion) let print_all_fusions lookups = let fusions = CF.fusions lookups.amplitudes in let fset = List.fold_left (fun s x -> FSet.add x s) FSet.empty fusions in ignore (List.fold_left (fun level (f, amplitude) -> let wf = F.lhs f in let lhs_momID = mom_ID lookups.pmap wf in let level' = List.length (F.momentum_list wf) in if (level' > level && level' > 2) then break (); print_fusion lookups lhs_momID f amplitude; level') 1 (FSet.elements fset) ) (* \thocwmodulesubsection{Brakets} *) let print_braket lookups amplitude braket = let bra = F.bra braket and ket = F.ket braket in let braID = wf_index lookups.wfmap lookups.n_wfs (mult_wf lookups.dict amplitude bra) in List.iter (print_current lookups braID amplitude) ket (* \begin{equation} \ii T = \ii^{\#\text{vertices}}\ii^{\#\text{propagators}} \cdots = \ii^{n-2}\ii^{n-3} \cdots = -\ii(-1)^n \cdots \end{equation} *) (* All brakets for one cflow amplitude should be calculated by one thread to avoid multiple access on the same memory (amplitude).*) let print_brakets lookups (amplitude, i) = let n = List.length (F.externals amplitude) in let sign = if n mod 2 = 0 then -1 else 1 and sym = F.symmetry amplitude in printi ovm_CALC_BRAKET ~lhs:i ~rhs1:sym ~coupl:sign; amplitude |> F.brakets |> List.iter (print_braket lookups amplitude) (* Fortran arrays/OCaml lists start on 1/0. The amplitude list is sorted by [amp_compare] according to their color flows. In this way the amp array is sorted in the same way as [table_color_factors]. *) let print_all_brakets lookups = let g i elt = print_brakets lookups (elt, i+1) in lookups.amplitudes |> CF.processes |> List.sort amp_compare |> ThoList.iteri g 0 (* \thocwmodulesubsection{Couplings} *) (* For now we only care to catch the arrays [gncneu], [gnclep], [gncup] and [gncdown] of the SM. This will need an overhaul when it is clear how we store the type information of coupling constants. *) let strip_array_tag = function | Real_Array x -> x | Complex_Array x -> x let array_constants_list = let params = M.parameters() and strip_to_constant (lhs, _) = strip_array_tag lhs in List.map strip_to_constant params.derived_arrays let is_array x = List.mem x array_constants_list let constants_map = let first = fun (x, _, _) -> x in let second = fun (_, y, _) -> y in let third = fun (_, _, z) -> z in let v3 = List.map third (first (M.vertices () )) and v4 = List.map third (second (M.vertices () )) in let set = List.fold_left (fun s x -> CSet.add x s) CSet.empty (v3 @ v4) in let (arrays, singles) = CSet.partition is_array set in (singles |> CSet.elements |> map_of_list, arrays |> CSet.elements |> map_of_list) (* \thocwmodulesubsection{Output calls} *) let amplitudes_to_channel (cmdline : string) (oc : out_channel) (diagnostics : (diagnostic * bool) list ) (amplitudes : CF.amplitudes) = set_formatter_out_channel oc; if (num_particles amplitudes = 0) then begin print_description cmdline; print_zero_header (); nl () end else begin let (wfset, amap) = wfset_amps amplitudes in let pset = expand_pset (momenta_set wfset) and n_wfs = num_wfs wfset in let wfmap = wf_map_of_list (WFSet.elements wfset) and pmap = map_of_list (ISet.elements pset) and cmap = constants_map in let lookups = {pmap = pmap; wfmap = wfmap; cmap = cmap; amap = amap; n_wfs = n_wfs; amplitudes = amplitudes; dict = CF.dictionary amplitudes} in print_description cmdline; print_header lookups wfset; print_spin_table amplitudes; print_flavor_tables amplitudes; print_color_tables amplitudes; printf "@\n%s" ("OVM instructions for momenta addition," ^ " fusions and brakets start here: "); break (); add_all_mom lookups pset; print_ext_amps lookups; break (); print_all_fusions lookups; break (); print_all_brakets lookups; break (); nl (); print_flush () end let parameters_to_fortran oc _ = (*i The -params options is used as wrapper between OVM and Whizard. Most * trouble for the OVM comes from the array dimensionalities of couplings * but O'Mega should also know whether a constant is real or complex. * Hopefully all will be clearer with the fully general Lorentz structures * and UFO support. For now, we stick with this brute-force solution. i*) set_formatter_out_channel oc; let arrays_to_set = not (IMap.is_empty (snd constants_map)) in let set_coupl ty dim cmap = IMap.iter (fun key elt -> printf " %s(%s%d) = %s" ty dim key (M.constant_symbol elt); nl () ) cmap in let declarations () = printf " complex(%s), dimension(%d) :: ovm_coupl_cmplx" !kind (constants_map |> fst |> largest_key); nl (); if arrays_to_set then printf " complex(%s), dimension(2, %d) :: ovm_coupl_cmplx2" !kind (constants_map |> snd |> largest_key); nl () in let print_line str = printf "%s" str; nl() in let print_md5sum = function | Some s -> print_line " function md5sum ()"; print_line " character(len=32) :: md5sum"; print_line (" bytecode_file = '" ^ !bytecode_file ^ "'"); print_line " call initialize_vm (vm, bytecode_file)"; print_line " ! DON'T EVEN THINK of modifying the following line!"; print_line (" md5sum = '" ^ s ^ "'"); print_line " end function md5sum"; | None -> () in let print_inquiry_function_openmp () = begin print_line " pure function openmp_supported () result (status)"; print_line " logical :: status"; print_line (" status = " ^ (if !openmp then ".true." else ".false.")); print_line " end function openmp_supported"; nl () end in let print_interface whizard = if whizard then begin print_line " subroutine init (par, scheme)"; print_line " real(kind=default), dimension(*), intent(in) :: par"; print_line " integer, intent(in) :: scheme"; print_line (" bytecode_file = '" ^ !bytecode_file ^ "'"); print_line " call import_from_whizard (par, scheme)"; print_line " call initialize_vm (vm, bytecode_file)"; print_line " end subroutine init"; nl (); print_line " subroutine final ()"; print_line " call vm%final ()"; print_line " end subroutine final"; nl (); print_line " subroutine update_alpha_s (alpha_s)"; print_line (" real(kind=" ^ !kind ^ "), intent(in) :: alpha_s"); print_line " call model_update_alpha_s (alpha_s)"; print_line " end subroutine update_alpha_s"; nl () end else begin print_line " subroutine init ()"; print_line (" bytecode_file = '" ^ !bytecode_file ^ "'"); print_line " call init_parameters ()"; print_line " call initialize_vm (vm, bytecode_file)"; print_line " end subroutine" end in let print_lookup_functions () = begin print_line " pure function number_particles_in () result (n)"; print_line " integer :: n"; print_line " n = vm%number_particles_in ()"; print_line " end function number_particles_in"; nl(); print_line " pure function number_particles_out () result (n)"; print_line " integer :: n"; print_line " n = vm%number_particles_out ()"; print_line " end function number_particles_out"; nl(); print_line " pure function number_spin_states () result (n)"; print_line " integer :: n"; print_line " n = vm%number_spin_states ()"; print_line " end function number_spin_states"; nl(); print_line " pure subroutine spin_states (a)"; print_line " integer, dimension(:,:), intent(out) :: a"; print_line " call vm%spin_states (a)"; print_line " end subroutine spin_states"; nl(); print_line " pure function number_flavor_states () result (n)"; print_line " integer :: n"; print_line " n = vm%number_flavor_states ()"; print_line " end function number_flavor_states"; nl(); print_line " pure subroutine flavor_states (a)"; print_line " integer, dimension(:,:), intent(out) :: a"; print_line " call vm%flavor_states (a)"; print_line " end subroutine flavor_states"; nl(); print_line " pure function number_color_indices () result (n)"; print_line " integer :: n"; print_line " n = vm%number_color_indices ()"; print_line " end function number_color_indices"; nl(); print_line " pure function number_color_flows () result (n)"; print_line " integer :: n"; print_line " n = vm%number_color_flows ()"; print_line " end function number_color_flows"; nl(); print_line " pure subroutine color_flows (a, g)"; print_line " integer, dimension(:,:,:), intent(out) :: a"; print_line " logical, dimension(:,:), intent(out) :: g"; print_line " call vm%color_flows (a, g)"; print_line " end subroutine color_flows"; nl(); print_line " pure function number_color_factors () result (n)"; print_line " integer :: n"; print_line " n = vm%number_color_factors ()"; print_line " end function number_color_factors"; nl(); print_line " pure subroutine color_factors (cf)"; print_line " use omega_color"; print_line " type(omega_color_factor), dimension(:), intent(out) :: cf"; print_line " call vm%color_factors (cf)"; print_line " end subroutine color_factors"; nl(); print_line " !pure unless OpenMP"; print_line " !pure function color_sum (flv, hel) result (amp2)"; print_line " function color_sum (flv, hel) result (amp2)"; print_line " use kinds"; print_line " integer, intent(in) :: flv, hel"; print_line " real(kind=default) :: amp2"; print_line " amp2 = vm%color_sum (flv, hel)"; print_line " end function color_sum"; nl(); print_line " subroutine new_event (p)"; print_line " use kinds"; print_line " real(kind=default), dimension(0:3,*), intent(in) :: p"; print_line " call vm%new_event (p)"; print_line " end subroutine new_event"; nl(); print_line " subroutine reset_helicity_selection (threshold, cutoff)"; print_line " use kinds"; print_line " real(kind=default), intent(in) :: threshold"; print_line " integer, intent(in) :: cutoff"; print_line " call vm%reset_helicity_selection (threshold, cutoff)"; print_line " end subroutine reset_helicity_selection"; nl(); print_line " pure function is_allowed (flv, hel, col) result (yorn)"; print_line " logical :: yorn"; print_line " integer, intent(in) :: flv, hel, col"; print_line " yorn = vm%is_allowed (flv, hel, col)"; print_line " end function is_allowed"; nl(); print_line " pure function get_amplitude (flv, hel, col) result (amp_result)"; print_line " use kinds"; print_line " complex(kind=default) :: amp_result"; print_line " integer, intent(in) :: flv, hel, col"; print_line " amp_result = vm%get_amplitude(flv, hel, col)"; print_line " end function get_amplitude"; nl(); end in print_line ("module " ^ !wrapper_module); print_line (" use " ^ !parameter_module_external); print_line " use iso_varying_string, string_t => varying_string"; print_line " use kinds"; print_line " use omegavm95"; print_line " implicit none"; print_line " private"; print_line " type(vm_t) :: vm"; print_line " type(string_t) :: bytecode_file"; print_line (" public :: number_particles_in, number_particles_out," ^ " number_spin_states, &"); print_line (" spin_states, number_flavor_states, flavor_states," ^ " number_color_indices, &"); print_line (" number_color_flows, color_flows," ^ " number_color_factors, color_factors, &"); print_line (" color_sum, new_event, reset_helicity_selection," ^ " is_allowed, get_amplitude, &"); print_line (" init, " ^ (match !md5sum with Some _ -> "md5sum, " | None -> "") ^ "openmp_supported"); if !whizard then print_line (" public :: final, update_alpha_s") else print_line (" public :: initialize_vm"); declarations (); print_line "contains"; print_line " subroutine setup_couplings ()"; set_coupl "ovm_coupl_cmplx" "" (fst constants_map); if arrays_to_set then set_coupl "ovm_coupl_cmplx2" ":," (snd constants_map); print_line " end subroutine setup_couplings"; print_line " subroutine initialize_vm (vm, bytecode_file)"; print_line " class(vm_t), intent(out) :: vm"; print_line " type(string_t), intent(in) :: bytecode_file"; print_line " type(string_t) :: version"; print_line " type(string_t) :: model"; print_line (" version = 'OVM " ^ version ^ "'"); print_line (" model = 'Model " ^ model_name ^ "'"); print_line " call setup_couplings ()"; print_line " call vm%init (bytecode_file, version, model, verbose=.False., &"; print_line " coupl_cmplx=ovm_coupl_cmplx, &"; if arrays_to_set then print_line " coupl_cmplx2=ovm_coupl_cmplx2, &"; print_line (" mass=mass, width=width, openmp=" ^ (if !openmp then ".true." else ".false.") ^ ")"); print_line " end subroutine initialize_vm"; nl(); print_md5sum !md5sum; print_inquiry_function_openmp (); print_interface !whizard; print_lookup_functions (); print_line ("end module " ^ !wrapper_module) let parameters_to_channel oc = parameters_to_fortran oc (CM.parameters ()) end (* \thocwmodulesection{\texttt{Fortran\,90/95}} *) (* \thocwmodulesubsection{Dirac Fermions} We factor out the code for fermions so that we can use the simpler implementation for Dirac fermions if the model contains no Majorana fermions. *) module type Fermions = sig open Coupling val psi_type : string val psibar_type : string val chi_type : string val grav_type : string val psi_incoming : string val brs_psi_incoming : string val psibar_incoming : string val brs_psibar_incoming : string val chi_incoming : string val brs_chi_incoming : string val grav_incoming : string val psi_outgoing : string val brs_psi_outgoing : string val psibar_outgoing : string val brs_psibar_outgoing : string val chi_outgoing : string val brs_chi_outgoing : string val grav_outgoing : string val psi_propagator : string val psibar_propagator : string val chi_propagator : string val grav_propagator : string val psi_projector : string val psibar_projector : string val chi_projector : string val grav_projector : string val psi_gauss : string val psibar_gauss : string val chi_gauss : string val grav_gauss : string val print_current : int * fermionbar * boson * fermion -> string -> string -> string -> fuse2 -> unit val print_current_mom : int * fermionbar * boson * fermion -> string -> string -> string -> string -> string -> string -> fuse2 -> unit val print_current_p : int * fermion * boson * fermion -> string -> string -> string -> fuse2 -> unit val print_current_b : int * fermionbar * boson * fermionbar -> string -> string -> string -> fuse2 -> unit val print_current_g : int * fermionbar * boson * fermion -> string -> string -> string -> string -> string -> string -> fuse2 -> unit val print_current_g4 : int * fermionbar * boson2 * fermion -> string -> string -> string -> string -> fuse3 -> unit val reverse_braket : lorentz -> bool val use_module : string val require_library : string list end module Fortran_Fermions : Fermions = struct open Coupling open Format let psi_type = "spinor" let psibar_type = "conjspinor" let chi_type = "???" let grav_type = "???" let psi_incoming = "u" let brs_psi_incoming = "brs_u" let psibar_incoming = "vbar" let brs_psibar_incoming = "brs_vbar" let chi_incoming = "???" let brs_chi_incoming = "???" let grav_incoming = "???" let psi_outgoing = "v" let brs_psi_outgoing = "brs_v" let psibar_outgoing = "ubar" let brs_psibar_outgoing = "brs_ubar" let chi_outgoing = "???" let brs_chi_outgoing = "???" let grav_outgoing = "???" let psi_propagator = "pr_psi" let psibar_propagator = "pr_psibar" let chi_propagator = "???" let grav_propagator = "???" let psi_projector = "pj_psi" let psibar_projector = "pj_psibar" let chi_projector = "???" let grav_projector = "???" let psi_gauss = "pg_psi" let psibar_gauss = "pg_psibar" let chi_gauss = "???" let grav_gauss = "???" let format_coupling coeff c = match coeff with | 1 -> c | -1 -> "(-" ^ c ^")" | coeff -> string_of_int coeff ^ "*" ^ c let format_coupling_2 coeff c = match coeff with | 1 -> c | -1 -> "-" ^ c | coeff -> string_of_int coeff ^ "*" ^ c (* \begin{dubious} JR's coupling constant HACK, necessitated by tho's bad design descition. \end{dubious} *) let fastener s i ?p ?q () = try let offset = (String.index s '(') in if ((String.get s (String.length s - 1)) != ')') then failwith "fastener: wrong usage of parentheses" else let func_name = (String.sub s 0 offset) and tail = (String.sub s (succ offset) (String.length s - offset - 2)) in if (String.contains func_name ')') || (String.contains tail '(') || (String.contains tail ')') then failwith "fastener: wrong usage of parentheses" else func_name ^ "(" ^ string_of_int i ^ "," ^ tail ^ ")" with | Not_found -> if (String.contains s ')') then failwith "fastener: wrong usage of parentheses" else match p with | None -> s ^ "(" ^ string_of_int i ^ ")" | Some p -> match q with | None -> s ^ "(" ^ p ^ "*" ^ p ^ "," ^ string_of_int i ^ ")" | Some q -> s ^ "(" ^ p ^ "," ^ q ^ "," ^ string_of_int i ^ ")" let print_fermion_current coeff f c wf1 wf2 fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_ff(%s,%s,%s)" f c wf1 wf2 | F31 -> printf "%s_ff(%s,%s,%s)" f c wf2 wf1 | F23 -> printf "f_%sf(%s,%s,%s)" f c wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s)" f c wf2 wf1 | F12 -> printf "f_f%s(%s,%s,%s)" f c wf1 wf2 | F21 -> printf "f_f%s(%s,%s,%s)" f c wf2 wf1 (* \begin{dubious} Using a two element array for the combined vector-axial and scalar-pseudo couplings helps to support HELAS as well. Since we will probably never support general boson couplings with HELAS, it might be retired in favor of two separate variables. For this [Model.constant_symbol] has to be generalized. \end{dubious} *) (* \begin{dubious} NB: passing the array instead of two separate constants would be a \emph{bad} idea, because the support for Majorana spinors below will have to flip signs! \end{dubious} *) let print_fermion_current2 coeff f c wf1 wf2 fusion = let c = format_coupling_2 coeff c in let c1 = fastener c 1 () and c2 = fastener c 2 () in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F31 -> printf "%s_ff(%s,%s,%s,%s)" f c1 c2 wf2 wf1 | F23 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf2 wf1 | F12 -> printf "f_f%s(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F21 -> printf "f_f%s(%s,%s,%s,%s)" f c1 c2 wf2 wf1 let print_fermion_current_mom_v1 coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s)" f (c1 ~p:p12 ()) (c2 ~p:p12 ()) wf1 wf2 | F31 -> printf "%s_ff(%s,%s,%s,%s)" f (c1 ~p:p12 ()) (c2 ~p:p12 ()) wf2 wf1 | F23 -> printf "f_%sf(%s,%s,%s,%s)" f (c1 ~p:p1 ()) (c2 ~p:p1 ()) wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s,%s)" f (c1 ~p:p2 ()) (c2 ~p:p2 ()) wf2 wf1 | F12 -> printf "f_f%s(%s,%s,%s,%s)" f (c1 ~p:p2 ()) (c2 ~p:p2 ()) wf1 wf2 | F21 -> printf "f_f%s(%s,%s,%s,%s)" f (c1 ~p:p1 ()) (c2 ~p:p1 ()) wf2 wf1 let print_fermion_current_mom_v2 coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,@,%s,%s,%s)" f (c1 ~p:p12 ()) (c2 ~p:p12 ()) wf1 wf2 p12 | F31 -> printf "%s_ff(%s,%s,@,%s,%s,%s)" f (c1 ~p:p12 ()) (c2 ~p:p12 ()) wf2 wf1 p12 | F23 -> printf "f_%sf(%s,%s,@,%s,%s,%s)" f (c1 ~p:p1 ()) (c2 ~p:p1 ()) wf1 wf2 p1 | F32 -> printf "f_%sf(%s,%s,@,%s,%s,%s)" f (c1 ~p:p2 ()) (c2 ~p:p2 ()) wf2 wf1 p2 | F12 -> printf "f_f%s(%s,%s,@,%s,%s,%s)" f (c1 ~p:p2 ()) (c2 ~p:p2 ()) wf1 wf2 p2 | F21 -> printf "f_f%s(%s,%s,@,%s,%s,%s)" f (c1 ~p:p1 ()) (c2 ~p:p1 ()) wf2 wf1 p1 let print_fermion_current_mom_ff coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s)" f (c1 ~p:p1 ~q:p2 ()) (c2 ~p:p1 ~q:p2 ()) wf1 wf2 | F31 -> printf "%s_ff(%s,%s,%s,%s)" f (c1 ~p:p1 ~q:p2 ()) (c2 ~p:p1 ~q:p2 ()) wf2 wf1 | F23 -> printf "f_%sf(%s,%s,%s,%s)" f (c1 ~p:p12 ~q:p2 ()) (c2 ~p:p12 ~q:p2 ()) wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s,%s)" f (c1 ~p:p12 ~q:p1 ()) (c2 ~p:p12 ~q:p1 ()) wf2 wf1 | F12 -> printf "f_f%s(%s,%s,%s,%s)" f (c1 ~p:p12 ~q:p1 ()) (c2 ~p:p12 ~q:p1 ()) wf1 wf2 | F21 -> printf "f_f%s(%s,%s,%s,%s)" f (c1 ~p:p12 ~q:p2 ()) (c2 ~p:p12 ~q:p2 ()) wf2 wf1 let print_current = function | coeff, Psibar, VA, Psi -> print_fermion_current2 coeff "va" | coeff, Psibar, VA2, Psi -> print_fermion_current coeff "va2" | coeff, Psibar, VA3, Psi -> print_fermion_current coeff "va3" | coeff, Psibar, V, Psi -> print_fermion_current coeff "v" | coeff, Psibar, A, Psi -> print_fermion_current coeff "a" | coeff, Psibar, VL, Psi -> print_fermion_current coeff "vl" | coeff, Psibar, VR, Psi -> print_fermion_current coeff "vr" | coeff, Psibar, VLR, Psi -> print_fermion_current2 coeff "vlr" | coeff, Psibar, SP, Psi -> print_fermion_current2 coeff "sp" | coeff, Psibar, S, Psi -> print_fermion_current coeff "s" | coeff, Psibar, P, Psi -> print_fermion_current coeff "p" | coeff, Psibar, SL, Psi -> print_fermion_current coeff "sl" | coeff, Psibar, SR, Psi -> print_fermion_current coeff "sr" | coeff, Psibar, SLR, Psi -> print_fermion_current2 coeff "slr" | _, Psibar, _, Psi -> invalid_arg "Targets.Fortran_Fermions: no superpotential here" | _, Chibar, _, _ | _, _, _, Chi -> invalid_arg "Targets.Fortran_Fermions: Majorana spinors not handled" | _, Gravbar, _, _ | _, _, _, Grav -> invalid_arg "Targets.Fortran_Fermions: Gravitinos not handled" let print_current_mom = function | coeff, Psibar, VLRM, Psi -> print_fermion_current_mom_v1 coeff "vlr" | coeff, Psibar, VAM, Psi -> print_fermion_current_mom_ff coeff "va" | coeff, Psibar, VA3M, Psi -> print_fermion_current_mom_ff coeff "va3" | coeff, Psibar, SPM, Psi -> print_fermion_current_mom_v1 coeff "sp" | coeff, Psibar, TVA, Psi -> print_fermion_current_mom_v1 coeff "tva" | coeff, Psibar, TVAM, Psi -> print_fermion_current_mom_v2 coeff "tvam" | coeff, Psibar, TLR, Psi -> print_fermion_current_mom_v1 coeff "tlr" | coeff, Psibar, TLRM, Psi -> print_fermion_current_mom_v2 coeff "tlrm" | coeff, Psibar, TRL, Psi -> print_fermion_current_mom_v1 coeff "trl" | coeff, Psibar, TRLM, Psi -> print_fermion_current_mom_v2 coeff "trlm" | _, Psibar, _, Psi -> invalid_arg "Targets.Fortran_Fermions: only sigma tensor coupling here" | _, Chibar, _, _ | _, _, _, Chi -> invalid_arg "Targets.Fortran_Fermions: Majorana spinors not handled" | _, Gravbar, _, _ | _, _, _, Grav -> invalid_arg "Targets.Fortran_Fermions: Gravitinos not handled" let print_current_p = function | _, _, _, _ -> invalid_arg "Targets.Fortran_Fermions: No clashing arrows here" let print_current_b = function | _, _, _, _ -> invalid_arg "Targets.Fortran_Fermions: No clashing arrows here" let print_current_g = function | _, _, _, _ -> invalid_arg "Targets.Fortran_Fermions: No gravitinos here" let print_current_g4 = function | _, _, _, _ -> invalid_arg "Targets.Fortran_Fermions: No gravitinos here" let reverse_braket= function | Spinor -> true | _ -> false let use_module = "omega95" let require_library = ["omega_spinors_2010_01_A"; "omega_spinor_cpls_2010_01_A"] end (* \thocwmodulesubsection{Main Functor} *) module Make_Fortran (Fermions : Fermions) (Fusion_Maker : Fusion.Maker) (P : Momentum.T) (M : Model.T) = struct let require_library = Fermions.require_library @ [ "omega_vectors_2010_01_A"; "omega_polarizations_2010_01_A"; "omega_couplings_2010_01_A"; "omega_color_2010_01_A"; "omega_utils_2010_01_A" ] module CM = Colorize.It(M) module F = Fusion_Maker(P)(M) module CF = Fusion.Multi(Fusion_Maker)(P)(M) type amplitudes = CF.amplitudes open Coupling open Format type output_mode = | Single_Function | Single_Module of int | Single_File of int | Multi_File of int let line_length = ref 80 let continuation_lines = ref (-1) (* 255 *) let kind = ref "default" let fortran95 = ref true let module_name = ref "omega_amplitude" let output_mode = ref (Single_Module 10) let use_modules = ref [] let whizard = ref false let amp_triv = ref false let parameter_module = ref "" let md5sum = ref None let no_write = ref false let km_write = ref false let km_pure = ref false let km_2_write = ref false let km_2_pure = ref false let openmp = ref false let pure_unless_openmp = false let options = Options.create [ "90", Arg.Clear fortran95, "don't use Fortran95 features that are not in Fortran90"; "kind", Arg.String (fun s -> kind := s), "real and complex kind (default: " ^ !kind ^ ")"; "width", Arg.Int (fun w -> line_length := w), "maximum line length"; "continuation", Arg.Int (fun l -> continuation_lines := l), "maximum # of continuation lines"; "module", Arg.String (fun s -> module_name := s), "module name"; "single_function", Arg.Unit (fun () -> output_mode := Single_Function), "compute the matrix element(s) in a monolithic function"; "split_function", Arg.Int (fun n -> output_mode := Single_Module n), "split the matrix element(s) into small functions [default, size = 10]"; "split_module", Arg.Int (fun n -> output_mode := Single_File n), "split the matrix element(s) into small modules"; "split_file", Arg.Int (fun n -> output_mode := Multi_File n), "split the matrix element(s) into small files"; "use", Arg.String (fun s -> use_modules := s :: !use_modules), "use module"; "parameter_module", Arg.String (fun s -> parameter_module := s), "parameter_module"; "md5sum", Arg.String (fun s -> md5sum := Some s), "transfer MD5 checksum"; "whizard", Arg.Set whizard, "include WHIZARD interface"; "amp_triv", Arg.Set amp_triv, "only print trivial amplitude"; "no_write", Arg.Set no_write, "no 'write' statements"; "kmatrix_write", Arg.Set km_2_write, "write K matrix functions"; "kmatrix_2_write", Arg.Set km_write, "write K matrix 2 functions"; "kmatrix_write_pure", Arg.Set km_pure, "write K matrix pure functions"; "kmatrix_2_write_pure", Arg.Set km_2_pure, "write Kmatrix2pure functions"; "openmp", Arg.Set openmp, "activate OpenMP support in generated code"] (* Fortran style line continuation: *) let nl = Format_Fortran.newline let print_list = function | [] -> () | a :: rest -> print_string a; List.iter (fun s -> printf ",@ %s" s) rest (* \thocwmodulesubsection{Variables and Declarations} *) (* ["NC"] is already used up in the module ["constants"]: *) let nc_parameter = "N_" let omega_color_factor_abbrev = "OCF" let openmp_tld_type = "thread_local_data" let openmp_tld = "tld" let flavors_symbol ?(decl = false) flavors = (if !openmp && not decl then openmp_tld ^ "%" else "" ) ^ "oks_" ^ String.concat "" (List.map CM.flavor_symbol flavors) let p2s p = if p >= 0 && p <= 9 then string_of_int p else if p <= 36 then String.make 1 (Char.chr (Char.code 'A' + p - 10)) else "_" let format_momentum p = "p" ^ String.concat "" (List.map p2s p) let format_p wf = String.concat "" (List.map p2s (F.momentum_list wf)) let ext_momentum wf = match F.momentum_list wf with | [n] -> n | _ -> invalid_arg "Targets.Fortran.ext_momentum" module PSet = Set.Make (struct type t = int list let compare = compare end) module WFSet = Set.Make (struct type t = F.wf let compare = compare end) let add_tag wf name = match F.wf_tag wf with | None -> name | Some tag -> name ^ "_" ^ tag let variable ?(decl = false) wf = (if !openmp && not decl then openmp_tld ^ "%" else "") ^ add_tag wf ("owf_" ^ CM.flavor_symbol (F.flavor wf) ^ "_" ^ format_p wf) let momentum wf = "p" ^ format_p wf let spin wf = "s(" ^ string_of_int (ext_momentum wf) ^ ")" let format_multiple_variable ?(decl = false) wf i = variable ~decl wf ^ "_X" ^ string_of_int i let multiple_variable ?(decl = false) amplitude dictionary wf = try format_multiple_variable ~decl wf (dictionary amplitude wf) with | Not_found -> variable wf let multiple_variables ?(decl = false) multiplicity wf = try List.map (format_multiple_variable ~decl wf) (ThoList.range 1 (multiplicity wf)) with | Not_found -> [variable ~decl wf] let declaration_chunk_size = 64 let declare_list_chunk multiplicity t = function | [] -> () | wfs -> printf " @[<2>%s :: " t; print_list (ThoList.flatmap (multiple_variables ~decl:true multiplicity) wfs); nl () let declare_list multiplicity t = function | [] -> () | wfs -> List.iter (declare_list_chunk multiplicity t) (ThoList.chopn declaration_chunk_size wfs) type declarations = { scalars : F.wf list; spinors : F.wf list; conjspinors : F.wf list; realspinors : F.wf list; ghostspinors : F.wf list; vectorspinors : F.wf list; vectors : F.wf list; ward_vectors : F.wf list; massive_vectors : F.wf list; tensors_1 : F.wf list; tensors_2 : F.wf list; brs_scalars : F.wf list; brs_spinors : F.wf list; brs_conjspinors : F.wf list; brs_realspinors : F.wf list; brs_vectorspinors : F.wf list; brs_vectors : F.wf list; brs_massive_vectors : F.wf list } let rec classify_wfs' acc = function | [] -> acc | wf :: rest -> classify_wfs' (match CM.lorentz (F.flavor wf) with | Scalar -> {acc with scalars = wf :: acc.scalars} | Spinor -> {acc with spinors = wf :: acc.spinors} | ConjSpinor -> {acc with conjspinors = wf :: acc.conjspinors} | Majorana -> {acc with realspinors = wf :: acc.realspinors} | Maj_Ghost -> {acc with ghostspinors = wf :: acc.ghostspinors} | Vectorspinor -> {acc with vectorspinors = wf :: acc.vectorspinors} | Vector -> {acc with vectors = wf :: acc.vectors} (*i | Ward_Vector -> {acc with ward_vectors = wf :: acc.ward_vectors} i*) | Massive_Vector -> {acc with massive_vectors = wf :: acc.massive_vectors} | Tensor_1 -> {acc with tensors_1 = wf :: acc.tensors_1} | Tensor_2 -> {acc with tensors_2 = wf :: acc.tensors_2} | BRS Scalar -> {acc with brs_scalars = wf :: acc.brs_scalars} | BRS Spinor -> {acc with brs_spinors = wf :: acc.brs_spinors} | BRS ConjSpinor -> {acc with brs_conjspinors = wf :: acc.brs_conjspinors} | BRS Majorana -> {acc with brs_realspinors = wf :: acc.brs_realspinors} | BRS Vectorspinor -> {acc with brs_vectorspinors = wf :: acc.brs_vectorspinors} | BRS Vector -> {acc with brs_vectors = wf :: acc.brs_vectors} | BRS Massive_Vector -> {acc with brs_massive_vectors = wf :: acc.brs_massive_vectors} | BRS _ -> invalid_arg "Targets.wfs_classify': not needed here") rest let classify_wfs wfs = classify_wfs' { scalars = []; spinors = []; conjspinors = []; realspinors = []; ghostspinors = []; vectorspinors = []; vectors = []; ward_vectors = []; massive_vectors = []; tensors_1 = []; tensors_2 = []; brs_scalars = [] ; brs_spinors = []; brs_conjspinors = []; brs_realspinors = []; brs_vectorspinors = []; brs_vectors = []; brs_massive_vectors = []} wfs (* \thocwmodulesubsection{Parameters} *) type 'a parameters = { real_singles : 'a list; real_arrays : ('a * int) list; complex_singles : 'a list; complex_arrays : ('a * int) list } let rec classify_singles acc = function | [] -> acc | Real p :: rest -> classify_singles { acc with real_singles = p :: acc.real_singles } rest | Complex p :: rest -> classify_singles { acc with complex_singles = p :: acc.complex_singles } rest let rec classify_arrays acc = function | [] -> acc | (Real_Array p, rhs) :: rest -> classify_arrays { acc with real_arrays = (p, List.length rhs) :: acc.real_arrays } rest | (Complex_Array p, rhs) :: rest -> classify_arrays { acc with complex_arrays = (p, List.length rhs) :: acc.complex_arrays } rest let classify_parameters params = classify_arrays (classify_singles { real_singles = []; real_arrays = []; complex_singles = []; complex_arrays = [] } (List.map fst params.derived)) params.derived_arrays let schisma = ThoList.chopn let schisma_num i n l = ThoList.enumerate i (schisma n l) let declare_parameters' t = function | [] -> () | plist -> printf " @[<2>%s(kind=%s), public, save :: " t !kind; print_list (List.map CM.constant_symbol plist); nl () let declare_parameters t plist = List.iter (declare_parameters' t) plist let declare_parameter_array t (p, n) = printf " @[<2>%s(kind=%s), dimension(%d), public, save :: %s" t !kind n (CM.constant_symbol p); nl () (* NB: we use [string_of_float] to make sure that a decimal point is included to make Fortran compilers happy. *) let default_parameter (x, v) = printf "@ %s = %s_%s" (CM.constant_symbol x) (string_of_float v) !kind let declare_default_parameters t = function | [] -> () | p :: plist -> printf " @[<2>%s(kind=%s), public, save ::" t !kind; default_parameter p; List.iter (fun p' -> printf ","; default_parameter p') plist; nl () let format_constant = function - | I -> sprintf "cmplx (0.0_%s, 1.0_%s, kind=%s)" !kind !kind !kind - | Const c when c < 0 -> sprintf "(%d.0_%s)" c !kind - | Const c -> sprintf "%d.0_%s" c !kind + | I -> "(0,1)" + | Integer c -> + if c < 0 then + sprintf "(%d.0_%s)" c !kind + else + sprintf "%d.0_%s" c !kind + | Float x -> + if x < 0. then + sprintf "(%g_%s)" x !kind + else + sprintf "%g_%s" x !kind | _ -> invalid_arg "format_constant" let rec eval_parameter' = function - | I -> printf "cmplx (0.0_%s,@ 1.0_%s,@ kind=%s)" !kind !kind !kind - | Const c when c < 0 -> printf "(%d.0_%s)" c !kind - | Const c -> printf "%d.0_%s" c !kind + | (I | Integer _ | Float _) as c -> + printf "%s" (format_constant c) | Atom x -> printf "%s" (CM.constant_symbol x) | Sum [] -> printf "0.0_%s" !kind | Sum [x] -> eval_parameter' x | Sum (x :: xs) -> printf "@,("; eval_parameter' x; List.iter (fun x -> printf "@, + "; eval_parameter' x) xs; printf ")" | Diff (x, y) -> printf "@,("; eval_parameter' x; printf " - "; eval_parameter' y; printf ")" | Neg x -> printf "@,( - "; eval_parameter' x; printf ")" | Prod [] -> printf "1.0_%s" !kind | Prod [x] -> eval_parameter' x | Prod (x :: xs) -> printf "@,("; eval_parameter' x; List.iter (fun x -> printf " * "; eval_parameter' x) xs; printf ")" | Quot (x, y) -> printf "@,("; eval_parameter' x; printf " / "; eval_parameter' y; printf ")" | Rec x -> printf "@, (1.0_%s / " !kind; eval_parameter' x; printf ")" | Pow (x, n) -> printf "@,("; eval_parameter' x; printf "**%d" n; printf ")" | PowX (x, y) -> printf "@,("; eval_parameter' x; printf "**"; eval_parameter' y; printf ")" | Sqrt x -> printf "@,sqrt ("; eval_parameter' x; printf ")" | Sin x -> printf "@,sin ("; eval_parameter' x; printf ")" | Cos x -> printf "@,cos ("; eval_parameter' x; printf ")" | Tan x -> printf "@,tan ("; eval_parameter' x; printf ")" | Cot x -> printf "@,cot ("; eval_parameter' x; printf ")" + | Atan x -> printf "@,atan ("; eval_parameter' x; printf ")" | Atan2 (y, x) -> printf "@,atan2 ("; eval_parameter' y; printf ",@ "; eval_parameter' x; printf ")" | Exp x -> printf "@,exp ("; eval_parameter' x; printf ")" - | Conj x -> printf "@,conjg ("; eval_parameter' x; printf ")" + | Conj (Integer _ | Float _ as x) -> eval_parameter' x + | Conj x -> printf "@,cconjg ("; eval_parameter' x; printf ")" let strip_single_tag = function | Real x -> x | Complex x -> x let strip_array_tag = function | Real_Array x -> x | Complex_Array x -> x let eval_parameter (lhs, rhs) = let x = CM.constant_symbol (strip_single_tag lhs) in printf " @[<2>%s = " x; eval_parameter' rhs; nl () let eval_para_list n l = printf " subroutine setup_parameters_%03d ()" n; nl (); List.iter eval_parameter l; printf " end subroutine setup_parameters_%03d" n; nl () let eval_parameter_pair (lhs, rhs) = let x = CM.constant_symbol (strip_array_tag lhs) in let _ = List.fold_left (fun i rhs' -> printf " @[<2>%s(%d) = " x i; eval_parameter' rhs'; nl (); succ i) 1 rhs in () let eval_para_pair_list n l = printf " subroutine setup_parameters_%03d ()" n; nl (); List.iter eval_parameter_pair l; printf " end subroutine setup_parameters_%03d" n; nl () let print_echo fmt p = let s = CM.constant_symbol p in printf " write (unit = *, fmt = fmt_%s) \"%s\", %s" fmt s s; nl () let print_echo_array fmt (p, n) = let s = CM.constant_symbol p in for i = 1 to n do printf " write (unit = *, fmt = fmt_%s_array) " fmt ; printf "\"%s\", %d, %s(%d)" s i s i; nl () done let contains params couplings = List.exists (fun (name, _) -> List.mem (CM.constant_symbol name) params) couplings.input let rec depends_on params = function - | I | Const _ -> false + | I | Integer _ | Float _ -> false | Atom name -> List.mem (CM.constant_symbol name) params | Sum es | Prod es -> List.exists (depends_on params) es | Diff (e1, e2) | Quot (e1, e2) | PowX (e1, e2) -> depends_on params e1 || depends_on params e2 | Neg e | Rec e | Pow (e, _) -> depends_on params e - | Sqrt e | Sin e | Cos e | Tan e | Cot e | Conj e | Exp e -> + | Sqrt e | Sin e | Cos e | Tan e | Cot e | Conj e | Exp e | Atan e -> depends_on params e | Atan2 (e1, e2) -> depends_on params e1 || depends_on params e2 let dependencies params couplings = if contains params couplings then List.rev (fst (List.fold_left (fun (deps, plist) (param, v) -> match param with | Real name | Complex name -> if depends_on plist v then ((param, v) :: deps, CM.constant_symbol name :: plist) else (deps, plist)) ([], params) couplings.derived)) else [] let dependencies_arrays params couplings = if contains params couplings then List.rev (fst (List.fold_left (fun (deps, plist) (param, vlist) -> match param with | Real_Array name | Complex_Array name -> if List.exists (depends_on plist) vlist then ((param, vlist) :: deps, CM.constant_symbol name :: plist) else (deps, plist)) ([], params) couplings.derived_arrays)) else [] let parameters_to_fortran oc params = Format_Fortran.set_formatter_out_channel ~width:!line_length oc; let declarations = classify_parameters params in printf "module %s" !parameter_module; nl (); printf " use kinds"; nl (); printf " use constants"; nl (); printf " implicit none"; nl (); printf " private"; nl (); printf " @[<2>public :: setup_parameters"; printf ",@ import_from_whizard"; printf ",@ model_update_alpha_s"; if !no_write then begin printf "! No print_parameters"; end else begin printf ",@ print_parameters"; end; nl (); declare_default_parameters "real" params.input; declare_parameters "real" (schisma 69 declarations.real_singles); List.iter (declare_parameter_array "real") declarations.real_arrays; declare_parameters "complex" (schisma 69 declarations.complex_singles); List.iter (declare_parameter_array "complex") declarations.complex_arrays; + printf " interface cconjg"; nl (); + printf " module procedure cconjg_real, cconjg_complex"; nl (); + printf " end interface"; nl (); + printf " private :: cconjg_real, cconjg_complex"; nl (); printf "contains"; nl (); - printf " ! derived parameters:"; nl (); + printf " function cconjg_real (x) result (xc)"; nl (); + printf " real(kind=default), intent(in) :: x"; nl (); + printf " real(kind=default) :: xc"; nl (); + printf " xc = x"; nl (); + printf " end function cconjg_real"; nl (); + printf " function cconjg_complex (z) result (zc)"; nl (); + printf " complex(kind=default), intent(in) :: z"; nl (); + printf " complex(kind=default) :: zc"; nl (); + printf " zc = conjg (z)"; nl (); + printf " end function cconjg_complex"; nl (); + printf " ! derived parameters:"; nl (); let shredded = schisma_num 1 120 params.derived in let shredded_arrays = schisma_num 1 120 params.derived_arrays in let num_sub = List.length shredded in let num_sub_arrays = List.length shredded_arrays in List.iter (fun (i,l) -> eval_para_list i l) shredded; List.iter (fun (i,l) -> eval_para_pair_list (num_sub + i) l) shredded_arrays; printf " subroutine setup_parameters ()"; nl (); for i = 1 to num_sub + num_sub_arrays do printf " call setup_parameters_%03d ()" i; nl (); done; printf " end subroutine setup_parameters"; nl (); printf " subroutine import_from_whizard (par_array, scheme)"; nl (); printf " real(%s), dimension(%d), intent(in) :: par_array" !kind (List.length params.input); nl (); printf " integer, intent(in) :: scheme"; nl (); let i = ref 1 in List.iter (fun (p, _) -> printf " %s = par_array(%d)" (CM.constant_symbol p) !i; nl (); incr i) params.input; printf " call setup_parameters ()"; nl (); printf " end subroutine import_from_whizard"; nl (); printf " subroutine model_update_alpha_s (alpha_s)"; nl (); printf " real(%s), intent(in) :: alpha_s" !kind; nl (); begin match (dependencies ["aS"] params, dependencies_arrays ["aS"] params) with | [], [] -> printf " ! 'aS' not among the input parameters"; nl (); | deps, deps_arrays -> printf " aS = alpha_s"; nl (); List.iter eval_parameter deps; List.iter eval_parameter_pair deps_arrays end; printf " end subroutine model_update_alpha_s"; nl (); if !no_write then begin printf "! No print_parameters"; nl (); end else begin printf " subroutine print_parameters ()"; nl (); printf " @[<2>character(len=*), parameter ::"; printf "@ fmt_real = \"(A12,4X,' = ',E25.18)\","; printf "@ fmt_complex = \"(A12,4X,' = ',E25.18,' + i*',E25.18)\","; printf "@ fmt_real_array = \"(A12,'(',I2.2,')',' = ',E25.18)\","; printf "@ fmt_complex_array = "; printf "\"(A12,'(',I2.2,')',' = ',E25.18,' + i*',E25.18)\""; nl (); printf " @[<2>write (unit = *, fmt = \"(A)\") @,"; printf "\"default values for the input parameters:\""; nl (); List.iter (fun (p, _) -> print_echo "real" p) params.input; printf " @[<2>write (unit = *, fmt = \"(A)\") @,"; printf "\"derived parameters:\""; nl (); List.iter (print_echo "real") declarations.real_singles; List.iter (print_echo "complex") declarations.complex_singles; List.iter (print_echo_array "real") declarations.real_arrays; List.iter (print_echo_array "complex") declarations.complex_arrays; printf " end subroutine print_parameters"; nl (); end; printf "end module %s" !parameter_module; nl () (* \thocwmodulesubsection{Run-Time Diagnostics} *) type diagnostic = All | Arguments | Momenta | Gauge type diagnostic_mode = Off | Warn | Panic let warn mode = match !mode with | Off -> false | Warn -> true | Panic -> true let panic mode = match !mode with | Off -> false | Warn -> false | Panic -> true let suffix mode = if panic mode then "panic" else "warn" let diagnose_arguments = ref Off let diagnose_momenta = ref Off let diagnose_gauge = ref Off let rec parse_diagnostic = function | All, panic -> parse_diagnostic (Arguments, panic); parse_diagnostic (Momenta, panic); parse_diagnostic (Gauge, panic) | Arguments, panic -> diagnose_arguments := if panic then Panic else Warn | Momenta, panic -> diagnose_momenta := if panic then Panic else Warn | Gauge, panic -> diagnose_gauge := if panic then Panic else Warn (* If diagnostics are required, we have to switch off Fortran95 features like pure functions. *) let parse_diagnostics = function | [] -> () | diagnostics -> fortran95 := false; List.iter parse_diagnostic diagnostics (* \thocwmodulesubsection{Amplitude} *) let declare_momenta_chunk = function | [] -> () | momenta -> printf " @[<2>type(momentum) :: "; print_list (List.map format_momentum momenta); nl () let declare_momenta = function | [] -> () | momenta -> List.iter declare_momenta_chunk (ThoList.chopn declaration_chunk_size momenta) let declare_wavefunctions multiplicity wfs = let wfs' = classify_wfs wfs in declare_list multiplicity ("complex(kind=" ^ !kind ^ ")") (wfs'.scalars @ wfs'.brs_scalars); declare_list multiplicity ("type(" ^ Fermions.psi_type ^ ")") (wfs'.spinors @ wfs'.brs_spinors); declare_list multiplicity ("type(" ^ Fermions.psibar_type ^ ")") (wfs'.conjspinors @ wfs'.brs_conjspinors); declare_list multiplicity ("type(" ^ Fermions.chi_type ^ ")") (wfs'.realspinors @ wfs'.brs_realspinors @ wfs'.ghostspinors); declare_list multiplicity ("type(" ^ Fermions.grav_type ^ ")") wfs'.vectorspinors; declare_list multiplicity "type(vector)" (wfs'.vectors @ wfs'.massive_vectors @ wfs'.brs_vectors @ wfs'.brs_massive_vectors @ wfs'.ward_vectors); declare_list multiplicity "type(tensor2odd)" wfs'.tensors_1; declare_list multiplicity "type(tensor)" wfs'.tensors_2 let flavors a = F.incoming a @ F.outgoing a let declare_brakets_chunk = function | [] -> () | amplitudes -> printf " @[<2>complex(kind=%s) :: " !kind; print_list (List.map (fun a -> flavors_symbol ~decl:true (flavors a)) amplitudes); nl () let declare_brakets = function | [] -> () | amplitudes -> List.iter declare_brakets_chunk (ThoList.chopn declaration_chunk_size amplitudes) let print_variable_declarations amplitudes = let multiplicity = CF.multiplicity amplitudes and processes = CF.processes amplitudes in if not !amp_triv then begin declare_momenta (PSet.elements (List.fold_left (fun set a -> PSet.union set (List.fold_right (fun wf -> PSet.add (F.momentum_list wf)) (F.externals a) PSet.empty)) PSet.empty processes)); declare_momenta (PSet.elements (List.fold_left (fun set a -> PSet.union set (List.fold_right (fun wf -> PSet.add (F.momentum_list wf)) (F.variables a) PSet.empty)) PSet.empty processes)); if !openmp then begin printf " type %s@[<2>" openmp_tld_type; nl (); end ; declare_wavefunctions multiplicity (WFSet.elements (List.fold_left (fun set a -> WFSet.union set (List.fold_right WFSet.add (F.externals a) WFSet.empty)) WFSet.empty processes)); declare_wavefunctions multiplicity (WFSet.elements (List.fold_left (fun set a -> WFSet.union set (List.fold_right WFSet.add (F.variables a) WFSet.empty)) WFSet.empty processes)); declare_brakets processes; if !openmp then begin printf "@] end type %s\n" openmp_tld_type; printf " type(%s) :: %s" openmp_tld_type openmp_tld; nl (); end; end (* [print_current] is the most important function that has to match the functions in \verb+omega95+ (see appendix~\ref{sec:fortran}). It offers plentiful opportunities for making mistakes, in particular those related to signs. We start with a few auxiliary functions: *) let children2 rhs = match F.children rhs with | [wf1; wf2] -> (wf1, wf2) | _ -> failwith "Targets.children2: can't happen" let children3 rhs = match F.children rhs with | [wf1; wf2; wf3] -> (wf1, wf2, wf3) | _ -> invalid_arg "Targets.children3: can't happen" (* Note that it is (marginally) faster to multiply the two scalar products with the coupling constant than the four vector components. \begin{dubious} This could be part of \verb+omegalib+ as well \ldots \end{dubious} *) let format_coeff = function | 1 -> "" | -1 -> "-" | coeff -> "(" ^ string_of_int coeff ^ ")*" let format_coupling coeff c = match coeff with | 1 -> c | -1 -> "(-" ^ c ^")" | coeff -> string_of_int coeff ^ "*" ^ c (* \begin{dubious} The following is error prone and should be generated automagically. \end{dubious} *) let print_vector4 c wf1 wf2 wf3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F341|F431|F342|F432|F123|F213|F124|F214) | C_13_42, (F241|F421|F243|F423|F132|F312|F134|F314) | C_14_23, (F231|F321|F234|F324|F142|F412|F143|F413) -> printf "((%s%s)*(%s*%s))*%s" (format_coeff coeff) c wf1 wf2 wf3 | C_12_34, (F134|F143|F234|F243|F312|F321|F412|F421) | C_13_42, (F124|F142|F324|F342|F213|F231|F413|F431) | C_14_23, (F123|F132|F423|F432|F214|F241|F314|F341) -> printf "((%s%s)*(%s*%s))*%s" (format_coeff coeff) c wf2 wf3 wf1 | C_12_34, (F314|F413|F324|F423|F132|F231|F142|F241) | C_13_42, (F214|F412|F234|F432|F123|F321|F143|F341) | C_14_23, (F213|F312|F243|F342|F124|F421|F134|F431) -> printf "((%s%s)*(%s*%s))*%s" (format_coeff coeff) c wf1 wf3 wf2 let print_vector4_t_0 c wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "g_dim8g3_t_0(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "g_dim8g3_t_0(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "g_dim8g3_t_0(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 let print_vector4_t_1 c wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "g_dim8g3_t_1(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "g_dim8g3_t_1(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "g_dim8g3_t_1(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 let print_vector4_t_2 c wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "g_dim8g3_t_2(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "g_dim8g3_t_2(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "g_dim8g3_t_2(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 let print_vector4_m_0 c wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "g_dim8g3_m_0(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "g_dim8g3_m_0(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "g_dim8g3_m_0(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 let print_vector4_m_1 c wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "g_dim8g3_m_1(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "g_dim8g3_m_1(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "g_dim8g3_m_1(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 let print_vector4_m_7 c wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "g_dim8g3_m_7(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "g_dim8g3_m_7(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "g_dim8g3_m_7(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 let print_add_vector4 c wf1 wf2 wf3 fusion (coeff, contraction) = printf "@ + "; print_vector4 c wf1 wf2 wf3 fusion (coeff, contraction) let print_vector4_km c pa pb wf1 wf2 wf3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F341|F431|F342|F432|F123|F213|F124|F214) | C_13_42, (F241|F421|F243|F423|F132|F312|F134|F314) | C_14_23, (F231|F321|F234|F324|F142|F412|F143|F413) -> printf "((%s%s%s+%s))*(%s*%s))*%s" (format_coeff coeff) c pa pb wf1 wf2 wf3 | C_12_34, (F134|F143|F234|F243|F312|F321|F412|F421) | C_13_42, (F124|F142|F324|F342|F213|F231|F413|F431) | C_14_23, (F123|F132|F423|F432|F214|F241|F314|F341) -> printf "((%s%s%s+%s))*(%s*%s))*%s" (format_coeff coeff) c pa pb wf2 wf3 wf1 | C_12_34, (F314|F413|F324|F423|F132|F231|F142|F241) | C_13_42, (F214|F412|F234|F432|F123|F321|F143|F341) | C_14_23, (F213|F312|F243|F342|F124|F421|F134|F431) -> printf "((%s%s%s+%s))*(%s*%s))*%s" (format_coeff coeff) c pa pb wf1 wf3 wf2 let print_vector4_km_t_0 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 let print_vector4_km_t_1 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 let print_vector4_km_t_2 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_2(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_2(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_2(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 let print_vector4_km_t_rsi c pa pb pc wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))*((%s+%s)*(%s+%s)/((%s+%s)*(%s+%s)))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 pa pb pa pb pb pc pb pc | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> printf "@[(%s%s%s+%s)*g_dim8g3_t_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))*((%s+%s)*(%s+%s)/((%s+%s)*(%s+%s)))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 pa pb pa pb pa pc pa pc let print_vector4_km_m_0 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> if (String.contains c 'w' || String.contains c '4') then printf "@[(%s%s%s+%s)*g_dim8g3_m_0(cmplx(1,kind=default),cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 else printf "@[((%s%s%s+%s))*g_dim8g3_m_0(cmplx(costhw**(-2),kind=default),cmplx(costhw**2,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> if (String.contains c 'w' || String.contains c '4') then printf "@[(%s%s%s+%s)*g_dim8g3_m_0(cmplx(1,kind=default),cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 else printf "@[(%s%s%s+%s)*g_dim8g3_m_0(cmplx(costhw**(-2),kind=default),cmplx(costhw**2,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> if (String.contains c 'w' || String.contains c '4') then printf "@[(%s%s%s+%s)*g_dim8g3_m_0(cmplx(1,kind=default),cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 else printf "@[(%s%s%s+%s)*g_dim8g3_m_0(cmplx(costhw**(-2),kind=default),cmplx(costhw**2,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 let print_vector4_km_m_1 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> if (String.contains c 'w' || String.contains c '4') then printf "@[(%s%s%s+%s)*g_dim8g3_m_1(cmplx(1,kind=default),cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 else printf "@[(%s%s%s+%s)*g_dim8g3_m_1(cmplx(costhw**(-2),kind=default),cmplx(costhw**2,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> if (String.contains c 'w' || String.contains c '4') then printf "@[(%s%s%s+%s)*g_dim8g3_m_1(cmplx(1,kind=default),cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 else printf "@[(%s%s%s+%s)*g_dim8g3_m_1(cmplx(costhw**(-2),kind=default),cmplx(costhw**2,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> if (String.contains c 'w' || String.contains c '4') then printf "@[(%s%s%s+%s)*g_dim8g3_m_1(cmplx(1,kind=default),cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 else printf "@[(%s%s%s+%s)*g_dim8g3_m_1(cmplx(costhw**(-2),kind=default),cmplx(costhw**2,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 let print_vector4_km_m_7 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F234|F243|F134|F143|F421|F321|F412|F312) | C_13_42, (F324|F342|F124|F142|F431|F231|F413|F213) | C_14_23, (F423|F432|F123|F132|F341|F241|F314|F214) -> if (String.contains c 'w' || String.contains c '4') then printf "@[(%s%s%s+%s)*@ g_dim8g3_m_7(cmplx(1,kind=default),cmplx(1,kind=default),cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 else printf "@[(%s%s%s+%s)*@ g_dim8g3_m_7(cmplx(costhw**(-2),kind=default),cmplx(1,kind=default),cmplx(costhw**2,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F324|F314|F423|F413|F142|F132|F241|F231) | C_13_42, (F234|F214|F432|F412|F143|F123|F341|F321) | C_14_23, (F243|F213|F342|F312|F134|F124|F431|F421) -> if (String.contains c 'w' || String.contains c '4') then printf "@[(%s%s%s+%s)*@ g_dim8g3_m_7(cmplx(1,kind=default),cmplx(1,kind=default),cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 else printf "@[(%s%s%s+%s)*@ g_dim8g3_m_7(cmplx(costhw**(-2),kind=default),cmplx(1,kind=default),cmplx(costhw**2,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F342|F341|F432|F431|F124|F123|F214|F213) | C_13_42, (F243|F241|F423|F421|F134|F132|F314|F312) | C_14_23, (F234|F231|F324|F321|F143|F142|F413|F412) -> if (String.contains c 'w' || String.contains c '4') then printf "@[(%s%s%s+%s)*@ g_dim8g3_m_7(cmplx(1,kind=default),cmplx(1,kind=default),cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 else printf "@[(%s%s%s+%s)*@ g_dim8g3_m_7(cmplx(costhw**(-2),kind=default),cmplx(1,kind=default),cmplx(costhw**2,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p1 wf2 p2 let print_add_vector4_km c pa pb wf1 wf2 wf3 fusion (coeff, contraction) = printf "@ + "; print_vector4_km c pa pb wf1 wf2 wf3 fusion (coeff, contraction) let print_dscalar4 c wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F341|F431|F342|F432|F123|F213|F124|F214) | C_13_42, (F241|F421|F243|F423|F132|F312|F134|F314) | C_14_23, (F231|F321|F234|F324|F142|F412|F143|F413) -> printf "((%s%s)*(%s*%s)*(%s*%s)*%s*%s*%s)" (format_coeff coeff) c p1 p2 p3 p123 wf1 wf2 wf3 | C_12_34, (F134|F143|F234|F243|F312|F321|F412|F421) | C_13_42, (F124|F142|F324|F342|F213|F231|F413|F431) | C_14_23, (F123|F132|F423|F432|F214|F241|F314|F341) -> printf "((%s%s)*(%s*%s)*(%s*%s)*%s*%s*%s)" (format_coeff coeff) c p2 p3 p1 p123 wf1 wf2 wf3 | C_12_34, (F314|F413|F324|F423|F132|F231|F142|F241) | C_13_42, (F214|F412|F234|F432|F123|F321|F143|F341) | C_14_23, (F213|F312|F243|F342|F124|F421|F134|F431) -> printf "((%s%s)*(%s*%s)*(%s*%s)*%s*%s*%s)" (format_coeff coeff) c p1 p3 p2 p123 wf1 wf2 wf3 let print_add_dscalar4 c wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) = printf "@ + "; print_dscalar4 c wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) let print_dscalar2_vector2 c wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F123|F213|F124|F214) -> printf "(%s%s)*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c p1 p2 wf1 wf2 wf3 | C_12_34, (F134|F143|F234|F243) -> printf "(%s%s)*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c p1 p123 wf2 wf3 wf1 | C_12_34, (F132|F231|F142|F241) -> printf "(%s%s)*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c p1 p3 wf1 wf3 wf2 | C_12_34, (F312|F321|F412|F421) -> printf "(%s%s)*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c p2 p3 wf2 wf3 wf1 | C_12_34, (F314|F413|F324|F423) -> printf "(%s%s)*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c p2 p123 wf1 wf3 wf2 | C_12_34, (F341|F431|F342|F432) -> printf "(%s%s)*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c p3 p123 wf1 wf2 wf3 | C_13_42, (F123|F214) | C_14_23, (F124|F213) -> printf "((%s%s)*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c wf1 p1 wf3 wf2 p2 | C_13_42, (F124|F213) | C_14_23, (F123|F214) -> printf "((%s%s)*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c wf2 p2 wf3 wf1 p1 | C_13_42, (F132|F241) | C_14_23, (F142|F231) -> printf "((%s%s)*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c wf1 p1 wf2 wf3 p3 | C_13_42, (F142|F231) | C_14_23, (F132|F241) -> printf "((%s%s)*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c wf3 p3 wf2 wf1 p1 | C_13_42, (F312|F421) | C_14_23, (F412|F321) -> printf "((%s%s)*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c wf2 p2 wf1 wf3 p3 | C_13_42, (F321|F412) | C_14_23, (F421|F312) -> printf "((%s%s)*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c wf3 p3 wf1 wf2 p2 | C_13_42, (F134|F243) | C_14_23, (F143|F234) -> printf "((%s%s)*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c wf3 p123 wf1 p1 wf2 | C_13_42, (F143|F234) | C_14_23, (F134|F243) -> printf "((%s%s)*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c wf2 p123 wf1 p1 wf3 | C_13_42, (F314|F423) | C_14_23, (F413|F324) -> printf "((%s%s)*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c wf3 p123 wf2 p2 wf1 | C_13_42, (F324|F413) | C_14_23, (F423|F314) -> printf "((%s%s)*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c wf1 p123 wf2 p2 wf3 | C_13_42, (F341|F432) | C_14_23, (F431|F342) -> printf "((%s%s)*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c wf2 p123 wf3 p3 wf1 | C_13_42, (F342|F431) | C_14_23, (F432|F341) -> printf "((%s%s)*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c wf1 p123 wf3 p3 wf2 let print_add_dscalar2_vector2 c wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) = printf "@ + "; print_dscalar2_vector2 c wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) let print_dscalar2_vector2_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F123|F213|F124|F214) -> printf "(%s%s%s+%s))*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c pa pb p1 p2 wf1 wf2 wf3 | C_12_34, (F134|F143|F234|F243) -> printf "(%s%s%s+%s))*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c pa pb p1 p123 wf2 wf3 wf1 | C_12_34, (F132|F231|F142|F241) -> printf "(%s%s%s+%s))*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c pa pb p1 p3 wf1 wf3 wf2 | C_12_34, (F312|F321|F412|F421) -> printf "(%s%s%s+%s))*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c pa pb p2 p3 wf2 wf3 wf1 | C_12_34, (F314|F413|F324|F423) -> printf "(%s%s%s+%s))*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c pa pb p2 p123 wf1 wf3 wf2 | C_12_34, (F341|F431|F342|F432) -> printf "(%s%s%s+%s))*(%s*%s)*(%s*%s)*%s" (format_coeff coeff) c pa pb p3 p123 wf1 wf2 wf3 | C_13_42, (F123|F214) | C_14_23, (F124|F213) -> printf "((%s%s%s+%s))*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c pa pb wf1 p1 wf3 wf2 p2 | C_13_42, (F124|F213) | C_14_23, (F123|F214) -> printf "((%s%s%s+%s))*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c pa pb wf2 p2 wf3 wf1 p1 | C_13_42, (F132|F241) | C_14_23, (F142|F231) -> printf "((%s%s%s+%s))*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c pa pb wf1 p1 wf2 wf3 p3 | C_13_42, (F142|F231) | C_14_23, (F132|F241) -> printf "((%s%s%s+%s))*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c pa pb wf3 p3 wf2 wf1 p1 | C_13_42, (F312|F421) | C_14_23, (F412|F321) -> printf "((%s%s%s+%s))*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c pa pb wf2 p2 wf1 wf3 p3 | C_13_42, (F321|F412) | C_14_23, (F421|F312) -> printf "((%s%s%s+%s))*(%s*%s*%s)*%s*%s)" (format_coeff coeff) c pa pb wf3 p3 wf1 wf2 p2 | C_13_42, (F134|F243) | C_14_23, (F143|F234) -> printf "((%s%s%s+%s))*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c pa pb wf3 p123 wf1 p1 wf2 | C_13_42, (F143|F234) | C_14_23, (F134|F243) -> printf "((%s%s%s+%s))*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c pa pb wf2 p123 wf1 p1 wf3 | C_13_42, (F314|F423) | C_14_23, (F413|F324) -> printf "((%s%s%s+%s))*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c pa pb wf3 p123 wf2 p2 wf1 | C_13_42, (F324|F413) | C_14_23, (F423|F314) -> printf "((%s%s%s+%s))*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c pa pb wf1 p123 wf2 p2 wf3 | C_13_42, (F341|F432) | C_14_23, (F431|F342) -> printf "((%s%s%s+%s))*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c pa pb wf2 p123 wf3 p3 wf1 | C_13_42, (F342|F431) | C_14_23, (F432|F341) -> printf "((%s%s%s+%s))*(%s*%s)*(%s*%s*%s))" (format_coeff coeff) c pa pb wf1 p123 wf3 p3 wf2 let print_add_dscalar2_vector2_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) = printf "@ + "; print_dscalar2_vector2_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) let print_dscalar2_vector2_m_0_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F123|F213|F124|F214) -> printf "@[((%s%s%s+%s))*v_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F134|F143|F234|F243) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F132|F231|F142|F241) -> printf "@[((%s%s%s+%s))*v_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf3 p3 wf2 p2 | C_12_34, (F312|F321|F412|F421) -> printf "@[((%s%s%s+%s))*v_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf2 p2 wf1 p1 | C_12_34, (F314|F413|F324|F423) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F341|F431|F342|F432) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf2 p2 wf1 p1 | C_13_42, (F123|F214) | C_14_23, (F124|F213) -> printf "@[((%s%s%s+%s))*v_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p3 wf3 p2 | C_13_42, (F124|F213) | C_14_23, (F123|F214) -> printf "@[((%s%s%s+%s))*v_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p3 wf3 p1 | C_13_42, (F132|F241) | C_14_23, (F142|F231) -> printf "@[((%s%s%s+%s))*v_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf3 p2 wf2 p3 | C_13_42, (F142|F231) | C_14_23, (F132|F241) -> printf "@[((%s%s%s+%s))*v_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p2 wf2 p1 | C_13_42, (F312|F421) | C_14_23, (F412|F321) -> printf "@[((%s%s%s+%s))*v_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf3 p1 wf1 p3 | C_13_42, (F321|F412) | C_14_23, (F421|F312) -> printf "@[((%s%s%s+%s))*v_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf2 p1 wf1 p2 | C_13_42, (F134|F243) | C_14_23, (F143|F234) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p3 wf3 p1 wf2 p2 | C_13_42, (F143|F234) | C_14_23, (F134|F243) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p2 wf2 p1 wf3 p3 | C_13_42, (F314|F423) | C_14_23, (F413|F324) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p3 wf3 p2 wf1 p1 | C_13_42, (F324|F413) | C_14_23, (F423|F314) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p1 wf1 p2 wf3 p3 | C_13_42, (F341|F432) | C_14_23, (F431|F342) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p2 wf2 p3 wf1 p1 | C_13_42, (F342|F431) | C_14_23, (F432|F341) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_0(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p1 wf1 p3 wf2 p2 let print_add_dscalar2_vector2_m_0_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion (coeff, contraction) = printf "@ + "; print_dscalar2_vector2_m_0_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion (coeff, contraction) let print_dscalar2_vector2_m_1_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F123|F213|F124|F214) -> printf "@[((%s%s%s+%s))*v_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F134|F143|F234|F243) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F132|F231|F142|F241) -> printf "@[((%s%s%s+%s))*v_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf3 p3 wf2 p2 | C_12_34, (F312|F321|F412|F421) -> printf "@[((%s%s%s+%s))*v_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf2 p2 wf1 p1 | C_12_34, (F314|F413|F324|F423) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F341|F431|F342|F432) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf2 p2 wf1 p1 | C_13_42, (F123|F214) | C_14_23, (F124|F213) -> printf "@[((%s%s%s+%s))*v_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p3 wf3 p2 | C_13_42, (F124|F213) | C_14_23, (F123|F214) -> printf "@[((%s%s%s+%s))*v_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p3 wf3 p1 | C_13_42, (F132|F241) | C_14_23, (F142|F231) -> printf "@[((%s%s%s+%s))*v_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf3 p2 wf2 p3 | C_13_42, (F142|F231) | C_14_23, (F132|F241) -> printf "@[((%s%s%s+%s))*v_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p2 wf2 p1 | C_13_42, (F312|F421) | C_14_23, (F412|F321) -> printf "@[((%s%s%s+%s))*v_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf3 p1 wf1 p3 | C_13_42, (F321|F412) | C_14_23, (F421|F312) -> printf "@[((%s%s%s+%s))*v_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf2 p1 wf1 p2 | C_13_42, (F134|F243) | C_14_23, (F143|F234) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p3 wf3 p1 wf2 p2 | C_13_42, (F143|F234) | C_14_23, (F134|F243) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p2 wf2 p1 wf3 p3 | C_13_42, (F314|F423) | C_14_23, (F413|F324) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p3 wf3 p2 wf1 p1 | C_13_42, (F324|F413) | C_14_23, (F423|F314) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p1 wf1 p2 wf3 p3 | C_13_42, (F341|F432) | C_14_23, (F431|F342) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p2 wf2 p3 wf1 p1 | C_13_42, (F342|F431) | C_14_23, (F432|F341) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_1(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p1 wf1 p3 wf2 p2 let print_add_dscalar2_vector2_m_1_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion (coeff, contraction) = printf "@ + "; print_dscalar2_vector2_m_1_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion (coeff, contraction) let print_dscalar2_vector2_m_7_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F123|F213|F124|F214) -> printf "@[((%s%s%s+%s))*v_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F134|F143|F234|F243) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p2 wf3 p3 | C_12_34, (F132|F231|F142|F241) -> printf "@[((%s%s%s+%s))*v_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf3 p3 wf2 p2 | C_12_34, (F312|F321|F412|F421) -> printf "@[((%s%s%s+%s))*v_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf2 p2 wf1 p1 | C_12_34, (F314|F413|F324|F423) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p1 wf3 p3 | C_12_34, (F341|F431|F342|F432) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf2 p2 wf1 p1 | C_13_42, (F123|F214) | C_14_23, (F124|F213) -> printf "@[((%s%s%s+%s))*v_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf2 p3 wf3 p2 | C_13_42, (F124|F213) | C_14_23, (F123|F214) -> printf "@[((%s%s%s+%s))*v_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf1 p3 wf3 p1 | C_13_42, (F132|F241) | C_14_23, (F142|F231) -> printf "@[((%s%s%s+%s))*v_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p1 wf3 p2 wf2 p3 | C_13_42, (F142|F231) | C_14_23, (F132|F241) -> printf "@[((%s%s%s+%s))*v_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf1 p2 wf2 p1 | C_13_42, (F312|F421) | C_14_23, (F412|F321) -> printf "@[((%s%s%s+%s))*v_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p2 wf3 p1 wf1 p3 | C_13_42, (F321|F412) | C_14_23, (F421|F312) -> printf "@[((%s%s%s+%s))*v_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p3 wf2 p1 wf1 p2 | C_13_42, (F134|F243) | C_14_23, (F143|F234) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p3 wf3 p1 wf2 p2 | C_13_42, (F143|F234) | C_14_23, (F134|F243) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf1 p2 wf2 p1 wf3 p3 | C_13_42, (F314|F423) | C_14_23, (F413|F324) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p3 wf3 p2 wf1 p1 | C_13_42, (F324|F413) | C_14_23, (F423|F314) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf2 p1 wf1 p2 wf3 p3 | C_13_42, (F341|F432) | C_14_23, (F431|F342) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p2 wf2 p3 wf1 p1 | C_13_42, (F342|F431) | C_14_23, (F432|F341) -> printf "@[((%s%s%s+%s))*phi_phi2v_m_7(cmplx(1,kind=default),@ %s,%s,%s,%s,%s,%s))@]" (format_coeff coeff) c pa pb wf3 p1 wf1 p3 wf2 p2 let print_add_dscalar2_vector2_m_7_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion (coeff, contraction) = printf "@ + "; print_dscalar2_vector2_m_7_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion (coeff, contraction) let print_dscalar4_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) = match contraction, fusion with | C_12_34, (F341|F431|F342|F432|F123|F213|F124|F214) | C_13_42, (F241|F421|F243|F423|F132|F312|F134|F314) | C_14_23, (F231|F321|F234|F324|F142|F412|F143|F413) -> printf "((%s%s%s+%s))*(%s*%s)*(%s*%s)*%s*%s*%s)" (format_coeff coeff) c pa pb p1 p2 p3 p123 wf1 wf2 wf3 | C_12_34, (F134|F143|F234|F243|F312|F321|F412|F421) | C_13_42, (F124|F142|F324|F342|F213|F231|F413|F431) | C_14_23, (F123|F132|F423|F432|F214|F241|F314|F341) -> printf "((%s%s%s+%s))*(%s*%s)*(%s*%s)*%s*%s*%s)" (format_coeff coeff) c pa pb p2 p3 p1 p123 wf1 wf2 wf3 | C_12_34, (F314|F413|F324|F423|F132|F231|F142|F241) | C_13_42, (F214|F412|F234|F432|F123|F321|F143|F341) | C_14_23, (F213|F312|F243|F342|F124|F421|F134|F431) -> printf "((%s%s%s+%s))*(%s*%s)*(%s*%s)*%s*%s*%s)" (format_coeff coeff) c pa pb p1 p3 p2 p123 wf1 wf2 wf3 let print_add_dscalar4_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) = printf "@ + "; print_dscalar4_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion (coeff, contraction) let print_current amplitude dictionary rhs = match F.coupling rhs with | V3 (vertex, fusion, constant) -> let ch1, ch2 = children2 rhs in let wf1 = multiple_variable amplitude dictionary ch1 and wf2 = multiple_variable amplitude dictionary ch2 and p1 = momentum ch1 and p2 = momentum ch2 and m1 = CM.mass_symbol (F.flavor ch1) and m2 = CM.mass_symbol (F.flavor ch2) in let c = CM.constant_symbol constant in printf "@, %s " (if (F.sign rhs) < 0 then "-" else "+"); begin match vertex with - | UFO3 (c', v, s, Color.Legacy3) - | UFO3 (c', v, s, Color.Trivial3) -> - UFO.Targets.Fortran.fusion2 c' v s c wf1 p1 wf2 p2 fusion - - | UFO3 (c', v, s, _) -> - failwith "print_current: nontrivial color structure" (* Fermionic currents $\bar\psi\fmslash{A}\psi$ and $\bar\psi\phi\psi$ are handled by the [Fermions] module, since they depend on the choice of Feynman rules: Dirac or Majorana. *) | FBF (coeff, fb, b, f) -> begin match coeff, fb, b, f with | _, _, (VLRM|SPM|VAM|VA3M|TVA|TVAM|TLR|TLRM|TRL|TRLM), _ -> let p12 = Printf.sprintf "(-%s-%s)" p1 p2 in Fermions.print_current_mom (coeff, fb, b, f) c wf1 wf2 p1 p2 p12 fusion | _, _, _, _ -> Fermions.print_current (coeff, fb, b, f) c wf1 wf2 fusion end | PBP (coeff, f1, b, f2) -> Fermions.print_current_p (coeff, f1, b, f2) c wf1 wf2 fusion | BBB (coeff, fb1, b, fb2) -> Fermions.print_current_b (coeff, fb1, b, fb2) c wf1 wf2 fusion | GBG (coeff, fb, b, f) -> let p12 = Printf.sprintf "(-%s-%s)" p1 p2 in Fermions.print_current_g (coeff, fb, b, f) c wf1 wf2 p1 p2 p12 fusion (* Table~\ref{tab:dim4-bosons} is a bit misleading, since if includes totally antisymmetric structure constants. The space-time part alone is also totally antisymmetric: *) | Gauge_Gauge_Gauge coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F31|F12) -> printf "g_gg(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F32|F13|F21) -> printf "g_gg(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | I_Gauge_Gauge_Gauge coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F31|F12) -> printf "g_gg((0,1)*(%s),%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F32|F13|F21) -> printf "g_gg((0,1)*(%s),%s,%s,%s,%s)" c wf2 p2 wf1 p1 end (* In [Aux_Gauge_Gauge], we can not rely on antisymmetry alone, because of the different Lorentz representations of the auxialiary and the gauge field. Instead we have to provide the sign in \begin{equation} (V_2 \wedge V_3) \cdot T_1 = \begin{cases} V_2 \cdot (T_1 \cdot V_3) = - V_2 \cdot (V_3 \cdot T_1) & \\ V_3 \cdot (V_2 \cdot T_1) = - V_3 \cdot (T_1 \cdot V_2) & \end{cases} \end{equation} ourselves. Alternatively, one could provide \verb+g_xg+ mirroring \verb+g_gx+. *) | Aux_Gauge_Gauge coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "x_gg(%s,%s,%s)" c wf1 wf2 | F32 -> printf "x_gg(%s,%s,%s)" c wf2 wf1 | F12 -> printf "g_gx(%s,%s,%s)" c wf2 wf1 | F21 -> printf "g_gx(%s,%s,%s)" c wf1 wf2 | F13 -> printf "(-1)*g_gx(%s,%s,%s)" c wf2 wf1 | F31 -> printf "(-1)*g_gx(%s,%s,%s)" c wf1 wf2 end (* These cases are symmetric and we just have to juxtapose the correct fields and provide parentheses to minimize the number of multiplications. *) | Scalar_Vector_Vector coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "%s*(%s*%s)" c wf1 wf2 | (F12|F13) -> printf "(%s*%s)*%s" c wf1 wf2 | (F21|F31) -> printf "(%s*%s)*%s" c wf2 wf1 end | Aux_Vector_Vector coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "%s*(%s*%s)" c wf1 wf2 | (F12|F13) -> printf "(%s*%s)*%s" c wf1 wf2 | (F21|F31) -> printf "(%s*%s)*%s" c wf2 wf1 end (* Even simpler: *) | Scalar_Scalar_Scalar coeff -> printf "(%s*%s*%s)" (format_coupling coeff c) wf1 wf2 | Aux_Scalar_Scalar coeff -> printf "(%s*%s*%s)" (format_coupling coeff c) wf1 wf2 | Aux_Scalar_Vector coeff -> let c = format_coupling coeff c in begin match fusion with | (F13|F31) -> printf "%s*(%s*%s)" c wf1 wf2 | (F23|F21) -> printf "(%s*%s)*%s" c wf1 wf2 | (F32|F12) -> printf "(%s*%s)*%s" c wf2 wf1 end | Vector_Scalar_Scalar coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "v_ss(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "v_ss(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "s_vs(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "s_vs(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "(-1)*s_vs(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "(-1)*s_vs(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Graviton_Scalar_Scalar coeff -> let c = format_coupling coeff c in begin match fusion with | F12 -> printf "s_gravs(%s,%s,-(%s+%s),%s,%s,%s)" c m2 p1 p2 p2 wf1 wf2 | F21 -> printf "s_gravs(%s,%s,-(%s+%s),%s,%s,%s)" c m1 p1 p2 p1 wf2 wf1 | F13 -> printf "s_gravs(%s,%s,%s,-(%s+%s),%s,%s)" c m2 p2 p1 p2 wf1 wf2 | F31 -> printf "s_gravs(%s,%s,%s,-(%s+%s),%s,%s)" c m1 p1 p1 p2 wf2 wf1 | F23 -> printf "grav_ss(%s,%s,%s,%s,%s,%s)" c m1 p1 p2 wf1 wf2 | F32 -> printf "grav_ss(%s,%s,%s,%s,%s,%s)" c m1 p2 p1 wf2 wf1 end (* In producing a vector in the fusion we always contract the rightmost index with the vector wavefunction from [rhs]. So the first momentum is always the one of the vector boson produced in the fusion, while the second one is that from the [rhs]. This makes the cases [F12] and [F13] as well as [F21] and [F31] equal. In principle, we could have already done this for the [Graviton_Scalar_Scalar] case. *) | Graviton_Vector_Vector coeff -> let c = format_coupling coeff c in begin match fusion with | (F12|F13) -> printf "v_gravv(%s,%s,-(%s+%s),%s,%s,%s)" c m2 p1 p2 p2 wf1 wf2 | (F21|F31) -> printf "v_gravv(%s,%s,-(%s+%s),%s,%s,%s)" c m1 p1 p2 p1 wf2 wf1 | F23 -> printf "grav_vv(%s,%s,%s,%s,%s,%s)" c m1 p1 p2 wf1 wf2 | F32 -> printf "grav_vv(%s,%s,%s,%s,%s,%s)" c m1 p2 p1 wf2 wf1 end | Graviton_Spinor_Spinor coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "f_gravf(%s,%s,-(%s+%s),(-%s),%s,%s)" c m2 p1 p2 p2 wf1 wf2 | F32 -> printf "f_gravf(%s,%s,-(%s+%s),(-%s),%s,%s)" c m1 p1 p2 p1 wf2 wf1 | F12 -> printf "f_fgrav(%s,%s,%s,%s+%s,%s,%s)" c m1 p1 p1 p2 wf1 wf2 | F21 -> printf "f_fgrav(%s,%s,%s,%s+%s,%s,%s)" c m2 p2 p1 p2 wf2 wf1 | F13 -> printf "grav_ff(%s,%s,%s,(-%s),%s,%s)" c m1 p1 p2 wf1 wf2 | F31 -> printf "grav_ff(%s,%s,%s,(-%s),%s,%s)" c m1 p2 p1 wf2 wf1 end | Dim4_Vector_Vector_Vector_T coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "tkv_vv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "tkv_vv(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "tv_kvv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "tv_kvv(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "(-1)*tv_kvv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "(-1)*tv_kvv(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim4_Vector_Vector_Vector_L coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "lkv_vv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "lkv_vv(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 | F13 -> printf "lv_kvv(%s,%s,%s,%s)" c wf1 p1 wf2 | F21 | F31 -> printf "lv_kvv(%s,%s,%s,%s)" c wf2 p2 wf1 end | Dim6_Gauge_Gauge_Gauge coeff -> let c = format_coupling coeff c in begin match fusion with | F23 | F31 | F12 -> printf "kg_kgkg(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 | F13 | F21 -> printf "kg_kgkg(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim4_Vector_Vector_Vector_T5 coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "t5kv_vv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "t5kv_vv(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 | F13 -> printf "t5v_kvv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 | F31 -> printf "t5v_kvv(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim4_Vector_Vector_Vector_L5 coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "l5kv_vv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "l5kv_vv(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "l5v_kvv(%s,%s,%s,%s)" c wf1 p1 wf2 | F21 -> printf "l5v_kvv(%s,%s,%s,%s)" c wf2 p2 wf1 | F13 -> printf "(-1)*l5v_kvv(%s,%s,%s,%s)" c wf1 p1 wf2 | F31 -> printf "(-1)*l5v_kvv(%s,%s,%s,%s)" c wf2 p2 wf1 end | Dim6_Gauge_Gauge_Gauge_5 coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "kg5_kgkg(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "kg5_kgkg(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "kg_kg5kg(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "kg_kg5kg(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "(-1)*kg_kg5kg(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "(-1)*kg_kg5kg(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Aux_DScalar_DScalar coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "%s*(%s*%s)*(%s*%s)" c p1 p2 wf1 wf2 | (F12|F13) -> printf "%s*(-((%s+%s)*%s))*(%s*%s)" c p1 p2 p2 wf1 wf2 | (F21|F31) -> printf "%s*(-((%s+%s)*%s))*(%s*%s)" c p1 p2 p1 wf1 wf2 end | Aux_Vector_DScalar coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "%s*(%s*%s)*%s" c wf1 p2 wf2 | F32 -> printf "%s*(%s*%s)*%s" c wf2 p1 wf1 | F12 -> printf "%s*(-((%s+%s)*%s))*%s" c p1 p2 wf2 wf1 | F21 -> printf "%s*(-((%s+%s)*%s))*%s" c p1 p2 wf1 wf2 | (F13|F31) -> printf "(-(%s+%s))*(%s*%s*%s)" p1 p2 c wf1 wf2 end | Dim5_Scalar_Gauge2 coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "(%s)*((%s*%s)*(%s*%s) - (%s*%s)*(%s*%s))" c p1 wf2 p2 wf1 p1 p2 wf2 wf1 | (F12|F13) -> printf "(%s)*%s*((-((%s+%s)*%s))*%s - ((-(%s+%s)*%s))*%s)" c wf1 p1 p2 wf2 p2 p1 p2 p2 wf2 | (F21|F31) -> printf "(%s)*%s*((-((%s+%s)*%s))*%s - ((-(%s+%s)*%s))*%s)" c wf2 p2 p1 wf1 p1 p1 p2 p1 wf1 end | Dim5_Scalar_Gauge2_Skew coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "(- phi_vv (%s, %s, %s, %s, %s))" c p1 p2 wf1 wf2 | (F12|F13) -> printf "(- v_phiv (%s, %s, %s, %s, %s))" c wf1 p1 p2 wf2 | (F21|F31) -> printf "v_phiv (%s, %s, %s, %s, %s)" c wf2 p1 p2 wf1 end | Dim5_Scalar_Vector_Vector_T coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "(%s)*(%s*%s)*(%s*%s)" c p1 wf2 p2 wf1 | (F12|F13) -> printf "(%s)*%s*(-((%s+%s)*%s))*%s" c wf1 p1 p2 wf2 p2 | (F21|F31) -> printf "(%s)*%s*(-((%s+%s)*%s))*%s" c wf2 p2 p1 wf1 p1 end | Dim5_Scalar_Vector_Vector_U coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "phi_u_vv (%s, %s, %s, %s, %s)" c p1 p2 wf1 wf2 | (F12|F13) -> printf "v_u_phiv (%s, %s, %s, %s, %s)" c wf1 p1 p2 wf2 | (F21|F31) -> printf "v_u_phiv (%s, %s, %s, %s, %s)" c wf2 p2 p1 wf1 end | Dim5_Scalar_Vector_Vector_TU coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "(%s)*((%s*%s)*(-(%s+%s)*%s) - (-(%s+%s)*%s)*(%s*%s))" c p1 wf2 p1 p2 wf1 p1 p2 p1 wf1 wf2 | F32 -> printf "(%s)*((%s*%s)*(-(%s+%s)*%s) - (-(%s+%s)*%s)*(%s*%s))" c p2 wf1 p1 p2 wf2 p1 p2 p2 wf1 wf2 | F12 -> printf "(%s)*%s*((%s*%s)*%s - (%s*%s)*%s)" c wf1 p1 wf2 p2 p1 p2 wf2 | F21 -> printf "(%s)*%s*((%s*%s)*%s - (%s*%s)*%s)" c wf2 p2 wf1 p1 p1 p2 wf1 | F13 -> printf "(%s)*%s*((-(%s+%s)*%s)*%s - (-(%s+%s)*%s)*%s)" c wf1 p1 p2 wf2 p1 p1 p2 p1 wf2 | F31 -> printf "(%s)*%s*((-(%s+%s)*%s)*%s - (-(%s+%s)*%s)*%s)" c wf2 p1 p2 wf1 p2 p1 p2 p2 wf1 end | Dim5_Scalar_Scalar2 coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "phi_dim5s2(%s, %s ,%s, %s, %s)" c wf1 p1 wf2 p2 | (F12|F13) -> let p12 = Printf.sprintf "(-%s-%s)" p1 p2 in printf "phi_dim5s2(%s,%s,%s,%s,%s)" c wf1 p12 wf2 p2 | (F21|F31) -> let p12 = Printf.sprintf "(-%s-%s)" p1 p2 in printf "phi_dim5s2(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p12 end | Scalar_Vector_Vector_t coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "s_vv_t(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "v_sv_t(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "v_sv_t(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_Vector_Vector_Vector_T coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "(%s)*(%s*%s)*(%s*%s)*(%s-%s)" c p2 wf1 p1 wf2 p1 p2 | F32 -> printf "(%s)*(%s*%s)*(%s*%s)*(%s-%s)" c p1 wf2 p2 wf1 p2 p1 | (F12|F13) -> printf "(%s)*((%s+2*%s)*%s)*(-((%s+%s)*%s))*%s" c p1 p2 wf1 p1 p2 wf2 p2 | (F21|F31) -> printf "(%s)*((-((%s+%s)*%s))*(%s+2*%s)*%s)*%s" c p2 p1 wf1 p2 p1 wf2 p1 end | Tensor_2_Vector_Vector coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "t2_vv(%s,%s,%s)" c wf1 wf2 | (F12|F13) -> printf "v_t2v(%s,%s,%s)" c wf1 wf2 | (F21|F31) -> printf "v_t2v(%s,%s,%s)" c wf2 wf1 end | Tensor_2_Scalar_Scalar coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "t2_phi2(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "phi_t2phi(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "phi_t2phi(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Tensor_2_Vector_Vector_1 coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "t2_vv_1(%s,%s,%s)" c wf1 wf2 | (F12|F13) -> printf "v_t2v_1(%s,%s,%s)" c wf1 wf2 | (F21|F31) -> printf "v_t2v_1(%s,%s,%s)" c wf2 wf1 end | Tensor_2_Vector_Vector_cf coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "t2_vv_cf(%s,%s,%s)" c wf1 wf2 | (F12|F13) -> printf "v_t2v_cf(%s,%s,%s)" c wf1 wf2 | (F21|F31) -> printf "v_t2v_cf(%s,%s,%s)" c wf2 wf1 end | Tensor_2_Scalar_Scalar_cf coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "t2_phi2_cf(%s,%s,%s,%s, %s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "phi_t2phi_cf(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "phi_t2phi_cf(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim5_Tensor_2_Vector_Vector_1 coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "t2_vv_d5_1(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "v_t2v_d5_1(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "v_t2v_d5_1(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Tensor_2_Vector_Vector_t coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "t2_vv_t(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "v_t2v_t(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "v_t2v_t(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim5_Tensor_2_Vector_Vector_2 coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "t2_vv_d5_2(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "t2_vv_d5_2(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | (F12|F13) -> printf "v_t2v_d5_2(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "v_t2v_d5_2(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | TensorVector_Vector_Vector coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "dv_vv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "v_dvv(%s,%s,%s,%s)" c wf1 p1 wf2 | (F21|F31) -> printf "v_dvv(%s,%s,%s,%s)" c wf2 p2 wf1 end | TensorVector_Vector_Vector_cf coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "dv_vv_cf(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "v_dvv_cf(%s,%s,%s,%s)" c wf1 p1 wf2 | (F21|F31) -> printf "v_dvv_cf(%s,%s,%s,%s)" c wf2 p2 wf1 end | TensorVector_Scalar_Scalar coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "dv_phi2(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "phi_dvphi(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "phi_dvphi(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | TensorVector_Scalar_Scalar_cf coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "dv_phi2_cf(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "phi_dvphi_cf(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "phi_dvphi_cf(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | TensorScalar_Vector_Vector coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "tphi_vv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "v_tphiv(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "v_tphiv(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | TensorScalar_Vector_Vector_cf coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "tphi_vv_cf(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "v_tphiv_cf(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "v_tphiv_cf(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | TensorScalar_Scalar_Scalar coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "tphi_ss(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "s_tphis(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "s_tphis(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | TensorScalar_Scalar_Scalar_cf coeff-> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "tphi_ss_cf(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "s_tphis_cf(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "s_tphis_cf(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim7_Tensor_2_Vector_Vector_T coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "t2_vv_d7(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "t2_vv_d7(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | (F12|F13) -> printf "v_t2v_d7(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "v_t2v_d7(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_Scalar_Vector_Vector_D coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "s_vv_6D(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "v_sv_6D(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "v_sv_6D(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_Scalar_Vector_Vector_DP coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32) -> printf "s_vv_6DP(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F12|F13) -> printf "v_sv_6DP(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F21|F31) -> printf "v_sv_6DP(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_HAZ_D coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "h_az_D(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "h_az_D(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "a_hz_D(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "a_hz_D(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "z_ah_D(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F21 -> printf "z_ah_D(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 end | Dim6_HAZ_DP coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "h_az_DP(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "h_az_DP(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "a_hz_DP(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "a_hz_DP(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "z_ah_DP(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F21 -> printf "z_ah_DP(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 end | Gauge_Gauge_Gauge_i coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "g_gg_23(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "g_gg_23(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "g_gg_13(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "g_gg_13(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "(-1) * g_gg_13(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "(-1) * g_gg_13(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_GGG coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "g_gg_6(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "g_gg_6(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "g_gg_6(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "g_gg_6(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "(-1) * g_gg_6(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "(-1) * g_gg_6(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_AWW_DP coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "a_ww_DP(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "a_ww_DP(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "w_aw_DP(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "w_aw_DP(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "(-1) * w_aw_DP(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "(-1) * w_aw_DP(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_AWW_DW coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "a_ww_DW(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "a_ww_DW(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "(-1) * a_ww_DW(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "(-1) * a_ww_DW(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "a_ww_DW(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "a_ww_DW(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_Gauge_Gauge_Gauge_i coeff -> let c = format_coupling coeff c in begin match fusion with | F23 | F31 | F12 -> printf "kg_kgkg_i(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 | F13 | F21 -> printf "kg_kgkg_i(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_HHH coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F32|F12|F21|F13|F31) -> printf "h_hh_6(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 end | Dim6_WWZ_DPWDW coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "w_wz_DPW(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "w_wz_DPW(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "(-1) * w_wz_DPW(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "(-1) * w_wz_DPW(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "z_ww_DPW(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "z_ww_DPW(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_WWZ_DW coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "w_wz_DW(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "w_wz_DW(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "(-1) * w_wz_DW(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "(-1) * w_wz_DW(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "z_ww_DW(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "z_ww_DW(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end | Dim6_WWZ_D coeff -> let c = format_coupling coeff c in begin match fusion with | F23 -> printf "w_wz_D(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F32 -> printf "w_wz_D(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F13 -> printf "(-1) * w_wz_D(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F31 -> printf "(-1) * w_wz_D(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 | F12 -> printf "z_ww_D(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | F21 -> printf "z_ww_D(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end (*i | Dim6_Glu_Glu_Glu coeff -> let c = format_coupling coeff c in begin match fusion with | (F23|F31|F12) -> printf "g_gg_glu(%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 | (F32|F13|F21) -> printf "g_gg_glu(%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 end i*) end (* Flip the sign to account for the~$\mathrm{i}^2$ relative to diagrams - with only cubic couplings. *) + with only cubic couplings. + \label{hack:sign(V4)} *) +(* \begin{dubious} + That's an \emph{slightly dangerous} hack!!! How do we accnount + for such signs when treating $n$-ary vertices uniformly? + \end{dubious} *) | V4 (vertex, fusion, constant) -> let c = CM.constant_symbol constant and ch1, ch2, ch3 = children3 rhs in let wf1 = multiple_variable amplitude dictionary ch1 and wf2 = multiple_variable amplitude dictionary ch2 and wf3 = multiple_variable amplitude dictionary ch3 and p1 = momentum ch1 and p2 = momentum ch2 and p3 = momentum ch3 in printf "@, %s " (if (F.sign rhs) < 0 then "+" else "-"); begin match vertex with - | UFO4 (c', v, s, Color.Legacy4) - | UFO4 (c', v, s, Color.Trivial4) -> - UFO.Targets.Fortran.fusion3 c' v s c wf1 p1 wf2 p2 wf3 p3 fusion - - | UFO4 (c', v, s, _) -> - failwith "print_current: nontrivial color structure" - | Scalar4 coeff -> printf "(%s*%s*%s*%s)" (format_coupling coeff c) wf1 wf2 wf3 | Scalar2_Vector2 coeff -> let c = format_coupling coeff c in begin match fusion with | F134 | F143 | F234 | F243 -> printf "%s*%s*(%s*%s)" c wf1 wf2 wf3 | F314 | F413 | F324 | F423 -> printf "%s*%s*(%s*%s)" c wf2 wf1 wf3 | F341 | F431 | F342 | F432 -> printf "%s*%s*(%s*%s)" c wf3 wf1 wf2 | F312 | F321 | F412 | F421 -> printf "(%s*%s*%s)*%s" c wf2 wf3 wf1 | F231 | F132 | F241 | F142 -> printf "(%s*%s*%s)*%s" c wf1 wf3 wf2 | F123 | F213 | F124 | F214 -> printf "(%s*%s*%s)*%s" c wf1 wf2 wf3 end | Vector4 contractions -> begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4 []" | head :: tail -> printf "("; print_vector4 c wf1 wf2 wf3 fusion head; List.iter (print_add_vector4 c wf1 wf2 wf3 fusion) tail; printf ")" end | Dim8_Vector4_t_0 contractions -> begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4 []" | head :: tail -> print_vector4_t_0 c wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4 c wf1 wf2 wf3 fusion) tail; end | Dim8_Vector4_t_1 contractions -> begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4 []" | head :: tail -> print_vector4_t_1 c wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4 c wf1 wf2 wf3 fusion) tail; end | Dim8_Vector4_t_2 contractions -> begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4 []" | head :: tail -> print_vector4_t_2 c wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4 c wf1 wf2 wf3 fusion) tail; end | Dim8_Vector4_m_0 contractions -> begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4 []" | head :: tail -> print_vector4_m_0 c wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4 c wf1 wf2 wf3 fusion) tail; end | Dim8_Vector4_m_1 contractions -> begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4 []" | head :: tail -> print_vector4_m_1 c wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4 c wf1 wf2 wf3 fusion) tail; end | Dim8_Vector4_m_7 contractions -> begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4 []" | head :: tail -> print_vector4_m_7 c wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4 c wf1 wf2 wf3 fusion) tail; end | Vector4_K_Matrix_tho (_, poles) -> let pa, pb = begin match fusion with | (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in printf "(%s*(%s*%s)*(%s*%s)*(%s*%s)@,*(" c p1 wf1 p2 wf2 p3 wf3; List.iter (fun (coeff, pole) -> printf "+%s/((%s+%s)*(%s+%s)-%s)" (CM.constant_symbol coeff) pa pb pa pb (CM.constant_symbol pole)) poles; printf ")*(-%s-%s-%s))" p1 p2 p3 | Vector4_K_Matrix_jr (disc, contractions) -> let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4_K_Matrix_jr []" | head :: tail -> printf "("; print_vector4_km c pa pb wf1 wf2 wf3 fusion head; List.iter (print_add_vector4_km c pa pb wf1 wf2 wf3 fusion) tail; printf ")" end | Vector4_K_Matrix_cf_t0 (disc, contractions) -> let pa, pb, pc = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2, p3) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3, p1) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3, p2) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2, p3) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3, p1) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3, p2) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4_K_Matrix_cf_t0 []" | head :: tail -> printf "("; print_vector4_km_t_0 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4_km c pa pb wf1 wf2 wf3 fusion) tail; printf ")" end | Vector4_K_Matrix_cf_t1 (disc, contractions) -> let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4_K_Matrix_cf_t1 []" | head :: tail -> printf "("; print_vector4_km_t_1 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4_km c pa pb wf1 wf2 wf3 fusion) tail; printf ")" end | Vector4_K_Matrix_cf_t2 (disc, contractions) -> let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4_K_Matrix_cf_t2 []" | head :: tail -> printf "("; print_vector4_km_t_2 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4_km c pa pb wf1 wf2 wf3 fusion) tail; printf ")" end | Vector4_K_Matrix_cf_t_rsi (disc, contractions) -> let pa, pb, pc = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2, p3) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3, p1) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3, p2) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2, p3) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3, p1) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3, p2) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4_K_Matrix_cf_t_rsi []" | head :: tail -> printf "("; print_vector4_km_t_rsi c pa pb pc wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4_km c pa pb wf1 wf2 wf3 fusion) tail; printf ")" end | Vector4_K_Matrix_cf_m0 (disc, contractions) -> let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4_K_Matrix_cf_m0 []" | head :: tail -> printf "("; print_vector4_km_m_0 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4_km c pa pb wf1 wf2 wf3 fusion) tail; printf ")" end | Vector4_K_Matrix_cf_m1 (disc, contractions) -> let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4_K_Matrix_cf_m1 []" | head :: tail -> printf "("; print_vector4_km_m_1 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4_km c pa pb wf1 wf2 wf3 fusion) tail; printf ")" end | Vector4_K_Matrix_cf_m7 (disc, contractions) -> let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: Vector4_K_Matrix_cf_m7 []" | head :: tail -> printf "("; print_vector4_km_m_7 c pa pb wf1 p1 wf2 p2 wf3 p3 fusion head; List.iter (print_add_vector4_km c pa pb wf1 wf2 wf3 fusion) tail; printf ")" end | DScalar2_Vector2_K_Matrix_ms (disc, contractions) -> let p123 = Printf.sprintf "(-%s-%s-%s)" p1 p2 p3 in let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 4, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 4, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 4, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 5, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 5, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 5, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 6, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 6, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 6, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | 7, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 7, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 7, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | 8, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 8, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 8, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: DScalar2_Vector4_K_Matrix_ms []" | head :: tail -> printf "("; print_dscalar2_vector2_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion head; List.iter (print_add_dscalar2_vector2_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion) tail; printf ")" end | DScalar2_Vector2_m_0_K_Matrix_cf (disc, contractions) -> let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 4, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 4, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 4, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 5, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 5, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 5, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 6, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 6, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 6, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | 7, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 7, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 7, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | 8, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 8, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 8, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: DScalar2_Vector4_K_Matrix_cf_m0 []" | head :: tail -> printf "("; print_dscalar2_vector2_m_0_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion head; List.iter (print_add_dscalar2_vector2_m_0_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion) tail; printf ")" end | DScalar2_Vector2_m_1_K_Matrix_cf (disc, contractions) -> let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 4, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 4, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 4, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 5, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 5, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 5, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 6, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 6, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 6, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | 7, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 7, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 7, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | 8, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 8, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 8, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: DScalar2_Vector4_K_Matrix_cf_m1 []" | head :: tail -> printf "("; print_dscalar2_vector2_m_1_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion head; List.iter (print_add_dscalar2_vector2_m_1_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion) tail; printf ")" end | DScalar2_Vector2_m_7_K_Matrix_cf (disc, contractions) -> let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 4, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 4, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 4, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 5, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 5, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 5, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | 6, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 6, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 6, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | 7, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 7, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 7, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | 8, (F134|F132|F314|F312|F241|F243|F421|F423) -> (p1, p2) | 8, (F213|F413|F231|F431|F124|F324|F142|F342) -> (p2, p3) | 8, (F143|F123|F341|F321|F412|F214|F432|F234) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: DScalar2_Vector4_K_Matrix_cf_m7 []" | head :: tail -> printf "("; print_dscalar2_vector2_m_7_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion head; List.iter (print_add_dscalar2_vector2_m_7_km c pa pb wf1 wf2 wf3 p1 p2 p3 fusion) tail; printf ")" end | DScalar4_K_Matrix_ms (disc, contractions) -> let p123 = Printf.sprintf "(-%s-%s-%s)" p1 p2 p3 in let pa, pb = begin match disc, fusion with | 3, (F143|F413|F142|F412|F321|F231|F324|F234) -> (p1, p2) | 3, (F314|F341|F214|F241|F132|F123|F432|F423) -> (p2, p3) | 3, (F134|F431|F124|F421|F312|F213|F342|F243) -> (p1, p3) | _, (F341|F431|F342|F432|F123|F213|F124|F214) -> (p1, p2) | _, (F134|F143|F234|F243|F312|F321|F412|F421) -> (p2, p3) | _, (F314|F413|F324|F423|F132|F231|F142|F241) -> (p1, p3) end in begin match contractions with | [] -> invalid_arg "Targets.print_current: DScalar4_K_Matrix_ms []" | head :: tail -> printf "("; print_dscalar4_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion head; List.iter (print_add_dscalar4_km c pa pb wf1 wf2 wf3 p1 p2 p3 p123 fusion) tail; printf ")" end | Dim8_Scalar2_Vector2_1 coeff -> let c = format_coupling coeff c in begin match fusion with | F134 | F143 | F234 | F243 -> printf "phi_phi2v_1(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F314 | F413 | F324 | F423 -> printf "phi_phi2v_1(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F341 | F431 | F342 | F432 -> printf "phi_phi2v_1(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F312 | F321 | F412 | F421 -> printf "v_phi2v_1(%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 | F231 | F132 | F241 | F142 -> printf "v_phi2v_1(%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 | F123 | F213 | F124 | F214 -> printf "v_phi2v_1(%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 end | Dim8_Scalar2_Vector2_2 coeff -> let c = format_coupling coeff c in begin match fusion with | F134 | F143 | F234 | F243 -> printf "phi_phi2v_2(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F314 | F413 | F324 | F423 -> printf "phi_phi2v_2(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F341 | F431 | F342 | F432 -> printf "phi_phi2v_2(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F312 | F321 | F412 | F421 -> printf "v_phi2v_2(%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 | F231 | F132 | F241 | F142 -> printf "v_phi2v_2(%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 | F123 | F213 | F124 | F214 -> printf "v_phi2v_2(%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 end | Dim8_Scalar2_Vector2_m_0 coeff -> let c = format_coupling coeff c in begin match fusion with | F134 | F143 | F234 | F243 -> printf "phi_phi2v_m_0(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F314 | F413 | F324 | F423 -> printf "phi_phi2v_m_0(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F341 | F431 | F342 | F432 -> printf "phi_phi2v_m_0(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F312 | F321 | F412 | F421 -> printf "v_phi2v_m_0(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F231 | F132 | F241 | F142 -> printf "v_phi2v_m_0(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F123 | F213 | F124 | F214 -> printf "v_phi2v_m_0(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 end | Dim8_Scalar2_Vector2_m_1 coeff -> let c = format_coupling coeff c in begin match fusion with | F134 | F143 | F234 | F243 -> printf "phi_phi2v_m_1(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F314 | F413 | F324 | F423 -> printf "phi_phi2v_m_1(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F341 | F431 | F342 | F432 -> printf "phi_phi2v_m_1(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F312 | F321 | F412 | F421 -> printf "v_phi2v_m_1(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F231 | F132 | F241 | F142 -> printf "v_phi2v_m_1(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F123 | F213 | F124 | F214 -> printf "v_phi2v_m_1(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 end | Dim8_Scalar2_Vector2_m_7 coeff -> let c = format_coupling coeff c in begin match fusion with | F134 | F143 | F234 | F243 -> printf "phi_phi2v_m_7(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F314 | F413 | F324 | F423 -> printf "phi_phi2v_m_7(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F341 | F431 | F342 | F432 -> printf "phi_phi2v_m_7(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F312 | F321 | F412 | F421 -> printf "v_phi2v_m_7(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F231 | F132 | F241 | F142 -> printf "v_phi2v_m_7(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F123 | F213 | F124 | F214 -> printf "v_phi2v_m_7(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 end | Dim8_Scalar4 coeff -> let c = format_coupling coeff c in begin match fusion with | F134 | F143 | F234 | F243 | F314 | F413 | F324 | F423 | F341 | F431 | F342 | F432 | F312 | F321 | F412 | F421 | F231 | F132 | F241 | F142 | F123 | F213 | F124 | F214 -> printf "s_dim8s3 (%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 end | GBBG (coeff, fb, b, f) -> Fermions.print_current_g4 (coeff, fb, b, f) c wf1 wf2 wf3 fusion | Dim6_H4_P2 coeff -> let c = format_coupling coeff c in begin match fusion with | F134 | F143 | F234 | F243 | F314 | F413 | F324 | F423 | F341 | F431 | F342 | F432 | F312 | F321 | F412 | F421 | F231 | F132 | F241 | F142 | F123 | F213 | F124 | F214 -> printf "hhhh_p2 (%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 end | Dim6_AHWW_DPB coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "a_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "a_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "a_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "a_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "a_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "a_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "h_aww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "h_aww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "h_aww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "h_aww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "h_aww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "h_aww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "(-1)*w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "(-1)*w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "(-1)*w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "(-1)*w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "(-1)*w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "(-1)*w_ahw_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_AHWW_DPW coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "a_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "a_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "a_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "a_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "a_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "a_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "h_aww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "h_aww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "h_aww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "h_aww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "h_aww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "h_aww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "(-1)*w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "(-1)*w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "(-1)*w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "(-1)*w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "(-1)*w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "(-1)*w_ahw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_AHWW_DW coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "h_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "h_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "h_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "h_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "h_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "h_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "w3_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "w3_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "w3_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "w3_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "w3_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "w3_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "w4_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "w4_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "w4_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "w4_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "w4_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "w4_ahw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 (*i | F234 | F134 | F124 | F123 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 | F143 | F142 | F132 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 | F341 | F241 | F231 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 | F314 | F214 | F213 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 | F413 | F412 | F312 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 | F431 | F421 | F321 -> printf "a_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 i*) end | Dim6_Scalar2_Vector2_D coeff -> let c = format_coupling coeff c in begin match fusion with | F234 | F134 -> printf "h_hww_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 | F143 -> printf "h_hww_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 | F341 -> printf "h_hww_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 | F314 -> printf "h_hww_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 | F413 -> printf "h_hww_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 | F431 -> printf "h_hww_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 | F123 -> printf "w_hhw_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 | F132 -> printf "w_hhw_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 | F231 -> printf "w_hhw_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 | F213 -> printf "w_hhw_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 | F312 -> printf "w_hhw_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 | F321 -> printf "w_hhw_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_Scalar2_Vector2_DP coeff -> let c = format_coupling coeff c in begin match fusion with | F234 | F134 -> printf "h_hww_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F342 | F341 -> printf "h_hww_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F423 | F413 -> printf "h_hww_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F243 | F143 -> printf "h_hww_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F324 | F314 -> printf "h_hww_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F432 | F431 -> printf "h_hww_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 | F124 -> printf "w_hhw_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F231 | F241-> printf "w_hhw_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F312 | F412 -> printf "w_hhw_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F132 | F142-> printf "w_hhw_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F213 | F214 -> printf "w_hhw_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F321 | F421 -> printf "w_hhw_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 (*i | F234 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "h_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "w_hhw_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 i*) end | Dim6_Scalar2_Vector2_PB coeff -> let c = format_coupling coeff c in begin match fusion with | F234 | F134 -> printf "h_hvv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F342 | F341 -> printf "h_hvv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F423 | F413 -> printf "h_hvv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F243 | F143 -> printf "h_hvv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F324 | F314 -> printf "h_hvv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F432 | F431 -> printf "h_hvv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 | F124 -> printf "v_hhv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F231 | F241-> printf "v_hhv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F312 | F412 -> printf "v_hhv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F132 | F142-> printf "v_hhv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F213 | F214 -> printf "v_hhv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F321 | F421 -> printf "v_hhv_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_HHZZ_T coeff -> let c = format_coupling coeff c in begin match fusion with | F234 | F134 -> printf "(%s)*(%s)*(%s)*(%s)" c wf1 wf2 wf3 | F342 | F341 -> printf "(%s)*(%s)*(%s)*(%s)" c wf3 wf1 wf2 | F423 | F413 -> printf "(%s)*(%s)*(%s)*(%s)" c wf2 wf3 wf1 | F243 | F143 -> printf "(%s)*(%s)*(%s)*(%s)" c wf1 wf3 wf2 | F324 | F314 -> printf "(%s)*(%s)*(%s)*(%s)" c wf2 wf1 wf3 | F432 | F431 -> printf "(%s)*(%s)*(%s)*(%s)" c wf3 wf2 wf1 | F123 | F124 | F231 | F241 | F312 | F412 -> printf "(%s)*(%s)*(%s)*(%s)" c wf1 wf2 wf3 | F132 | F142 | F213 | F214 | F321 | F421 -> printf "(%s)*(%s)*(%s)*(%s)" c wf1 wf2 wf3 end | Dim6_Vector4_DW coeff -> let c = format_coupling coeff c in begin match fusion with | F234 | F134 -> printf "a_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F342 | F341 -> printf "a_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F423 | F413 -> printf "a_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F243 | F143 -> printf "a_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F324 | F314 -> printf "a_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F432 | F431 -> printf "a_aww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 | F123 -> printf "w_aaw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F241 | F231 -> printf "w_aaw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F412 | F312 -> printf "w_aaw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F142 | F132 -> printf "w_aaw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F214 | F213 -> printf "w_aaw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F421 | F321 -> printf "w_aaw_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_Vector4_W coeff -> let c = format_coupling coeff c in begin match fusion with | F234 | F134 -> printf "a_aww_W(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F342 | F341 -> printf "a_aww_W(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F423 | F413 -> printf "a_aww_W(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F243 | F143 -> printf "a_aww_W(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F324 | F314 -> printf "a_aww_W(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F432 | F431 -> printf "a_aww_W(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 | F124 -> printf "w_aaw_W(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F231 | F241-> printf "w_aaw_W(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F312 | F412 -> printf "w_aaw_W(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F132 | F142-> printf "w_aaw_W(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F213 | F214 -> printf "w_aaw_W(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F321 | F421 -> printf "w_aaw_W(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_HWWZ_DW coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "h_wwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "h_wwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "h_wwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "h_wwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "h_wwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "h_wwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "(-1)*w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "(-1)*w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "(-1)*w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "(-1)*w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "(-1)*w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "(-1)*w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "w_hwz_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "z_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "z_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "z_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "z_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "z_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "z_hww_DW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_HWWZ_DPB coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "h_wwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "h_wwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "h_wwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "h_wwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "h_wwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "h_wwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "(-1)*w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "(-1)*w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "(-1)*w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "(-1)*w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "(-1)*w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "(-1)*w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "w_hwz_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "z_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "z_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "z_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "z_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "z_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "z_hww_DPB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_HWWZ_DDPW coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "h_wwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "h_wwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "h_wwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "h_wwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "h_wwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "h_wwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "(-1)*w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "(-1)*w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "(-1)*w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "(-1)*w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "(-1)*w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "(-1)*w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "w_hwz_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "z_hww_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "z_hww_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "z_hww_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "z_hww_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "z_hww_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "z_hww_DDPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_HWWZ_DPW coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "h_wwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "h_wwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "h_wwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "h_wwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "h_wwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "h_wwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "(-1)*w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "(-1)*w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "(-1)*w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "(-1)*w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "(-1)*w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "(-1)*w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "w_hwz_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "z_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "z_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "z_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "z_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "z_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "z_hww_DPW(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_AHHZ_D coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "a_hhz_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "a_hhz_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "a_hhz_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "a_hhz_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "a_hhz_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "a_hhz_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "h_ahz_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "z_ahh_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "z_ahh_D(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "z_ahh_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "z_ahh_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "z_ahh_D(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "z_ahh_D(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_AHHZ_DP coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "a_hhz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "a_hhz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "a_hhz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "a_hhz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "a_hhz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "a_hhz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "h_ahz_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "z_ahh_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "z_ahh_DP(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "z_ahh_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "z_ahh_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "z_ahh_DP(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "z_ahh_DP(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end | Dim6_AHHZ_PB coeff -> let c = format_coupling coeff c in begin match fusion with | F234 -> printf "a_hhz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F243 -> printf "a_hhz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F342 -> printf "a_hhz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F324 -> printf "a_hhz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F423 -> printf "a_hhz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F432 -> printf "a_hhz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F124 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F142 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F241 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F214 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F412 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F421 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F134 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F143 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F341 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F314 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F413 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F431 -> printf "h_ahz_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 | F123 -> printf "z_ahh_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf2 p2 wf3 p3 | F132 -> printf "z_ahh_PB(%s,%s,%s,%s,%s,%s,%s)" c wf1 p1 wf3 p3 wf2 p2 | F231 -> printf "z_ahh_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf1 p1 wf2 p2 | F213 -> printf "z_ahh_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf1 p1 wf3 p3 | F312 -> printf "z_ahh_PB(%s,%s,%s,%s,%s,%s,%s)" c wf2 p2 wf3 p3 wf1 p1 | F321 -> printf "z_ahh_PB(%s,%s,%s,%s,%s,%s,%s)" c wf3 p3 wf2 p2 wf1 p1 end (* \begin{dubious} In principle, [p4] could be obtained from the left hand side \ldots \end{dubious} *) | DScalar4 contractions -> let p123 = Printf.sprintf "(-%s-%s-%s)" p1 p2 p3 in begin match contractions with | [] -> invalid_arg "Targets.print_current: DScalar4 []" | head :: tail -> printf "("; print_dscalar4 c wf1 wf2 wf3 p1 p2 p3 p123 fusion head; List.iter (print_add_dscalar4 c wf1 wf2 wf3 p1 p2 p3 p123 fusion) tail; printf ")" end | DScalar2_Vector2 contractions -> let p123 = Printf.sprintf "(-%s-%s-%s)" p1 p2 p3 in begin match contractions with | [] -> invalid_arg "Targets.print_current: DScalar4 []" | head :: tail -> printf "("; print_dscalar2_vector2 c wf1 wf2 wf3 p1 p2 p3 p123 fusion head; List.iter (print_add_dscalar2_vector2 c wf1 wf2 wf3 p1 p2 p3 p123 fusion) tail; printf ")" end end - | Vn (UFOn (c, v, s, Color.Legacy), fusion, constant) - | Vn (UFOn (c, v, s, Color.Trivial), fusion, constant) -> - let g = CM.constant_symbol constant - and chn = F.children rhs in - let wfs = List.map (multiple_variable amplitude dictionary) chn - and ps = List.map momentum chn in - UFO.Targets.Fortran.fusionn c v s g wfs ps fusion - - | Vn (UFOn (c, v, s, _), fusion, constant) -> - failwith "print_current: nontrivial color structure" + (* \begin{dubious} + This reproduces the hack on page~\pageref{hack:sign(V4)} + and gives the correct results up to quartic vertices. + Make sure that it is also correct in light + of~\eqref{eq:factors-of-i}, i.\,e. + \begin{equation*} + \ii T = \ii^{\#\text{vertices}}\ii^{\#\text{propagators}} \cdots + = \ii^{n-2}\ii^{n-3} \cdots + = -\ii(-1)^n \cdots + \end{equation*} + \end{dubious} *) + | Vn (UFO (c, v, s, _, color), fusion, constant) -> + if Color.Vertex.trivial color then + let g = CM.constant_symbol constant + and chn = F.children rhs in + let wfs = List.map (multiple_variable amplitude dictionary) chn + and ps = List.map momentum chn in + let n = List.length fusion in + let eps = if n mod 2 = 0 then -1 else 1 in + printf "@, %s " (if (eps * F.sign rhs) < 0 then "-" else "+"); + UFO.Targets.Fortran.fuse c v s g wfs ps fusion + else + failwith "print_current: nontrivial color structure" let print_propagator f p m gamma = let minus_third = "(-1.0_" ^ !kind ^ "/3.0_" ^ !kind ^ ")" in let w = begin match CM.width f with | Vanishing | Fudged -> "0.0_" ^ !kind | Constant | Complex_Mass -> gamma | Timelike -> "wd_tl(" ^ p ^ "," ^ gamma ^ ")" | Running -> failwith "Targets.Fortran: running width not yet available" | Custom f -> f ^ "(" ^ p ^ "," ^ gamma ^ ")" end in let cms = begin match CM.width f with | Complex_Mass -> ".true." | _ -> ".false." end in match CM.propagator f with | Prop_Scalar -> printf "pr_phi(%s,%s,%s," p m w | Prop_Col_Scalar -> printf "%s * pr_phi(%s,%s,%s," minus_third p m w | Prop_Ghost -> printf "(0,1) * pr_phi(%s, %s, %s," p m w | Prop_Spinor -> printf "%s(%s,%s,%s,%s," Fermions.psi_propagator p m w cms | Prop_ConjSpinor -> printf "%s(%s,%s,%s,%s," Fermions.psibar_propagator p m w cms | Prop_Majorana -> printf "%s(%s,%s,%s,%s," Fermions.chi_propagator p m w cms | Prop_Col_Majorana -> printf "%s * %s(%s,%s,%s,%s," minus_third Fermions.chi_propagator p m w cms | Prop_Unitarity -> printf "pr_unitarity(%s,%s,%s,%s," p m w cms | Prop_Col_Unitarity -> printf "%s * pr_unitarity(%s,%s,%s,%s," minus_third p m w cms | Prop_Feynman -> printf "pr_feynman(%s," p | Prop_Col_Feynman -> printf "%s * pr_feynman(%s," minus_third p | Prop_Gauge xi -> printf "pr_gauge(%s,%s," p (CM.gauge_symbol xi) | Prop_Rxi xi -> printf "pr_rxi(%s,%s,%s,%s," p m w (CM.gauge_symbol xi) | Prop_Tensor_2 -> printf "pr_tensor(%s,%s,%s," p m w | Prop_Tensor_pure -> printf "pr_tensor_pure(%s,%s,%s," p m w | Prop_Vector_pure -> printf "pr_vector_pure(%s,%s,%s," p m w | Prop_Vectorspinor -> printf "pr_grav(%s,%s,%s," p m w | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana | Aux_Vector | Aux_Tensor_1 -> printf "(" | Aux_Col_Scalar | Aux_Col_Vector | Aux_Col_Tensor_1 -> printf "%s * (" minus_third | Only_Insertion -> printf "(" let print_projector f p m gamma = let minus_third = "(-1.0_" ^ !kind ^ "/3.0_" ^ !kind ^ ")" in match CM.propagator f with | Prop_Scalar -> printf "pj_phi(%s,%s," m gamma | Prop_Col_Scalar -> printf "%s * pj_phi(%s,%s," minus_third m gamma | Prop_Ghost -> printf "(0,1) * pj_phi(%s,%s," m gamma | Prop_Spinor -> printf "%s(%s,%s,%s," Fermions.psi_projector p m gamma | Prop_ConjSpinor -> printf "%s(%s,%s,%s," Fermions.psibar_projector p m gamma | Prop_Majorana -> printf "%s(%s,%s,%s," Fermions.chi_projector p m gamma | Prop_Col_Majorana -> printf "%s * %s(%s,%s,%s," minus_third Fermions.chi_projector p m gamma | Prop_Unitarity -> printf "pj_unitarity(%s,%s,%s," p m gamma | Prop_Col_Unitarity -> printf "%s * pj_unitarity(%s,%s,%s," minus_third p m gamma | Prop_Feynman | Prop_Col_Feynman -> invalid_arg "no on-shell Feynman propagator!" | Prop_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!" | Prop_Rxi _ -> invalid_arg "no on-shell Rxi propagator!" | Prop_Vectorspinor -> printf "pj_grav(%s,%s,%s," p m gamma | Prop_Tensor_2 -> printf "pj_tensor(%s,%s,%s," p m gamma | Prop_Tensor_pure -> invalid_arg "no on-shell pure Tensor propagator!" | Prop_Vector_pure -> invalid_arg "no on-shell pure Vector propagator!" | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana | Aux_Vector | Aux_Tensor_1 -> printf "(" | Aux_Col_Scalar | Aux_Col_Vector | Aux_Col_Tensor_1 -> printf "%s * (" minus_third | Only_Insertion -> printf "(" let print_gauss f p m gamma = let minus_third = "(-1.0_" ^ !kind ^ "/3.0_" ^ !kind ^ ")" in match CM.propagator f with | Prop_Scalar -> printf "pg_phi(%s,%s,%s," p m gamma | Prop_Ghost -> printf "(0,1) * pg_phi(%s,%s,%s," p m gamma | Prop_Spinor -> printf "%s(%s,%s,%s," Fermions.psi_projector p m gamma | Prop_ConjSpinor -> printf "%s(%s,%s,%s," Fermions.psibar_projector p m gamma | Prop_Majorana -> printf "%s(%s,%s,%s," Fermions.chi_projector p m gamma | Prop_Col_Majorana -> printf "%s * %s(%s,%s,%s," minus_third Fermions.chi_projector p m gamma | Prop_Unitarity -> printf "pg_unitarity(%s,%s,%s," p m gamma | Prop_Feynman | Prop_Col_Feynman -> invalid_arg "no on-shell Feynman propagator!" | Prop_Gauge _ -> invalid_arg "no on-shell massless gauge propagator!" | Prop_Rxi _ -> invalid_arg "no on-shell Rxi propagator!" | Prop_Tensor_2 -> printf "pg_tensor(%s,%s,%s," p m gamma | Prop_Tensor_pure -> invalid_arg "no pure tensor propagator!" | Prop_Vector_pure -> invalid_arg "no pure vector propagator!" | Aux_Scalar | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana | Aux_Vector | Aux_Tensor_1 -> printf "(" | Only_Insertion -> printf "(" | _ -> invalid_arg "targets:print_gauss: not available" let print_fusion_diagnostics amplitude dictionary fusion = if warn diagnose_gauge then begin let lhs = F.lhs fusion in let f = F.flavor lhs and v = variable lhs and p = momentum lhs in let mass = CM.mass_symbol f in match CM.propagator f with | Prop_Gauge _ | Prop_Feynman | Prop_Rxi _ | Prop_Unitarity -> printf " @[<2>%s =" v; List.iter (print_current amplitude dictionary) (F.rhs fusion); nl (); begin match CM.goldstone f with | None -> printf " call omega_ward_%s(\"%s\",%s,%s,%s)" (suffix diagnose_gauge) v mass p v; nl () | Some (g, phase) -> let gv = add_tag lhs (CM.flavor_symbol g ^ "_" ^ format_p lhs) in printf " call omega_slavnov_%s" (suffix diagnose_gauge); printf "(@[\"%s\",%s,%s,%s,@,%s*%s)" v mass p v (format_constant phase) gv; nl () end | _ -> () end let print_fusion amplitude dictionary fusion = let lhs = F.lhs fusion in let f = F.flavor lhs in printf " @[<2>%s =@, " (multiple_variable amplitude dictionary lhs); if F.on_shell amplitude lhs then print_projector f (momentum lhs) (CM.mass_symbol f) (CM.width_symbol f) else if F.is_gauss amplitude lhs then print_gauss f (momentum lhs) (CM.mass_symbol f) (CM.width_symbol f) else print_propagator f (momentum lhs) (CM.mass_symbol f) (CM.width_symbol f); List.iter (print_current amplitude dictionary) (F.rhs fusion); printf ")"; nl () let print_momenta seen_momenta amplitude = List.fold_left (fun seen f -> let wf = F.lhs f in let p = F.momentum_list wf in if not (PSet.mem p seen) then begin let rhs1 = List.hd (F.rhs f) in printf " %s = %s" (momentum wf) (String.concat " + " (List.map momentum (F.children rhs1))); nl () end; PSet.add p seen) seen_momenta (F.fusions amplitude) let print_fusions dictionary fusions = List.iter (fun (f, amplitude) -> print_fusion_diagnostics amplitude dictionary f; print_fusion amplitude dictionary f) fusions let print_braket amplitude dictionary name braket = let bra = F.bra braket and ket = F.ket braket in printf " @[<2>%s = %s@, + " name name; begin match Fermions.reverse_braket (CM.lorentz (F.flavor bra)) with | false -> - printf "%s*(@," (multiple_variable amplitude dictionary bra); + printf "%s*@,(" (multiple_variable amplitude dictionary bra); List.iter (print_current amplitude dictionary) ket; printf ")" | true -> - printf "(@,"; + printf "@,("; List.iter (print_current amplitude dictionary) ket; printf ")*%s" (multiple_variable amplitude dictionary bra) end; nl () (* \begin{equation} + \label{eq:factors-of-i} \ii T = \ii^{\#\text{vertices}}\ii^{\#\text{propagators}} \cdots = \ii^{n-2}\ii^{n-3} \cdots = -\ii(-1)^n \cdots \end{equation} *) (* \begin{dubious} [tho:] we write some brakets twice using different names. Is it useful to cache them? \end{dubious} *) let print_brakets dictionary amplitude = let name = flavors_symbol (flavors amplitude) in printf " %s = 0" name; nl (); List.iter (print_braket amplitude dictionary name) (F.brakets amplitude); let n = List.length (F.externals amplitude) in if n mod 2 = 0 then begin printf " @[<2>%s =@, - %s ! %d vertices, %d propagators" name name (n - 2) (n - 3); nl () end else begin printf " ! %s = %s ! %d vertices, %d propagators" name name (n - 2) (n - 3); nl () end; let s = F.symmetry amplitude in if s > 1 then printf " @[<2>%s =@, %s@, / sqrt(%d.0_%s) ! symmetry factor" name name s !kind else printf " ! unit symmetry factor"; nl () let print_incoming wf = let p = momentum wf and s = spin wf and f = F.flavor wf in let m = CM.mass_symbol f in match CM.lorentz f with | Scalar -> printf "1" | BRS Scalar -> printf "(0,-1) * (%s * %s - %s**2)" p p m | Spinor -> printf "%s (%s, - %s, %s)" Fermions.psi_incoming m p s | BRS Spinor -> printf "%s (%s, - %s, %s)" Fermions.brs_psi_incoming m p s | ConjSpinor -> printf "%s (%s, - %s, %s)" Fermions.psibar_incoming m p s | BRS ConjSpinor -> printf "%s (%s, - %s, %s)" Fermions.brs_psibar_incoming m p s | Majorana -> printf "%s (%s, - %s, %s)" Fermions.chi_incoming m p s | Maj_Ghost -> printf "ghost (%s, - %s, %s)" m p s | BRS Majorana -> printf "%s (%s, - %s, %s)" Fermions.brs_chi_incoming m p s | Vector | Massive_Vector -> printf "eps (%s, - %s, %s)" m p s (*i | Ward_Vector -> printf "%s" p i*) | BRS Vector | BRS Massive_Vector -> printf "(0,1) * (%s * %s - %s**2) * eps (%s, -%s, %s)" p p m m p s | Vectorspinor | BRS Vectorspinor -> printf "%s (%s, - %s, %s)" Fermions.grav_incoming m p s | Tensor_1 -> invalid_arg "Tensor_1 only internal" | Tensor_2 -> printf "eps2 (%s, - %s, %s)" m p s | _ -> invalid_arg "no such BRST transformations" let print_outgoing wf = let p = momentum wf and s = spin wf and f = F.flavor wf in let m = CM.mass_symbol f in match CM.lorentz f with | Scalar -> printf "1" | BRS Scalar -> printf "(0,-1) * (%s * %s - %s**2)" p p m | Spinor -> printf "%s (%s, %s, %s)" Fermions.psi_outgoing m p s | BRS Spinor -> printf "%s (%s, %s, %s)" Fermions.brs_psi_outgoing m p s | ConjSpinor -> printf "%s (%s, %s, %s)" Fermions.psibar_outgoing m p s | BRS ConjSpinor -> printf "%s (%s, %s, %s)" Fermions.brs_psibar_outgoing m p s | Majorana -> printf "%s (%s, %s, %s)" Fermions.chi_outgoing m p s | BRS Majorana -> printf "%s (%s, %s, %s)" Fermions.brs_chi_outgoing m p s | Maj_Ghost -> printf "ghost (%s, %s, %s)" m p s | Vector | Massive_Vector -> printf "conjg (eps (%s, %s, %s))" m p s (*i | Ward_Vector -> printf "%s" p i*) | BRS Vector | BRS Massive_Vector -> printf "(0,1) * (%s*%s-%s**2) * (conjg (eps (%s, %s, %s)))" p p m m p s | Vectorspinor | BRS Vectorspinor -> printf "%s (%s, %s, %s)" Fermions.grav_incoming m p s | Tensor_1 -> invalid_arg "Tensor_1 only internal" | Tensor_2 -> printf "conjg (eps2 (%s, %s, %s))" m p s | BRS _ -> invalid_arg "no such BRST transformations" (*i unused value let twice_spin wf = match CM.lorentz (F.flavor wf) with | Scalar | BRS Scalar -> "0" | Spinor | ConjSpinor | Majorana | Maj_Ghost | Vectorspinor | BRS Spinor | BRS ConjSpinor | BRS Majorana | BRS Vectorspinor -> "1" | Vector | BRS Vector | Massive_Vector | BRS Massive_Vector -> "2" | Tensor_1 -> "2" | Tensor_2 -> "4" | BRS _ -> invalid_arg "Targets.twice_spin: no such BRST transformation" i*) (*i unused value let print_argument_diagnostics amplitude = let externals = (F.externals amplitude) in let n = List.length externals and masses = List.map (fun wf -> CM.mass_symbol (F.flavor wf)) externals in if warn diagnose_arguments then begin printf " call omega_check_arguments_%s (%d, k)" (suffix diagnose_arguments) n; nl () end; if warn diagnose_momenta then begin printf " @[<2>call omega_check_momenta_%s ((/ " (suffix diagnose_momenta); print_list masses; printf " /), k)"; nl () end i*) let print_external_momenta amplitude = let externals = List.combine (F.externals amplitude) (List.map (fun _ -> true) (F.incoming amplitude) @ List.map (fun _ -> false) (F.outgoing amplitude)) in List.iter (fun (wf, incoming) -> if incoming then printf " %s = - k(:,%d) ! incoming" (momentum wf) (ext_momentum wf) else printf " %s = k(:,%d) ! outgoing" (momentum wf) (ext_momentum wf); nl ()) externals let print_externals seen_wfs amplitude = let externals = List.combine (F.externals amplitude) (List.map (fun _ -> true) (F.incoming amplitude) @ List.map (fun _ -> false) (F.outgoing amplitude)) in List.fold_left (fun seen (wf, incoming) -> if not (WFSet.mem wf seen) then begin printf " @[<2>%s =@, " (variable wf); (if incoming then print_incoming else print_outgoing) wf; nl () end; WFSet.add wf seen) seen_wfs externals (*i unused value let flavors_to_string flavors = String.concat " " (List.map CM.flavor_to_string flavors) i*) (*i unused value let process_to_string amplitude = flavors_to_string (F.incoming amplitude) ^ " -> " ^ flavors_to_string (F.outgoing amplitude) i*) let flavors_sans_color_to_string flavors = String.concat " " (List.map M.flavor_to_string flavors) let process_sans_color_to_string (fin, fout) = flavors_sans_color_to_string fin ^ " -> " ^ flavors_sans_color_to_string fout let print_fudge_factor amplitude = let name = flavors_symbol (flavors amplitude) in List.iter (fun wf -> let p = momentum wf and f = F.flavor wf in match CM.width f with | Fudged -> let m = CM.mass_symbol f and w = CM.width_symbol f in printf " if (%s > 0.0_%s) then" w !kind; nl (); printf " @[<2>%s = %s@ * (%s*%s - %s**2)" name name p p m; printf "@ / cmplx (%s*%s - %s**2, %s*%s, kind=%s)" p p m m w !kind; nl (); printf " end if"; nl () | _ -> ()) (F.s_channel amplitude) let num_helicities amplitudes = List.length (CF.helicities amplitudes) (* \thocwmodulesubsection{Spin, Flavor \&\ Color Tables} *) (* The following abomination is required to keep the number of continuation lines as low as possible. FORTRAN77-style \texttt{DATA} statements are actually a bit nicer here, but they are nor available for \emph{constant} arrays. *) (* \begin{dubious} We used to have a more elegant design with a sentinel~0 added to each initializer, but some revisions of the Compaq/Digital Compiler have a bug that causes it to reject this variant. \end{dubious} *) (* \begin{dubious} The actual table writing code using \texttt{reshape} should be factored, since it's the same algorithm every time. \end{dubious} *) let print_integer_parameter name value = printf " @[<2>integer, parameter :: %s = %d" name value; nl () let print_real_parameter name value = printf " @[<2>real(kind=%s), parameter :: %s = %d" !kind name value; nl () let print_logical_parameter name value = printf " @[<2>logical, parameter :: %s = .%s." name (if value then "true" else "false"); nl () let num_particles_in amplitudes = match CF.flavors amplitudes with | [] -> 0 | (fin, _) :: _ -> List.length fin let num_particles_out amplitudes = match CF.flavors amplitudes with | [] -> 0 | (_, fout) :: _ -> List.length fout let num_particles amplitudes = match CF.flavors amplitudes with | [] -> 0 | (fin, fout) :: _ -> List.length fin + List.length fout module CFlow = Color.Flow let num_color_flows amplitudes = List.length (CF.color_flows amplitudes) let num_color_indices_default = 2 (* Standard model *) let num_color_indices amplitudes = try CFlow.rank (List.hd (CF.color_flows amplitudes)) with _ -> num_color_indices_default let color_to_string c = "(" ^ (String.concat "," (List.map (Printf.sprintf "%3d") c)) ^ ")" let cflow_to_string cflow = String.concat " " (List.map color_to_string (CFlow.in_to_lists cflow)) ^ " -> " ^ String.concat " " (List.map color_to_string (CFlow.out_to_lists cflow)) let protected = ", protected" (* Fortran 2003! *) (*i unused value let print_spin_table_old abbrev name = function | [] -> printf " @[<2>integer, dimension(n_prt,0) ::"; printf "@ table_spin_%s" name; nl () | _ :: tuples' as tuples -> ignore (List.fold_left (fun i (tuple1, tuple2) -> printf " @[<2>integer, dimension(n_prt), parameter, private ::"; printf "@ %s%04d = (/ %s /)" abbrev i (String.concat ", " (List.map (Printf.sprintf "%2d") (tuple1 @ tuple2))); nl (); succ i) 1 tuples); printf " @[<2>integer, dimension(n_prt,n_hel), parameter ::"; printf "@ table_spin_%s =@ reshape ( (/" name; printf "@ %s%04d" abbrev 1; ignore (List.fold_left (fun i tuple -> printf ",@ %s%04d" abbrev i; succ i) 2 tuples'); printf "@ /), (/ n_prt, n_hel /) )"; nl () i*) let print_spin_table name tuples = printf " @[<2>integer, dimension(n_prt,n_hel), save%s :: table_spin_%s" protected name; nl (); match tuples with | [] -> () | _ -> ignore (List.fold_left (fun i (tuple1, tuple2) -> printf " @[<2>data table_spin_%s(:,%4d) / %s /" name i (String.concat ", " (List.map (Printf.sprintf "%2d") (tuple1 @ tuple2))); nl (); succ i) 1 tuples) let print_spin_tables amplitudes = (* [print_spin_table_old "s" "states_old" (CF.helicities amplitudes);] *) print_spin_table "states" (CF.helicities amplitudes); nl () (*i unused value let print_flavor_table_old n abbrev name = function | [] -> printf " @[<2>integer, dimension(n_prt,0) ::"; printf "@ table_flavor_%s" name; nl () | _ :: tuples' as tuples -> ignore (List.fold_left (fun i tuple -> printf " @[<2>integer, dimension(n_prt), parameter, private ::"; printf "@ %s%04d = (/ %s /) ! %s" abbrev i (String.concat ", " (List.map (fun f -> Printf.sprintf "%3d" (M.pdg f)) tuple)) (String.concat " " (List.map M.flavor_to_string tuple)); nl (); succ i) 1 tuples); printf " @[<2>integer, dimension(n_prt,n_flv), parameter ::"; printf "@ table_flavor_%s =@ reshape ( (/" name; printf "@ %s%04d" abbrev 1; ignore (List.fold_left (fun i tuple -> printf ",@ %s%04d" abbrev i; succ i) 2 tuples'); printf "@ /), (/ n_prt, n_flv /) )"; nl () i*) let print_flavor_table name tuples = printf " @[<2>integer, dimension(n_prt,n_flv), save%s :: table_flavor_%s" protected name; nl (); match tuples with | [] -> () | _ -> ignore (List.fold_left (fun i tuple -> printf " @[<2>data table_flavor_%s(:,%4d) / %s / ! %s" name i (String.concat ", " (List.map (fun f -> Printf.sprintf "%3d" (M.pdg f)) tuple)) (String.concat " " (List.map M.flavor_to_string tuple)); nl (); succ i) 1 tuples) let print_flavor_tables amplitudes = (* [let n = num_particles amplitudes in] *) (* [print_flavor_table_old n "f" "states_old" (List.map (fun (fin, fout) -> fin @ fout) (CF.flavors amplitudes));] *) print_flavor_table "states" (List.map (fun (fin, fout) -> fin @ fout) (CF.flavors amplitudes)); nl () let num_flavors amplitudes = List.length (CF.flavors amplitudes) (*i unused value let print_color_flows_table_old abbrev = function | [] -> printf " @[<2>integer, dimension(n_cindex, n_prt, n_cflow) ::"; printf "@ table_color_flows"; nl () | _ :: tuples' as tuples -> ignore (List.fold_left (fun i tuple -> printf " @[<2>integer, dimension(n_cindex, n_prt), parameter, private ::"; printf "@ %s%04d = reshape ( (/ " abbrev i; begin match CFlow.to_lists tuple with | [] -> () | cf1 :: cfn -> printf "@ %s" (String.concat "," (List.map string_of_int cf1)); List.iter (function cf -> printf ",@ %s" (String.concat "," (List.map string_of_int cf))) cfn end; printf "@ /),@ (/ n_cindex, n_prt /) )"; nl (); succ i) 1 tuples); printf " @[<2>integer, dimension(n_cindex, n_prt, n_cflow), parameter ::"; printf "@ table_color_flows_old =@ reshape ( (/"; printf "@ %s%04d" abbrev 1; ignore (List.fold_left (fun i tuple -> printf ",@ %s%04d" abbrev i; succ i) 2 tuples'); printf "@ /),@ (/ n_cindex, n_prt, n_cflow /) )"; nl () i*) (*i unused value let print_ghost_flags_table_old abbrev = function | [] -> printf " @[<2>logical, dimension(n_prt, n_cflow) ::"; printf "@ table_ghost_flags"; nl () | _ :: tuples' as tuples -> ignore (List.fold_left (fun i tuple -> printf " @[<2>logical, dimension(n_prt), parameter, private ::"; printf "@ %s%04d = (/ " abbrev i; begin match CFlow.ghost_flags tuple with | [] -> () | gf1 :: gfn -> printf "@ %s" (if gf1 then "T" else "F"); List.iter (function gf -> printf ",@ %s" (if gf then "T" else "F")) gfn end; printf "@ /)"; nl (); succ i) 1 tuples); printf " @[<2>logical, dimension(n_prt, n_cflow), parameter ::"; printf "@ table_ghost_flags_old =@ reshape ( (/"; printf "@ %s%04d" abbrev 1; ignore (List.fold_left (fun i tuple -> printf ",@ %s%04d" abbrev i; succ i) 2 tuples'); printf "@ /),@ (/ n_prt, n_cflow /) )"; nl () i*) let print_color_flows_table tuples = printf " @[<2>integer, dimension(n_cindex,n_prt,n_cflow), save%s :: table_color_flows" protected; nl (); match tuples with | [] -> () | _ :: _ as tuples -> ignore (List.fold_left (fun i tuple -> begin match CFlow.to_lists tuple with | [] -> () | cf1 :: cfn -> printf " @[<2>data table_color_flows(:,:,%4d) /" i; printf "@ %s" (String.concat "," (List.map string_of_int cf1)); List.iter (function cf -> printf ",@ %s" (String.concat "," (List.map string_of_int cf))) cfn; printf "@ /"; nl () end; succ i) 1 tuples) let print_ghost_flags_table tuples = printf " @[<2>logical, dimension(n_prt,n_cflow), save%s :: table_ghost_flags" protected; nl (); match tuples with | [] -> () | _ -> ignore (List.fold_left (fun i tuple -> begin match CFlow.ghost_flags tuple with | [] -> () | gf1 :: gfn -> printf " @[<2>data table_ghost_flags(:,%4d) /" i; printf "@ %s" (if gf1 then "T" else "F"); List.iter (function gf -> printf ",@ %s" (if gf then "T" else "F")) gfn; printf " /"; nl () end; succ i) 1 tuples) let format_power_of x { Color.Flow.num = num; Color.Flow.den = den; Color.Flow.power = pwr } = match num, den, pwr with | _, 0, _ -> invalid_arg "format_power_of: zero denominator" | 0, _, _ -> "+zero" | 1, 1, 0 | -1, -1, 0 -> "+one" | -1, 1, 0 | 1, -1, 0 -> "-one" | 1, 1, 1 | -1, -1, 1 -> "+" ^ x | -1, 1, 1 | 1, -1, 1 -> "-" ^ x | 1, 1, -1 | -1, -1, -1 -> "+1/" ^ x | -1, 1, -1 | 1, -1, -1 -> "-1/" ^ x | 1, 1, p | -1, -1, p -> "+" ^ (if p > 0 then "" else "1/") ^ x ^ "**" ^ string_of_int (abs p) | -1, 1, p | 1, -1, p -> "-" ^ (if p > 0 then "" else "1/") ^ x ^ "**" ^ string_of_int (abs p) | n, 1, 0 -> (if n < 0 then "-" else "+") ^ string_of_int (abs n) ^ ".0_" ^ !kind | n, d, 0 -> (if n * d < 0 then "-" else "+") ^ string_of_int (abs n) ^ ".0_" ^ !kind ^ "/" ^ string_of_int (abs d) | n, 1, 1 -> (if n < 0 then "-" else "+") ^ string_of_int (abs n) ^ "*" ^ x | n, 1, -1 -> (if n < 0 then "-" else "+") ^ string_of_int (abs n) ^ "/" ^ x | n, d, 1 -> (if n * d < 0 then "-" else "+") ^ string_of_int (abs n) ^ ".0_" ^ !kind ^ "/" ^ string_of_int (abs d) ^ "*" ^ x | n, d, -1 -> (if n * d < 0 then "-" else "+") ^ string_of_int (abs n) ^ ".0_" ^ !kind ^ "/" ^ string_of_int (abs d) ^ "/" ^ x | n, 1, p -> (if n < 0 then "-" else "+") ^ string_of_int (abs n) ^ (if p > 0 then "*" else "/") ^ x ^ "**" ^ string_of_int (abs p) | n, d, p -> (if n * d < 0 then "-" else "+") ^ string_of_int (abs n) ^ ".0_" ^ !kind ^ "/" ^ string_of_int (abs d) ^ (if p > 0 then "*" else "/") ^ x ^ "**" ^ string_of_int (abs p) let format_powers_of x = function | [] -> "zero" | powers -> String.concat "" (List.map (format_power_of x) powers) (*i unused value let print_color_factor_table_old table = let n_cflow = Array.length table in let n_cfactors = ref 0 in for c1 = 0 to pred n_cflow do for c2 = 0 to pred n_cflow do match table.(c1).(c2) with | [] -> () | _ -> incr n_cfactors done done; print_integer_parameter "n_cfactors" !n_cfactors; if n_cflow <= 0 then begin printf " @[<2>type(%s), dimension(n_cfactors) ::" omega_color_factor_abbrev; printf "@ table_color_factors"; nl () end else begin printf " @[<2>type(%s), dimension(n_cfactors), parameter ::" omega_color_factor_abbrev; printf "@ table_color_factors = (/@ "; let comma = ref "" in for c1 = 0 to pred n_cflow do for c2 = 0 to pred n_cflow do match table.(c1).(c2) with | [] -> () | cf -> printf "%s@ %s(%d,%d,%s)" !comma omega_color_factor_abbrev (succ c1) (succ c2) (format_powers_of nc_parameter cf); comma := "," done done; printf "@ /)"; nl () end i*) (* \begin{dubious} We can optimize the following slightly by reusing common color factor [parameter]s. \end{dubious} *) let print_color_factor_table table = let n_cflow = Array.length table in let n_cfactors = ref 0 in for c1 = 0 to pred n_cflow do for c2 = 0 to pred n_cflow do match table.(c1).(c2) with | [] -> () | _ -> incr n_cfactors done done; print_integer_parameter "n_cfactors" !n_cfactors; printf " @[<2>type(%s), dimension(n_cfactors), save%s ::" omega_color_factor_abbrev protected; printf "@ table_color_factors"; nl (); let i = ref 1 in if n_cflow > 0 then begin for c1 = 0 to pred n_cflow do for c2 = 0 to pred n_cflow do match table.(c1).(c2) with | [] -> () | cf -> printf " @[<2>real(kind=%s), parameter, private :: color_factor_%06d = %s" !kind !i (format_powers_of nc_parameter cf); nl (); printf " @[<2>data table_color_factors(%6d) / %s(%d,%d,color_factor_%06d) /" !i omega_color_factor_abbrev (succ c1) (succ c2) !i; incr i; nl (); done done end let print_color_tables amplitudes = let cflows = CF.color_flows amplitudes and cfactors = CF.color_factors amplitudes in (* [print_color_flows_table_old "c" cflows; nl ();] *) print_color_flows_table cflows; nl (); (* [print_ghost_flags_table_old "g" cflows; nl ();] *) print_ghost_flags_table cflows; nl (); (* [print_color_factor_table_old cfactors; nl ();] *) print_color_factor_table cfactors; nl () let option_to_logical = function | Some _ -> "T" | None -> "F" (*i unused value let print_flavor_color_table_old abbrev n_flv n_cflow table = if n_flv <= 0 || n_cflow <= 0 then begin printf " @[<2>logical, dimension(n_flv, n_cflow) ::"; printf "@ flv_col_is_allowed"; nl () end else begin for c = 0 to pred n_cflow do printf " @[<2>logical, dimension(n_flv), parameter, private ::"; printf "@ %s%04d = (/@ %s" abbrev (succ c) (option_to_logical table.(0).(c)); for f = 1 to pred n_flv do printf ",@ %s" (option_to_logical table.(f).(c)) done; printf "@ /)"; nl () done; printf " @[<2>logical, dimension(n_flv, n_cflow), parameter ::"; printf "@ flv_col_is_allowed_old =@ reshape ( (/@ %s%04d" abbrev 1; for c = 1 to pred n_cflow do printf ",@ %s%04d" abbrev (succ c) done; printf "@ /),@ (/ n_flv, n_cflow /) )"; nl () end i*) let print_flavor_color_table n_flv n_cflow table = printf " @[<2>logical, dimension(n_flv, n_cflow), save%s :: @ flv_col_is_allowed" protected; nl (); if n_flv > 0 then begin for c = 0 to pred n_cflow do printf " @[<2>data flv_col_is_allowed(:,%4d) /" (succ c); printf "@ %s" (option_to_logical table.(0).(c)); for f = 1 to pred n_flv do printf ",@ %s" (option_to_logical table.(f).(c)) done; printf "@ /"; nl () done; end let print_amplitude_table a = (* [print_flavor_color_table_old "a" (num_flavors a) (List.length (CF.color_flows a)) (CF.process_table a); nl ();] *) print_flavor_color_table (num_flavors a) (List.length (CF.color_flows a)) (CF.process_table a); nl (); printf " @[<2>complex(kind=%s), dimension(n_flv, n_cflow, n_hel), save :: amp" !kind; nl (); nl () let print_helicity_selection_table () = printf " @[<2>logical, dimension(n_hel), save :: "; printf "hel_is_allowed = T"; nl (); printf " @[<2>real(kind=%s), dimension(n_hel), save :: " !kind; printf "hel_max_abs = 0"; nl (); printf " @[<2>real(kind=%s), save :: " !kind; printf "hel_sum_abs = 0, "; printf "hel_threshold = 1E10"; nl (); printf " @[<2>integer, save :: "; printf "hel_count = 0, "; printf "hel_cutoff = 100"; nl (); printf " @[<2>integer :: "; printf "i"; nl (); printf " @[<2>integer, save, dimension(n_hel) :: "; printf "hel_map = (/(i, i = 1, n_hel)/)"; nl (); printf " @[<2>integer, save :: hel_finite = n_hel"; nl (); nl () (* \thocwmodulesubsection{Optional MD5 sum function} *) let print_md5sum_functions = function | Some s -> printf " @[<5>"; if !fortran95 then printf "pure "; printf "function md5sum ()"; nl (); printf " character(len=32) :: md5sum"; nl (); printf " ! DON'T EVEN THINK of modifying the following line!"; nl (); printf " md5sum = \"%s\"" s; nl (); printf " end function md5sum"; nl (); nl () | None -> () (* \thocwmodulesubsection{Maintenance \&\ Inquiry Functions} *) let print_maintenance_functions () = if !whizard then begin printf " subroutine init (par, scheme)"; nl (); printf " real(kind=%s), dimension(*), intent(in) :: par" !kind; nl (); printf " integer, intent(in) :: scheme"; nl (); printf " call import_from_whizard (par, scheme)"; nl (); printf " end subroutine init"; nl (); nl (); printf " subroutine final ()"; nl (); printf " end subroutine final"; nl (); nl (); printf " subroutine update_alpha_s (alpha_s)"; nl (); printf " real(kind=%s), intent(in) :: alpha_s" !kind; nl (); printf " call model_update_alpha_s (alpha_s)"; nl (); printf " end subroutine update_alpha_s"; nl (); nl () end let print_inquiry_function_openmp () = begin printf " pure function openmp_supported () result (status)"; nl (); printf " logical :: status"; nl (); printf " status = %s" (if !openmp then ".true." else ".false."); nl (); printf " end function openmp_supported"; nl (); nl () end (*i unused value let print_inquiry_function_declarations name = printf " @[<2>public :: number_%s,@ %s" name name; nl () i*) (*i unused value let print_numeric_inquiry_functions () = printf " @[<5>"; if !fortran95 then printf "pure "; printf "function number_particles_in () result (n)"; nl (); printf " integer :: n"; nl (); printf " n = n_in"; nl (); printf " end function number_particles_in"; nl (); nl (); printf " @[<5>"; if !fortran95 then printf "pure "; printf "function number_particles_out () result (n)"; nl (); printf " integer :: n"; nl (); printf " n = n_out"; nl (); printf " end function number_particles_out"; nl (); nl () i*) let print_numeric_inquiry_functions (f, v) = printf " @[<5>"; if !fortran95 then printf "pure "; printf "function %s () result (n)" f; nl (); printf " integer :: n"; nl (); printf " n = %s" v; nl (); printf " end function %s" f; nl (); nl () let print_inquiry_functions name = printf " @[<5>"; if !fortran95 then printf "pure "; printf "function number_%s () result (n)" name; nl (); printf " integer :: n"; nl (); printf " n = size (table_%s, dim=2)" name; nl (); printf " end function number_%s" name; nl (); nl (); printf " @[<5>"; if !fortran95 then printf "pure "; printf "subroutine %s (a)" name; nl (); printf " integer, dimension(:,:), intent(out) :: a"; nl (); printf " a = table_%s" name; nl (); printf " end subroutine %s" name; nl (); nl () let print_color_flows () = printf " @[<5>"; if !fortran95 then printf "pure "; printf "function number_color_indices () result (n)"; nl (); printf " integer :: n"; nl (); printf " n = size (table_color_flows, dim=1)"; nl (); printf " end function number_color_indices"; nl (); nl (); printf " @[<5>"; if !fortran95 then printf "pure "; printf "function number_color_flows () result (n)"; nl (); printf " integer :: n"; nl (); printf " n = size (table_color_flows, dim=3)"; nl (); printf " end function number_color_flows"; nl (); nl (); printf " @[<5>"; if !fortran95 then printf "pure "; printf "subroutine color_flows (a, g)"; nl (); printf " integer, dimension(:,:,:), intent(out) :: a"; nl (); printf " logical, dimension(:,:), intent(out) :: g"; nl (); printf " a = table_color_flows"; nl (); printf " g = table_ghost_flags"; nl (); printf " end subroutine color_flows"; nl (); nl () let print_color_factors () = printf " @[<5>"; if !fortran95 then printf "pure "; printf "function number_color_factors () result (n)"; nl (); printf " integer :: n"; nl (); printf " n = size (table_color_factors)"; nl (); printf " end function number_color_factors"; nl (); nl (); printf " @[<5>"; if !fortran95 then printf "pure "; printf "subroutine color_factors (cf)"; nl (); printf " type(%s), dimension(:), intent(out) :: cf" omega_color_factor_abbrev; nl (); printf " cf = table_color_factors"; nl (); printf " end subroutine color_factors"; nl (); nl (); printf " @[<5>"; if !fortran95 && pure_unless_openmp then printf "pure "; printf "function color_sum (flv, hel) result (amp2)"; nl (); printf " integer, intent(in) :: flv, hel"; nl (); printf " real(kind=%s) :: amp2" !kind; nl (); printf " amp2 = real (omega_color_sum (flv, hel, amp, table_color_factors))"; nl (); printf " end function color_sum"; nl (); nl () let print_dispatch_functions () = printf " @[<5>"; printf "subroutine new_event (p)"; nl (); printf " real(kind=%s), dimension(0:3,*), intent(in) :: p" !kind; nl (); printf " logical :: mask_dirty"; nl (); printf " integer :: hel"; nl (); printf " call calculate_amplitudes (amp, p, hel_is_allowed)"; nl (); printf " if ((hel_threshold .gt. 0) .and. (hel_count .le. hel_cutoff)) then"; nl (); printf " call @[<3>omega_update_helicity_selection@ (hel_count,@ amp,@ "; printf "hel_max_abs,@ hel_sum_abs,@ hel_is_allowed,@ hel_threshold,@ hel_cutoff,@ mask_dirty)"; nl (); printf " if (mask_dirty) then"; nl (); printf " hel_finite = 0"; nl (); printf " do hel = 1, n_hel"; nl (); printf " if (hel_is_allowed(hel)) then"; nl (); printf " hel_finite = hel_finite + 1"; nl (); printf " hel_map(hel_finite) = hel"; nl (); printf " end if"; nl (); printf " end do"; nl (); printf " end if"; nl (); printf " end if"; nl (); printf " end subroutine new_event"; nl (); nl (); printf " @[<5>"; printf "subroutine reset_helicity_selection (threshold, cutoff)"; nl (); printf " real(kind=%s), intent(in) :: threshold" !kind; nl (); printf " integer, intent(in) :: cutoff"; nl (); printf " integer :: i"; nl (); printf " hel_is_allowed = T"; nl (); printf " hel_max_abs = 0"; nl (); printf " hel_sum_abs = 0"; nl (); printf " hel_count = 0"; nl (); printf " hel_threshold = threshold"; nl (); printf " hel_cutoff = cutoff"; nl (); printf " hel_map = (/(i, i = 1, n_hel)/)"; nl (); printf " hel_finite = n_hel"; nl (); printf " end subroutine reset_helicity_selection"; nl (); nl (); printf " @[<5>"; if !fortran95 then printf "pure "; printf "function is_allowed (flv, hel, col) result (yorn)"; nl (); printf " logical :: yorn"; nl (); printf " integer, intent(in) :: flv, hel, col"; nl (); printf " yorn = hel_is_allowed(hel) .and. "; printf "flv_col_is_allowed(flv,col)"; nl (); printf " end function is_allowed"; nl (); nl (); printf " @[<5>"; if !fortran95 then printf "pure "; printf "function get_amplitude (flv, hel, col) result (amp_result)"; nl (); printf " complex(kind=%s) :: amp_result" !kind; nl (); printf " integer, intent(in) :: flv, hel, col"; nl (); printf " amp_result = amp(flv, col, hel)"; nl (); printf " end function get_amplitude"; nl (); nl () (* \thocwmodulesubsection{Main Function} *) let format_power_of_nc { Color.Flow.num = num; Color.Flow.den = den; Color.Flow.power = pwr } = match num, den, pwr with | _, 0, _ -> invalid_arg "format_power_of_nc: zero denominator" | 0, _, _ -> "" | 1, 1, 0 | -1, -1, 0 -> "+ 1" | -1, 1, 0 | 1, -1, 0 -> "- 1" | 1, 1, 1 | -1, -1, 1 -> "+ N" | -1, 1, 1 | 1, -1, 1 -> "- N" | 1, 1, -1 | -1, -1, -1 -> "+ 1/N" | -1, 1, -1 | 1, -1, -1 -> "- 1/N" | 1, 1, p | -1, -1, p -> "+ " ^ (if p > 0 then "" else "1/") ^ "N^" ^ string_of_int (abs p) | -1, 1, p | 1, -1, p -> "- " ^ (if p > 0 then "" else "1/") ^ "N^" ^ string_of_int (abs p) | n, 1, 0 -> (if n < 0 then "- " else "+ ") ^ string_of_int (abs n) | n, d, 0 -> (if n * d < 0 then "- " else "+ ") ^ string_of_int (abs n) ^ "/" ^ string_of_int (abs d) | n, 1, 1 -> (if n < 0 then "- " else "+ ") ^ string_of_int (abs n) ^ "N" | n, 1, -1 -> (if n < 0 then "- " else "+ ") ^ string_of_int (abs n) ^ "/N" | n, d, 1 -> (if n * d < 0 then "- " else "+ ") ^ string_of_int (abs n) ^ "/" ^ string_of_int (abs d) ^ "N" | n, d, -1 -> (if n * d < 0 then "- " else "+ ") ^ string_of_int (abs n) ^ "/" ^ string_of_int (abs d) ^ "/N" | n, 1, p -> (if n < 0 then "- " else "+ ") ^ string_of_int (abs n) ^ (if p > 0 then "*" else "/") ^ "N^" ^ string_of_int (abs p) | n, d, p -> (if n * d < 0 then "- " else "+ ") ^ string_of_int (abs n) ^ "/" ^ string_of_int (abs d) ^ (if p > 0 then "*" else "/") ^ "N^" ^ string_of_int (abs p) let format_powers_of_nc = function | [] -> "0" | powers -> String.concat " " (List.map format_power_of_nc powers) let print_description cmdline amplitudes () = printf "! File generated automatically by O'Mega %s %s %s" Config.version Config.status Config.date; nl (); printf "!"; nl (); printf "! %s" cmdline; nl (); printf "!"; nl (); printf "! with all scattering amplitudes for the process(es)"; nl (); printf "!"; nl (); printf "! flavor combinations:"; nl (); printf "!"; nl (); ThoList.iteri (fun i process -> printf "! %3d: %s" i (process_sans_color_to_string process); nl ()) 1 (CF.flavors amplitudes); printf "!"; nl (); printf "! color flows:"; nl (); if not !amp_triv then begin printf "!"; nl (); ThoList.iteri (fun i cflow -> printf "! %3d: %s" i (cflow_to_string cflow); nl ()) 1 (CF.color_flows amplitudes); printf "!"; nl (); printf "! NB: i.g. not all color flows contribute to all flavor"; nl (); printf "! combinations. Consult the array FLV_COL_IS_ALLOWED"; nl (); printf "! below for the allowed combinations."; nl (); end; printf "!"; nl (); printf "! Color Factors:"; nl (); printf "!"; nl (); if not !amp_triv then begin let cfactors = CF.color_factors amplitudes in for c1 = 0 to pred (Array.length cfactors) do for c2 = 0 to c1 do match cfactors.(c1).(c2) with | [] -> () | cfactor -> printf "! (%3d,%3d): %s" (succ c1) (succ c2) (format_powers_of_nc cfactor); nl () done done; end; printf "!"; nl (); printf "! vanishing or redundant flavor combinations:"; nl (); printf "!"; nl (); List.iter (fun process -> printf "! %s" (process_sans_color_to_string process); nl ()) (CF.vanishing_flavors amplitudes); printf "!"; nl (); begin match CF.constraints amplitudes with | None -> () | Some s -> printf "! diagram selection (MIGHT BREAK GAUGE INVARIANCE!!!):"; nl (); printf "!"; nl (); printf "! %s" s; nl (); printf "!"; nl () end; printf "!"; nl () (* \thocwmodulesubsection{Printing Modules} *) type accessibility = | Public | Private | Protected (* Fortran 2003 *) let accessibility_to_string = function | Public -> "public" | Private -> "private" | Protected -> "protected" type used_symbol = | As_Is of string | Aliased of string * string let print_used_symbol = function | As_Is name -> printf "%s" name | Aliased (orig, alias) -> printf "%s => %s" alias orig type used_module = | Full of string | Full_Aliased of string * (string * string) list | Subset of string * used_symbol list let print_used_module = function | Full name | Full_Aliased (name, []) | Subset (name, []) -> printf " use %s" name; nl () | Full_Aliased (name, aliases) -> printf " @[<5>use %s" name; List.iter (fun (orig, alias) -> printf ", %s => %s" alias orig) aliases; nl () | Subset (name, used_symbol :: used_symbols) -> printf " @[<5>use %s, only: " name; print_used_symbol used_symbol; List.iter (fun s -> printf ", "; print_used_symbol s) used_symbols; nl () type fortran_module = { module_name : string; default_accessibility : accessibility; used_modules : used_module list; public_symbols : string list; print_declarations : (unit -> unit) list; print_implementations : (unit -> unit) list } let print_public = function | name1 :: names -> printf " @[<2>public :: %s" name1; List.iter (fun n -> printf ",@ %s" n) names; nl () | [] -> () (*i unused value let print_public_interface generic procedures = printf " public :: %s" generic; nl (); begin match procedures with | name1 :: names -> printf " interface %s" generic; nl (); printf " @[<2>module procedure %s" name1; List.iter (fun n -> printf ",@ %s" n) names; nl (); printf " end interface"; nl (); print_public procedures | [] -> () end i*) let print_module m = printf "module %s" m.module_name; nl (); List.iter print_used_module m.used_modules; printf " implicit none"; nl (); printf " %s" (accessibility_to_string m.default_accessibility); nl (); print_public m.public_symbols; nl (); begin match m.print_declarations with | [] -> () | print_declarations -> List.iter (fun f -> f ()) print_declarations; nl () end; begin match m.print_implementations with | [] -> () | print_implementations -> printf "contains"; nl (); nl (); List.iter (fun f -> f ()) print_implementations; nl (); end; printf "end module %s" m.module_name; nl () let print_modules modules = List.iter print_module modules; print_flush () let module_to_file line_length oc prelude m = output_string oc (m.module_name ^ "\n"); let filename = m.module_name ^ ".f90" in let channel = open_out filename in Format_Fortran.set_formatter_out_channel ~width:line_length channel; prelude (); print_modules [m]; close_out channel let modules_to_file line_length oc prelude = function | [] -> () | m :: mlist -> module_to_file line_length oc prelude m; List.iter (module_to_file line_length oc (fun () -> ())) mlist (* \thocwmodulesubsection{Chopping Up Amplitudes} *) let num_fusions_brakets size amplitudes = let num_fusions = max 1 size in let count_brakets = List.fold_left (fun sum process -> sum + List.length (F.brakets process)) 0 (CF.processes amplitudes) and count_processes = List.length (CF.processes amplitudes) in if count_brakets > 0 then let num_brakets = max 1 ((num_fusions * count_processes) / count_brakets) in (num_fusions, num_brakets) else (num_fusions, 1) let chop_amplitudes size amplitudes = let num_fusions, num_brakets = num_fusions_brakets size amplitudes in (ThoList.enumerate 1 (ThoList.chopn num_fusions (CF.fusions amplitudes)), ThoList.enumerate 1 (ThoList.chopn num_brakets (CF.processes amplitudes))) let print_compute_fusions1 dictionary (n, fusions) = if not !amp_triv then begin if !openmp then begin printf " subroutine compute_fusions_%04d (%s)" n openmp_tld; nl (); printf " @[<5>type(%s), intent(inout) :: %s" openmp_tld_type openmp_tld; nl (); end else begin printf " @[<5>subroutine compute_fusions_%04d ()" n; nl (); end; print_fusions dictionary fusions; printf " end subroutine compute_fusions_%04d" n; nl (); end and print_compute_brakets1 dictionary (n, processes) = if not !amp_triv then begin if !openmp then begin printf " subroutine compute_brakets_%04d (%s)" n openmp_tld; nl (); printf " @[<5>type(%s), intent(inout) :: %s" openmp_tld_type openmp_tld; nl (); end else begin printf " @[<5>subroutine compute_brakets_%04d ()" n; nl (); end; List.iter (print_brakets dictionary) processes; printf " end subroutine compute_brakets_%04d" n; nl (); end (* \thocwmodulesubsection{Common Stuff} *) let omega_public_symbols = ["number_particles_in"; "number_particles_out"; "number_color_indices"; "reset_helicity_selection"; "new_event"; "is_allowed"; "get_amplitude"; "color_sum"; "openmp_supported"] @ ThoList.flatmap (fun n -> ["number_" ^ n; n]) ["spin_states"; "flavor_states"; "color_flows"; "color_factors"] let whizard_public_symbols md5sum = ["init"; "final"; "update_alpha_s"] @ (match md5sum with Some _ -> ["md5sum"] | None -> []) let used_modules () = [Full "kinds"; Full Fermions.use_module; - Full (!module_name ^ "_ufo"); Full_Aliased ("omega_color", ["omega_color_factor", omega_color_factor_abbrev])] @ List.map (fun m -> Full m) (match !parameter_module with | "" -> !use_modules | pm -> pm :: !use_modules) let public_symbols () = if !whizard then omega_public_symbols @ (whizard_public_symbols !md5sum) else omega_public_symbols let print_constants amplitudes = printf " ! DON'T EVEN THINK of removing the following!"; nl (); printf " ! If the compiler complains about undeclared"; nl (); printf " ! or undefined variables, you are compiling"; nl (); printf " ! against an incompatible omega95 module!"; nl (); printf " @[<2>integer, dimension(%d), parameter, private :: " (List.length require_library); printf "require =@ (/ @["; print_list require_library; printf " /)"; nl (); nl (); (* Using these parameters makes sense for documentation, but in practice, there is no need to ever change them. *) List.iter (function name, value -> print_integer_parameter name (value amplitudes)) [ ("n_prt", num_particles); ("n_in", num_particles_in); ("n_out", num_particles_out); ("n_cflow", num_color_flows); (* Number of different color amplitudes. *) ("n_cindex", num_color_indices); (* Maximum rank of color tensors. *) ("n_flv", num_flavors); (* Number of different flavor amplitudes. *) ("n_hel", num_helicities) (* Number of different helicty amplitudes. *) ]; nl (); (* Abbreviations. *) printf " ! NB: you MUST NOT change the value of %s here!!!" nc_parameter; nl (); printf " ! It is defined here for convenience only and must be"; nl (); printf " ! compatible with hardcoded values in the amplitude!"; nl (); print_real_parameter nc_parameter (CM.nc ()); (* $N_C$ *) List.iter (function name, value -> print_logical_parameter name value) [ ("F", false); ("T", true) ]; nl (); print_spin_tables amplitudes; print_flavor_tables amplitudes; print_color_tables amplitudes; print_amplitude_table amplitudes; print_helicity_selection_table () let print_interface () = print_md5sum_functions !md5sum; print_maintenance_functions (); List.iter print_numeric_inquiry_functions [("number_particles_in", "n_in"); ("number_particles_out", "n_out")]; List.iter print_inquiry_functions ["spin_states"; "flavor_states"]; print_inquiry_function_openmp (); print_color_flows (); print_color_factors (); print_dispatch_functions (); nl (); (* Is this really necessary? *) Format_Fortran.switch_line_continuation false; if !km_write || !km_pure then (Targets_Kmatrix.Fortran.print !km_pure); if !km_2_write || !km_2_pure then (Targets_Kmatrix_2.Fortran.print !km_2_pure); Format_Fortran.switch_line_continuation true; nl () let print_calculate_amplitudes declarations computations amplitudes = printf " @[<5>subroutine calculate_amplitudes (amp, k, mask)"; nl (); printf " complex(kind=%s), dimension(:,:,:), intent(out) :: amp" !kind; nl (); printf " real(kind=%s), dimension(0:3,*), intent(in) :: k" !kind; nl (); printf " logical, dimension(:), intent(in) :: mask"; nl (); printf " integer, dimension(n_prt) :: s"; nl (); printf " integer :: h, hi"; nl (); declarations (); if not !amp_triv then begin begin match CF.processes amplitudes with | p :: _ -> print_external_momenta p | _ -> () end; ignore (List.fold_left print_momenta PSet.empty (CF.processes amplitudes)); end; printf " amp = 0"; nl (); if not !amp_triv then begin if num_helicities amplitudes > 0 then begin printf " if (hel_finite == 0) return"; nl (); if !openmp then begin printf "!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(s, h, %s) SCHEDULE(STATIC)" openmp_tld; nl (); end; printf " do hi = 1, hel_finite"; nl (); printf " h = hel_map(hi)"; nl (); printf " s = table_spin_states(:,h)"; nl (); ignore (List.fold_left print_externals WFSet.empty (CF.processes amplitudes)); computations (); List.iter print_fudge_factor (CF.processes amplitudes); (* This sorting should slightly improve cache locality. *) let triple_snd = fun (_, x, _) -> x in let triple_fst = fun (x, _, _) -> x in let rec builder1 flvi flowi flows = match flows with | (Some a) :: tl -> (flvi, flowi, flavors_symbol (flavors a)) :: (builder1 flvi (flowi + 1) tl) | None :: tl -> builder1 flvi (flowi + 1) tl | [] -> [] in let rec builder2 flvi flvs = match flvs with | flv :: tl -> (builder1 flvi 1 flv) @ (builder2 (flvi + 1) tl) | [] -> [] in let unsorted = builder2 1 (List.map Array.to_list (Array.to_list (CF.process_table amplitudes))) in let sorted = List.sort (fun a b -> if (triple_snd a != triple_snd b) then triple_snd a - triple_snd b else (triple_fst a - triple_fst b)) unsorted in List.iter (fun (flvi, flowi, flv) -> (printf " amp(%d,%d,h) = %s" flvi flowi flv; nl ();)) sorted; (*i printf " else"; nl (); printf " amp(:,h,:) = 0"; nl (); i*) printf " end do"; nl (); if !openmp then begin printf "!$OMP END PARALLEL DO"; nl (); end; end; end; printf " end subroutine calculate_amplitudes"; nl () let print_compute_chops chopped_fusions chopped_brakets () = List.iter (fun (i, _) -> printf " call compute_fusions_%04d (%s)" i (if !openmp then openmp_tld else ""); nl ()) chopped_fusions; List.iter (fun (i, _) -> printf " call compute_brakets_%04d (%s)" i (if !openmp then openmp_tld else ""); nl ()) chopped_brakets (* \thocwmodulesubsection{UFO Fusions} *) module VSet = Set.Make (struct type t = F.constant Coupling.t let compare = compare end) (* FIXME: can be retired starting from O'Caml 4.02.0! *) let vset_of_list list = List.fold_right VSet.add list VSet.empty let ufo_fusions_used amplitudes = let couplings = List.fold_left (fun acc p -> let fusions = ThoList.flatmap F.rhs (F.fusions p) and brakets = ThoList.flatmap F.ket (F.brakets p) in let couplings = vset_of_list (List.map F.coupling (fusions @ brakets)) in VSet.union acc couplings) VSet.empty (CF.processes amplitudes) in VSet.fold (fun v acc -> match v with - | Coupling.V3 (Coupling.UFO3 (_, v, _, _), _, _) - | Coupling.V4 (Coupling.UFO4 (_, v, _, _), _, _) - | Coupling.Vn (Coupling.UFOn (_, v, _, _), _, _) -> + | Coupling.Vn (Coupling.UFO (_, v, _, _, _), _, _) -> Sets.String.add v acc | _ -> acc) couplings Sets.String.empty (* \thocwmodulesubsection{Single Function} *) let amplitudes_to_channel_single_function cmdline oc amplitudes = let print_declarations () = print_constants amplitudes and print_implementations () = print_interface (); print_calculate_amplitudes (fun () -> print_variable_declarations amplitudes) (fun () -> print_fusions (CF.dictionary amplitudes) (CF.fusions amplitudes); List.iter (print_brakets (CF.dictionary amplitudes)) (CF.processes amplitudes)) amplitudes in let fortran_module = { module_name = !module_name; used_modules = used_modules (); default_accessibility = Private; public_symbols = public_symbols (); print_declarations = [print_declarations]; print_implementations = [print_implementations] } in Format_Fortran.set_formatter_out_channel ~width:!line_length oc; print_description cmdline amplitudes (); print_modules [fortran_module] (* \thocwmodulesubsection{Single Module} *) let amplitudes_to_channel_single_module cmdline oc size amplitudes = let print_declarations () = print_constants amplitudes; print_variable_declarations amplitudes and print_implementations () = print_interface () in let chopped_fusions, chopped_brakets = chop_amplitudes size amplitudes in let dictionary = CF.dictionary amplitudes in let print_compute_amplitudes () = print_calculate_amplitudes (fun () -> ()) (print_compute_chops chopped_fusions chopped_brakets) amplitudes and print_compute_fusions () = List.iter (print_compute_fusions1 dictionary) chopped_fusions and print_compute_brakets () = List.iter (print_compute_brakets1 dictionary) chopped_brakets in let fortran_module = { module_name = !module_name; used_modules = used_modules (); default_accessibility = Private; public_symbols = public_symbols (); print_declarations = [print_declarations]; print_implementations = [print_implementations; print_compute_amplitudes; print_compute_fusions; print_compute_brakets] } in Format_Fortran.set_formatter_out_channel ~width:!line_length oc; print_description cmdline amplitudes (); print_modules [fortran_module] (* \thocwmodulesubsection{Multiple Modules} *) let modules_of_amplitudes _ _ size amplitudes = let name = !module_name in let print_declarations () = print_constants amplitudes and print_variables () = print_variable_declarations amplitudes in let constants_module = { module_name = name ^ "_constants"; used_modules = used_modules (); default_accessibility = Public; public_symbols = []; print_declarations = [print_declarations]; print_implementations = [] } in let variables_module = { module_name = name ^ "_variables"; used_modules = used_modules (); default_accessibility = Public; public_symbols = []; print_declarations = [print_variables]; print_implementations = [] } in let dictionary = CF.dictionary amplitudes in let print_compute_fusions (n, fusions) () = if not !amp_triv then begin if !openmp then begin printf " subroutine compute_fusions_%04d (%s)" n openmp_tld; nl (); printf " @[<5>type(%s), intent(inout) :: %s" openmp_tld_type openmp_tld; nl (); end else begin printf " @[<5>subroutine compute_fusions_%04d ()" n; nl (); end; print_fusions dictionary fusions; printf " end subroutine compute_fusions_%04d" n; nl (); end in let print_compute_brakets (n, processes) () = if not !amp_triv then begin if !openmp then begin printf " subroutine compute_brakets_%04d (%s)" n openmp_tld; nl (); printf " @[<5>type(%s), intent(inout) :: %s" openmp_tld_type openmp_tld; nl (); end else begin printf " @[<5>subroutine compute_brakets_%04d ()" n; nl (); end; List.iter (print_brakets dictionary) processes; printf " end subroutine compute_brakets_%04d" n; nl (); end in let fusions_module (n, _ as fusions) = let tag = Printf.sprintf "_fusions_%04d" n in { module_name = name ^ tag; used_modules = (used_modules () @ [Full constants_module.module_name; Full variables_module.module_name]); default_accessibility = Private; public_symbols = ["compute" ^ tag]; print_declarations = []; print_implementations = [print_compute_fusions fusions] } in let brakets_module (n, _ as processes) = let tag = Printf.sprintf "_brakets_%04d" n in { module_name = name ^ tag; used_modules = (used_modules () @ [Full constants_module.module_name; Full variables_module.module_name]); default_accessibility = Private; public_symbols = ["compute" ^ tag]; print_declarations = []; print_implementations = [print_compute_brakets processes] } in let chopped_fusions, chopped_brakets = chop_amplitudes size amplitudes in let fusions_modules = List.map fusions_module chopped_fusions in let brakets_modules = List.map brakets_module chopped_brakets in let print_implementations () = print_interface (); print_calculate_amplitudes (fun () -> ()) (print_compute_chops chopped_fusions chopped_brakets) amplitudes in let public_module = { module_name = name; used_modules = (used_modules () @ [Full constants_module.module_name; Full variables_module.module_name ] @ List.map (fun m -> Full m.module_name) (fusions_modules @ brakets_modules)); default_accessibility = Private; public_symbols = public_symbols (); print_declarations = []; print_implementations = [print_implementations] } and private_modules = [constants_module; variables_module] @ fusions_modules @ brakets_modules in (public_module, private_modules) let amplitudes_to_channel_single_file cmdline oc size amplitudes = let public_module, private_modules = modules_of_amplitudes cmdline oc size amplitudes in Format_Fortran.set_formatter_out_channel ~width:!line_length oc; print_description cmdline amplitudes (); print_modules (private_modules @ [public_module]) let amplitudes_to_channel_multi_file cmdline oc size amplitudes = let public_module, private_modules = modules_of_amplitudes cmdline oc size amplitudes in modules_to_file !line_length oc (print_description cmdline amplitudes) (public_module :: private_modules) (* \thocwmodulesubsection{Dispatch} *) let amplitudes_to_channel cmdline oc diagnostics amplitudes = parse_diagnostics diagnostics; - UFO.Targets.Fortran.lorentz_module - ~only:(ufo_fusions_used amplitudes) - ~name:(!module_name ^ "_ufo") - (Format_Fortran.formatter_of_out_channel oc) (); + let ufo_fusions = + let ufo_fusions_set = ufo_fusions_used amplitudes in + if Sets.String.is_empty ufo_fusions_set then + None + else + Some ufo_fusions_set in + begin match ufo_fusions with + | Some only -> + let name = !module_name ^ "_ufo" + and fortran_module = Fermions.use_module in + use_modules := name :: !use_modules; + UFO.Targets.Fortran.lorentz_module + ~only ~name ~fortran_module + (Format_Fortran.formatter_of_out_channel oc) () + | None -> () + end; match !output_mode with | Single_Function -> amplitudes_to_channel_single_function cmdline oc amplitudes | Single_Module size -> amplitudes_to_channel_single_module cmdline oc size amplitudes | Single_File size -> amplitudes_to_channel_single_file cmdline oc size amplitudes | Multi_File size -> amplitudes_to_channel_multi_file cmdline oc size amplitudes let parameters_to_channel oc = parameters_to_fortran oc (CM.parameters ()) end module Fortran = Make_Fortran(Fortran_Fermions) (* \thocwmodulesubsection{Majorana Fermions} *) (* \begin{JR} For this function we need a different approach due to our aim of implementing the fermion vertices with the right line as ingoing (in a calculational sense) and the left line in a fusion as outgoing. In defining all external lines and the fermionic wavefunctions built out of them as ingoing we have to invert the left lines to make them outgoing. This happens by multiplying them with the inverse charge conjugation matrix in an appropriate representation and then transposing it. We must distinguish whether the direction of calculation and the physical direction of the fermion number flow are parallel or antiparallel. In the first case we can use the "normal" Feynman rules for Dirac particles, while in the second, according to the paper of Denner et al., we have to reverse the sign of the vector and antisymmetric bilinears of the Dirac spinors, cf. the [Coupling] module. Note the subtlety for the left- and righthanded couplings: Only the vector part of these couplings changes in the appropriate cases its sign, changing the chirality to the negative of the opposite. \end{JR} *) module Fortran_Majorana_Fermions : Fermions = struct open Coupling open Format let psi_type = "bispinor" let psibar_type = "bispinor" let chi_type = "bispinor" let grav_type = "vectorspinor" (* \begin{JR} Because of our rules for fermions we are going to give all incoming fermions a [u] spinor and all outgoing fermions a [v] spinor, no matter whether they are Dirac fermions, antifermions or Majorana fermions. \end{JR} *) let psi_incoming = "u" let brs_psi_incoming = "brs_u" let psibar_incoming = "u" let brs_psibar_incoming = "brs_u" let chi_incoming = "u" let brs_chi_incoming = "brs_u" let grav_incoming = "ueps" let psi_outgoing = "v" let brs_psi_outgoing = "brs_v" let psibar_outgoing = "v" let brs_psibar_outgoing = "brs_v" let chi_outgoing = "v" let brs_chi_outgoing = "brs_v" let grav_outgoing = "veps" let psi_propagator = "pr_psi" let psibar_propagator = "pr_psi" let chi_propagator = "pr_psi" let grav_propagator = "pr_grav" let psi_projector = "pj_psi" let psibar_projector = "pj_psi" let chi_projector = "pj_psi" let grav_projector = "pj_grav" let psi_gauss = "pg_psi" let psibar_gauss = "pg_psi" let chi_gauss = "pg_psi" let grav_gauss = "pg_grav" let format_coupling coeff c = match coeff with | 1 -> c | -1 -> "(-" ^ c ^")" | coeff -> string_of_int coeff ^ "*" ^ c let format_coupling_2 coeff c = match coeff with | 1 -> c | -1 -> "-" ^ c | coeff -> string_of_int coeff ^ "*" ^ c (* \begin{dubious} JR's coupling constant HACK, necessitated by tho's bad design descition. \end{dubious} *) let fastener s i = try let offset = (String.index s '(') in if ((String.get s (String.length s - 1)) != ')') then failwith "fastener: wrong usage of parentheses" else let func_name = (String.sub s 0 offset) and tail = (String.sub s (succ offset) (String.length s - offset - 2)) in if (String.contains func_name ')') || (String.contains tail '(') || (String.contains tail ')') then failwith "fastener: wrong usage of parentheses" else func_name ^ "(" ^ string_of_int i ^ "," ^ tail ^ ")" with | Not_found -> if (String.contains s ')') then failwith "fastener: wrong usage of parentheses" else s ^ "(" ^ string_of_int i ^ ")" let print_fermion_current coeff f c wf1 wf2 fusion = let c = format_coupling coeff c in match fusion with | F13 | F31 -> printf "%s_ff(%s,%s,%s)" f c wf1 wf2 | F23 | F21 -> printf "f_%sf(%s,%s,%s)" f c wf1 wf2 | F32 | F12 -> printf "f_%sf(%s,%s,%s)" f c wf2 wf1 let print_fermion_current2 coeff f c wf1 wf2 fusion = let c = format_coupling_2 coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 | F31 -> printf "%s_ff(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F23 | F21 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F32 | F12 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf2 wf1 let print_fermion_current_mom_v1 coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F31 -> printf "%s_ff(-(%s),%s,%s,%s)" f c1 c2 wf1 wf2 | F23 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf2 wf1 | F12 -> printf "f_f%s(-(%s),%s,%s,%s)" f c1 c2 wf2 wf1 | F21 -> printf "f_f%s(-(%s),%s,%s,%s)" f c1 c2 wf1 wf2 let print_fermion_current_mom_v1_chiral coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F31 -> printf "%s_ff(-(%s),-(%s),%s,%s)" f c2 c1 wf1 wf2 | F23 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf2 wf1 | F12 -> printf "f_f%s(-(%s),-(%s),%s,%s)" f c2 c1 wf2 wf1 | F21 -> printf "f_f%s(-(%s),-(%s),%s,%s)" f c2 c1 wf2 wf1 let print_fermion_current_mom_v2 coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p12 | F31 -> printf "%s_ff(-(%s),%s,%s,%s,%s)" f c1 c2 wf1 wf2 p12 | F23 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p1 | F32 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf2 wf1 p2 | F12 -> printf "f_f%s(-(%s),%s,%s,%s,%s)" f c1 c2 wf2 wf1 p2 | F21 -> printf "f_f%s(-(%s),%s,%s,%s,%s)" f c1 c2 wf1 wf2 p1 let print_fermion_current_mom_v2_chiral coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p12 | F31 -> printf "%s_ff(-(%s),-(%s),%s,%s,%s)" f c2 c1 wf2 wf1 p12 | F23 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p1 | F32 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf2 wf1 p2 | F12 -> printf "f_f%s(-(%s),-(%s),%s,%s,%s)" f c2 c1 wf1 wf2 p2 | F21 -> printf "f_f%s(-(%s),-(%s),%s,%s,%s)" f c2 c1 wf2 wf1 p1 let print_fermion_current_vector coeff f c wf1 wf2 fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_ff(%s,%s,%s)" f c wf1 wf2 | F31 -> printf "%s_ff(-%s,%s,%s)" f c wf1 wf2 | F23 -> printf "f_%sf(%s,%s,%s)" f c wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s)" f c wf2 wf1 | F12 -> printf "f_%sf(-%s,%s,%s)" f c wf2 wf1 | F21 -> printf "f_%sf(-%s,%s,%s)" f c wf1 wf2 let print_fermion_current2_vector coeff f c wf1 wf2 fusion = let c = format_coupling_2 coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F31 -> printf "%s_ff(-(%s),%s,%s,%s)" f c1 c2 wf1 wf2 | F23 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf2 wf1 | F12 -> printf "f_%sf(-(%s),%s,%s,%s)" f c1 c2 wf2 wf1 | F21 -> printf "f_%sf(-(%s),%s,%s,%s)" f c1 c2 wf1 wf2 let print_fermion_current_chiral coeff f1 f2 c wf1 wf2 fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_ff(%s,%s,%s)" f1 c wf1 wf2 | F31 -> printf "%s_ff(-%s,%s,%s)" f2 c wf1 wf2 | F23 -> printf "f_%sf(%s,%s,%s)" f1 c wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s)" f1 c wf2 wf1 | F12 -> printf "f_%sf(-%s,%s,%s)" f2 c wf2 wf1 | F21 -> printf "f_%sf(-%s,%s,%s)" f2 c wf1 wf2 let print_fermion_current2_chiral coeff f c wf1 wf2 fusion = let c = format_coupling_2 coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F31 -> printf "%s_ff(-(%s),-(%s),%s,%s)" f c2 c1 wf1 wf2 | F23 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf1 wf2 | F32 -> printf "f_%sf(%s,%s,%s,%s)" f c1 c2 wf2 wf1 | F12 -> printf "f_%sf(-(%s),-(%s),%s,%s)" f c2 c1 wf2 wf1 | F21 -> printf "f_%sf(-(%s),-(%s),%s,%s)" f c2 c1 wf1 wf2 let print_current = function | coeff, _, VA, _ -> print_fermion_current2_vector coeff "va" | coeff, _, V, _ -> print_fermion_current_vector coeff "v" | coeff, _, A, _ -> print_fermion_current coeff "a" | coeff, _, VL, _ -> print_fermion_current_chiral coeff "vl" "vr" | coeff, _, VR, _ -> print_fermion_current_chiral coeff "vr" "vl" | coeff, _, VLR, _ -> print_fermion_current2_chiral coeff "vlr" | coeff, _, SP, _ -> print_fermion_current2 coeff "sp" | coeff, _, S, _ -> print_fermion_current coeff "s" | coeff, _, P, _ -> print_fermion_current coeff "p" | coeff, _, SL, _ -> print_fermion_current coeff "sl" | coeff, _, SR, _ -> print_fermion_current coeff "sr" | coeff, _, SLR, _ -> print_fermion_current2 coeff "slr" | coeff, _, POT, _ -> print_fermion_current_vector coeff "pot" | _, _, _, _ -> invalid_arg "Targets.Fortran_Majorana_Fermions: Not needed in the models" let print_current_p = function | coeff, Psi, SL, Psi -> print_fermion_current coeff "sl" | coeff, Psi, SR, Psi -> print_fermion_current coeff "sr" | coeff, Psi, SLR, Psi -> print_fermion_current2 coeff "slr" | _, _, _, _ -> invalid_arg "Targets.Fortran_Majorana_Fermions: Not needed in the used models" let print_current_b = function | coeff, Psibar, SL, Psibar -> print_fermion_current coeff "sl" | coeff, Psibar, SR, Psibar -> print_fermion_current coeff "sr" | coeff, Psibar, SLR, Psibar -> print_fermion_current2 coeff "slr" | _, _, _, _ -> invalid_arg "Targets.Fortran_Majorana_Fermions: Not needed in the used models" (* This function is for the vertices with three particles including two fermions but also a momentum, therefore with a dimensionful coupling constant, e.g. the gravitino vertices. One has to dinstinguish between the two kinds of canonical orders in the string of gamma matrices. Of course, the direction of the string of gamma matrices is reversed if one goes from the [Gravbar, _, Psi] to the [Psibar, _, Grav] vertices, and the same is true for the couplings of the gravitino to the Majorana fermions. For more details see the tables in the [coupling] implementation. *) (* We now have to fix the directions of the momenta. For making the compiler happy and because we don't want to make constructions of infinite complexity we list the momentum including vertices without gravitinos here; the pattern matching says that's better. Perhaps we have to find a better name now. For the cases of $MOM$, $MOM5$, $MOML$ and $MOMR$ which arise only in BRST transformations we take the mass as a coupling constant. For $VMOM$ we don't need a mass either. These vertices are like kinetic terms and so need not have a coupling constant. By this we avoid a strange and awful construction with a new variable. But be careful with a generalization if you want to use these vertices for other purposes. *) let format_coupling_mom coeff c = match coeff with | 1 -> c | -1 -> "(-" ^ c ^")" | coeff -> string_of_int coeff ^ "*" ^ c let commute_proj f = match f with | "moml" -> "lmom" | "momr" -> "rmom" | "lmom" -> "moml" | "rmom" -> "momr" | "svl" -> "svr" | "svr" -> "svl" | "sl" -> "sr" | "sr" -> "sl" | "s" -> "s" | "p" -> "p" | _ -> invalid_arg "Targets:Fortran_Majorana_Fermions: wrong case" let print_fermion_current_mom coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling_mom coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p12 | F31 -> printf "%s_ff(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p12 | F23 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p1 | F32 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf2 wf1 p2 | F12 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf2 wf1 p2 | F21 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p1 (*i unused value let print_fermion_current_mom_vector coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling_mom coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p12 | F31 -> printf "%s_ff(-%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p12 | F23 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p1 | F32 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf2 wf1 p2 | F12 -> printf "f_%sf(-%s,%s,%s,%s,%s)" f c1 c2 wf2 wf1 p2 | F21 -> printf "f_%sf(-%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p1 i*) let print_fermion_current_mom_sign coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling_mom coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p12 | F31 -> printf "%s_ff(%s,%s,%s,%s,-(%s))" f c1 c2 wf1 wf2 p12 | F23 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p1 | F32 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf2 wf1 p2 | F12 -> printf "f_%sf(%s,%s,%s,%s,-(%s))" f c1 c2 wf2 wf1 p2 | F21 -> printf "f_%sf(%s,%s,%s,%s,-(%s))" f c1 c2 wf1 wf2 p1 let print_fermion_current_mom_sign_1 coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s)" f c wf1 wf2 p12 | F31 -> printf "%s_ff(%s,%s,%s,-(%s))" f c wf1 wf2 p12 | F23 -> printf "f_%sf(%s,%s,%s,%s)" f c wf1 wf2 p1 | F32 -> printf "f_%sf(%s,%s,%s,%s)" f c wf2 wf1 p2 | F12 -> printf "f_%sf(%s,%s,%s,-(%s))" f c wf2 wf1 p2 | F21 -> printf "f_%sf(%s,%s,%s,-(%s))" f c wf1 wf2 p1 let print_fermion_current_mom_chiral coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling_mom coeff c and cf = commute_proj f in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | F13 -> printf "%s_ff(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p12 | F31 -> printf "%s_ff(%s,%s,%s, %s,-(%s))" cf c1 c2 wf1 wf2 p12 | F23 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf1 wf2 p1 | F32 -> printf "f_%sf(%s,%s,%s,%s,%s)" f c1 c2 wf2 wf1 p2 | F12 -> printf "f_%sf(%s,%s,%s,%s,-(%s))" cf c1 c2 wf2 wf1 p2 | F21 -> printf "f_%sf(%s,%s,%s,%s,-(%s))" cf c1 c2 wf1 wf2 p1 let print_fermion_g_current coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_grf(%s,%s,%s,%s)" f c wf1 wf2 p12 | F31 -> printf "%s_fgr(%s,%s,%s,%s)" f c wf1 wf2 p12 | F23 -> printf "gr_%sf(%s,%s,%s,%s)" f c wf1 wf2 p1 | F32 -> printf "gr_%sf(%s,%s,%s,%s)" f c wf2 wf1 p2 | F12 -> printf "f_%sgr(%s,%s,%s,%s)" f c wf2 wf1 p2 | F21 -> printf "f_%sgr(%s,%s,%s,%s)" f c wf1 wf2 p1 let print_fermion_g_2_current coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_grf(%s(1),%s(2),%s,%s,%s)" f c c wf1 wf2 p12 | F31 -> printf "%s_fgr(%s(1),%s(2),%s,%s,%s)" f c c wf1 wf2 p12 | F23 -> printf "gr_%sf(%s(1),%s(2),%s,%s,%s)" f c c wf1 wf2 p1 | F32 -> printf "gr_%sf(%s(1),%s(2),%s,%s,%s)" f c c wf2 wf1 p2 | F12 -> printf "f_%sgr(%s(1),%s(2),%s,%s,%s)" f c c wf2 wf1 p2 | F21 -> printf "f_%sgr(%s(1),%s(2),%s,%s,%s)" f c c wf1 wf2 p1 let print_fermion_g_current_rev coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_fgr(%s,%s,%s,%s)" f c wf1 wf2 p12 | F31 -> printf "%s_grf(%s,%s,%s,%s)" f c wf1 wf2 p12 | F23 -> printf "f_%sgr(%s,%s,%s,%s)" f c wf1 wf2 p1 | F32 -> printf "f_%sgr(%s,%s,%s,%s)" f c wf2 wf1 p2 | F12 -> printf "gr_%sf(%s,%s,%s,%s)" f c wf2 wf1 p2 | F21 -> printf "gr_%sf(%s,%s,%s,%s)" f c wf1 wf2 p1 let print_fermion_g_2_current_rev coeff f c wf1 wf2 p1 p2 p12 fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_fgr(%s(1),%s(2),%s,%s,%s)" f c c wf1 wf2 p12 | F31 -> printf "%s_grf(%s(1),%s(2),%s,%s,%s)" f c c wf1 wf2 p12 | F23 -> printf "f_%sgr(%s(1),%s(2),%s,%s,%s)" f c c wf1 wf2 p1 | F32 -> printf "f_%sgr(%s(1),%s(2),%s,%s,%s)" f c c wf2 wf1 p2 | F12 -> printf "gr_%sf(%s(1),%s(2),%s,%s,%s)" f c c wf2 wf1 p2 | F21 -> printf "gr_%sf(%s(1),%s(2),%s,%s,%s)" f c c wf1 wf2 p1 let print_fermion_g_current_vector coeff f c wf1 wf2 _ _ _ fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_grf(%s,%s,%s)" f c wf1 wf2 | F31 -> printf "%s_fgr(-%s,%s,%s)" f c wf1 wf2 | F23 -> printf "gr_%sf(%s,%s,%s)" f c wf1 wf2 | F32 -> printf "gr_%sf(%s,%s,%s)" f c wf2 wf1 | F12 -> printf "f_%sgr(-%s,%s,%s)" f c wf2 wf1 | F21 -> printf "f_%sgr(-%s,%s,%s)" f c wf1 wf2 let print_fermion_g_current_vector_rev coeff f c wf1 wf2 _ _ _ fusion = let c = format_coupling coeff c in match fusion with | F13 -> printf "%s_fgr(%s,%s,%s)" f c wf1 wf2 | F31 -> printf "%s_grf(-%s,%s,%s)" f c wf1 wf2 | F23 -> printf "f_%sgr(%s,%s,%s)" f c wf1 wf2 | F32 -> printf "f_%sgr(%s,%s,%s)" f c wf2 wf1 | F12 -> printf "gr_%sf(-%s,%s,%s)" f c wf2 wf1 | F21 -> printf "gr_%sf(-%s,%s,%s)" f c wf1 wf2 let print_current_g = function | coeff, _, MOM, _ -> print_fermion_current_mom_sign coeff "mom" | coeff, _, MOM5, _ -> print_fermion_current_mom coeff "mom5" | coeff, _, MOML, _ -> print_fermion_current_mom_chiral coeff "moml" | coeff, _, MOMR, _ -> print_fermion_current_mom_chiral coeff "momr" | coeff, _, LMOM, _ -> print_fermion_current_mom_chiral coeff "lmom" | coeff, _, RMOM, _ -> print_fermion_current_mom_chiral coeff "rmom" | coeff, _, VMOM, _ -> print_fermion_current_mom_sign_1 coeff "vmom" | coeff, Gravbar, S, _ -> print_fermion_g_current coeff "s" | coeff, Gravbar, SL, _ -> print_fermion_g_current coeff "sl" | coeff, Gravbar, SR, _ -> print_fermion_g_current coeff "sr" | coeff, Gravbar, SLR, _ -> print_fermion_g_2_current coeff "slr" | coeff, Gravbar, P, _ -> print_fermion_g_current coeff "p" | coeff, Gravbar, V, _ -> print_fermion_g_current coeff "v" | coeff, Gravbar, VLR, _ -> print_fermion_g_2_current coeff "vlr" | coeff, Gravbar, POT, _ -> print_fermion_g_current_vector coeff "pot" | coeff, _, S, Grav -> print_fermion_g_current_rev coeff "s" | coeff, _, SL, Grav -> print_fermion_g_current_rev coeff "sl" | coeff, _, SR, Grav -> print_fermion_g_current_rev coeff "sr" | coeff, _, SLR, Grav -> print_fermion_g_2_current_rev coeff "slr" | coeff, _, P, Grav -> print_fermion_g_current_rev (-coeff) "p" | coeff, _, V, Grav -> print_fermion_g_current_rev coeff "v" | coeff, _, VLR, Grav -> print_fermion_g_2_current_rev coeff "vlr" | coeff, _, POT, Grav -> print_fermion_g_current_vector_rev coeff "pot" | _, _, _, _ -> invalid_arg "Targets.Fortran_Majorana_Fermions: not used in the models" let print_current_mom = function | coeff, _, TVA, _ -> print_fermion_current_mom_v1 coeff "tva" | coeff, _, TVAM, _ -> print_fermion_current_mom_v2 coeff "tvam" | coeff, _, TLR, _ -> print_fermion_current_mom_v1_chiral coeff "tlr" | coeff, _, TLRM, _ -> print_fermion_current_mom_v2_chiral coeff "tlrm" | _, _, _, _ -> invalid_arg "Targets.Fortran_Majorana_Fermions: Not needed in the models" (* We need support for dimension-5 vertices with two fermions and two bosons, appearing in theories of supergravity and also together with in insertions of the supersymmetric current. There is a canonical order [fermionbar], [boson_1], [boson_2], [fermion], so what one has to do is a mapping from the fusions [F123] etc. to the order of the three wave functions [wf1], [wf2] and [wf3]. *) (* The function [d_p] (for distinct the particle) distinguishes which particle (scalar or vector) must be fused to in the special functions. *) let d_p = function | 1, ("sv"|"pv"|"svl"|"svr"|"slrv") -> "1" | 1, _ -> "" | 2, ("sv"|"pv"|"svl"|"svr"|"slrv") -> "2" | 2, _ -> "" | _, _ -> invalid_arg "Targets.Fortran_Majorana_Fermions: not used" let wf_of_f wf1 wf2 wf3 f = match f with | (F123|F423) -> [wf2; wf3; wf1] | (F213|F243|F143|F142|F413|F412) -> [wf1; wf3; wf2] | (F132|F432) -> [wf3; wf2; wf1] | (F231|F234|F134|F124|F431|F421) -> [wf1; wf2; wf3] | (F312|F342) -> [wf3; wf1; wf2] | (F321|F324|F314|F214|F341|F241) -> [wf2; wf1; wf3] let print_fermion_g4_brs_vector_current coeff f c wf1 wf2 wf3 fusion = let cf = commute_proj f and cp = format_coupling coeff c and cm = if f = "pv" then format_coupling coeff c else format_coupling (-coeff) c and d1 = d_p (1,f) and d2 = d_p (2,f) and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "f_%sf(%s,%s,%s,%s)" cf cm f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "f_%sf(%s,%s,%s,%s)" f cp f1 f2 f3 | (F134|F143|F314) -> printf "%s%s_ff(%s,%s,%s,%s)" f d1 cp f1 f2 f3 | (F124|F142|F214) -> printf "%s%s_ff(%s,%s,%s,%s)" f d2 cp f1 f2 f3 | (F413|F431|F341) -> printf "%s%s_ff(%s,%s,%s,%s)" cf d1 cm f1 f2 f3 | (F241|F412|F421) -> printf "%s%s_ff(%s,%s,%s,%s)" cf d2 cm f1 f2 f3 let print_fermion_g4_svlr_current coeff _ c wf1 wf2 wf3 fusion = let c = format_coupling_2 coeff c and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "f_svlrf(-(%s),-(%s),%s,%s,%s)" c2 c1 f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "f_svlrf(%s,%s,%s,%s,%s)" c1 c2 f1 f2 f3 | (F134|F143|F314) -> printf "svlr2_ff(%s,%s,%s,%s,%s)" c1 c2 f1 f2 f3 | (F124|F142|F214) -> printf "svlr1_ff(%s,%s,%s,%s,%s)" c1 c2 f1 f2 f3 | (F413|F431|F341) -> printf "svlr2_ff(-(%s),-(%s),%s,%s,%s)" c2 c1 f1 f2 f3 | (F241|F412|F421) -> printf "svlr1_ff(-(%s),-(%s),%s,%s,%s)" c2 c1 f1 f2 f3 let print_fermion_s2_current coeff f c wf1 wf2 wf3 fusion = let cp = format_coupling coeff c and cm = if f = "p" then format_coupling (-coeff) c else format_coupling coeff c and cf = commute_proj f and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "%s * f_%sf(%s,%s,%s)" f1 cf cm f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "%s * f_%sf(%s,%s,%s)" f1 f cp f2 f3 | (F134|F143|F314) -> printf "%s * %s_ff(%s,%s,%s)" f2 f cp f1 f3 | (F124|F142|F214) -> printf "%s * %s_ff(%s,%s,%s)" f2 f cp f1 f3 | (F413|F431|F341) -> printf "%s * %s_ff(%s,%s,%s)" f2 cf cm f1 f3 | (F241|F412|F421) -> printf "%s * %s_ff(%s,%s,%s)" f2 cf cm f1 f3 let print_fermion_s2p_current coeff f c wf1 wf2 wf3 fusion = let c = format_coupling_2 coeff c and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "%s * f_%sf(%s,-(%s),%s,%s)" f1 f c1 c2 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "%s * f_%sf(%s,%s,%s,%s)" f1 f c1 c2 f2 f3 | (F134|F143|F314) -> printf "%s * %s_ff(%s,%s,%s,%s)" f2 f c1 c2 f1 f3 | (F124|F142|F214) -> printf "%s * %s_ff(%s,%s,%s,%s)" f2 f c1 c2 f1 f3 | (F413|F431|F341) -> printf "%s * %s_ff(%s,-(%s),%s,%s)" f2 f c1 c2 f1 f3 | (F241|F412|F421) -> printf "%s * %s_ff(%s,-(%s),%s,%s)" f2 f c1 c2 f1 f3 let print_fermion_s2lr_current coeff f c wf1 wf2 wf3 fusion = let c = format_coupling_2 coeff c and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "%s * f_%sf(%s,%s,%s,%s)" f1 f c2 c1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "%s * f_%sf(%s,%s,%s,%s)" f1 f c1 c2 f2 f3 | (F134|F143|F314) -> printf "%s * %s_ff(%s,%s,%s,%s)" f2 f c1 c2 f1 f3 | (F124|F142|F214) -> printf "%s * %s_ff(%s,%s,%s,%s)" f2 f c1 c2 f1 f3 | (F413|F431|F341) -> printf "%s * %s_ff(%s,%s,%s,%s)" f2 f c2 c1 f1 f3 | (F241|F412|F421) -> printf "%s * %s_ff(%s,%s,%s,%s)" f2 f c2 c1 f1 f3 let print_fermion_g4_current coeff f c wf1 wf2 wf3 fusion = let c = format_coupling coeff c and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "f_%sgr(-%s,%s,%s,%s)" f c f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "gr_%sf(%s,%s,%s,%s)" f c f1 f2 f3 | (F134|F143|F314|F124|F142|F214) -> printf "%s_grf(%s,%s,%s,%s)" f c f1 f2 f3 | (F413|F431|F341|F241|F412|F421) -> printf "%s_fgr(-%s,%s,%s,%s)" f c f1 f2 f3 (*i unused value let print_fermion_2_g4_current coeff f c wf1 wf2 wf3 fusion = let f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in let c = format_coupling_2 coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "f_%sgr(-(%s),-(%s),%s,%s,%s)" f c2 c1 f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "gr_%sf(%s,%s,%s,%s,%s)" f c1 c2 f1 f2 f3 | (F134|F143|F314|F124|F142|F214) -> printf "%s_grf(%s,%s,%s,%s,%s)" f c1 c2 f1 f2 f3 | (F413|F431|F341|F241|F412|F421) -> printf "%s_fgr(-(%s),-(%s),%s,%s,%s)" f c2 c1 f1 f2 f3 i*) let print_fermion_2_g4_current coeff f c wf1 wf2 wf3 fusion = let f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in let c = format_coupling_2 coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "f_%sgr(-(%s),-(%s),%s,%s,%s)" f c2 c1 f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "gr_%sf(%s,%s,%s,%s,%s)" f c1 c2 f1 f2 f3 | (F134|F143|F314|F124|F142|F214) -> printf "%s_grf(%s,%s,%s,%s,%s)" f c1 c2 f1 f2 f3 | (F413|F431|F341|F241|F412|F421) -> printf "%s_fgr(-(%s),-(%s),%s,%s,%s)" f c2 c1 f1 f2 f3 let print_fermion_g4_current_rev coeff f c wf1 wf2 wf3 fusion = let c = format_coupling coeff c and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "f_%sgr(%s,%s,%s,%s)" f c f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "gr_%sf(-%s,%s,%s,%s)" f c f1 f2 f3 | (F134|F143|F314|F124|F142|F214) -> printf "%s_grf(-%s,%s,%s,%s)" f c f1 f2 f3 | (F413|F431|F341|F241|F412|F421) -> printf "%s_fgr(%s,%s,%s,%s)" f c f1 f2 f3 (* Here we have to distinguish which of the two bosons is produced in the fusion of three particles which include both fermions. *) let print_fermion_g4_vector_current coeff f c wf1 wf2 wf3 fusion = let c = format_coupling coeff c and d1 = d_p (1,f) and d2 = d_p (2,f) and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "f_%sgr(%s,%s,%s,%s)" f c f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "gr_%sf(%s,%s,%s,%s)" f c f1 f2 f3 | (F134|F143|F314) -> printf "%s%s_grf(%s,%s,%s,%s)" f d1 c f1 f2 f3 | (F124|F142|F214) -> printf "%s%s_grf(%s,%s,%s,%s)" f d2 c f1 f2 f3 | (F413|F431|F341) -> printf "%s%s_fgr(%s,%s,%s,%s)" f d1 c f1 f2 f3 | (F241|F412|F421) -> printf "%s%s_fgr(%s,%s,%s,%s)" f d2 c f1 f2 f3 let print_fermion_2_g4_vector_current coeff f c wf1 wf2 wf3 fusion = let d1 = d_p (1,f) and d2 = d_p (2,f) and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in let c = format_coupling_2 coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "f_%sgr(%s,%s,%s,%s,%s)" f c1 c2 f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "gr_%sf(%s,%s,%s,%s,%s)" f c1 c2 f1 f2 f3 | (F134|F143|F314) -> printf "%s%s_grf(%s,%s,%s,%s,%s)" f d1 c1 c2 f1 f2 f3 | (F124|F142|F214) -> printf "%s%s_grf(%s,%s,%s,%s,%s)" f d2 c1 c2 f1 f2 f3 | (F413|F431|F341) -> printf "%s%s_fgr(%s,%s,%s,%s,%s)" f d1 c1 c2 f1 f2 f3 | (F241|F412|F421) -> printf "%s%s_fgr(%s,%s,%s,%s,%s)" f d2 c1 c2 f1 f2 f3 let print_fermion_g4_vector_current_rev coeff f c wf1 wf2 wf3 fusion = let c = format_coupling coeff c and d1 = d_p (1,f) and d2 = d_p (2,f) and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "gr_%sf(%s,%s,%s,%s)" f c f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "f_%sgr(%s,%s,%s,%s)" f c f1 f2 f3 | (F134|F143|F314) -> printf "%s%s_fgr(%s,%s,%s,%s)" f d1 c f1 f2 f3 | (F124|F142|F214) -> printf "%s%s_fgr(%s,%s,%s,%s)" f d2 c f1 f2 f3 | (F413|F431|F341) -> printf "%s%s_grf(%s,%s,%s,%s)" f d1 c f1 f2 f3 | (F241|F412|F421) -> printf "%s%s_grf(%s,%s,%s,%s)" f d2 c f1 f2 f3 let print_fermion_2_g4_current_rev coeff f c wf1 wf2 wf3 fusion = let c = format_coupling_2 coeff c in let c1 = fastener c 1 and c2 = fastener c 2 and d1 = d_p (1,f) and d2 = d_p (2,f) in let f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "gr_%sf(%s,%s,%s,%s,%s)" f c1 c2 f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "f_%sgr(-(%s),-(%s),%s,%s,%s)" f c1 c2 f1 f2 f3 | (F134|F143|F314) -> printf "%s%s_fgr(-(%s),-(%s),%s,%s,%s)" f d1 c1 c2 f1 f2 f3 | (F124|F142|F214) -> printf "%s%s_fgr(-(%s),-(%s),%s,%s,%s)" f d2 c1 c2 f1 f2 f3 | (F413|F431|F341) -> printf "%s%s_grf(%s,%s,%s,%s,%s)" f d1 c1 c2 f1 f2 f3 | (F241|F412|F421) -> printf "%s%s_grf(%s,%s,%s,%s,%s)" f d2 c1 c2 f1 f2 f3 let print_fermion_2_g4_vector_current_rev coeff f c wf1 wf2 wf3 fusion = (* Here we put in the extra minus sign from the coeff. *) let c = format_coupling coeff c in let c1 = fastener c 1 and c2 = fastener c 2 in let d1 = d_p (1,f) and d2 = d_p (2,f) and f1 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 0) and f2 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 1) and f3 = (List.nth (wf_of_f wf1 wf2 wf3 fusion) 2) in match fusion with | (F123|F213|F132|F231|F312|F321) -> printf "gr_%sf(%s,%s,%s,%s,%s)" f c1 c2 f1 f2 f3 | (F423|F243|F432|F234|F342|F324) -> printf "f_%sgr(%s,%s,%s,%s,%s)" f c1 c2 f1 f2 f3 | (F134|F143|F314) -> printf "%s%s_fgr(%s,%s,%s,%s,%s)" f d1 c1 c2 f1 f2 f3 | (F124|F142|F214) -> printf "%s%s_fgr(%s,%s,%s,%s,%s)" f d2 c1 c2 f1 f2 f3 | (F413|F431|F341) -> printf "%s%s_grf(%s,%s,%s,%s,%s)" f d1 c1 c2 f1 f2 f3 | (F241|F412|F421) -> printf "%s%s_grf(%s,%s,%s,%s,%s)" f d2 c1 c2 f1 f2 f3 let print_current_g4 = function | coeff, Gravbar, S2, _ -> print_fermion_g4_current coeff "s2" | coeff, Gravbar, SV, _ -> print_fermion_g4_vector_current coeff "sv" | coeff, Gravbar, SLV, _ -> print_fermion_g4_vector_current coeff "slv" | coeff, Gravbar, SRV, _ -> print_fermion_g4_vector_current coeff "srv" | coeff, Gravbar, SLRV, _ -> print_fermion_2_g4_vector_current coeff "slrv" | coeff, Gravbar, PV, _ -> print_fermion_g4_vector_current coeff "pv" | coeff, Gravbar, V2, _ -> print_fermion_g4_current coeff "v2" | coeff, Gravbar, V2LR, _ -> print_fermion_2_g4_current coeff "v2lr" | _, Gravbar, _, _ -> invalid_arg "print_current_g4: not implemented" | coeff, _, S2, Grav -> print_fermion_g4_current_rev coeff "s2" | coeff, _, SV, Grav -> print_fermion_g4_vector_current_rev (-coeff) "sv" | coeff, _, SLV, Grav -> print_fermion_g4_vector_current_rev (-coeff) "slv" | coeff, _, SRV, Grav -> print_fermion_g4_vector_current_rev (-coeff) "srv" | coeff, _, SLRV, Grav -> print_fermion_2_g4_vector_current_rev coeff "slrv" | coeff, _, PV, Grav -> print_fermion_g4_vector_current_rev coeff "pv" | coeff, _, V2, Grav -> print_fermion_g4_vector_current_rev coeff "v2" | coeff, _, V2LR, Grav -> print_fermion_2_g4_current_rev coeff "v2lr" | _, _, _, Grav -> invalid_arg "print_current_g4: not implemented" | coeff, _, S2, _ -> print_fermion_s2_current coeff "s" | coeff, _, P2, _ -> print_fermion_s2_current coeff "p" | coeff, _, S2P, _ -> print_fermion_s2p_current coeff "sp" | coeff, _, S2L, _ -> print_fermion_s2_current coeff "sl" | coeff, _, S2R, _ -> print_fermion_s2_current coeff "sr" | coeff, _, S2LR, _ -> print_fermion_s2lr_current coeff "slr" | coeff, _, V2, _ -> print_fermion_g4_brs_vector_current coeff "v2" | coeff, _, SV, _ -> print_fermion_g4_brs_vector_current coeff "sv" | coeff, _, PV, _ -> print_fermion_g4_brs_vector_current coeff "pv" | coeff, _, SLV, _ -> print_fermion_g4_brs_vector_current coeff "svl" | coeff, _, SRV, _ -> print_fermion_g4_brs_vector_current coeff "svr" | coeff, _, SLRV, _ -> print_fermion_g4_svlr_current coeff "svlr" | _, _, V2LR, _ -> invalid_arg "Targets.print_current: not available" let reverse_braket _ = false let use_module = "omega95_bispinors" let require_library = ["omega_bispinors_2010_01_A"; "omega_bispinor_cpls_2010_01_A"] end module Fortran_Majorana = Make_Fortran(Fortran_Majorana_Fermions) (* \thocwmodulesubsection{\texttt{FORTRAN\,77}} *) module Fortran77 = Dummy (* \thocwmodulesection{\texttt{C}} *) module C = Dummy (* \thocwmodulesubsection{\texttt{C++}} *) module Cpp = Dummy (* \thocwmodulesubsection{Java} *) module Java = Dummy (* \thocwmodulesection{O'Caml} *) module Ocaml = Dummy (* \thocwmodulesection{\LaTeX} *) module LaTeX = Dummy Index: trunk/omega/src/modellib_PSSSM.ml =================================================================== --- trunk/omega/src/modellib_PSSSM.ml (revision 8274) +++ trunk/omega/src/modellib_PSSSM.ml (revision 8275) @@ -1,1970 +1,1972 @@ (* modellib_PSSSM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Extended Supersymmetric Standard Model(s)} *) (* This is based on the NMSSM implementation by Felix Braam, and extended to the exotica -- leptoquarks, leptoquarkinos, additional Higgses etc. -- by Daniel Wiesler. Note that for the Higgs sector vertices the conventions of the Franke/Fraas paper have been used. *) module type extMSSM_flags = sig val ckm_present : bool end module PSSSM : extMSSM_flags = struct let ckm_present = false end module PSSSM_QCD : extMSSM_flags = struct let ckm_present = false end module ExtMSSM (Flags : extMSSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] (*additional combinatorics *) (* yields a list of tuples consistig of the off-diag combinations of the elements in "set" *) let choose2 set = List.map (function [x;y] -> (x,y) | _ -> failwith "choose2") (Combinatorics.choose 2 set) (* [pairs] *) (* [pairs] appends the diagonal combinations to [choose2] *) let rec diag = function | [] -> [] | x1 :: rest -> (x1, x1) :: diag rest let pairs l = choose2 l @ diag l (* [triples] *) (* rank 3 generalization of [pairs] *) let rec cloop set i j k = if i > ((List.length set)-1) then [] else if j > i then cloop set (succ i) (j-i-1) (j-i-1) else if k > j then cloop set i (succ j) (k-j-1) else (List.nth set i, List.nth set j, List.nth set k) :: cloop set i j (succ k) let triples set = cloop set 0 0 0 (* [two_and_one] *) let rec two_and_one' l1 z n = if n < 0 then [] else ((fst (List.nth (pairs l1) n)),(snd (List.nth (pairs l1) n)), z):: two_and_one' l1 z (pred n) let two_and_one l1 l2 = let f z = two_and_one' l1 z ((List.length (pairs l1))-1) in List.flatten ( List.map f l2 ) type gen = | G of int | GG of gen*gen let rec string_of_gen = function | G n when n > 0 -> string_of_int n | G n -> string_of_int (abs n) ^ "c" | GG (g1,g2) -> string_of_gen g1 ^ "_" ^ string_of_gen g2 (* With this we distinguish the flavour. *) type sff = | SL | SN | SU | SD let string_of_sff = function | SL -> "sl" | SN -> "sn" | SU -> "su" | SD -> "sd" (* With this we distinguish the mass eigenstates. At the moment we have to cheat a little bit for the sneutrinos. Because we are dealing with massless neutrinos there is only one sort of sneutrino. *) type sfm = | M1 | M2 let string_of_sfm = function | M1 -> "1" | M2 -> "2" (* We also introduce special types for the charginos and neutralinos. *) type char = | C1 | C2 | C1c | C2c | C3 | C3c | C4 | C4c type neu = | N1 | N2 | N3 | N4 | N5 | N6 | N7 | N8 | N9 | N10 | N11 let int_of_char = function | C1 -> 1 | C2 -> 2 | C1c -> -1 | C2c -> -2 | C3 -> 3 | C4 -> 4 | C3c -> -3 | C4c -> -4 let string_of_char c = string_of_int (int_of_char c) let conj_char = function | C1 -> C1c | C2 -> C2c | C1c -> C1 | C2c -> C2 | C3 -> C3c | C4 -> C4c | C3c -> C3 | C4c -> C4 let string_of_neu = function | N1 -> "1" | N2 -> "2" | N3 -> "3" | N4 -> "4" | N5 -> "5" | N6 -> "6" | N7 -> "7" | N8 -> "8" | N9 -> "9" | N10 -> "10"| N11 -> "11" (* For NMSSM-like the Higgs bosons, we follow the conventions of Franke/Fraas. Daniel Wiesler: extended to E6 models. *) type shiggs = | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | S9 type phiggs = | P1 | P2 | P3 | P4 | P5 | P6 | P7 (* [HCx] is always the $H^+$, [HCxc] the $H^-$. *) type chiggs = | HC1 | HC2 | HC3 | HC4 | HC5 | HC1c | HC2c | HC3c | HC4c | HC5c let conj_chiggs = function | HC1 -> HC1c | HC2 -> HC2c | HC1c -> HC1 | HC2c -> HC2 | HC3 -> HC3c | HC4 -> HC4c | HC3c -> HC3 | HC4c -> HC4 | HC5 -> HC5c | HC5c -> HC5 let string_of_shiggs = function | S1 -> "1" | S2 -> "2" | S3 -> "3" | S4 -> "4" | S5 -> "5" | S6 -> "6" | S7 -> "7" | S8 -> "8" | S9 -> "9" let string_of_phiggs = function | P1 -> "1" | P2 -> "2" | P3 -> "3" | P4 -> "4" | P5 -> "5" | P6 -> "6" | P7 -> "7" let nlist = [ N1; N2; N3; N4; N5; N6; N7; N8; N9; N10; N11 ] let slist = [ S1; S2; S3; S4; S5; S6; S7; S8; S9 ] let plist = [ P1; P2; P3; P4; P5; P6; P7 ] let clist = [ HC1; HC2; HC3; HC4; HC5; HC1c; HC2c; HC3c; HC4c; HC5c ] let charlist = [ C1; C2; C3; C4; C1c; C2c; C3c; C4c ] type flavor = | L of int | N of int | U of int | D of int | Sup of sfm*int | Sdown of sfm*int | Ga | Wp | Wm | Z | Gl | Slepton of sfm*int | Sneutrino of int | Neutralino of neu | Chargino of char | Gluino | SHiggs of shiggs | PHiggs of phiggs | CHiggs of chiggs | LQ of sfm*int | LQino of int let string_of_fermion_type = function | L _ -> "l" | U _ -> "u" | D _ -> "d" | N _ -> "n" | _ -> failwith "Modellib_PSSSM.ExtMSSM.string_of_fermion_type: invalid fermion type" let string_of_fermion_gen = function | L g | U g | D g | N g -> string_of_int (abs (g)) | _ -> failwith "Modellib_PSSSM.ExtMSSM.string_of_fermion_gen: invalid fermion type" type gauge = unit let gauge_symbol () = failwith "Modellib_PSSSM.ExtMSSM.gauge_symbol: internal error" (* At this point we will forget graviton and -ino. *) let family g = [ L g; N g; Slepton (M1,g); Slepton (M2,g); Sneutrino g; U g; D g; Sup (M1,g); Sup (M2,g); Sdown (M1,g); Sdown (M2,g); LQ (M1,g); LQ (M2,g); LQino g ] let external_flavors () = [ "1st Generation matter", ThoList.flatmap family [1; -1]; "2nd Generation matter", ThoList.flatmap family [2; -2]; "3rd Generation matter", ThoList.flatmap family [3; -3]; "Gauge Bosons", [Ga; Z; Wp; Wm; Gl]; "Charginos", List.map (fun a -> Chargino a) charlist; "Neutralinos", List.map (fun a -> Neutralino a) nlist; "Higgs Bosons", List.map (fun a -> SHiggs a) slist @ List.map (fun a -> PHiggs a) plist @ List.map (fun a -> CHiggs a) clist; "Gluino", [Gluino]] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n m = if n >= 0 && m >= 0 then Spinor else if n <= 0 && m <=0 then ConjSpinor else invalid_arg "Modellib_PSSSM.ExtMSSM.spinor: internal error" let lorentz = function | L g -> spinor g 0 | N g -> spinor g 0 | U g -> spinor g 0 | D g -> spinor g 0 | LQino g -> spinor g 0 | Chargino c -> spinor (int_of_char c) 0 | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector | SHiggs _ | PHiggs _ | CHiggs _ | Sup _ | Sdown _ | Slepton _ | Sneutrino _ | LQ _ -> Scalar | Neutralino _ | Gluino -> Majorana let color = function | U g -> Color.SUN (if g > 0 then 3 else -3) | Sup (m,g) -> Color.SUN (if g > 0 then 3 else -3) | D g -> Color.SUN (if g > 0 then 3 else -3) | Sdown (m,g) -> Color.SUN (if g > 0 then 3 else -3) | LQ (m,g) -> Color.SUN (if g > 0 then 3 else -3) | LQino g -> Color.SUN (if g > 0 then 3 else -3) | Gl | Gluino -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n m = if n >= 0 && m >=0 then Prop_Spinor else if n <=0 && m <=0 then Prop_ConjSpinor else invalid_arg "Modellib_PSSSM.ExtMSSM.prop_spinor: internal error" let propagator = function | L g -> prop_spinor g 0 | N g -> prop_spinor g 0 | U g -> prop_spinor g 0 | D g -> prop_spinor g 0 | LQino g -> prop_spinor g 0 | Chargino c -> prop_spinor (int_of_char c) 0 | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity | SHiggs _ | PHiggs _ | CHiggs _ -> Prop_Scalar | Sup _ | Sdown _ | Slepton _ | Sneutrino _ -> Prop_Scalar | LQ _ -> Prop_Scalar | Gluino -> Prop_Majorana | Neutralino _ -> Prop_Majorana (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | Wp | Wm | U 3 | U (-3) -> Fudged | _ -> !default_width else !default_width let goldstone _ = None let conjugate = function | L g -> L (-g) | N g -> N (-g) | U g -> U (-g) | D g -> D (-g) | Sup (m,g) -> Sup (m,-g) | Sdown (m,g) -> Sdown (m,-g) | Slepton (m,g) -> Slepton (m,-g) | Sneutrino g -> Sneutrino (-g) | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp | SHiggs s -> SHiggs s | PHiggs p -> PHiggs p | CHiggs c -> CHiggs (conj_chiggs c) | Gluino -> Gluino | Neutralino n -> Neutralino n | Chargino c -> Chargino (conj_char c) | LQino g -> LQino (-g) | LQ (m,g) -> LQ (m,-g) let fermion = function | L g -> if g > 0 then 1 else -1 | N g -> if g > 0 then 1 else -1 | U g -> if g > 0 then 1 else -1 | D g -> if g > 0 then 1 else -1 | Gl | Ga | Z | Wp | Wm -> 0 | SHiggs _ | PHiggs _ | CHiggs _ -> 0 | Neutralino _ -> 2 | Chargino c -> if (int_of_char c) > 0 then 1 else -1 | Sup _ -> 0 | Sdown _ -> 0 | Slepton _ -> 0 | Sneutrino _ -> 0 | Gluino -> 2 | LQ _ -> 0 | LQino g -> if g > 0 then 1 else -1 (* This model does NOT have a conserved generation quantum number. *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let charge = function | L n -> if n > 0 then -1//1 else 1//1 | Slepton (_,n) -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | Sneutrino n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | Sup (_,n) -> if n > 0 then 2//3 else -2//3 | D n | LQ (_,n) | LQino n -> if n > 0 then -1//3 else 1//3 | Sdown (_,n) -> if n > 0 then -1//3 else 1//3 | Gl | Ga | Z | Neutralino _ | Gluino -> 0//1 | Wp -> 1//1 | Wm -> -1//1 | SHiggs _ | PHiggs _ -> 0//1 | CHiggs (HC1|HC2|HC3|HC4|HC5) -> 1//1 | CHiggs (HC1c|HC2c|HC3c|HC4c|HC5c) -> -1//1 | Chargino (C1|C2|C3|C4) -> 1//1 | Chargino (C1c|C2c|C3c|C4c) -> -1//1 let lepton = function | L n | N n -> if n > 0 then 1//1 else -1//1 | Slepton (_,n) | Sneutrino n -> if n > 0 then 1//1 else -1//1 | LQ (_,n) | LQino n -> if n > 0 then 1//1 else -1//1 | _ -> 0//1 let baryon = function | U n | D n -> if n > 0 then 1//1 else -1//1 | Sup (_,n) | Sdown (_,n) -> if n > 0 then 1//1 else -1//1 | LQ (_,n) | LQino n -> if n > 0 then 1//1 else -1//1 | _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] (* We introduce a Boolean type vc as a pseudonym for Vertex Conjugator to distinguish between vertices containing complex mixing matrices like the CKM--matrix or the sfermion or neutralino/chargino--mixing matrices, which have to become complex conjugated. The true--option stands for the conjugated vertex, the false--option for the unconjugated vertex. *) type vc = bool type constant = | E | G | Q_lepton | Q_up | Q_down | Q_charg | G_Z | G_CC | G_CCQ of vc*int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_PZWW | G_PPWW | G_strong | G_SS | I_G_S | Gs | G_NZN of neu*neu | G_CZC of char*char | G_YUK_FFS of flavor*flavor*shiggs | G_YUK_FFP of flavor*flavor*phiggs | G_YUK_LCN of int | G_YUK_UCD of int*int | G_YUK_DCU of int*int | G_NHC of vc*neu*char | G_YUK_C of vc*flavor*char*sff*sfm | G_YUK_Q of vc*int*flavor*char*sff*sfm | G_YUK_N of vc*flavor*neu*sff*sfm | G_YUK_G of vc*flavor*sff*sfm | G_NWC of neu*char | G_CWN of char*neu | G_CSC of char*char*shiggs | G_CPC of char*char*phiggs | G_WSQ of vc*int*int*sfm*sfm | G_SLSNW of vc*int*sfm | G_ZSF of sff*int*sfm*sfm | G_CICIS of neu*neu*shiggs | G_CICIP of neu*neu*phiggs | G_GH_WPC of phiggs | G_GH_WSC of shiggs | G_GH_ZSP of shiggs*phiggs | G_GH_WWS of shiggs | G_GH_ZZS of shiggs | G_GH_ZCC | G_GH_GaCC | G_GH4_ZZPP of phiggs*phiggs | G_GH4_ZZSS of shiggs*shiggs | G_GH4_ZZCC | G_GH4_GaGaCC | G_GH4_ZGaCC | G_GH4_WWCC | G_GH4_WWPP of phiggs*phiggs | G_GH4_WWSS of shiggs*shiggs | G_GH4_ZWSC of shiggs | G_GH4_GaWSC of shiggs | G_GH4_ZWPC of phiggs | G_GH4_GaWPC of phiggs | G_WWSFSF of sff*int*sfm*sfm | G_WPSLSN of vc*int*sfm | G_H3_SCC of shiggs | G_H3_SSS of shiggs*shiggs*shiggs | G_H3_SPP of shiggs*phiggs*phiggs | G_SFSFS of shiggs*sff*int*sfm*sfm | G_SFSFP of phiggs*sff*int*sfm*sfm | G_HSNSL of vc*int*sfm | G_HSUSD of vc*sfm*sfm*int*int | G_WPSUSD of vc*sfm*sfm*int*int | G_WZSUSD of vc*sfm*sfm*int*int | G_WZSLSN of vc*int*sfm | G_GlGlSQSQ | G_PPSFSF of sff | G_ZZSFSF of sff*int*sfm*sfm | G_ZPSFSF of sff*int*sfm*sfm | G_GlZSFSF of sff*int*sfm*sfm | G_GlPSQSQ | G_GlWSUSD of vc*sfm*sfm*int*int | G_YUK_LQ_S of int*shiggs*int | G_YUK_LQ_P of int*phiggs*int | G_LQ_NEU of sfm*int*int*neu | G_LQ_EC_UC of vc*sfm*int*int*int | G_LQ_GG of sfm*int*int | G_LQ_SSU of sfm*sfm*sfm*int*int*int | G_LQ_SSD of sfm*sfm*int*int*int | G_LQ_S of sfm*sfm*int*shiggs*int | G_LQ_P of sfm*sfm*int*phiggs*int | G_ZLQ of int*sfm*sfm | G_ZZLQLQ | G_ZPLQLQ | G_PPLQLQ | G_ZGlLQLQ | G_PGlLQLQ | G_NLQC | G_GlGlLQLQ (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) (* \begin{subequations} \begin{align} \alpha_{\text{QED}} &= \frac{1}{137.0359895} \\ \sin^2\theta_w &= 0.23124 \end{align} \end{subequations} Here we must perhaps allow for complex input parameters. So split them into their modulus and their phase. At first, we leave them real; the generalization to complex parameters is obvious. *) let parameters () = { input = []; derived = []; derived_arrays = [] } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* For the couplings there are generally two possibilities concerning the sign of the covariant derivative. \begin{equation} {\rm CD}^\pm = \partial_\mu \pm \ii g T^a A^a_\mu \end{equation} The particle data group defines the signs consistently to be positive. Since the convention for that signs also influence the phase definitions of the gaugino/higgsino fields via the off-diagonal entries in their mass matrices it would be the best to adopt that convention. *) (*** REVISED: Compatible with CD+. FB ***) let electromagnetic_currents_3 g = [ ((L (-g), Ga, L g), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-g), Ga, U g), FBF (1, Psibar, V, Psi), Q_up); ((D (-g), Ga, D g), FBF (1, Psibar, V, Psi), Q_down)] (*** REVISED: Compatible with CD+. FB***) let electromagnetic_sfermion_currents g m = [ ((Ga, Slepton (m,-g), Slepton (m,g)), Vector_Scalar_Scalar 1, Q_lepton); ((Ga, Sup (m,-g), Sup (m,g)), Vector_Scalar_Scalar 1, Q_up); ((Ga, Sdown (m,-g), Sdown (m,g)), Vector_Scalar_Scalar 1, Q_down)] (*** REVISED: Compatible with CD+. FB***) let electromagnetic_currents_2 c = let cc = conj_char c in [ ((Chargino cc, Ga, Chargino c), FBF (1, Psibar, V, Psi), Q_charg) ] (*** REVISED: Compatible with CD+. FB***) let neutral_currents g = [ ((L (-g), Z, L g), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-g), Z, N g), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-g), Z, U g), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-g), Z, D g), FBF (1, Psibar, VA, Psi), G_NC_down)] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = \mp \frac{g}{2\sqrt2} \sum_i \bar\psi_i \gamma^\mu (1-\gamma_5)(T^+W^+_\mu+T^-W^-_\mu)\psi_i , \end{equation} where the sign corresponds to $\text{CD}_\pm$, respectively. *) (*** REVISED: Compatible with CD+. ***) (* Remark: The definition with the other sign compared to the SM files comes from the fact that $g_{cc} = 1/(2\sqrt{2})$ is used overwhelmingly often in the SUSY Feynman rules, so that JR decided to use a different definiton for [g_cc] in SM and MSSM. *) (** FB **) let charged_currents g = [ ((L (-g), Wm, N g), FBF ((-1), Psibar, VL, Psi), G_CC); ((N (-g), Wp, L g), FBF ((-1), Psibar, VL, Psi), G_CC) ] (* The quark with the inverted generation (the antiparticle) is the outgoing one, the other the incoming. The vertex attached to the outgoing up-quark contains the CKM matrix element {\em not} complex conjugated, while the vertex with the outgoing down-quark has the conjugated CKM matrix element. *) (*** REVISED: Compatible with CD+. FB ***) let charged_quark_currents g h = [ ((D (-g), Wm, U h), FBF ((-1), Psibar, VL, Psi), G_CCQ (true,g,h)); ((U (-g), Wp, D h), FBF ((-1), Psibar, VL, Psi), G_CCQ (false,h,g))] (*** REVISED: Compatible with CD+.FB ***) let charged_chargino_currents n c = let cc = conj_char c in [ ((Chargino cc, Wp, Neutralino n), FBF (1, Psibar, VLR, Chi), G_CWN (c,n)); ((Neutralino n, Wm, Chargino c), FBF (1, Chibar, VLR, Psi), G_NWC (n,c)) ] (*** REVISED: Compatible with CD+. FB***) let charged_slepton_currents g m = [ ((Wm, Slepton (m,-g), Sneutrino g), Vector_Scalar_Scalar (-1), G_SLSNW (true,g,m)); ((Wp, Slepton (m,g), Sneutrino (-g)), Vector_Scalar_Scalar 1, G_SLSNW (false,g,m)) ] (*** REVISED: Compatible with CD+. FB***) let charged_squark_currents' g h m1 m2 = [ ((Wm, Sup (m1,g), Sdown (m2,-h)), Vector_Scalar_Scalar (-1), G_WSQ (true,g,h,m1,m2)); ((Wp, Sup (m1,-g), Sdown (m2,h)), Vector_Scalar_Scalar 1, G_WSQ (false,g,h,m1,m2)) ] let charged_squark_currents g h = List.flatten (Product.list2 (charged_squark_currents' g h) [M1;M2] [M1;M2] ) (*** REVISED: Compatible with CD+. FB ***) let neutral_sfermion_currents' g m1 m2 = [ ((Z, Slepton (m1,-g), Slepton (m2,g)), Vector_Scalar_Scalar (-1), G_ZSF (SL,g,m1,m2)); ((Z, Sup (m1,-g), Sup (m2,g)), Vector_Scalar_Scalar (-1), G_ZSF (SU,g,m1,m2)); ((Z, Sdown (m1,-g), Sdown (m2,g)), Vector_Scalar_Scalar (-1), G_ZSF (SD,g,m1,m2))] let neutral_sfermion_currents g = List.flatten (Product.list2 (neutral_sfermion_currents' g) [M1;M2] [M1;M2]) @ [ ((Z, Sneutrino (-g), Sneutrino g), Vector_Scalar_Scalar (-1), G_ZSF (SN,g,M1,M1)) ] (* The reality of the coupling of the Z-boson to two identical neutralinos makes the vector part of the coupling vanish. So we distinguish them not by the name but by the structure of the couplings. *) (*** REVISED: Compatible with CD+. FB***) let neutral_Z (n,m) = [ ((Neutralino n, Z, Neutralino m), FBF (1, Chibar, VA, Chi), (G_NZN (n,m))) ] (*** REVISED: Compatible with CD+. FB***) let charged_Z c1 c2 = let cc1 = conj_char c1 in ((Chargino cc1, Z, Chargino c2), FBF ((-1), Psibar, VA , Psi), G_CZC (c1,c2)) (*** REVISED: Compatible with CD+. Remark: This is pure octet. FB***) let yukawa_v = [ (Gluino, Gl, Gluino), FBF (1, Chibar, V, Chi), Gs] (*** REVISED: Independent of the sign of CD. ***) (*** REVISED: Felix Braam: Compact version using new COMBOS + FF-Couplings *) let yukawa_higgs_FFS f s = [((conjugate f, SHiggs s, f ), FBF (1, Psibar, S, Psi), G_YUK_FFS (conjugate f, f, s))] let yukawa_higgs_FFP f p = [((conjugate f, PHiggs p, f), FBF (1, Psibar, P, Psi), G_YUK_FFP (conjugate f ,f , p))] (* JR: Only the first charged Higgs. *) let yukawa_higgs_NLC g = [ ((N (-g), CHiggs HC1, L g), FBF (1, Psibar, Coupling.SR, Psi), G_YUK_LCN g); ((L (-g), CHiggs HC1c, N g), FBF (1, Psibar, Coupling.SL, Psi), G_YUK_LCN g)] let yukawa_higgs g = yukawa_higgs_NLC g @ List.flatten ( Product.list2 yukawa_higgs_FFS [L g; U g; D g] [S1; S2; S3]) @ List.flatten ( Product.list2 yukawa_higgs_FFP [L g; U g; D g] [P1; P2]) (* JR: Only the first charged Higgs. *) (*** REVISED: Independent of the sign of CD. FB***) let yukawa_higgs_quark (g,h) = [ ((U (-g), CHiggs HC1, D h), FBF (1, Psibar, SLR, Psi), G_YUK_UCD (g, h)); ((D (-h), CHiggs HC1c, U g), FBF (1, Psibar, SLR, Psi), G_YUK_DCU (g, h)) ] (*** REVISED: Compatible with CD+.FB*) (*** REVISED: Compact version using new COMBOS*) let yukawa_shiggs_2 c1 c2 s = let cc1 = conj_char c1 in ((Chargino cc1, SHiggs s, Chargino c2), FBF (1, Psibar, SLR, Psi), G_CSC (c1,c2,s)) let yukawa_phiggs_2 c1 c2 p = let cc1 = conj_char c1 in ((Chargino cc1, PHiggs p, Chargino c2), FBF (1, Psibar, SLR, Psi), G_CPC (c1,c2,p)) let yukawa_higgs_2 = Product.list3 yukawa_shiggs_2 [C1;C2] [C1;C2] [S1;S2;S3] @ Product.list3 yukawa_phiggs_2 [C1;C2] [C1;C2] [P1;P2] (* JR: Only the first charged Higgs. *) (*** REVISED: Compatible with CD+.FB ***) let higgs_charg_neutr n c = let cc = conj_char c in [ ((Neutralino n, CHiggs HC1c, Chargino c), FBF (-1, Chibar, SLR, Psi), G_NHC (false,n,c)); ((Chargino cc, CHiggs HC1, Neutralino n), FBF (-1, Psibar, SLR, Chi), G_NHC (true,n,c)) ] (*** REVISED: Compatible with CD+. FB***) (*** REVISED: Compact version using new COMBOS*) let shiggs_neutr (n,m,s) = ((Neutralino n, SHiggs s, Neutralino m), FBF (1, Chibar, SP, Chi), G_CICIS (n,m,s)) let phiggs_neutr (n,m,p) = ((Neutralino n, PHiggs p, Neutralino m), FBF (1, Chibar, SP, Chi), G_CICIP (n,m,p)) let higgs_neutr = List.map shiggs_neutr (two_and_one [N1;N2;N3;N4;N5] [S1;S2;S3]) @ List.map phiggs_neutr (two_and_one [N1;N2;N3;N4;N5] [P1;P2]) (*** REVISED: Compatible with CD+. FB***) let yukawa_n_2 n m g = [ ((Neutralino n, Slepton (m,-g), L g), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,L g,n,SL,m)); ((L (-g), Slepton (m,g), Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,L g,n,SL,m)); ((Neutralino n, Sup (m,-g), U g), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,U g,n,SU,m)); ((U (-g), Sup (m,g), Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,U g,n,SU,m)); ((Neutralino n, Sdown (m,-g), D g), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,D g,n,SD,m)); ((D (-g), Sdown (m,g), Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,D g,n,SD,m)) ] let yukawa_n_3 n g = [ ((Neutralino n, Sneutrino (-g), N g), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,N g,n,SN,M1)); ((N (-g), Sneutrino g, Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,N g, n,SN,M1)) ] let yukawa_n_5 g m = [ ((U (-g), Sup (m,g), Gluino), FBF (1, Psibar, SLR, Chi), G_YUK_G (false,U g,SU,m)); ((D (-g), Sdown (m,g), Gluino), FBF (1, Psibar, SLR, Chi), G_YUK_G (false,D g,SD,m)); ((Gluino, Sup (m,-g), U g), FBF (1, Chibar, SLR, Psi), G_YUK_G (true,U g,SU,m)); ((Gluino, Sdown (m,-g), D g), FBF (1, Chibar, SLR, Psi), G_YUK_G (true,D g,SD,m))] let yukawa_n = List.flatten (Product.list3 yukawa_n_2 [N1;N2;N3;N4;N5] [M1;M2] [1;2;3]) @ List.flatten (Product.list2 yukawa_n_3 [N1;N2;N3;N4;N5] [1;2;3]) @ List.flatten (Product.list2 yukawa_n_5 [1;2;3] [M1;M2]) (*** REVISED: Compatible with CD+.FB ***) let yukawa_c_2 c g = let cc = conj_char c in [ ((L (-g), Sneutrino g, Chargino cc), BBB (1, Psibar, SLR, Psibar), G_YUK_C (true,L g,c,SN,M1)); ((Chargino c, Sneutrino (-g), L g), PBP (1, Psi, SLR, Psi), G_YUK_C (false,L g,c,SN,M1)) ] let yukawa_c_3 c m g = let cc = conj_char c in [ ((N (-g), Slepton (m,g), Chargino c), FBF (1, Psibar, SLR, Psi), G_YUK_C (true,N g,c,SL,m)); ((Chargino cc, Slepton (m,-g), N g), FBF (1, Psibar, SLR, Psi), G_YUK_C (false,N g,c,SL,m)) ] let yukawa_c c = ThoList.flatmap (yukawa_c_2 c) [1;2;3] @ List.flatten (Product.list2 (yukawa_c_3 c) [M1;M2] [1;2;3]) (*** REVISED: Compatible with CD+. FB***) let yukawa_cq' c (g,h) m = let cc = conj_char c in [ ((Chargino c, Sup (m,-g), D h), PBP (1, Psi, SLR, Psi), G_YUK_Q (false,g,D h,c,SU,m)); ((D (-h), Sup (m,g), Chargino cc), BBB (1, Psibar, SLR, Psibar), G_YUK_Q (true,g,D h,c,SU,m)); ((Chargino cc, Sdown (m,-g), U h), FBF (1, Psibar, SLR, Psi), G_YUK_Q (true,g,U h,c,SD,m)); ((U (-h), Sdown (m,g), Chargino c), FBF (1, Psibar, SLR, Psi), G_YUK_Q (false,g,U h,c,SD,m)) ] let yukawa_cq c = if Flags.ckm_present then List.flatten (Product.list2 (yukawa_cq' c) [(1,1);(1,2);(2,1);(2,2);(1,3);(2,3);(3,3);(3,2);(3,1)] [M1;M2]) else List.flatten (Product.list2 (yukawa_cq' c) [(1,1);(2,2);(3,3)] [M1;M2]) (*** REVISED: Compatible with CD+. Remark: Singlet and octet gluon exchange. The coupling is divided by sqrt(2) to account for the correct normalization of the Lie algebra generators. **FB*) let col_currents g = [ ((D (-g), Gl, D g), FBF ((-1), Psibar, V, Psi), Gs); ((U (-g), Gl, U g), FBF ((-1), Psibar, V, Psi), Gs)] (*** REVISED: Compatible with CD+. Remark: Singlet and octet gluon exchange. The coupling is divided by sqrt(2) to account for the correct normalization of the Lie algebra generators. **FB*) (** LQ-coupl. **DW**) let chg = function | M1 -> M2 | M2 -> M1 (** LQ - Yuk's **) let yuk_lqino_se_uc1' g1 g2 g3 m = let cm = chg m in [ ((U (-g3), Slepton (m,-g2), LQino g1), FBF (1, Psibar, SLR, Psi), G_LQ_EC_UC (true,cm,g1,g2,g3)) ] let yuk_lqino_se_uc1 g1 g2 g3 = ThoList.flatmap (yuk_lqino_se_uc1' g1 g2 g3) [M1;M2] let yuk_lqino_se_uc2' g1 g2 g3 m = let cm = chg m in [ ((LQino (-g1), Slepton (m,g2), U g3), FBF (1, Psibar, SLR, Psi), G_LQ_EC_UC (false,cm,g1,g2,g3)) ] let yuk_lqino_se_uc2 g1 g2 g3 = ThoList.flatmap (yuk_lqino_se_uc2' g1 g2 g3) [M1;M2] let yuk_lqino_sn_dc1 g1 g2 g3 = [ ((D (-g3), Sneutrino (-g2), LQino g1), FBF (-1, Psibar, SLR, Psi), G_LQ_EC_UC (true,M2,g1,g2,g3)) ] let yuk_lqino_sn_dc2 g1 g2 g3 = [ ((LQino (-g1), Sneutrino g2, D g3), FBF (-1, Psibar, SLR, Psi), G_LQ_EC_UC (false,M2,g1,g2,g3)) ] let yuk_lqino_ec_su1' g1 g2 g3 m = let cm = chg m in [ ((LQino (-g1), Sup (m,g3), L g2), FBF (1, Psibar, SLR, Psi), G_LQ_EC_UC (true,cm,g1,g2,g3)) ] let yuk_lqino_ec_su1 g1 g2 g3 = ThoList.flatmap (yuk_lqino_ec_su1' g1 g2 g3) [M1;M2] let yuk_lqino_ec_su2' g1 g2 g3 m = let cm = chg m in [ ((L (-g2), Sup (m,-g3), LQino (g1)), FBF (1, Psibar, SLR, Psi), G_LQ_EC_UC (false,cm,g1,g2,g3)) ] let yuk_lqino_ec_su2 g1 g2 g3 = ThoList.flatmap (yuk_lqino_ec_su2' g1 g2 g3) [M1;M2] let yuk_lqino_nc_sd1 g1 g2 g3 = [ ((LQino (-g1), Sdown (M1,g3), N g2), FBF (-1, Psibar, SLR, Psi), G_LQ_EC_UC (true,M2,g1,g2,g3)) ] let yuk_lqino_nc_sd2 g1 g2 g3 = [ ((N (-g2), Sdown (M1,-g3), LQino (g1)), FBF (-1, Psibar, SLR, Psi), G_LQ_EC_UC (false,M2,g1,g2,g3)) ] let yuk_lq_ec_uc' g1 g2 g3 m = [ ((L (-g2), LQ (m,g1), U (-g3)), BBB (1, Psibar, SLR, Psibar), G_LQ_EC_UC (false,m,g1,g2,g3)) ] let yuk_lq_ec_uc g1 g2 g3 = ThoList.flatmap (yuk_lq_ec_uc' g1 g2 g3) [M1;M2] let yuk_lq_ec_uc2' g1 g2 g3 m = [ ((L (g2), LQ (m,-g1), U (g3)), PBP (1, Psi, SLR, Psi), G_LQ_EC_UC (true,m,g1,g2,g3)) ] let yuk_lq_ec_uc2 g1 g2 g3 = ThoList.flatmap (yuk_lq_ec_uc2' g1 g2 g3) [M1;M2] let yuk_lq_nc_dc g1 g2 g3 = [ ((N (-g2), LQ (M2,g1), D (-g3)), BBB (-1, Psibar, SLR, Psibar), G_LQ_EC_UC (false,M2,g1,g2,g3)) ] let yuk_lq_nc_dc2 g1 g2 g3 = [ ((N (g2), LQ (M2,-g1), D (g3)), PBP (-1, Psi, SLR, Psi), G_LQ_EC_UC (true,M2,g1,g2,g3)) ] (*** Daniel Wiesler: LQ - F-Term w/ vev ***) let lq_se_su' g1 g2 g3 m1 m2 m3 = [ ((LQ (m1,g1), Slepton (m2,-g2), Sup (m3,-g3)), Scalar_Scalar_Scalar 1, G_LQ_SSU (m1,m2,m3,g1,g2,g3)) ] let lq_se_su g1 g2 g3 = List.flatten (Product.list3 (lq_se_su' g1 g2 g3) [M1;M2] [M1;M2] [M1;M2] ) let lq_snu_sd' g1 g2 g3 m1 m2 = [ ((LQ (m1,g1), Sdown (m2,-g2), Sneutrino (-g3)), Scalar_Scalar_Scalar 1, G_LQ_SSD (m1,m2,g1,g2,g3)) ] let lq_snu_sd g1 g2 g3 = List.flatten (Product.list2 (lq_snu_sd' g1 g2 g3) [M1;M2] [M1;M2] ) (*** Daniel Wiesler: LQ - Higgs ***) let lq_shiggs' g1 s g2 m1 m2 = [ ((LQ (m1,g1), SHiggs s, LQ (m2,-g2)), Scalar_Scalar_Scalar 1, G_LQ_S (m1,m2,g1,s,g2))] let lq_shiggs g1 s g2 = List.flatten ( Product.list2 (lq_shiggs' g1 s g2) [M1;M2] [M1;M2]) let lq_phiggs' g1 p g2 m1 m2 = [ ((LQ (m1,g1), PHiggs p, LQ (m2,-g2)), Scalar_Scalar_Scalar 1, G_LQ_P (m1,m2,g1,p,g2))] let lq_phiggs g1 p g2 = List.flatten ( Product.list2 (lq_phiggs' g1 p g2) [M1;M2] [M1;M2]) let yuk_lqino_shiggs g1 s g2 = [ ((LQino (-g1), SHiggs s, LQino g2), FBF (1, Psibar, SLR, Psi), G_YUK_LQ_S (g1,s,g2)) ] let yuk_lqino_phiggs g1 p g2 = [ ((LQino (-g1), PHiggs p, LQino g2), FBF (1, Psibar, SLR, Psi), G_YUK_LQ_P (g1,p,g2)) ] (*** Daniel Wiesler: LQ - Neutralinos. ***) let lqino_lq_neu' n g1 g2 m = [ ((Neutralino n, LQ (m,-g1), LQino g2), FBF (1, Chibar, SLR, Psi), G_LQ_NEU (m,g1,g2,n)) ] let lqino_lq_neu n g1 g2 = ThoList.flatmap (lqino_lq_neu' n g1 g2) [M1;M2] let lqino_lq_neu2' n g1 g2 m = [ ((LQino (-g2), LQ (m,g1), Neutralino n), FBF (1, Psibar, SLR, Chi), G_LQ_NEU (m,g1,g2,n)) ] let lqino_lq_neu2 n g1 g2 = ThoList.flatmap (lqino_lq_neu2' n g1 g2) [M1;M2] (*** Daniel Wiesler: LQ-LQino-Gluino ***) let lqino_lq_gg' g1 g2 m = [ ((Gluino, LQ (m,-g1), LQino g2), FBF (1, Chibar, SLR, Psi), G_LQ_GG (m,g1,g2)) ] let lqino_lq_gg g1 g2 = ThoList.flatmap (lqino_lq_gg' g1 g2) [M1;M2] (*** Daniel Wiesler: LQ - Gauge ***) let col_lqino_currents g = [ ((LQino (-g), Gl, LQino g), FBF ((-1), Psibar, V, Psi), Gs)] let neutr_lqino_current g = [ ((LQino (-g), Z, LQino g), FBF (1, Psibar, V, Psi), G_NLQC)] let col_lq_currents m g = [ ((Gl, LQ (m,-g), LQ (m,g)), Vector_Scalar_Scalar (-1), Gs)] let lq_neutr_Z g m1 m2 = [ ((Z, LQ (m1,-g), LQ (m2,g)), Vector_Scalar_Scalar (-1), G_ZLQ (g,m1,m2))] let em_lq_currents g m = [ ((Ga, LQ (m,-g), LQ (m,g)), Vector_Scalar_Scalar 1, Q_down)] let em_lqino_currents g = [ ((LQino (-g), Ga, LQino g), FBF (1, Psibar, V, Psi), Q_down)] let gluon2_lq2' g m = [ ((LQ (m,g), LQ (m,-g), Gl, Gl), Scalar2_Vector2 2, G_GlGlLQLQ)] let gluon2_lq2 g = ThoList.flatmap (gluon2_lq2' g) [M1;M2] let lq_gauge4' g m = [ ((Z, Z, LQ (m,g), LQ (m,-g)), Scalar2_Vector2 1, G_ZZLQLQ); ((Z, Ga, LQ (m,g), LQ (m,-g)), Scalar2_Vector2 1, G_ZPLQLQ); ((Ga, Ga, LQ (m,g), LQ (m,-g)), Scalar2_Vector2 1, G_PPLQLQ)] let lq_gauge4 g = ThoList.flatmap (lq_gauge4' g) [M1;M2] let lq_gg_gauge2' g m = [ ((Z, Gl, LQ (m,g), LQ (m,-g)), Scalar2_Vector2 1, G_ZGlLQLQ); ((Ga, Gl, LQ (m,g), LQ (m,-g)), Scalar2_Vector2 1, G_PGlLQLQ)] let lq_gg_gauge2 g = ThoList.flatmap (lq_gg_gauge2' g) [M1;M2] let col_sfermion_currents g m = [ ((Gl, Sup (m,-g), Sup (m,g)), Vector_Scalar_Scalar (-1), Gs); ((Gl, Sdown (m,-g), Sdown (m,g)), Vector_Scalar_Scalar (-1), Gs)] (*** REVISED: Compatible with CD+. **FB*) let triple_gauge = [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_G_S)] (*** REVISED: Independent of the sign of CD. **FB*) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let quartic_gauge = [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_PZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_PPWW; (Gl, Gl, Gl, Gl), gauge4, G_SS] (* The [Scalar_Vector_Vector] couplings do not depend on the choice of the sign of the covariant derivative since they are quadratic in the gauge couplings. *) (* JR: Only the first charged Higgs. *) (*** REVISED: Compatible with CD+. ***) (*** Revision: 2005-03-10: first two vertices corrected. ***) (*** REVISED: Felix Braam: Compact version using new COMBOS*) (*** REVISED: Felix Braam: Couplings adjusted to FF-convention*) let gauge_higgs_WPC p= [ ((Wm, CHiggs HC1, PHiggs p), Vector_Scalar_Scalar 1, G_GH_WPC p); ((Wp, CHiggs HC1c, PHiggs p), Vector_Scalar_Scalar 1, G_GH_WPC p)] let gauge_higgs_WSC s= [((Wm, CHiggs HC1, SHiggs s),Vector_Scalar_Scalar 1, G_GH_WSC s); ((Wp, CHiggs HC1c, SHiggs s),Vector_Scalar_Scalar (-1), G_GH_WSC s)] let gauge_higgs_ZSP s p = [((Z, SHiggs s, PHiggs p),Vector_Scalar_Scalar 1, G_GH_ZSP (s,p))] let gauge_higgs_WWS s= ((SHiggs s, Wp, Wm),Scalar_Vector_Vector 1, G_GH_WWS s) let gauge_higgs_ZZS s= ((SHiggs s, Z, Z), Scalar_Vector_Vector 1, G_GH_ZZS s) let gauge_higgs_ZCC = ((Z, CHiggs HC1, CHiggs HC1c),Vector_Scalar_Scalar 1, G_GH_ZCC ) let gauge_higgs_GaCC = ((Ga, CHiggs HC1, CHiggs HC1c),Vector_Scalar_Scalar 1, G_GH_GaCC ) let gauge_higgs = ThoList.flatmap gauge_higgs_WPC [P1;P2] @ ThoList.flatmap gauge_higgs_WSC [S1;S2;S3] @ List.flatten (Product.list2 gauge_higgs_ZSP [S1;S2;S3] [P1;P2]) @ List.map gauge_higgs_WWS [S1;S2;S3] @ List.map gauge_higgs_ZZS [S1;S2;S3] @ [gauge_higgs_ZCC] @ [gauge_higgs_GaCC] (*** REVISED: Compact version using new COMBOS*) (*** REVISED: Couplings adjusted to FF-convention*) let gauge_higgs4_ZZPP (p1,p2) = ((PHiggs p1, PHiggs p2, Z, Z), Scalar2_Vector2 1, G_GH4_ZZPP (p1,p2)) let gauge_higgs4_ZZSS (s1,s2) = ((SHiggs s1, SHiggs s2 , Z, Z), Scalar2_Vector2 1, G_GH4_ZZSS (s1,s2)) (* JR: Only the first charged Higgs. *) let gauge_higgs4_ZZCC = ((CHiggs HC1, CHiggs HC1c, Z, Z), Scalar2_Vector2 1, G_GH4_ZZCC) let gauge_higgs4_GaGaCC = ((CHiggs HC1, CHiggs HC1c, Ga, Ga), Scalar2_Vector2 1, G_GH4_GaGaCC) let gauge_higgs4_ZGaCC = ((CHiggs HC1, CHiggs HC1c, Ga, Z), Scalar2_Vector2 1, G_GH4_ZGaCC ) let gauge_higgs4_WWCC = ((CHiggs HC1, CHiggs HC1c, Wp, Wm), Scalar2_Vector2 1, G_GH4_WWCC ) let gauge_higgs4_WWPP (p1,p2) = ((PHiggs p1, PHiggs p2, Wp, Wm), Scalar2_Vector2 1, G_GH4_WWPP (p1,p2)) let gauge_higgs4_WWSS (s1,s2) = ((SHiggs s1, SHiggs s2, Wp, Wm), Scalar2_Vector2 1, G_GH4_WWSS (s1,s2)) (* JR: Only the first charged Higgs. *) let gauge_higgs4_ZWSC s = [ ((CHiggs HC1, SHiggs s, Wm, Z), Scalar2_Vector2 1, G_GH4_ZWSC s); ((CHiggs HC1c, SHiggs s, Wp, Z), Scalar2_Vector2 1, G_GH4_ZWSC s)] let gauge_higgs4_GaWSC s = [ ((CHiggs HC1, SHiggs s, Wm, Ga), Scalar2_Vector2 1, G_GH4_GaWSC s); ((CHiggs HC1c, SHiggs s, Wp, Ga), Scalar2_Vector2 1, G_GH4_GaWSC s) ] let gauge_higgs4_ZWPC p = [ ((CHiggs HC1, PHiggs p, Wm, Z), Scalar2_Vector2 1, G_GH4_ZWPC p); ((CHiggs HC1c, PHiggs p, Wp, Z), Scalar2_Vector2 (-1), G_GH4_ZWPC p)] let gauge_higgs4_GaWPC p = [ ((CHiggs HC1, PHiggs p, Wm, Ga), Scalar2_Vector2 1, G_GH4_GaWPC p); ((CHiggs HC1c, PHiggs p, Wp, Ga), Scalar2_Vector2 (-1), G_GH4_GaWPC p) ] let gauge_higgs4 = List.map gauge_higgs4_ZZPP (pairs [P1;P2]) @ List.map gauge_higgs4_ZZSS (pairs [S1;S2;S3]) @ [gauge_higgs4_ZZCC] @ [gauge_higgs4_GaGaCC] @ [gauge_higgs4_ZGaCC] @ [gauge_higgs4_WWCC] @ List.map gauge_higgs4_WWPP (pairs [P1;P2]) @ List.map gauge_higgs4_WWSS (pairs [S1;S2;S3]) @ ThoList.flatmap gauge_higgs4_ZWSC [S1;S2;S3] @ ThoList.flatmap gauge_higgs4_GaWSC [S1;S2;S3] @ ThoList.flatmap gauge_higgs4_ZWPC [P1;P2] @ ThoList.flatmap gauge_higgs4_GaWPC [P1;P2] (*** Added by Felix Braam. ***) let gauge_sfermion4' g m1 m2 = [ ((Wp, Wm, Slepton (m1,g), Slepton (m2,-g)), Scalar2_Vector2 1, G_WWSFSF (SL,g,m1,m2)); ((Z, Ga, Slepton (m1,g), Slepton (m2,-g)), Scalar2_Vector2 1, G_ZPSFSF (SL,g,m1,m2)); ((Z, Z, Slepton (m1,g), Slepton (m2,-g)), Scalar2_Vector2 1, G_ZZSFSF (SL,g,m1,m2)); ((Wp, Wm, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 1, G_WWSFSF (SU,g,m1,m2)); ((Wp, Wm, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 1, G_WWSFSF (SD,g,m1,m2)); ((Z, Z, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 1, G_ZZSFSF (SU,g,m1,m2)); ((Z, Z, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 1, G_ZZSFSF (SD,g,m1,m2)); ((Z, Ga, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 1, G_ZPSFSF (SU,g,m1,m2)); ((Z, Ga, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 1, G_ZPSFSF (SD,g,m1,m2)) ] let gauge_sfermion4'' g m = [ ((Wp, Ga, Slepton (m,g), Sneutrino (-g)), Scalar2_Vector2 1, G_WPSLSN (false,g,m)); ((Wm, Ga, Slepton (m,-g), Sneutrino g), Scalar2_Vector2 1, G_WPSLSN (true,g,m)); ((Wp, Z, Slepton (m,g), Sneutrino (-g)), Scalar2_Vector2 1, G_WZSLSN (false,g,m)); ((Wm, Z, Slepton (m,-g), Sneutrino g), Scalar2_Vector2 1, G_WZSLSN (true,g,m)); ((Ga, Ga, Slepton (m,g), Slepton (m,-g)), Scalar2_Vector2 1, G_PPSFSF SL); ((Ga, Ga, Sup (m,g), Sup (m,-g)), Scalar2_Vector2 1, G_PPSFSF SU); ((Ga, Ga, Sdown (m,g), Sdown (m,-g)), Scalar2_Vector2 1, G_PPSFSF SD)] let gauge_sfermion4 g = List.flatten (Product.list2 (gauge_sfermion4' g) [M1;M2] [M1;M2]) @ ThoList.flatmap (gauge_sfermion4'' g) [M1;M2] @ [ ((Wp, Wm, Sneutrino g, Sneutrino (-g)), Scalar2_Vector2 1, G_WWSFSF (SN,g,M1,M1)); ((Z, Z, Sneutrino g, Sneutrino (-g)), Scalar2_Vector2 1, G_ZZSFSF (SN,g,M1,M1)) ] (*** Modified by Felix Braam. ***) let gauge_squark4'' g h m1 m2 = [ ((Wp, Ga, Sup (m1,-g), Sdown (m2,h)), Scalar2_Vector2 1, G_WPSUSD (false,m1,m2,g,h)); ((Wm, Ga, Sup (m1,g), Sdown (m2,-h)), Scalar2_Vector2 1, G_WPSUSD (true,m1,m2,g,h)); ((Wp, Z, Sup (m1,-g), Sdown (m2,h)), Scalar2_Vector2 1, G_WZSUSD (false,m1,m2,g,h)); ((Wm, Z, Sup (m1,g), Sdown (m2,-h)), Scalar2_Vector2 1, G_WZSUSD (true,m1,m2,g,h)) ] let gauge_squark4' g h = List.flatten (Product.list2 (gauge_squark4'' g h) [M1;M2] [M1;M2]) let gauge_squark4 = if Flags.ckm_present then List.flatten (Product.list2 gauge_squark4' [1;2;3] [1;2;3]) else ThoList.flatmap (fun g -> gauge_squark4' g g) [1;2;3] let gluon_w_squark'' g h m1 m2 = [ ((Gl, Wp, Sup (m1,-g), Sdown (m2,h)), Scalar2_Vector2 1, G_GlWSUSD (false,m1,m2,g,h)); ((Gl, Wm, Sup (m1,g), Sdown (m2,-h)), Scalar2_Vector2 1, G_GlWSUSD (true,m1,m2,g,h)) ] let gluon_w_squark' g h = List.flatten (Product.list2 (gluon_w_squark'' g h) [M1;M2] [M1;M2]) let gluon_w_squark = if Flags.ckm_present then List.flatten (Product.list2 gluon_w_squark' [1;2;3] [1;2;3]) else ThoList.flatmap (fun g -> gluon_w_squark' g g) [1;2;3] (*** Modified by Felix Braam. ***) let gluon_gauge_squark' g m1 m2 = [ ((Gl, Z, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 2, G_GlZSFSF (SU,g,m1,m2)); ((Gl, Z, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 2, G_GlZSFSF (SD,g,m1,m2)) ] let gluon_gauge_squark'' g m = [ ((Gl, Ga, Sup (m,g), Sup (m,-g)), Scalar2_Vector2 2, G_GlPSQSQ); ((Gl, Ga, Sdown (m,g), Sdown (m,-g)), Scalar2_Vector2 (-1), G_GlPSQSQ) ] (*** Modified by Felix Braam. ***) let gluon_gauge_squark g = List.flatten (Product.list2 (gluon_gauge_squark' g) [M1;M2] [M1;M2]) @ ThoList.flatmap (gluon_gauge_squark'' g) [M1;M2] let gluon2_squark2' g m = [ ((Gl, Gl, Sup (m,g), Sup (m,-g)), Scalar2_Vector2 2, G_GlGlSQSQ); ((Gl, Gl, Sdown (m,g), Sdown (m,-g)), Scalar2_Vector2 2, G_GlGlSQSQ) ] let gluon2_squark2 g = ThoList.flatmap (gluon2_squark2' g) [M1;M2] (* JR: Only the first charged Higgs. *) (*** REVISED: Independent of the sign of CD. ***) (*** REVISED: Felix Braam: Compact version using new COMBOS *) (*** REVISED: Felix Braam: Couplings adjusted to FF-convention *) let higgs_SCC s = ((CHiggs HC1, CHiggs HC1c, SHiggs s), Scalar_Scalar_Scalar 1, G_H3_SCC s ) let higgs_SSS (s1,s2,s3)= ((SHiggs s1, SHiggs s2, SHiggs s3), Scalar_Scalar_Scalar 1, G_H3_SSS (s1,s2,s3)) let higgs_SPP (p1,p2,s) = ((SHiggs s, PHiggs p1, PHiggs p2), Scalar_Scalar_Scalar 1, G_H3_SPP (s,p1,p2)) let higgs = List.map higgs_SCC [S1;S2;S3]@ List.map higgs_SSS (triples [S1;S2;S3])@ List.map higgs_SPP (two_and_one [P1;P2] [S1;S2;S3]) let higgs4 = [] (* The vertices of the type Higgs - Sfermion - Sfermion are independent of the choice of the CD sign since they are quadratic in the gauge coupling. *) (* JR: Only the first charged Higgs. *) (*** REVISED: Independent of the sign of CD. ***) let higgs_sneutrino' s g = ((SHiggs s, Sneutrino g, Sneutrino (-g)), Scalar_Scalar_Scalar 1, G_SFSFS (s,SN,g,M1,M1)) let higgs_sneutrino'' g m = [((CHiggs HC1, Sneutrino (-g), Slepton (m,g)), Scalar_Scalar_Scalar 1, G_HSNSL (false,g,m)); ((CHiggs HC1c, Sneutrino g, Slepton (m,-g)), Scalar_Scalar_Scalar 1, G_HSNSL (true,g,m))] let higgs_sneutrino = Product.list2 higgs_sneutrino' [S1;S2;S3] [1;2;3] @ List.flatten ( Product.list2 higgs_sneutrino'' [1;2;3] [M1;M2] ) (* Under the assumption that there is no mixing between the left- and right-handed sfermions for the first two generations there is only a coupling of the form Higgs - sfermion1 - sfermion2 for the third generation. All the others are suppressed by $m_f/M_W$. *) (*** REVISED: Independent of the sign of CD. ***) let higgs_sfermion_S s g m1 m2 = [ ((SHiggs s, Slepton (m1,g), Slepton (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFS (s,SL,g,m1,m2)); ((SHiggs s, Sup (m1,g), Sup (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFS (s,SU,g,m1,m2)); ((SHiggs s, Sdown (m1,g), Sdown (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFS (s,SD,g,m1,m2))] let higgs_sfermion' g m1 m2 = (higgs_sfermion_S S1 g m1 m2) @ (higgs_sfermion_S S2 g m1 m2) @ (higgs_sfermion_S S3 g m1 m2) let higgs_sfermion_P p g m1 m2 = [ ((PHiggs p, Slepton (m1,g), Slepton (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFP (p,SL,g,m1,m2)); ((PHiggs p, Sup (m1,g), Sup (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFP (p,SU,g,m1,m2)); ((PHiggs p, Sdown (m1,g), Sdown (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFP (p,SD,g,m1,m2)) ] let higgs_sfermion'' g m1 m2 = (higgs_sfermion_P P1 g m1 m2) @ (higgs_sfermion_P P2 g m1 m2) let higgs_sfermion = List.flatten (Product.list3 higgs_sfermion' [1;2;3] [M1;M2] [M1;M2]) @ List.flatten (Product.list3 higgs_sfermion'' [1;2;3] [M1;M2] [M1;M2]) (* JR: Only the first charged Higgs. *) (*** REVISED: Independent of the sign of CD. ***) let higgs_squark' g h m1 m2 = [ ((CHiggs HC1, Sup (m1,-g), Sdown (m2,h)), Scalar_Scalar_Scalar 1, G_HSUSD (false,m1,m2,g,h)); ((CHiggs HC1c, Sup (m1,g), Sdown (m2,-h)), Scalar_Scalar_Scalar 1, G_HSUSD (true,m1,m2,g,h)) ] let higgs_squark_a g h = higgs_squark' g h M1 M1 let higgs_squark_b (g,h) = List.flatten (Product.list2 (higgs_squark' g h) [M1;M2] [M1;M2]) let higgs_squark = if Flags.ckm_present then List.flatten (Product.list2 higgs_squark_a [1;2] [1;2]) @ ThoList.flatmap higgs_squark_b [(1,3);(2,3);(3,3);(3,1);(3,2)] else higgs_squark_a 1 1 @ higgs_squark_a 2 2 @ higgs_squark_b (3,3) let vertices3 = (ThoList.flatmap electromagnetic_currents_3 [1;2;3] @ ThoList.flatmap electromagnetic_currents_2 [C1;C2] @ List.flatten (Product.list2 electromagnetic_sfermion_currents [1;2;3] [M1;M2]) @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap neutral_sfermion_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ List.flatten (Product.list2 charged_slepton_currents [1;2;3] [M1;M2]) @ (if Flags.ckm_present then List.flatten (Product.list2 charged_quark_currents [1;2;3] [1;2;3]) @ List.flatten (Product.list2 charged_squark_currents [1;2;3] [1;2;3]) @ ThoList.flatmap yukawa_higgs_quark [(1,3);(2,3);(3,3);(3,1);(3,2)] else charged_quark_currents 1 1 @ charged_quark_currents 2 2 @ charged_quark_currents 3 3 @ charged_squark_currents 1 1 @ charged_squark_currents 2 2 @ charged_squark_currents 3 3 @ ThoList.flatmap yukawa_higgs_quark [(3,3)]) @ (*i ThoList.flatmap yukawa_higgs [1;2;3] @ i*) yukawa_higgs 3 @ yukawa_n @ ThoList.flatmap yukawa_c [C1;C2] @ ThoList.flatmap yukawa_cq [C1;C2] @ List.flatten (Product.list2 charged_chargino_currents [N1;N2;N3;N4;N5] [C1;C2]) @ triple_gauge @ ThoList.flatmap neutral_Z (pairs [N1;N2;N3;N4;N5]) @ Product.list2 charged_Z [C1;C2] [C1;C2] @ gauge_higgs @ higgs @ yukawa_higgs_2 @ (*i List.flatten (Product.list2 yukawa_higgs_quark [1;2;3] [1;2;3]) @ i*) List.flatten (Product.list2 higgs_charg_neutr [N1;N2;N3;N4;N5] [C1;C2]) @ higgs_neutr @ higgs_sneutrino @ higgs_sfermion @ higgs_squark @ yukawa_v @ ThoList.flatmap col_currents [1;2;3] @ List.flatten (Product.list2 col_sfermion_currents [1;2;3] [M1;M2])) @ List.flatten (Product.list2 col_lq_currents [M1;M2] [1;2;3]) @ ThoList.flatmap col_lqino_currents [1;2;3] @ ThoList.flatmap em_lqino_currents [1;2;3] @ ThoList.flatmap neutr_lqino_current [1;2;3] @ List.flatten (Product.list3 yuk_lqino_se_uc1 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lqino_se_uc2 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lqino_ec_su1 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lqino_ec_su2 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lqino_sn_dc1 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lqino_sn_dc2 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lqino_nc_sd1 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lqino_nc_sd2 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lq_ec_uc [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lq_ec_uc2 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lq_nc_dc [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 yuk_lq_nc_dc2 [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 lq_neutr_Z [1;2;3] [M1;M2] [M1;M2]) @ List.flatten (Product.list2 em_lq_currents [1;2;3] [M1;M2]) @ List.flatten (Product.list3 lq_shiggs [1;2;3] [S1;S2;S3;S4;S5;S6;S7;S8;S9] [1;2;3]) @ List.flatten (Product.list3 lq_phiggs [1;2;3] [P1;P2;P3;P4;P5;P6;P7] [1;2;3]) @ List.flatten (Product.list3 yuk_lqino_shiggs [1;2;3] [S1;S2;S3;S4;S5;S6;S7;S8;S9] [1;2;3]) @ List.flatten (Product.list3 yuk_lqino_phiggs [1;2;3] [P1;P2;P3;P4;P5;P6;P7] [1;2;3]) @ List.flatten (Product.list3 lqino_lq_neu nlist [1;2;3] [1;2;3]) @ List.flatten (Product.list3 lqino_lq_neu2 nlist [1;2;3] [1;2;3]) @ List.flatten (Product.list3 lq_se_su [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list3 lq_snu_sd [1;2;3] [1;2;3] [1;2;3]) @ List.flatten (Product.list2 lqino_lq_gg [1;2;3] [1;2;3]) let vertices4 = (quartic_gauge @ higgs4 @ gauge_higgs4 @ ThoList.flatmap gauge_sfermion4 [1;2;3] @ gauge_squark4 @ gluon_w_squark @ ThoList.flatmap gluon2_squark2 [1;2;3] @ ThoList.flatmap gluon_gauge_squark [1;2;3] @ ThoList.flatmap gluon2_lq2 [1;2;3] @ ThoList.flatmap lq_gauge4 [1;2;3] @ ThoList.flatmap lq_gg_gauge2 [1;2;3]) let vertices () = (vertices3, vertices4, []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 (* SLHA2-Nomenclature for neutral Higgses *) let flavor_of_string s = match s with | "e-" -> L 1 | "e+" -> L (-1) | "mu-" -> L 2 | "mu+" -> L (-2) | "tau-" -> L 3 | "tau+" -> L (-3) | "nue" -> N 1 | "nuebar" -> N (-1) | "numu" -> N 2 | "numubar" -> N (-2) | "nutau" -> N 3 | "nutaubar" -> N (-3) | "se1-" -> Slepton (M1,1) | "se1+" -> Slepton (M1,-1) | "smu1-" -> Slepton (M1,2) | "smu1+" -> Slepton (M1,-2) | "stau1-" -> Slepton (M1,3) | "stau1+" -> Slepton (M1,-3) | "se2-" -> Slepton (M2,1) | "se2+" -> Slepton (M2,-1) | "smu2-" -> Slepton (M2,2) | "smu2+" -> Slepton (M2,-2) | "stau2-" -> Slepton (M2,3) | "stau2+" -> Slepton (M2,-3) | "snue" -> Sneutrino 1 | "snue*" -> Sneutrino (-1) | "snumu" -> Sneutrino 2 | "snumu*" -> Sneutrino (-2) | "snutau" -> Sneutrino 3 | "snutau*" -> Sneutrino (-3) | "u" -> U 1 | "ubar" -> U (-1) | "c" -> U 2 | "cbar" -> U (-2) | "t" -> U 3 | "tbar" -> U (-3) | "d" -> D 1 | "dbar" -> D (-1) | "s" -> D 2 | "sbar" -> D (-2) | "b" -> D 3 | "bbar" -> D (-3) | "A" -> Ga | "Z" | "Z0" -> Z | "W+" -> Wp | "W-" -> Wm | "gl" | "g" -> Gl | "h01" -> SHiggs S1 | "h02" -> SHiggs S2 | "h03" -> SHiggs S3 | "A01" -> PHiggs P1 | "A02" -> PHiggs P2 | "h04" -> SHiggs S4 | "h05" -> SHiggs S5 | "h06" -> SHiggs S6 | "A03" -> PHiggs P3 | "A04" -> PHiggs P4 | "h07" -> SHiggs S7 | "h08" -> SHiggs S8 | "h09" -> SHiggs S9 | "A05" -> PHiggs P5 | "A06" -> PHiggs P6 | "A07" -> PHiggs P7 (* JR: Only the first charged Higgs. *) | "H+" -> CHiggs HC1 | "H-" -> CHiggs HC1c | "su1" -> Sup (M1,1) | "su1c" -> Sup (M1,-1) | "sc1" -> Sup (M1,2) | "sc1c" -> Sup (M1,-2) | "st1" -> Sup (M1,3) | "st1c" -> Sup (M1,-3) | "su2" -> Sup (M2,1) | "su2c" -> Sup (M2,-1) | "sc2" -> Sup (M2,2) | "sc2c" -> Sup (M2,-2) | "st2" -> Sup (M2,3) | "st2c" -> Sup (M2,-3) | "sgl" | "sg" -> Gluino | "sd1" -> Sdown (M1,1) | "sd1c" -> Sdown (M1,-1) | "ss1" -> Sdown (M1,2) | "ss1c" -> Sdown (M1,-2) | "sb1" -> Sdown (M1,3) | "sb1c" -> Sdown (M1,-3) | "sd2" -> Sdown (M2,1) | "sd2c" -> Sdown (M2,-1) | "ss2" -> Sdown (M2,2) | "ss2c" -> Sdown (M2,-2) | "sb2" -> Sdown (M2,3) | "sb2c" -> Sdown (M2,-3) | "neu1" -> Neutralino N1 | "neu2" -> Neutralino N2 | "neu3" -> Neutralino N3 | "neu4" -> Neutralino N4 | "neu5" -> Neutralino N5 | "neu6" -> Neutralino N6 | "neu7" -> Neutralino N7 | "neu8" -> Neutralino N8 | "neu9" -> Neutralino N9 | "neu10" -> Neutralino N10 | "neu11" -> Neutralino N11 | "ch1+" -> Chargino C1 | "ch2+" -> Chargino C2 | "ch1-" -> Chargino C1c | "ch2-" -> Chargino C2c | "ch3+" -> Chargino C3 | "ch4+" -> Chargino C4 | "ch3-" -> Chargino C3c | "ch4-" -> Chargino C4c | "lq11" -> LQ (M1,1) | "lq11c" -> LQ (M1,-1) | "lq12" -> LQ (M2,1) | "lq12c" -> LQ (M2,-1) | "lq21" -> LQ (M1,2) | "lq21c" -> LQ (M1,-2) | "lq22" -> LQ (M2,2) | "lq22c" -> LQ (M2,-2) | "lq31" -> LQ (M1,3) | "lq31c" -> LQ (M1,-3) | "lq32" -> LQ (M2,3) | "lq32c" -> LQ (M2,-3) | "lqino1" -> LQino 1 | "lqino1b" -> LQino (-1) | "lqino2" -> LQino 2 | "lqino2b" -> LQino (-2) | "lqino3" -> LQino 3 | "lqino3b" -> LQino (-3) | s -> invalid_arg ("HUBABUBA: %s Modellib_PSSSM.ExtMSSM.flavor_of_string:" ^ s) let flavor_to_string = function | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_string: invalid down type quark" | Gl -> "gl" | Gluino -> "sgl" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" | SHiggs S1 -> "h01" | SHiggs S2 -> "h02" | SHiggs S3 -> "h03" | PHiggs P1 -> "A01" | PHiggs P2 -> "A02" | SHiggs S4 -> "h04" | SHiggs S5 -> "h05" | SHiggs S6 -> "h06" | PHiggs P3 -> "A03" | PHiggs P4 -> "A04" | SHiggs S7 -> "h07" | SHiggs S8 -> "h08" | SHiggs S9 -> "h09" | PHiggs P5 -> "A05" | PHiggs P6 -> "A06" | PHiggs P7 -> "A07" (* JR: Only the first charged Higgs. *) | CHiggs HC1 -> "H+" | CHiggs HC1c -> "H-" | CHiggs HC2 -> "HX_1+" | CHiggs HC2c -> "HX_1-" | CHiggs HC3 -> "HX_2+" | CHiggs HC3c -> "HX_2-" | CHiggs HC4 -> "HX_3+" | CHiggs HC4c -> "HX_3-" | CHiggs HC5 -> "HX_4+" | CHiggs HC5c -> "HX_4-" | Slepton (M1,1) -> "se1-" | Slepton (M1,-1) -> "se1+" | Slepton (M1,2) -> "smu1-" | Slepton (M1,-2) -> "smu1+" | Slepton (M1,3) -> "stau1-" | Slepton (M1,-3) -> "stau1+" | Slepton (M2,1) -> "se2-" | Slepton (M2,-1) -> "se2+" | Slepton (M2,2) -> "smu2-" | Slepton (M2,-2) -> "smu2+" | Slepton (M2,3) -> "stau2-" | Slepton (M2,-3) -> "stau2+" | Sneutrino 1 -> "snue" | Sneutrino (-1) -> "snue*" | Sneutrino 2 -> "snumu" | Sneutrino (-2) -> "snumu*" | Sneutrino 3 -> "snutau" | Sneutrino (-3) -> "snutau*" | Sup (M1,1) -> "su1" | Sup (M1,-1) -> "su1c" | Sup (M1,2) -> "sc1" | Sup (M1,-2) -> "sc1c" | Sup (M1,3) -> "st1" | Sup (M1,-3) -> "st1c" | Sup (M2,1) -> "su2" | Sup (M2,-1) -> "su2c" | Sup (M2,2) -> "sc2" | Sup (M2,-2) -> "sc2c" | Sup (M2,3) -> "st2" | Sup (M2,-3) -> "st2c" | Sdown (M1,1) -> "sd1" | Sdown (M1,-1) -> "sd1c" | Sdown (M1,2) -> "ss1" | Sdown (M1,-2) -> "ss1c" | Sdown (M1,3) -> "sb1" | Sdown (M1,-3) -> "sb1c" | Sdown (M2,1) -> "sd2" | Sdown (M2,-1) -> "sd2c" | Sdown (M2,2) -> "ss2" | Sdown (M2,-2) -> "ss2c" | Sdown (M2,3) -> "sb2" | Sdown (M2,-3) -> "sb2c" | Neutralino n -> "neu" ^ string_of_neu n | Chargino C1 -> "ch1+" | Chargino C1c -> "ch1-" | Chargino C2 -> "ch2+" | Chargino C2c -> "ch2-" | Chargino C3 -> "ch3+" | Chargino C3c -> "ch3-" | Chargino C4 -> "ch4+" | Chargino C4c -> "ch4-" | LQ (M1,1) -> "lq11" | LQ (M1,-1) -> "lq11c" | LQ (M2,1) -> "lq12" | LQ (M2,-1) -> "lq12c" | LQ (M1,2) -> "lq21" | LQ (M1,-2) -> "lq21c" | LQ (M2,2) -> "lq22" | LQ (M2,-2) -> "lq22c" | LQ (M1,3) -> "lq31" | LQ (M1,-3) -> "lq31c" | LQ (M2,3) -> "lq32" | LQ (M2,-3) -> "lq32c" | LQino 1 -> "lqino1" | LQino (-1) -> "lqino1b" | LQino 2 -> "lqino2" | LQino (-2) -> "lqino2b" | LQino 3 -> "lqino3" | LQino (-3) -> "lqino3b" | _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_string" let flavor_to_TeX = function | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | L _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid lepton" | N _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid neutrino" | U _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid up type quark" | D _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid down type quark" | Gl -> "g" | Gluino -> "\\widetilde{g}" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" | SHiggs S1 -> "S_1" | SHiggs S2 -> "S_2" | SHiggs S3 -> "S_3" | SHiggs S4 -> "S_4" | SHiggs S5 -> "S_5" | SHiggs S6 -> "S_6" | SHiggs S7 -> "S_7" | SHiggs S8 -> "S_8" | SHiggs S9 -> "S_9" | PHiggs P1 -> "P_1" | PHiggs P2 -> "P_2" | PHiggs P3 -> "P_3" | PHiggs P4 -> "P_4" | PHiggs P5 -> "P_5" | PHiggs P6 -> "P_6" | PHiggs P7 -> "P_7" | CHiggs HC1 -> "H^+" | CHiggs HC1c -> "H^-" | CHiggs HC2 -> "X_{H,1}^+" | CHiggs HC2c -> "X_{H,1}^-" | CHiggs HC3 -> "X_{H,2}^+" | CHiggs HC3c -> "X_{H,2}^-" | CHiggs HC4 -> "X_{H,3}^+" | CHiggs HC4c -> "X_{H,3}^-" | CHiggs HC5 -> "X_{H,4}^+" | CHiggs HC5c -> "X_{H,4}^-" | Slepton (M1,1) -> "\\widetilde{e}_1^-" | Slepton (M1,-1) -> "\\widetilde{e}_1^+" | Slepton (M1,2) -> "\\widetilde{\\mu}_1^-" | Slepton (M1,-2) -> "\\widetilde{\\mu}_1^+" | Slepton (M1,3) -> "\\widetilde{\\tau}_1^-" | Slepton (M1,-3) -> "\\widetilde{\\tau}_1^+" | Slepton (M2,1) -> "\\widetilde{e}_2^-" | Slepton (M2,-1) -> "\\widetilde{e}_2^+" | Slepton (M2,2) -> "\\widetilde{\\mu}_2^-" | Slepton (M2,-2) -> "\\widetilde{\\mu}_2^+" | Slepton (M2,3) -> "\\widetilde{\\tau}_2^-" | Slepton (M2,-3) -> "\\widetilde{\\tau}_2^+" | Sneutrino 1 -> "\\widetilde{\\nu}_e" | Sneutrino (-1) -> "\\widetilde{\\nu}_e^*" | Sneutrino 2 -> "\\widetilde{\\nu}_\\mu" | Sneutrino (-2) -> "\\widetilde{\\nu}_\\mu^*" | Sneutrino 3 -> "\\widetilde{\\nu}_\\tau" | Sneutrino (-3) -> "\\widetilde{\\nu}_\\tau^*" | Sup (M1,1) -> "\\widetilde{u}_1" | Sup (M1,-1) -> "\\widetilde{u}_1^*" | Sup (M1,2) -> "\\widetilde{c}_1" | Sup (M1,-2) -> "\\widetilde{c}_1^*" | Sup (M1,3) -> "\\widetilde{t}_1" | Sup (M1,-3) -> "\\widetilde{t}_1^*" | Sup (M2,1) -> "\\widetilde{u}_2" | Sup (M2,-1) -> "\\widetilde{u}_2^*" | Sup (M2,2) -> "\\widetilde{c}_2" | Sup (M2,-2) -> "\\widetilde{c}_2^*" | Sup (M2,3) -> "\\widetilde{t}_2" | Sup (M2,-3) -> "\\widetilde{t}_2^*" | Sdown (M1,1) -> "\\widetilde{d}_1" | Sdown (M1,-1) -> "\\widetilde{d}_1^*" | Sdown (M1,2) -> "\\widetilde{s}_1" | Sdown (M1,-2) -> "\\widetilde{s}_1^*" | Sdown (M1,3) -> "\\widetilde{b}_1" | Sdown (M1,-3) -> "\\widetilde{b}_1^*" | Sdown (M2,1) -> "\\widetilde{d}_2" | Sdown (M2,-1) -> "\\widetilde{d}_2^*" | Sdown (M2,2) -> "\\widetilde{s}_2" | Sdown (M2,-2) -> "\\widetilde{s}_2^*" | Sdown (M2,3) -> "\\widetilde{b}_2" | Sdown (M2,-3) -> "\\widetilde{b}_2^*" | Neutralino N1 -> "\\widetilde{\\chi}^0_1" | Neutralino N2 -> "\\widetilde{\\chi}^0_2" | Neutralino N3 -> "\\widetilde{\\chi}^0_3" | Neutralino N4 -> "\\widetilde{\\chi}^0_4" | Neutralino N5 -> "\\widetilde{\\chi}^0_5" | Neutralino N6 -> "\\widetilde{\\chi}^0_6" | Neutralino N7 -> "\\widetilde{\\chi}^0_7" | Neutralino N8 -> "\\widetilde{\\chi}^0_8" | Neutralino N9 -> "\\widetilde{\\chi}^0_9" | Neutralino N10 -> "\\widetilde{\\chi}^0_{10}" | Neutralino N11 -> "\\widetilde{\\chi}^0_{11}" | Slepton _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid slepton" | Sneutrino _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid sneutrino" | Sup _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid up type squark" | Sdown _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid down type squark" | Chargino C1 -> "\\widetilde{\\chi}_1^+" | Chargino C1c -> "\\widetilde{\\chi}_1^-" | Chargino C2 -> "\\widetilde{\\chi}_2^+" | Chargino C2c -> "\\widetilde{\\chi}_2^-" | Chargino C3 -> "\\widetilde{\\chi}_3^+" | Chargino C3c -> "\\widetilde{\\chi}_3^-" | Chargino C4 -> "\\widetilde{\\chi}_4^+" | Chargino C4c -> "\\widetilde{\\chi}_4^-" | LQ (M1,1) -> "D_{1,,1}" | LQ (M1,-1) -> "D_{1,,1}^*" | LQ (M2,1) -> "D_{1,,2}" | LQ (M2,-1) -> "D_{1,,2}^*" | LQ (M1,2) -> "D_{2,,1}" | LQ (M1,-2) -> "D_{2,,1}^*" | LQ (M2,2) -> "D_{2,,2}" | LQ (M2,-2) -> "D_{2,,2}^*" | LQ (M1,3) -> "D_{3,,1}" | LQ (M1,-3) -> "D_{3,,1}^*" | LQ (M2,3) -> "D_{3,,2}" | LQ (M2,-3) -> "D_{3,,2}^*" | LQino 1 -> "\\widetilde{D}_1" | LQino (-1) -> "\\bar\\widetilde{D}_1" | LQino 2 -> "\\widetilde{D}_2" | LQino (-2) -> "\\bar\\widetilde{D}_2" | LQino 3 -> "\\widetilde{D}_3" | LQino (-3) -> "\\bar\\widetilde{D}_3" | LQ _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid leptoquark type" | LQino _ -> invalid_arg "Modellib_PSSSM.ExtMSSM.flavor_to_TeX: invalid leptoquarkino type" let flavor_symbol = function | L g when g > 0 -> "l" ^ string_of_int g | L g -> "l" ^ string_of_int (abs g) ^ "b" | N g when g > 0 -> "n" ^ string_of_int g | N g -> "n" ^ string_of_int (abs g) ^ "b" | U g when g > 0 -> "u" ^ string_of_int g | U g -> "u" ^ string_of_int (abs g) ^ "b" | D g when g > 0 -> "d" ^ string_of_int g | D g -> "d" ^ string_of_int (abs g) ^ "b" | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" | Slepton (M1,g) when g > 0 -> "sl1" ^ string_of_int g | Slepton (M1,g) -> "sl1c" ^ string_of_int (abs g) | Slepton (M2,g) when g > 0 -> "sl2" ^ string_of_int g | Slepton (M2,g) -> "sl2c" ^ string_of_int (abs g) | Sneutrino g when g > 0 -> "sn" ^ string_of_int g | Sneutrino g -> "snc" ^ string_of_int (abs g) | Sup (M1,g) when g > 0 -> "su1" ^ string_of_int g | Sup (M1,g) -> "su1c" ^ string_of_int (abs g) | Sup (M2,g) when g > 0 -> "su2" ^ string_of_int g | Sup (M2,g) -> "su2c" ^ string_of_int (abs g) | Sdown (M1,g) when g > 0 -> "sd1" ^ string_of_int g | Sdown (M1,g) -> "sd1c" ^ string_of_int (abs g) | Sdown (M2,g) when g > 0 -> "sd2" ^ string_of_int g | Sdown (M2,g) -> "sd2c" ^ string_of_int (abs g) | Neutralino n -> "neu" ^ (string_of_neu n) | Chargino c when (int_of_char c) > 0 -> "cp" ^ string_of_char c | Chargino c -> "cm" ^ string_of_int (abs (int_of_char c)) | Gluino -> "sgl" | SHiggs s -> "h0" ^ (string_of_shiggs s) | PHiggs p -> "A0" ^ (string_of_phiggs p) | CHiggs HC1 -> "hp" | CHiggs HC1c -> "hm" | CHiggs _ -> invalid_arg "charged Higgs not yet implemented" | LQ (M1,g) when g > 0 -> "lq" ^ string_of_int g ^ "1" | LQ (M1,g) -> "lq" ^ string_of_int (abs g) ^ "1c" | LQ (M2,g) when g > 0 -> "lq" ^ string_of_int g ^ "2" | LQ (M2,g) -> "lq" ^ string_of_int (abs g) ^ "2c" | LQino g when g > 0 -> "lqino" ^ string_of_int g | LQino g -> "lqino" ^ string_of_int (abs g) ^ "b" let pdg = function | L g when g > 0 -> 9 + 2*g | L g -> - 9 + 2*g | N g when g > 0 -> 10 + 2*g | N g -> - 10 + 2*g | U g when g > 0 -> 2*g | U g -> 2*g | D g when g > 0 -> - 1 + 2*g | D g -> 1 + 2*g | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | SHiggs S1 -> 25 | SHiggs S2 -> 35 | PHiggs P1 -> 36 (* JR: Only the first charged Higgs. *) | CHiggs HC1 -> 37 | CHiggs HC1c -> (-37) | CHiggs _ -> invalid_arg "charged Higgs not yet implemented" | Slepton (M1,g) when g > 0 -> 1000009 + 2*g | Slepton (M1,g) -> - 1000009 + 2*g | Slepton (M2,g) when g > 0 -> 2000009 + 2*g | Slepton (M2,g) -> - 2000009 + 2*g | Sneutrino g when g > 0 -> 1000010 + 2*g | Sneutrino g -> - 1000010 + 2*g | Sup (M1,g) when g > 0 -> 1000000 + 2*g | Sup (M1,g) -> - 1000000 + 2*g | Sup (M2,g) when g > 0 -> 2000000 + 2*g | Sup (M2,g) -> - 2000000 + 2*g | Sdown (M1,g) when g > 0 -> 999999 + 2*g | Sdown (M1,g) -> - 999999 + 2*g | Sdown (M2,g) when g > 0 -> 1999999 + 2*g | Sdown (M2,g) -> - 1999999 + 2*g | Gluino -> 1000021 (* JR: only the first two charginos. *) | Chargino C1 -> 1000024 | Chargino C1c -> (-1000024) | Chargino C2 -> 1000037 | Chargino C2c -> (-1000037) | Chargino C3 -> 1000039 | Chargino C3c -> (-1000039) | Chargino C4 -> 1000041 | Chargino C4c -> (-1000041) | Neutralino N1 -> 1000022 | Neutralino N2 -> 1000023 | Neutralino N3 -> 1000025 | Neutralino N4 -> 1000035 (* According to SLHA2 (not anymore ?!?)*) | Neutralino N5 -> 1000045 | Neutralino N6 -> 1000046 | Neutralino N7 -> 1000047 | Neutralino N8 -> 1000048 | Neutralino N9 -> 1000049 | Neutralino N10 -> 1000050 | Neutralino N11 -> 1000051 | PHiggs P2 -> 46 | PHiggs P3 -> 47 | PHiggs P4 -> 48 | PHiggs P5 -> 49 | PHiggs P6 -> 50 | PHiggs P7 -> 51 | SHiggs S3 -> 45 | SHiggs S4 -> 52 | SHiggs S5 -> 53 | SHiggs S6 -> 54 | SHiggs S7 -> 55 | SHiggs S8 -> 56 | SHiggs S9 -> 57 | LQ (M1,g) when g > 0 -> 1000059 + g | LQ (M1,g) -> - 1000059 + g | LQ (M2,g) when g > 0 -> 2000059 + g | LQ (M2,g) -> - 2000059 + g | LQino g when g > 0 -> 59 + g | LQino g -> -59 + g (* We must take care of the pdg numbers for the two different kinds of sfermions in the MSSM. The particle data group in its Monte Carlo particle numbering scheme takes only into account mixtures of the third generation squarks and the stau. For the other sfermions we will use the number of the lefthanded field for the lighter mixed state and the one for the righthanded for the heavier. Below are the official pdg numbers from the Particle Data Group. In order not to produce arrays with some million entries in the Fortran code for the masses and the widths we introduce our private pdg numbering scheme which only extends not too far beyond 42. Our private scheme then has the following pdf numbers (for the sparticles the subscripts $L/R$ and $1/2$ are taken synonymously): \begin{center} \renewcommand{\arraystretch}{1.2} \begin{tabular}{|r|l|l|}\hline $d$ & down-quark & 1 \\\hline $u$ & up-quark & 2 \\\hline $s$ & strange-quark & 3 \\\hline $c$ & charm-quark & 4 \\\hline $b$ & bottom-quark & 5 \\\hline $t$ & top-quark & 6 \\\hline\hline $e^-$ & electron & 11 \\\hline $\nu_e$ & electron-neutrino & 12 \\\hline $\mu^-$ & muon & 13 \\\hline $\nu_\mu$ & muon-neutrino & 14 \\\hline $\tau^-$ & tau & 15 \\\hline $\nu_\tau$ & tau-neutrino & 16 \\\hline\hline $g$ & gluon & (9) 21 \\\hline $\gamma$ & photon & 22 \\\hline $Z^0$ & Z-boson & 23 \\\hline $W^+$ & W-boson & 24 \\\hline\hline $h^0$ & light Higgs boson & 25 \\\hline $H^0$ & heavy Higgs boson & 35 \\\hline $A^0$ & pseudoscalar Higgs & 36 \\\hline $H^+$ & charged Higgs & 37 \\\hline\hline $\tilde{d}_L$ & down-squark 1 & 41 \\\hline $\tilde{u}_L$ & up-squark 1 & 42 \\\hline $\tilde{s}_L$ & strange-squark 1 & 43 \\\hline $\tilde{c}_L$ & charm-squark 1 & 44 \\\hline $\tilde{b}_L$ & bottom-squark 1 & 45 \\\hline $\tilde{t}_L$ & top-squark 1 & 46 \\\hline $\tilde{d}_R$ & down-squark 2 & 47 \\\hline $\tilde{u}_R$ & up-squark 2 & 48 \\\hline $\tilde{s}_R$ & strange-squark 2 & 49 \\\hline $\tilde{c}_R$ & charm-squark 2 & 50 \\\hline $\tilde{b}_R$ & bottom-squark 2 & 51 \\\hline $\tilde{t}_R$ & top-squark 2 & 52 \\\hline\hline $\tilde{e}_L$ & selectron 1 & 53 \\\hline $\tilde{\nu}_{e,L}$ & electron-sneutrino & 54 \\\hline $\tilde{\mu}_L$ & smuon 1 & 55 \\\hline $\tilde{\nu}_{\mu,L}$ & muon-sneutrino & 56 \\\hline $\tilde{\tau}_L$ & stau 1 & 57 \\\hline $\tilde{\nu}_{\tau,L}$ & tau-sneutrino & 58 \\\hline $\tilde{e}_R$ & selectron 2 & 59 \\\hline $\tilde{\mu}_R$ & smuon 2 & 61 \\\hline $\tilde{\tau}_R$ & stau 2 & 63 \\\hline\hline $\tilde{g}$ & gluino & 64 \\\hline $\tilde{\chi}^0_1$ & neutralino 1 & 65 \\\hline $\tilde{\chi}^0_2$ & neutralino 2 & 66 \\\hline $\tilde{\chi}^0_3$ & neutralino 3 & 67 \\\hline $\tilde{\chi}^0_4$ & neutralino 4 & 68 \\\hline $\tilde{\chi}^0_4$ & neutralino 5 & 69 \\\hline $\tilde{\chi4}^+_1$ & chargino 1 & 70 \\\hline $\tilde{\chi}^+_2$ & chargino 2 & 71 \\\hline\hline $a$ & pseudoscalar & 72 \\\hline $s$ & scalar singlet & 73 \\\hline $\tilde{G}$ & gravitino & -- \\\hline\hline \end{tabular} \end{center} *) let pdg_mw = function | L g when g > 0 -> 9 + 2*g | L g -> - 9 + 2*g | N g when g > 0 -> 10 + 2*g | N g -> - 10 + 2*g | U g when g > 0 -> 2*g | U g -> 2*g | D g when g > 0 -> - 1 + 2*g | D g -> 1 + 2*g | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | SHiggs S1 -> 25 | SHiggs S2 -> 35 | PHiggs P1 -> 36 (* JR: Only the first charged Higgs. *) | CHiggs HC1 -> 37 | CHiggs HC1c -> (-37) | CHiggs _ -> invalid_arg "charged Higgs not yet implemented" | Sup (M1,g) when g > 0 -> 40 + 2*g | Sup (M1,g) -> - 40 + 2*g | Sup (M2,g) when g > 0 -> 46 + 2*g | Sup (M2,g) -> - 46 + 2*g | Sdown (M1,g) when g > 0 -> 39 + 2*g | Sdown (M1,g) -> - 39 + 2*g | Sdown (M2,g) when g > 0 -> 45 + 2*g | Sdown (M2,g) -> - 45 + 2*g | Slepton (M1,g) when g > 0 -> 51 + 2*g | Slepton (M1,g) -> - 51 + 2*g | Slepton (M2,g) when g > 0 -> 57 + 2*g | Slepton (M2,g) -> - 57 + 2*g | Sneutrino g when g > 0 -> 52 + 2*g | Sneutrino g -> - 52 + 2*g | Gluino -> 64 (* JR: Only the first two charginos. *) | Chargino C1 -> 70 | Chargino C1c -> (-70) | Chargino C2 -> 71 | Chargino C2c -> (-71) | Chargino C3 -> 106 | Chargino C3c -> (-106) | Chargino C4 -> 107 | Chargino C4c -> (-107) | Neutralino N1 -> 65 | Neutralino N2 -> 66 | Neutralino N3 -> 67 | Neutralino N4 -> 68 | Neutralino N5 -> 69 | Neutralino N6 -> 100 | Neutralino N7 -> 101 | Neutralino N8 -> 102 | Neutralino N9 -> 103 | Neutralino N10 -> 104 | Neutralino N11 -> 105 | PHiggs P2 -> 72 | PHiggs P3 -> 89 | PHiggs P4 -> 90 | PHiggs P5 -> 91 | PHiggs P6 -> 92 | PHiggs P7 -> 93 | SHiggs S3 -> 73 | SHiggs S4 -> 94 | SHiggs S5 -> 95 | SHiggs S6 -> 96 | SHiggs S7 -> 97 | SHiggs S8 -> 98 | SHiggs S9 -> 99 | LQ (M1,g) when g > 0 -> 78 + 2*g | LQ (M1,g) -> - 78 + 2*g | LQ (M2,g) when g > 0 -> 79 + 2*g | LQ (M2,g) -> - 79 + 2*g | LQino g when g > 0 -> 85 + g | LQino g -> - 85 + g let mass_symbol f = "mass(" ^ string_of_int (abs (pdg_mw f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg_mw f)) ^ ")" let conj_symbol = function | false, str -> str | true, str -> str ^ "_c" let constant_symbol = function | E -> "e" | G -> "g" | G_Z -> "gz" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | Q_charg -> "qchar" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | G_CCQ (vc,g1,g2) -> conj_symbol (vc, "g_ccq" ) ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ ")" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_PZWW -> "gpzww" | G_PPWW -> "gppww" | G_GH4_ZZPP (p1,p2) -> "g_ZZA0A0(" ^ string_of_phiggs p1 ^ "," ^ string_of_phiggs p2 ^ ")" | G_GH4_ZZSS (s1,s2) -> "g_ZZh0h0(" ^ string_of_shiggs s1 ^ "," ^ string_of_shiggs s2 ^ ")" | G_GH4_ZZCC -> "g_zzhphm" | G_GH4_GaGaCC -> "g_AAhphm" | G_GH4_ZGaCC -> "g_zAhphm" | G_GH4_WWCC -> "g_wwhphm" | G_GH4_WWPP (p1,p2) -> "g_WWA0A0(" ^ string_of_phiggs p1 ^ "," ^ string_of_phiggs p2 ^ ")" | G_GH4_WWSS (s1,s2) -> "g_WWh0h0(" ^ string_of_shiggs s1 ^ "," ^ string_of_shiggs s2 ^ ")" | G_GH4_ZWSC s -> "g_ZWhph0(" ^ string_of_shiggs s ^")" | G_GH4_GaWSC s -> "g_AWhph0(" ^ string_of_shiggs s ^")" | G_GH4_ZWPC p -> "g_ZWhpA0(" ^ string_of_phiggs p ^")" | G_GH4_GaWPC p -> "g_AWhpA0(" ^ string_of_phiggs p ^")" | G_CICIS (n1,n2,s) -> "g_neuneuh0(" ^ string_of_neu n1 ^ "," ^ string_of_neu n2 ^ "," ^ string_of_shiggs s ^ ")" | G_CICIP (n1,n2,p) -> "g_neuneuA0(" ^ string_of_neu n1 ^ "," ^ string_of_neu n2 ^ "," ^ string_of_phiggs p ^ ")" | G_H3_SCC s -> "g_h0hphm(" ^ string_of_shiggs s ^ ")" | G_H3_SPP (s,p1,p2) -> "g_h0A0A0(" ^ string_of_shiggs s ^ "," ^ string_of_phiggs p1 ^ "," ^ string_of_phiggs p2 ^ ")" | G_H3_SSS (s1,s2,s3) -> "g_h0h0h0(" ^ string_of_shiggs s1 ^ "," ^ string_of_shiggs s2 ^ "," ^ string_of_shiggs s3 ^ ")" | G_CSC (c1,c2,s) -> "g_chchh0(" ^ string_of_char c1 ^ "," ^ string_of_char c2 ^ "," ^ string_of_shiggs s ^ ")" | G_CPC (c1,c2,p) -> "g_chchA0(" ^ string_of_char c1 ^ "," ^ string_of_char c2 ^ "," ^ string_of_phiggs p ^")" | G_YUK_FFS (f1,f2,s) -> "g_yuk_h0_" ^ string_of_fermion_type f1 ^ string_of_fermion_type f2 ^ "(" ^ string_of_shiggs s ^ "," ^ string_of_fermion_gen f1 ^ ")" | G_YUK_FFP (f1,f2,p) -> "g_yuk_A0_" ^ string_of_fermion_type f1 ^ string_of_fermion_type f2 ^ "(" ^ string_of_phiggs p ^ "," ^ string_of_fermion_gen f1 ^ ")" | G_YUK_LCN g -> "g_yuk_hp_ln(" ^ string_of_int g ^ ")" | G_NWC (n,c) -> "g_nwc(" ^ string_of_char c ^ "," ^ string_of_neu n ^ ")" | G_CWN (c,n) -> "g_cwn(" ^ string_of_char c ^ "," ^ string_of_neu n ^ ")" | G_SLSNW (vc,g,m) -> conj_symbol (vc, "g_wslsn") ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m ^ ")" | G_NZN (n1,n2) -> "g_zneuneu(" ^ string_of_neu n1 ^ "," ^ string_of_neu n2 ^ ")" | G_CZC (c1,c2) -> "g_zchch(" ^ string_of_char c1 ^ "," ^ string_of_char c2 ^ ")" | Gs -> "gs" | G_YUK_UCD (n,m) -> "g_yuk_hp_ud(" ^ string_of_int n ^ "," ^ string_of_int m ^ ")" | G_YUK_DCU (n,m) -> "g_yuk_hm_du(" ^ string_of_int n ^ "," ^ string_of_int m ^ ")" | G_YUK_N (vc,f,n,sf,m) -> conj_symbol (vc, "g_yuk_neu_" ^ string_of_fermion_type f ^ string_of_sff sf) ^ "(" ^ string_of_fermion_gen f ^ "," ^ string_of_neu n ^ "," ^ string_of_sfm m ^ ")" | G_YUK_G (vc,f,sf,m) -> conj_symbol (vc, "g_yuk_gluino_" ^ string_of_fermion_type f ^ string_of_sff sf) ^ "(" ^ string_of_fermion_gen f ^ "," ^ string_of_sfm m ^ ")" | G_YUK_C (vc,f,c,sf,m) -> conj_symbol (vc, "g_yuk_char_" ^ string_of_fermion_type f ^ string_of_sff sf) ^ "(" ^ string_of_fermion_gen f ^ "," ^ string_of_char c ^ "," ^ string_of_sfm m ^ ")" | G_YUK_Q (vc,g1,f,c,sf,m) -> conj_symbol (vc, "g_yuk_char_" ^ string_of_fermion_type f ^ string_of_sff sf) ^"("^string_of_int g1 ^ "," ^ string_of_fermion_gen f ^ "," ^ string_of_char c ^ "," ^ string_of_sfm m ^ ")" | G_WPSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "g_wA_susd") ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_WZSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "g_wz_susd") ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" (* 3vertex: Higgs-Gauge a la Franke-Fraas *) (* Nomenclature consistent with [flavor_of_string] *) | G_GH_ZSP (s,p) -> "g_zh0a0(" ^ string_of_shiggs s ^ "," ^ string_of_phiggs p ^ ")" | G_GH_WSC s -> "g_Whph0(" ^ string_of_shiggs s ^ ")" | G_GH_WPC p -> "g_WhpA0(" ^ string_of_phiggs p^ ")" | G_GH_ZZS s -> "g_ZZh0(" ^ string_of_shiggs s ^ ")" | G_GH_WWS s -> "g_WWh0(" ^ string_of_shiggs s ^ ")" | G_GH_ZCC -> "g_Zhmhp" | G_GH_GaCC -> "g_Ahmhp" | G_ZSF (f,g,m1,m2) -> "g_z" ^ string_of_sff f ^ string_of_sff f ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_HSNSL (vc,g,m) -> conj_symbol (vc, "g_hp_sl" ^ string_of_sfm m ^ "sn1" ) ^ "(" ^ string_of_int g ^ ")" | G_GlGlSQSQ -> "g_gg_sqsq" | G_PPSFSF f -> "g_AA_" ^ string_of_sff f ^ string_of_sff f | G_ZZSFSF (f,g,m1,m2) -> "g_zz_" ^ string_of_sff f ^string_of_sff f ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_ZPSFSF (f,g,m1,m2) -> "g_zA_" ^ string_of_sff f ^string_of_sff f ^ "(" ^ string_of_int g ^","^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_GlPSQSQ -> "g_gA_sqsq" | G_GlZSFSF (f,g,m1,m2) -> "g_gz_" ^ string_of_sff f ^ string_of_sff f ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_GlWSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "g_gw_susd") ^ "(" ^ string_of_int g1 ^ "," ^string_of_int g2 ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_strong -> "gs" | G_SS -> "gs**2" | I_G_S -> "igs" | G_NHC (vc,n,c) -> conj_symbol(vc,"g_neuhmchar") ^ "(" ^ string_of_neu n ^ "," ^ string_of_char c ^ ")" | G_WWSFSF (f,g,m1,m2) -> "g_ww_" ^ string_of_sff f ^ string_of_sff f ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_WPSLSN (vc,g,m) -> conj_symbol (vc, "g_wA_slsn") ^"("^ string_of_int g ^ "," ^ string_of_sfm m ^ ")" | G_WZSLSN (vc,g,m) -> conj_symbol (vc, "g_wz_slsn") ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m ^ ")" | G_SFSFS (s,f,g,m1,m2) -> "g_h0_"^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "(" ^ string_of_shiggs s ^ "," ^ string_of_int g ^ ")" | G_SFSFP (p,f,g,m1,m2) -> "g_A0_"^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "(" ^ string_of_phiggs p ^ "," ^ string_of_int g ^ ")" | G_HSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "g_hp_su" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ) ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ ")" | G_WSQ (vc,g1,g2,m1,m2) -> conj_symbol (vc, "g_wsusd") ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_YUK_LQ_S (g1,s,g3) -> "g_yuk_lq_s(" ^ string_of_int g1 ^ "," ^ string_of_shiggs s ^"," ^ string_of_int g3 ^")" | G_YUK_LQ_P (g1,p,g3) -> "g_yuk_lq_p(" ^ string_of_int g1 ^ "," ^ string_of_phiggs p ^ "," ^ string_of_int g3 ^ ")" | G_LQ_NEU (m,g1,g2,n) -> "g_lq_neu(" ^ string_of_sfm m ^ "," ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_neu n ^ ")" | G_LQ_GG (m,g1,g2) -> "g_lq_gg(" ^ string_of_sfm m ^ "," ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ ")" | G_LQ_EC_UC (vc,m,g1,g2,g3) -> conj_symbol(vc,"g_lq_ec_uc") ^ "(" ^ string_of_sfm m ^ "," ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_int g3 ^ ")" | G_LQ_SSU (m1,m2,m3,g1,g2,g3) -> "g_lq_sst(" ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ "," ^ string_of_sfm m3 ^ "," ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_int g3 ^ ")" | G_LQ_SSD (m1,m2,g1,g2,g3) -> "g_lq_ssta(" ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ "," ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_int g3 ^ ")" | G_LQ_S (m1,m2,g1,s,g2) -> "g_lq_s(" ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ "," ^ string_of_int g1 ^ "," ^ string_of_shiggs s ^ "," ^ string_of_int g2 ^ ")" | G_LQ_P (m1,m2,g1,p,g2) -> "g_lq_s(" ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ "," ^ string_of_int g1 ^ "," ^ string_of_phiggs p ^ "," ^ string_of_int g2 ^ ")" | G_ZLQ (g,m1,m2) -> "g_zlqlq(" ^ string_of_int g ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_ZZLQLQ -> "g_zz_lqlq" | G_ZPLQLQ -> "g_zA_lqlq" | G_PPLQLQ -> "g_AA_lqlq" | G_ZGlLQLQ -> "g_zg_lqlq" | G_PGlLQLQ -> "g_Ag_lqlq" | G_GlGlLQLQ -> "g_gg_lqlq" | G_NLQC -> "g_nlqc" end Index: trunk/omega/src/modellib_Zprime.ml =================================================================== --- trunk/omega/src/modellib_Zprime.ml (revision 8274) +++ trunk/omega/src/modellib_Zprime.ml (revision 8275) @@ -1,626 +1,628 @@ (* modellib_Zprime.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{SM with additional Z'} *) module type SM_flags = sig val include_anomalous : bool val k_matrix : bool end module SM_no_anomalous : SM_flags = struct let include_anomalous = false let k_matrix = false end module Zprime (Flags : SM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width" ] (* We do not introduce the Goldstones for the heavy vectors here. *) type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl | ZH type other = Phip | Phim | Phi0 | H type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Models.Zprime.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl; ZH]; "Higgs", [O H]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z | ZH -> Massive_Vector end | O f -> Scalar let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z | ZH -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H -> Prop_Scalar end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp | ZH -> ZH end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm | ZH -> 0 end | O _ -> 0 (* Electrical charge, lepton number, baryon number. We could avoid the rationals altogether by multiplying the first and last by 3 \ldots *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("Zprime.generation': " ^ string_of_int n) let generation f = match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z | ZH -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Phi0 -> 0//1 | Phip -> 1//1 | Phim -> -1//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_NC_h_neutrino | G_NC_h_lepton | G_NC_h_up | G_NC_h_down | I_Q_W | I_G_ZWW | I_G_WWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_H3 | G_H4 | Gs | I_Gs | G2 | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)); - nc_coupling G_NC_h_neutrino half (Const 0); - nc_coupling G_NC_h_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_h_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_h_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)); + nc_coupling G_NC_h_neutrino half (Integer 0); + nc_coupling G_NC_h_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_h_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_h_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* \begin{equation} \mathcal{L}_{\textrm{EM}} = - e \sum_i q_i \bar\psi_i\fmslash{A}\psi_i \end{equation} *) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF (1, Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF (1, Psibar, V, Psi), Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{NC}} = - \frac{g}{2\cos\theta_W} \sum_i \bar\psi_i\fmslash{Z}(g_V^i-g_A^i\gamma_5)\psi_i \end{equation} *) let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* We want to allow for (almost) completely general couplings but maintain universality (generation independence). Maybe we should also separate the coupling to the top quark since the third generation is somewhat special. *) let neutral_heavy_currents n = List.map mgm [ ((L (-n), ZH, L n), FBF (1, Psibar, VA, Psi), G_NC_h_lepton); ((N (-n), ZH, N n), FBF (1, Psibar, VA, Psi), G_NC_h_neutrino); ((U (-n), ZH, U n), FBF (1, Psibar, VA, Psi), G_NC_h_up); ((D (-n), ZH, D n), FBF (1, Psibar, VA, Psi), G_NC_h_down); ] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let yukawa = [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, S, Psi), G_Htt); ((M (D (-3)), O H, M (D 3)), FBF (1, Psibar, S, Psi), G_Hbb); ((M (U (-2)), O H, M (U 2)), FBF (1, Psibar, S, Psi), G_Hcc); ((M (L (-3)), O H, M (L 3)), FBF (1, Psibar, S, Psi), G_Htautau) ] (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2 ] let gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ) ] let gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap neutral_heavy_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "ZH" | "ZH0" | "Zh" | "Zh0" -> G ZH | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | _ -> invalid_arg "Models.Zprime.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Models.Zprime.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Models.Zprime.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Models.Zprime.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Models.Zprime.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" | ZH -> "ZH" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Models.Zprime.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Models.Zprime.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Models.Zprime.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Models.Zprime.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" | ZH -> "Z_H" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" | ZH -> "zh" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" end (* There are PDG numbers for Z', Z'', W', 32-34, respectively. We just introduce a number 38 for Y0 as a Z'''. As well, there is the number 8 for a t'. *) let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | ZH -> 32 end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | G_NC_h_lepton -> "gnchlep" | G_NC_h_neutrino -> "gnchneu" | G_NC_h_up -> "gnchup" | G_NC_h_down -> "gnchdwn" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | I_G_WWW -> "igwww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_H3 -> "gh3" | G_H4 -> "gh4" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end Index: trunk/omega/src/omega_SYM.ml =================================================================== --- trunk/omega/src/omega_SYM.ml (revision 8274) +++ trunk/omega/src/omega_SYM.ml (revision 8275) @@ -1,331 +1,333 @@ (* omega_SYM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) module SYM = struct open Coupling let options = Options.empty let nc = 3 type flavor = | Q of int | SQ of int | G of int | SG of int | Phi let generations = ThoList.range 1 1 let generations_pairs = List.map (function [a;b] -> (a, b) | _ -> failwith "omega_SYM.generations_pairs") (Product.power 2 generations) let generations_triples = List.map (function [a;b;c] -> (a, b, c) | _ -> failwith "omega_SYM.generations_triples") (Product.power 3 generations) let generations_quadruples = List.map (function [a;b;c;d] -> (a, b, c, d) | _ -> failwith "omega_SYM.generations_quadruples") (Product.power 4 generations) let external_flavors () = [ "Quarks", List.map (fun i -> Q i) generations; "Anti-Quarks", List.map (fun i -> Q (-i)) generations; "SQuarks", List.map (fun i -> SQ i) generations; "Anti-SQuarks", List.map (fun i -> SQ (-i)) generations; "Gluons", List.map (fun i -> G i) generations; "SGluons", List.map (fun i -> SG i) generations; "Other", [Phi]] let flavors () = ThoList.flatmap snd (external_flavors ()) type gauge = unit type constant = | G_saa of int * int | G_saaa of int * int * int | G3 of int * int * int | I_G3 of int * int * int | G4 of int * int * int * int type orders = unit let orders = function | _ -> () let lorentz = function | Q i -> if i > 0 then Spinor else if i < 0 then ConjSpinor else invalid_arg "SYM.lorentz (Q 0)" | SQ _ | Phi -> Scalar | G _ -> Vector | SG _ -> Majorana let color = function | Q i | SQ i -> Color.SUN (if i > 0 then nc else if i < 0 then -nc else invalid_arg "SYM.color (Q 0)") | G _ | SG _ -> Color.AdjSUN nc | Phi -> Color.Singlet + let nc () = nc + let propagator = function | Q i -> if i > 0 then Prop_Spinor else if i < 0 then Prop_ConjSpinor else invalid_arg "SYM.lorentz (Q 0)" | SQ _ | Phi -> Prop_Scalar | G _ -> Prop_Feynman | SG _ -> Prop_Majorana (*i let propagator _ = Only_Insertion i*) let width _ = Timelike let goldstone _ = None let conjugate = function | Q i -> Q (-i) | SQ i -> SQ (-i) | (G _ | SG _ | Phi) as p -> p let fermion = function | Q i -> if i > 0 then 1 else if i < 0 then -1 else invalid_arg "SYM.fermion (Q 0)" | SQ _ | G _ | Phi -> 0 | SG _ -> 2 module Ch = Charges.Null let charges _ = () module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let quark_current = List.map (fun (i, j, k) -> ((Q (-i), G j, Q k), FBF (-1, Psibar, V, Psi), G3 (i, j, k))) generations_triples let squark_current = List.map (fun (i, j, k) -> ((G j, SQ i, SQ (-k)), Vector_Scalar_Scalar 1, G3 (i, j, k))) generations_triples let three_gluon = List.map (fun (i, j, k) -> ((G i, G j, G k), Gauge_Gauge_Gauge 1, I_G3 (i, j, k))) generations_triples let gluon2_phi = List.map (fun (i, j) -> ((Phi, G i, G j), Dim5_Scalar_Gauge2 1, G_saa (i, j))) generations_pairs let vertices3 = quark_current @ squark_current @ three_gluon @ gluon2_phi let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let squark_seagull = List.map (fun (i, j, k, l) -> ((SQ i, SQ (-j), G k, G l), Scalar2_Vector2 1, G4 (i, j, k, l))) generations_quadruples let four_gluon = List.map (fun (i, j, k, l) -> ((G i, G j, G k, G l), gauge4, G4 (i, j, k, l))) generations_quadruples (*i let gluon3_phi = List.map (fun (i, j, k) -> ((Phi, G i, G j, G k), Dim6_Scalar_Gauge3 1, G_saaa (i, j, k))) generations_triples i*) (* \begin{dubious} We need at least a [Dim6_Scalar_Gauge3] vertex to support this. \end{dubious} *) let gluon3_phi = [] let vertices4 = squark_seagull @ four_gluon @ gluon3_phi let vertices () = (vertices3, vertices4, []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let parameters () = { input = []; derived = []; derived_arrays = [] } let invalid_flavor s = invalid_arg ("omega_SYM.flavor_of_string: " ^ s) let flavor_of_string s = let l = String.length s in if l < 2 then invalid_flavor s else if l = 2 then if String.sub s 0 1 = "q" then Q (int_of_string (String.sub s 1 1)) else if String.sub s 0 1 = "Q" then Q (- (int_of_string (String.sub s 1 1))) else if String.sub s 0 1 = "g" then G (int_of_string (String.sub s 1 1)) else invalid_flavor s else if l = 3 then if s = "phi" then Phi else if String.sub s 0 2 = "sq" then SQ (int_of_string (String.sub s 2 1)) else if String.sub s 0 2 = "sQ" then SQ (- (int_of_string (String.sub s 2 1))) else if String.sub s 0 2 = "sg" then SG (int_of_string (String.sub s 2 1)) else invalid_flavor s else invalid_flavor s let flavor_to_string = function | Q i -> if i > 0 then "q" ^ string_of_int i else if i < 0 then "Q" ^ string_of_int (-i) else invalid_arg "SYM.flavor_to_string (Q 0)" | SQ i -> if i > 0 then "sq" ^ string_of_int i else if i < 0 then "sQ" ^ string_of_int (-i) else invalid_arg "SYM.flavor_to_string (SQ 0)" | G i -> "g" ^ string_of_int i | SG i -> "sg" ^ string_of_int i | Phi -> "phi" let flavor_to_TeX = function | Q i -> if i > 0 then "q_{" ^ string_of_int i ^ "}" else if i < 0 then "{\bar q}_{" ^ string_of_int (-i) ^ "}" else invalid_arg "SYM.flavor_to_string (Q 0)" | SQ i -> if i > 0 then "{\tilde q}_{" ^ string_of_int i ^ "}" else if i < 0 then "{\bar{\tilde q}}_{" ^ string_of_int (-i) ^ "}" else invalid_arg "SYM.flavor_to_string (SQ 0)" | G i -> "g_{" ^ string_of_int i ^ "}" | SG i -> "{\tilde g}_{" ^ string_of_int i ^ "}" | Phi -> "phi" let flavor_symbol = function | Q i -> if i > 0 then "q" ^ string_of_int i else if i < 0 then "qbar" ^ string_of_int (-i) else invalid_arg "SYM.flavor_to_string (Q 0)" | SQ i -> if i > 0 then "sq" ^ string_of_int i else if i < 0 then "sqbar" ^ string_of_int (-i) else invalid_arg "SYM.flavor_to_string (SQ 0)" | G i -> "g" ^ string_of_int i | SG i -> "sg" ^ string_of_int i | Phi -> "phi" let gauge_symbol () = failwith "omega_SYM.gauge_symbol: internal error" let pdg _ = 0 let mass_symbol _ = "0.0_default" let width_symbol _ = "0.0_default" let string_of_int_list int_list = "(" ^ String.concat "," (List.map string_of_int int_list) ^ ")" let constant_symbol = function | G_saa (i, j) -> "g_saa" ^ string_of_int_list [i;j] | G_saaa (i, j, k) -> "g_saaa" ^ string_of_int_list [i;j;k] | G3 (i, j, k) -> "g3" ^ string_of_int_list [i;j;k] | I_G3 (i, j, k) -> "ig3" ^ string_of_int_list [i;j;k] | G4 (i, j, k, l) -> "g4" ^ string_of_int_list [i;j;k;l] end module O = Omega.Make(Fusion.Mixed23)(Targets.Fortran_Majorana)(SYM) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/omega_MSSM_CKM.ml =================================================================== --- trunk/omega/src/omega_MSSM_CKM.ml (revision 8274) +++ trunk/omega/src/omega_MSSM_CKM.ml (revision 8275) @@ -1,35 +1,35 @@ (* omega_MSSM_CKM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23_Majorana)(Targets.Fortran_Majorana) +module O = Omega.Make(Fusion_vintage.Mixed23_Majorana)(Targets.Fortran_Majorana) (Modellib_MSSM.MSSM(Modellib_MSSM.MSSM_no_4_ckm)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/modellib_MSSM.ml =================================================================== --- trunk/omega/src/modellib_MSSM.ml (revision 8274) +++ trunk/omega/src/modellib_MSSM.ml (revision 8275) @@ -1,2644 +1,2646 @@ (* modellib_MSSM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* modellib_MSSM.ml -- *) (* \thocwmodulesection{Minimal Supersymmetric Standard Model} *) module type MSSM_flags = sig val include_goldstone : bool val include_four : bool val ckm_present : bool val gravitino : bool val higgs_triangle : bool end module MSSM_no_goldstone : MSSM_flags = struct let include_goldstone = false let include_four = true let ckm_present = false let gravitino = false let higgs_triangle = false end module MSSM_goldstone : MSSM_flags = struct let include_goldstone = true let include_four = true let ckm_present = false let gravitino = false let higgs_triangle = false end module MSSM_no_4 : MSSM_flags = struct let include_goldstone = false let include_four = false let ckm_present = false let gravitino = false let higgs_triangle = false end module MSSM_no_4_ckm : MSSM_flags = struct let include_goldstone = false let include_four = false let ckm_present = true let gravitino = false let higgs_triangle = false end module MSSM_Grav : MSSM_flags = struct let include_goldstone = false let include_four = false let ckm_present = false let gravitino = true let higgs_triangle = false end module MSSM_Hgg : MSSM_flags = struct let include_goldstone = false let include_four = false let ckm_present = false let gravitino = false let higgs_triangle = true end module MSSM (Flags : MSSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type gen = | G of int | GG of gen*gen let rec string_of_gen = function | G n when n > 0 -> string_of_int n | G n -> string_of_int (abs n) ^ "c" | GG (g1,g2) -> string_of_gen g1 ^ "_" ^ string_of_gen g2 (* With this we distinguish the flavour. *) type sff = | SL | SN | SU | SD let string_of_sff = function | SL -> "sl" | SN -> "sn" | SU -> "su" | SD -> "sd" (* With this we distinguish the mass eigenstates. At the moment we have to cheat a little bit for the sneutrinos. Because we are dealing with massless neutrinos there is only one sort of sneutrino. *) type sfm = | M1 | M2 let string_of_sfm = function | M1 -> "1" | M2 -> "2" (* We also introduce special types for the charginos and neutralinos. *) type char = | C1 | C2 | C1c | C2c type neu = | N1 | N2 | N3 | N4 let int_of_char = function | C1 -> 1 | C2 -> 2 | C1c -> -1 | C2c -> -2 let string_of_char = function | C1 -> "1" | C2 -> "2" | C1c -> "-1" | C2c -> "-2" let conj_char = function | C1 -> C1c | C2 -> C2c | C1c -> C1 | C2c -> C2 let string_of_neu = function | N1 -> "1" | N2 -> "2" | N3 -> "3" | N4 -> "4" (* Also we need types to distinguish the Higgs bosons. We follow the conventions of Kuroda, which means \begin{align} \label{eq:higgs3} H_1 &= \begin{pmatrix} \frac{1}{\sqrt{2}} \bigl( v_1 + H^0 \cos\alpha - h^0 \sin\alpha + \ii A^0 \sin\beta - \ii \phi^0 \cos\beta \bigr) \\ H^- \sin\beta - \phi^- \cos\beta \end{pmatrix}, \\ & \notag \\ H_2 & = \begin{pmatrix} H^+ \cos\beta + \phi^+ \sin\beta \\ \frac{1}{\sqrt{2}} \bigl( v_2 + H^0 \sin\alpha + h^0 \cos\alpha + \ii A^0 \cos\beta + \ii \phi^0 \sin\beta \bigr) \end{pmatrix} \label{eq:higgs4} \end{align} This is a different sign convention compared to, e.g., Weinberg's volume iii. We will refer to it as [GS+]. *) type higgs = | H1 (* the light scalar Higgs *) | H2 (* the heavy scalar Higgs *) | H3 (* the pseudoscalar Higgs *) | H4 (* the charged Higgs *) | H5 (* the neutral Goldstone boson *) | H6 (* the charged Goldstone boson *) | DH of higgs*higgs let rec string_of_higgs = function | H1 -> "h1" | H2 -> "h2" | H3 -> "h3" | H4 -> "h4" | H5 -> "p1" | H6 -> "p2" | DH (h1,h2) -> string_of_higgs h1 ^ string_of_higgs h2 type flavor = | L of int | N of int | U of int | D of int | Sup of sfm*int | Sdown of sfm*int | Ga | Wp | Wm | Z | Gl | Slepton of sfm*int | Sneutrino of int | Neutralino of neu | Chargino of char | Gluino | Grino | Phip | Phim | Phi0 | H_Heavy | H_Light | Hp | Hm | A type gauge = unit let gauge_symbol () = failwith "Modellib_MSSM.MSSM.gauge_symbol: internal error" (* At this point we will forget graviton and -tino. *) let lep_family g = [ L g; N g; Slepton (M1,g); Slepton (M2,g); Sneutrino g ] let family g = [ L g; N g; Slepton (M1,g); Slepton (M2,g); Sneutrino g; U g; D g; Sup (M1,g); Sup (M2,g); Sdown (M1,g); Sdown (M2,g)] let external_flavors'' = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", [Ga; Z; Wp; Wm; Gl]; "Charginos", [Chargino C1; Chargino C2; Chargino C1c; Chargino C2c]; "Neutralinos", [Neutralino N1; Neutralino N2; Neutralino N3; Neutralino N4]; "Higgs Bosons", [H_Heavy; H_Light; Hp; Hm; A]; "Gluinos", [Gluino]] let external_flavors' = if Flags.gravitino then external_flavors'' @ ["Gravitino", [Grino]] else external_flavors'' let external_flavors () = if Flags.include_goldstone then external_flavors' @ ["Goldstone Bosons", [Phip; Phim; Phi0]] else external_flavors' let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else if n <= 0 then ConjSpinor else invalid_arg "Modellib_MSSM.MSSM.spinor: internal error" let lorentz = function | L g -> spinor g | N g -> spinor g | U g -> spinor g | D g -> spinor g | Chargino c -> spinor (int_of_char c) | Ga -> Vector (*i | Ga -> Ward_Vector i*) | Gl -> Vector | Wp | Wm | Z -> Massive_Vector | H_Heavy | H_Light | Hp | Hm | A -> Scalar | Phip | Phim | Phi0 -> Scalar | Sup _ | Sdown _ | Slepton _ | Sneutrino _ -> Scalar | Neutralino _ -> Majorana | Gluino -> Majorana | Grino -> Vectorspinor let color = function | U g -> Color.SUN (if g > 0 then 3 else -3) | Sup (m,g) -> Color.SUN (if g > 0 then 3 else -3) | D g -> Color.SUN (if g > 0 then 3 else -3) | Sdown (m,g) -> Color.SUN (if g > 0 then 3 else -3) | Gl | Gluino -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else if n <=0 then Prop_ConjSpinor else invalid_arg "Modellib_MSSM.MSSM.prop_spinor: internal error" let propagator = function | L g -> prop_spinor g | N g -> prop_spinor g | U g -> prop_spinor g | D g -> prop_spinor g | Chargino c -> prop_spinor (int_of_char c) | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity | H_Heavy | H_Light | Hp | Hm | A -> Prop_Scalar | Phip | Phim | Phi0 -> if Flags.include_goldstone then Prop_Scalar else Only_Insertion | Slepton _ | Sneutrino _ | Sup _ | Sdown _ -> Prop_Scalar | Gluino -> Prop_Majorana | Neutralino _ -> Prop_Majorana | Grino -> Only_Insertion (* Note, that we define the gravitino only as an insertion since when using propagators we are effectively going to a higher order in the gravitational coupling. This would enforce us to also include higher-dimensional vertices with two gravitinos for a consistent power counting in $1/M_{\text{Planck}}$. *) (*i | Grino -> Prop_Vectorspinor i*) (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | Wp | Wm | U 3 | U (-3) -> Fudged | _ -> !default_width else !default_width (* For the Goldstone bosons we adopt the conventions of the Kuroda paper. \begin{subequations} \begin{equation} H_1 \equiv \begin{pmatrix} \left( v_1 + H^0 \cos\alpha - h^0 \sin \alpha + \ii A^0 \sin\beta - \ii \cos\beta \phi^0 \right) / \sqrt{2} \\ H^- \sin\beta - \phi^- \cos\beta \end{pmatrix} \end{equation} \begin{equation} H_2 \equiv \begin{pmatrix} H^+ \cos\beta + \phi^+ \sin\beta \\ \left( v_2 + H^0 \sin\alpha + h^0 \cos\alpha + \ii A^0 \cos\beta + \ii \phi^0 \sin\beta \right) / \sqrt{2} \end{pmatrix} \end{equation} \end{subequations} *) let goldstone = function - | Wp -> Some (Phip, Coupling.Const 1) - | Wm -> Some (Phim, Coupling.Const 1) - | Z -> Some (Phi0, Coupling.Const 1) + | Wp -> Some (Phip, Coupling.Integer 1) + | Wm -> Some (Phim, Coupling.Integer 1) + | Z -> Some (Phi0, Coupling.Integer 1) | _ -> None let conjugate = function | L g -> L (-g) | N g -> N (-g) | U g -> U (-g) | D g -> D (-g) | Sup (m,g) -> Sup (m,-g) | Sdown (m,g) -> Sdown (m,-g) | Slepton (m,g) -> Slepton (m,-g) | Sneutrino g -> Sneutrino (-g) | Gl -> Gl (* | Gl0 -> Gl0 *) | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp | H_Heavy -> H_Heavy | H_Light -> H_Light | A -> A | Hp -> Hm | Hm -> Hp | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | Gluino -> Gluino | Grino -> Grino | Neutralino n -> Neutralino n | Chargino c -> Chargino (conj_char c) let fermion = function | L g -> if g > 0 then 1 else -1 | N g -> if g > 0 then 1 else -1 | U g -> if g > 0 then 1 else -1 | D g -> if g > 0 then 1 else -1 | Gl | Ga | Z | Wp | Wm -> 0 (* | Gl0 -> 0 *) | H_Heavy | H_Light | Hp | Hm | A -> 0 | Phip | Phim | Phi0 -> 0 | Neutralino _ -> 2 | Chargino c -> if (int_of_char c) > 0 then 1 else -1 | Sup _ -> 0 | Sdown _ -> 0 | Slepton _ -> 0 | Sneutrino _ -> 0 | Gluino | Grino -> 2 (* Because the O'Caml compiler only allows 248 constructors we must divide the constants into subgroups of constants, e.g. for the Higgs couplings. In the MSSM there are a lot of angles among the parameters, the Weinberg-angle, the angle describing the Higgs vacuum structure, the mixing angle of the real parts of the Higgs dubletts, the mixing angles of the sfermions. Therefore we are going to define the trigonometric functions of those angles not as constants but as functors of the angels. Sums and differences of angles are only used as arguments for the $\alpha$ and $\beta$ angles, so it makes no sense to define special functions for differences and sums of angles. *) type angle = | Thw | Al | Be | Th_SF of sff*int | Delta | CKM_12 | CKM_13 | CKM_23 let string_of_angle = function | Thw -> "thw" | Al -> "al" | Be -> "be" | Delta -> "d" | CKM_12 -> "ckm12" | CKM_13 -> "ckm13" | CKM_23 -> "ckm23" | Th_SF (f,g) -> "th" ^ string_of_sff f ^ string_of_int g (* We introduce a Boolean type vc as a pseudonym for Vertex Conjugator to distinguish between vertices containing complex mixing matrices like the CKM--matrix or the sfermion or neutralino/chargino--mixing matrices, which have to become complex conjugated. The true--option stands for the conjugated vertex, the false--option for the unconjugated vertex. *) type vc = bool type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sin of angle | Cos of angle | E | G | Vev | Tanb | Tana | Cos2be | Cos2al | Sin2be | Sin2al | Sin4al | Sin4be | Cos4be | Cosapb | Cosamb | Sinapb | Sinamb | Cos2am2b | Sin2am2b | Eidelta | Mu | AU of int | AD of int | AL of int | V_CKM of int*int | M_SF of sff*int*sfm*sfm | M_V of char*char (* left chargino mixing matrix *) | M_U of char*char (* right chargino mixing matrix *) | M_N of neu*neu (* neutralino mixing matrix *) | V_0 of neu*neu | A_0 of neu*neu | V_P of char*char | A_P of char*char | L_CN of char*neu | R_CN of char*neu | L_NC of neu*char | R_NC of neu*char (*i | L_NF of neu*sff*sfm | R_NF of neu*sff*sfm i*) | S_NNH1 of neu*neu | P_NNH1 of neu*neu | S_NNH2 of neu*neu | P_NNH2 of neu*neu | S_NNA of neu*neu | P_NNA of neu*neu | S_NNG of neu*neu | P_NNG of neu*neu | L_CNG of char*neu | R_CNG of char*neu | L_NCH of neu*char | R_NCH of neu*char | Q_lepton | Q_up | Q_down | Q_charg | G_Z | G_CC | G_CCQ of vc*int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_PZWW | G_PPWW | G_strong | G_SS | I_G_S | G_S_Sqrt | Gs | M of flavor | W of flavor | G_NZN of neu*neu | G_CZC of char*char | G_NNA | G_YUK of int*int | G_YUK_1 of int*int | G_YUK_2 of int*int | G_YUK_3 of int*int | G_YUK_4 of int*int | G_NHC of neu*char | G_CHN of char*neu | G_YUK_C of vc*int*char*sff*sfm | G_YUK_Q of vc*int*int*char*sff*sfm | G_YUK_N of vc*int*neu*sff*sfm | G_YUK_G of vc*int*sff*sfm | G_NGC of neu*char | G_CGN of char*neu | SUM_1 | G_NWC of neu*char | G_CWN of char*neu | G_CH1C of char*char | G_CH2C of char*char | G_CAC of char*char | G_CGC of char*char | G_SWS of vc*int*int*sfm*sfm | G_SLSNW of vc*int*sfm | G_ZSF of sff*int*sfm*sfm | G_CICIH1 of neu*neu | G_CICIH2 of neu*neu | G_CICIA of neu*neu | G_CICIG of neu*neu | G_GH of int | G_GHGo of int | G_GLGLH | G_GLGLHH | G_GLGLA | G_PPH | G_PPHH | G_PPA | G_WWSFSF of sff*int*sfm*sfm | G_WPSLSN of vc*int*sfm | G_H3 of int | G_H4 of int | G_HGo3 of int | G_HGo4 of int | G_GG4 of int | G_H1SFSF of sff*int*sfm*sfm | G_H2SFSF of sff*int*sfm*sfm | G_ASFSF of sff*int*sfm*sfm | G_HSNSL of vc*int*sfm | G_GoSFSF of sff*int*sfm*sfm | G_GoSNSL of vc*int*sfm | G_HSUSD of vc*sfm*sfm*int*int | G_GSUSD of vc*sfm*sfm*int*int | G_WPSUSD of vc*sfm*sfm*int*int | G_WZSUSD of vc*sfm*sfm*int*int | G_WZSLSN of vc*int*sfm | G_GlGlSQSQ | G_PPSFSF of sff | G_ZZSFSF of sff*int*sfm*sfm | G_ZPSFSF of sff*int*sfm*sfm | G_GlZSFSF of sff*int*sfm*sfm | G_GlPSQSQ | G_GlWSUSD of vc*sfm*sfm*int*int | G_GH4 of int | G_GHGo4 of int | G_H1H2SFSF of sff*sfm*sfm*int | G_H1H1SFSF of sff*sfm*sfm*int | G_H2H2SFSF of sff*sfm*sfm*int | G_HHSFSF of sff*sfm*sfm*int | G_AASFSF of sff*sfm*sfm*int | G_HH1SLSN of vc*sfm*int | G_HH2SLSN of vc*sfm*int | G_HASLSN of vc*sfm*int | G_HH1SUSD of vc*sfm*sfm*int*int | G_HH2SUSD of vc*sfm*sfm*int*int | G_HASUSD of vc*sfm*sfm*int*int | G_AG0SFSF of sff*sfm*sfm*int | G_HGSFSF of sff*sfm*sfm*int | G_GGSFSF of sff*sfm*sfm*int | G_G0G0SFSF of sff*sfm*sfm*int | G_HGSNSL of vc*sfm*int | G_H1GSNSL of vc*sfm*int | G_H2GSNSL of vc*sfm*int | G_AGSNSL of vc*sfm*int | G_GGSNSL of vc*sfm*int | G_HGSUSD of vc*sfm*sfm*int*int | G_H1GSUSD of vc*sfm*sfm*int*int | G_H2GSUSD of vc*sfm*sfm*int*int | G_AGSUSD of vc*sfm*sfm*int*int | G_GGSUSD of vc*sfm*sfm*int*int | G_SN4 of int*int | G_SN2SL2_1 of sfm*sfm*int*int | G_SN2SL2_2 of sfm*sfm*int*int | G_SF4 of sff*sff*sfm*sfm*sfm*sfm*int*int | G_SF4_3 of sff*sff*sfm*sfm*sfm*sfm*int*int*int | G_SF4_4 of sff*sff*sfm*sfm*sfm*sfm*int*int*int*int | G_SL4 of sfm*sfm*sfm*sfm*int | G_SL4_2 of sfm*sfm*sfm*sfm*int*int | G_SN2SQ2 of sff*sfm*sfm*int*int | G_SL2SQ2 of sff*sfm*sfm*sfm*sfm*int*int | G_SUSDSNSL of vc*sfm*sfm*sfm*int*int*int | G_SU4 of sfm*sfm*sfm*sfm*int | G_SU4_2 of sfm*sfm*sfm*sfm*int*int | G_SD4 of sfm*sfm*sfm*sfm*int | G_SD4_2 of sfm*sfm*sfm*sfm*int*int | G_SU2SD2 of sfm*sfm*sfm*sfm*int*int*int*int | G_HSF31 of higgs*int*sfm*sfm*sff*sff | G_HSF32 of higgs*int*int*sfm*sfm*sff*sff | G_HSF41 of higgs*int*sfm*sfm*sff*sff | G_HSF42 of higgs*int*int*sfm*sfm*sff*sff | G_Grav | G_Gr_Ch of char | G_Gr_Z_Neu of neu | G_Gr_A_Neu of neu | G_Gr4_Neu of neu | G_Gr4_A_Ch of char | G_Gr4_Z_Ch of char | G_Grav_N | G_Grav_U of int*sfm | G_Grav_D of int*sfm | G_Grav_L of int*sfm | G_Grav_Uc of int*sfm | G_Grav_Dc of int*sfm | G_Grav_Lc of int*sfm | G_GravGl | G_Gr_H_Ch of char | G_Gr_H1_Neu of neu | G_Gr_H2_Neu of neu | G_Gr_H3_Neu of neu | G_Gr4A_Sl of int*sfm | G_Gr4A_Slc of int*sfm | G_Gr4A_Su of int*sfm | G_Gr4A_Suc of int*sfm | G_Gr4A_Sd of int*sfm | G_Gr4A_Sdc of int*sfm | G_Gr4Z_Sn | G_Gr4Z_Snc | G_Gr4Z_Sl of int*sfm | G_Gr4Z_Slc of int*sfm | G_Gr4Z_Su of int*sfm | G_Gr4Z_Suc of int*sfm | G_Gr4Z_Sd of int*sfm | G_Gr4Z_Sdc of int*sfm | G_Gr4W_Sl of int*sfm | G_Gr4W_Slc of int*sfm | G_Gr4W_Su of int*sfm | G_Gr4W_Suc of int*sfm | G_Gr4W_Sd of int*sfm | G_Gr4W_Sdc of int*sfm | G_Gr4W_Sn | G_Gr4W_Snc | G_Gr4Gl_Su of int*sfm | G_Gr4Gl_Suc of int*sfm | G_Gr4Gl_Sd of int*sfm | G_Gr4Gl_Sdc of int*sfm | G_Gr4_Z_H1 of neu | G_Gr4_Z_H2 of neu | G_Gr4_Z_H3 of neu | G_Gr4_W_H of neu | G_Gr4_W_Hc of neu | G_Gr4_H_A of char | G_Gr4_H_Z of char (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let ferm_of_sff = function | SL, g -> (L g) | SN, g -> (N g) | SU, g -> (U g) | SD, g -> (D g) (* \begin{subequations} \begin{align} \alpha_{\text{QED}} &= \frac{1}{137.0359895} \\ \sin^2\theta_w &= 0.23124 \end{align} \end{subequations} Here we must perhaps allow for complex input parameters. So split them into their modulus and their phase. At first, we leave them real; the generalization to complex parameters is obvious. *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("MSSM.generation': " ^ string_of_int n) let generation f = if Flags.ckm_present then [] else match f with | L n | N n | U n | D n | Sup (_,n) | Sdown (_,n) | Slepton (_,n) | Sneutrino n -> generation' n | _ -> [0//1; 0//1; 0//1] let charge = function | L n -> if n > 0 then -1//1 else 1//1 | Slepton (_,n) -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | Sneutrino n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | Sup (_,n) -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 | Sdown (_,n) -> if n > 0 then -1//3 else 1//3 | Gl | Ga | Z | Neutralino _ | Gluino -> 0//1 | Wp -> 1//1 | Wm -> -1//1 | H_Heavy | H_Light | Phi0 -> 0//1 | Hp | Phip -> 1//1 | Hm | Phim -> -1//1 | Chargino (C1 | C2) -> 1//1 | Chargino (C1c | C2c) -> -1//1 | _ -> 0//1 let lepton = function | L n | N n -> if n > 0 then 1//1 else -1//1 | Slepton (_,n) | Sneutrino n -> if n > 0 then 1//1 else -1//1 | _ -> 0//1 let baryon = function | U n | D n -> if n > 0 then 1//1 else -1//1 | Sup (_,n) | Sdown (_,n) -> if n > 0 then 1//1 else -1//1 | _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f let parameters () = { input = []; derived = []; derived_arrays = [] } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* For the couplings there are generally two possibilities concerning the sign of the covariant derivative. \begin{equation} {\rm CD}^\pm = \partial_\mu \pm \ii g T^a A^a_\mu \end{equation} The particle data group defines the signs consistently to be positive. Since the convention for that signs also influence the phase definitions of the gaugino/higgsino fields via the off-diagonal entries in their mass matrices it would be the best to adopt that convention. *) (*** REVISED: Compatible with CD+. ***) let electromagnetic_currents_3 g = [((U (-g), Ga, U g), FBF (1, Psibar, V, Psi), Q_up); ((D (-g), Ga, D g), FBF (1, Psibar, V, Psi), Q_down); ((L (-g), Ga, L g), FBF (1, Psibar, V, Psi), Q_lepton) ] (*** REVISED: Compatible with CD+. ***) let electromagnetic_sfermion_currents g m = [ ((Ga, Slepton (m,-g), Slepton (m,g)), Vector_Scalar_Scalar 1, Q_lepton); ((Ga, Sup (m,-g), Sup (m,g)), Vector_Scalar_Scalar 1, Q_up); ((Ga, Sdown (m,-g), Sdown (m,g)), Vector_Scalar_Scalar 1, Q_down) ] (*** REVISED: Compatible with CD+. ***) let electromagnetic_currents_2 c = let cc = conj_char c in [ ((Chargino cc, Ga, Chargino c), FBF (1, Psibar, V, Psi), Q_charg) ] (*** REVISED: Compatible with CD+. ***) let neutral_currents g = [ ((L (-g), Z, L g), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-g), Z, N g), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-g), Z, U g), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-g), Z, D g), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = \mp \frac{g}{2\sqrt2} \sum_i \bar\psi_i \gamma^\mu (1-\gamma_5)(T^+W^+_\mu+T^-W^-_\mu)\psi_i , \end{equation} where the sign corresponds to $\text{CD}_\pm$, respectively. *) (*** REVISED: Compatible with CD+. ***) (* Remark: The definition with the other sign compared to the SM files comes from the fact that $g_{cc} = 1/(2\sqrt{2})$ is used overwhelmingly often in the SUSY Feynman rules, so that JR decided to use a different definiton for [g_cc] in SM and MSSM. *) let charged_currents g = [ ((L (-g), Wm, N g), FBF ((-1), Psibar, VL, Psi), G_CC); ((N (-g), Wp, L g), FBF ((-1), Psibar, VL, Psi), G_CC) ] (* The quark with the inverted generation (the antiparticle) is the outgoing one, the other the incoming. The vertex attached to the outgoing up-quark contains the CKM matrix element {\em not} complex conjugated, while the vertex with the outgoing down-quark has the conjugated CKM matrix element. *) (*** REVISED: Compatible with CD+. ***) let charged_quark_currents g h = [ ((D (-g), Wm, U h), FBF ((-1), Psibar, VL, Psi), G_CCQ (true,g,h)); ((U (-g), Wp, D h), FBF ((-1), Psibar, VL, Psi), G_CCQ (false,h,g))] (*** REVISED: Compatible with CD+. ***) let charged_chargino_currents n c = let cc = conj_char c in [ ((Chargino cc, Wp, Neutralino n), FBF (1, Psibar, VLR, Chi), G_CWN (c,n)); ((Neutralino n, Wm, Chargino c), FBF (1, Chibar, VLR, Psi), G_NWC (n,c)) ] (*** REVISED: Compatible with CD+. ***) let charged_slepton_currents g m = [ ((Wm, Slepton (m,-g), Sneutrino g), Vector_Scalar_Scalar (-1), G_SLSNW (true,g,m)); ((Wp, Slepton (m,g), Sneutrino (-g)), Vector_Scalar_Scalar 1, G_SLSNW (false,g,m)) ] (*** REVISED: Compatible with CD+. ***) let charged_squark_currents' g h m1 m2 = [ ((Wm, Sup (m1,g), Sdown (m2,-h)), Vector_Scalar_Scalar (-1), G_SWS (true,g,h,m1,m2)); ((Wp, Sup (m1,-g), Sdown (m2,h)), Vector_Scalar_Scalar 1, G_SWS (false,g,h,m1,m2)) ] let charged_squark_currents g h = List.flatten (Product.list2 (charged_squark_currents' g h) [M1;M2] [M1;M2]) (*** REVISED: Compatible with CD+. ***) let neutral_sfermion_currents' g m1 m2 = [ ((Z, Slepton (m1,-g), Slepton (m2,g)), Vector_Scalar_Scalar (-1), G_ZSF (SL,g,m1,m2)); ((Z, Sup (m1,-g), Sup (m2,g)), Vector_Scalar_Scalar (-1), G_ZSF (SU,g,m1,m2)); ((Z, Sdown (m1,-g), Sdown (m2,g)), Vector_Scalar_Scalar (-1), G_ZSF (SD,g,m1,m2)) ] let neutral_sfermion_currents g = List.flatten (Product.list2 (neutral_sfermion_currents' g) [M1;M2] [M1;M2]) @ [ ((Z, Sneutrino (-g), Sneutrino g), Vector_Scalar_Scalar (-1), G_ZSF (SN,g,M1,M1)) ] (* The reality of the coupling of the Z-boson to two identical neutralinos makes the vector part of the coupling vanish. So we distinguish them not by the name but by the structure of the couplings. *) (*** REVISED: Compatible with CD+. ***) let neutral_Z_1 (n,m) = [ ((Neutralino n, Z, Neutralino m), FBF (1, Chibar, VA, Chi), (G_NZN (n,m))) ] (*** REVISED: Compatible with CD+. ***) let neutral_Z_2 n = [ ((Neutralino n, Z, Neutralino n), FBF (1, Chibar, Coupling.A, Chi), (G_NZN (n,n)) )] (* For very compressed spectra, radiative decays of the next-to-lightest neutralino become important. The formula can be found Haber/Wyler, 1989. In abuse, we include this loop-induced coupling together in the same model variant with the triangle Higgs couplings. *) let neutral_A = if Flags.higgs_triangle then [ ((Neutralino N2, Ga, Neutralino N1), FBF (1, Chibar, TVAM, Chi), G_NNA) ] else [] (*** REVISED: Compatible with CD+. ***) let charged_Z c1 c2 = let cc1 = conj_char c1 in ((Chargino cc1, Z, Chargino c2), FBF ((-1), Psibar, VA, Psi), G_CZC (c1,c2)) (*** REVISED: Compatible with CD+. ***) let yukawa_v = [ ((Gluino, Gl, Gluino), FBF (1, Chibar, V, Chi), Gs) ] (*** REVISED: Independent of the sign of CD. ***) let yukawa_higgs g = [ ((N (-g), Hp, L g), FBF (1, Psibar, Coupling.SR, Psi), G_YUK (6,g)); ((L (-g), Hm, N g), FBF (1, Psibar, Coupling.SL, Psi), G_YUK (6,g)); ((L (-g), H_Heavy, L g), FBF (1, Psibar, S, Psi), G_YUK (7,g)); ((L (-g), H_Light, L g), FBF (1, Psibar, S, Psi), G_YUK (8,g)); ((L (-g), A, L g), FBF (1, Psibar, P, Psi), G_YUK (9,g)); ((U (-g), H_Heavy, U g), FBF (1, Psibar, S, Psi), G_YUK (10,g)); ((U (-g), H_Light, U g), FBF (1, Psibar, S, Psi), G_YUK (11,g)); ((U (-g), A, U g), FBF (1, Psibar, P, Psi), G_YUK (12,g)); ((D (-g), H_Heavy, D g), FBF (1, Psibar, S, Psi), G_YUK (13,g)); ((D (-g), H_Light, D g), FBF (1, Psibar, S, Psi), G_YUK (14,g)); ((D (-g), A, D g), FBF (1, Psibar, P, Psi), G_YUK (15,g)) ] (*** REVISED: Compatible with CD+ and GS+. ***) let yukawa_goldstone g = [ ((N (-g), Phip, L g), FBF (1, Psibar, Coupling.SR, Psi), G_YUK (19,g)); ((L (-g), Phim, N g), FBF (1, Psibar, Coupling.SL, Psi), G_YUK (19,g)); ((L (-g), Phi0, L g), FBF (1, Psibar, P, Psi), G_YUK (16,g)); ((U (-g), Phi0, U g), FBF (1, Psibar, P, Psi), G_YUK (17,g)); ((D (-g), Phi0, D g), FBF (1, Psibar, P, Psi), G_YUK (18,g)) ] (*** REVISED: Independent of the sign of CD. ***) let yukawa_higgs_quark (g,h) = [ ((U (-g), Hp, D h), FBF (1, Psibar, SLR, Psi), G_YUK_1 (g, h)); ((D (-h), Hm, U g), FBF (1, Psibar, SLR, Psi), G_YUK_2 (g, h)) ] (*** REVISED: Compatible with CD+ and GS+. ***) let yukawa_goldstone_quark g h = [ ((U (-g), Phip, D h), FBF (1, Psibar, SLR, Psi), G_YUK_3 (g, h)); ((D (-h), Phim, U g), FBF (1, Psibar, SLR, Psi), G_YUK_4 (g, h)) ] (*** REVISED: Compatible with CD+. *) let yukawa_higgs_2' (c1,c2) = let cc1 = conj_char c1 in [ ((Chargino cc1, H_Heavy, Chargino c2), FBF (1, Psibar, SLR, Psi), G_CH2C (c1,c2)); ((Chargino cc1, H_Light, Chargino c2), FBF (1, Psibar, SLR, Psi), G_CH1C (c1,c2)); ((Chargino cc1, A, Chargino c2), FBF (1, Psibar, SLR, Psi), G_CAC (c1,c2)) ] let yukawa_higgs_2'' c = let cc = conj_char c in [ ((Chargino cc, H_Heavy, Chargino c), FBF (1, Psibar, S, Psi), G_CH2C (c,c)); ((Chargino cc, H_Light, Chargino c), FBF (1, Psibar, S, Psi), G_CH1C (c,c)); ((Chargino cc, A, Chargino c), FBF (1, Psibar, P, Psi), G_CAC (c,c)) ] let yukawa_higgs_2 = ThoList.flatmap yukawa_higgs_2' [(C1,C2);(C2,C1)] @ ThoList.flatmap yukawa_higgs_2'' [C1;C2] (*** REVISED: Compatible with CD+ and GS+. ***) let yukawa_goldstone_2' (c1,c2) = let cc1 = conj_char c1 in [ ((Chargino cc1, Phi0, Chargino c2), FBF (1, Psibar, SLR, Psi), G_CGC (c1,c2)) ] let yukawa_goldstone_2'' c = let cc = conj_char c in [ ((Chargino cc, Phi0, Chargino c), FBF (1, Psibar, P, Psi), G_CGC (c,c)) ] let yukawa_goldstone_2 = ThoList.flatmap yukawa_goldstone_2' [(C1,C2);(C2,C1)] @ ThoList.flatmap yukawa_goldstone_2'' [C1;C2] (*** REVISED: Compatible with CD+. ***) let higgs_charg_neutr n c = let cc = conj_char c in [ ((Neutralino n, Hm, Chargino c), FBF (-1, Chibar, SLR, Psi), G_NHC (n,c)); ((Chargino cc, Hp, Neutralino n), FBF (-1, Psibar, SLR, Chi), G_CHN (c,n)) ] (*** REVISED: Compatible with CD+ and GS+. ***) let goldstone_charg_neutr n c = let cc = conj_char c in [ ((Neutralino n, Phim, Chargino c), FBF (1, Chibar, SLR, Psi), G_NGC (n,c)); ((Chargino cc, Phip, Neutralino n), FBF (1, Psibar, SLR, Chi), G_CGN (c,n)) ] (*** REVISED: Compatible with CD+. ***) let higgs_neutr' (n,m) = [ ((Neutralino n, H_Heavy, Neutralino m), FBF (1, Chibar, SP, Chi), G_CICIH2 (n,m)); ((Neutralino n, H_Light, Neutralino m), FBF (1, Chibar, SP, Chi), G_CICIH1 (n,m)); ((Neutralino n, A, Neutralino m), FBF (1, Chibar, SP, Chi), G_CICIA (n,m)) ] let higgs_neutr'' n = [ ((Neutralino n, H_Heavy, Neutralino n), FBF (1, Chibar, S, Chi), G_CICIH2 (n,n)); ((Neutralino n, H_Light, Neutralino n), FBF (1, Chibar, S, Chi), G_CICIH1 (n,n)); ((Neutralino n, A, Neutralino n), FBF (1, Chibar, P, Chi), G_CICIA (n,n)) ] let higgs_neutr = ThoList.flatmap higgs_neutr' [(N1,N2);(N1,N3);(N1,N4); (N2,N3);(N2,N4);(N3,N4)] @ ThoList.flatmap higgs_neutr'' [N1;N2;N3;N4] (*** REVISED: Compatible with CD+ and GS+. ***) let goldstone_neutr' (n,m) = [ ((Neutralino n, Phi0, Neutralino m), FBF (1, Chibar, SP, Chi), G_CICIG (n,m)) ] let goldstone_neutr'' n = [ ((Neutralino n, Phi0, Neutralino n), FBF (1, Chibar, P, Chi), G_CICIG (n,n)) ] let goldstone_neutr = ThoList.flatmap goldstone_neutr' [(N1,N2);(N1,N3);(N1,N4); (N2,N3);(N2,N4);(N3,N4)] @ ThoList.flatmap goldstone_neutr'' [N1;N2;N3;N4] (*** REVISED: Compatible with CD+. ***) let yukawa_n_1 n g = [ ((Neutralino n, Slepton (M1,-g), L g), FBF (1, Chibar, Coupling.SL, Psi), G_YUK_N (true,g,n,SL,M1)); ((Neutralino n, Slepton (M2,-g), L g), FBF (1, Chibar, SR, Psi), G_YUK_N (true,g,n,SL,M2)); ((L (-g), Slepton (M1,g), Neutralino n), FBF (1, Psibar, SR, Chi), G_YUK_N (false,g,n,SL,M1)); ((L (-g), Slepton (M2,g), Neutralino n), FBF (1, Psibar, Coupling.SL, Chi), G_YUK_N (false,g,n,SL,M2)); ((Neutralino n, Sup (M1,-g), U g), FBF (1, Chibar, Coupling.SL, Psi), G_YUK_N (true,g,n,SU,M1)); ((Neutralino n, Sup (M2,-g), U g), FBF (1, Chibar, SR, Psi), G_YUK_N (true,g,n,SU,M2)); ((U (-g), Sup (M1,g), Neutralino n), FBF (1, Psibar, SR, Chi), G_YUK_N (false,g,n,SU,M1)); ((U (-g), Sup (M2,g), Neutralino n), FBF (1, Psibar, Coupling.SL, Chi), G_YUK_N (false,g,n,SU,M2)); ((Neutralino n, Sdown (M1,-g), D g), FBF (1, Chibar, Coupling.SL, Psi), G_YUK_N (true,g,n,SD,M1)); ((Neutralino n, Sdown (M2,-g), D g), FBF (1, Chibar, SR, Psi), G_YUK_N (true,g,n,SD,M2)); ((D (-g), Sdown (M1,g), Neutralino n), FBF (1, Psibar, SR, Chi), G_YUK_N (false,g,n,SD,M1)); ((D (-g), Sdown (M2,g), Neutralino n), FBF (1, Psibar, Coupling.SL, Chi), G_YUK_N (false,g,n,SD,M2)) ] let yukawa_n_2 n m = [ ((Neutralino n, Slepton (m,-3), L 3), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,3,n,SL,m)); ((L (-3), Slepton (m,3), Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,3,n,SL,m)); ((Neutralino n, Sup (m,-3), U 3), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,3,n,SU,m)); ((U (-3), Sup (m,3), Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,3,n,SU,m)); ((Neutralino n, Sdown (m,-3), D 3), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,3,n,SD,m)); ((D (-3), Sdown (m,3), Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,3,n,SD,m)) ] let yukawa_n_3 n g = [ ((Neutralino n, Sneutrino (-g), N g), FBF (1, Chibar, Coupling.SL, Psi), G_YUK_N (true,g,n,SN,M1)); ((N (-g), Sneutrino g, Neutralino n), FBF (1, Psibar, SR, Chi), G_YUK_N (false,g,n,SN,M1)) ] let yukawa_n_4 g = [ ((U (-g), Sup (M1,g), Gluino), FBF ((-1), Psibar, SR, Chi), G_S_Sqrt); ((D (-g), Sdown (M1,g), Gluino), FBF ((-1), Psibar, SR, Chi), G_S_Sqrt); ((Gluino, Sup (M1,-g), U g), FBF ((-1), Chibar, Coupling.SL, Psi), G_S_Sqrt); ((Gluino, Sdown (M1,-g), D g), FBF ((-1), Chibar, Coupling.SL, Psi), G_S_Sqrt); ((U (-g), Sup (M2,g), Gluino), FBF (1, Psibar, Coupling.SL, Chi), G_S_Sqrt); ((D (-g), Sdown (M2,g), Gluino), FBF (1, Psibar, Coupling.SL, Chi), G_S_Sqrt); ((Gluino, Sup (M2,-g), U g), FBF (1, Chibar, SR, Psi), G_S_Sqrt); ((Gluino, Sdown (M2,-g), D g), FBF (1, Chibar, SR, Psi), G_S_Sqrt)] let yukawa_n_5 m = [ ((U (-3), Sup (m,3), Gluino), FBF (1, Psibar, SLR, Chi), G_YUK_G (false,3,SU,m)); ((D (-3), Sdown (m,3), Gluino), FBF (1, Psibar, SLR, Chi), G_YUK_G (false,3,SD,m)); ((Gluino, Sup (m,-3), U 3), FBF (1, Chibar, SLR, Psi), G_YUK_G (true,3,SU,m)); ((Gluino, Sdown (m,-3), D 3), FBF (1, Chibar, SLR, Psi), G_YUK_G (true,3,SD,m))] let yukawa_n = List.flatten (Product.list2 yukawa_n_1 [N1;N2;N3;N4] [1;2]) @ List.flatten (Product.list2 yukawa_n_2 [N1;N2;N3;N4] [M1;M2]) @ List.flatten (Product.list2 yukawa_n_3 [N1;N2;N3;N4] [1;2;3]) @ ThoList.flatmap yukawa_n_4 [1;2] @ ThoList.flatmap yukawa_n_5 [M1;M2] (*** REVISED: Compatible with CD+. ***) let yukawa_c_1 c g = let cc = conj_char c in [ ((L (-g), Sneutrino g, Chargino cc), BBB (1, Psibar, Coupling.SR, Psibar), G_YUK_C (true,g,c,SN,M1)); ((Chargino c, Sneutrino (-g), L g), PBP (1, Psi, Coupling.SL, Psi), G_YUK_C (false,g,c,SN,M1)) ] let yukawa_c_2 c = let cc = conj_char c in [ ((L (-3), Sneutrino 3, Chargino cc), BBB (1, Psibar, SLR, Psibar), G_YUK_C (true,3,c,SN,M1)); ((Chargino c, Sneutrino (-3), L 3), PBP (1, Psi, SLR, Psi), G_YUK_C (false,3,c,SN,M1)) ] let yukawa_c_3 c m g = let cc = conj_char c in [ ((N (-g), Slepton (m,g), Chargino c), FBF (1, Psibar, Coupling.SR, Psi), G_YUK_C (true,g,c,SL,m)); ((Chargino cc, Slepton (m,-g), N g), FBF (1, Psibar, Coupling.SL, Psi), G_YUK_C (false,g,c,SL,m)) ] let yukawa_c c = ThoList.flatmap (yukawa_c_1 c) [1;2] @ yukawa_c_2 c @ List.flatten (Product.list2 (yukawa_c_3 c) [M1] [1;2]) @ List.flatten (Product.list2 (yukawa_c_3 c) [M1;M2] [3]) (*** REVISED: Compatible with CD+. ***) let yukawa_cq' c (g,h) m = let cc = conj_char c in [ ((Chargino c, Sup (m,-g), D h), PBP (1, Psi, SLR, Psi), G_YUK_Q (false,g,h,c,SU,m)); ((D (-h), Sup (m,g), Chargino cc), BBB (1, Psibar, SLR, Psibar), G_YUK_Q (true,g,h,c,SU,m)); ((Chargino cc, Sdown (m,-h), U g), FBF (1, Psibar, SLR, Psi), G_YUK_Q (true,g,h,c,SD,m)); ((U (-g), Sdown (m,h), Chargino c), FBF (1, Psibar, SLR, Psi), G_YUK_Q (false,g,h,c,SD,m)) ] let yukawa_cq'' c (g,h) = let cc = conj_char c in [ ((Chargino c, Sup (M1,-g), D h), PBP (1, Psi, Coupling.SL, Psi), G_YUK_Q (false,g,h,c,SU,M1)); ((D (-h), Sup (M1,g), Chargino cc), BBB (1, Psibar, Coupling.SR, Psibar), G_YUK_Q (true,g,h,c,SU,M1)); ((Chargino cc, Sdown (M1,-h), U g), FBF (1, Psibar, Coupling.SL, Psi), G_YUK_Q (true,g,h,c,SD,M1)); ((U (-g), Sdown (M1,h), Chargino c), FBF (1, Psibar, Coupling.SR, Psi), G_YUK_Q (false,g,h,c,SD,M1)) ] let yukawa_cq c = if Flags.ckm_present then List.flatten (Product.list2 (yukawa_cq' c) [(1,3);(2,3);(3,3); (3,2);(3,1)] [M1;M2]) @ ThoList.flatmap (yukawa_cq'' c) [(1,1);(1,2);(2,1);(2,2)] else ThoList.flatmap (yukawa_cq' c (3,3)) [M1;M2] @ ThoList.flatmap (yukawa_cq'' c) [(1,1);(2,2)] (*** REVISED: Compatible with CD+. Remark: Singlet and octet gluon exchange. The coupling is divided by sqrt(2) to account for the correct normalization of the Lie algebra generators. ***) let col_currents g = [ ((D (-g), Gl, D g), FBF ((-1), Psibar, V, Psi), Gs); ((U (-g), Gl, U g), FBF ((-1), Psibar, V, Psi), Gs)] (*** REVISED: Compatible with CD+. Remark: Singlet and octet gluon exchange. The coupling is divided by sqrt(2) to account for the correct normalization of the Lie algebra generators. ***) let col_sfermion_currents g m = [ ((Gl, Sup (m,-g), Sup (m,g)), Vector_Scalar_Scalar (-1), Gs); ((Gl, Sdown (m,-g), Sdown (m,g)), Vector_Scalar_Scalar (-1), Gs)] (* The gravitino coupling is generically $1/(4 M_{Pl.})$ *) (*** Triple vertices containing graivitinos. ***) let triple_gravitino' g = [ ((Grino, Sneutrino (-g), N g), GBG (1, Gravbar, Coupling.SL, Psi), G_Grav_N); ((N (-g), Sneutrino g, Grino), GBG (1, Psibar, Coupling.SL, Grav), G_Grav_N)] let triple_gravitino'' g m = [ ((Grino, Slepton (m, -g), L g), GBG (1, Gravbar, SLR, Psi), G_Grav_L (g,m)); ((L (-g), Slepton (m, g), Grino), GBG (1, Psibar, SLR, Grav), G_Grav_Lc (g,m)); ((Grino, Sup (m, -g), U g), GBG (1, Gravbar, SLR, Psi), G_Grav_U (g,m)); ((U (-g), Sup (m, g), Grino), GBG (1, Psibar, SLR, Grav), G_Grav_Uc (g,m)); ((Grino, Sdown (m, -g), D g), GBG (1, Gravbar, SLR, Psi), G_Grav_D (g,m)); ((D (-g), Sdown (m, g), Grino), GBG (1, Psibar, SLR, Grav), G_Grav_Dc (g,m)) ] let higgs_ch_gravitino c = let cc = conj_char c in [ ((Grino, Hm, Chargino c), GBG (1, Gravbar, SLR, Psi), G_Gr_H_Ch c); ((Chargino cc, Hp, Grino), GBG (1, Psibar, SLR, Grav), G_Gr_H_Ch cc) ] let higgs_neu_gravitino n = [ ((Grino, H_Light, Neutralino n), GBG (1, Gravbar, SLR, Chi), G_Gr_H1_Neu n); ((Grino, H_Heavy, Neutralino n), GBG (1, Gravbar, SLR, Chi), G_Gr_H2_Neu n); ((Grino, A, Neutralino n), GBG (1, Gravbar, SLR, Chi), G_Gr_H3_Neu n) ] let gravitino_gaugino_3 = [ ((Grino, Gl, Gluino), GBG (1, Gravbar, V, Chi), G_Grav); ((Gluino, Gl, Grino), GBG (1, Chibar, V, Grav), G_Grav); ((Chargino C1c, Wp, Grino), GBG (1, Psibar, VLR, Grav), G_Gr_Ch C1); ((Chargino C2c, Wp, Grino), GBG (1, Psibar, VLR, Grav), G_Gr_Ch C2); ((Grino, Wm, Chargino C1), GBG (1, Gravbar, VLR, Psi), G_Gr_Ch C1c); ((Grino, Wm, Chargino C2), GBG (1, Gravbar, VLR, Psi), G_Gr_Ch C2c); ((Grino, Z, Neutralino N1), GBG (1, Gravbar, VLR, Chi), G_Gr_Z_Neu N1); ((Grino, Z, Neutralino N2), GBG (1, Gravbar, VLR, Chi), G_Gr_Z_Neu N2); ((Grino, Z, Neutralino N3), GBG (1, Gravbar, VLR, Chi), G_Gr_Z_Neu N3); ((Grino, Z, Neutralino N4), GBG (1, Gravbar, VLR, Chi), G_Gr_Z_Neu N4); ((Grino, Ga, Neutralino N1), GBG (1, Gravbar, VLR, Chi), G_Gr_A_Neu N1); ((Grino, Ga, Neutralino N2), GBG (1, Gravbar, VLR, Chi), G_Gr_A_Neu N2); ((Grino, Ga, Neutralino N3), GBG (1, Gravbar, VLR, Chi), G_Gr_A_Neu N3); ((Grino, Ga, Neutralino N4), GBG (1, Gravbar, VLR, Chi), G_Gr_A_Neu N4) ] let triple_gravitino = ThoList.flatmap triple_gravitino' [1;2;3] @ List.flatten (Product.list2 triple_gravitino'' [1;2;3] [M1; M2]) @ ThoList.flatmap higgs_ch_gravitino [C1; C2] @ ThoList.flatmap higgs_neu_gravitino [N1; N2; N3; N4] @ gravitino_gaugino_3 (*** REVISED: Compatible with CD+. ***) let triple_gauge = [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_G_S)] (*** REVISED: Independent of the sign of CD. ***) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let gluon4 = Vector4 [(-1, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let quartic_gauge = [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_PZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_PPWW; (Gl, Gl, Gl, Gl), gauge4, G_SS] (* The [Scalar_Vector_Vector] couplings do not depend on the choice of the sign of the covariant derivative since they are quadratic in the gauge couplings. *) (*** REVISED: Compatible with CD+. ***) (*** Revision: 2005-03-10: first two vertices corrected. ***) let gauge_higgs = [ ((Wm, Hp, A), Vector_Scalar_Scalar 1, G_GH 1); ((Wp, Hm, A), Vector_Scalar_Scalar 1, G_GH 1); ((Z, H_Heavy, A), Vector_Scalar_Scalar 1, G_GH 3); ((Z, H_Light, A), Vector_Scalar_Scalar 1, G_GH 2); ((H_Heavy, Wp, Wm), Scalar_Vector_Vector 1, G_GH 5); ((H_Light, Wp, Wm), Scalar_Vector_Vector 1, G_GH 4); ((Wm, Hp, H_Heavy), Vector_Scalar_Scalar 1, G_GH 7); ((Wp, Hm, H_Heavy), Vector_Scalar_Scalar (-1), G_GH 7); ((Wm, Hp, H_Light), Vector_Scalar_Scalar 1, G_GH 6); ((Wp, Hm, H_Light), Vector_Scalar_Scalar (-1), G_GH 6); ((H_Heavy, Z, Z), Scalar_Vector_Vector 1, G_GH 9); ((H_Light, Z, Z), Scalar_Vector_Vector 1, G_GH 8); ((Z, Hp, Hm), Vector_Scalar_Scalar 1, G_GH 10); ((Ga, Hp, Hm), Vector_Scalar_Scalar 1, G_GH 11) ] @ (if Flags.higgs_triangle then [((H_Light, Gl, Gl), Dim5_Scalar_Gauge2 1, G_GLGLH); ((H_Heavy, Gl, Gl), Dim5_Scalar_Gauge2 1, G_GLGLHH); ((A, Gl, Gl), Dim5_Scalar_Gauge2_Skew 1, G_GLGLA); ((H_Light, Ga, Ga), Dim5_Scalar_Gauge2 1, G_PPH); ((H_Heavy, Ga, Ga), Dim5_Scalar_Gauge2 1, G_PPHH); ((A, Ga, Ga), Dim5_Scalar_Gauge2 1, G_PPA)] else []) (*** REVISED: Compatible with CD+ and GS+. ***) let gauge_higgs_gold = [ ((Wp, Phi0, Phim), Vector_Scalar_Scalar 1, G_GH 1); ((Wm, Phi0, Phip), Vector_Scalar_Scalar 1, G_GH 1); ((Z, H_Heavy, Phi0), Vector_Scalar_Scalar 1, G_GH 2); ((Z, H_Light, Phi0), Vector_Scalar_Scalar (-1), G_GH 3); ((Wp, H_Heavy, Phim), Vector_Scalar_Scalar 1, G_GH 6); ((Wm, H_Heavy, Phip), Vector_Scalar_Scalar (-1), G_GH 6); ((Wp, H_Light, Phim), Vector_Scalar_Scalar (-1), G_GH 7); ((Wm, H_Light, Phip), Vector_Scalar_Scalar 1, G_GH 7); ((Phim, Wp, Ga), Scalar_Vector_Vector 1, G_GHGo 1); ((Phip, Wm, Ga), Scalar_Vector_Vector 1, G_GHGo 1); ((Phim, Wp, Z), Scalar_Vector_Vector 1, G_GHGo 2); ((Phip, Wm, Z), Scalar_Vector_Vector 1, G_GHGo 2); ((Z, Phip, Phim), Vector_Scalar_Scalar 1, G_GH 10); ((Ga, Phip, Phim), Vector_Scalar_Scalar 1, G_GH 11) ] let gauge_higgs4 = [ ((A, A, Z, Z), Scalar2_Vector2 1, G_GH4 1); ((H_Heavy, H_Heavy, Z, Z), Scalar2_Vector2 1, G_GH4 3); ((H_Light, H_Light, Z, Z), Scalar2_Vector2 1, G_GH4 2); ((Hp, Hm, Z, Z), Scalar2_Vector2 1, G_GH4 4); ((Hp, Hm, Ga, Ga), Scalar2_Vector2 1, G_GH4 5); ((Hp, Hm, Ga, Z), Scalar2_Vector2 1, G_GH4 6); ((Hp, H_Heavy, Wm, Z), Scalar2_Vector2 1, G_GH4 8); ((Hm, H_Heavy, Wp, Z), Scalar2_Vector2 1, G_GH4 8); ((Hp, H_Light, Wm, Z), Scalar2_Vector2 1, G_GH4 7); ((Hm, H_Light, Wp, Z), Scalar2_Vector2 1, G_GH4 7); ((Hp, H_Heavy, Wm, Ga), Scalar2_Vector2 1, G_GH4 10); ((Hm, H_Heavy, Wp, Ga), Scalar2_Vector2 1, G_GH4 10); ((Hp, H_Light, Wm, Ga), Scalar2_Vector2 1, G_GH4 9); ((Hm, H_Light, Wp, Ga), Scalar2_Vector2 1, G_GH4 9); ((A, A, Wp, Wm), Scalar2_Vector2 1, G_GH4 11); ((H_Heavy, H_Heavy, Wp, Wm), Scalar2_Vector2 1, G_GH4 13); ((H_Light, H_Light, Wp, Wm), Scalar2_Vector2 1, G_GH4 12); ((Hp, Hm, Wp, Wm), Scalar2_Vector2 1, G_GH4 14); ((Hp, A, Wm, Z), Scalar2_Vector2 1, G_GH4 15); ((Hm, A, Wp, Z), Scalar2_Vector2 (-1), G_GH4 15); ((Hp, A, Wm, Ga), Scalar2_Vector2 1, G_GH4 16); ((Hm, A, Wp, Ga), Scalar2_Vector2 (-1), G_GH4 16) ] let gauge_higgs_gold4 = [ ((Z, Z, Phi0, Phi0), Scalar2_Vector2 1, G_GHGo4 1); ((Z, Z, Phip, Phim), Scalar2_Vector2 1, G_GHGo4 2); ((Ga, Ga, Phip, Phim), Scalar2_Vector2 1, G_GHGo4 3); ((Z, Ga, Phip, Phim), Scalar2_Vector2 1, G_GHGo4 4); ((Wp, Wm, Phip, Phim), Scalar2_Vector2 1, G_GHGo4 5); ((Wp, Wm, Phi0, Phi0), Scalar2_Vector2 1, G_GHGo4 5); ((Wp, Z, Phim, Phi0), Scalar2_Vector2 1, G_GHGo4 6); ((Wm, Z, Phip, Phi0), Scalar2_Vector2 (-1), G_GHGo4 6); ((Wp, Ga, Phim, Phi0), Scalar2_Vector2 1, G_GHGo4 7); ((Wm, Ga, Phip, Phi0), Scalar2_Vector2 (-1), G_GHGo4 7); ((Wp, Z, Phim, H_Heavy), Scalar2_Vector2 1, G_GHGo4 9); ((Wm, Z, Phip, H_Heavy), Scalar2_Vector2 1, G_GHGo4 9); ((Wp, Ga, Phim, H_Heavy), Scalar2_Vector2 1, G_GHGo4 11); ((Wm, Ga, Phip, H_Heavy), Scalar2_Vector2 1, G_GHGo4 11); ((Wp, Z, Phim, H_Light), Scalar2_Vector2 1, G_GHGo4 8); ((Wm, Z, Phip, H_Light), Scalar2_Vector2 1, G_GHGo4 8); ((Wp, Ga, Phim, H_Light), Scalar2_Vector2 1, G_GHGo4 10); ((Wm, Ga, Phip, H_Light), Scalar2_Vector2 1, G_GHGo4 10) ] let gauge_sfermion4' g m1 m2 = [ ((Wp, Wm, Slepton (m1,g), Slepton (m2,-g)), Scalar2_Vector2 1, G_WWSFSF (SL,g,m1,m2)); ((Z, Ga, Slepton (m1,g), Slepton (m2,-g)), Scalar2_Vector2 1, G_ZPSFSF (SL,g,m1,m2)); ((Z, Z, Slepton (m1,g), Slepton (m2,-g)), Scalar2_Vector2 1, G_ZZSFSF (SL,g,m1,m2)); ((Wp, Wm, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 1, G_WWSFSF (SU,g,m1,m2)); ((Wp, Wm, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 1, G_WWSFSF (SD,g,m1,m2)); ((Z, Z, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 1, G_ZZSFSF (SU,g,m1,m2)); ((Z, Z, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 1, G_ZZSFSF (SD,g,m1,m2)); ((Z, Ga, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 1, G_ZPSFSF (SU,g,m1,m2)); ((Z, Ga, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 1, G_ZPSFSF (SD,g,m1,m2)) ] let gauge_sfermion4'' g m = [ ((Wp, Ga, Slepton (m,g), Sneutrino (-g)), Scalar2_Vector2 1, G_WPSLSN (false,g,m)); ((Wm, Ga, Slepton (m,-g), Sneutrino g), Scalar2_Vector2 1, G_WPSLSN (true,g,m)); ((Wp, Z, Slepton (m,g), Sneutrino (-g)), Scalar2_Vector2 1, G_WZSLSN (false,g,m)); ((Wm, Z, Slepton (m,-g), Sneutrino g), Scalar2_Vector2 1, G_WZSLSN (true,g,m)); ((Ga, Ga, Slepton (m,g), Slepton (m,-g)), Scalar2_Vector2 1, G_PPSFSF SL); ((Ga, Ga, Sup (m,g), Sup (m,-g)), Scalar2_Vector2 1, G_PPSFSF SU); ((Ga, Ga, Sdown (m,g), Sdown (m,-g)), Scalar2_Vector2 1, G_PPSFSF SD)] let gauge_sfermion4 g = List.flatten (Product.list2 (gauge_sfermion4' g) [M1;M2] [M1;M2]) @ ThoList.flatmap (gauge_sfermion4'' g) [M1;M2] @ [ ((Wp, Wm, Sneutrino g, Sneutrino (-g)), Scalar2_Vector2 1, G_WWSFSF (SN,g,M1,M1)); ((Z, Z, Sneutrino g, Sneutrino (-g)), Scalar2_Vector2 1, G_ZZSFSF (SN,g,M1,M1)) ] let gauge_squark4'' g h m1 m2 = [ ((Wp, Ga, Sup (m1,-g), Sdown (m2,h)), Scalar2_Vector2 1, G_WPSUSD (false,m1,m2,g,h)); ((Wm, Ga, Sup (m1,g), Sdown (m2,-h)), Scalar2_Vector2 1, G_WPSUSD (true,m1,m2,g,h)); ((Wp, Z, Sup (m1,-g), Sdown (m2,h)), Scalar2_Vector2 1, G_WZSUSD (false,m1,m2,g,h)); ((Wm, Z, Sup (m1,g), Sdown (m2,-h)), Scalar2_Vector2 1, G_WZSUSD (true,m1,m2,g,h)) ] let gauge_squark4' g h = List.flatten (Product.list2 (gauge_squark4'' g h) [M1;M2] [M1;M2]) let gauge_squark4 = if Flags.ckm_present then List.flatten (Product.list2 gauge_squark4' [1;2;3] [1;2;3]) else ThoList.flatmap (fun g -> gauge_squark4' g g) [1;2;3] let gluon_w_squark'' g h m1 m2 = [ ((Gl, Wp, Sup (m1,-g), Sdown (m2,h)), Scalar2_Vector2 1, G_GlWSUSD (false,m1,m2,g,h)); ((Gl, Wm, Sup (m1,g), Sdown (m2,-h)), Scalar2_Vector2 1, G_GlWSUSD (true,m1,m2,g,h)) ] let gluon_w_squark' g h = List.flatten (Product.list2 (gluon_w_squark'' g h) [M1;M2] [M1;M2]) let gluon_w_squark = if Flags.ckm_present then List.flatten (Product.list2 gluon_w_squark' [1;2;3] [1;2;3]) else ThoList.flatmap (fun g -> gluon_w_squark' g g) [1;2;3] let gluon_gauge_squark' g m1 m2 = [ ((Gl, Z, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 2, G_GlZSFSF (SU,g,m1,m2)); ((Gl, Z, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 2, G_GlZSFSF (SD,g,m1,m2)) ] let gluon_gauge_squark'' g m = [ ((Gl, Ga, Sup (m,g), Sup (m,-g)), Scalar2_Vector2 2, G_GlPSQSQ); ((Gl, Ga, Sdown (m,g), Sdown (m,-g)), Scalar2_Vector2 (-1), G_GlPSQSQ) ] let gluon_gauge_squark g = List.flatten (Product.list2 (gluon_gauge_squark' g) [M1;M2] [M1;M2]) @ ThoList.flatmap (gluon_gauge_squark'' g) [M1;M2] let gluon2_squark2 g m = [ ((Gl, Gl, Sup (m,g), Sup (m,-g)), Scalar2_Vector2 1, G_GlGlSQSQ); ((Gl, Gl, Sdown (m,g), Sdown (m,-g)), Scalar2_Vector2 1, G_GlGlSQSQ)] (*** REVISED: Independent of the sign of CD. ***) let higgs = [ ((Hp, Hm, H_Heavy), Scalar_Scalar_Scalar 1, G_H3 1); ((Hp, Hm, H_Light), Scalar_Scalar_Scalar 1, G_H3 2); ((H_Heavy, H_Heavy, H_Light), Scalar_Scalar_Scalar 1, G_H3 3); ((H_Heavy, H_Heavy, H_Heavy), Scalar_Scalar_Scalar 1, G_H3 4); ((H_Light, H_Light, H_Light), Scalar_Scalar_Scalar 1, G_H3 5); ((H_Heavy, H_Light, H_Light), Scalar_Scalar_Scalar 1, G_H3 6); ((H_Heavy, A, A), Scalar_Scalar_Scalar 1, G_H3 7); ((H_Light, A, A), Scalar_Scalar_Scalar 1, G_H3 8) ] (*** REVISED: Compatible with GS+, independent of the sign of CD. ***) let higgs_gold = [ ((H_Heavy, A, Phi0), Scalar_Scalar_Scalar 1, G_HGo3 1); ((H_Light, A, Phi0), Scalar_Scalar_Scalar 1, G_HGo3 2); ((H_Heavy, Hp, Phim), Scalar_Scalar_Scalar 1, G_HGo3 3); ((H_Heavy, Hm, Phip), Scalar_Scalar_Scalar 1, G_HGo3 3); ((H_Light, Hp, Phim), Scalar_Scalar_Scalar 1, G_HGo3 4); ((H_Light, Hm, Phip), Scalar_Scalar_Scalar 1, G_HGo3 4); ((A, Hp, Phim), Scalar_Scalar_Scalar (-1), G_HGo3 5); ((A, Hm, Phip), Scalar_Scalar_Scalar 1, G_HGo3 5); ((H_Heavy, Phi0, Phi0), Scalar_Scalar_Scalar (-1), G_H3 7); ((H_Heavy, Phip, Phim), Scalar_Scalar_Scalar (-1), G_H3 7); ((H_Light, Phi0, Phi0), Scalar_Scalar_Scalar (-1), G_H3 8); ((H_Light, Phip, Phim), Scalar_Scalar_Scalar (-1), G_H3 8) ] (* Here follow purely scalar quartic vertices which are only available for the no-Whizard colored version. *) (*** REVISED: Independent of the sign of CD. ***) let higgs4 = [ ((Hp, Hm, Hp, Hm), Scalar4 1, G_H4 1); ((Hp, Hm, H_Heavy, H_Heavy), Scalar4 1, G_H4 2); ((Hp, Hm, H_Light, H_Light), Scalar4 1, G_H4 3); ((Hp, Hm, H_Heavy, H_Light), Scalar4 1, G_H4 4); ((Hp, Hm, A, A), Scalar4 1, G_H4 5); ((H_Heavy, H_Heavy, H_Heavy, H_Heavy), Scalar4 1, G_H4 6); ((H_Light, H_Light, H_Light, H_Light), Scalar4 1, G_H4 6); ((H_Heavy, H_Heavy, H_Light, H_Light), Scalar4 1, G_H4 7); ((H_Heavy, H_Light, H_Light, H_Light), Scalar4 1, G_H4 8); ((H_Heavy, H_Heavy, H_Heavy, H_Light), Scalar4 (-1), G_H4 8); ((H_Heavy, H_Heavy, A, A), Scalar4 1, G_H4 9); ((H_Light, H_Light, A, A), Scalar4 (-1), G_H4 9); ((H_Heavy, H_Light, A, A), Scalar4 1, G_H4 10); ((A, A, A, A), Scalar4 1, G_H4 11) ] (*** REVISED: Compatible with GS+, independent of the sign of CD. ***) let higgs_gold4 = [ ((H_Heavy, H_Heavy, A, Phi0), Scalar4 1, G_HGo4 1); ((H_Heavy, H_Light, A, Phi0), Scalar4 1, G_HGo4 2); ((H_Light, H_Light, A, Phi0), Scalar4 (-1), G_HGo4 1); ((A, A, A, Phi0), Scalar4 3, G_HGo4 3); ((Hp, Hm, A, Phi0), Scalar4 1, G_HGo4 3); ((H_Heavy, H_Heavy, Hp, Phim), Scalar4 1, G_HGo4 4); ((H_Heavy, H_Heavy, Hm, Phip), Scalar4 1, G_HGo4 4); ((H_Heavy, H_Light, Hp, Phim), Scalar4 1, G_HGo4 5); ((H_Heavy, H_Light, Hm, Phip), Scalar4 1, G_HGo4 5); ((H_Light, H_Light, Hp, Phim), Scalar4 (-1), G_HGo4 4); ((H_Light, H_Light, Hm, Phip), Scalar4 (-1), G_HGo4 4); ((A, A, Hp, Phim), Scalar4 1, G_HGo4 6); ((A, A, Hm, Phip), Scalar4 1, G_HGo4 6); ((H_Heavy, A, Hp, Phim), Scalar4 1, G_HGo4 7); ((H_Heavy, A, Hm, Phip), Scalar4 (-1), G_HGo4 7); ((H_Light, A, Hp, Phim), Scalar4 1, G_HGo4 8); ((H_Light, A, Hm, Phip), Scalar4 (-1), G_HGo4 8); ((Hp, Hm, Hp, Phim), Scalar4 2, G_HGo4 6); ((Hp, Hm, Hm, Phip), Scalar4 2, G_HGo4 6); ((H_Heavy, H_Heavy, Phi0, Phi0), Scalar4 (-1), G_H4 9); ((H_Heavy, H_Light, Phi0, Phi0), Scalar4 (-1), G_H4 10); ((H_Light, H_Light, Phi0, Phi0), Scalar4 1, G_H4 9); ((A, A, Phi0, Phi0), Scalar4 1, G_HGo4 9); ((Hp, Hm, Phi0, Phi0), Scalar4 1, G_HGo4 10); ((H_Heavy, Hp, Phim, Phi0), Scalar4 1, G_HGo4 8); ((H_Heavy, Hm, Phip, Phi0), Scalar4 (-1), G_HGo4 8); ((H_Light, Hp, Phim, Phi0), Scalar4 (-1), G_HGo4 7); ((H_Light, Hm, Phip, Phi0), Scalar4 1, G_HGo4 7); ((A, Hp, Phim, Phi0), Scalar4 1, G_HGo4 11); ((A, Hm, Phip, Phi0), Scalar4 1, G_HGo4 11); ((H_Heavy, H_Heavy, Phip, Phim), Scalar4 1, G_HGo4 12); ((H_Heavy, H_Light, Phip, Phim), Scalar4 1, G_HGo4 13); ((H_Light, H_Light, Phip, Phim), Scalar4 1, G_HGo4 14); ((A, A, Phip, Phim), Scalar4 1, G_HGo4 15); ((Hp, Hm, Phip, Phim), Scalar4 1, G_HGo4 16); ((Hp, Hp, Phim, Phim), Scalar4 1, G_HGo4 17); ((Hm, Hm, Phip, Phip), Scalar4 1, G_HGo4 17); ((Hp, Phim, Phi0, Phi0), Scalar4 (-1), G_HGo4 6); ((Hm, Phip, Phi0, Phi0), Scalar4 (-1), G_HGo4 6); ((A, Phi0, Phi0, Phi0), Scalar4 (-3), G_HGo4 6); ((A, Phi0, Phip, Phim), Scalar4 (-1), G_HGo4 6); ((Hp, Phim, Phip, Phim), Scalar4 (-2), G_HGo4 6); ((Hm, Phip, Phip, Phim), Scalar4 (-2), G_HGo4 6) ] (*** REVISED: Independent of the sign of CD and GS. ***) let goldstone4 = [ ((Phi0, Phi0, Phi0, Phi0), Scalar4 1, G_GG4 1); ((Phip, Phim, Phi0, Phi0), Scalar4 1, G_GG4 2); ((Phip, Phim, Phip, Phim), Scalar4 1, G_GG4 3) ] (* The vertices of the type Higgs - Sfermion - Sfermion are independent of the choice of the CD sign since they are quadratic in the gauge coupling. *) (*** REVISED: Independent of the sign of CD. ***) let higgs_sneutrino' g = [ ((H_Heavy, Sneutrino g, Sneutrino (-g)), Scalar_Scalar_Scalar 1, G_H2SFSF (SN,g,M1,M1)); ((H_Light, Sneutrino g, Sneutrino (-g)), Scalar_Scalar_Scalar 1, G_H1SFSF (SN,g,M1,M1)); ((Hp, Sneutrino (-g), Slepton (M1,g)), Scalar_Scalar_Scalar 1, G_HSNSL (false,g,M1)); ((Hm, Sneutrino g, Slepton (M1,-g)), Scalar_Scalar_Scalar 1, G_HSNSL (true,g,M1)) ] let higgs_sneutrino'' = [ ((Hp, Sneutrino (-3), Slepton (M2,3)), Scalar_Scalar_Scalar 1, G_HSNSL (false,3,M2)); ((Hm, Sneutrino 3, Slepton (M2,-3)), Scalar_Scalar_Scalar 1, G_HSNSL (false,3,M2)) ] let higgs_sneutrino = ThoList.flatmap higgs_sneutrino' [1;2;3] @ higgs_sneutrino'' (* Under the assumption that there is no mixing between the left- and right-handed sfermions for the first two generations there is only a coupling of the form Higgs - sfermion1 - sfermion2 for the third generation. All the others are suppressed by $m_f/M_W$. *) (*** REVISED: Independent of the sign of CD. ***) let higgs_sfermion' g m1 m2 = [ ((H_Heavy, Slepton (m1,g), Slepton (m2,-g)), Scalar_Scalar_Scalar 1, G_H2SFSF (SL,g,m1,m2)); ((H_Light, Slepton (m1,g), Slepton (m2,-g)), Scalar_Scalar_Scalar 1, G_H1SFSF (SL,g,m1,m2)); ((H_Heavy, Sup (m1,g), Sup (m2,-g)), Scalar_Scalar_Scalar 1, G_H2SFSF (SU,g,m1,m2)); ((H_Heavy, Sdown (m1,g), Sdown (m2,-g)), Scalar_Scalar_Scalar 1, G_H2SFSF (SD,g,m1,m2)); ((H_Light, Sup (m1,g), Sup (m2,-g)), Scalar_Scalar_Scalar 1, G_H1SFSF (SU,g,m1,m2)); ((H_Light, Sdown (m1,g), Sdown (m2,-g)), Scalar_Scalar_Scalar 1, G_H1SFSF (SD,g,m1,m2)) ] let higgs_sfermion'' m1 m2 = [ ((A, Slepton (m1,3), Slepton (m2,-3)), Scalar_Scalar_Scalar 1, G_ASFSF (SL,3,m1,m2)); ((A, Sup (m1,3), Sup (m2,-3)), Scalar_Scalar_Scalar 1, G_ASFSF (SU,3,m1,m2)); ((A, Sdown (m1,3), Sdown (m2,-3)), Scalar_Scalar_Scalar 1, G_ASFSF (SD,3,m1,m2)) ] let higgs_sfermion = List.flatten (Product.list2 (higgs_sfermion' 3) [M1;M2] [M1;M2]) @ (higgs_sfermion' 1 M1 M1) @ (higgs_sfermion' 1 M2 M2) @ (higgs_sfermion' 2 M1 M1) @ (higgs_sfermion' 2 M2 M2) @ List.flatten (Product.list2 higgs_sfermion'' [M1;M2] [M1;M2]) (*i let higgs_sfermion g = List.flatten (Product.list2 (higgs_sfermion' g) [M1;M2] [M1;M2]) i*) (*** REVISED: Independent of the sign of CD, compatible with GS+. ***) let goldstone_sfermion' g m1 m2 = [ ((Phi0, Slepton (m1,g), Slepton (m2,-g)), Scalar_Scalar_Scalar 1, G_GoSFSF (SL,g,m1,m2)); ((Phi0, Sup (m1,g), Sup (m2,-g)), Scalar_Scalar_Scalar 1, G_GoSFSF (SU,g,m1,m2)); ((Phi0, Sdown (m1,g), Sdown (m2,-g)), Scalar_Scalar_Scalar 1, G_GoSFSF (SD,g,m1,m2))] let goldstone_sfermion'' g = [ ((Phip, Sneutrino (-g), Slepton (M1,g)), Scalar_Scalar_Scalar 1, G_GoSNSL (false,g,M1)); ((Phim, Sneutrino g, Slepton (M1,-g)), Scalar_Scalar_Scalar 1, G_GoSNSL (true,g,M1)) ] let goldstone_sfermion''' g = [ ((Phip, Sneutrino (-g), Slepton (M2,g)), Scalar_Scalar_Scalar 1, G_GoSNSL (false,g,M2)); ((Phim, Sneutrino g, Slepton (M2,-g)), Scalar_Scalar_Scalar 1, G_GoSNSL (true,g,M2))] let goldstone_sfermion = List.flatten (Product.list2 (goldstone_sfermion' 3) [M1;M2] [M1;M2]) @ ThoList.flatmap goldstone_sfermion'' [1;2;3] @ goldstone_sfermion''' 3 (*** REVISED: Independent of the sign of CD. ***) let higgs_squark' g h m1 m2 = [ ((Hp, Sup (m1,-g), Sdown (m2,h)), Scalar_Scalar_Scalar 1, G_HSUSD (false,m1,m2,g,h)); ((Hm, Sup (m1,g), Sdown (m2,-h)), Scalar_Scalar_Scalar 1, G_HSUSD (true,m1,m2,g,h)) ] let higgs_squark_a g h = higgs_squark' g h M1 M1 let higgs_squark_b (g,h) = List.flatten (Product.list2 (higgs_squark' g h) [M1;M2] [M1;M2]) let higgs_squark = if Flags.ckm_present then List.flatten (Product.list2 higgs_squark_a [1;2] [1;2]) @ ThoList.flatmap higgs_squark_b [(1,3);(2,3);(3,3);(3,1);(3,2)] else higgs_squark_a 1 1 @ higgs_squark_a 2 2 @ higgs_squark_b (3,3) (*** REVISED: Independent of the sign of CD, compatible with GS+. ***) let goldstone_squark' g h m1 m2 = [ ((Phip, Sup (m1,-g), Sdown (m2,h)), Scalar_Scalar_Scalar 1, G_GSUSD (false,m1,m2,g,h)); ((Phim, Sup (m1,g), Sdown (m2,-h)), Scalar_Scalar_Scalar 1, G_GSUSD (true,m1,m2,g,h)) ] let goldstone_squark_a g h = goldstone_squark' g h M1 M1 let goldstone_squark_b (g,h) = List.flatten (Product.list2 (goldstone_squark' g h) [M1;M2] [M1;M2]) let goldstone_squark = List.flatten (Product.list2 goldstone_squark_a [1;2] [1;2]) @ ThoList.flatmap goldstone_squark_b [(1,3);(2,3);(3,3);(3,1);(3,2)] (* BAUSTELLE: For the quartic scalar coupligs we does not allow [whiz_col]. *) let higgs_sneutrino4' g m = [ ((Hp, H_Heavy, Slepton (m,g), Sneutrino (-g)), Scalar4 1, G_HH2SLSN (false,m,g)); ((Hm, H_Heavy, Slepton (m,-g), Sneutrino g), Scalar4 1, G_HH2SLSN (true,m,g)); ((Hp, H_Light, Slepton (m,g), Sneutrino (-g)), Scalar4 1, G_HH1SLSN (false,m,g)); ((Hm, H_Light, Slepton (m,-g), Sneutrino g), Scalar4 1, G_HH1SLSN (true,m,g)); ((Hp, A, Slepton (m,g), Sneutrino (-g)), Scalar4 1, G_HASLSN (false,m,g)); ((Hm, A, Slepton (m,-g), Sneutrino g), Scalar4 1, G_HASLSN (true,m,g)) ] let higgs_sneutrino4 g = ThoList.flatmap (higgs_sneutrino4' g) [M1;M2] @ [ ((H_Heavy, H_Heavy, Sneutrino g, Sneutrino (-g)), Scalar4 1, G_H2H2SFSF (SN,M1,M1,g)); ((H_Heavy, H_Light, Sneutrino g, Sneutrino (-g)), Scalar4 1, G_H1H2SFSF (SN,M1,M1,g)); ((H_Light, H_Light, Sneutrino g, Sneutrino (-g)), Scalar4 1, G_H1H1SFSF (SN,M1,M1,g)); ((Hp, Hm, Sneutrino g, Sneutrino (-g)), Scalar4 1, G_HHSFSF (SN,M1,M1,g)) ] let higgs_sfermion4' g m1 m2 = [ ((H_Heavy, H_Heavy, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_H2H2SFSF (SL,m1,m2,g)); ((H_Heavy, H_Light, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_H1H2SFSF (SL,m1,m2,g)); ((H_Light, H_Light, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_H1H1SFSF (SL,m1,m2,g)); ((A, A, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_AASFSF (SL,m1,m2,g)); ((Hp, Hm, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_HHSFSF (SL,m1,m2,g)); ((H_Heavy, H_Heavy, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_H2H2SFSF (SU,m1,m2,g)); ((H_Heavy, H_Heavy, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_H2H2SFSF (SD,m1,m2,g)); ((H_Light, H_Light, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_H1H1SFSF (SU,m1,m2,g)); ((H_Light, H_Light, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_H1H1SFSF (SD,m1,m2,g)); ((H_Light, H_Heavy, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_H1H2SFSF (SU,m1,m2,g)); ((H_Light, H_Heavy, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_H1H2SFSF (SD,m1,m2,g)); ((Hp, Hm, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_HHSFSF (SU,m1,m2,g)); ((Hp, Hm, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_HHSFSF (SD,m1,m2,g)); ((A, A, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_AASFSF (SU,m1,m2,g)); ((A, A, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_AASFSF (SD,m1,m2,g)) ] let higgs_sfermion4 g = List.flatten (Product.list2 (higgs_sfermion4' g) [M1;M2] [M1;M2]) let higgs_squark4' g h m1 m2 = [ ((Hp, H_Light, Sup (m1,-g), Sdown (m2,h)), Scalar4 1, G_HH1SUSD (false,m1,m2,g,h)); ((Hm, H_Light, Sup (m1,g), Sdown (m2,-h)), Scalar4 1, G_HH1SUSD (true,m1,m2,g,h)); ((Hp, H_Heavy, Sup (m1,-g), Sdown (m2,h)), Scalar4 1, G_HH2SUSD (false,m1,m2,g,h)); ((Hm, H_Heavy, Sup (m1,g), Sdown (m2,-h)), Scalar4 1, G_HH2SUSD (true,m1,m2,g,h)); ((Hp, A, Sup (m1,-g), Sdown (m2,h)), Scalar4 1, G_HASUSD (false,m1,m2,g,h)); ((Hm, A, Sup (m1,g), Sdown (m2,-h)), Scalar4 1, G_HASUSD (true,m1,m2,g,h)) ] let higgs_squark4 g h = List.flatten (Product.list2 (higgs_squark4' g h) [M1;M2] [M1;M2]) let higgs_gold_sneutrino' g m = [ ((Hp, Phi0, Sneutrino (-g), Slepton (m,g)), Scalar4 1, G_HGSNSL (false,m,g)); ((Hm, Phi0, Sneutrino g, Slepton (m,-g)), Scalar4 1, G_HGSNSL (true,m,g)); ((H_Heavy, Phip, Sneutrino (-g), Slepton (m,g)), Scalar4 1, G_H2GSNSL (false,m,g)); ((H_Heavy, Phim, Sneutrino g, Slepton (m,-g)), Scalar4 1, G_H2GSNSL (true,m,g)); ((H_Light, Phip, Sneutrino (-g), Slepton (m,g)), Scalar4 1, G_H1GSNSL (false,m,g)); ((H_Light, Phim, Sneutrino g, Slepton (m,-g)), Scalar4 1, G_H1GSNSL (true,m,g)); ((A, Phip, Sneutrino (-g), Slepton (m,g)), Scalar4 1, G_AGSNSL (false,m,g)); ((A, Phim, Sneutrino g, Slepton (m,-g)), Scalar4 1, G_AGSNSL (true,m,g)); ((Phi0, Phip, Sneutrino (-g), Slepton (m,g)), Scalar4 1, G_GGSNSL (false,m,g)); ((Phi0, Phim, Sneutrino g, Slepton (m,-g)), Scalar4 1, G_GGSNSL (true,m,g))] let higgs_gold_sneutrino g = ThoList.flatmap (higgs_gold_sneutrino' g) [M1;M2] @ [ ((A, Phi0, Sneutrino g, Sneutrino (-g)), Scalar4 1, G_AG0SFSF (SN,M1,M1,g)); ((Hp, Phim, Sneutrino g, Sneutrino (-g)), Scalar4 1, G_HGSFSF (SN,M1,M1,g)); ((Hm, Phip, Sneutrino g, Sneutrino (-g)), Scalar4 1, G_HGSFSF (SN,M1,M1,g)); ((Phip, Phim, Sneutrino g, Sneutrino (-g)), Scalar4 1, G_GGSFSF (SN,M1,M1,g)); ((Phi0, Phi0, Sneutrino g, Sneutrino (-g)), Scalar4 1, G_G0G0SFSF (SN,M1,M1,g)) ] let higgs_gold_sfermion' g m1 m2 = [ ((A, Phi0, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_AG0SFSF (SL,m1,m2,g)); ((Hp, Phim, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_HGSFSF (SL,m1,m2,g)); ((Hm, Phip, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_HGSFSF (SL,m1,m2,g)); ((Phip, Phim, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_GGSFSF (SL,m1,m2,g)); ((Phi0, Phi0, Slepton (m1,g), Slepton (m2,-g)), Scalar4 1, G_G0G0SFSF (SL,m1,m2,g)); ((A, Phi0, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_AG0SFSF (SU,m1,m2,g)); ((A, Phi0, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_AG0SFSF (SD,m1,m2,g)); ((Hp, Phim, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_HGSFSF (SU,m1,m2,g)); ((Hm, Phip, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_HGSFSF (SU,m1,m2,g)); ((Hp, Phim, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_HGSFSF (SD,m1,m2,g)); ((Hm, Phip, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_HGSFSF (SD,m1,m2,g)); ((Phip, Phim, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_GGSFSF (SU,m1,m2,g)); ((Phip, Phim, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_GGSFSF (SD,m1,m2,g)); ((Phi0, Phi0, Sup (m1,g), Sup (m2,-g)), Scalar4 1, G_G0G0SFSF (SU,m1,m2,g)); ((Phi0, Phi0, Sdown (m1,g), Sdown (m2,-g)), Scalar4 1, G_G0G0SFSF (SD,m1,m2,g)) ] let higgs_gold_sfermion g = List.flatten (Product.list2 (higgs_gold_sfermion' g) [M1;M2] [M1;M2]) let higgs_gold_squark' g h m1 m2 = [ ((Hp, Phi0, Sup (m1,-g), Sdown (m2,h)), Scalar4 1, G_HGSUSD (false,m1,m2,g,h)); ((Hm, Phi0, Sup (m1,g), Sdown (m2,-h)), Scalar4 1, G_HGSUSD (true,m1,m2,g,h)); ((H_Heavy, Phip, Sup (m1,-g), Sdown (m2,h)), Scalar4 1, G_H2GSUSD (false,m1,m2,g,h)); ((H_Heavy, Phim, Sup (m1,g), Sdown (m2,-h)), Scalar4 1, G_H2GSUSD (true,m1,m2,g,h)); ((H_Light, Phip, Sup (m1,-g), Sdown (m2,h)), Scalar4 1, G_H1GSUSD (false,m1,m2,g,h)); ((H_Light, Phim, Sup (m1,g), Sdown (m2,-h)), Scalar4 1, G_H1GSUSD (true,m1,m2,g,h)); ((A, Phip, Sup (m1,-g), Sdown (m2,h)), Scalar4 1, G_AGSUSD (false,m1,m2,g,h)); ((A, Phim, Sup (m1,g), Sdown (m2,-h)), Scalar4 1, G_AGSUSD (true,m1,m2,g,h)); ((Phi0, Phip, Sup (m1,-g), Sdown (m2,h)), Scalar4 1, G_GGSUSD (false,m1,m2,g,h)); ((Phi0, Phim, Sup (m1,g), Sdown (m2,-h)), Scalar4 1, G_GGSUSD (true,m1,m2,g,h)) ] let higgs_gold_squark g h = List.flatten (Product.list2 (higgs_gold_squark' g h) [M1;M2] [M1;M2]) let sneutrino4' (g,h) = [ ((Sneutrino g, Sneutrino h, Sneutrino (-g), Sneutrino (-h)), Scalar4 1, G_SN4 (g,h))] let sneutrino4 = ThoList.flatmap sneutrino4' [(1,1);(1,2);(1,3);(2,2);(2,3);(3,3)] let sneu2_slep2_1' g h m1 m2 = ((Sneutrino (-g), Sneutrino g, Slepton (m1,-h), Slepton (m2,h)), Scalar4 1, G_SN2SL2_1 (m1,m2,g,h)) let sneu2_slep2_2' (g,h) m1 m2 = ((Sneutrino g, Sneutrino (-h), Slepton (m1,-g), Slepton (m2,h)), Scalar4 1, G_SN2SL2_2 (m1,m2,g,h)) let sneu2_slep2_1 g h = Product.list2 (sneu2_slep2_1' g h) [M1;M2] [M1;M2] let sneu2_slep2_2 (g,h) = Product.list2 (sneu2_slep2_2' (g,h)) [M1;M2] [M1;M2] (* The 4-slepton-vertices have the following structure: The sleptons come up in pairs of a positive and a negative slepton of the same generation; there is no vertex with e.g. two negative selectrons and two positive smuons, that of course would be a contradiction to the conservation of the separate slepton numbers of each generation which is not implemented in the MSSM. Because there is no CKM-mixing for the sleptons (in case of massless neutrinos) we maximally have two different generations of sleptons in a 4-slepton-vertex. *) let slepton4_1gen' g (m1,m2,m3,m4) = [ ((Slepton (m1,-g), Slepton (m2,g), Slepton (m3,-g), Slepton (m4,g)), Scalar4 1, G_SL4 (m1,m2,m3,m4,g)) ] let slepton4_1gen g = ThoList.flatmap (slepton4_1gen' g) [(M1,M1,M1,M1); (M1,M1,M1,M2); (M1,M1,M2,M1); (M1,M1,M2,M2); (M1,M2,M1,M2); (M1,M2,M2,M1); (M1,M2,M2,M2); (M2,M1,M2,M2); (M2,M2,M2,M2) ] let slepton4_2gen' (g,h) (m1,m2) (m3,m4) = ((Slepton (m1,-g), Slepton (m2,g), Slepton (m3,-h), Slepton (m4,h)), Scalar4 1, G_SL4_2 (m1,m2,m3,m4,g,h)) let slepton4_2gen (g,h) = Product.list2 (slepton4_2gen' (g,h)) [(M1,M1);(M1,M2);(M2,M1);(M2,M2)] [(M1,M1);(M1,M2);(M2,M1);(M2,M2)] let sneu2_squark2' g h m1 m2 = [ ((Sneutrino (-g), Sneutrino g, Sup (m1,-h), Sup (m2,h)), Scalar4 1, G_SN2SQ2 (SU,m1,m2,g,h)); ((Sneutrino (-g), Sneutrino g, Sdown (m1,-h), Sdown (m2,h)), Scalar4 1, G_SN2SQ2 (SD,m1,m2,g,h)) ] let sneu2_squark2 g h = List.flatten (Product.list2 (sneu2_squark2' g h) [M1;M2] [M1;M2]) let slepton2_squark2'' g h m1 m2 m3 m4 = [ ((Slepton (m1,-g), Slepton (m2,g), Sup (m3,-h), Sup (m4,h)), Scalar4 1, G_SL2SQ2 (SU,m1,m2,m3,m4,g,h)); ((Slepton (m1,-g), Slepton (m2,g), Sdown (m3,-h), Sdown (m4,h)), Scalar4 1, G_SL2SQ2 (SD,m1,m2,m3,m4,g,h)) ] let slepton2_squark2' g h m1 m2 = List.flatten (Product.list2 (slepton2_squark2'' g h m1 m2) [M1;M2] [M1;M2]) let slepton2_squark2 g h = List.flatten (Product.list2 (slepton2_squark2' g h) [M1;M2] [M1;M2]) let slep_sneu_squark2'' g1 g2 g3 m1 m2 m3 = [ ((Sup (m1,-g1), Sdown (m2,g2), Slepton (m3,-g3), Sneutrino g3), Scalar4 1, G_SUSDSNSL (false,m1,m2,m3,g1,g2,g3)); ((Sup (m1,g1), Sdown (m2,-g2), Slepton (m3,g3), Sneutrino (-g3)), Scalar4 1, G_SUSDSNSL (true,m1,m2,m3,g1,g2,g3)) ] let slep_sneu_squark2' g1 g2 g3 m1 = List.flatten (Product.list2 (slep_sneu_squark2'' g1 g2 g3 m1) [M1;M2] [M1;M2]) let slep_sneu_squark2 g1 g2 = List.flatten (Product.list2 (slep_sneu_squark2' g1 g2) [1;2;3] [M1;M2]) (* There are three kinds of 4-squark-vertices: Four up-Squarks, four down-squarks or two up- and two down-squarks. *) let sup4_1gen' g (m1,m2,m3,m4) = [ ((Sup (m1,-g), Sup (m2,g), Sup (m3,-g), Sup (m4,g)), Scalar4 1, G_SU4 (m1,m2,m3,m4,g)) ] let sup4_1gen g = ThoList.flatmap (sup4_1gen' g) [(M1,M1,M1,M1); (M1,M1,M1,M2); (M1,M1,M2,M1); (M1,M1,M2,M2); (M1,M2,M1,M2); (M1,M2,M2,M1); (M1,M2,M2,M2); (M2,M1,M2,M2); (M2,M2,M2,M2) ] let sup4_2gen' (g,h) (m1,m2) (m3,m4) = ((Sup (m1,-g), Sup (m2,g), Sup (m3,-h), Sup (m4,h)), Scalar4 1, G_SU4_2 (m1,m2,m3,m4,g,h)) let sup4_2gen (g,h) = Product.list2 (sup4_2gen' (g,h)) [(M1,M1);(M1,M2);(M2,M1);(M2,M2)] [(M1,M1);(M1,M2);(M2,M1);(M2,M2)] let sdown4_1gen' g (m1,m2,m3,m4) = [ ((Sdown (m1,-g), Sdown (m2,g), Sdown (m3,-g), Sdown (m4,g)), Scalar4 1, G_SD4 (m1,m2,m3,m4,g)) ] let sdown4_1gen g = ThoList.flatmap (sdown4_1gen' g) [(M1,M1,M1,M1); (M1,M1,M1,M2); (M1,M1,M2,M1); (M1,M1,M2,M2); (M1,M2,M1,M2); (M1,M2,M2,M1); (M1,M2,M2,M2); (M2,M1,M2,M2); (M2,M2,M2,M2) ] let sdown4_2gen' (g,h) (m1,m2) (m3,m4) = ((Sdown (m1,-g), Sdown (m2,g), Sdown (m3,-h), Sdown (m4,h)), Scalar4 1, G_SD4_2 (m1,m2,m3,m4,g,h)) let sdown4_2gen (g,h) = Product.list2 (sdown4_2gen' (g,h)) [(M1,M1);(M1,M2);(M2,M1);(M2,M2)] [(M1,M1);(M1,M2);(M2,M1);(M2,M2)] let sup2_sdown2_3 g1 g2 g3 g4 m1 m2 m3 m4 = ((Sup (m1,-g1), Sup (m2,g2), Sdown (m3,-g3), Sdown (m4,g4)), Scalar4 1, G_SU2SD2 (m1,m2,m3,m4,g1,g2,g3,g4)) let sup2_sdown2_2 g1 g2 g3 g4 m1 m2 = Product.list2 (sup2_sdown2_3 g1 g2 g3 g4 m1 m2) [M1;M2] [M1;M2] let sup2_sdown2_1 g1 g2 g3 g4 = List.flatten (Product.list2 (sup2_sdown2_2 g1 g2 g3 g4) [M1;M2] [M1;M2]) let sup2_sdown2 g1 g2 = List.flatten (Product.list2 (sup2_sdown2_1 g1 g2) [1;2;3] [1;2;3]) let quartic_grav_gauge g m = [ ((Grino, Slepton (m, -g), Ga, L g), GBBG (1, Gravbar, SLRV, Psi), G_Gr4A_Sl (g,m)); ((L (-g), Slepton (m, g), Ga, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4A_Slc (g,m)); ((Grino, Sup (m, -g), Ga, U g), GBBG (1, Gravbar, SLRV, Psi), G_Gr4A_Su (g,m)); ((U (-g), Sup (m, g), Ga, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4A_Suc (g,m)); ((Grino, Sdown (m, -g), Ga, D g), GBBG (1, Gravbar, SLRV, Psi), G_Gr4A_Sd (g,m)); ((D (-g), Sdown (m, g), Ga, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4A_Sdc (g,m)); ((Grino, Slepton (m, -g), Z, L g), GBBG (1, Gravbar, SLRV, Psi), G_Gr4Z_Sl (g,m)); ((L (-g), Slepton (m, g), Z, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4Z_Slc (g,m)); ((Grino, Sup (m, -g), Z, U g), GBBG (1, Gravbar, SLRV, Psi), G_Gr4Z_Su (g,m)); ((U (-g), Sup (m, g), Z, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4Z_Suc (g,m)); ((Grino, Sdown (m, -g), Z, D g), GBBG (1, Gravbar, SLRV, Psi), G_Gr4Z_Sd (g,m)); ((D (-g), Sdown (m, g), Z, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4Z_Sdc (g,m)); ((Grino, Sup (m, -g), Gl, U g), GBBG (1, Gravbar, SLRV, Psi), G_Gr4Gl_Su (g,m)); ((U (-g), Sup (m, g), Gl, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4Gl_Suc (g,m)); ((Grino, Sdown (m, -g), Gl, D g), GBBG (1, Gravbar, SLRV, Psi), G_Gr4Gl_Sd (g,m)); ((D (-g), Sdown (m, g), Gl, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4Gl_Sdc (g,m)); ((Grino, Slepton (m, -g), Wm, N g), GBBG (1, Gravbar, SLV, Psi), G_Gr4W_Sl (g,m)); ((N (-g), Slepton (m, g), Wp, Grino), GBBG (1, Psibar, SLV, Grav), G_Gr4Z_Slc (g,m)); ((Grino, Sup (m, -g), Wp, D g), GBBG (1, Gravbar, SLV, Psi), G_Gr4W_Su (g,m)); ((D (-g), Sup (m, g), Wm, Grino), GBBG (1, Psibar, SLV, Grav), G_Gr4W_Suc (g,m)); ((Grino, Sdown (m, -g), Wm, U g), GBBG (1, Gravbar, SLV, Psi), G_Gr4W_Sd (g,m)); ((U (-g), Sdown (m, g), Wp, Grino), GBBG (1, Psibar, SLV, Grav), G_Gr4W_Sdc (g,m)) ] let quartic_grav_sneutrino g = [ ((Grino, Sneutrino (-g), Z, N g), GBBG (1, Gravbar, SLV, Psi), G_Gr4Z_Sn); ((N (-g), Sneutrino g, Z, Grino), GBBG (1, Psibar, SLV, Grav), G_Gr4Z_Snc); ((Grino, Sneutrino (-g), Wp, L g), GBBG (1, Gravbar, SLV, Psi), G_Gr4W_Sn); ((L (-g), Sneutrino g, Wm, Grino), GBBG (1, Psibar, SLV, Grav), G_Gr4W_Snc) ] let quartic_grav_neu n = [ ((Grino, Wp, Wm, Neutralino n), GBBG (1, Gravbar, V2LR, Chi), G_Gr4_Neu n); ((Grino, H_Light, Z, Neutralino n), GBBG (1, Gravbar, SLRV, Chi), G_Gr4_Z_H1 n); ((Grino, H_Heavy, Z, Neutralino n), GBBG (1, Gravbar, SLRV, Chi), G_Gr4_Z_H2 n); ((Grino, A, Z, Neutralino n), GBBG (1, Gravbar, SLRV, Chi), G_Gr4_Z_H3 n); ((Grino, Hm, Wp, Neutralino n), GBBG (1, Gravbar, SLRV, Chi), G_Gr4_W_H n); ((Grino, Hp, Wm, Neutralino n), GBBG (1, Gravbar, SLRV, Chi), G_Gr4_W_Hc n) ] let quartic_grav_char c = let cc = conj_char c in [ ((Grino, Wm, Ga, Chargino c), GBBG (1, Gravbar, V2LR, Psi), G_Gr4_A_Ch c); ((Grino, Wm, Z, Chargino c), GBBG (1, Gravbar, V2LR, Psi), G_Gr4_Z_Ch c); ((Chargino cc, Wp, Ga, Grino), GBBG ((-1), Psibar, V2LR, Grav), G_Gr4_A_Ch cc); ((Chargino cc, Wp, Z, Grino), GBBG ((-1), Psibar, V2LR, Grav), G_Gr4_Z_Ch cc); ((Grino, Hm, Ga, Chargino c), GBBG (1, Gravbar, SLRV, Psi), G_Gr4_H_A c); ((Chargino cc, Hp, Ga, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4_H_A cc); ((Grino, Hm, Z, Chargino c), GBBG (1, Gravbar, SLRV, Psi), G_Gr4_H_Z c); ((Chargino cc, Hp, Z, Grino), GBBG (1, Psibar, SLRV, Grav), G_Gr4_H_Z cc)] let quartic_gravitino = [ ((Grino, Gl, Gl, Gluino), GBBG (1, Gravbar, V2, Chi), G_GravGl)] @ ThoList.flatmap quartic_grav_neu [N1; N2; N3; N4] @ ThoList.flatmap quartic_grav_char [C1; C2] @ List.flatten (Product.list2 quartic_grav_gauge [1; 2; 3] [M1; M2]) @ ThoList.flatmap quartic_grav_sneutrino [1; 2; 3] let vertices3'' = if Flags.ckm_present then (ThoList.flatmap electromagnetic_currents_3 [1;2;3] @ ThoList.flatmap electromagnetic_currents_2 [C1;C2] @ List.flatten (Product.list2 electromagnetic_sfermion_currents [1;2;3] [M1;M2]) @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap neutral_sfermion_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ List.flatten (Product.list2 charged_slepton_currents [1;2;3] [M1;M2]) @ List.flatten (Product.list2 charged_quark_currents [1;2;3] [1;2;3]) @ List.flatten (Product.list2 charged_squark_currents [1;2;3] [1;2;3]) @ ThoList.flatmap yukawa_higgs_quark [(1,3);(2,3);(3,3);(3,1);(3,2)] @ yukawa_higgs 3 @ yukawa_n @ ThoList.flatmap yukawa_c [C1;C2] @ ThoList.flatmap yukawa_cq [C1;C2] @ List.flatten (Product.list2 charged_chargino_currents [N1;N2;N3;N4] [C1;C2]) @ triple_gauge @ ThoList.flatmap neutral_Z_1 [(N1,N2);(N1,N3);(N1,N4);(N2,N3);(N2,N4); (N3,N4)] @ ThoList.flatmap neutral_Z_2 [N1;N2;N3;N4] @ neutral_A @ Product.list2 charged_Z [C1;C2] [C1;C2] @ gauge_higgs @ higgs @ yukawa_higgs_2 @ List.flatten (Product.list2 higgs_charg_neutr [N1;N2;N3;N4] [C1;C2]) @ higgs_neutr @ higgs_sneutrino @ higgs_sfermion @ higgs_squark @ yukawa_v @ ThoList.flatmap col_currents [1;2;3] @ List.flatten (Product.list2 col_sfermion_currents [1;2;3] [M1;M2])) else (ThoList.flatmap electromagnetic_currents_3 [1;2;3] @ ThoList.flatmap electromagnetic_currents_2 [C1;C2] @ List.flatten (Product.list2 electromagnetic_sfermion_currents [1;2;3] [M1;M2]) @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap neutral_sfermion_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ List.flatten (Product.list2 charged_slepton_currents [1;2;3] [M1;M2]) @ charged_quark_currents 1 1 @ charged_quark_currents 2 2 @ charged_quark_currents 3 3 @ charged_squark_currents 1 1 @ charged_squark_currents 2 2 @ charged_squark_currents 3 3 @ ThoList.flatmap yukawa_higgs_quark [(3,3)] @ yukawa_higgs 3 @ yukawa_n @ ThoList.flatmap yukawa_c [C1;C2] @ ThoList.flatmap yukawa_cq [C1;C2] @ List.flatten (Product.list2 charged_chargino_currents [N1;N2;N3;N4] [C1;C2]) @ triple_gauge @ ThoList.flatmap neutral_Z_1 [(N1,N2);(N1,N3);(N1,N4);(N2,N3);(N2,N4); (N3,N4)] @ ThoList.flatmap neutral_Z_2 [N1;N2;N3;N4] @ neutral_A @ Product.list2 charged_Z [C1;C2] [C1;C2] @ gauge_higgs @ higgs @ yukawa_higgs_2 @ List.flatten (Product.list2 higgs_charg_neutr [N1;N2;N3;N4] [C1;C2]) @ higgs_neutr @ higgs_sneutrino @ higgs_sfermion @ higgs_squark @ yukawa_v @ ThoList.flatmap col_currents [1;2;3] @ List.flatten (Product.list2 col_sfermion_currents [1;2;3] [M1;M2])) let vertices3' = if Flags.gravitino then (vertices3'' @ triple_gravitino) else vertices3'' let vertices3 = if Flags.include_goldstone then (vertices3' @ yukawa_goldstone 3 @ gauge_higgs_gold @ higgs_gold @ yukawa_goldstone_2 @ (if Flags.ckm_present then List.flatten (Product.list2 yukawa_goldstone_quark [1;2;3] [1;2;3]) @ List.flatten (Product.list2 goldstone_charg_neutr [N1;N2;N3;N4] [C1;C2]) else yukawa_goldstone_quark 1 1 @ yukawa_goldstone_quark 2 2 @ yukawa_goldstone_quark 3 3) @ goldstone_neutr @ goldstone_sfermion @ goldstone_squark) else vertices3' let vertices4''' = (quartic_gauge @ higgs4 @ gauge_higgs4 @ ThoList.flatmap gauge_sfermion4 [1;2;3] @ gauge_squark4 @ gluon_w_squark @ List.flatten (Product.list2 gluon2_squark2 [1;2;3] [M1;M2]) @ ThoList.flatmap gluon_gauge_squark [1;2;3]) let vertices4'' = if Flags.gravitino then (vertices4''' @ quartic_gravitino) else vertices4''' let vertices4' = if Flags.include_four then (vertices4'' @ ThoList.flatmap higgs_sfermion4 [1;2;3] @ ThoList.flatmap higgs_sneutrino4 [1;2;3] @ List.flatten (Product.list2 higgs_squark4 [1;2;3] [1;2;3]) @ sneutrino4 @ List.flatten (Product.list2 sneu2_slep2_1 [1;2;3] [1;2;3]) @ ThoList.flatmap sneu2_slep2_2 [(1,2);(1,3);(2,3);(2,1);(3,1);(3,2)] @ ThoList.flatmap slepton4_1gen [1;2;3] @ ThoList.flatmap slepton4_2gen [(1,2);(1,3);(2,3)] @ List.flatten (Product.list2 sneu2_squark2 [1;2;3] [1;2;3]) @ List.flatten (Product.list2 slepton2_squark2 [1;2;3] [1;2;3]) @ List.flatten (Product.list2 slep_sneu_squark2 [1;2;3] [1;2;3]) @ ThoList.flatmap sup4_1gen [1;2;3] @ ThoList.flatmap sup4_2gen [(1,2);(1,3);(2,3)] @ ThoList.flatmap sdown4_1gen [1;2;3] @ ThoList.flatmap sdown4_2gen [(1,2);(1,3);(2,3)] @ List.flatten (Product.list2 sup2_sdown2 [1;2;3] [1;2;3])) else vertices4'' let vertices4 = if Flags.include_goldstone then (vertices4' @ higgs_gold4 @ gauge_higgs_gold4 @ goldstone4 @ ThoList.flatmap higgs_gold_sneutrino [1;2;3] @ ThoList.flatmap higgs_gold_sfermion [1;2;3] @ List.flatten (Product.list2 higgs_gold_squark [1;2;3] [1;2;3])) else vertices4' let vertices () = (vertices3, vertices4, []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string s = match s with | "e-" -> L 1 | "e+" -> L (-1) | "mu-" -> L 2 | "mu+" -> L (-2) | "tau-" -> L 3 | "tau+" -> L (-3) | "nue" -> N 1 | "nuebar" -> N (-1) | "numu" -> N 2 | "numubar" -> N (-2) | "nutau" -> N 3 | "nutaubar" -> N (-3) | "se1-" -> Slepton (M1,1) | "se1+" -> Slepton (M1,-1) | "smu1-" -> Slepton (M1,2) | "smu1+" -> Slepton (M1,-2) | "stau1-" -> Slepton (M1,3) | "stau1+" -> Slepton (M1,-3) | "se2-" -> Slepton (M2,1) | "se2+" -> Slepton (M2,-1) | "smu2-" -> Slepton (M2,2) | "smu2+" -> Slepton (M2,-2) | "stau2-" -> Slepton (M2,3) | "stau2+" -> Slepton (M2,-3) | "snue" -> Sneutrino 1 | "snue*" -> Sneutrino (-1) | "snumu" -> Sneutrino 2 | "snumu*" -> Sneutrino (-2) | "snutau" -> Sneutrino 3 | "snutau*" -> Sneutrino (-3) | "u" -> U 1 | "ubar" -> U (-1) | "c" -> U 2 | "cbar" -> U (-2) | "t" -> U 3 | "tbar" -> U (-3) | "d" -> D 1 | "dbar" -> D (-1) | "s" -> D 2 | "sbar" -> D (-2) | "b" -> D 3 | "bbar" -> D (-3) | "A" -> Ga | "Z" | "Z0" -> Z | "W+" -> Wp | "W-" -> Wm | "gl" | "g" -> Gl | "H" -> H_Heavy | "h" -> H_Light | "A0" -> A | "H+" -> Hp | "H-" -> Hm | "phi0" -> Phi0 | "phi+" -> Phip | "phim" -> Phim | "su1" -> Sup (M1,1) | "su1c" -> Sup (M1,-1) | "sc1" -> Sup (M1,2) | "sc1c" -> Sup (M1,-2) | "st1" -> Sup (M1,3) | "st1c" -> Sup (M1,-3) | "su2" -> Sup (M2,1) | "su2c" -> Sup (M2,-1) | "sc2" -> Sup (M2,2) | "sc2c" -> Sup (M2,-2) | "st2" -> Sup (M2,3) | "st2c" -> Sup (M2,-3) | "sgl" | "sg" -> Gluino | "sd1" -> Sdown (M1,1) | "sd1c" -> Sdown (M1,-1) | "ss1" -> Sdown (M1,2) | "ss1c" -> Sdown (M1,-2) | "sb1" -> Sdown (M1,3) | "sb1c" -> Sdown (M1,-3) | "sd2" -> Sdown (M2,1) | "sd2c" -> Sdown (M2,-1) | "ss2" -> Sdown (M2,2) | "ss2c" -> Sdown (M2,-2) | "sb2" -> Sdown (M2,3) | "sb2c" -> Sdown (M2,-3) | "neu1" -> Neutralino N1 | "neu2" -> Neutralino N2 | "neu3" -> Neutralino N3 | "neu4" -> Neutralino N4 | "ch1+" -> Chargino C1 | "ch2+" -> Chargino C2 | "ch1-" -> Chargino C1c | "ch2-" -> Chargino C2c | "GR" -> Grino | _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_of_string" let flavor_to_string = function | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | L _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_string: invalid lepton" | N _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_string: invalid neutrino" | U _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_string: invalid up type quark" | D _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_string: invalid down type quark" | Gl -> "gl" | Gluino -> "sgl" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H_Heavy -> "H" | H_Light -> "h" | A -> "A0" | Hp -> "H+" | Hm -> "H-" | Slepton (M1,1) -> "se1-" | Slepton (M1,-1) -> "se1+" | Slepton (M1,2) -> "smu1-" | Slepton (M1,-2) -> "smu1+" | Slepton (M1,3) -> "stau1-" | Slepton (M1,-3) -> "stau1+" | Slepton (M2,1) -> "se2-" | Slepton (M2,-1) -> "se2+" | Slepton (M2,2) -> "smu2-" | Slepton (M2,-2) -> "smu2+" | Slepton (M2,3) -> "stau2-" | Slepton (M2,-3) -> "stau2+" | Sneutrino 1 -> "snue" | Sneutrino (-1) -> "snue*" | Sneutrino 2 -> "snumu" | Sneutrino (-2) -> "snumu*" | Sneutrino 3 -> "snutau" | Sneutrino (-3) -> "snutau*" | Sup (M1,1) -> "su1" | Sup (M1,-1) -> "su1c" | Sup (M1,2) -> "sc1" | Sup (M1,-2) -> "sc1c" | Sup (M1,3) -> "st1" | Sup (M1,-3) -> "st1c" | Sup (M2,1) -> "su2" | Sup (M2,-1) -> "su2c" | Sup (M2,2) -> "sc2" | Sup (M2,-2) -> "sc2c" | Sup (M2,3) -> "st2" | Sup (M2,-3) -> "st2c" | Sdown (M1,1) -> "sd1" | Sdown (M1,-1) -> "sd1c" | Sdown (M1,2) -> "ss1" | Sdown (M1,-2) -> "ss1c" | Sdown (M1,3) -> "sb1" | Sdown (M1,-3) -> "sb1c" | Sdown (M2,1) -> "sd2" | Sdown (M2,-1) -> "sd2c" | Sdown (M2,2) -> "ss2" | Sdown (M2,-2) -> "ss2c" | Sdown (M2,3) -> "sb2" | Sdown (M2,-3) -> "sb2c" | Neutralino N1 -> "neu1" | Neutralino N2 -> "neu2" | Neutralino N3 -> "neu3" | Neutralino N4 -> "neu4" | Slepton _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_string: invalid slepton" | Sneutrino _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_string: invalid sneutrino" | Sup _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_string: invalid up type squark" | Sdown _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_string: invalid down type squark" | Chargino C1 -> "ch1+" | Chargino C1c -> "ch1-" | Chargino C2 -> "ch2+" | Chargino C2c -> "ch2-" | Grino -> "GR" let flavor_symbol = function | L g when g > 0 -> "l" ^ string_of_int g | L g -> "l" ^ string_of_int (abs g) ^ "b" | N g when g > 0 -> "n" ^ string_of_int g | N g -> "n" ^ string_of_int (abs g) ^ "b" | U g when g > 0 -> "u" ^ string_of_int g | U g -> "u" ^ string_of_int (abs g) ^ "b" | D g when g > 0 -> "d" ^ string_of_int g | D g -> "d" ^ string_of_int (abs g) ^ "b" | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" | Slepton (M1,g) when g > 0 -> "sl1" ^ string_of_int g | Slepton (M1,g) -> "sl1c" ^ string_of_int (abs g) | Slepton (M2,g) when g > 0 -> "sl2" ^ string_of_int g | Slepton (M2,g) -> "sl2c" ^ string_of_int (abs g) | Sneutrino g when g > 0 -> "sn" ^ string_of_int g | Sneutrino g -> "snc" ^ string_of_int (abs g) | Sup (M1,g) when g > 0 -> "su1" ^ string_of_int g | Sup (M1,g) -> "su1c" ^ string_of_int (abs g) | Sup (M2,g) when g > 0 -> "su2" ^ string_of_int g | Sup (M2,g) -> "su2c" ^ string_of_int (abs g) | Sdown (M1,g) when g > 0 -> "sd1" ^ string_of_int g | Sdown (M1,g) -> "sd1c" ^ string_of_int (abs g) | Sdown (M2,g) when g > 0 -> "sd2" ^ string_of_int g | Sdown (M2,g) -> "sd2c" ^ string_of_int (abs g) | Neutralino n -> "neu" ^ (string_of_neu n) | Chargino c when (int_of_char c) > 0 -> "cp" ^ string_of_char c | Chargino c -> "cm" ^ string_of_int (abs (int_of_char c)) | Gluino -> "sgl" | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H_Heavy -> "h0h" | H_Light -> "h0l" | A -> "a0" | Hp -> "hp" | Hm -> "hm" | Grino -> "gv" let flavor_to_TeX = function | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | L _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_TeX: invalid lepton" | N _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_TeX: invalid neutrino" | U _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_TeX: invalid up type quark" | D _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_TeX: invalid down type quark" | Gl -> "g" | Gluino -> "\\widetilde{g}" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H_Heavy -> "H^0" | H_Light -> "h^0" | A -> "A^0" | Hp -> "H^+" | Hm -> "H^-" | Slepton (M1,1) -> "\\widetilde{e}_1^-" | Slepton (M1,-1) -> "\\widetilde{e}_1^+" | Slepton (M1,2) -> "\\widetilde{\\mu}_1^-" | Slepton (M1,-2) -> "\\widetilde{\\mu}_1^+" | Slepton (M1,3) -> "\\widetilde{\\tau}_1^-" | Slepton (M1,-3) -> "\\widetilde{\\tau}_1^+" | Slepton (M2,1) -> "\\widetilde{e}_2^-" | Slepton (M2,-1) -> "\\widetilde{e}_2^+" | Slepton (M2,2) -> "\\widetilde{\\mu}_2^-" | Slepton (M2,-2) -> "\\widetilde{\\mu}_2^+" | Slepton (M2,3) -> "\\widetilde{\\tau}_2^-" | Slepton (M2,-3) -> "\\widetilde{\\tau}_2^+" | Sneutrino 1 -> "\\widetilde{\\nu}_e" | Sneutrino (-1) -> "\\widetilde{\\nu}_e^*" | Sneutrino 2 -> "\\widetilde{\\nu}_\\mu" | Sneutrino (-2) -> "\\widetilde{\\nu}_\\mu^*" | Sneutrino 3 -> "\\widetilde{\\nu}_\\tau" | Sneutrino (-3) -> "\\widetilde{\\nu}_\\tau^*" | Sup (M1,1) -> "\\widetilde{u}_1" | Sup (M1,-1) -> "\\widetilde{u}_1^*" | Sup (M1,2) -> "\\widetilde{c}_1" | Sup (M1,-2) -> "\\widetilde{c}_1^*" | Sup (M1,3) -> "\\widetilde{t}_1" | Sup (M1,-3) -> "\\widetilde{t}_1^*" | Sup (M2,1) -> "\\widetilde{u}_2" | Sup (M2,-1) -> "\\widetilde{u}_2^*" | Sup (M2,2) -> "\\widetilde{c}_2" | Sup (M2,-2) -> "\\widetilde{c}_2^*" | Sup (M2,3) -> "\\widetilde{t}_2" | Sup (M2,-3) -> "\\widetilde{t}_2^*" | Sdown (M1,1) -> "\\widetilde{d}_1" | Sdown (M1,-1) -> "\\widetilde{d}_1^*" | Sdown (M1,2) -> "\\widetilde{s}_1" | Sdown (M1,-2) -> "\\widetilde{s}_1^*" | Sdown (M1,3) -> "\\widetilde{b}_1" | Sdown (M1,-3) -> "\\widetilde{b}_1^*" | Sdown (M2,1) -> "\\widetilde{d}_2" | Sdown (M2,-1) -> "\\widetilde{d}_2^*" | Sdown (M2,2) -> "\\widetilde{s}_2" | Sdown (M2,-2) -> "\\widetilde{s}_2^*" | Sdown (M2,3) -> "\\widetilde{b}_2" | Sdown (M2,-3) -> "\\widetilde{b}_2^*" | Neutralino N1 -> "\\widetilde{\\chi}^0_1" | Neutralino N2 -> "\\widetilde{\\chi}^0_2" | Neutralino N3 -> "\\widetilde{\\chi}^0_3" | Neutralino N4 -> "\\widetilde{\\chi}^0_4" | Slepton _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_TeX: invalid slepton" | Sneutrino _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_TeX: invalid sneutrino" | Sup _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_TeX: invalid up type squark" | Sdown _ -> invalid_arg "Modellib_MSSM.MSSM.flavor_to_TeX: invalid down type squark" | Chargino C1 -> "\\widetilde{\\chi}_1^+" | Chargino C1c -> "\\widetilde{\\chi}_1^-" | Chargino C2 -> "\\widetilde{\\chi}_2^+" | Chargino C2c -> "\\widetilde{\\chi}_2^-" | Grino -> "\\widetilde{G}" let pdg = function | L g when g > 0 -> 9 + 2*g | L g -> - 9 + 2*g | N g when g > 0 -> 10 + 2*g | N g -> - 10 + 2*g | U g when g > 0 -> 2*g | U g -> 2*g | D g when g > 0 -> - 1 + 2*g | D g -> 1 + 2*g | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | H_Light -> 25 | H_Heavy -> 35 | A -> 36 | Hp -> 37 | Hm -> (-37) | Phip | Phim -> 27 | Phi0 -> 26 | Slepton (M1,g) when g > 0 -> 1000009 + 2*g | Slepton (M1,g) -> - 1000009 + 2*g | Slepton (M2,g) when g > 0 -> 2000009 + 2*g | Slepton (M2,g) -> - 2000009 + 2*g | Sneutrino g when g > 0 -> 1000010 + 2*g | Sneutrino g -> - 1000010 + 2*g | Sup (M1,g) when g > 0 -> 1000000 + 2*g | Sup (M1,g) -> - 1000000 + 2*g | Sup (M2,g) when g > 0 -> 2000000 + 2*g | Sup (M2,g) -> - 2000000 + 2*g | Sdown (M1,g) when g > 0 -> 999999 + 2*g | Sdown (M1,g) -> - 999999 + 2*g | Sdown (M2,g) when g > 0 -> 1999999 + 2*g | Sdown (M2,g) -> - 1999999 + 2*g | Gluino -> 1000021 | Grino -> 1000039 | Chargino C1 -> 1000024 | Chargino C1c -> (-1000024) | Chargino C2 -> 1000037 | Chargino C2c -> (-1000037) | Neutralino N1 -> 1000022 | Neutralino N2 -> 1000023 | Neutralino N3 -> 1000025 | Neutralino N4 -> 1000035 (* We must take care of the pdg numbers for the two different kinds of sfermions in the MSSM. The particle data group in its Monte Carlo particle numbering scheme takes only into account mixtures of the third generation squarks and the stau. For the other sfermions we will use the number of the lefthanded field for the lighter mixed state and the one for the righthanded for the heavier. Below are the official pdg numbers from the Particle Data Group. In order not to produce arrays with some million entries in the Fortran code for the masses and the widths we introduce our private pdg numbering scheme which only extends not too far beyond 42. Our private scheme then has the following pdf numbers (for the sparticles the subscripts $L/R$ and $1/2$ are taken synonymously): \begin{center} \renewcommand{\arraystretch}{1.2} \begin{tabular}{|r|l|l|}\hline $d$ & down-quark & 1 \\\hline $u$ & up-quark & 2 \\\hline $s$ & strange-quark & 3 \\\hline $c$ & charm-quark & 4 \\\hline $b$ & bottom-quark & 5 \\\hline $t$ & top-quark & 6 \\\hline\hline $e^-$ & electron & 11 \\\hline $\nu_e$ & electron-neutrino & 12 \\\hline $\mu^-$ & muon & 13 \\\hline $\nu_\mu$ & muon-neutrino & 14 \\\hline $\tau^-$ & tau & 15 \\\hline $\nu_\tau$ & tau-neutrino & 16 \\\hline\hline $g$ & gluon & (9) 21 \\\hline $\gamma$ & photon & 22 \\\hline $Z^0$ & Z-boson & 23 \\\hline $W^+$ & W-boson & 24 \\\hline\hline $h^0$ & light Higgs boson & 25 \\\hline $H^0$ & heavy Higgs boson & 35 \\\hline $A^0$ & pseudoscalar Higgs & 36 \\\hline $H^+$ & charged Higgs & 37 \\\hline\hline $\widetilde{\psi}_\mu$ & gravitino & 39 \\\hline\hline $\widetilde{d}_L$ & down-squark 1 & 41 \\\hline $\widetilde{u}_L$ & up-squark 1 & 42 \\\hline $\widetilde{s}_L$ & strange-squark 1 & 43 \\\hline $\widetilde{c}_L$ & charm-squark 1 & 44 \\\hline $\widetilde{b}_L$ & bottom-squark 1 & 45 \\\hline $\widetilde{t}_L$ & top-squark 1 & 46 \\\hline $\widetilde{d}_R$ & down-squark 2 & 47 \\\hline $\widetilde{u}_R$ & up-squark 2 & 48 \\\hline $\widetilde{s}_R$ & strange-squark 2 & 49 \\\hline $\widetilde{c}_R$ & charm-squark 2 & 50 \\\hline $\widetilde{b}_R$ & bottom-squark 2 & 51 \\\hline $\widetilde{t}_R$ & top-squark 2 & 52 \\\hline\hline $\widetilde{e}_L$ & selectron 1 & 53 \\\hline $\widetilde{\nu}_{e,L}$ & electron-sneutrino & 54 \\\hline $\widetilde{\mu}_L$ & smuon 1 & 55 \\\hline $\widetilde{\nu}_{\mu,L}$ & muon-sneutrino & 56 \\\hline $\widetilde{\tau}_L$ & stau 1 & 57 \\\hline $\widetilde{\nu}_{\tau,L}$ & tau-sneutrino & 58 \\\hline $\widetilde{e}_R$ & selectron 2 & 59 \\\hline $\widetilde{\mu}_R$ & smuon 2 & 61 \\\hline $\widetilde{\tau}_R$ & stau 2 & 63 \\\hline\hline $\widetilde{g}$ & gluino & 64 \\\hline $\widetilde{\chi}^0_1$ & neutralino 1 & 65 \\\hline $\widetilde{\chi}^0_2$ & neutralino 2 & 66 \\\hline $\widetilde{\chi}^0_3$ & neutralino 3 & 67 \\\hline $\widetilde{\chi}^0_4$ & neutralino 4 & 68 \\\hline $\widetilde{\chi}^+_1$ & chargino 1 & 69 \\\hline $\widetilde{\chi}^+_2$ & chargino 2 & 70 \\\hline\hline \end{tabular} \end{center} *) let pdg_mw = function | L g when g > 0 -> 9 + 2*g | L g -> - 9 + 2*g | N g when g > 0 -> 10 + 2*g | N g -> - 10 + 2*g | U g when g > 0 -> 2*g | U g -> 2*g | D g when g > 0 -> - 1 + 2*g | D g -> 1 + 2*g | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | H_Light -> 25 | H_Heavy -> 35 | A -> 36 | Hp -> 37 | Hm -> (-37) | Phip | Phim -> 27 | Phi0 -> 26 | Sup (M1,g) when g > 0 -> 40 + 2*g | Sup (M1,g) -> - 40 + 2*g | Sup (M2,g) when g > 0 -> 46 + 2*g | Sup (M2,g) -> - 46 + 2*g | Sdown (M1,g) when g > 0 -> 39 + 2*g | Sdown (M1,g) -> - 39 + 2*g | Sdown (M2,g) when g > 0 -> 45 + 2*g | Sdown (M2,g) -> - 45 + 2*g | Slepton (M1,g) when g > 0 -> 51 + 2*g | Slepton (M1,g) -> - 51 + 2*g | Slepton (M2,g) when g > 0 -> 57 + 2*g | Slepton (M2,g) -> - 57 + 2*g | Sneutrino g when g > 0 -> 52 + 2*g | Sneutrino g -> - 52 + 2*g | Grino -> 39 | Gluino -> 64 | Chargino C1 -> 69 | Chargino C1c -> (-69) | Chargino C2 -> 70 | Chargino C2c -> (-70) | Neutralino N1 -> 65 | Neutralino N2 -> 66 | Neutralino N3 -> 67 | Neutralino N4 -> 68 let mass_symbol f = "mass(" ^ string_of_int (abs (pdg_mw f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg_mw f)) ^ ")" let conj_symbol = function | false, str -> str | true, str -> str ^ "_c" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Eidelta -> "eidelta" | Mu -> "mu" | G_Z -> "gz" | Sin a -> "sin" ^ string_of_angle a | Cos a -> "cos" ^ string_of_angle a | Sin2am2b -> "sin2am2b" | Cos2am2b -> "cos2am2b" | Sinamb -> "sinamb" | Sinapb -> "sinapb" | Cosamb -> "cosamb" | Cosapb -> "cosapb" | Cos4be -> "cos4be" | Sin4be -> "sin4be" | Sin4al -> "sin4al" | Sin2al -> "sin2al" | Cos2al -> "cos2al" | Sin2be -> "sin2be" | Cos2be -> "cos2be" | Tana -> "tana" | Tanb -> "tanb" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | Q_charg -> "qchar" | V_CKM (g1,g2) -> "vckm_" ^ string_of_int g1 ^ string_of_int g2 | M_SF (f,g,m1,m2) -> "mix_" ^ string_of_sff f ^ string_of_int g ^ string_of_sfm m1 ^ string_of_sfm m2 | AL g -> "al_" ^ string_of_int g | AD g -> "ad_" ^ string_of_int g | AU g -> "au_" ^ string_of_int g | A_0 (n1,n2) -> "a0_" ^ string_of_neu n1 ^ string_of_neu n2 | A_P (c1,c2) -> "ap_" ^ string_of_char c1 ^ string_of_char c2 | V_0 (n1,n2) -> "v0_" ^ string_of_neu n1 ^ string_of_neu n2 | V_P (c1,c2) -> "vp_" ^ string_of_char c1 ^ string_of_char c2 | M_N (n1,n2) -> "mn_" ^ string_of_neu n1 ^ string_of_neu n2 | M_U (c1,c2) -> "mu_" ^ string_of_char c1 ^ string_of_char c2 | M_V (c1,c2) -> "mv_" ^ string_of_char c1 ^ string_of_char c2 | L_NC (n,c) -> "lnc_" ^ string_of_neu n ^ string_of_char c | R_NC (n,c) -> "rnc_" ^ string_of_neu n ^ string_of_char c | L_CN (c,n) -> "lcn_" ^ string_of_char c ^ string_of_neu n | R_CN (c,n) -> "rcn_" ^ string_of_char c ^ string_of_neu n | L_NCH (n,c) -> "lnch_" ^ string_of_neu n ^ string_of_char c | R_NCH (n,c) -> "rnch_" ^ string_of_neu n ^ string_of_char c | L_CNG (c,n) -> "lcng_" ^ string_of_char c ^ string_of_neu n | R_CNG (c,n) -> "rcng_" ^ string_of_char c ^ string_of_neu n | S_NNA (n1,n2) -> "snna_" ^ string_of_neu n1 ^ string_of_neu n2 | P_NNA (n1,n2) -> "pnna_" ^ string_of_neu n1 ^ string_of_neu n2 | S_NNG (n1,n2) -> "snng_" ^ string_of_neu n1 ^ string_of_neu n2 | P_NNG (n1,n2) -> "pnng_" ^ string_of_neu n1 ^ string_of_neu n2 | S_NNH1 (n1,n2) -> "snnh1_" ^ string_of_neu n1 ^ string_of_neu n2 | P_NNH1 (n1,n2) -> "pnnh1_" ^ string_of_neu n1 ^ string_of_neu n2 | S_NNH2 (n1,n2) -> "snnh2_" ^ string_of_neu n1 ^ string_of_neu n2 | P_NNH2 (n1,n2) -> "pnnh2_" ^ string_of_neu n1 ^ string_of_neu n2 | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | G_CCQ (vc,g1,g2) -> conj_symbol (vc, "gccq_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_PZWW -> "gpzww" | G_PPWW -> "gppww" | G_GH 1 -> "ghaw" | G_GH 2 -> "gh1az" | G_GH 3 -> "gh2az" | G_GH 4 -> "gh1ww" | G_GH 5 -> "gh2ww" | G_GH 6 -> "ghh1w" | G_GH 7 -> "ghh2w" | G_GH 8 -> "gh1zz" | G_GH 9 -> "gh2zz" | G_GH 10 -> "ghhz" | G_GH 11 -> "ghhp" | G_GH _ -> failwith "this G_GH coupling is not available" | G_GLGLH -> "gglglh" | G_GLGLHH -> "gglglhh" | G_GLGLA -> "gglgla" | G_PPH -> "gpph" | G_PPHH -> "gpphh" | G_PPA -> "gppa" | G_GHGo n -> "g_hgh(" ^ string_of_int n ^ ")" | G_GH4 1 -> "gaazz" | G_GH4 2 -> "gh1h1zz" | G_GH4 3 -> "gh2h2zz" | G_GH4 4 -> "ghphmzz" | G_GH4 5 -> "ghphmpp" | G_GH4 6 -> "ghphmpz" | G_GH4 7 -> "ghh1wz" | G_GH4 8 -> "ghh2wz" | G_GH4 9 -> "ghh1wp" | G_GH4 10 -> "ghh2wp" | G_GH4 11 -> "gaaww" | G_GH4 12 -> "gh1h1ww" | G_GH4 13 -> "gh2h2ww" | G_GH4 14 -> "ghhww" | G_GH4 15 -> "ghawz" | G_GH4 16 -> "ghawp" | G_GH4 _ -> failwith "this G_GH4 coupling is not available" | G_CICIH1 (n1,n2) -> "gcicih1_" ^ string_of_neu n1 ^ "_" ^ string_of_neu n2 | G_CICIH2 (n1,n2) -> "gcicih2_" ^ string_of_neu n1 ^ "_" ^ string_of_neu n2 | G_CICIA (n1,n2) -> "gcicia_" ^ string_of_neu n1 ^ "_" ^ string_of_neu n2 | G_CICIG (n1,n2) -> "gcicig_" ^ string_of_neu n1 ^ "_" ^ string_of_neu n2 | G_H3 n -> "gh3_" ^ string_of_int n | G_H4 n -> "gh4_" ^ string_of_int n | G_HGo3 n -> "ghg3_" ^ string_of_int n | G_HGo4 n -> "ghg4_" ^ string_of_int n | G_GG4 n -> "ggg4_" ^ string_of_int n | G_strong -> "gs" | G_SS -> "gs**2" | Gs -> "gs" | I_G_S -> "igs" | G_S_Sqrt -> "gssq" | G_NWC (n,c) -> "gnwc_" ^ string_of_neu n ^ "_" ^ string_of_char c | G_CWN (c,n) -> "gcwn_" ^ string_of_char c ^ "_" ^ string_of_neu n | G_CH1C (c1,c2) -> "gch1c_" ^ string_of_char c1 ^ "_" ^ string_of_char c2 | G_CH2C (c1,c2) -> "gch2c_" ^ string_of_char c1 ^ "_" ^ string_of_char c2 | G_CAC (c1,c2) -> "gcac_" ^ string_of_char c1 ^ "_" ^ string_of_char c2 | G_CGC (c1,c2) -> "gcgc_" ^ string_of_char c1 ^ "_" ^ string_of_char c2 | G_YUK (i,g) -> "g_yuk" ^ string_of_int i ^ "_" ^ string_of_int g | G_NZN (n1,n2) -> "gnzn_" ^ string_of_neu n1 ^ "_" ^ string_of_neu n2 | G_NNA -> "gnna" | G_CZC (c1,c2) -> "gczc_" ^ string_of_char c1 ^ "_" ^ string_of_char c2 | G_YUK_1 (n,m) -> "g_yuk1_" ^ string_of_int n ^ "_" ^ string_of_int m | G_YUK_2 (n,m) -> "g_yuk2_" ^ string_of_int n ^ "_" ^ string_of_int m | G_YUK_3 (n,m) -> "g_yuk3_" ^ string_of_int n ^ "_" ^ string_of_int m | G_YUK_4 (n,m) -> "g_yuk4_" ^ string_of_int n ^ "_" ^ string_of_int m | G_YUK_C (vc,g,c,sf,m) -> conj_symbol (vc, "g_yuk_ch" ^ string_of_char c ^ "_" ^ string_of_sff sf ^ string_of_sfm m ^ "_" ^ string_of_int g ) | G_YUK_N (vc,g,n,sf,m) -> conj_symbol (vc, "g_yuk_n" ^ string_of_neu n ^ "_" ^ string_of_sff sf ^ string_of_sfm m ^ "_" ^ string_of_int g ) | G_YUK_G (vc,g,sf,m) -> conj_symbol (vc, "g_yuk_g" ^ string_of_sff sf ^ string_of_sfm m ^ "_" ^ string_of_int g) | G_YUK_Q (vc,g1,g2,c,sf,m) -> conj_symbol (vc, "g_yuk_ch" ^ string_of_char c ^ "_" ^ string_of_sff sf ^ string_of_sfm m ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_NHC (n,c) -> "g_nhc_" ^ string_of_neu n ^ "_" ^ string_of_char c | G_CHN (c,n) -> "g_chn_" ^ string_of_neu n ^ "_" ^ string_of_char c | G_NGC (n,c) -> "g_ngc_" ^ string_of_neu n ^ string_of_char c | G_CGN (c,n) -> "g_cgn_" ^ string_of_char c ^ string_of_neu n | SUM_1 -> "sum1" | G_SLSNW (vc,g,m) -> conj_symbol (vc, "gsl" ^ string_of_sfm m ^ "_" ^ string_of_int g ^ "snw") | G_ZSF (f,g,m1,m2) -> "g" ^ string_of_sff f ^ string_of_sfm m1 ^ "z" ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g | G_WWSFSF (f,g,m1,m2) -> "gww" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g | G_WPSLSN (vc,g,m) -> conj_symbol (vc, "gpwsl" ^ string_of_sfm m ^ "sn_" ^ string_of_int g) | G_WZSLSN (vc,g,m) -> conj_symbol (vc, "gwzsl" ^ string_of_sfm m ^ "sn_" ^ string_of_int g) | G_H1SFSF (f,g,m1,m2) -> "gh1" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g | G_H2SFSF (f,g,m1,m2) -> "gh2" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g | G_ASFSF (f,g,m1,m2) -> "ga" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g | G_HSNSL (vc,g,m) -> conj_symbol (vc, "ghsnsl" ^ string_of_sfm m ^ "_" ^ string_of_int g) | G_GoSFSF (f,g,m1,m2) -> "ggo" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g | G_GoSNSL (vc,g,m) -> conj_symbol (vc, "ggosnsl" ^ string_of_sfm m ^ "_" ^ string_of_int g) | G_HSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "ghsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_GSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "ggsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_WPSUSD (vc,m1,m2,n,m) -> conj_symbol (vc, "gpwpsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int n ^ "_" ^ string_of_int m) | G_WZSUSD (vc,m1,m2,n,m) -> conj_symbol (vc, "gzwpsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int n ^ "_" ^ string_of_int m) | G_SWS (vc,g1,g2,m1,m2) -> conj_symbol (vc, "gs" ^ string_of_sfm m1 ^ "ws" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_GlGlSQSQ -> "gglglsqsq" | G_PPSFSF f -> "gpp" ^ string_of_sff f ^ string_of_sff f | G_ZZSFSF (f,g,m1,m2) -> "gzz" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g | G_ZPSFSF (f,g,m1,m2) -> "gzp" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g | G_GlPSQSQ -> "gglpsqsq" | G_GlZSFSF (f,g,m1,m2) -> "ggl" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g | G_GlWSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "gglwsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_GHGo4 1 -> "gzzg0g0" | G_GHGo4 2 -> "gzzgpgm" | G_GHGo4 3 -> "gppgpgm" | G_GHGo4 4 -> "gzpgpgm" | G_GHGo4 5 -> "gwwgpgm" | G_GHGo4 6 -> "gwwg0g0" | G_GHGo4 7 -> "gwzg0g" | G_GHGo4 8 -> "gwzg0g" | G_GHGo4 9 -> "gwzh1g" | G_GHGo4 10 -> "gwzh2g" | G_GHGo4 11 -> "gwph1g" | G_GHGo4 12 -> "gwph2g" | G_GHGo4 _ -> failwith "Coupling G_GHGo4 is not available" | G_HSF31 (h,g,m1,m2,f1,f2) -> "g_" ^ string_of_higgs h ^ string_of_int g ^ string_of_sfm m1 ^ string_of_sfm m2 ^ string_of_sff f1 ^ string_of_sff f2 | G_HSF32 (h,g1,g2,m1,m2,f1,f2) -> "g_" ^ string_of_higgs h ^ string_of_int g1 ^ "_" ^ string_of_int g2 ^ string_of_sfm m1 ^ string_of_sfm m2 ^ string_of_sff f1 ^ string_of_sff f2 | G_HSF41 (h,g,m1,m2,f1,f2) -> "g_" ^ string_of_higgs h ^ string_of_int g ^ string_of_sfm m1 ^ string_of_sfm m2 ^ string_of_sff f1 ^ string_of_sff f2 | G_HSF42 (h,g1,g2,m1,m2,f1,f2) -> "g_" ^ string_of_higgs h ^ string_of_int g1 ^ "_" ^ string_of_int g2 ^ string_of_sfm m1 ^ string_of_sfm m2 ^ string_of_sff f1 ^ string_of_sff f2 | G_H1H1SFSF (f,m1,m2,n) -> "gh1h1" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int n | G_H1H2SFSF (f,m1,m2,n) -> "gh1h2" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int n | G_H2H2SFSF (f,m1,m2,n) -> "gh2h2" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int n | G_HHSFSF (f,m1,m2,n) -> "ghh" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int n | G_AASFSF (f,m1,m2,n) -> "gaa" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int n | G_HH1SUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "ghh1su" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_HH2SUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "ghh2su" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_HASUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "ghasu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2 ^ "_c") | G_HH1SLSN (vc,m,g) -> conj_symbol (vc, "ghh1sl" ^ string_of_sfm m ^ "sn_" ^ string_of_int g) | G_HH2SLSN (vc,m,g) -> conj_symbol (vc, "ghh2sl" ^ string_of_sfm m ^ "sn_" ^ string_of_int g) | G_HASLSN (vc,m,g) -> conj_symbol (vc, "ghasl" ^ string_of_sfm m ^ "sn_" ^ string_of_int g) | G_AG0SFSF (f,m1,m2,n) -> "gag0" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int n | G_HGSFSF (f,m1,m2,n) -> "ghg" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m1 ^ "_" ^ string_of_int n | G_GGSFSF (f,m1,m2,n) -> "ggg" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int n | G_G0G0SFSF (f,m1,m2,n) -> "gg0g0" ^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int n | G_HGSNSL (vc,m,n) -> conj_symbol (vc, "ghgsnsl" ^ string_of_sfm m ^ "_" ^ string_of_int n) | G_H1GSNSL (vc,m,n) -> conj_symbol (vc, "gh1gsnsl" ^ string_of_sfm m ^ "_" ^ string_of_int n) | G_H2GSNSL (vc,m,n) -> conj_symbol (vc, "gh2gsnsl" ^ string_of_sfm m ^ "_" ^ string_of_int n) | G_AGSNSL (vc,m,n) -> conj_symbol (vc, "gagsnsl" ^ string_of_sfm m ^ "_" ^ string_of_int n) | G_GGSNSL (vc,m,n) -> conj_symbol (vc, "gggsnsl" ^ string_of_sfm m ^ "_" ^ string_of_int n) | G_HGSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "gghpsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_H1GSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "gh1gpsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_H2GSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "gh2gpsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_AGSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "gagpsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_GGSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "gggpsu" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2) | G_SN4 (g1,g2) -> "gsn4_" ^ string_of_int g1 ^ "_" ^ string_of_int g2 | G_SN2SL2_1 (m1,m2,g1,g2) -> "gsl_" ^ string_of_int g1 ^ "_sl_" ^ string_of_int g1 ^ "_sl" ^ string_of_sfm m1 ^ "_" ^ string_of_int g2 ^ "_sl" ^ string_of_sfm m2 ^ "_" ^ string_of_int g2 | G_SN2SL2_2 (m1,m2,g1,g2) -> "gsl_" ^ string_of_int g1 ^ "_sl_" ^ string_of_int g2 ^ "_sl" ^ string_of_sfm m1 ^ "_" ^ string_of_int g1 ^ "_sl" ^ string_of_sfm m2 ^ "_" ^ string_of_int g2 ^ "_mix" | G_SF4 (f1,f2,m1,m2,m3,m4,g1,g2) -> "gsf" ^ string_of_sff f1 ^ string_of_sff f2 ^ string_of_sfm m1 ^ string_of_sfm m2 ^ string_of_sfm m3 ^ string_of_sfm m4 ^ string_of_int g1 ^ string_of_int g2 | G_SF4_3 (f1,f2,m1,m2,m3,m4,g1,g2,g3) -> "gsf" ^ string_of_sff f1 ^ string_of_sff f2 ^ string_of_sfm m1 ^ string_of_sfm m2 ^ string_of_sfm m3 ^ string_of_sfm m4 ^ string_of_int g1 ^ string_of_int g2 ^ "_" ^ string_of_int g3 | G_SF4_4 (f1,f2,m1,m2,m3,m4,g1,g2,g3,g4) -> "gsf" ^ string_of_sff f1 ^ string_of_sff f2 ^ string_of_sfm m1 ^ string_of_sfm m2 ^ string_of_sfm m3 ^ string_of_sfm m4 ^ string_of_int g1 ^ "_" ^ string_of_int g2 ^ string_of_int g3 ^ "_" ^ string_of_int g4 | G_SL4 (m1,m2,m3,m4,g) -> "gsl" ^ string_of_sfm m1 ^ "_" ^ "sl" ^ string_of_sfm m2 ^ "_" ^ "sl" ^ string_of_sfm m3 ^ "_" ^ "sl" ^ string_of_sfm m4 ^ "_" ^ string_of_int g | G_SL4_2 (m1,m2,m3,m4,g1,g2) -> "gsl" ^ string_of_sfm m1 ^ "_" ^ "sl" ^ string_of_sfm m2 ^ "_" ^ "sl" ^ string_of_sfm m3 ^ "_" ^ "sl" ^ string_of_sfm m4 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2 | G_SN2SQ2 (f,m1,m2,g1,g2) -> "gsn_" ^ string_of_int g1 ^ "_sn_" ^ string_of_int g1 ^ "_" ^ string_of_sff f ^ string_of_sfm m1 ^ "_" ^ string_of_int g2 ^ "_" ^ string_of_sff f ^ string_of_sfm m2 ^ "_" ^ string_of_int g2 | G_SL2SQ2 (f,m1,m2,m3,m4,g1,g2) -> "gsl" ^ string_of_sfm m1 ^ "_" ^ string_of_int g1 ^ "_sl" ^ string_of_sfm m2 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_sff f ^ string_of_sfm m3 ^ "_" ^ string_of_int g2 ^ "_" ^ string_of_sff f ^ string_of_sfm m4 ^ "_" ^ string_of_int g2 | G_SUSDSNSL (vc,m1,m2,m3,g1,g2,g3) -> conj_symbol (vc, "gsl" ^ string_of_sfm m3 ^ "_" ^ string_of_int g3 ^ "_sn_" ^ string_of_int g3 ^ "_su" ^ string_of_sfm m1 ^ "_" ^ string_of_int g1 ^ "_sd" ^ string_of_sfm m2 ^ "_" ^ string_of_int g2) | G_SU4 (m1,m2,m3,m4,g) -> "gsu" ^ string_of_sfm m1 ^ "_" ^ "_su" ^ string_of_sfm m2 ^ "_" ^ "_su" ^ string_of_sfm m3 ^ "_" ^ "_su" ^ string_of_sfm m4 ^ "_" ^ string_of_int g | G_SU4_2 (m1,m2,m3,m4,g1,g2) -> "gsu" ^ string_of_sfm m1 ^ "_" ^ "_su" ^ string_of_sfm m2 ^ "_" ^ "_su" ^ string_of_sfm m3 ^ "_" ^ "_su" ^ string_of_sfm m4 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2 | G_SD4 (m1,m2,m3,m4,g) -> "gsd" ^ string_of_sfm m1 ^ "_" ^ "_sd" ^ string_of_sfm m2 ^ "_" ^ "_sd" ^ string_of_sfm m3 ^ "_" ^ "_sd" ^ string_of_sfm m4 ^ "_" ^ string_of_int g | G_SD4_2 (m1,m2,m3,m4,g1,g2) -> "gsd" ^ string_of_sfm m1 ^ "_" ^ "_sd" ^ string_of_sfm m2 ^ "_" ^ "_sd" ^ string_of_sfm m3 ^ "_" ^ "_sd" ^ string_of_sfm m4 ^ "_" ^ string_of_int g1 ^ "_" ^ string_of_int g2 | G_SU2SD2 (m1,m2,m3,m4,g1,g2,g3,g4) -> "gsu" ^ string_of_sfm m1 ^ "_" ^ string_of_int g1 ^ "_su" ^ string_of_sfm m2 ^ "_" ^ string_of_int g2 ^ "_sd" ^ string_of_sfm m3 ^ "_" ^ string_of_int g3 ^ "_sd" ^ string_of_sfm m4 ^ "_" ^ string_of_int g4 | M f -> "mass" ^ flavor_symbol f | W f -> "width" ^ flavor_symbol f | G_Grav -> "ggrav" | G_Gr_Ch C1 -> "ggrch1" | G_Gr_Ch C2 -> "ggrch2" | G_Gr_Ch C1c -> "ggrch1c" | G_Gr_Ch C2c -> "ggrch2c" | G_Gr_Z_Neu n -> "ggrzneu" ^ string_of_neu n | G_Gr_A_Neu n -> "ggraneu" ^ string_of_neu n | G_Gr4_Neu n -> "ggr4neu" ^ string_of_neu n | G_Gr4_A_Ch C1 -> "ggr4ach1" | G_Gr4_A_Ch C2 -> "ggr4ach2" | G_Gr4_A_Ch C1c -> "ggr4ach1c" | G_Gr4_A_Ch C2c -> "ggr4ach2c" | G_Gr4_Z_Ch C1 -> "ggr4zch1" | G_Gr4_Z_Ch C2 -> "ggr4zch2" | G_Gr4_Z_Ch C1c -> "ggr4zch1c" | G_Gr4_Z_Ch C2c -> "ggr4zch2c" | G_Grav_N -> "ggravn" | G_GravGl -> "gs * ggrav" | G_Grav_L (g,m) -> "ggravl" ^ string_of_int g ^ string_of_sfm m | G_Grav_Lc (g,m) -> "ggravl" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Grav_U (g,m) -> "ggravu" ^ string_of_int g ^ string_of_sfm m | G_Grav_Uc (g,m) -> "ggravu" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Grav_D (g,m) -> "ggravd" ^ string_of_int g ^ string_of_sfm m | G_Grav_Dc (g,m) -> "ggravd" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr_H_Ch C1 -> "ggrhch1" | G_Gr_H_Ch C2 -> "ggrhch2" | G_Gr_H_Ch C1c -> "ggrhch1c" | G_Gr_H_Ch C2c -> "ggrhch2c" | G_Gr_H1_Neu n -> "ggrh1neu" ^ string_of_neu n | G_Gr_H2_Neu n -> "ggrh2neu" ^ string_of_neu n | G_Gr_H3_Neu n -> "ggrh3neu" ^ string_of_neu n | G_Gr4A_Sl (g,m) -> "ggr4asl" ^ string_of_int g ^ string_of_sfm m | G_Gr4A_Slc (g,m) -> "ggr4asl" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4A_Su (g,m) -> "ggr4asu" ^ string_of_int g ^ string_of_sfm m | G_Gr4A_Suc (g,m) -> "ggr4asu" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4A_Sd (g,m) -> "ggr4asd" ^ string_of_int g ^ string_of_sfm m | G_Gr4A_Sdc (g,m) -> "ggr4asd" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4Z_Sn -> "ggr4zsn" | G_Gr4Z_Snc -> "ggr4zsnc" | G_Gr4Z_Sl (g,m) -> "ggr4zsl" ^ string_of_int g ^ string_of_sfm m | G_Gr4Z_Slc (g,m) -> "ggr4zsl" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4Z_Su (g,m) -> "ggr4zsu" ^ string_of_int g ^ string_of_sfm m | G_Gr4Z_Suc (g,m) -> "ggr4zsu" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4Z_Sd (g,m) -> "ggr4zsd" ^ string_of_int g ^ string_of_sfm m | G_Gr4Z_Sdc (g,m) -> "ggr4zsd" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4W_Sl (g,m) -> "ggr4wsl" ^ string_of_int g ^ string_of_sfm m | G_Gr4W_Slc (g,m) -> "ggr4wsl" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4W_Su (g,m) -> "ggr4wsu" ^ string_of_int g ^ string_of_sfm m | G_Gr4W_Suc (g,m) -> "ggr4wsu" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4W_Sd (g,m) -> "ggr4wsd" ^ string_of_int g ^ string_of_sfm m | G_Gr4W_Sdc (g,m) -> "ggr4wsd" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4Gl_Su (g,m) -> "ggr4glsu" ^ string_of_int g ^ string_of_sfm m | G_Gr4Gl_Suc (g,m) -> "ggr4glsu" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4Gl_Sd (g,m) -> "ggr4glsd" ^ string_of_int g ^ string_of_sfm m | G_Gr4Gl_Sdc (g,m) -> "ggr4glsd" ^ string_of_int g ^ string_of_sfm m ^ "c" | G_Gr4_Z_H1 n -> "ggr4zh1_" ^ string_of_neu n | G_Gr4_Z_H2 n -> "ggr4zh2_" ^ string_of_neu n | G_Gr4_Z_H3 n -> "ggr4zh3_" ^ string_of_neu n | G_Gr4_W_H n -> "ggr4wh_" ^ string_of_neu n | G_Gr4_W_Hc n -> "ggr4whc_" ^ string_of_neu n | G_Gr4_H_A C1 -> "ggr4ha1" | G_Gr4_H_A C2 -> "ggr4ha2" | G_Gr4_H_A C1c -> "ggr4ha1c" | G_Gr4_H_A C2c -> "ggr4ha2c" | G_Gr4_H_Z C1 -> "ggr4hz1" | G_Gr4_H_Z C2 -> "ggr4hz2" | G_Gr4_H_Z C1c -> "ggr4hz1c" | G_Gr4_H_Z C2c -> "ggr4hz2c" | G_Gr4W_Sn -> "ggr4wsn" | G_Gr4W_Snc -> "ggr4wsnc" end (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/tuple.ml =================================================================== --- trunk/omega/src/tuple.ml (revision 8274) +++ trunk/omega/src/tuple.ml (revision 8275) @@ -1,478 +1,480 @@ (* tuple.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) module type Mono = sig type 'a t val arity : 'a t -> int val max_arity : unit -> int val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int val for_all : ('a -> bool) -> 'a t -> bool val map : ('a -> 'b) -> 'a t -> 'b t val iter : ('a -> unit) -> 'a t -> unit val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b val fold_left_internal : ('a -> 'a -> 'a) -> 'a t -> 'a val fold_right_internal : ('a -> 'a -> 'a) -> 'a t -> 'a val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t val split : ('a * 'b) t -> 'a t * 'b t val product : 'a list t -> 'a t list val product_fold : ('a t -> 'b -> 'b) -> 'a list t -> 'b -> 'b val power : 'a list -> 'a t list val power_fold : ('a t -> 'b -> 'b) -> 'a list -> 'b -> 'b type 'a graded = 'a list array val graded_sym_power : int -> 'a graded -> 'a t list val graded_sym_power_fold : int -> ('a t -> 'b -> 'b) -> 'a graded -> 'b -> 'b val to_list : 'a t -> 'a list val of2_kludge : 'a -> 'a -> 'a t end module type Poly = sig include Mono exception Mismatched_arity exception No_termination end (* \thocwmodulesection{Typesafe Combinatorics} *) (* Wrap the combinatorical functions with varying arities into typesafe functions with fixed arities. We could provide specialized implementations, but since we \emph{know} that [Impossible] is \emph{never} raised, the present approach is just as good (except for a tiny inefficiency). *) exception Impossible of string let impossible name = raise (Impossible name) let choose2 set = List.map (function [x; y] -> (x, y) | _ -> impossible "choose2") (Combinatorics.choose 2 set) let choose3 set = List.map (function [x; y; z] -> (x, y, z) | _ -> impossible "choose3") (Combinatorics.choose 3 set) (* \thocwmodulesection{Pairs} *) module type Binary = sig include Poly (* should become [Mono]! *) val of2 : 'a -> 'a -> 'a t end module Binary = struct type 'a t = 'a * 'a let arity _ = 2 let max_arity () = 2 let of2 x y = (x, y) let compare cmp (x1, y1) (x2, y2) = let cx = cmp x1 x2 in if cx <> 0 then cx else cmp y1 y2 let for_all p (x, y) = p x && p y let map f (x, y) = (f x, f y) let iter f (x, y) = f x; f y let fold_left f init (x, y) = f (f init x) y let fold_right f (x, y) init = f x (f y init) let fold_left_internal f (x, y) = f x y let fold_right_internal f (x, y) = f x y exception Mismatched_arity let map2 f (x1, y1) (x2, y2) = (f x1 x2, f y1 y2) let split ((x1, x2), (y1, y2)) = ((x1, y1), (x2, y2)) let product (lx, ly) = Product.list2 (fun x y -> (x, y)) lx ly let product_fold f (lx, ly) init = Product.fold2 (fun x y -> f (x, y)) lx ly init let power l = product (l, l) let power_fold f l = product_fold f (l, l) (* In the special case of binary fusions, the implementation is very concise. *) type 'a graded = 'a list array let fuse2 f set (i, j) acc = if i = j then List.fold_right (fun (x, y) -> f x y) (choose2 set.(pred i)) acc else Product.fold2 f set.(pred i) set.(pred j) acc let graded_sym_power_fold rank f set acc = let max_rank = Array.length set in List.fold_right (fuse2 (fun x y -> f (of2 x y)) set) (Partition.pairs rank 1 max_rank) acc let graded_sym_power rank set = graded_sym_power_fold rank (fun pair acc -> pair :: acc) set [] let to_list (x, y) = [x; y] + let of2_kludge = of2 exception No_termination end (* \thocwmodulesection{Triples} *) module type Ternary = sig include Mono val of3 : 'a -> 'a -> 'a -> 'a t end module Ternary = struct type 'a t = 'a * 'a * 'a let arity _ = 3 let max_arity () = 3 let of3 x y z = (x, y, z) let compare cmp (x1, y1, z1) (x2, y2, z2) = let cx = cmp x1 x2 in if cx <> 0 then cx else let cy = cmp y1 y2 in if cy <> 0 then cy else cmp z1 z2 let for_all p (x, y, z) = p x && p y && p z let map f (x, y, z) = (f x, f y, f z) let iter f (x, y, z) = f x; f y; f z let fold_left f init (x, y, z) = f (f (f init x) y) z let fold_right f (x, y, z) init = f x (f y (f z init)) let fold_left_internal f (x, y, z) = f (f x y) z let fold_right_internal f (x, y, z) = f x (f y z) exception Mismatched_arity let map2 f (x1, y1, z1) (x2, y2, z2) = (f x1 x2, f y1 y2, f z1 z2) let split ((x1, x2), (y1, y2), (z1, z2)) = ((x1, y1, z1), (x2, y2, z2)) let product (lx,ly,lz) = Product.list3 (fun x y z -> (x, y, z)) lx ly lz let product_fold f (lx, ly, lz) init = Product.fold3 (fun x y z -> f (x, y, z)) lx ly lz init let power l = product (l, l, l) let power_fold f l = product_fold f (l, l, l) type 'a graded = 'a list array let fuse3 f set (i, j, k) acc = if i = j then begin if j = k then List.fold_right (fun (x, y, z) -> f x y z) (choose3 set.(pred i)) acc else Product.fold2 (fun (x, y) z -> f x y z) (choose2 set.(pred i)) set.(pred k) acc end else begin if j = k then Product.fold2 (fun x (y, z) -> f x y z) set.(pred i) (choose2 set.(pred j)) acc else Product.fold3 (fun x y z -> f x y z) set.(pred i) set.(pred j) set.(pred k) acc end let graded_sym_power_fold rank f set acc = let max_rank = Array.length set in List.fold_right (fuse3 (fun x y z -> f (of3 x y z)) set) (Partition.triples rank 1 max_rank) acc let graded_sym_power rank set = graded_sym_power_fold rank (fun pair acc -> pair :: acc) set [] - let of2_kludge _ = failwith "Tuple.Ternary.of2_kludge" - let to_list (x, y, z) = [x; y; z] + let of2_kludge _ = failwith "Tuple.Ternary.of2_kludge" + end (* \thocwmodulesection{Pairs and Triples} *) type 'a pair_or_triple = T2 of 'a * 'a | T3 of 'a * 'a *'a module type Mixed23 = sig include Poly val of2 : 'a -> 'a -> 'a t val of3 : 'a -> 'a -> 'a -> 'a t end module Mixed23 = struct type 'a t = 'a pair_or_triple let arity = function | T2 _ -> 2 | T3 _ -> 3 let max_arity () = 3 let of2 x y = T2 (x, y) let of3 x y z = T3 (x, y, z) let compare cmp m1 m2 = match m1, m2 with | T2 _, T3 _ -> -1 | T3 _, T2 _ -> 1 | T2 (x1, y1), T2 (x2, y2) -> let cx = cmp x1 x2 in if cx <> 0 then cx else cmp y1 y2 | T3 (x1, y1, z1), T3 (x2, y2, z2) -> let cx = cmp x1 x2 in if cx <> 0 then cx else let cy = cmp y1 y2 in if cy <> 0 then cy else cmp z1 z2 let for_all p = function | T2 (x, y) -> p x && p y | T3 (x, y, z) -> p x && p y && p z let map f = function | T2 (x, y) -> T2 (f x, f y) | T3 (x, y, z) -> T3 (f x, f y, f z) let iter f = function | T2 (x, y) -> f x; f y | T3 (x, y, z) -> f x; f y; f z let fold_left f init = function | T2 (x, y) -> f (f init x) y | T3 (x, y, z) -> f (f (f init x) y) z let fold_right f m init = match m with | T2 (x, y) -> f x (f y init) | T3 (x, y, z) -> f x (f y (f z init)) let fold_left_internal f m = match m with | T2 (x, y) -> f x y | T3 (x, y, z) -> f (f x y) z let fold_right_internal f m = match m with | T2 (x, y) -> f x y | T3 (x, y, z) -> f x (f y z) exception Mismatched_arity let map2 f m1 m2 = match m1, m2 with | T2 (x1, y1), T2 (x2, y2) -> T2 (f x1 x2, f y1 y2) | T3 (x1, y1, z1), T3 (x2, y2, z2) -> T3 (f x1 x2, f y1 y2, f z1 z2) | T2 _, T3 _ | T3 _, T2 _ -> raise Mismatched_arity let split = function | T2 ((x1, x2), (y1, y2)) -> (T2 (x1, y1), T2 (x2, y2)) | T3 ((x1, x2), (y1, y2), (z1, z2)) -> (T3 (x1, y1, z1), T3 (x2, y2, z2)) let product = function | T2 (lx, ly) -> Product.list2 (fun x y -> T2 (x, y)) lx ly | T3 (lx, ly, lz) -> Product.list3 (fun x y z -> T3 (x, y, z)) lx ly lz let product_fold f m init = match m with | T2 (lx, ly) -> Product.fold2 (fun x y -> f (T2 (x, y))) lx ly init | T3 (lx, ly, lz) -> Product.fold3 (fun x y z -> f (T3 (x, y, z))) lx ly lz init exception No_termination let power_fold f l init = product_fold f (T2 (l, l)) (product_fold f (T3 (l, l, l)) init) let power l = power_fold (fun m acc -> m :: acc) l [] type 'a graded = 'a list array let graded_sym_power_fold rank f set acc = let max_rank = Array.length set in List.fold_right (Binary.fuse2 (fun x y -> f (of2 x y)) set) (Partition.pairs rank 1 max_rank) (List.fold_right (Ternary.fuse3 (fun x y z -> f (of3 x y z)) set) (Partition.triples rank 1 max_rank) acc) let graded_sym_power rank set = graded_sym_power_fold rank (fun pair acc -> pair :: acc) set [] let to_list = function | T2 (x, y) -> [x; y] | T3 (x, y, z) -> [x; y; z] let of2_kludge = of2 end (* \thocwmodulesection{\ldots{} and All The Rest} *) module type Nary = sig include Poly val of2 : 'a -> 'a -> 'a t val of3 : 'a -> 'a -> 'a -> 'a t val of_list : 'a list -> 'a t end module Nary (A : sig val max_arity : unit -> int end) = struct type 'a t = 'a * 'a list let arity (_, y) = succ (List.length y) let max_arity () = try A.max_arity () with _ -> -1 let of2 x y = (x, [y]) let of3 x y z = (x, [y; z]) let of_list = function | x :: y -> (x, y) | [] -> invalid_arg "Tuple.Nary.of_list: empty" let compare cmp (x1, y1) (x2, y2) = let c = cmp x1 x2 in if c <> 0 then c else ThoList.compare ~cmp y1 y2 let for_all p (x, y) = p x && List.for_all p y let map f (x, y) = (f x, List.map f y) let iter f (x, y) = f x; List.iter f y let fold_left f init (x, y) = List.fold_left f (f init x) y let fold_right f (x, y) init = f x (List.fold_right f y init) let fold_left_internal f (x, y) = List.fold_left f x y let fold_right_internal f (x, y) = match List.rev y with | [] -> x | y0 :: y_sans_y0 -> f x (List.fold_right f (List.rev y_sans_y0) y0) exception Mismatched_arity let map2 f (x1, y1) (x2, y2) = try (f x1 x2, List.map2 f y1 y2) with | Invalid_argument _ -> raise Mismatched_arity let split ((x1, x2), y12) = let y1, y2 = List.split y12 in ((x1, y1), (x2, y2)) let product (xl, yl) = Product.list (function | x :: y -> (x, y) | [] -> failwith "Tuple.Nary.product") (xl :: yl) let product_fold f (xl, yl) init = Product.fold (function | x :: y -> f (x, y) | [] -> failwith "Tuple.Nary.product_fold") (xl :: yl) init exception No_termination let power_fold f l init = let ma = max_arity () in if ma > 0 then List.fold_right (fun n -> product_fold f (l, ThoList.clone (pred n) l)) (ThoList.range 2 ma) init else raise No_termination let power l = power_fold (fun t acc -> t :: acc) l [] type 'a graded = 'a list array let fuse_n f set partition acc = let choose (n, r) = Printf.printf "chose: n=%d r=%d len=%d\n" n r (List.length set.(pred r)); Combinatorics.choose n set.(pred r) in Product.fold (fun wfs -> f (List.concat wfs)) (List.map choose (ThoList.classify partition)) acc let fuse_n f set partition acc = let choose (n, r) = Combinatorics.choose n set.(pred r) in Product.fold (fun wfs -> f (List.concat wfs)) (List.map choose (ThoList.classify partition)) acc (* \begin{dubious} [graded_sym_power_fold] is well defined for unbounded arities as well: derive a reasonable replacement from [set]. The length of the flattened [set] is an upper limit, of course, but too pessimistic in most cases. \end{dubious} *) let graded_sym_power_fold rank f set acc = let max_rank = Array.length set in let degrees = ThoList.range 2 (max_arity ()) in let partitions = ThoList.flatmap (fun deg -> Partition.tuples deg rank 1 max_rank) degrees in List.fold_right (fuse_n (fun wfs -> f (of_list wfs)) set) partitions acc let graded_sym_power rank set = graded_sym_power_fold rank (fun pair acc -> pair :: acc) set [] let to_list (x, y) = x :: y + let of2_kludge = of2 end module type Bound = sig val max_arity : unit -> int end module Unbounded_Nary = Nary (struct let max_arity () = -1 end) (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/combinatorics.ml =================================================================== --- trunk/omega/src/combinatorics.ml (revision 8274) +++ trunk/omega/src/combinatorics.ml (revision 8275) @@ -1,504 +1,565 @@ (* combinatorics.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) type 'a seq = 'a list (* \thocwmodulesection{Simple Combinatorial Functions} *) let rec factorial' fn n = if n < 1 then fn else factorial' (n * fn) (pred n) let factorial n = let result = factorial' 1 n in if result < 0 then invalid_arg "Combinatorics.factorial overflow" else result (* \begin{multline} \binom{n}{k} = \frac{n!}{k!(n-k)!} = \frac{n(n-1)\cdots(n-k+1)}{k(k-1)\cdots1} \\ = \frac{n(n-1)\cdots(k+1)}{(n-k)(n-k-1)\cdots1} = \begin{cases} B_{n-k+1}(n,k) & \text{for $k \le \lfloor n/2 \rfloor$} \\ B_{k+1}(n,n-k) & \text{for $k > \lfloor n/2 \rfloor$} \end{cases} \end{multline} where \begin{equation} B_{n_{\min}}(n,k) = \begin{cases} n B_{n_{\min}}(n-1,k) & \text{for $n \ge n_{\min}$} \\ \frac{1}{k} B_{n_{\min}}(n,k-1) & \text{for $k > 1$} \\ 1 & \text{otherwise} \end{cases} \end{equation} *) let rec binomial' n_min n k acc = if n >= n_min then binomial' n_min (pred n) k (n * acc) else if k > 1 then binomial' n_min n (pred k) (acc / k) else acc let binomial n k = if k > n / 2 then binomial' (k + 1) n (n - k) 1 else binomial' (n - k + 1) n k 1 (* Overflows later, but takes much more time: \begin{equation} \binom{n}{k} = \binom{n-1}{k} + \binom{n-1}{k-1} \end{equation} *) let rec slow_binomial n k = if n < 0 || k < 0 then invalid_arg "Combinatorics.binomial" else if k = 0 || k = n then 1 else slow_binomial (pred n) k + slow_binomial (pred n) (pred k) let multinomial n_list = List.fold_left (fun acc n -> acc / (factorial n)) (factorial (List.fold_left (+) 0 n_list)) n_list let symmetry l = List.fold_left (fun s (n, _) -> s * factorial n) 1 (ThoList.classify l) (* \thocwmodulesection{Partitions} *) (* The inner steps of the recursion (i.\,e.~$n=1$) are expanded as follows \begin{multline} \ocwlowerid{split'}(1,\lbrack p_k;p_{k-1};\ldots;p_1\rbrack, \lbrack x_l;x_{l-1};\ldots;x_1\rbrack, \lbrack x_{l+1};x_{l+2};\ldots;x_m\rbrack ) = \\ \lbrack (\lbrack p_1;\ldots;p_k;x_{l+1}\rbrack, \lbrack x_1;\ldots;x_l;x_{l+2};\ldots;x_m\rbrack); \qquad\qquad\qquad\\ (\lbrack p_1;\ldots;p_k;x_{l+2}\rbrack, \lbrack x_1;\ldots;x_l;x_{l+1};x_{l+3}\ldots;x_m\rbrack); \ldots; \\ (\lbrack p_1;\ldots;p_k;x_m\rbrack, \lbrack x_1;\ldots;x_l;x_{l+1};\ldots;x_{m-1}\rbrack) \rbrack \end{multline} while the outer steps (i.\,e.~$n>1$) perform the same with one element moved from the last argument to the first argument. At the $n$th level we have \begin{multline} \ocwlowerid{split'}(n,\lbrack p_k;p_{k-1};\ldots;p_1\rbrack, \lbrack x_l;x_{l-1};\ldots;x_1\rbrack, \lbrack x_{l+1};x_{l+2};\ldots;x_m\rbrack ) = \\ \lbrack (\lbrack p_1;\ldots;p_k;x_{l+1};x_{l+2};\ldots;x_{l+n}\rbrack, \lbrack x_1;\ldots;x_l;x_{l+n+1};\ldots;x_m\rbrack); \ldots; \qquad\\ (\lbrack p_1;\ldots;p_k;x_{m-n+1};x_{m-n+2};\ldots;x_{m}\rbrack, \lbrack x_1;\ldots;x_l;x_{l+1};\ldots;x_{m-n}\rbrack) \rbrack \end{multline} where the order of the~$\lbrack x_1;x_2;\ldots;x_m\rbrack$ is maintained in the partitions. Variations on this multiple recursion idiom are used many times below. *) let rec split' n rev_part rev_head = function | [] -> [] | x :: tail -> let rev_part' = x :: rev_part and parts = split' n rev_part (x :: rev_head) tail in if n < 1 then failwith "Combinatorics.split': can't happen" else if n = 1 then (List.rev rev_part', List.rev_append rev_head tail) :: parts else split' (pred n) rev_part' rev_head tail @ parts (* Kick off the recursion for $0 (b, a)) (split' (abs_l - n) [] [] l) (* Check the arguments and call the workhorse: *) let ordered_split n l = let abs_l = List.length l in if n < 0 || n > abs_l then invalid_arg "Combinatorics.ordered_split" else ordered_split_unsafe n abs_l l (* Handle equipartitions specially: *) let split n l = let abs_l = List.length l in if n < 0 || n > abs_l then invalid_arg "Combinatorics.split" else begin if 2 * n = abs_l then match l with | [] -> failwith "Combinatorics.split: can't happen" | x :: tail -> List.map (fun (p1, p2) -> (x :: p1, p2)) (split' (pred n) [] [] tail) else ordered_split_unsafe n abs_l l end (* If we chop off parts repeatedly, we can either keep permutations or suppress them. Generically, [attach_to_fst] has type \begin{quote} [('a * 'b) list -> 'a list -> ('a list * 'b) list -> ('a list * 'b) list] \end{quote} and semantics \begin{multline} \ocwlowerid{attach\_to\_fst} (\lbrack (a_1,b_1),(a_2,b_2),\ldots,(a_m,b_m)\rbrack, \lbrack a'_1,a'_2,\ldots\rbrack) = \\ \lbrack (\lbrack a_1,a'_1,\ldots\rbrack, b_1), (\lbrack a_2,a'_1,\ldots\rbrack, b_2),\ldots, (\lbrack a_m,a'_1,\ldots\rbrack, b_m)\rbrack \end{multline} (where some of the result can be filtered out), assumed to be prepended to the final argument. *) let rec multi_split' attach_to_fst n size splits = if n <= 0 then splits else multi_split' attach_to_fst (pred n) size (List.fold_left (fun acc (parts, tail) -> attach_to_fst (ordered_split size tail) parts acc) [] splits) let attach_to_fst_unsorted splits parts acc = List.fold_left (fun acc' (p, rest) -> (p :: parts, rest) :: acc') acc splits (* Similarly, if the secod argument is a list of lists: *) let prepend_to_fst_unsorted splits parts acc = List.fold_left (fun acc' (p, rest) -> (p @ parts, rest) :: acc') acc splits let attach_to_fst_sorted splits parts acc = match parts with | [] -> List.fold_left (fun acc' (p, rest) -> ([p], rest) :: acc') acc splits | p :: _ as parts -> List.fold_left (fun acc' (p', rest) -> if p' > p then (p' :: parts, rest) :: acc' else acc') acc splits let multi_split n size l = multi_split' attach_to_fst_sorted n size [([], l)] let ordered_multi_split n size l = multi_split' attach_to_fst_unsorted n size [([], l)] let rec partitions' splits = function | [] -> List.map (fun (h, r) -> (List.rev h, r)) splits | (1, size) :: more -> partitions' (List.fold_left (fun acc (parts, rest) -> attach_to_fst_unsorted (split size rest) parts acc) [] splits) more | (n, size) :: more -> partitions' (List.fold_left (fun acc (parts, rest) -> prepend_to_fst_unsorted (multi_split n size rest) parts acc) [] splits) more let partitions multiplicities l = if List.fold_left (+) 0 multiplicities <> List.length l then invalid_arg "Combinatorics.partitions" else List.map fst (partitions' [([], l)] (ThoList.classify (List.sort compare multiplicities))) let rec ordered_partitions' splits = function | [] -> List.map (fun (h, r) -> (List.rev h, r)) splits | size :: more -> ordered_partitions' (List.fold_left (fun acc (parts, rest) -> attach_to_fst_unsorted (ordered_split size rest) parts acc) [] splits) more let ordered_partitions multiplicities l = if List.fold_left (+) 0 multiplicities <> List.length l then invalid_arg "Combinatorics.ordered_partitions" else List.map fst (ordered_partitions' [([], l)] multiplicities) let hdtl = function | [] -> invalid_arg "Combinatorics.hdtl" | h :: t -> (h, t) let factorized_partitions multiplicities l = ThoList.factorize (List.map hdtl (partitions multiplicities l)) (* In order to construct keystones (cf.~chapter~\ref{sec:topology}), we must eliminate reflectionsc consistently. For this to work, the lengths of the parts \emph{must not} be reordered arbitrarily. Ordering with monotonously fallings lengths would be incorrect however, because then some remainders could fake a reflection symmetry and partitions would be dropped erroneously. Therefore we put the longest first and order the remaining with rising lengths: *) let longest_first l = match ThoList.classify (List.sort (fun n1 n2 -> compare n2 n1) l) with | [] -> [] | longest :: rest -> longest :: List.rev rest let keystones multiplicities l = if List.fold_left (+) 0 multiplicities <> List.length l then invalid_arg "Combinatorics.keystones" else List.map fst (partitions' [([], l)] (longest_first multiplicities)) let factorized_keystones multiplicities l = ThoList.factorize (List.map hdtl (keystones multiplicities l)) (* \thocwmodulesection{Choices} *) (* The implementation is very similar to [split'], but here we don't have to keep track of the complements of the chosen sets. *) let rec choose' n rev_choice = function | [] -> [] | x :: tail -> let rev_choice' = x :: rev_choice and choices = choose' n rev_choice tail in if n < 1 then failwith "Combinatorics.choose': can't happen" else if n = 1 then List.rev rev_choice' :: choices else choose' (pred n) rev_choice' tail @ choices (* [choose n] is equivalent to $(\ocwlowerid{List.map}\,\ocwlowerid{fst})\circ (\ocwlowerid{split\_ordered}\,\ocwlowerid{n})$, but more efficient. *) let choose n l = let abs_l = List.length l in if n < 0 then invalid_arg "Combinatorics.choose" else if n > abs_l then [] else if n = 0 then [[]] else if n = abs_l then [l] else choose' n [] l let multi_choose n size l = List.map fst (multi_split n size l) let ordered_multi_choose n size l = List.map fst (ordered_multi_split n size l) (* \thocwmodulesection{Permutations} *) let rec insert x = function | [] -> [[x]] | h :: t as l -> (x :: l) :: List.rev_map (fun l' -> h :: l') (insert x t) let permute l = List.fold_left (fun acc x -> ThoList.rev_flatmap (insert x) acc) [[]] l (* \thocwmodulesubsection{Graded Permutations} *) let rec insert_signed x = function | (eps, []) -> [(eps, [x])] | (eps, h :: t) -> (eps, x :: h :: t) :: (List.map (fun (eps', l') -> (-eps', h :: l')) (insert_signed x (eps, t))) let rec permute_signed' = function | (eps, []) -> [(eps, [])] | (eps, h :: t) -> ThoList.flatmap (insert_signed h) (permute_signed' (eps, t)) let permute_signed l = permute_signed' (1, l) (* The following are wasting at most a factor of two and there's probably no point in improving on this \ldots *) let filter_sign s l = List.map snd (List.filter (fun (eps, _) -> eps = s) l) let permute_even l = filter_sign 1 (permute_signed l) let permute_odd l = filter_sign (-1) (permute_signed l) +(* \begin{dubious} + We have a slight inconsistency here: + [permute [] = [[]]], while + [permute_cyclic [] = []]. + I don't know if it is worth fixing. + \end{dubious} *) + let permute_cyclic l = let rec permute_cyclic' acc l1 = function | [] -> List.rev acc | x :: rest as l2 -> permute_cyclic' ((l2 @ List.rev l1) :: acc) (x :: l1) rest in permute_cyclic' [] [] l (* \thocwmodulesubsection{Tensor Products of Permutations} *) let permute_tensor ll = Product.list (fun l -> l) (List.map permute ll) let join_signs l = let el, pl = List.split l in (List.fold_left (fun acc x -> x * acc) 1 el, pl) let permute_tensor_signed ll = Product.list join_signs (List.map permute_signed ll) let permute_tensor_even l = filter_sign 1 (permute_tensor_signed l) let permute_tensor_odd l = filter_sign (-1) (permute_tensor_signed l) (* \thocwmodulesubsection{Sorting} *) let insert_inorder_signed order x (eps, l) = let rec insert eps' accu = function | [] -> (eps * eps', List.rev_append accu [x]) | h :: t -> if order x h = 0 then invalid_arg "Combinatorics.insert_inorder_signed: identical elements" else if order x h < 0 then (eps * eps', List.rev_append accu (x :: h :: t)) else insert (-eps') (h::accu) t in insert 1 [] l let sort_signed ?(cmp=Pervasives.compare) l = List.fold_right (insert_inorder_signed cmp) l (1, []) let sign ?(cmp=Pervasives.compare) l = let eps, _ = sort_signed ~cmp l in eps let sign2 ?(cmp=Pervasives.compare) l = let a = Array.of_list l in let eps = ref 1 in for j = 0 to Array.length a - 1 do for i = 0 to j - 1 do if cmp a.(i) a.(j) > 0 then eps := - !eps done done; !eps module Test = struct open OUnit + let to_string = + ThoList.to_string (ThoList.to_string string_of_int) + + let assert_equal_perms = + assert_equal ~printer:to_string + + let count_permutations n = + let factorial_n = factorial n + and range = ThoList.range 1 n in + let sorted = List.sort compare (permute range) in + (* Verify the count \ldots *) + assert_equal factorial_n (List.length sorted); + (* \ldots{} check that they're all different \ldots *) + assert_equal factorial_n (List.length (ThoList.uniq sorted)); + (* \ldots{} make sure that they a all permutations. *) + assert_equal_perms + [range] (ThoList.uniq (List.map (List.sort compare) sorted)) + let suite_permute = "permute" >::: - [ "cyclic []" >:: - (fun () -> assert_equal [] (permute_cyclic [])); + [ "permute []" >:: + (fun () -> + assert_equal_perms [[]] (permute [])); + "permute [1]" >:: + (fun () -> + assert_equal_perms [[1]] (permute [1])); + "permute [1;2;3]" >:: + (fun () -> + assert_equal_perms + [ [2; 3; 1]; [2; 1; 3]; [3; 2; 1]; + [1; 3; 2]; [1; 2; 3]; [3; 1; 2] ] + (permute [1; 2; 3])); + "permute [1;2;3;4]" >:: + (fun () -> + assert_equal_perms + [ [3; 4; 1; 2]; [3; 1; 2; 4]; [3; 1; 4; 2]; + [4; 3; 1; 2]; [1; 4; 2; 3]; [1; 2; 3; 4]; + [1; 2; 4; 3]; [4; 1; 2; 3]; [1; 4; 3; 2]; + [1; 3; 2; 4]; [1; 3; 4; 2]; [4; 1; 3; 2]; + [3; 4; 2; 1]; [3; 2; 1; 4]; [3; 2; 4; 1]; + [4; 3; 2; 1]; [2; 4; 1; 3]; [2; 1; 3; 4]; + [2; 1; 4; 3]; [4; 2; 1; 3]; [2; 4; 3; 1]; + [2; 3; 1; 4]; [2; 3; 4; 1]; [4; 2; 3; 1] ] + (permute [1; 2; 3; 4])); + "count permute 5" >:: + (fun () -> count_permutations 5); + "count permute 6" >:: + (fun () -> count_permutations 6); + "count permute 7" >:: + (fun () -> count_permutations 7); + "count permute 8" >:: + (fun () -> count_permutations 8); + "cyclic []" >:: + (fun () -> + assert_equal_perms [] (permute_cyclic [])); "cyclic [1]" >:: - (fun () -> assert_equal [[1]] (permute_cyclic [1])); + (fun () -> + assert_equal_perms [[1]] (permute_cyclic [1])); "cyclic [1;2;3]" >:: (fun () -> - assert_equal [[1;2;3]; [2;3;1]; [3;1;2]] (permute_cyclic [1;2;3])); + assert_equal_perms + [[1;2;3]; [2;3;1]; [3;1;2]] + (permute_cyclic [1;2;3])); "cyclic [1;2;3;4]" >:: (fun () -> - assert_equal + assert_equal_perms [[1;2;3;4]; [2;3;4;1]; [3;4;1;2]; [4;1;2;3]] (permute_cyclic [1;2;3;4]))] let sort_signed_not_unique = "not unique" >:: (fun () -> assert_raises (Invalid_argument "Combinatorics.insert_inorder_signed: identical elements") (fun () -> sort_signed [1;2;3;4;2])) let sort_signed_even = "even" >:: (fun () -> assert_equal (1, [1;2;3;4;5;6]) (sort_signed [1;2;4;3;6;5])) let sort_signed_odd = "odd" >:: (fun () -> assert_equal (-1, [1;2;3;4;5;6]) (sort_signed [2;3;1;5;4;6])) let sort_signed_all = "all" >:: (fun () -> let l = ThoList.range 1 8 in assert_bool "all signed permutations" (List.for_all (fun (eps, p) -> let eps', p' = sort_signed p in eps' = eps && p' = l) (permute_signed l))) let sign_sign2 = "sign/sign2" >:: (fun () -> let l = ThoList.range 1 8 in assert_bool "all permutations" (List.for_all (fun p -> sign p = sign2 p) (permute l))) let suite_sort_signed = "sort_signed" >::: [sort_signed_not_unique; sort_signed_even; sort_signed_odd; sort_signed_all; sign_sign2] let suite = "Combinatorics" >::: [suite_permute; suite_sort_signed] end (*i * Local Variables: * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/omega_NMSSM.ml =================================================================== --- trunk/omega/src/omega_NMSSM.ml (revision 8274) +++ trunk/omega/src/omega_NMSSM.ml (revision 8275) @@ -1,35 +1,35 @@ (* omega_NMSSM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23_Majorana)(Targets.Fortran_Majorana) +module O = Omega.Make(Fusion_vintage.Mixed23_Majorana)(Targets.Fortran_Majorana) (Modellib_NMSSM.NMSSM_func(Modellib_NMSSM.NMSSM)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/omega_UFO_Majorana.ml =================================================================== --- trunk/omega/src/omega_UFO_Majorana.ml (revision 0) +++ trunk/omega/src/omega_UFO_Majorana.ml (revision 8275) @@ -0,0 +1,42 @@ +(* omega_UFO_Majorana.ml -- + + Copyright (C) 1999-2019 by + + Wolfgang Kilian + Thorsten Ohl + Juergen Reuter + with contributions from + Christian Speckner + + WHIZARD is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + WHIZARD is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) + +module Bound (M : Model.T) : Tuple.Bound = + struct + (* \begin{dubious} + Above [max_degree = 6], the performance drops \emph{dramatically}! + \end{dubious} *) + let max_arity () = + pred (M.max_degree ()) + end + +module O = Omega.Make(Fusion.Nary_Majorana(Bound(UFO.Model)))(Targets.Fortran_Majorana)(UFO.Model) +let _ = O.main () + +(*i + * Local Variables: + * indent-tabs-mode:nil + * page-delimiter:"^(\\* .*\n" + * End: +i*) Index: trunk/omega/src/omega_MSSM_Hgg.ml =================================================================== --- trunk/omega/src/omega_MSSM_Hgg.ml (revision 8274) +++ trunk/omega/src/omega_MSSM_Hgg.ml (revision 8275) @@ -1,35 +1,35 @@ (* omega_MSSM_Hgg.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23_Majorana)(Targets.Fortran_Majorana) +module O = Omega.Make(Fusion_vintage.Mixed23_Majorana)(Targets.Fortran_Majorana) (Modellib_MSSM.MSSM(Modellib_MSSM.MSSM_Hgg)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/modellib_BSM.ml =================================================================== --- trunk/omega/src/modellib_BSM.ml (revision 8274) +++ trunk/omega/src/modellib_BSM.ml (revision 8275) @@ -1,15201 +1,15225 @@ (* modellib_BSM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from cf. main AUTHORS file WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Littlest Higgs Model} *) module type BSM_flags = sig val u1_gauged : bool val anom_ferm_ass : bool end module BSM_bsm : BSM_flags = struct let u1_gauged = true let anom_ferm_ass = false end module BSM_ungauged : BSM_flags = struct let u1_gauged = false let anom_ferm_ass = false end module BSM_anom : BSM_flags = struct let u1_gauged = false let anom_ferm_ass = true end module Littlest (Flags : BSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme" ] let gauge_symbol () = failwith "Modellib_BSM.Littlest.gauge_symbol: internal error" type matter_field = L of int | N of int | U of int | D of int | TopH | TopHb type gauge_boson = Ga | Wp | Wm | Z | Gl | WHp | WHm | ZH | AH type other = Phip | Phim | Phi0 | H | Eta | Psi0 | Psi1 | Psip | Psim | Psipp | Psimm type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.Littlest.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] (* Since [Phi] already belongs to the EW Goldstone bosons we use [Psi] for the TeV scale complex triplet. *) let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Heavy Quarks", List.map matter_field [TopH; TopHb]; "Heavy Scalars", List.map other [Psi0; Psi1; Psip; Psim; Psipp; Psimm]; "Gauge Bosons", List.map gauge_boson (if Flags.u1_gauged then [Ga; Z; Wp; Wm; Gl; WHp; WHm; ZH; AH] else [Ga; Z; Wp; Wm; Gl; WHp; WHm; ZH]); "Higgs", List.map other (if Flags.u1_gauged then [H] else [H; Eta]); "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n | TopH -> Spinor | TopHb -> ConjSpinor end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z | WHp | WHm | ZH | AH -> Massive_Vector end | O f -> begin match f with | Phip | Phim | Phi0 | H | Eta | Psi0 | Psi1 | Psip | Psim | Psipp | Psimm -> Scalar end let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | M TopH -> Color.SUN 3 | M TopHb -> Color.SUN (-3) | G Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n | TopH -> Prop_Spinor | TopHb -> Prop_ConjSpinor end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z | WHp | WHm | ZH | AH -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H | Eta | Psi0 | Psi1 | Psip | Psim | Psipp | Psimm -> Prop_Scalar end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) | G WHp | G WHm | G ZH | G AH | M TopH | M TopHb -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) | TopH -> TopHb | TopHb -> TopH end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp | WHm -> WHp | WHp -> WHm | ZH -> ZH | AH -> AH end) | O f -> O (begin match f with | Psi0 -> Psi0 | Psi1 -> Psi1 | Psip -> Psim | Psim -> Psip | Psipp -> Psimm | Psimm -> Psipp | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | Eta -> Eta end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 | TopH -> 1 | TopHb -> -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm | WHp | WHm | AH | ZH -> 0 end | O f -> begin match f with | Psi0 | Psi1 | Psip | Psim | Psipp | Psimm | Phip | Phim | Phi0 | H | Eta -> 0 end (* This model does NOT have a conserved generation charge even in absence of CKM mixing because of the heavy top admixture. *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 | TopH -> 2//3 | TopHb -> -2//3 end | G f -> begin match f with | Gl | Ga | Z | AH | ZH -> 0//1 | Wp | WHp -> 1//1 | Wm | WHm -> -1//1 end | O f -> begin match f with | H | Phi0 | Eta | Psi1 | Psi0 -> 0//1 | Phip | Psip -> 1//1 | Phim | Psim -> -1//1 | Psipp -> 2//1 | Psimm -> -2//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ | _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 | TopH -> 1//1 | TopHb -> -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | VHeavy | Supp | Supp2 | Sinpsi | Cospsi | Atpsi | Sccs (* Mixing angles of SU(2) *) | Q_lepton | Q_up | Q_down | Q_Z_up | G_CC | G_CCtop | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_NC_heavy | G_NC_h_neutrino | G_NC_h_lepton | G_NC_h_up | G_NC_h_down | G_CC_heavy | G_ZHTHT | G_ZTHT | G_AHTHTH | G_AHTHT | G_AHTT | G_CC_WH | G_CC_W | I_Q_W | I_G_ZWW | I_G_WWW | I_G_AHWW | I_G_ZHWW | I_G_ZWHW | I_G_AHWHWH | I_G_ZHWHWH | I_G_AHWHW | I_Q_H | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_WH4 | G_WHWHWW | G_WHWWW | G_WH3W | G_WWAAH | G_WWAZH | G_WWZZH | G_WWZAH | G_WHWHAAH | G_WHWHAZH | G_WHWHZZH | G_WHWHZAH | G_WWZHAH | G_WHWHZHAH | G_WHWZZ | G_WHWAZ | G_WHWAAH | G_WHWZAH | G_WHWZHZH | G_WHWZHAH | G_WHWAZH | G_WHWZZH | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_PsiWW | G_PsiWHW | G_PsiZZ | G_PsiZHZH | G_PsiZHZ | G_PsiZAH | G_PsiZHAH | G_PsiAHAH | G_PsiZW | G_PsiZWH | G_PsiAHW | G_PsiAHWH | G_PsiZHW | G_PsiZHWH | G_PsippWW | G_PsippWHW | G_PsippWHWH | G_PsiHW | G_PsiHWH | G_Psi0W | G_Psi0WH | G_Psi1W | G_Psi1WH | G_PsiPPW | G_PsiPPWH | G_Psi1HAH | G_Psi01AH | G_AHPsip | G_Psi1HZ | G_Psi1HZH | G_Psi01Z | G_Psi01ZH | G_ZPsip | G_ZPsipp | G_ZHPsipp | G_HHAA | G_HHWHW | G_HHZHZ | G_HHAHZ | G_HHZHAH | G_HPsi0WW | G_HPsi0WHW | G_HPsi0ZZ | G_HPsi0ZHZH | G_HPsi0ZHZ | G_HPsi0AHAH | G_HPsi0ZAH | G_HPsi0ZHAH | G_HPsipWA | G_HPsipWHA | G_HPsipWZ | G_HPsipWHZ | G_HPsipWAH | G_HPsipWHAH | G_HPsipWZH | G_HPsipWHZH | G_HPsippWW | G_HPsippWHWH | G_HPsippWHW | G_Psi00ZH | G_Psi00AH | G_Psi00ZHAH | G_Psi0pWA | G_Psi0pWHA | G_Psi0pWZ | G_Psi0pWHZ | G_Psi0pWAH | G_Psi0pWHAH | G_Psi0pWZH | G_Psi0pWHZH | G_Psi0ppWW | G_Psi0ppWHWH | G_Psi0ppWHW | I_G_Psi0pWA | I_G_Psi0pWHA | I_G_Psi0pWZ | I_G_Psi0pWHZ | I_G_Psi0pWAH | I_G_Psi0pWHAH | I_G_Psi0pWZH | I_G_Psi0pWHZH | I_G_Psi0ppWW | I_G_Psi0ppWHWH | I_G_Psi0ppWHW | G_PsippZZ | G_PsippZHZH | G_PsippAZ | G_PsippAAH | G_PsippZAH | G_PsippWA | G_PsippWHA | G_PsippWZ | G_PsippWHZ | G_PsippWAH | G_PsippWHAH | G_PsippWZH | G_PsippWHZH | G_PsiccZZ | G_PsiccAZ | G_PsiccAAH | G_PsiccZZH | G_PsiccAZH | G_PsiccZAH | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_H3 | G_H4 | G_Hthth | G_Htht | G_Ethth | G_Etht | G_Ett | G_HHtt | G_HHthth | G_HHtht | G_Psi0tt | G_Psi0bb | G_Psi0cc | G_Psi0tautau | G_Psi1tt | G_Psi1bb | G_Psi1cc | G_Psi1tautau | G_Psipq3 | G_Psipq2 | G_Psipl3 | G_Psi0tth | G_Psi1tth | G_Psipbth | G_Ebb | G_HGaGa | G_HGaZ | G_EGaGa | G_EGaZ | G_EGlGl | Gs | I_Gs | G2 | G_HWHW | G_HWHWH | G_HAHAH | G_HZHZ | G_HZHAH | G_HAHZ | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)); - nc_coupling G_NC_h_neutrino half (Const 0); - nc_coupling G_NC_h_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_h_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_h_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)); + nc_coupling G_NC_h_neutrino half (Integer 0); + nc_coupling G_NC_h_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_h_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_h_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mhm ((m1, h, m2), fbf, c) = ((M m1, O h, M m2), fbf, c) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let hgg ((h, g1, g2), coup, c) = ((O h, G g1, G g2), coup, c) let ghh ((g, h1, h2), coup, c) = ((G g, O h1, O h2), coup, c) let hhgg ((h1, h2, g1, g2), coup, c) = ((O h1, O h2, G g1, G g2), coup, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* The sign of this coupling is just the one of the T3, being -(1/2) for leptons and down quarks, and +(1/2) for neutrinos and up quarks. *) let neutral_heavy_currents n = List.map mgm ([ ((L (-n), ZH, L n), FBF ((-1), Psibar, VL, Psi), G_NC_heavy); ((N (-n), ZH, N n), FBF (1, Psibar, VL, Psi), G_NC_heavy); ((U (-n), ZH, U n), FBF (1, Psibar, VL, Psi), G_NC_heavy); ((D (-n), ZH, D n), FBF ((-1), Psibar, VL, Psi), G_NC_heavy)] @ (if Flags.u1_gauged then [ ((L (-n), AH, L n), FBF (1, Psibar, VA, Psi), G_NC_h_lepton); ((N (-n), AH, N n), FBF (1, Psibar, VA, Psi), G_NC_h_neutrino); ((D (-n), AH, D n), FBF (1, Psibar, VA, Psi), G_NC_h_down)] else [])) let color_currents n = List.map mgm [ ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs); ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs)] let heavy_top_currents = List.map mgm ([ ((TopHb, Ga, TopH), FBF (1, Psibar, V, Psi), Q_up); ((TopHb, Z, TopH), FBF (1, Psibar, V, Psi), Q_Z_up); ((TopHb, Gl, TopH), FBF (1, Psibar, V, Psi), Gs); ((TopHb, Z, U 3), FBF (1, Psibar, VL, Psi), G_ZTHT); ((U (-3), Z, TopH), FBF (1, Psibar, VL, Psi), G_ZTHT); ((TopHb, ZH, U 3), FBF (1, Psibar, VL, Psi), G_ZHTHT); ((U (-3), ZH, TopH), FBF (1, Psibar, VL, Psi), G_ZHTHT); ((U (-3), Wp, D 3), FBF (1, Psibar, VL, Psi), G_CCtop); ((D (-3), Wm, U 3), FBF (1, Psibar, VL, Psi), G_CCtop); ((TopHb, WHp, D 3), FBF (1, Psibar, VL, Psi), G_CC_WH); ((D (-3), WHm, TopH), FBF (1, Psibar, VL, Psi), G_CC_WH); ((TopHb, Wp, D 3), FBF (1, Psibar, VL, Psi), G_CC_W); ((D (-3), Wm, TopH), FBF (1, Psibar, VL, Psi), G_CC_W)] @ (if Flags.u1_gauged then [ ((U (-3), AH, U 3), FBF (1, Psibar, VA, Psi), G_AHTT); ((TopHb, AH, TopH), FBF (1, Psibar, VA, Psi), G_AHTHTH); ((TopHb, AH, U 3), FBF (1, Psibar, VR, Psi), G_AHTHT); ((U (-3), AH, TopH), FBF (1, Psibar, VR, Psi), G_AHTHT)] else [])) (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_heavy_currents n = List.map mgm ([ ((L (-n), WHm, N n), FBF (1, Psibar, VL, Psi), G_CC_heavy); ((N (-n), WHp, L n), FBF (1, Psibar, VL, Psi), G_CC_heavy); ((D (-n), WHm, U n), FBF (1, Psibar, VL, Psi), G_CC_heavy); ((U (-n), WHp, D n), FBF (1, Psibar, VL, Psi), G_CC_heavy)] @ (if Flags.u1_gauged then [ ((U (-n), AH, U n), FBF (1, Psibar, VA, Psi), G_NC_h_up)] else [])) (* We specialize the third generation since there is an additional shift coming from the admixture of the heavy top quark. The universal shift, coming from the mixing in the non-Abelian gauge boson sector is unobservable. (Redefinition of coupling constants by measured ones. *) let yukawa = List.map mhm [ ((U (-3), H, U 3), FBF (1, Psibar, S, Psi), G_Htt); ((D (-3), H, D 3), FBF (1, Psibar, S, Psi), G_Hbb); ((U (-2), H, U 2), FBF (1, Psibar, S, Psi), G_Hcc); ((L (-3), H, L 3), FBF (1, Psibar, S, Psi), G_Htautau)] let yukawa_add' = List.map mhm [ ((TopHb, H, TopH), FBF (1, Psibar, S, Psi), G_Hthth); ((TopHb, H, U 3), FBF (1, Psibar, SLR, Psi), G_Htht); ((U (-3), H, TopH), FBF (1, Psibar, SLR, Psi), G_Htht); ((U (-3), Psi0, U 3), FBF (1, Psibar, S, Psi), G_Psi0tt); ((D (-3), Psi0, D 3), FBF (1, Psibar, S, Psi), G_Psi0bb); ((U (-2), Psi0, U 2), FBF (1, Psibar, S, Psi), G_Psi0cc); ((L (-3), Psi0, L 3), FBF (1, Psibar, S, Psi), G_Psi0tautau); ((U (-3), Psi1, U 3), FBF (1, Psibar, P, Psi), G_Psi1tt); ((D (-3), Psi1, D 3), FBF (1, Psibar, P, Psi), G_Psi1bb); ((U (-2), Psi1, U 2), FBF (1, Psibar, P, Psi), G_Psi1cc); ((L (-3), Psi1, L 3), FBF (1, Psibar, P, Psi), G_Psi1tautau); ((U (-3), Psip, D 3), FBF (1, Psibar, SLR, Psi), G_Psipq3); ((U (-2), Psip, D 2), FBF (1, Psibar, SLR, Psi), G_Psipq2); ((N (-3), Psip, L 3), FBF (1, Psibar, SR, Psi), G_Psipl3); ((D (-3), Psim, U 3), FBF (1, Psibar, SLR, Psi), G_Psipq3); ((D (-2), Psim, U 2), FBF (1, Psibar, SLR, Psi), G_Psipq2); ((L (-3), Psim, N 3), FBF (1, Psibar, SL, Psi), G_Psipl3); ((TopHb, Psi0, U 3), FBF (1, Psibar, SL, Psi), G_Psi0tth); ((U (-3), Psi0, TopH), FBF (1, Psibar, SR, Psi), G_Psi0tth); ((TopHb, Psi1, U 3), FBF (1, Psibar, SL, Psi), G_Psi1tth); ((U (-3), Psi1, TopH), FBF (1, Psibar, SR, Psi), G_Psi1tth); ((TopHb, Psip, D 3), FBF (1, Psibar, SL, Psi), G_Psipbth); ((D (-3), Psim, TopH), FBF (1, Psibar, SR, Psi), G_Psipbth)] let yukawa_add = if Flags.u1_gauged then yukawa_add' else yukawa_add' @ List.map mhm [ ((U (-3), Eta, U 3), FBF (1, Psibar, P, Psi), G_Ett); ((TopHb, Eta, U 3), FBF (1, Psibar, SLR, Psi), G_Etht); ((D (-3), Eta, D 3), FBF (1, Psibar, P, Psi), G_Ebb); ((U (-3), Eta, TopH), FBF (1, Psibar, SLR, Psi), G_Etht)] (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let standard_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs) ] let heavy_triple_gauge = List.map tgc ([ ((Ga, WHm, WHp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, WHm, WHp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((ZH, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZHWW); ((Z, WHm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWHW); ((Z, Wm, WHp), Gauge_Gauge_Gauge (-1), I_G_ZWHW); ((ZH, WHm, Wp), Gauge_Gauge_Gauge 1, I_G_WWW); ((ZH, Wm, WHp), Gauge_Gauge_Gauge (-1), I_G_WWW); ((ZH, WHm, WHp), Gauge_Gauge_Gauge (-1), I_G_ZHWHWH)] @ (if Flags.u1_gauged then [ ((AH, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_AHWW); ((AH, WHm, Wp), Gauge_Gauge_Gauge 1, I_G_AHWHW); ((AH, Wm, WHp), Gauge_Gauge_Gauge (-1), I_G_AHWHW); ((AH, WHm, WHp), Gauge_Gauge_Gauge 1, I_G_AHWHWH)] else [])) let triple_gauge = standard_triple_gauge @ heavy_triple_gauge let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2 ] let heavy_quartic_gauge = List.map qgc ([ (WHm, Wp, WHm, Wp), gauge4, G_WWWW; (Wm, WHp, Wm, WHp), gauge4, G_WWWW; (WHm, WHp, WHm, WHp), gauge4, G_WH4; (Wm, Wp, WHm, WHp), gauge4, G_WHWHWW; (Wm, Wp, Wm, WHp), gauge4, G_WHWWW; (Wm, Wp, WHm, Wp), gauge4, G_WHWWW; (WHm, WHp, Wm, WHp), gauge4, G_WH3W; (WHm, WHp, WHm, Wp), gauge4, G_WH3W; (WHm, Z, WHp, Z), minus_gauge4, G_ZZWW; (WHm, Z, WHp, Ga), minus_gauge4, G_AZWW; (WHm, Ga, WHp, ZH), minus_gauge4, G_AAWW; (WHm, Z, WHp, ZH), minus_gauge4, G_ZZWW; (Wm, ZH, Wp, ZH), minus_gauge4, G_WWWW; (Wm, Ga, Wp, ZH), minus_gauge4, G_WWAZH; (Wm, Z, Wp, ZH), minus_gauge4, G_WWZZH; (WHm, Ga, WHp, ZH), minus_gauge4, G_WHWHAZH; (WHm, Z, WHp, ZH), minus_gauge4, G_WHWHZZH; (WHm, ZH, WHp, ZH), minus_gauge4, G_WH4; (WHm, Z, Wp, Z), minus_gauge4, G_WHWZZ; (Wm, Z, WHp, Z), minus_gauge4, G_WHWZZ; (WHm, Ga, Wp, Z), minus_gauge4, G_WHWAZ; (Wm, Ga, WHp, Z), minus_gauge4, G_WHWAZ; (WHm, ZH, Wp, ZH), minus_gauge4, G_WHWZHZH; (Wm, ZH, WHp, ZH), minus_gauge4, G_WHWZHZH; (WHm, Ga, Wp, ZH), minus_gauge4, G_WHWAZH; (Wm, Ga, WHp, ZH), minus_gauge4, G_WHWAZH; (WHm, Z, Wp, ZH), minus_gauge4, G_WHWZZH; (Wm, Z, WHp, ZH), minus_gauge4, G_WHWZZH] @ (if Flags.u1_gauged then [ (Wm, Ga, Wp, AH), minus_gauge4, G_WWAAH; (Wm, Z, Wp, AH), minus_gauge4, G_WWZAH; (WHm, Ga, WHp, AH), minus_gauge4, G_WHWHAAH; (WHm, Z, WHp, AH), minus_gauge4, G_WHWHZAH; (Wm, ZH, Wp, AH), minus_gauge4, G_WWZHAH; (WHm, ZH, WHp, AH), minus_gauge4, G_WHWHZHAH; (WHm, Ga, Wp, AH), minus_gauge4, G_WHWAAH; (Wm, Ga, WHp, AH), minus_gauge4, G_WHWAAH; (WHm, Z, Wp, AH), minus_gauge4, G_WHWZAH; (Wm, Z, WHp, AH), minus_gauge4, G_WHWZAH; (WHm, ZH, Wp, AH), minus_gauge4, G_WHWZHAH; (Wm, ZH, WHp, AH), minus_gauge4, G_WHWZHAH] else [])) let quartic_gauge = standard_quartic_gauge @ heavy_quartic_gauge let standard_gauge_higgs' = List.map hgg [ ((H, Wp, Wm), Scalar_Vector_Vector 1, G_HWW); ((H, Z, Z), Scalar_Vector_Vector 1, G_HZZ) ] let heavy_gauge_higgs = List.map hgg ([ ((H, Wp, WHm), Scalar_Vector_Vector 1, G_HWHW); ((H, WHp, Wm), Scalar_Vector_Vector 1, G_HWHW); ((H, WHp, WHm), Scalar_Vector_Vector 1, G_HWHWH); ((H, ZH, ZH), Scalar_Vector_Vector 1, G_HWHWH); ((H, ZH, Z), Scalar_Vector_Vector 1, G_HZHZ); ((H, Wp, Wm), Scalar_Vector_Vector 1, G_HZHAH)] @ (if Flags.u1_gauged then [((H, AH, AH), Scalar_Vector_Vector 1, G_HAHAH); ((H, Z, AH), Scalar_Vector_Vector 1, G_HAHZ)] else [])) let triplet_gauge_higgs = List.map hgg ([ ((Psi0, Wp, Wm), Scalar_Vector_Vector 1, G_PsiWW); ((Psi0, WHp, WHm), Scalar_Vector_Vector (-1), G_PsiWW); ((Psi0, WHp, Wm), Scalar_Vector_Vector 1, G_PsiWHW); ((Psi0, WHm, Wp), Scalar_Vector_Vector 1, G_PsiWHW); ((Psi0, Z, Z), Scalar_Vector_Vector 1, G_PsiZZ); ((Psi0, ZH, ZH), Scalar_Vector_Vector 1, G_PsiZHZH); ((Psi0, ZH, Z), Scalar_Vector_Vector 1, G_PsiZHZ); ((Psim, Wp, Z), Scalar_Vector_Vector 1, G_PsiZW); ((Psip, Wm, Z), Scalar_Vector_Vector 1, G_PsiZW); ((Psim, WHp, Z), Scalar_Vector_Vector 1, G_PsiZWH); ((Psip, WHm, Z), Scalar_Vector_Vector 1, G_PsiZWH); ((Psim, Wp, ZH), Scalar_Vector_Vector 1, G_PsiZHW); ((Psip, Wm, ZH), Scalar_Vector_Vector 1, G_PsiZHW); ((Psim, WHp, ZH), Scalar_Vector_Vector 1, G_PsiZHWH); ((Psip, WHm, ZH), Scalar_Vector_Vector 1, G_PsiZHWH); ((Psimm, Wp, Wp), Scalar_Vector_Vector 1, G_PsippWW); ((Psipp, Wm, Wm), Scalar_Vector_Vector 1, G_PsippWW); ((Psimm, WHp, Wp), Scalar_Vector_Vector 1, G_PsippWHW); ((Psipp, WHm, Wm), Scalar_Vector_Vector 1, G_PsippWHW); ((Psimm, WHp, WHp), Scalar_Vector_Vector 1, G_PsippWHWH); ((Psipp, WHm, WHm), Scalar_Vector_Vector 1, G_PsippWHWH)] @ (if Flags.u1_gauged then [((Psi0, AH, Z), Scalar_Vector_Vector 1, G_PsiZAH); ((Psi0, AH, ZH), Scalar_Vector_Vector 1, G_PsiZHAH); ((Psi0, AH, AH), Scalar_Vector_Vector 1, G_PsiAHAH); ((Psim, Wp, AH), Scalar_Vector_Vector 1, G_PsiAHW); ((Psip, Wm, AH), Scalar_Vector_Vector 1, G_PsiAHW); ((Psim, WHp, AH), Scalar_Vector_Vector 1, G_PsiAHWH); ((Psip, WHm, AH), Scalar_Vector_Vector 1, G_PsiAHWH)] else [])) let triplet_gauge2_higgs = List.map ghh ([ ((Wp, H, Psim), Vector_Scalar_Scalar 1, G_PsiHW); ((Wm, H, Psip), Vector_Scalar_Scalar 1, G_PsiHW); ((WHp, H, Psim), Vector_Scalar_Scalar 1, G_PsiHWH); ((WHm, H, Psip), Vector_Scalar_Scalar 1, G_PsiHWH); ((Wp, Psi0, Psim), Vector_Scalar_Scalar 1, G_Psi0W); ((Wm, Psi0, Psip), Vector_Scalar_Scalar 1, G_Psi0W); ((WHp, Psi0, Psim), Vector_Scalar_Scalar 1, G_Psi0WH); ((WHm, Psi0, Psip), Vector_Scalar_Scalar 1, G_Psi0WH); ((Wp, Psi1, Psim), Vector_Scalar_Scalar 1, G_Psi1W); ((Wm, Psi1, Psip), Vector_Scalar_Scalar (-1), G_Psi1W); ((WHp, Psi1, Psim), Vector_Scalar_Scalar 1, G_Psi1WH); ((WHm, Psi1, Psip), Vector_Scalar_Scalar (-1), G_Psi1WH); ((Wp, Psip, Psimm), Vector_Scalar_Scalar 1, G_PsiPPW); ((Wm, Psim, Psipp), Vector_Scalar_Scalar 1, G_PsiPPW); ((WHp, Psip, Psimm), Vector_Scalar_Scalar 1, G_PsiPPWH); ((WHm, Psim, Psipp), Vector_Scalar_Scalar 1, G_PsiPPWH); ((Ga, Psip, Psim), Vector_Scalar_Scalar 1, Q_lepton); ((Ga, Psipp, Psimm), Vector_Scalar_Scalar 2, Q_lepton); ((Z, H, Psi1), Vector_Scalar_Scalar 1, G_Psi1HZ); ((ZH, H, Psi1), Vector_Scalar_Scalar 1, G_Psi1HZH); ((Z, Psi0, Psi1), Vector_Scalar_Scalar 1, G_Psi01Z); ((ZH, Psi0, Psi1), Vector_Scalar_Scalar 1, G_Psi01ZH); ((Z, Psip, Psim), Vector_Scalar_Scalar 1, G_ZPsip); ((Z, Psipp, Psimm), Vector_Scalar_Scalar 2, G_ZPsipp); ((ZH, Psipp, Psimm), Vector_Scalar_Scalar 2, G_ZHPsipp)] @ (if Flags.u1_gauged then [((AH, H, Psi1), Vector_Scalar_Scalar 1, G_Psi1HAH); ((AH, Psi0, Psi1), Vector_Scalar_Scalar 1, G_Psi01AH); ((AH, Psip, Psim), Vector_Scalar_Scalar 1, G_AHPsip); ((AH, Psipp, Psimm), Vector_Scalar_Scalar 2, G_AHPsip)] else [])) let standard_gauge_higgs = standard_gauge_higgs' @ heavy_gauge_higgs @ triplet_gauge_higgs @ triplet_gauge2_higgs let standard_gauge_higgs4 = List.map hhgg [ (H, H, Wp, Wm), Scalar2_Vector2 1, G_HHWW; (H, H, Z, Z), Scalar2_Vector2 1, G_HHZZ ] let littlest_gauge_higgs4 = List.map hhgg ([ (H, H, WHp, WHm), Scalar2_Vector2 (-1), G_HHWW; (H, H, ZH, ZH), Scalar2_Vector2 (-1), G_HHWW; (H, H, Wp, WHm), Scalar2_Vector2 1, G_HHWHW; (H, H, WHp, Wm), Scalar2_Vector2 1, G_HHWHW; (H, H, ZH, Z), Scalar2_Vector2 (-1), G_HHZHZ; (H, Psi0, Wp, Wm), Scalar2_Vector2 1, G_HPsi0WW; (H, Psi0, WHp, WHm), Scalar2_Vector2 (-1), G_HPsi0WW; (H, Psi0, WHp, Wm), Scalar2_Vector2 1, G_HPsi0WHW; (H, Psi0, Wp, WHm), Scalar2_Vector2 1, G_HPsi0WHW; (H, Psi0, Z, Z), Scalar2_Vector2 1, G_HPsi0ZZ; (H, Psi0, ZH, ZH), Scalar2_Vector2 1, G_HPsi0ZHZH; (H, Psi0, ZH, Z), Scalar2_Vector2 1, G_HPsi0ZHZ; (H, Psim, Wp, Ga), Scalar2_Vector2 1, G_HPsipWA; (H, Psip, Wm, Ga), Scalar2_Vector2 1, G_HPsipWA; (H, Psim, WHp, Ga), Scalar2_Vector2 1, G_HPsipWHA; (H, Psip, WHm, Ga), Scalar2_Vector2 1, G_HPsipWHA; (H, Psim, Wp, Z), Scalar2_Vector2 1, G_HPsipWZ; (H, Psip, Wm, Z), Scalar2_Vector2 1, G_HPsipWZ; (H, Psim, WHp, Z), Scalar2_Vector2 1, G_HPsipWHZ; (H, Psip, WHm, Z), Scalar2_Vector2 1, G_HPsipWHZ; (H, Psim, Wp, ZH), Scalar2_Vector2 1, G_HPsipWZH; (H, Psip, Wm, ZH), Scalar2_Vector2 1, G_HPsipWZH; (H, Psim, WHp, ZH), Scalar2_Vector2 1, G_HPsipWHZH; (H, Psip, WHm, ZH), Scalar2_Vector2 1, G_HPsipWHZH; (H, Psimm, Wp, Wp), Scalar2_Vector2 1, G_HPsippWW; (H, Psipp, Wm, Wm), Scalar2_Vector2 1, G_HPsippWW; (H, Psimm, WHp, WHp), Scalar2_Vector2 1, G_HPsippWHWH; (H, Psipp, WHm, WHm), Scalar2_Vector2 1, G_HPsippWHWH; (H, Psimm, WHp, Wp), Scalar2_Vector2 1, G_HPsippWHW; (H, Psipp, WHm, Wm), Scalar2_Vector2 1, G_HPsippWHW; (Psi0, Psi0, Wp, Wm), Scalar2_Vector2 2, G_HHWW; (Psi0, Psi0, WHp, WHm), Scalar2_Vector2 (-2), G_HHWW; (Psi0, Psi0, Z, Z), Scalar2_Vector2 4, G_HHZZ; (Psi0, Psi0, ZH, ZH), Scalar2_Vector2 1, G_Psi00ZH; (Psi0, Psi0, WHp, Wm), Scalar2_Vector2 2, G_HHWHW; (Psi0, Psi0, Wp, WHm), Scalar2_Vector2 2, G_HHWHW; (Psi0, Psi0, Z, ZH), Scalar2_Vector2 4, G_HHZHZ; (Psi0, Psim, Wp, Ga), Scalar2_Vector2 1, G_Psi0pWA; (Psi0, Psip, Wm, Ga), Scalar2_Vector2 1, G_Psi0pWA; (Psi0, Psim, WHp, Ga), Scalar2_Vector2 1, G_Psi0pWHA; (Psi0, Psip, WHm, Ga), Scalar2_Vector2 1, G_Psi0pWHA; (Psi0, Psim, Wp, Z), Scalar2_Vector2 1, G_Psi0pWZ; (Psi0, Psip, Wm, Z), Scalar2_Vector2 1, G_Psi0pWZ; (Psi0, Psim, WHp, Z), Scalar2_Vector2 1, G_Psi0pWHZ; (Psi0, Psip, WHm, Z), Scalar2_Vector2 1, G_Psi0pWHZ; (Psi0, Psim, Wp, ZH), Scalar2_Vector2 1, G_Psi0pWZH; (Psi0, Psip, Wm, ZH), Scalar2_Vector2 1, G_Psi0pWZH; (Psi0, Psim, WHp, ZH), Scalar2_Vector2 1, G_Psi0pWHZH; (Psi0, Psip, WHm, ZH), Scalar2_Vector2 1, G_Psi0pWHZH; (Psi0, Psimm, Wp, Wp), Scalar2_Vector2 1, G_Psi0ppWW; (Psi0, Psipp, Wm, Wm), Scalar2_Vector2 1, G_Psi0ppWW; (Psi0, Psimm, WHp, WHp), Scalar2_Vector2 1, G_Psi0ppWHWH; (Psi0, Psipp, WHm, WHm), Scalar2_Vector2 1, G_Psi0ppWHWH; (Psi0, Psimm, WHp, Wp), Scalar2_Vector2 1, G_Psi0ppWHW; (Psi0, Psipp, WHm, Wm), Scalar2_Vector2 1, G_Psi0ppWHW; (Psi1, Psi1, Wp, Wm), Scalar2_Vector2 2, G_HHWW; (Psi1, Psi1, WHp, WHm), Scalar2_Vector2 (-2), G_HHWW; (Psi1, Psi1, Z, Z), Scalar2_Vector2 4, G_HHZZ; (Psi1, Psi1, ZH, ZH), Scalar2_Vector2 1, G_Psi00ZH; (Psi1, Psi1, WHp, Wm), Scalar2_Vector2 2, G_HHWHW; (Psi1, Psi1, Wp, WHm), Scalar2_Vector2 2, G_HHWHW; (Psi1, Psi1, Z, ZH), Scalar2_Vector2 4, G_HHZHZ; (Psi1, Psim, Wp, Ga), Scalar2_Vector2 1, I_G_Psi0pWA; (Psi1, Psip, Wm, Ga), Scalar2_Vector2 (-1), I_G_Psi0pWA; (Psi1, Psim, WHp, Ga), Scalar2_Vector2 1, I_G_Psi0pWHA; (Psi1, Psip, WHm, Ga), Scalar2_Vector2 (-1), I_G_Psi0pWHA; (Psi1, Psim, Wp, Z), Scalar2_Vector2 1, I_G_Psi0pWZ; (Psi1, Psip, Wm, Z), Scalar2_Vector2 (-1), I_G_Psi0pWZ; (Psi1, Psim, WHp, Z), Scalar2_Vector2 1, I_G_Psi0pWHZ; (Psi1, Psip, WHm, Z), Scalar2_Vector2 (-1), I_G_Psi0pWHZ; (Psi1, Psim, Wp, ZH), Scalar2_Vector2 1, I_G_Psi0pWZH; (Psi1, Psip, Wm, ZH), Scalar2_Vector2 (-1), I_G_Psi0pWZH; (Psi1, Psim, WHp, ZH), Scalar2_Vector2 1, I_G_Psi0pWHZH; (Psi1, Psip, WHm, ZH), Scalar2_Vector2 (-1), I_G_Psi0pWHZH; (Psi1, Psimm, Wp, Wp), Scalar2_Vector2 1, I_G_Psi0ppWW; (Psi1, Psipp, Wm, Wm), Scalar2_Vector2 (-1), I_G_Psi0ppWW; (Psi1, Psimm, WHp, WHp), Scalar2_Vector2 1, I_G_Psi0ppWHWH; (Psi1, Psipp, WHm, WHm), Scalar2_Vector2 (-1), I_G_Psi0ppWHWH; (Psi1, Psimm, WHp, Wp), Scalar2_Vector2 1, I_G_Psi0ppWHW; (Psi1, Psipp, WHm, Wm), Scalar2_Vector2 (-1), I_G_Psi0ppWHW; (Psip, Psim, Wp, Wm), Scalar2_Vector2 4, G_HHWW; (Psip, Psim, WHp, WHm), Scalar2_Vector2 1, G_Psi00ZH; (Psip, Psim, WHp, Wm), Scalar2_Vector2 4, G_HHWHW; (Psip, Psim, Wp, WHm), Scalar2_Vector2 4, G_HHWHW; (Psip, Psim, Z, Z), Scalar2_Vector2 1, G_PsippZZ; (Psip, Psim, Ga, Ga), Scalar2_Vector2 2, G_AAWW; (Psip, Psim, ZH, ZH), Scalar2_Vector2 1, G_PsippZHZH; (Psip, Psim, Ga, Z), Scalar2_Vector2 4, G_PsippAZ; (Psip, Psimm, Wp, Ga), Scalar2_Vector2 1, G_PsippWA; (Psim, Psipp, Wm, Ga), Scalar2_Vector2 1, G_PsippWA; (Psip, Psimm, WHp, Ga), Scalar2_Vector2 1, G_PsippWHA; (Psim, Psipp, WHm, Ga), Scalar2_Vector2 1, G_PsippWHA; (Psip, Psimm, Wp, Z), Scalar2_Vector2 1, G_PsippWZ; (Psim, Psipp, Wm, Z), Scalar2_Vector2 1, G_PsippWZ; (Psip, Psimm, WHp, Z), Scalar2_Vector2 1, G_PsippWHZ; (Psim, Psipp, WHm, Z), Scalar2_Vector2 1, G_PsippWHZ; (Psip, Psimm, Wp, ZH), Scalar2_Vector2 1, G_PsippWZH; (Psim, Psipp, Wm, ZH), Scalar2_Vector2 1, G_PsippWZH; (Psip, Psimm, WHp, ZH), Scalar2_Vector2 1, G_PsippWHZH; (Psim, Psipp, WHm, ZH), Scalar2_Vector2 1, G_PsippWHZH; (Psipp, Psimm, Wp, Wm), Scalar2_Vector2 2, G_HHWW; (Psipp, Psimm, WHp, WHm), Scalar2_Vector2 (-2), G_HHWW; (Psipp, Psimm, WHp, Wm), Scalar2_Vector2 2, G_HHWHW; (Psipp, Psimm, Wp, WHm), Scalar2_Vector2 2, G_HHWHW; (Psipp, Psimm, Z, Z), Scalar2_Vector2 1, G_PsiccZZ; (Psipp, Psimm, Ga, Ga), Scalar2_Vector2 8, G_AAWW; (Psipp, Psimm, ZH, ZH), Scalar2_Vector2 1, G_Psi00ZH; (Psipp, Psimm, Ga, Z), Scalar2_Vector2 1, G_PsiccAZ; (Psipp, Psimm, Z, ZH), Scalar2_Vector2 4, G_PsiccZZH; (Psipp, Psimm, Ga, ZH), Scalar2_Vector2 4, G_PsiccAZH] @ (if Flags.u1_gauged then [(H, H, AH, AH), Scalar2_Vector2 1, G_HHAA; (H, H, AH, Z), Scalar2_Vector2 (-1), G_HHAHZ; (H, H, ZH, AH), Scalar2_Vector2 (-1), G_HHZHAH; (H, Psi0, AH, AH), Scalar2_Vector2 1, G_HPsi0AHAH; (H, Psi0, Z, AH), Scalar2_Vector2 1, G_HPsi0ZAH; (H, Psi0, ZH, AH), Scalar2_Vector2 1, G_HPsi0ZHAH; (H, Psim, Wp, AH), Scalar2_Vector2 1, G_HPsipWAH; (H, Psip, Wm, AH), Scalar2_Vector2 1, G_HPsipWAH; (H, Psim, WHp, AH), Scalar2_Vector2 1, G_HPsipWHAH; (H, Psip, WHm, AH), Scalar2_Vector2 1, G_HPsipWHAH; (Psi0, Psi0, AH, AH), Scalar2_Vector2 1, G_Psi00AH; (Psi0, Psi0, Z, AH), Scalar2_Vector2 4, G_HHAHZ; (Psi0, Psi0, AH, ZH), Scalar2_Vector2 1, G_Psi00ZHAH; (Psi0, Psim, Wp, AH), Scalar2_Vector2 1, G_Psi0pWAH; (Psi0, Psip, Wm, AH), Scalar2_Vector2 1, G_Psi0pWAH; (Psi0, Psim, WHp, AH), Scalar2_Vector2 1, G_Psi0pWHAH; (Psi0, Psip, WHm, AH), Scalar2_Vector2 1, G_Psi0pWHAH; (Psi1, Psi1, AH, AH), Scalar2_Vector2 1, G_Psi00AH; (Psi1, Psi1, Z, AH), Scalar2_Vector2 4, G_HHAHZ; (Psi1, Psi1, AH, ZH), Scalar2_Vector2 1, G_Psi00ZHAH; (Psi1, Psim, Wp, AH), Scalar2_Vector2 1, I_G_Psi0pWAH; (Psi1, Psip, Wm, AH), Scalar2_Vector2 (-1), I_G_Psi0pWAH; (Psi1, Psim, WHp, AH), Scalar2_Vector2 1, I_G_Psi0pWHAH; (Psi1, Psip, WHm, AH), Scalar2_Vector2 (-1), I_G_Psi0pWHAH; (Psip, Psim, AH, AH), Scalar2_Vector2 1, G_Psi00AH; (Psip, Psim, Ga, AH), Scalar2_Vector2 4, G_PsippAAH; (Psip, Psim, Z, AH), Scalar2_Vector2 4, G_PsippZAH; (Psip, Psimm, Wp, AH), Scalar2_Vector2 1, G_PsippWAH; (Psim, Psipp, Wm, AH), Scalar2_Vector2 1, G_PsippWAH; (Psip, Psimm, WHp, AH), Scalar2_Vector2 1, G_PsippWHAH; (Psim, Psipp, WHm, AH), Scalar2_Vector2 1, G_PsippWHAH; (Psipp, Psimm, AH, AH), Scalar2_Vector2 1, G_Psi00AH; (Psipp, Psimm, AH, ZH), Scalar2_Vector2 (-1), G_Psi00ZHAH; (Psipp, Psimm, Ga, AH), Scalar2_Vector2 4, G_PsiccAAH; (Psipp, Psimm, Z, AH), Scalar2_Vector2 4, G_PsiccZAH] else [])) let standard_higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let anomaly_higgs = List.map hgg [ (Eta, Gl, Gl), Dim5_Scalar_Gauge2_Skew 1, G_EGlGl; (Eta, Ga, Ga), Dim5_Scalar_Gauge2_Skew 1, G_EGaGa; (Eta, Ga, Z), Dim5_Scalar_Gauge2_Skew 1, G_EGaZ] (* @ [ (H, Ga, Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (H, Ga, Z), Dim5_Scalar_Gauge2 1, G_HGaZ ] *) let standard_higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let gauge_higgs = standard_gauge_higgs let gauge_higgs4 = standard_gauge_higgs4 let higgs = standard_higgs let higgs4 = standard_higgs4 let top_quartic = [ ((M (U (-3)), O H, O H, M (U 3)), GBBG (1, Psibar, S2, Psi), G_HHtt); ((M (TopHb), O H, O H, M TopH), GBBG (1, Psibar, S2, Psi), G_HHthth); ((M (U (-3)), O H, O H, M TopH), GBBG (1, Psibar, S2LR, Psi), G_HHtht); ((M (TopHb), O H, O H, M (U 3)), GBBG (1, Psibar, S2LR, Psi), G_HHtht)] let goldstone_vertices = List.map hgg [ ((Phi0, Wm, Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((Phip, Ga, Wm), Scalar_Vector_Vector 1, I_Q_W); ((Phip, Z, Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((Phim, Wp, Ga), Scalar_Vector_Vector 1, I_Q_W); ((Phim, Wp, Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap neutral_heavy_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ ThoList.flatmap charged_heavy_currents [1;2;3] @ heavy_top_currents @ (if Flags.u1_gauged then [] else anomaly_higgs) @ yukawa @ yukawa_add @ triple_gauge @ gauge_higgs @ higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 @ top_quartic let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "th" -> M TopH | "thbar" -> M TopHb | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "AH" | "AH0" | "Ah" | "Ah0" -> G AH | "ZH" | "ZH0" | "Zh" | "Zh0" -> G ZH | "W+" -> G Wp | "W-" -> G Wm | "WH+" -> G WHp | "WH-" -> G WHm | "H" | "h" -> O H | "eta" | "Eta" -> O Eta | "Psi" | "Psi0" | "psi" | "psi0" -> O Psi0 | "Psi1" | "psi1" -> O Psi1 | "Psi+" | "psi+" | "Psip" | "psip" -> O Psip | "Psi-" | "psi-" | "Psim" | "psim" -> O Psim | "Psi++" | "psi++" | "Psipp" | "psipp" -> O Psipp | "Psi--" | "psi--" | "Psimm" | "psimm" -> O Psimm | _ -> invalid_arg "Modellib_BSM.Littlest.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.Littlest.flavor_to_string" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.Littlest.flavor_to_string" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.Littlest.flavor_to_string" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.Littlest.flavor_to_string" | TopH -> "th" | TopHb -> "thbar" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" | ZH -> "ZH" | AH -> "AH" | WHp -> "WHp" | WHm -> "WHm" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Eta -> "Eta" | Psi0 -> "Psi0" | Psi1 -> "Psi1" | Psip -> "Psi+" | Psim -> "Psi-" | Psipp -> "Psi++" | Psimm -> "Psi--" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.Littlest.flavor_to_TeX" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.Littlest.flavor_to_TeX" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.Littlest.flavor_to_TeX" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.Littlest.flavor_to_TeX" | TopH -> "T" | TopHb -> "\\bar{T}" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" | ZH -> "Z_H" | AH -> "\\gamma_H" | WHp -> "W_H^+" | WHm -> "W_H^-" end | O f -> begin match f with | Phip -> "\\Phi^+" | Phim -> "\\Phi^-" | Phi0 -> "\\Phi^0" | H -> "H" | Eta -> "\\eta" | Psi0 -> "\\Psi_S" | Psi1 -> "\\Psi_P" | Psip -> "\\Psi^+" | Psim -> "\\Psi^-" | Psipp -> "\\Psi^{++}" | Psimm -> "\\Psi^{--}" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" | TopH -> "th" | TopHb -> "thb" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" | ZH -> "zh" | AH -> "ah" | WHp -> "whp" | WHm -> "whm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | Eta -> "eta" | Psi0 -> "psi0" | Psi1 -> "psi1" | Psip -> "psip" | Psim -> "psim" | Psipp -> "psipp" | Psimm -> "psimm" end (* There are PDG numbers for Z', Z'', W', 32-34, respectively. We just introduce a number 38 for Y0 as a Z'''. As well, there is the number 8 for a t'. But we cheat a little bit and take the number 35 which is reserved for a heavy scalar Higgs for the Eta scalar. For the heavy Higgs states we take 35 and 36 for the neutral ones, 37 for the charged and 38 for the doubly-charged. The pseudoscalar gets the 39. *) let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n | TopH -> 8 | TopHb -> (-8) end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | AH -> 32 | ZH -> 33 | WHp -> 34 | WHm -> (-34) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | Psi0 -> 35 | Psi1 -> 36 | Psip -> 37 | Psim -> (-37) | Psipp -> 38 | Psimm -> (-38) | H -> 25 | Eta -> 39 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | VHeavy -> "vheavy" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Sinpsi -> "sinpsi" | Cospsi -> "cospsi" | Atpsi -> "atpsi" | Sccs -> "sccs" | Supp -> "vF" | Supp2 -> "v2F2" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | Q_Z_up -> "qzup" | G_ZHTHT -> "gzhtht" | G_ZTHT -> "gztht" | G_AHTHTH -> "gahthth" | G_AHTHT -> "gahtht" | G_AHTT -> "gahtt" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | G_CCtop -> "gcctop" | G_CC_heavy -> "gcch" | G_CC_WH -> "gccwh" | G_CC_W -> "gccw" | G_NC_h_lepton -> "gnchlep" | G_NC_h_neutrino -> "gnchneu" | G_NC_h_up -> "gnchup" | G_NC_h_down -> "gnchdwn" | G_NC_heavy -> "gnch" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | I_G_WWW -> "igwww" | I_G_AHWW -> "igahww" | I_G_ZHWW -> "igzhww" | I_G_ZWHW -> "igzwhw" | I_G_AHWHWH -> "igahwhwh" | I_G_ZHWHWH -> "igzhwhwh" | I_G_AHWHW -> "igahwhw" | I_Q_H -> "iqh" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_WH4 -> "gwh4" | G_WHWHWW -> "gwhwhww" | G_WHWWW -> "gwhwww" | G_WH3W -> "gwh3w" | G_WWAAH -> "gwwaah" | G_WWAZH -> "gwwazh" | G_WWZZH -> "gwwzzh" | G_WWZAH -> "gwwzah" | G_WHWHAAH -> "gwhwhaah" | G_WHWHAZH -> "gwhwhazh" | G_WHWHZZH -> "gwhwhzzh" | G_WHWHZAH -> "gwhwhzah" | G_WWZHAH -> "gwwzhah" | G_WHWHZHAH -> "gwhwhzhah" | G_WHWZZ -> "gwhwzz" | G_WHWAZ -> "gwhwaz" | G_WHWAAH -> "gwhwaah" | G_WHWZAH -> "gwhwzah" | G_WHWZHZH -> "gwhwzhzh" | G_WHWZHAH -> "gwhwzhah" | G_WHWAZH -> "gwhwazh" | G_WHWZZH -> "gwhwzzh" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_HWHW -> "ghwhw" | G_HWHWH -> "ghwhwh" | G_HAHAH -> "ghahah" | G_HZHZ -> "ghzhz" | G_HZHAH -> "ghzhah" | G_HAHZ -> "ghahz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_Hthth -> "ghthth" | G_Htht -> "ghtht" | G_HHtt -> "ghhtt" | G_HHthth -> "ghhthth" | G_HHtht -> "ghhtht" | G_Psi0tt -> "gpsi0tt" | G_Psi0bb -> "gpsi0bb" | G_Psi0cc -> "gpsi0cc" | G_Psi0tautau -> "gpsi0tautau" | G_Psi1tt -> "gpsi1tt" | G_Psi1bb -> "gpsi1bb" | G_Psi1cc -> "gpsi1cc" | G_Psi1tautau -> "gpsi1tautau" | G_Psipq3 -> "gpsipq3" | G_Psipq2 -> "gpsipq2" | G_Psipl3 -> "gpsipl3" | G_Psi0tth -> "gpsi0tth" | G_Psi1tth -> "gpsi1tth" | G_Psipbth -> "gpsipbth" | G_Ethth -> "gethth" | G_Etht -> "getht" | G_Ett -> "gett" | G_Ebb -> "gebb" | G_HGaGa -> "ghgaga" | G_HGaZ -> "ghgaz" | G_EGaGa -> "geaa" | G_EGaZ -> "geaz" | G_EGlGl -> "gegg" | G_H3 -> "gh3" | G_H4 -> "gh4" | G_PsiWW -> "gpsiww" | G_PsiWHW -> "gpsiwhw" | G_PsiZZ -> "gpsizz" | G_PsiZHZH -> "gpsizhzh" | G_PsiZHZ -> "gpsizhz" | G_PsiZAH -> "gpsizah" | G_PsiZHAH -> "gpsizhah" | G_PsiAHAH -> "gpsiahah" | G_PsiZW -> "gpsizw" | G_PsiZWH -> "gpsizwh" | G_PsiAHW -> "gpsiahw" | G_PsiAHWH -> "gpsiahwh" | G_PsiZHW -> "gpsizhw" | G_PsiZHWH -> "gpsizhwh" | G_PsippWW -> "gpsippww" | G_PsippWHW -> "gpsippwhw" | G_PsippWHWH -> "gpsippwhwh" | Gs -> "gs" | G2 -> "gs**2" | I_Gs -> "igs" | G_PsiHW -> "gpsihw" | G_PsiHWH -> "gpsihwh" | G_Psi0W -> "gpsi0w" | G_Psi0WH -> "gpsi0wh" | G_Psi1W -> "gpsi1w" | G_Psi1WH -> "gpsi1wh" | G_PsiPPW -> "gpsippw" | G_PsiPPWH -> "gpsippwh" | G_Psi1HAH -> "gpsihah" | G_Psi01AH -> "gpsi0ah" | G_AHPsip -> "gahpsip" | G_Psi1HZ -> "gpsi1hz" | G_Psi1HZH -> "gpsi1hzh" | G_Psi01Z -> "gpsi01z" | G_Psi01ZH -> "gpsi01zh" | G_ZPsip -> "gzpsip" | G_ZPsipp -> "gzpsipp" | G_ZHPsipp -> "gzhpsipp" | G_HHAA -> "ghhaa" | G_HHWHW -> "ghhwhw" | G_HHZHZ -> "ghhzhz" | G_HHAHZ -> "ghhahz" | G_HHZHAH -> "ghhzhah" | G_HPsi0WW -> "ghpsi0ww" | G_HPsi0WHW -> "ghpsi0whw" | G_HPsi0ZZ -> "ghpsi0zz" | G_HPsi0ZHZH -> "ghpsi0zhzh" | G_HPsi0ZHZ -> "ghpsi0zhz" | G_HPsi0AHAH -> "ghpsi0ahah" | G_HPsi0ZAH -> "ghpsi0zah" | G_HPsi0ZHAH -> "ghpsi0zhah" | G_HPsipWA -> "ghpsipwa" | G_HPsipWHA -> "ghpsipwha" | G_HPsipWZ -> "ghpsipwz" | G_HPsipWHZ -> "ghpsiwhz" | G_HPsipWAH -> "ghpsipwah" | G_HPsipWHAH -> "ghpsipwhah" | G_HPsipWZH -> "ghpsipwzh" | G_HPsipWHZH -> "ghpsipwhzh" | G_HPsippWW -> "ghpsippww" | G_HPsippWHWH -> "ghpsippwhwh" | G_HPsippWHW -> "ghpsippwhw" | G_Psi00ZH -> "gpsi00zh" | G_Psi00AH -> "gpsi00ah" | G_Psi00ZHAH -> "gpsi00zhah" | G_Psi0pWA -> "gpsi0pwa" | G_Psi0pWHA -> "gpsi0pwha" | G_Psi0pWZ -> "gpsi0pwz" | G_Psi0pWHZ -> "gpsi0pwhz" | G_Psi0pWAH -> "gpsi0pwah" | G_Psi0pWHAH -> "gpsi0pwhah" | G_Psi0pWZH -> "gpsi0pwzh" | G_Psi0pWHZH -> "gpsi0pwhzh" | G_Psi0ppWW -> "gpsi0ppww" | G_Psi0ppWHWH -> "gpsi0ppwhwh" | G_Psi0ppWHW -> "gpsi0ppwhw" | I_G_Psi0pWA -> "i_gpsi0pwa" | I_G_Psi0pWHA -> "i_gpsi0pwha" | I_G_Psi0pWZ -> "i_gpsi0pwz" | I_G_Psi0pWHZ -> "i_gpsi0pwhz" | I_G_Psi0pWAH -> "i_gpsi0pwah" | I_G_Psi0pWHAH -> "i_gpsi0pwhah" | I_G_Psi0pWZH -> "i_gpsi0pwzh" | I_G_Psi0pWHZH -> "i_gpsi0pwhzh" | I_G_Psi0ppWW -> "i_gpsi0ppww" | I_G_Psi0ppWHWH -> "i_gpsi0ppwhwh" | I_G_Psi0ppWHW -> "i_gpsi0ppwhw" | G_PsippZZ -> "gpsippzz" | G_PsippZHZH -> "gpsippzhzh" | G_PsippAZ -> "gpsippaz" | G_PsippAAH -> "gpsippaah" | G_PsippZAH -> "gpsippzah" | G_PsippWA -> "gpsippwa" | G_PsippWHA -> "gpsippwha" | G_PsippWZ -> "gpsippwz" | G_PsippWHZ -> "gpsippwhz" | G_PsippWAH -> "gpsippwah" | G_PsippWHAH -> "gpsippwhah" | G_PsippWZH -> "gpsippwzh" | G_PsippWHZH -> "gpsippwhzh" | G_PsiccZZ -> "gpsicczz" | G_PsiccAZ -> "gpsiccaz" | G_PsiccAAH -> "gpsiccaah" | G_PsiccZZH -> "gpsicczzh" | G_PsiccAZH -> "gpsiccazh" | G_PsiccZAH -> "gpsicczah" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end module Littlest_Tpar (Flags : BSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type flavor = L of int | N of int | U of int | D of int | Topp | Toppb | Ga | Wp | Wm | Z | Gl | Lodd of int | Nodd of int | Uodd of int | Dodd of int | WHp | WHm | ZH | AH | Phip | Phim | Phi0 | H | Eta | Psi0 | Psi1 | Psip | Psim | Psipp | Psimm type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.Littlest_Tpar.gauge_symbol: internal error" let family n = [ L n; N n; U n; D n; Dodd n; Nodd n; Lodd n; Uodd n ] (* Since [Phi] already belongs to the EW Goldstone bosons we use [Psi] for the TeV scale complex triplet. We use the notation Todd1 = Uodd 3, Todd2 = Uodd 4. *) let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Heavy Quarks", [Topp; Toppb; Uodd 4; Uodd (-4)]; "Heavy Scalars", [Psi0; Psi1; Psip; Psim; Psipp; Psimm]; "Gauge Bosons", if Flags.u1_gauged then [Ga; Z; Wp; Wm; Gl; WHp; WHm; ZH; AH] else [Ga; Z; Wp; Wm; Gl; WHp; WHm; ZH]; "Higgs", if Flags.u1_gauged then [H] else [H; Eta]; "Goldstone Bosons", [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n | Topp -> Spinor | Toppb -> ConjSpinor | Ga | Gl -> Vector | Wp | Wm | Z | WHp | WHm | ZH | AH -> Massive_Vector | _ -> Scalar let color = function | U n -> Color.SUN (if n > 0 then 3 else -3) | Uodd n -> Color.SUN (if n > 0 then 3 else -3) | D n -> Color.SUN (if n > 0 then 3 else -3) | Dodd n -> Color.SUN (if n > 0 then 3 else -3) | Topp -> Color.SUN 3 | Toppb -> Color.SUN (-3) | Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | L n -> prop_spinor n | N n -> prop_spinor n | Lodd n -> prop_spinor n | Nodd n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n | Uodd n -> prop_spinor n | Dodd n -> prop_spinor n | Topp -> Prop_Spinor | Toppb -> Prop_ConjSpinor | Ga | Gl -> Prop_Feynman | Wp | Wm | Z | WHp | WHm | ZH | AH -> Prop_Unitarity | Phip | Phim | Phi0 -> Only_Insertion | H | Eta | Psi0 | Psi1 | Psip | Psim | Psipp | Psimm -> Prop_Scalar (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | Wp | Wm | U 3 | U (-3) | WHp | WHm | ZH | AH | Uodd _ | Dodd _ | Nodd _ | Lodd _ | Topp | Toppb -> Fudged | _ -> !default_width else !default_width let goldstone = function - | Wp -> Some (Phip, Coupling.Const 1) - | Wm -> Some (Phim, Coupling.Const 1) - | Z -> Some (Phi0, Coupling.Const 1) + | Wp -> Some (Phip, Coupling.Integer 1) + | Wm -> Some (Phim, Coupling.Integer 1) + | Z -> Some (Phi0, Coupling.Integer 1) | _ -> None let conjugate = function | L n -> L (-n) | N n -> N (-n) | Lodd n -> L (-n) | Nodd n -> N (-n) | U n -> U (-n) | D n -> D (-n) | Uodd n -> U (-n) | Dodd n -> D (-n) | Topp -> Toppb | Toppb -> Topp | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp | WHm -> WHp | WHp -> WHm | ZH -> ZH | AH -> AH | Psi0 -> Psi0 | Psi1 -> Psi1 | Psip -> Psim | Psim -> Psip | Psipp -> Psimm | Psimm -> Psipp | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | Eta -> Eta let fermion = function | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 | Lodd n -> if n > 0 then 1 else -1 | Nodd n -> if n > 0 then 1 else -1 | Uodd n -> if n > 0 then 1 else -1 | Dodd n -> if n > 0 then 1 else -1 | Topp -> 1 | Toppb -> -1 | Gl | Ga | Z | Wp | Wm | WHp | WHm | AH | ZH -> 0 | _ -> 0 module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let charge = function | L n | Lodd n -> if n > 0 then -1//1 else 1//1 | N n | Nodd n -> 0//1 | U n | Uodd n -> if n > 0 then 2//3 else -2//3 | D n | Dodd n -> if n > 0 then -1//3 else 1//3 | Topp -> 2//3 | Toppb -> -2//3 | Gl | Ga | Z | AH | ZH -> 0//1 | Wp | WHp -> 1//1 | Wm | WHm -> -1//1 | H | Phi0 | Eta | Psi1 | Psi0 -> 0//1 | Phip | Psip -> 1//1 | Phim | Psim -> -1//1 | Psipp -> 2//1 | Psimm -> -2//1 let lepton = function | L n | N n | Lodd n | Nodd n -> if n > 0 then 1//1 else -1//1 | U _ | D _ | _ -> 0//1 let baryon = function | L _ | N _ -> 0//1 | U n | D n | Uodd n | Dodd n -> if n > 0 then 1//1 else -1//1 | Topp -> 1//1 | Toppb -> -1//1 | _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | VHeavy | Supp | Supp2 | Sinpsi | Cospsi | Atpsi | Sccs (* Mixing angles of SU(2) *) | Q_lepton | Q_up | Q_down | Q_Z_up | G_CC | G_CCtop | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_NC_heavy | G_NC_h_neutrino | G_NC_h_lepton | G_NC_h_up | G_NC_h_down | G_CC_heavy | G_ZHTHT | G_ZTHT | G_AHTHTH | G_AHTHT | G_AHTT | G_CC_WH | G_CC_W | Gs | I_Gs | G2 | I_Q_W | I_G_ZWW | I_G_WWW | I_G_AHWW | I_G_ZHWW | I_G_ZWHW | I_G_AHWHWH | I_G_ZHWHWH | I_G_AHWHW | I_Q_H | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_WH4 | G_WHWHWW | G_WHWWW | G_WH3W | G_WWAAH | G_WWAZH | G_WWZZH | G_WWZAH | G_WHWHAAH | G_WHWHAZH | G_WHWHZZH | G_WHWHZAH | G_WWZHAH | G_WHWHZHAH | G_WHWZZ | G_WHWAZ | G_WHWAAH | G_WHWZAH | G_WHWZHZH | G_WHWZHAH | G_WHWAZH | G_WHWZZH | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_PsiWW | G_PsiWHW | G_PsiZZ | G_PsiZHZH | G_PsiZHZ | G_PsiZAH | G_PsiZHAH | G_PsiAHAH | G_PsiZW | G_PsiZWH | G_PsiAHW | G_PsiAHWH | G_PsiZHW | G_PsiZHWH | G_PsippWW | G_PsippWHW | G_PsippWHWH | G_PsiHW | G_PsiHWH | G_Psi0W | G_Psi0WH | G_Psi1W | G_Psi1WH | G_PsiPPW | G_PsiPPWH | G_Psi1HAH | G_Psi01AH | G_AHPsip | G_Psi1HZ | G_Psi1HZH | G_Psi01Z | G_Psi01ZH | G_ZPsip | G_ZPsipp | G_ZHPsipp | G_HHAA | G_HHWHW | G_HHZHZ | G_HHAHZ | G_HHZHAH | G_HPsi0WW | G_HPsi0WHW | G_HPsi0ZZ | G_HPsi0ZHZH | G_HPsi0ZHZ | G_HPsi0AHAH | G_HPsi0ZAH | G_HPsi0ZHAH | G_HPsipWA | G_HPsipWHA | G_HPsipWZ | G_HPsipWHZ | G_HPsipWAH | G_HPsipWHAH | G_HPsipWZH | G_HPsipWHZH | G_HPsippWW | G_HPsippWHWH | G_HPsippWHW | G_Psi00ZH | G_Psi00AH | G_Psi00ZHAH | G_Psi0pWA | G_Psi0pWHA | G_Psi0pWZ | G_Psi0pWHZ | G_Psi0pWAH | G_Psi0pWHAH | G_Psi0pWZH | G_Psi0pWHZH | G_Psi0ppWW | G_Psi0ppWHWH | G_Psi0ppWHW | I_G_Psi0pWA | I_G_Psi0pWHA | I_G_Psi0pWZ | I_G_Psi0pWHZ | I_G_Psi0pWAH | I_G_Psi0pWHAH | I_G_Psi0pWZH | I_G_Psi0pWHZH | I_G_Psi0ppWW | I_G_Psi0ppWHWH | I_G_Psi0ppWHW | G_PsippZZ | G_PsippZHZH | G_PsippAZ | G_PsippAAH | G_PsippZAH | G_PsippWA | G_PsippWHA | G_PsippWZ | G_PsippWHZ | G_PsippWAH | G_PsippWHAH | G_PsippWZH | G_PsippWHZH | G_PsiccZZ | G_PsiccAZ | G_PsiccAAH | G_PsiccZZH | G_PsiccAZH | G_PsiccZAH | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_H3 | G_H4 | G_Hthth | G_Htht | G_Ethth | G_Etht | G_Ett | G_HHtt | G_HHthth | G_HHtht | G_Psi0tt | G_Psi0bb | G_Psi0cc | G_Psi0tautau | G_Psi1tt | G_Psi1bb | G_Psi1cc | G_Psi1tautau | G_Psipq3 | G_Psipq2 | G_Psipl3 | G_Psi0tth | G_Psi1tth | G_Psipbth | G_Ebb | G_HGaGa | G_HGaZ | G_EGaGa | G_EGaZ | G_EGlGl | G_HWHW | G_HWHWH | G_HAHAH | G_HZHZ | G_HZHAH | G_HAHZ | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)); - nc_coupling G_NC_h_neutrino half (Const 0); - nc_coupling G_NC_h_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_h_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_h_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)); + nc_coupling G_NC_h_neutrino half (Integer 0); + nc_coupling G_NC_h_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_h_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_h_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let electromagnetic_currents n = [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down); ((Lodd (-n), Ga, Lodd n), FBF (1, Psibar, V, Psi), Q_lepton); ((Uodd (-n), Ga, Uodd n), FBF (1, Psibar, V, Psi), Q_up); ((Dodd (-n), Ga, Dodd n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs); ((Uodd (-n), Gl, Uodd n), FBF ((-1), Psibar, V, Psi), Gs); ((Dodd (-n), Gl, Dodd n), FBF ((-1), Psibar, V, Psi), Gs) ] let neutral_currents n = [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* The sign of this coupling is just the one of the T3, being -(1/2) for leptons and down quarks, and +(1/2) for neutrinos and up quarks. *) let neutral_heavy_currents n = ([ ((L (-n), ZH, L n), FBF ((-1), Psibar, VL, Psi), G_NC_heavy); ((N (-n), ZH, N n), FBF (1, Psibar, VL, Psi), G_NC_heavy); ((U (-n), ZH, U n), FBF (1, Psibar, VL, Psi), G_NC_heavy); ((D (-n), ZH, D n), FBF ((-1), Psibar, VL, Psi), G_NC_heavy)] @ (if Flags.u1_gauged then [ ((L (-n), AH, L n), FBF (1, Psibar, VA, Psi), G_NC_h_lepton); ((N (-n), AH, N n), FBF (1, Psibar, VA, Psi), G_NC_h_neutrino); ((D (-n), AH, D n), FBF (1, Psibar, VA, Psi), G_NC_h_down)] else [])) let heavy_top_currents = ([ ((Toppb, Ga, Topp), FBF (1, Psibar, V, Psi), Q_up); ((Toppb, Z, Topp), FBF (1, Psibar, V, Psi), Q_Z_up); ((Toppb, Gl, Topp), FBF (1, Psibar, V, Psi), Gs); ((Toppb, Z, U 3), FBF (1, Psibar, VL, Psi), G_ZTHT); ((U (-3), Z, Topp), FBF (1, Psibar, VL, Psi), G_ZTHT); ((Toppb, ZH, U 3), FBF (1, Psibar, VL, Psi), G_ZHTHT); ((U (-3), ZH, Topp), FBF (1, Psibar, VL, Psi), G_ZHTHT); ((U (-3), Wp, D 3), FBF (1, Psibar, VL, Psi), G_CCtop); ((D (-3), Wm, U 3), FBF (1, Psibar, VL, Psi), G_CCtop); ((Toppb, WHp, D 3), FBF (1, Psibar, VL, Psi), G_CC_WH); ((D (-3), WHm, Topp), FBF (1, Psibar, VL, Psi), G_CC_WH); ((Toppb, Wp, D 3), FBF (1, Psibar, VL, Psi), G_CC_W); ((D (-3), Wm, Topp), FBF (1, Psibar, VL, Psi), G_CC_W)] @ (if Flags.u1_gauged then [ ((U (-3), AH, U 3), FBF (1, Psibar, VA, Psi), G_AHTT); ((Toppb, AH, Topp), FBF (1, Psibar, VA, Psi), G_AHTHTH); ((Toppb, AH, U 3), FBF (1, Psibar, VR, Psi), G_AHTHT); ((U (-3), AH, Topp), FBF (1, Psibar, VR, Psi), G_AHTHT)] else [])) (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents n = [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((L (-n), WHm, N n), FBF (1, Psibar, VL, Psi), G_CC_heavy); ((N (-n), WHp, L n), FBF (1, Psibar, VL, Psi), G_CC_heavy); ((D (-n), WHm, U n), FBF (1, Psibar, VL, Psi), G_CC_heavy); ((U (-n), WHp, D n), FBF (1, Psibar, VL, Psi), G_CC_heavy)] let quark_currents n = ([ ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC)] @ (if Flags.u1_gauged then [ ((U (-n), AH, U n), FBF (1, Psibar, VA, Psi), G_NC_h_up)] else [])) (* We specialize the third generation since there is an additional shift coming from the admixture of the heavy top quark. The universal shift, coming from the mixing in the non-Abelian gauge boson sector is unobservable. (Redefinition of coupling constants by measured ones. *) let yukawa = [ ((U (-3), H, U 3), FBF (1, Psibar, S, Psi), G_Htt); ((D (-3), H, D 3), FBF (1, Psibar, S, Psi), G_Hbb); ((U (-2), H, U 2), FBF (1, Psibar, S, Psi), G_Hcc); ((L (-3), H, L 3), FBF (1, Psibar, S, Psi), G_Htautau)] let yukawa_add' = [ ((Toppb, H, Topp), FBF (1, Psibar, S, Psi), G_Hthth); ((Toppb, H, U 3), FBF (1, Psibar, SLR, Psi), G_Htht); ((U (-3), H, Topp), FBF (1, Psibar, SLR, Psi), G_Htht); ((U (-3), Psi0, U 3), FBF (1, Psibar, S, Psi), G_Psi0tt); ((D (-3), Psi0, D 3), FBF (1, Psibar, S, Psi), G_Psi0bb); ((U (-2), Psi0, U 2), FBF (1, Psibar, S, Psi), G_Psi0cc); ((L (-3), Psi0, L 3), FBF (1, Psibar, S, Psi), G_Psi0tautau); ((U (-3), Psi1, U 3), FBF (1, Psibar, P, Psi), G_Psi1tt); ((D (-3), Psi1, D 3), FBF (1, Psibar, P, Psi), G_Psi1bb); ((U (-2), Psi1, U 2), FBF (1, Psibar, P, Psi), G_Psi1cc); ((L (-3), Psi1, L 3), FBF (1, Psibar, P, Psi), G_Psi1tautau); ((U (-3), Psip, D 3), FBF (1, Psibar, SLR, Psi), G_Psipq3); ((U (-2), Psip, D 2), FBF (1, Psibar, SLR, Psi), G_Psipq2); ((N (-3), Psip, L 3), FBF (1, Psibar, SR, Psi), G_Psipl3); ((D (-3), Psim, U 3), FBF (1, Psibar, SLR, Psi), G_Psipq3); ((D (-2), Psim, U 2), FBF (1, Psibar, SLR, Psi), G_Psipq2); ((L (-3), Psim, N 3), FBF (1, Psibar, SL, Psi), G_Psipl3); ((Toppb, Psi0, U 3), FBF (1, Psibar, SL, Psi), G_Psi0tth); ((U (-3), Psi0, Topp), FBF (1, Psibar, SR, Psi), G_Psi0tth); ((Toppb, Psi1, U 3), FBF (1, Psibar, SL, Psi), G_Psi1tth); ((U (-3), Psi1, Topp), FBF (1, Psibar, SR, Psi), G_Psi1tth); ((Toppb, Psip, D 3), FBF (1, Psibar, SL, Psi), G_Psipbth); ((D (-3), Psim, Topp), FBF (1, Psibar, SR, Psi), G_Psipbth)] let yukawa_add = if Flags.u1_gauged then yukawa_add' else yukawa_add' @ [ ((U (-3), Eta, U 3), FBF (1, Psibar, P, Psi), G_Ett); ((Toppb, Eta, U 3), FBF (1, Psibar, SLR, Psi), G_Etht); ((D (-3), Eta, D 3), FBF (1, Psibar, P, Psi), G_Ebb); ((U (-3), Eta, Topp), FBF (1, Psibar, SLR, Psi), G_Etht)] (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) (* Check. *) let standard_triple_gauge = [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs) ] let heavy_triple_gauge = ([ ((Ga, WHm, WHp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, WHm, WHp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((ZH, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZHWW); ((Z, WHm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWHW); ((Z, Wm, WHp), Gauge_Gauge_Gauge (-1), I_G_ZWHW); ((ZH, WHm, Wp), Gauge_Gauge_Gauge 1, I_G_WWW); ((ZH, Wm, WHp), Gauge_Gauge_Gauge (-1), I_G_WWW); ((ZH, WHm, WHp), Gauge_Gauge_Gauge (-1), I_G_ZHWHWH)] @ (if Flags.u1_gauged then [ ((AH, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_AHWW); ((AH, WHm, Wp), Gauge_Gauge_Gauge 1, I_G_AHWHW); ((AH, Wm, WHp), Gauge_Gauge_Gauge (-1), I_G_AHWHW); ((AH, WHm, WHp), Gauge_Gauge_Gauge 1, I_G_AHWHWH)] else [])) let triple_gauge = standard_triple_gauge @ heavy_triple_gauge let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2] let heavy_quartic_gauge = [ (WHm, Wp, WHm, Wp), gauge4, G_WWWW; (Wm, WHp, Wm, WHp), gauge4, G_WWWW; (WHm, WHp, WHm, WHp), gauge4, G_WH4; (Wm, Wp, WHm, WHp), gauge4, G_WHWHWW; (Wm, Wp, Wm, WHp), gauge4, G_WHWWW; (Wm, Wp, WHm, Wp), gauge4, G_WHWWW; (WHm, WHp, Wm, WHp), gauge4, G_WH3W; (WHm, WHp, WHm, Wp), gauge4, G_WH3W; (WHm, Z, WHp, Z), minus_gauge4, G_ZZWW; (WHm, Z, WHp, Ga), minus_gauge4, G_AZWW; (WHm, Ga, WHp, ZH), minus_gauge4, G_AAWW; (WHm, Z, WHp, ZH), minus_gauge4, G_ZZWW; (Wm, ZH, Wp, ZH), minus_gauge4, G_WWWW; (Wm, Ga, Wp, ZH), minus_gauge4, G_WWAZH; (Wm, Z, Wp, ZH), minus_gauge4, G_WWZZH; (WHm, Ga, WHp, ZH), minus_gauge4, G_WHWHAZH; (WHm, Z, WHp, ZH), minus_gauge4, G_WHWHZZH; (WHm, ZH, WHp, ZH), minus_gauge4, G_WH4; (WHm, Z, Wp, Z), minus_gauge4, G_WHWZZ; (Wm, Z, WHp, Z), minus_gauge4, G_WHWZZ; (WHm, Ga, Wp, Z), minus_gauge4, G_WHWAZ; (Wm, Ga, WHp, Z), minus_gauge4, G_WHWAZ; (WHm, ZH, Wp, ZH), minus_gauge4, G_WHWZHZH; (Wm, ZH, WHp, ZH), minus_gauge4, G_WHWZHZH; (WHm, Ga, Wp, ZH), minus_gauge4, G_WHWAZH; (Wm, Ga, WHp, ZH), minus_gauge4, G_WHWAZH; (WHm, Z, Wp, ZH), minus_gauge4, G_WHWZZH; (Wm, Z, WHp, ZH), minus_gauge4, G_WHWZZH] @ (if Flags.u1_gauged then [ (Wm, Ga, Wp, AH), minus_gauge4, G_WWAAH; (Wm, Z, Wp, AH), minus_gauge4, G_WWZAH; (WHm, Ga, WHp, AH), minus_gauge4, G_WHWHAAH; (WHm, Z, WHp, AH), minus_gauge4, G_WHWHZAH; (Wm, ZH, Wp, AH), minus_gauge4, G_WWZHAH; (WHm, ZH, WHp, AH), minus_gauge4, G_WHWHZHAH; (WHm, Ga, Wp, AH), minus_gauge4, G_WHWAAH; (Wm, Ga, WHp, AH), minus_gauge4, G_WHWAAH; (WHm, Z, Wp, AH), minus_gauge4, G_WHWZAH; (Wm, Z, WHp, AH), minus_gauge4, G_WHWZAH; (WHm, ZH, Wp, AH), minus_gauge4, G_WHWZHAH; (Wm, ZH, WHp, AH), minus_gauge4, G_WHWZHAH] else []) let quartic_gauge = standard_quartic_gauge @ heavy_quartic_gauge let standard_gauge_higgs' = [ ((H, Wp, Wm), Scalar_Vector_Vector 1, G_HWW); ((H, Z, Z), Scalar_Vector_Vector 1, G_HZZ) ] let heavy_gauge_higgs = [ ((H, Wp, WHm), Scalar_Vector_Vector 1, G_HWHW); ((H, WHp, Wm), Scalar_Vector_Vector 1, G_HWHW); ((H, WHp, WHm), Scalar_Vector_Vector 1, G_HWHWH); ((H, ZH, ZH), Scalar_Vector_Vector 1, G_HWHWH); ((H, ZH, Z), Scalar_Vector_Vector 1, G_HZHZ); ((H, Wp, Wm), Scalar_Vector_Vector 1, G_HZHAH)] @ (if Flags.u1_gauged then [((H, AH, AH), Scalar_Vector_Vector 1, G_HAHAH); ((H, Z, AH), Scalar_Vector_Vector 1, G_HAHZ)] else []) let triplet_gauge_higgs = [ ((Psi0, Wp, Wm), Scalar_Vector_Vector 1, G_PsiWW); ((Psi0, WHp, WHm), Scalar_Vector_Vector (-1), G_PsiWW); ((Psi0, WHp, Wm), Scalar_Vector_Vector 1, G_PsiWHW); ((Psi0, WHm, Wp), Scalar_Vector_Vector 1, G_PsiWHW); ((Psi0, Z, Z), Scalar_Vector_Vector 1, G_PsiZZ); ((Psi0, ZH, ZH), Scalar_Vector_Vector 1, G_PsiZHZH); ((Psi0, ZH, Z), Scalar_Vector_Vector 1, G_PsiZHZ); ((Psim, Wp, Z), Scalar_Vector_Vector 1, G_PsiZW); ((Psip, Wm, Z), Scalar_Vector_Vector 1, G_PsiZW); ((Psim, WHp, Z), Scalar_Vector_Vector 1, G_PsiZWH); ((Psip, WHm, Z), Scalar_Vector_Vector 1, G_PsiZWH); ((Psim, Wp, ZH), Scalar_Vector_Vector 1, G_PsiZHW); ((Psip, Wm, ZH), Scalar_Vector_Vector 1, G_PsiZHW); ((Psim, WHp, ZH), Scalar_Vector_Vector 1, G_PsiZHWH); ((Psip, WHm, ZH), Scalar_Vector_Vector 1, G_PsiZHWH); ((Psimm, Wp, Wp), Scalar_Vector_Vector 1, G_PsippWW); ((Psipp, Wm, Wm), Scalar_Vector_Vector 1, G_PsippWW); ((Psimm, WHp, Wp), Scalar_Vector_Vector 1, G_PsippWHW); ((Psipp, WHm, Wm), Scalar_Vector_Vector 1, G_PsippWHW); ((Psimm, WHp, WHp), Scalar_Vector_Vector 1, G_PsippWHWH); ((Psipp, WHm, WHm), Scalar_Vector_Vector 1, G_PsippWHWH)] @ (if Flags.u1_gauged then [((Psi0, AH, Z), Scalar_Vector_Vector 1, G_PsiZAH); ((Psi0, AH, ZH), Scalar_Vector_Vector 1, G_PsiZHAH); ((Psi0, AH, AH), Scalar_Vector_Vector 1, G_PsiAHAH); ((Psim, Wp, AH), Scalar_Vector_Vector 1, G_PsiAHW); ((Psip, Wm, AH), Scalar_Vector_Vector 1, G_PsiAHW); ((Psim, WHp, AH), Scalar_Vector_Vector 1, G_PsiAHWH); ((Psip, WHm, AH), Scalar_Vector_Vector 1, G_PsiAHWH)] else []) let triplet_gauge2_higgs = [ ((Wp, H, Psim), Vector_Scalar_Scalar 1, G_PsiHW); ((Wm, H, Psip), Vector_Scalar_Scalar 1, G_PsiHW); ((WHp, H, Psim), Vector_Scalar_Scalar 1, G_PsiHWH); ((WHm, H, Psip), Vector_Scalar_Scalar 1, G_PsiHWH); ((Wp, Psi0, Psim), Vector_Scalar_Scalar 1, G_Psi0W); ((Wm, Psi0, Psip), Vector_Scalar_Scalar 1, G_Psi0W); ((WHp, Psi0, Psim), Vector_Scalar_Scalar 1, G_Psi0WH); ((WHm, Psi0, Psip), Vector_Scalar_Scalar 1, G_Psi0WH); ((Wp, Psi1, Psim), Vector_Scalar_Scalar 1, G_Psi1W); ((Wm, Psi1, Psip), Vector_Scalar_Scalar (-1), G_Psi1W); ((WHp, Psi1, Psim), Vector_Scalar_Scalar 1, G_Psi1WH); ((WHm, Psi1, Psip), Vector_Scalar_Scalar (-1), G_Psi1WH); ((Wp, Psip, Psimm), Vector_Scalar_Scalar 1, G_PsiPPW); ((Wm, Psim, Psipp), Vector_Scalar_Scalar 1, G_PsiPPW); ((WHp, Psip, Psimm), Vector_Scalar_Scalar 1, G_PsiPPWH); ((WHm, Psim, Psipp), Vector_Scalar_Scalar 1, G_PsiPPWH); ((Ga, Psip, Psim), Vector_Scalar_Scalar 1, Q_lepton); ((Ga, Psipp, Psimm), Vector_Scalar_Scalar 2, Q_lepton); ((Z, H, Psi1), Vector_Scalar_Scalar 1, G_Psi1HZ); ((ZH, H, Psi1), Vector_Scalar_Scalar 1, G_Psi1HZH); ((Z, Psi0, Psi1), Vector_Scalar_Scalar 1, G_Psi01Z); ((ZH, Psi0, Psi1), Vector_Scalar_Scalar 1, G_Psi01ZH); ((Z, Psip, Psim), Vector_Scalar_Scalar 1, G_ZPsip); ((Z, Psipp, Psimm), Vector_Scalar_Scalar 2, G_ZPsipp); ((ZH, Psipp, Psimm), Vector_Scalar_Scalar 2, G_ZHPsipp)] @ (if Flags.u1_gauged then [((AH, H, Psi1), Vector_Scalar_Scalar 1, G_Psi1HAH); ((AH, Psi0, Psi1), Vector_Scalar_Scalar 1, G_Psi01AH); ((AH, Psip, Psim), Vector_Scalar_Scalar 1, G_AHPsip); ((AH, Psipp, Psimm), Vector_Scalar_Scalar 2, G_AHPsip)] else []) let standard_gauge_higgs = standard_gauge_higgs' @ heavy_gauge_higgs @ triplet_gauge_higgs @ triplet_gauge2_higgs let standard_gauge_higgs4 = [ (H, H, Wp, Wm), Scalar2_Vector2 1, G_HHWW; (H, H, Z, Z), Scalar2_Vector2 1, G_HHZZ ] let littlest_gauge_higgs4 = [ (H, H, WHp, WHm), Scalar2_Vector2 (-1), G_HHWW; (H, H, ZH, ZH), Scalar2_Vector2 (-1), G_HHWW; (H, H, Wp, WHm), Scalar2_Vector2 1, G_HHWHW; (H, H, WHp, Wm), Scalar2_Vector2 1, G_HHWHW; (H, H, ZH, Z), Scalar2_Vector2 (-1), G_HHZHZ; (H, Psi0, Wp, Wm), Scalar2_Vector2 1, G_HPsi0WW; (H, Psi0, WHp, WHm), Scalar2_Vector2 (-1), G_HPsi0WW; (H, Psi0, WHp, Wm), Scalar2_Vector2 1, G_HPsi0WHW; (H, Psi0, Wp, WHm), Scalar2_Vector2 1, G_HPsi0WHW; (H, Psi0, Z, Z), Scalar2_Vector2 1, G_HPsi0ZZ; (H, Psi0, ZH, ZH), Scalar2_Vector2 1, G_HPsi0ZHZH; (H, Psi0, ZH, Z), Scalar2_Vector2 1, G_HPsi0ZHZ; (H, Psim, Wp, Ga), Scalar2_Vector2 1, G_HPsipWA; (H, Psip, Wm, Ga), Scalar2_Vector2 1, G_HPsipWA; (H, Psim, WHp, Ga), Scalar2_Vector2 1, G_HPsipWHA; (H, Psip, WHm, Ga), Scalar2_Vector2 1, G_HPsipWHA; (H, Psim, Wp, Z), Scalar2_Vector2 1, G_HPsipWZ; (H, Psip, Wm, Z), Scalar2_Vector2 1, G_HPsipWZ; (H, Psim, WHp, Z), Scalar2_Vector2 1, G_HPsipWHZ; (H, Psip, WHm, Z), Scalar2_Vector2 1, G_HPsipWHZ; (H, Psim, Wp, ZH), Scalar2_Vector2 1, G_HPsipWZH; (H, Psip, Wm, ZH), Scalar2_Vector2 1, G_HPsipWZH; (H, Psim, WHp, ZH), Scalar2_Vector2 1, G_HPsipWHZH; (H, Psip, WHm, ZH), Scalar2_Vector2 1, G_HPsipWHZH; (H, Psimm, Wp, Wp), Scalar2_Vector2 1, G_HPsippWW; (H, Psipp, Wm, Wm), Scalar2_Vector2 1, G_HPsippWW; (H, Psimm, WHp, WHp), Scalar2_Vector2 1, G_HPsippWHWH; (H, Psipp, WHm, WHm), Scalar2_Vector2 1, G_HPsippWHWH; (H, Psimm, WHp, Wp), Scalar2_Vector2 1, G_HPsippWHW; (H, Psipp, WHm, Wm), Scalar2_Vector2 1, G_HPsippWHW; (Psi0, Psi0, Wp, Wm), Scalar2_Vector2 2, G_HHWW; (Psi0, Psi0, WHp, WHm), Scalar2_Vector2 (-2), G_HHWW; (Psi0, Psi0, Z, Z), Scalar2_Vector2 4, G_HHZZ; (Psi0, Psi0, ZH, ZH), Scalar2_Vector2 1, G_Psi00ZH; (Psi0, Psi0, WHp, Wm), Scalar2_Vector2 2, G_HHWHW; (Psi0, Psi0, Wp, WHm), Scalar2_Vector2 2, G_HHWHW; (Psi0, Psi0, Z, ZH), Scalar2_Vector2 4, G_HHZHZ; (Psi0, Psim, Wp, Ga), Scalar2_Vector2 1, G_Psi0pWA; (Psi0, Psip, Wm, Ga), Scalar2_Vector2 1, G_Psi0pWA; (Psi0, Psim, WHp, Ga), Scalar2_Vector2 1, G_Psi0pWHA; (Psi0, Psip, WHm, Ga), Scalar2_Vector2 1, G_Psi0pWHA; (Psi0, Psim, Wp, Z), Scalar2_Vector2 1, G_Psi0pWZ; (Psi0, Psip, Wm, Z), Scalar2_Vector2 1, G_Psi0pWZ; (Psi0, Psim, WHp, Z), Scalar2_Vector2 1, G_Psi0pWHZ; (Psi0, Psip, WHm, Z), Scalar2_Vector2 1, G_Psi0pWHZ; (Psi0, Psim, Wp, ZH), Scalar2_Vector2 1, G_Psi0pWZH; (Psi0, Psip, Wm, ZH), Scalar2_Vector2 1, G_Psi0pWZH; (Psi0, Psim, WHp, ZH), Scalar2_Vector2 1, G_Psi0pWHZH; (Psi0, Psip, WHm, ZH), Scalar2_Vector2 1, G_Psi0pWHZH; (Psi0, Psimm, Wp, Wp), Scalar2_Vector2 1, G_Psi0ppWW; (Psi0, Psipp, Wm, Wm), Scalar2_Vector2 1, G_Psi0ppWW; (Psi0, Psimm, WHp, WHp), Scalar2_Vector2 1, G_Psi0ppWHWH; (Psi0, Psipp, WHm, WHm), Scalar2_Vector2 1, G_Psi0ppWHWH; (Psi0, Psimm, WHp, Wp), Scalar2_Vector2 1, G_Psi0ppWHW; (Psi0, Psipp, WHm, Wm), Scalar2_Vector2 1, G_Psi0ppWHW; (Psi1, Psi1, Wp, Wm), Scalar2_Vector2 2, G_HHWW; (Psi1, Psi1, WHp, WHm), Scalar2_Vector2 (-2), G_HHWW; (Psi1, Psi1, Z, Z), Scalar2_Vector2 4, G_HHZZ; (Psi1, Psi1, ZH, ZH), Scalar2_Vector2 1, G_Psi00ZH; (Psi1, Psi1, WHp, Wm), Scalar2_Vector2 2, G_HHWHW; (Psi1, Psi1, Wp, WHm), Scalar2_Vector2 2, G_HHWHW; (Psi1, Psi1, Z, ZH), Scalar2_Vector2 4, G_HHZHZ; (Psi1, Psim, Wp, Ga), Scalar2_Vector2 1, I_G_Psi0pWA; (Psi1, Psip, Wm, Ga), Scalar2_Vector2 (-1), I_G_Psi0pWA; (Psi1, Psim, WHp, Ga), Scalar2_Vector2 1, I_G_Psi0pWHA; (Psi1, Psip, WHm, Ga), Scalar2_Vector2 (-1), I_G_Psi0pWHA; (Psi1, Psim, Wp, Z), Scalar2_Vector2 1, I_G_Psi0pWZ; (Psi1, Psip, Wm, Z), Scalar2_Vector2 (-1), I_G_Psi0pWZ; (Psi1, Psim, WHp, Z), Scalar2_Vector2 1, I_G_Psi0pWHZ; (Psi1, Psip, WHm, Z), Scalar2_Vector2 (-1), I_G_Psi0pWHZ; (Psi1, Psim, Wp, ZH), Scalar2_Vector2 1, I_G_Psi0pWZH; (Psi1, Psip, Wm, ZH), Scalar2_Vector2 (-1), I_G_Psi0pWZH; (Psi1, Psim, WHp, ZH), Scalar2_Vector2 1, I_G_Psi0pWHZH; (Psi1, Psip, WHm, ZH), Scalar2_Vector2 (-1), I_G_Psi0pWHZH; (Psi1, Psimm, Wp, Wp), Scalar2_Vector2 1, I_G_Psi0ppWW; (Psi1, Psipp, Wm, Wm), Scalar2_Vector2 (-1), I_G_Psi0ppWW; (Psi1, Psimm, WHp, WHp), Scalar2_Vector2 1, I_G_Psi0ppWHWH; (Psi1, Psipp, WHm, WHm), Scalar2_Vector2 (-1), I_G_Psi0ppWHWH; (Psi1, Psimm, WHp, Wp), Scalar2_Vector2 1, I_G_Psi0ppWHW; (Psi1, Psipp, WHm, Wm), Scalar2_Vector2 (-1), I_G_Psi0ppWHW; (Psip, Psim, Wp, Wm), Scalar2_Vector2 4, G_HHWW; (Psip, Psim, WHp, WHm), Scalar2_Vector2 1, G_Psi00ZH; (Psip, Psim, WHp, Wm), Scalar2_Vector2 4, G_HHWHW; (Psip, Psim, Wp, WHm), Scalar2_Vector2 4, G_HHWHW; (Psip, Psim, Z, Z), Scalar2_Vector2 1, G_PsippZZ; (Psip, Psim, Ga, Ga), Scalar2_Vector2 2, G_AAWW; (Psip, Psim, ZH, ZH), Scalar2_Vector2 1, G_PsippZHZH; (Psip, Psim, Ga, Z), Scalar2_Vector2 4, G_PsippAZ; (Psip, Psimm, Wp, Ga), Scalar2_Vector2 1, G_PsippWA; (Psim, Psipp, Wm, Ga), Scalar2_Vector2 1, G_PsippWA; (Psip, Psimm, WHp, Ga), Scalar2_Vector2 1, G_PsippWHA; (Psim, Psipp, WHm, Ga), Scalar2_Vector2 1, G_PsippWHA; (Psip, Psimm, Wp, Z), Scalar2_Vector2 1, G_PsippWZ; (Psim, Psipp, Wm, Z), Scalar2_Vector2 1, G_PsippWZ; (Psip, Psimm, WHp, Z), Scalar2_Vector2 1, G_PsippWHZ; (Psim, Psipp, WHm, Z), Scalar2_Vector2 1, G_PsippWHZ; (Psip, Psimm, Wp, ZH), Scalar2_Vector2 1, G_PsippWZH; (Psim, Psipp, Wm, ZH), Scalar2_Vector2 1, G_PsippWZH; (Psip, Psimm, WHp, ZH), Scalar2_Vector2 1, G_PsippWHZH; (Psim, Psipp, WHm, ZH), Scalar2_Vector2 1, G_PsippWHZH; (Psipp, Psimm, Wp, Wm), Scalar2_Vector2 2, G_HHWW; (Psipp, Psimm, WHp, WHm), Scalar2_Vector2 (-2), G_HHWW; (Psipp, Psimm, WHp, Wm), Scalar2_Vector2 2, G_HHWHW; (Psipp, Psimm, Wp, WHm), Scalar2_Vector2 2, G_HHWHW; (Psipp, Psimm, Z, Z), Scalar2_Vector2 1, G_PsiccZZ; (Psipp, Psimm, Ga, Ga), Scalar2_Vector2 8, G_AAWW; (Psipp, Psimm, ZH, ZH), Scalar2_Vector2 1, G_Psi00ZH; (Psipp, Psimm, Ga, Z), Scalar2_Vector2 1, G_PsiccAZ; (Psipp, Psimm, Z, ZH), Scalar2_Vector2 4, G_PsiccZZH; (Psipp, Psimm, Ga, ZH), Scalar2_Vector2 4, G_PsiccAZH] @ (if Flags.u1_gauged then [(H, H, AH, AH), Scalar2_Vector2 1, G_HHAA; (H, H, AH, Z), Scalar2_Vector2 (-1), G_HHAHZ; (H, H, ZH, AH), Scalar2_Vector2 (-1), G_HHZHAH; (H, Psi0, AH, AH), Scalar2_Vector2 1, G_HPsi0AHAH; (H, Psi0, Z, AH), Scalar2_Vector2 1, G_HPsi0ZAH; (H, Psi0, ZH, AH), Scalar2_Vector2 1, G_HPsi0ZHAH; (H, Psim, Wp, AH), Scalar2_Vector2 1, G_HPsipWAH; (H, Psip, Wm, AH), Scalar2_Vector2 1, G_HPsipWAH; (H, Psim, WHp, AH), Scalar2_Vector2 1, G_HPsipWHAH; (H, Psip, WHm, AH), Scalar2_Vector2 1, G_HPsipWHAH; (Psi0, Psi0, AH, AH), Scalar2_Vector2 1, G_Psi00AH; (Psi0, Psi0, Z, AH), Scalar2_Vector2 4, G_HHAHZ; (Psi0, Psi0, AH, ZH), Scalar2_Vector2 1, G_Psi00ZHAH; (Psi0, Psim, Wp, AH), Scalar2_Vector2 1, G_Psi0pWAH; (Psi0, Psip, Wm, AH), Scalar2_Vector2 1, G_Psi0pWAH; (Psi0, Psim, WHp, AH), Scalar2_Vector2 1, G_Psi0pWHAH; (Psi0, Psip, WHm, AH), Scalar2_Vector2 1, G_Psi0pWHAH; (Psi1, Psi1, AH, AH), Scalar2_Vector2 1, G_Psi00AH; (Psi1, Psi1, Z, AH), Scalar2_Vector2 4, G_HHAHZ; (Psi1, Psi1, AH, ZH), Scalar2_Vector2 1, G_Psi00ZHAH; (Psi1, Psim, Wp, AH), Scalar2_Vector2 1, I_G_Psi0pWAH; (Psi1, Psip, Wm, AH), Scalar2_Vector2 (-1), I_G_Psi0pWAH; (Psi1, Psim, WHp, AH), Scalar2_Vector2 1, I_G_Psi0pWHAH; (Psi1, Psip, WHm, AH), Scalar2_Vector2 (-1), I_G_Psi0pWHAH; (Psip, Psim, AH, AH), Scalar2_Vector2 1, G_Psi00AH; (Psip, Psim, Ga, AH), Scalar2_Vector2 4, G_PsippAAH; (Psip, Psim, Z, AH), Scalar2_Vector2 4, G_PsippZAH; (Psip, Psimm, Wp, AH), Scalar2_Vector2 1, G_PsippWAH; (Psim, Psipp, Wm, AH), Scalar2_Vector2 1, G_PsippWAH; (Psip, Psimm, WHp, AH), Scalar2_Vector2 1, G_PsippWHAH; (Psim, Psipp, WHm, AH), Scalar2_Vector2 1, G_PsippWHAH; (Psipp, Psimm, AH, AH), Scalar2_Vector2 1, G_Psi00AH; (Psipp, Psimm, AH, ZH), Scalar2_Vector2 (-1), G_Psi00ZHAH; (Psipp, Psimm, Ga, AH), Scalar2_Vector2 4, G_PsiccAAH; (Psipp, Psimm, Z, AH), Scalar2_Vector2 4, G_PsiccZAH] else []) let standard_higgs = [ (H, H, H), Scalar_Scalar_Scalar 1, G_H3 ] let anomaly_higgs = [ (Eta, Gl, Gl), Dim5_Scalar_Gauge2_Skew 1, G_EGlGl; (Eta, Ga, Ga), Dim5_Scalar_Gauge2_Skew 1, G_EGaGa; (Eta, Ga, Z), Dim5_Scalar_Gauge2_Skew 1, G_EGaZ] (* @ [ (H, Ga, Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (H, Ga, Z), Dim5_Scalar_Gauge2 1, G_HGaZ ] *) let standard_higgs4 = [ (H, H, H, H), Scalar4 1, G_H4 ] let gauge_higgs = standard_gauge_higgs let gauge_higgs4 = standard_gauge_higgs4 let higgs = standard_higgs let higgs4 = standard_higgs4 let top_quartic = [ ((U (-3), H, H, U 3), GBBG (1, Psibar, S2, Psi), G_HHtt); ((Toppb, H, H, Topp), GBBG (1, Psibar, S2, Psi), G_HHthth); ((U (-3), H, H, Topp), GBBG (1, Psibar, S2LR, Psi), G_HHtht); ((Toppb, H, H, U 3), GBBG (1, Psibar, S2LR, Psi), G_HHtht)] let goldstone_vertices = [ ((Phi0, Wm, Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((Phip, Ga, Wm), Scalar_Vector_Vector 1, I_Q_W); ((Phip, Z, Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((Phim, Wp, Ga), Scalar_Vector_Vector 1, I_Q_W); ((Phim, Wp, Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_heavy_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ ThoList.flatmap quark_currents [1;2] @ heavy_top_currents @ (if Flags.u1_gauged then [] else anomaly_higgs) @ yukawa @ yukawa_add @ triple_gauge @ gauge_higgs @ higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 @ top_quartic let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> L 1 | "e+" -> L (-1) | "mu-" -> L 2 | "mu+" -> L (-2) | "tau-" -> L 3 | "tau+" -> L (-3) | "nue" -> N 1 | "nuebar" -> N (-1) | "numu" -> N 2 | "numubar" -> N (-2) | "nutau" -> N 3 | "nutaubar" -> N (-3) | "u" -> U 1 | "ubar" -> U (-1) | "c" -> U 2 | "cbar" -> U (-2) | "t" -> U 3 | "tbar" -> U (-3) | "d" -> D 1 | "dbar" -> D (-1) | "s" -> D 2 | "sbar" -> D (-2) | "b" -> D 3 | "bbar" -> D (-3) | "tp" -> Topp | "tpbar" -> Toppb | "g" -> Gl | "A" -> Ga | "Z" | "Z0" -> Z | "AH" | "AH0" | "Ah" | "Ah0" -> AH | "ZH" | "ZH0" | "Zh" | "Zh0" -> ZH | "W+" -> Wp | "W-" -> Wm | "WH+" -> WHp | "WH-" -> WHm | "H" | "h" -> H | "eta" | "Eta" -> Eta | "Psi" | "Psi0" | "psi" | "psi0" -> Psi0 | "Psi1" | "psi1" -> Psi1 | "Psi+" | "psi+" | "Psip" | "psip" -> Psip | "Psi-" | "psi-" | "Psim" | "psim" -> Psim | "Psi++" | "psi++" | "Psipp" | "psipp" -> Psipp | "Psi--" | "psi--" | "Psimm" | "psimm" -> Psimm | _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_of_string" let flavor_to_string = function | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_string" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_string" | Lodd 1 -> "l1odd-" | Lodd (-1) -> "l1odd+" | Lodd 2 -> "l2odd-" | Lodd (-2) -> "l2odd+" | Lodd 3 -> "l3odd-" | Lodd (-3) -> "l3odd+" | Lodd _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_string" | Nodd 1 -> "n1odd" | Nodd (-1) -> "n1oddbar" | Nodd 2 -> "n2odd" | Nodd (-2) -> "n2oddbar" | Nodd 3 -> "n3odd" | Nodd (-3) -> "n3oddbar" | Nodd _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_string" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_string" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_string" | Uodd 1 -> "uodd" | Uodd (-1) -> "uoddbar" | Uodd 2 -> "codd" | Uodd (-2) -> "coddbar" | Uodd 3 -> "t1odd" | Uodd (-3) -> "t1oddbar" | Uodd 4 -> "t2odd" | Uodd (-4) -> "t2oddbar" | Uodd _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_string" | Dodd 1 -> "dodd" | Dodd (-1) -> "doddbar" | Dodd 2 -> "sodd" | Dodd (-2) -> "soddbar" | Dodd 3 -> "bodd" | Dodd (-3) -> "boddbar" | Dodd _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_string" | Topp -> "tp" | Toppb -> "tpbar" | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" | ZH -> "ZH" | AH -> "AH" | WHp -> "WHp" | WHm -> "WHm" | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Eta -> "Eta" | Psi0 -> "Psi0" | Psi1 -> "Psi1" | Psip -> "Psi+" | Psim -> "Psi-" | Psipp -> "Psi++" | Psimm -> "Psi--" let flavor_to_TeX = function | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_TeX" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_TeX" | Lodd 1 -> "L_1^-" | Lodd (-1) -> "L_1^+" | Lodd 2 -> "L_2^-" | Lodd (-2) -> "L_2^+" | Lodd 3 -> "L_3^-" | Lodd (-3) -> "L_3^+" | Lodd _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_TeX" | Nodd 1 -> "N_1" | Nodd (-1) -> "\\bar{N}_1" | Nodd 2 -> "N_2" | Nodd (-2) -> "\\bar{N}_2" | Nodd 3 -> "N_3" | Nodd (-3) -> "\\bar{N}_3" | Nodd _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_TeX" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_TeX" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_TeX" | Uodd 1 -> "U" | Uodd (-1) -> "\\bar{U}" | Uodd 2 -> "C" | Uodd (-2) -> "\\bar{C}" | Uodd 3 -> "T_1" | Uodd (-3) -> "\\bar{T}_1" | Uodd 4 -> "T_2" | Uodd (-4) -> "\\bar{T}_2" | Uodd _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_TeX" | Dodd 1 -> "D" | Dodd (-1) -> "\\bar{D}" | Dodd 2 -> "S" | Dodd (-2) -> "\\bar{S}" | Dodd 3 -> "B" | Dodd (-3) -> "\\bar{B}" | Dodd _ -> invalid_arg "Modellib_BSM.Littlest_Tpar.flavor_to_TeX" | Topp -> "T^\\prime" | Toppb -> "\\bar{T}^\\prime" | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" | ZH -> "Z_H" | AH -> "\\gamma_H" | WHp -> "W_H^+" | WHm -> "W_H^-" | Phip -> "\\Phi^+" | Phim -> "\\Phi^-" | Phi0 -> "\\Phi^0" | H -> "H" | Eta -> "\\eta" | Psi0 -> "\\Psi_S" | Psi1 -> "\\Psi_P" | Psip -> "\\Psi^+" | Psim -> "\\Psi^-" | Psipp -> "\\Psi^{++}" | Psimm -> "\\Psi^{--}" let flavor_symbol = function | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | Lodd n when n > 0 -> "lodd" ^ string_of_int n | Lodd n -> "lodd" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | Nodd n when n > 0 -> "nodd" ^ string_of_int n | Nodd n -> "nodd" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" | Uodd n when n > 0 -> "uodd" ^ string_of_int n | Uodd n -> "uodd" ^ string_of_int (abs n) ^ "b" | Dodd n when n > 0 -> "dodd" ^ string_of_int n | Dodd n -> "dodd" ^ string_of_int (abs n) ^ "b" | Topp -> "tp" | Toppb -> "tpb" | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" | ZH -> "zh" | AH -> "ah" | WHp -> "whp" | WHm -> "whm" | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | Eta -> "eta" | Psi0 -> "psi0" | Psi1 -> "psi1" | Psip -> "psip" | Psim -> "psim" | Psipp -> "psipp" | Psimm -> "psimm" (* There are PDG numbers for Z', Z'', W', 32-34, respectively. We just introduce a number 38 for Y0 as a Z'''. As well, there is the number 8 for a t'. But we cheat a little bit and take the number 35 which is reserved for a heavy scalar Higgs for the Eta scalar. For the heavy Higgs states we take 35 and 36 for the neutral ones, 37 for the charged and 38 for the doubly-charged. The pseudoscalar gets the 39. For the odd fermions we add 40 to the values for the SM particles. *) let pdg = function | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n | Lodd n when n > 0 -> 49 + 2*n | Lodd n -> - 49 + 2*n | Nodd n when n > 0 -> 50 + 2*n | Nodd n -> - 50 + 2*n | Uodd n when n > 0 -> 40 + 2*n | Uodd n -> -40 + 2*n | Dodd n when n > 0 -> 39 + 2*n | Dodd n -> -39 + 2*n | Topp -> 8 | Toppb -> (-8) | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | AH -> 32 | ZH -> 33 | WHp -> 34 | WHm -> (-34) | Phip | Phim -> 27 | Phi0 -> 26 | Psi0 -> 35 | Psi1 -> 36 | Psip -> 37 | Psim -> (-37) | Psipp -> 38 | Psimm -> (-38) | H -> 25 | Eta -> 39 let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | VHeavy -> "vheavy" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Sinpsi -> "sinpsi" | Cospsi -> "cospsi" | Atpsi -> "atpsi" | Sccs -> "sccs" | Supp -> "vF" | Supp2 -> "v2F2" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | Q_Z_up -> "qzup" | G_ZHTHT -> "gzhtht" | G_ZTHT -> "gztht" | G_AHTHTH -> "gahthth" | G_AHTHT -> "gahtht" | G_AHTT -> "gahtt" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | G_CCtop -> "gcctop" | G_CC_heavy -> "gcch" | G_CC_WH -> "gccwh" | G_CC_W -> "gccw" | G_NC_h_lepton -> "gnchlep" | G_NC_h_neutrino -> "gnchneu" | G_NC_h_up -> "gnchup" | G_NC_h_down -> "gnchdwn" | G_NC_heavy -> "gnch" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | I_G_WWW -> "igwww" | I_G_AHWW -> "igahww" | I_G_ZHWW -> "igzhww" | I_G_ZWHW -> "igzwhw" | I_G_AHWHWH -> "igahwhwh" | I_G_ZHWHWH -> "igzhwhwh" | I_G_AHWHW -> "igahwhw" | I_Q_H -> "iqh" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_WH4 -> "gwh4" | G_WHWHWW -> "gwhwhww" | G_WHWWW -> "gwhwww" | G_WH3W -> "gwh3w" | G_WWAAH -> "gwwaah" | G_WWAZH -> "gwwazh" | G_WWZZH -> "gwwzzh" | G_WWZAH -> "gwwzah" | G_WHWHAAH -> "gwhwhaah" | G_WHWHAZH -> "gwhwhazh" | G_WHWHZZH -> "gwhwhzzh" | G_WHWHZAH -> "gwhwhzah" | G_WWZHAH -> "gwwzhah" | G_WHWHZHAH -> "gwhwhzhah" | G_WHWZZ -> "gwhwzz" | G_WHWAZ -> "gwhwaz" | G_WHWAAH -> "gwhwaah" | G_WHWZAH -> "gwhwzah" | G_WHWZHZH -> "gwhwzhzh" | G_WHWZHAH -> "gwhwzhah" | G_WHWAZH -> "gwhwazh" | G_WHWZZH -> "gwhwzzh" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_HWHW -> "ghwhw" | G_HWHWH -> "ghwhwh" | G_HAHAH -> "ghahah" | G_HZHZ -> "ghzhz" | G_HZHAH -> "ghzhah" | G_HAHZ -> "ghahz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_Hthth -> "ghthth" | G_Htht -> "ghtht" | G_HHtt -> "ghhtt" | G_HHthth -> "ghhthth" | G_HHtht -> "ghhtht" | G_Psi0tt -> "gpsi0tt" | G_Psi0bb -> "gpsi0bb" | G_Psi0cc -> "gpsi0cc" | G_Psi0tautau -> "gpsi0tautau" | G_Psi1tt -> "gpsi1tt" | G_Psi1bb -> "gpsi1bb" | G_Psi1cc -> "gpsi1cc" | G_Psi1tautau -> "gpsi1tautau" | G_Psipq3 -> "gpsipq3" | G_Psipq2 -> "gpsipq2" | G_Psipl3 -> "gpsipl3" | G_Psi0tth -> "gpsi0tth" | G_Psi1tth -> "gpsi1tth" | G_Psipbth -> "gpsipbth" | G_Ethth -> "gethth" | G_Etht -> "getht" | G_Ett -> "gett" | G_Ebb -> "gebb" | G_HGaGa -> "ghgaga" | G_HGaZ -> "ghgaz" | G_EGaGa -> "geaa" | G_EGaZ -> "geaz" | G_EGlGl -> "gegg" | G_H3 -> "gh3" | G_H4 -> "gh4" | G_PsiWW -> "gpsiww" | G_PsiWHW -> "gpsiwhw" | G_PsiZZ -> "gpsizz" | G_PsiZHZH -> "gpsizhzh" | G_PsiZHZ -> "gpsizhz" | G_PsiZAH -> "gpsizah" | G_PsiZHAH -> "gpsizhah" | G_PsiAHAH -> "gpsiahah" | G_PsiZW -> "gpsizw" | G_PsiZWH -> "gpsizwh" | G_PsiAHW -> "gpsiahw" | G_PsiAHWH -> "gpsiahwh" | G_PsiZHW -> "gpsizhw" | G_PsiZHWH -> "gpsizhwh" | G_PsippWW -> "gpsippww" | G_PsippWHW -> "gpsippwhw" | G_PsippWHWH -> "gpsippwhwh" | G_PsiHW -> "gpsihw" | G_PsiHWH -> "gpsihwh" | G_Psi0W -> "gpsi0w" | G_Psi0WH -> "gpsi0wh" | G_Psi1W -> "gpsi1w" | G_Psi1WH -> "gpsi1wh" | G_PsiPPW -> "gpsippw" | G_PsiPPWH -> "gpsippwh" | G_Psi1HAH -> "gpsihah" | G_Psi01AH -> "gpsi0ah" | G_AHPsip -> "gahpsip" | G_Psi1HZ -> "gpsi1hz" | G_Psi1HZH -> "gpsi1hzh" | G_Psi01Z -> "gpsi01z" | G_Psi01ZH -> "gpsi01zh" | G_ZPsip -> "gzpsip" | G_ZPsipp -> "gzpsipp" | G_ZHPsipp -> "gzhpsipp" | G_HHAA -> "ghhaa" | G_HHWHW -> "ghhwhw" | G_HHZHZ -> "ghhzhz" | G_HHAHZ -> "ghhahz" | G_HHZHAH -> "ghhzhah" | G_HPsi0WW -> "ghpsi0ww" | G_HPsi0WHW -> "ghpsi0whw" | G_HPsi0ZZ -> "ghpsi0zz" | G_HPsi0ZHZH -> "ghpsi0zhzh" | G_HPsi0ZHZ -> "ghpsi0zhz" | G_HPsi0AHAH -> "ghpsi0ahah" | G_HPsi0ZAH -> "ghpsi0zah" | G_HPsi0ZHAH -> "ghpsi0zhah" | G_HPsipWA -> "ghpsipwa" | G_HPsipWHA -> "ghpsipwha" | G_HPsipWZ -> "ghpsipwz" | G_HPsipWHZ -> "ghpsiwhz" | G_HPsipWAH -> "ghpsipwah" | G_HPsipWHAH -> "ghpsipwhah" | G_HPsipWZH -> "ghpsipwzh" | G_HPsipWHZH -> "ghpsipwhzh" | G_HPsippWW -> "ghpsippww" | G_HPsippWHWH -> "ghpsippwhwh" | G_HPsippWHW -> "ghpsippwhw" | G_Psi00ZH -> "gpsi00zh" | G_Psi00AH -> "gpsi00ah" | G_Psi00ZHAH -> "gpsi00zhah" | G_Psi0pWA -> "gpsi0pwa" | G_Psi0pWHA -> "gpsi0pwha" | G_Psi0pWZ -> "gpsi0pwz" | G_Psi0pWHZ -> "gpsi0pwhz" | G_Psi0pWAH -> "gpsi0pwah" | G_Psi0pWHAH -> "gpsi0pwhah" | G_Psi0pWZH -> "gpsi0pwzh" | G_Psi0pWHZH -> "gpsi0pwhzh" | G_Psi0ppWW -> "gpsi0ppww" | G_Psi0ppWHWH -> "gpsi0ppwhwh" | G_Psi0ppWHW -> "gpsi0ppwhw" | I_G_Psi0pWA -> "i_gpsi0pwa" | I_G_Psi0pWHA -> "i_gpsi0pwha" | I_G_Psi0pWZ -> "i_gpsi0pwz" | I_G_Psi0pWHZ -> "i_gpsi0pwhz" | I_G_Psi0pWAH -> "i_gpsi0pwah" | I_G_Psi0pWHAH -> "i_gpsi0pwhah" | I_G_Psi0pWZH -> "i_gpsi0pwzh" | I_G_Psi0pWHZH -> "i_gpsi0pwhzh" | I_G_Psi0ppWW -> "i_gpsi0ppww" | I_G_Psi0ppWHWH -> "i_gpsi0ppwhwh" | I_G_Psi0ppWHW -> "i_gpsi0ppwhw" | G_PsippZZ -> "gpsippzz" | G_PsippZHZH -> "gpsippzhzh" | G_PsippAZ -> "gpsippaz" | G_PsippAAH -> "gpsippaah" | G_PsippZAH -> "gpsippzah" | G_PsippWA -> "gpsippwa" | G_PsippWHA -> "gpsippwha" | G_PsippWZ -> "gpsippwz" | G_PsippWHZ -> "gpsippwhz" | G_PsippWAH -> "gpsippwah" | G_PsippWHAH -> "gpsippwhah" | G_PsippWZH -> "gpsippwzh" | G_PsippWHZH -> "gpsippwhzh" | G_PsiccZZ -> "gpsicczz" | G_PsiccAZ -> "gpsiccaz" | G_PsiccAAH -> "gpsiccaah" | G_PsiccZZH -> "gpsicczzh" | G_PsiccAZH -> "gpsiccazh" | G_PsiccZAH -> "gpsicczah" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end module Simplest (Flags : BSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] (* We do not introduce the Goldstones for the heavy vectors here. The heavy quarks are simply numerated by their generation, the assignments whether they are up- or down-type will be defined by the model. *) type flavor = L of int | N of int | U of int | D of int | QH of int | NH of int | Wp | Wm | Ga | Z | Xp | Xm | X0 | Y0 | ZH | Phip | Phim | Phi0 | H | Eta | Gl type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.Simplest.gauge_symbol: internal error" let family n = [ L n; N n; U n; D n; QH n; NH n ] (* Note that we add all heavy quarks, [U], [D], [C], [S], in order to have both embeddings included. *) let external_flavors () = [ "1st Generation (incl. heavy)", ThoList.flatmap family [1; -1]; "2nd Generation (incl. heavy)", ThoList.flatmap family [2; -2]; "3rd Generation (incl. heavy)", ThoList.flatmap family [3; -3]; "Gauge Bosons", [Ga; Z; Wp; Wm; Gl; Xp; Xm; X0; Y0; ZH]; "Higgs", [H; Eta]; "Goldstone Bosons", [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n | QH n -> spinor n | NH n -> spinor n | Ga | Gl -> Vector | Wp | Wm | Z | Xp | Xm | X0 | Y0 | ZH -> Massive_Vector | _ -> Scalar let color = function | U n -> Color.SUN (if n > 0 then 3 else -3) | D n -> Color.SUN (if n > 0 then 3 else -3) | QH n -> Color.SUN (if n > 0 then 3 else -3) | Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n | QH n -> prop_spinor n | NH n -> prop_spinor n | Ga | Gl -> Prop_Feynman | Wp | Wm | Z | Xp | Xm | X0 | Y0 | ZH -> Prop_Unitarity | Phip | Phim | Phi0 -> Only_Insertion | H | Eta -> Prop_Scalar (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | Wp | Wm | U 3 | U (-3) | QH _ | NH _ -> Fudged | _ -> !default_width else !default_width let goldstone = function - | Wp -> Some (Phip, Coupling.Const 1) - | Wm -> Some (Phim, Coupling.Const 1) - | Z -> Some (Phi0, Coupling.Const 1) + | Wp -> Some (Phip, Coupling.Integer 1) + | Wm -> Some (Phim, Coupling.Integer 1) + | Z -> Some (Phi0, Coupling.Integer 1) | _ -> None let conjugate = function | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) | QH n -> QH (-n) | NH n -> NH (-n) | Ga -> Ga | Gl -> Gl | Z -> Z | Wp -> Wm | Wm -> Wp | Xp -> Xm | Xm -> Xp | X0 -> X0 | Y0 -> Y0 | ZH -> ZH | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | Eta -> Eta let fermion = function | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 | QH n -> if n > 0 then 1 else -1 | NH n -> if n > 0 then 1 else -1 | Ga | Gl | Z | Wp | Wm | Xp | Xm | X0 | Y0 | ZH -> 0 | _ -> 0 module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let charge = function | L n -> if n > 0 then -1//1 else 1//1 | N n | NH n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | QH 3 -> 2//3 | QH (-3) -> -2//3 | QH (1|2) -> if Flags.anom_ferm_ass then 2//3 else -1//3 | QH ((-1)|(-2)) -> if Flags.anom_ferm_ass then -2//3 else 1//3 | QH n -> invalid_arg ("Simplest.charge: QH " ^ string_of_int n) | D n -> if n > 0 then -1//3 else 1//3 | Gl | Ga | Z | ZH | X0 | Y0 -> 0//1 | Wp | Xp -> 1//1 | Wm | Xm -> -1//1 | H | Phi0 | Eta -> 0//1 | Phip -> 1//1 | Phim -> -1//1 let lepton = function | L n | N n | NH n -> if n > 0 then 1//1 else -1//1 | U _ | D _ | _ -> 0//1 let baryon = function | L _ | N _ -> 0//1 | U n | D n | QH n -> if n > 0 then 1//1 else -1//1 | _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | VHeavy | Supp | Supp2 | Sinpsi | Cospsi | Atpsi | Sccs (* Mixing angles of SU(2) *) | Q_lepton | Q_up | Q_down | Q_Z_up | G_CC | I_G_CC | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_NC_X | G_NC_X_t | G_NC_Y | G_NC_Y_t | G_NC_H | G_NC_h_neutrino | G_NC_h_lepton | G_NC_h_up | G_NC_h_down | G_NC_h_top | G_NC_h_bot | G_NCH_N | G_NCH_U | G_NCH_D | G_NCHt | G_zhthth | I_Q_W | I_G_ZWW | I_G_WWW | I_G_Z1 | I_G_Z2 | I_G_Z3 | I_G_Z4 | I_G_Z5 | I_G_Z6 | I_Q_H | Gs | I_Gs | G2 | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | I_Q_ZH | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_HHZZH | G_heavy_HVV | G_heavy_HWW | G_heavy_HZZ | G_HHthth | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_H3 | G_H4 | G_Hthth | G_Htht | G_Ethth | G_Etht | G_Ett | G_Hqhq | G_Ebb | G_ZEH | G_ZHEH | G_Hgg | G_HGaGa | G_HGaZ | G_EGaGa | G_EGaZ | G_EGlGl | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) (* \begin{dubious} The current abstract syntax for parameter dependencies is admittedly tedious. Later, there will be a parser for a convenient concrete syntax as a part of a concrete syntax for models. But as these examples show, it should include simple functions. \end{dubious} *) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)); - nc_coupling G_NC_h_neutrino half (Const 0); - nc_coupling G_NC_h_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_h_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_h_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)); + nc_coupling G_NC_h_neutrino half (Integer 0); + nc_coupling G_NC_h_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_h_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_h_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let electromagnetic_currents n = [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = [ ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs); ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((QH (-n), Gl, QH n), FBF ((-1), Psibar, V, Psi), Gs)] let neutral_currents n = [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] let xy_currents = ThoList.flatmap (fun n -> [ ((N (-n), X0, N n), FBF ((-1), Psibar, VL, Psi), G_NC_X); ((L (-n), Xm, N n), FBF ((-1), Psibar, VL, Psi), G_NC_X); ((N (-n), Xp, L n), FBF ((-1), Psibar, VL, Psi), G_NC_X); ((N (-n), Y0, N n), FBF ((-1), Psibar, VL, Psi), G_NC_Y); ((NH (-n), X0, N n), FBF ((-1), Psibar, VL, Psi), G_CC); ((N (-n), X0, NH n), FBF ((-1), Psibar, VL, Psi), G_CC); ((NH (-n), Y0, N n), FBF ((-1), Psibar, VL, Psi), I_G_CC); ((N (-n), Y0, NH n), FBF ((-1), Psibar, VL, Psi), I_G_CC); ((L (-n), Xm, NH n), FBF ((-1), Psibar, VL, Psi), G_CC); ((NH (-n), Xp, L n), FBF ((-1), Psibar, VL, Psi), G_CC)]) [1;2;3] @ [ ((U (-3), X0, U 3), FBF (1, Psibar, VL, Psi), G_NC_X_t); ((U (-3), Y0, U 3), FBF (1, Psibar, VL, Psi), G_NC_Y_t); ((U (-3), X0, QH 3), FBF (1, Psibar, VL, Psi), G_CC); ((QH (-3), X0, U 3), FBF (1, Psibar, VL, Psi), G_CC); ((U (-3), Y0, QH 3), FBF (1, Psibar, VL, Psi), I_G_CC); ((QH (-3), Y0, U 3), FBF (1, Psibar, VL, Psi), I_G_CC); ((D (-3), Xm, U 3), FBF (1, Psibar, VL, Psi), G_NC_X_t); ((U (-3), Xp, D 3), FBF (1, Psibar, VL, Psi), G_NC_X_t); ((D (-3), Xm, QH 3), FBF (1, Psibar, VL, Psi), G_CC); ((QH (-3), Xp, D 3), FBF (1, Psibar, VL, Psi), G_CC); ((QH (-3), Wp, D 3), FBF (1, Psibar, VL, Psi), G_NC_X_t); ((D (-3), Wm, QH 3), FBF (1, Psibar, VL, Psi), G_NC_X_t); ((QH (-3), Z, U 3), FBF (1, Psibar, VL, Psi), G_NCHt); ((U (-3), Z, QH 3), FBF (1, Psibar, VL, Psi), G_NCHt)] @ ThoList.flatmap (fun n -> if Flags.anom_ferm_ass then [ ((U (-n), X0, U n), FBF ((-1), Psibar, VL, Psi), G_NC_X); ((U (-n), Y0, U n), FBF ((-1), Psibar, VL, Psi), G_NC_Y); ((D (-n), Xm, U n), FBF ((-1), Psibar, VL, Psi), G_NC_X); ((U (-n), Xp, D n), FBF ((-1), Psibar, VL, Psi), G_NC_X); ((QH (-n), X0, U n), FBF ((-1), Psibar, VL, Psi), G_CC); ((U (-n), X0, QH n), FBF ((-1), Psibar, VL, Psi), G_CC); ((QH (-n), Y0, U n), FBF ((-1), Psibar, VL, Psi), I_G_CC); ((U (-n), Y0, QH n), FBF ((-1), Psibar, VL, Psi), I_G_CC); ((D (-n), Xm, QH n), FBF ((-1), Psibar, VL, Psi), G_CC); ((QH (-n), Xp, D n), FBF ((-1), Psibar, VL, Psi), G_CC); ((QH (-n), Wp, D n), FBF ((-1), Psibar, VL, Psi), G_NC_X); ((D (-n), Wm, QH n), FBF ((-1), Psibar, VL, Psi), G_NC_X); ((QH (-n), Z, U n), FBF (1, Psibar, VL, Psi), G_NC_H); ((U (-n), Z, QH n), FBF (1, Psibar, VL, Psi), G_NC_H)] else [ ((D (-n), X0, D n), FBF (1, Psibar, VL, Psi), G_NC_X); ((D (-n), Y0, D n), FBF (1, Psibar, VL, Psi), G_NC_Y); ((D (-n), Xm, U n), FBF (1, Psibar, VL, Psi), G_NC_X); ((U (-n), Xp, D n), FBF (1, Psibar, VL, Psi), G_NC_X); ((QH (-n), X0, D n), FBF ((-1), Psibar, VL, Psi), G_CC); ((D (-n), X0, QH n), FBF ((-1), Psibar, VL, Psi), G_CC); ((QH (-n), Y0, D n), FBF ((-1), Psibar, VL, Psi), I_G_CC); ((D (-n), Y0, QH n), FBF ((-1), Psibar, VL, Psi), I_G_CC); ((QH (-n), Xm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Xp, QH n), FBF (1, Psibar, VL, Psi), G_CC); ((QH (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_NC_X); ((U (-n), Wp, QH n), FBF (1, Psibar, VL, Psi), G_NC_X); ((QH (-n), Z, D n), FBF (1, Psibar, VL, Psi), G_NC_H); ((D (-n), Z, QH n), FBF (1, Psibar, VL, Psi), G_NC_H)]) [1; 2] (* The sign of this coupling is just the one of the T3, being -(1/2) for leptons and down quarks, and +(1/2) for neutrinos and up quarks. *) let neutral_heavy_currents n = [ ((L (-n), ZH, L n), FBF (1, Psibar, VLR, Psi), G_NC_h_lepton); ((N (-n), ZH, N n), FBF ((-1), Psibar, VLR, Psi), G_NC_h_neutrino); ((U (-n), ZH, U n), FBF ((-1), Psibar, VLR, Psi), (if n = 3 then G_NC_h_top else G_NC_h_up)); ((D (-n), ZH, D n), FBF (1, Psibar, VLR, Psi), (if n = 3 then G_NC_h_bot else G_NC_h_down)); ((NH (-n), ZH, NH n), FBF (1, Psibar, VLR, Psi), G_NCH_N); ((QH (-n), ZH, QH n), FBF (1, Psibar, VLR, Psi), (if n = 3 then G_NCH_U else if Flags.anom_ferm_ass then G_NCH_U else G_NCH_D))] let heavy_currents n = [ ((QH (-n), Ga, QH n), FBF (1, Psibar, V, Psi), (if n=3 then Q_up else if Flags.anom_ferm_ass then Q_up else Q_down))] let charged_currents n = [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let yukawa = [ ((U (-3), H, U 3), FBF (1, Psibar, S, Psi), G_Htt); ((D (-3), H, D 3), FBF (1, Psibar, S, Psi), G_Hbb); ((U (-2), H, U 2), FBF (1, Psibar, S, Psi), G_Hcc); ((L (-3), H, L 3), FBF (1, Psibar, S, Psi), G_Htautau) ] let yukawa_add = [ ((QH (-3), H, U 3), FBF (1, Psibar, SL, Psi), G_Htht); ((U (-3), H, QH 3), FBF (1, Psibar, SR, Psi), G_Htht); ((QH (-3), Eta, U 3), FBF (1, Psibar, SR, Psi), G_Etht); ((U (-3), Eta, QH 3), FBF (1, Psibar, SL, Psi), G_Etht); ((D (-3), Eta, D 3), FBF (1, Psibar, P, Psi), G_Ebb); ((U (-3), Eta, U 3), FBF (1, Psibar, P, Psi), G_Ett)] @ ThoList.flatmap (fun n -> if Flags.anom_ferm_ass then [ ((QH (-n), H, U n), FBF (1, Psibar, SL, Psi), G_Hqhq); ((U (-n), H, QH n), FBF (1, Psibar, SR, Psi), G_Hqhq)] else [ ((QH (-n), H, D n), FBF (1, Psibar, SL, Psi), G_Hqhq); ((D (-n), H, QH n), FBF (1, Psibar, SR, Psi), G_Hqhq)]) [1;2] let standard_triple_gauge = [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] let heavy_triple_gauge = [ ((Ga, Xm, Xp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Xm, Xp), Gauge_Gauge_Gauge 1, I_Q_ZH); ((Z, X0, Y0), Gauge_Gauge_Gauge 1, I_G_Z1); ((ZH, X0, Y0), Gauge_Gauge_Gauge 1, I_G_Z2); ((Y0, Wm, Xp), Gauge_Gauge_Gauge 1, I_G_Z3); ((Y0, Wp, Xm), Gauge_Gauge_Gauge (-1), I_G_Z3); ((X0, Wm, Xp), Gauge_Gauge_Gauge 1, I_G_Z4); ((X0, Wp, Xm), Gauge_Gauge_Gauge 1, I_G_Z4); ((ZH, Xm, Xp), Gauge_Gauge_Gauge 1, I_G_Z5); ((ZH, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_Z6)] let triple_gauge = standard_triple_gauge @ heavy_triple_gauge let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2] let heavy_quartic_gauge = [] let quartic_gauge = standard_quartic_gauge @ heavy_quartic_gauge let standard_gauge_higgs' = [ ((H, Wp, Wm), Scalar_Vector_Vector 1, G_HWW); ((H, Z, Z), Scalar_Vector_Vector 1, G_HZZ) ] let heavy_gauge_higgs = [ ((H, Wp, Xm), Scalar_Vector_Vector 1, G_heavy_HWW); ((H, Wm, Xp), Scalar_Vector_Vector 1, G_heavy_HWW); ((H, Z, X0), Scalar_Vector_Vector 1, G_heavy_HVV); ((H, ZH, X0), Scalar_Vector_Vector 1, G_heavy_HVV)] let standard_gauge_higgs = standard_gauge_higgs' @ heavy_gauge_higgs let standard_gauge_higgs4 = [ (H, H, Wp, Wm), Scalar2_Vector2 1, G_HHWW; (H, H, Z, Z), Scalar2_Vector2 1, G_HHZZ ] let heavy_gauge_higgs4 = [ (H, H, Z, ZH), Scalar2_Vector2 1, G_HHZZH; (H, H, Xp, Xm), Scalar2_Vector2 (-1), G_HHWW; (H, H, ZH, ZH), Scalar2_Vector2 (-1), G_HHZZ ] let standard_higgs = [ (H, H, H), Scalar_Scalar_Scalar 1, G_H3 ] let anomaly_higgs = [ (Eta, Gl, Gl), Dim5_Scalar_Gauge2_Skew 1, G_EGlGl; (Eta, Ga, Ga), Dim5_Scalar_Gauge2_Skew 1, G_EGaGa; (Eta, Ga, Z), Dim5_Scalar_Gauge2_Skew 1, G_EGaZ ] (* @ [ (H, Ga, Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (H, Ga, Z), Dim5_Scalar_Gauge2 1, G_HGaZ ] *) let standard_higgs4 = [ (H, H, H, H), Scalar4 1, G_H4 ] let gauge_higgs = standard_gauge_higgs let gauge_higgs4 = standard_gauge_higgs4 @ heavy_gauge_higgs4 let higgs = standard_higgs let eta_higgs_gauge = [ (Z, Eta, H), Vector_Scalar_Scalar 1, G_ZEH; (ZH, Eta, H), Vector_Scalar_Scalar 1, G_ZHEH; (X0, Eta, H), Vector_Scalar_Scalar 1, G_CC ] let top_quartic = [ ((QH (-3), H, H, QH 3), GBBG (1, Psibar, S2, Psi), G_HHthth)] let higgs4 = standard_higgs4 let goldstone_vertices = [ ((Phi0, Wm, Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((Phip, Ga, Wm), Scalar_Vector_Vector 1, I_Q_W); ((Phip, Z, Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((Phim, Wp, Ga), Scalar_Vector_Vector 1, I_Q_W); ((Phim, Wp, Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap neutral_heavy_currents [1;2;3] @ ThoList.flatmap heavy_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ xy_currents @ anomaly_higgs @ eta_higgs_gauge @ yukawa @ yukawa_add @ triple_gauge @ gauge_higgs @ higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> L 1 | "e+" -> L (-1) | "mu-" -> L 2 | "mu+" -> L (-2) | "tau-" -> L 3 | "tau+" -> L (-3) | "nue" -> N 1 | "nuebar" -> N (-1) | "numu" -> N 2 | "numubar" -> N (-2) | "nutau" -> N 3 | "nutaubar" -> N (-3) | "nh1" -> NH 1 | "nh1bar" -> NH (-1) | "nh2" -> NH 2 | "nh2bar" -> NH (-2) | "nh3" -> NH 3 | "nh3bar" -> NH (-3) | "u" -> U 1 | "ubar" -> U (-1) | "c" -> U 2 | "cbar" -> U (-2) | "t" -> U 3 | "tbar" -> U (-3) | "d" -> D 1 | "dbar" -> D (-1) | "s" -> D 2 | "sbar" -> D (-2) | "b" -> D 3 | "bbar" -> D (-3) | "uh" -> if Flags.anom_ferm_ass then QH 1 else invalid_arg "Modellib_BSM.Simplest.flavor_of_string" | "dh" -> if Flags.anom_ferm_ass then invalid_arg "Modellib_BSM.Simplest.flavor_of_string" else QH 1 | "uhbar" -> if Flags.anom_ferm_ass then QH (-1) else invalid_arg "Modellib_BSM.Simplest.flavor_of_string" | "dhbar" -> if Flags.anom_ferm_ass then invalid_arg "Modellib_BSM.Simplest.flavor_of_string" else QH (-1) | "ch" -> if Flags.anom_ferm_ass then QH 2 else invalid_arg "Modellib_BSM.Simplest.flavor_of_string" | "sh" -> if Flags.anom_ferm_ass then invalid_arg "Modellib_BSM.Simplest.flavor_of_string" else QH 2 | "chbar" -> if Flags.anom_ferm_ass then QH (-2) else invalid_arg "Modellib_BSM.Simplest.flavor_of_string" | "shbar" -> if Flags.anom_ferm_ass then invalid_arg "Modellib_BSM.Simplest.flavor_of_string" else QH (-2) | "th" -> QH 3 | "thbar" -> QH (-3) | "eta" | "Eta" -> Eta | "A" -> Ga | "Z" | "Z0" -> Z | "g" | "gl" -> Gl | "ZH" | "ZH0" | "Zh" | "Zh0" -> ZH | "W+" -> Wp | "W-" -> Wm | "X+" -> Xp | "X-" -> Xm | "X0" -> X0 | "Y0" -> Y0 | "H" -> H | _ -> invalid_arg "Modellib_BSM.Simplest.flavor_of_string" let flavor_to_string = function | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_string: invalid down type quark" | QH 1 -> if Flags.anom_ferm_ass then "uh" else "dh" | QH 2 -> if Flags.anom_ferm_ass then "ch" else "sh" | QH 3 -> "th" | QH (-1) -> if Flags.anom_ferm_ass then "uhbar" else "dhbar" | QH (-2) -> if Flags.anom_ferm_ass then "chbar" else "shbar" | QH (-3) -> "thbar" | QH _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_string: invalid heavy quark" | NH n when n > 0 -> "nh" ^ string_of_int n | NH n -> "nh" ^ string_of_int (abs n) ^ "bar" | Ga -> "A" | Z -> "Z" | Gl -> "gl" | Wp -> "W+" | Wm -> "W-" | Xp -> "X+" | Xm -> "X-" | X0 -> "X0" | Y0 -> "Y0" | ZH -> "ZH" | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Eta -> "Eta" let flavor_to_TeX = function | L 1 -> "e^-" | L (-1) -> "\\e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_TeX: invalid down type quark" | QH 1 -> if Flags.anom_ferm_ass then "U" else "D" | QH 2 -> if Flags.anom_ferm_ass then "C" else "S" | QH 3 -> "T" | QH (-1) -> if Flags.anom_ferm_ass then "\\bar{U}" else "\\bar{D}" | QH (-2) -> if Flags.anom_ferm_ass then "\\bar{C}" else "\\bar{S}" | QH (-3) -> "thbar" | QH _ -> invalid_arg "Modellib_BSM.Simplest.flavor_to_TeX: invalid heavy quark" | NH n when n > 0 -> "N_" ^ string_of_int n | NH n -> "\\bar{N}_" ^ string_of_int (abs n) | Ga -> "\\gamma" | Z -> "Z" | Gl -> "g" | Wp -> "W^+" | Wm -> "W^-" | Xp -> "X^+" | Xm -> "X^-" | X0 -> "X^0" | Y0 -> "Y^0" | ZH -> "Z_H" | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H -> "H" | Eta -> "\\eta" let flavor_symbol = function | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" | NH n when n > 0 -> "nh" ^ string_of_int n | NH n -> "nh" ^ string_of_int (abs n) ^ "b" | QH n when n > 0 -> "qh" ^ string_of_int n | QH n -> "qh" ^ string_of_int (abs n) ^ "b" | Ga -> "a" | Z -> "z" | Gl -> "gl" | Wp -> "wp" | Wm -> "wm" | Xp -> "xp" | Xm -> "xm" | X0 -> "x0" | Y0 -> "y0" | ZH -> "zh" | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | Eta -> "eta" (* There are PDG numbers for Z', Z'', W', 32-34, respectively. We just introduce a number 38 for Y0 as a Z'''. As well, there is the number 8 for a t'. But we cheat a little bit and take the number 35 which is reserved for a heavy scalar Higgs for the Eta scalar. We abuse notation for the heavy quarks and take the PDG code for their SUSY partners!!! (What about an update of the PDG numbering scheme?) Thereby we take only those for up-type (s)quarks. The heavy neutrinos get the numbers of the sneutrinos. *) let pdg = function | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n | NH n when n > 0 -> 1000010 + 2*n | NH n -> - 1000010 + 2*n | QH 3 -> 1000006 | QH (-3) -> - 1000006 | QH n when n > 0 -> if Flags.anom_ferm_ass then 1000000 + 2*n else 999999 + 2*n | QH n -> if Flags.anom_ferm_ass then - 1000000 + 2*n else - 999999 + 2*n | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | Xp -> 34 | Xm -> (-34) | ZH -> 32 | X0 -> 33 | Y0 -> 38 | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | Eta -> 36 (* As in the case of SUSY we introduce an internal dummy pdf code in order to have manageable arrays. Heavy neutrinos get numbers 41,43,45, while the heavy quarks have the numbers 40,42,44. I take them all as up type here. *) let pdg_mw = function | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n | NH n when n > 0 -> 39 + 2*n | NH n -> - 39 + 2*n | QH n when n > 0 -> 38 + 2*n | QH n -> - 38 + 2*n | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | Xp -> 34 | Xm -> (-34) | ZH -> 32 | X0 -> 33 | Y0 -> 38 | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | Eta -> 36 let mass_symbol f = "mass(" ^ string_of_int (abs (pdg_mw f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg_mw f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | VHeavy -> "vheavy" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Sinpsi -> "sinpsi" | Cospsi -> "cospsi" | Atpsi -> "atpsi" | Sccs -> "sccs" | Supp -> "vF" | Supp2 -> "v2F2" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | Q_Z_up -> "qzup" | G_zhthth -> "gzhthth" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_NC_X -> "gncx" | G_NC_X_t -> "gncxt" | G_NC_Y -> "gncy" | G_NC_Y_t -> "gncyt" | G_NC_H -> "gnch" | G_CC -> "gcc" | I_G_CC -> "i_gcc" | G_NC_h_lepton -> "gnchlep" | G_NC_h_neutrino -> "gnchneu" | G_NC_h_up -> "gnchup" | G_NC_h_down -> "gnchdwn" | G_NC_h_top -> "gnchtop" | G_NC_h_bot -> "gnchbot" | G_NCH_N -> "gnchn" | G_NCH_U -> "gnchu" | G_NCH_D -> "gnchd" | G_NCHt -> "gncht" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | I_G_WWW -> "igwww" | I_Q_H -> "iqh" | I_Q_ZH -> "iqzh" | I_G_Z1 -> "igz1" | I_G_Z2 -> "igz2" | I_G_Z3 -> "igz3" | I_G_Z4 -> "igz4" | I_G_Z5 -> "igz5" | I_G_Z6 -> "igz6" | G_HHthth -> "ghhthth" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_heavy_HVV -> "ghyhvv" | G_heavy_HWW -> "ghyhww" | G_heavy_HZZ -> "ghyhzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_HHZZH -> "ghhzzh" | G_Hgg -> "ghgg" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_Hthth -> "ghthth" | G_Htht -> "ghtht" | G_Hqhq -> "ghqhq" | G_Ethth -> "gethth" | G_Etht -> "getht" | G_Ett -> "gett" | G_Ebb -> "gebb" | G_HGaGa -> "ghgaga" | G_HGaZ -> "ghgaz" | G_EGaGa -> "geaa" | G_EGaZ -> "geaz" | G_EGlGl -> "gegg" | G_ZEH -> "gzeh" | G_ZHEH -> "gzheh" | G_H3 -> "gh3" | G_H4 -> "gh4" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" end module Xdim (Flags : BSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | H | Grav type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.Xdim.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Higgs", List.map other [H]; "Graviton", List.map other [Grav]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> begin match f with | Grav -> Tensor_2 | _ -> Scalar end let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H -> Prop_Scalar | Grav -> Prop_Tensor_2 end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) | O Grav -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | Grav -> Grav end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("Xdim.generation': " ^ string_of_int n) let generation f = match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Phi0 | Grav -> 0//1 | Phip -> 1//1 | Phim -> -1//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_CCQ of int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | Gs | I_Gs | G2 | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_H3 | G_H4 | G_HGaZ | G_HGaGa | G_Hgg | G_Grav | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] let charged_currents n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let gravity_currents n = List.map mom [ ((L (-n), Grav, L n), Graviton_Spinor_Spinor 1, G_Grav); ((N (-n), Grav, N n), Graviton_Spinor_Spinor 1, G_Grav); ((U (-n), Grav, U n), Graviton_Spinor_Spinor 1, G_Grav); ((D (-n), Grav, D n), Graviton_Spinor_Spinor 1, G_Grav) ] let yukawa = List.map mom [ ((U (-3), H, U 3), FBF (1, Psibar, S, Psi), G_Htt); ((D (-3), H, D 3), FBF (1, Psibar, S, Psi), G_Hbb); ((U (-2), H, U 2), FBF (1, Psibar, S, Psi), G_Hcc); ((L (-3), H, L 3), FBF (1, Psibar, S, Psi), G_Htautau) ] let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let standard_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs) ] let triple_gauge = standard_triple_gauge let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2] let quartic_gauge = standard_quartic_gauge let gravity_gauge = [ (O Grav, G Z, G Z), Graviton_Vector_Vector 1, G_Grav; (O Grav, G Wp, G Wm), Graviton_Vector_Vector 1, G_Grav; (O Grav, G Ga, G Ga), Graviton_Vector_Vector 1, G_Grav; (O Grav, G Gl, G Gl), Graviton_Vector_Vector 1, G_Grav ] let standard_gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ) ] let standard_gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let standard_higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let standard_higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let gravity_higgs = [ (O Grav, O H, O H), Graviton_Scalar_Scalar 1, G_Grav] let anomalous_gauge_higgs = [] let anomalous_gauge_higgs4 = [] let anomalous_higgs = [] let anomaly_higgs = [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ; (O H, G Gl, G Gl), Dim5_Scalar_Gauge2 1, G_Hgg ] let anomalous_higgs4 = [] let gauge_higgs = standard_gauge_higgs let gauge_higgs4 = standard_gauge_higgs4 let higgs = standard_higgs @ gravity_higgs let higgs4 = standard_higgs4 let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ ThoList.flatmap gravity_currents [1;2;3] @ yukawa @ triple_gauge @ gravity_gauge @ gauge_higgs @ higgs @ anomaly_higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | "GG" -> O Grav | _ -> invalid_arg "Modellib_BSM.Xdim.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.Xdim.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.Xdim.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.Xdim.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.Xdim.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Grav -> "GG" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.Xdim.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.Xdim.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.Xdim.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.Xdim.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H -> "H" | Grav -> "G" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | Grav -> "gv" end let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | Grav -> 39 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | G_CC -> "gcc" | G_CCQ (n1,n2) -> "gccq" ^ string_of_int n1 ^ string_of_int n2 | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_HGaZ -> "ghgaz" | G_HGaGa -> "ghgaga" | G_Hgg -> "ghgg" | G_H3 -> "gh3" | G_H4 -> "gh4" | G_Grav -> "ggrav" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end module UED (Flags : BSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type matter_field = L of int | N of int | U of int | D of int | L_K1_L of int | L_K1_R of int | N_K1 of int | L_K2_L of int | L_K2_R of int | N_K2 of int | U_K1_L of int | U_K2_L of int | D_K1_L of int | D_K2_L of int | U_K1_R of int | U_K2_R of int | D_K1_R of int | D_K2_R of int type gauge_boson = Ga | Wp | Wm | Z | Gl | Gl_K1 | Gl_K2 | B1 | B2 | Z1 | Z2 | Wp1 | Wm1 | Wp2 | Wm2 type other = Phip | Phim | Phi0 | H | H1up | H1um | H1dp | H1dm | H2up |H2um | H2dp |H2dm | Grav type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.UED.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n; L_K1_L n; L_K1_R n; L_K2_L n; L_K2_R n; N_K1 n; N_K2 n; U_K1_L n; U_K2_L n; D_K1_L n; D_K2_L n; U_K1_R n; U_K2_R n; D_K1_R n; D_K2_R n] (* We don't introduce a special index for the higher excitations but make them parts of the particles' names. *) let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl; Gl_K1; Gl_K2; B1; B2; Z1; Z2; Wp1 ; Wm1; Wp2; Wm2]; "Higgs", List.map other [H; H1up; H1um; H1dp; H1dm; H2up; H2um; H2dp; H2dm]; "Graviton", List.map other [Grav]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n | L_K1_L n -> spinor n | L_K1_R n -> spinor n | L_K2_L n -> spinor n | L_K2_R n -> spinor n | N_K1 n -> spinor n | N_K2 n -> spinor n | U_K1_L n -> spinor n | U_K1_R n -> spinor n | U_K2_L n -> spinor n | U_K2_R n -> spinor n | D_K1_L n -> spinor n | D_K1_R n -> spinor n | D_K2_L n -> spinor n | D_K2_R n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z | Gl_K1 | Gl_K2 | B1 | B2 | Z1 | Z2 | Wp1 | Wm1 | Wp2 | Wm2 -> Massive_Vector end | O f -> begin match f with | Grav -> Tensor_2 | _ -> Scalar end let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | M (U_K1_L n) -> Color.SUN (if n > 0 then 3 else -3) | M (D_K1_L n) -> Color.SUN (if n > 0 then 3 else -3) | M (U_K1_R n) -> Color.SUN (if n > 0 then 3 else -3) | M (D_K1_R n) -> Color.SUN (if n > 0 then 3 else -3) | M (U_K2_L n) -> Color.SUN (if n > 0 then 3 else -3) | M (D_K2_L n) -> Color.SUN (if n > 0 then 3 else -3) | M (U_K2_R n) -> Color.SUN (if n > 0 then 3 else -3) | M (D_K2_R n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl | G Gl_K1 | G Gl_K2 -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n | L_K1_L n -> prop_spinor n | L_K1_R n -> prop_spinor n | L_K2_L n -> prop_spinor n | L_K2_R n -> prop_spinor n | N_K1 n -> prop_spinor n | N_K2 n -> prop_spinor n | U_K1_L n -> prop_spinor n | U_K1_R n -> prop_spinor n | U_K2_L n -> prop_spinor n | U_K2_R n -> prop_spinor n | D_K1_L n -> prop_spinor n | D_K1_R n -> prop_spinor n | D_K2_L n -> prop_spinor n | D_K2_R n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z | Gl_K1 | Gl_K2 | B1 | B2 | Z1 | Z2 | Wp1 | Wm1 | Wp2 | Wm2 -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H | H1up | H1um | H1dp | H1dm | H2up | H2um | H2dp | H2dm -> Prop_Scalar | Grav -> Prop_Tensor_2 end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) | O Grav -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) | L_K1_L n -> L_K1_L (-n) | L_K1_R n -> L_K1_R (-n) | L_K2_L n -> L_K2_L (-n) | L_K2_R n -> L_K2_R (-n) | N_K1 n -> N_K1 (-n) | N_K2 n -> N_K2 (-n) | U_K1_L n -> U_K1_L (-n) | U_K1_R n -> U_K1_R (-n) | U_K2_L n -> U_K2_L (-n) | U_K2_R n -> U_K2_R (-n) | D_K1_L n -> D_K1_L (-n) | D_K1_R n -> D_K1_R (-n) | D_K2_L n -> D_K2_L (-n) | D_K2_R n -> D_K2_R (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp | Gl_K1 -> Gl_K1 | Gl_K2 -> Gl_K2 | B1 -> B1 | B2 -> B2 | Z1 -> Z1 | Z2 -> Z2 | Wp1 -> Wm1 | Wm1 -> Wp1 | Wp2 -> Wm2 | Wm2 -> Wp2 end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | H1up -> H1um | H1um -> H1up | H1dp -> H1dm | H1dm -> H1dp | H2up -> H2um | H2um -> H2up | H2dp -> H2dm | H2dm -> H2dp | Grav -> Grav end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 | L_K1_L n -> if n > 0 then 1 else -1 | L_K2_L n -> if n > 0 then 1 else -1 | L_K1_R n -> if n > 0 then 1 else -1 | L_K2_R n -> if n > 0 then 1 else -1 | U_K1_L n -> if n > 0 then 1 else -1 | U_K2_L n -> if n > 0 then 1 else -1 | U_K1_R n -> if n > 0 then 1 else -1 | U_K2_R n -> if n > 0 then 1 else -1 | D_K1_L n -> if n > 0 then 1 else -1 | D_K2_L n -> if n > 0 then 1 else -1 | D_K1_R n -> if n > 0 then 1 else -1 | D_K2_R n -> if n > 0 then 1 else -1 | N_K1 n -> if n > 0 then 1 else -1 | N_K2 n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm | Gl_K1 | Gl_K2 | B1 | B2 | Z1 | Z2 | Wp1 | Wm1 | Wp2 | Wm2 -> 0 end | O _ -> 0 module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("SM.generation': " ^ string_of_int n) let generation f = match f with | M (L n | N n | U n | D n | L_K1_L n | L_K2_L n | L_K1_R n | L_K2_R n | N_K1 n | N_K2 n | U_K1_L n | U_K2_L n | U_K1_R n | U_K2_R n | D_K1_L n | D_K2_L n | D_K1_R n | D_K2_R n ) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n | L_K1_L n | L_K2_L n | L_K1_R n | L_K2_R n -> if n > 0 then -1//1 else 1//1 | N n | N_K1 n | N_K2 n -> 0//1 | U n | U_K1_L n | U_K2_L n | U_K1_R n | U_K2_R n -> if n > 0 then 2//3 else -2//3 | D n | D_K1_L n | D_K2_L n | D_K1_R n | D_K2_R n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Gl_K1 | Gl_K2 | Ga | Z | B1 | B2 | Z1 | Z2 -> 0//1 | Wp | Wp1 | Wp2 -> 1//1 | Wm | Wm1 | Wm2 -> -1//1 end | O f -> begin match f with | H | Phi0 | Grav -> 0//1 | H1up | H1dp | H2up | H2dp | Phip -> 1//1 | H1um | H1dm | H2um | H2dm | Phim -> -1//1 end let lepton = function | M f -> begin match f with | L n | N n | L_K1_L n | L_K1_R n | L_K2_L n | L_K2_R n | N_K1 n | N_K2 n -> if n > 0 then 1//1 else -1//1 | U _ | D _ | _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | U n | D n | U_K1_L n | U_K1_R n | U_K2_L n | U_K2_R n | D_K1_L n | D_K1_R n | D_K2_L n | D_K2_R n -> if n > 0 then 1//1 else -1//1 | L _ | N _ | _ -> 0//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_CCQ of int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | I_Q_W | I_G_ZWW | I_Q_W_K | I_G_ZWW_K1 | I_G_ZWW_K2 | I_G_ZWW_K3 | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_H3 | G_H4 | G_HGaZ | G_HGaGa | G_Hgg | Gs | I_Gs | I_GsRt2 | G2 | G22 | G_Grav | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] let charged_currents n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] let gravity_currents n = List.map mom [ ((L (-n), Grav, L n), Graviton_Spinor_Spinor 1, G_Grav); ((N (-n), Grav, N n), Graviton_Spinor_Spinor 1, G_Grav); ((U (-n), Grav, U n), Graviton_Spinor_Spinor 1, G_Grav); ((D (-n), Grav, D n), Graviton_Spinor_Spinor 1, G_Grav) ] let yukawa = List.map mom [ ((U (-3), H, U 3), FBF (1, Psibar, S, Psi), G_Htt); ((D (-3), H, D 3), FBF (1, Psibar, S, Psi), G_Hbb); ((U (-2), H, U 2), FBF (1, Psibar, S, Psi), G_Hcc); ((L (-3), H, L 3), FBF (1, Psibar, S, Psi), G_Htautau) ] let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) (* Gluons should be included in just that way. *) let standard_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Ga, Wm1, Wp1), Gauge_Gauge_Gauge 1, I_Q_W_K); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Z, Wm1, Wp1), Gauge_Gauge_Gauge 1, I_G_ZWW_K1); ((Z1, Wm, Wp1), Gauge_Gauge_Gauge 1, I_G_ZWW_K2); ((Z1, Wm1, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW_K2); ((Z2, Wm1, Wp2), Gauge_Gauge_Gauge 1, I_G_ZWW_K3); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs); ((Gl, Gl_K2, Gl_K2), Gauge_Gauge_Gauge (-1), I_Gs); ((Gl, Gl_K1, Gl_K1), Gauge_Gauge_Gauge 1, I_Gs); ((Gl_K2, Gl_K1, Gl_K1), Gauge_Gauge_Gauge 1, I_GsRt2)] let triple_gauge = standard_triple_gauge let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; ((Gl, Gl, Gl, Gl), gauge4, G2); ((Gl, Gl, Gl_K1, Gl_K1), gauge4, G2); ((Gl, Gl, Gl_K2, Gl_K2), gauge4, G2); ((Gl_K1, Gl_K1, Gl_K2, Gl_K2), gauge4, G2); ((Gl_K2, Gl_K2, Gl_K2, Gl_K2), gauge4, G22)] let quartic_gauge = standard_quartic_gauge let gravity_gauge = [ (O Grav, G Z, G Z), Graviton_Vector_Vector 1, G_Grav; (O Grav, G Wp, G Wm), Graviton_Vector_Vector 1, G_Grav; (O Grav, G Ga, G Ga), Graviton_Vector_Vector 1, G_Grav; (O Grav, G Gl, G Gl), Graviton_Vector_Vector 1, G_Grav ] let standard_gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ) ] let standard_gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let standard_higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let standard_higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let gravity_higgs = [ (O Grav, O H, O H), Graviton_Scalar_Scalar 1, G_Grav] let anomalous_gauge_higgs = [] let anomalous_gauge_higgs4 = [] let anomalous_higgs = [] let anomaly_higgs = [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ; (O H, G Gl, G Gl), Dim5_Scalar_Gauge2 1, G_Hgg ] let anomalous_higgs4 = [] let gauge_higgs = standard_gauge_higgs let gauge_higgs4 = standard_gauge_higgs4 let higgs = standard_higgs @ gravity_higgs let higgs4 = standard_higgs4 let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap gravity_currents [1;2;3] @ yukawa @ triple_gauge @ gravity_gauge @ gauge_higgs @ higgs @ anomaly_higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "uk1l" -> M (U_K1_L 1) | "uk1lbar" -> M (U_K1_L (-1)) | "ck1l" -> M (U_K1_L 2) | "ck1lbar" -> M (U_K1_L (-2)) | "tk1l" -> M (U_K1_L 3) | "tk1lbar" -> M (U_K1_L (-3)) | "dk1l" -> M (D_K1_L 1) | "dk1lbar" -> M (D_K1_L (-1)) | "sk1l" -> M (D_K1_L 2) | "sk1lbar" -> M (D_K1_L (-2)) | "bk1l" -> M (D_K1_L 3) | "bk1lbar" -> M (D_K1_L (-3)) | "uk1r" -> M (U_K1_R 1) | "uk1rbar" -> M (U_K1_R (-1)) | "ck1r" -> M (U_K1_R 2) | "ck1rbar" -> M (U_K1_R (-2)) | "tk1r" -> M (U_K1_R 3) | "tk1rbar" -> M (U_K1_R (-3)) | "dk1r" -> M (D_K1_R 1) | "dk1rbar" -> M (D_K1_R (-1)) | "sk1r" -> M (D_K1_R 2) | "sk1rbar" -> M (D_K1_R (-2)) | "bk1r" -> M (D_K1_R 3) | "bk1rbar" -> M (D_K1_R (-3)) | "uk2l" -> M (U_K2_L 1) | "uk2lbar" -> M (U_K2_L (-1)) | "ck2l" -> M (U_K2_L 2) | "ck2lbar" -> M (U_K2_L (-2)) | "tk2l" -> M (U_K2_L 3) | "tk2lbar" -> M (U_K2_L (-3)) | "dk2l" -> M (D_K2_L 1) | "dk2lbar" -> M (D_K2_L (-1)) | "sk2l" -> M (D_K2_L 2) | "sk2lbar" -> M (D_K2_L (-2)) | "bk2l" -> M (D_K2_L 3) | "bk2lbar" -> M (D_K2_L (-3)) | "uk2r" -> M (U_K2_R 1) | "uk2rbar" -> M (U_K2_R (-1)) | "ck2r" -> M (U_K2_R 2) | "ck2rbar" -> M (U_K2_R (-2)) | "tk2r" -> M (U_K2_R 3) | "tk2rbar" -> M (U_K2_R (-3)) | "dk2r" -> M (D_K2_R 1) | "dk2rbar" -> M (D_K2_R (-1)) | "sk2r" -> M (D_K2_R 2) | "sk2rbar" -> M (D_K2_R (-2)) | "bk2r" -> M (D_K2_R 3) | "bk2rbar" -> M (D_K2_R (-3)) | "g" | "gl" -> G Gl | "g_k1" | "gl_k1" -> G Gl_K1 | "g_k2" | "gl_k2" -> G Gl_K2 | "b1" -> G B1 | "b2" -> G B2 | "z1" -> G Z1 | "z2" -> G Z2 | "W1+" -> G Wp1 | "W1-" -> G Wm1 | "W2+" -> G Wp2 | "W2-" -> G Wm2 | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | "H1u+" -> O H1up | "H1u-" -> O H1um | "H1d+" -> O H1dp | "H1d-" -> O H1dm | "H2u+" -> O H2up | "H2u-" -> O H2um | "H2d+" -> O H2dp | "H2d-" -> O H2dm | "GG" -> O Grav | "ek1l-" -> M (L_K1_L 1) | "ek1l+" -> M (L_K1_L (-1)) | "muk1l-" -> M (L_K1_L 2) | "mu1l+" -> M (L_K1_L (-2)) | "tauk1l-" -> M (L_K1_L 3) | "tauk1l+" -> M (L_K1_L (-3)) | "ek1r-" -> M (L_K1_R 1) | "ek1r+" -> M (L_K1_R (-1)) | "muk1r-" -> M (L_K1_R 2) | "mu1r+" -> M (L_K1_R (-2)) | "tau1r-" -> M (L_K1_R 3) | "tauk1r+" -> M (L_K1_R (-3)) | "ek2l-" -> M (L_K2_L 1) | "ek2l+" -> M (L_K2_L (-1)) | "muk2l-" -> M (L_K2_L 2) | "mu2l+" -> M (L_K2_L (-2)) | "tauk2l-" -> M (L_K2_L 3) | "tauk2l+" -> M (L_K2_L (-3)) | "ek2r-" -> M (L_K2_R 1) | "ek2r+" -> M (L_K2_R (-1)) | "muk2r-" -> M (L_K2_R 2) | "mu2r+" -> M (L_K2_R (-2)) | "tau2r-" -> M (L_K2_R 3) | "tauk2r+" -> M (L_K2_R (-3)) | "nuek1" -> M (N_K1 1) | "nuek1bar" -> M (N_K1 (-1)) | "numuk1" -> M (N_K1 2) | "numuk1bar" -> M (N_K1 (-2)) | "nutauk1" -> M (N_K1 3) | "nutauk1bar" -> M (N_K1 (-3)) | "nuek2" -> M (N_K2 1) | "nuek2bar" -> M (N_K2 (-1)) | "numuk2" -> M (N_K2 2) | "numuk2bar" -> M (N_K2 (-2)) | "nutauk2" -> M (N_K2 3) | "nutauk2bar" -> M (N_K2 (-3)) | _ -> invalid_arg "Modellib_BSM.UED.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid down type quark" | U_K1_L 1 -> "uk1l" | U_K1_L (-1) -> "uk1lbar" | U_K1_L 2 -> "ck1l" | U_K1_L (-2) -> "ck1lbar" | U_K1_L 3 -> "tk1l" | U_K1_L (-3) -> "tk1lbar" | U_K1_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid up type quark" | D_K1_L 1 -> "dk1l" | D_K1_L (-1) -> "dk1lbar" | D_K1_L 2 -> "sk1l" | D_K1_L (-2) -> "sk1lbar" | D_K1_L 3 -> "bk1l" | D_K1_L (-3) -> "bk1lbar" | D_K1_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid down type quark" | U_K1_R 1 -> "uk1r" | U_K1_R (-1) -> "uk1rbar" | U_K1_R 2 -> "ck1r" | U_K1_R (-2) -> "ck1rbar" | U_K1_R 3 -> "tk1r" | U_K1_R (-3) -> "tk1rbar" | U_K1_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid up type quark" | D_K1_R 1 -> "dk1r" | D_K1_R (-1) -> "dk1rbar" | D_K1_R 2 -> "sk1r" | D_K1_R (-2) -> "sk1rbar" | D_K1_R 3 -> "bk1r" | D_K1_R (-3) -> "bk1rbar" | D_K1_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid down type quark" | U_K2_L 1 -> "uk2l" | U_K2_L (-1) -> "uk2lbar" | U_K2_L 2 -> "ck2l" | U_K2_L (-2) -> "ck2lbar" | U_K2_L 3 -> "tk2l" | U_K2_L (-3) -> "tk2lbar" | U_K2_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid up type quark" | D_K2_L 1 -> "dk2l" | D_K2_L (-1) -> "dk2lbar" | D_K2_L 2 -> "sk2l" | D_K2_L (-2) -> "sk2lbar" | D_K2_L 3 -> "bk2l" | D_K2_L (-3) -> "bk2lbar" | D_K2_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid down type quark" | U_K2_R 1 -> "uk2r" | U_K2_R (-1) -> "uk2rbar" | U_K2_R 2 -> "ck2r" | U_K2_R (-2) -> "ck2rbar" | U_K2_R 3 -> "tk2r" | U_K2_R (-3) -> "tk2rbar" | U_K2_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid up type quark" | D_K2_R 1 -> "dk2r" | D_K2_R (-1) -> "dk2rbar" | D_K2_R 2 -> "sk2r" | D_K2_R (-2) -> "sk2rbar" | D_K2_R 3 -> "bk2r" | D_K2_R (-3) -> "bk2rbar" | D_K2_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid down type quark" | L_K1_L 1 -> "ek1l-" | L_K1_L (-1) -> "ek1l+" | L_K1_L 2 -> "muk1l-" | L_K1_L (-2) -> "muk1l+" | L_K1_L 3 -> "tauk1l-" | L_K1_L (-3) -> "tauk1l+" | L_K1_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid lepton" | L_K1_R 1 -> "ek1r-" | L_K1_R (-1) -> "ek1r+" | L_K1_R 2 -> "muk1r-" | L_K1_R (-2) -> "muk1r+" | L_K1_R 3 -> "tauk1r-" | L_K1_R (-3) -> "tauk1r+" | L_K1_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid lepton" | L_K2_L 1 -> "ek2l-" | L_K2_L (-1) -> "ek2l+" | L_K2_L 2 -> "muk2l-" | L_K2_L (-2) -> "muk2l+" | L_K2_L 3 -> "tauk2l-" | L_K2_L (-3) -> "tauk2l+" | L_K2_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid lepton" | L_K2_R 1 -> "ek2r-" | L_K2_R (-1) -> "ek2r+" | L_K2_R 2 -> "muk2r-" | L_K2_R (-2) -> "muk2r+" | L_K2_R 3 -> "tauk2r-" | L_K2_R (-3) -> "tauk2r+" | L_K2_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid lepton" | N_K1 1 -> "nuek1" | N_K1 (-1) -> "nuek1bar" | N_K1 2 -> "numuk1" | N_K1 (-2) -> "numuk1bar" | N_K1 3 -> "nutauk1" | N_K1 (-3) -> "nutauk1bar" | N_K1 _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid neutrino" | N_K2 1 -> "nuek2" | N_K2 (-1) -> "nuek2bar" | N_K2 2 -> "numuk2" | N_K2 (-2) -> "numuk2bar" | N_K2 3 -> "nutauk2" | N_K2 (-3) -> "nutauk2bar" | N_K2 _ -> invalid_arg "Modellib_BSM.UED.flavor_to_string: invalid neutrino" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" | Gl_K1 -> "gk1" | Gl_K2 -> "gk2" | B1 -> "b1" | B2 -> "b2" | Z1 -> "z1" | Z2 -> "z2" | Wp1 -> "W1+" | Wm1 -> "W1-" | Wp2 -> "W2+" | Wm2 -> "W2-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | H1up -> "H1u+" | H1um -> "H1u-" | H1dp -> "H1d+" | H1dm -> "H1d-" | H2up -> "H2u+" | H2um -> "H2u-" | H2dp -> "H2d+" | H2dm -> "H2d-" | Grav -> "GG" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid down type quark" | U_K1_L 1 -> "u^\\prime_L" | U_K1_L (-1) -> "\\bar{u}^\\prime_L" | U_K1_L 2 -> "c^\\prime_L" | U_K1_L (-2) -> "\\bar{c}^\\prime_L" | U_K1_L 3 -> "t^\\prime_L" | U_K1_L (-3) -> "\\bar{t}^\\prime_L" | U_K1_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid up type quark" | D_K1_L 1 -> "d^\\prime_L" | D_K1_L (-1) -> "\\bar{d}^\\prime_L" | D_K1_L 2 -> "s^\\prime_L" | D_K1_L (-2) -> "\\bar{s}^\\prime_L" | D_K1_L 3 -> "b^\\prime_L" | D_K1_L (-3) -> "\\bar{b}^\\prime_L" | D_K1_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid down type quark" | U_K1_R 1 -> "u^\\prime_R" | U_K1_R (-1) -> "\\bar{u}^\\prime_R" | U_K1_R 2 -> "c^\\prime_R" | U_K1_R (-2) -> "\\bar{c}^\\prime_R" | U_K1_R 3 -> "t^\\prime_R" | U_K1_R (-3) -> "\\bar{t}^\\prime_R" | U_K1_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid up type quark" | D_K1_R 1 -> "d^\\prime_R" | D_K1_R (-1) -> "\\bar{d}^\\prime_R" | D_K1_R 2 -> "s^\\prime_R" | D_K1_R (-2) -> "\\bar{s}^\\prime_R" | D_K1_R 3 -> "b^\\prime_R" | D_K1_R (-3) -> "\\bar{b}^\\prime_R" | D_K1_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid down type quark" | U_K2_L 1 -> "u^{\\prime\\prime}_L" | U_K2_L (-1) -> "\\bar{u}^{\\prime\\prime}_L" | U_K2_L 2 -> "c^{\\prime\\prime}_L" | U_K2_L (-2) -> "\\bar{c}^{\\prime\\prime}_L" | U_K2_L 3 -> "t^{\\prime\\prime}_L" | U_K2_L (-3) -> "\\bar{t}^{\\prime\\prime}_L" | U_K2_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid up type quark" | D_K2_L 1 -> "d^{\\prime\\prime}_L" | D_K2_L (-1) -> "\\bar{d}^{\\prime\\prime}_L" | D_K2_L 2 -> "s^{\\prime\\prime}_L" | D_K2_L (-2) -> "\\bar{s}^{\\prime\\prime}_L" | D_K2_L 3 -> "b^{\\prime\\prime}_L" | D_K2_L (-3) -> "\\bar{b}^{\\prime\\prime}_L" | D_K2_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid down type quark" | U_K2_R 1 -> "u^{\\prime\\prime}_R" | U_K2_R (-1) -> "\\bar{u}^{\\prime\\prime}_R" | U_K2_R 2 -> "c^{\\prime\\prime}_R" | U_K2_R (-2) -> "\\bar{c}^{\\prime\\prime}_R" | U_K2_R 3 -> "t^{\\prime\\prime}_R" | U_K2_R (-3) -> "\\bar{t}^{\\prime\\prime}_R" | U_K2_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid up type quark" | D_K2_R 1 -> "d^\\prime_R" | D_K2_R (-1) -> "\\bar{d}^{\\prime\\prime}_R" | D_K2_R 2 -> "s^\\prime_R" | D_K2_R (-2) -> "\\bar{s}^{\\prime\\prime}_R" | D_K2_R 3 -> "b^\\prime_R" | D_K2_R (-3) -> "\\bar{b}^{\\prime\\prime}_R" | D_K2_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid down type quark" | L_K1_L 1 -> "e_L^{\\prime,,-}" | L_K1_L (-1) -> "\\bar{e}_L^{\\prime,,+}" | L_K1_L 2 -> "\\mu_L^{\\prime,,-}" | L_K1_L (-2) -> "\\bar{\\mu}_L^{{\\prime,,+}" | L_K1_L 3 -> "\\tau_L^{\\prime,,-}" | L_K1_L (-3) -> "\\bar{\\tau}_L^{\\prime,,+}" | L_K1_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid lepton" | L_K1_R 1 -> "e_R^{\\prime,,-}" | L_K1_R (-1) -> "\\bar{e}_R^{\\prime,,+}" | L_K1_R 2 -> "\\mu_R{\\prime,,-}" | L_K1_R (-2) -> "\\bar{\\mu}_R^{\\prime,,+}" | L_K1_R 3 -> "\\tau_R¬{\\prime,,-}" | L_K1_R (-3) -> "\\bar{\\tau}_R¬{\\prime,,+}" | L_K1_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid lepton" | L_K2_L 1 -> "e^{\\prime\\prime,,-}_L" | L_K2_L (-1) -> "\\bar{e}_L^{\\prime\\prime,,+}" | L_K2_L 2 -> "\\mu_L^{\\prime\\prime,,-}" | L_K2_L (-2) -> "\\bar{\\mu}_L^{\\prime\\prime,,+}" | L_K2_L 3 -> "\\tau_L^{\\prime\\prime,,-}" | L_K2_L (-3) -> "\\bar{\\tau}_L^{\\prime\\prime,,+}" | L_K2_L _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid lepton" | L_K2_R 1 -> "e_R^{\\prime\\prime,,-}" | L_K2_R (-1) -> "\\bar{e}_R^{\\prime\\prime,,+}" | L_K2_R 2 -> "\\mu_R^{\\prime\\prime,,-}" | L_K2_R (-2) -> "\\bar{\\mu}_R^{\\prime\\prime,,+}" | L_K2_R 3 -> "\\tau_R{\\prime\\prime,,-}" | L_K2_R (-3) -> "\\bar{\\tau}_R^{\\prime\\prime,,+}" | L_K2_R _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid lepton" | N_K1 1 -> "\\nu_e^\\prime" | N_K1 (-1) -> "\\bar{\\nu}_e^\\prime" | N_K1 2 -> "\\nu_\\mu^\\prime" | N_K1 (-2) -> "\\bar{\\nu}_\\mu^\\prime" | N_K1 3 -> "\\nu_\\tau^\\prime" | N_K1 (-3) -> "\\bar{\\nu}_\\tau^\\prime" | N_K1 _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid neutrino" | N_K2 1 -> "\\nu_e^{\\prime\\prime}" | N_K2 (-1) -> "\\bar{\\nu}_e^{\\prime\\prime}" | N_K2 2 -> "\\nu_\\mu^{\\prime\\prime}" | N_K2 (-2) -> "\\bar{\\nu}_\\mu^{\\prime\\prime}" | N_K2 3 -> "\\nu_\\tau^{\\prime\\prime}" | N_K2 (-3) -> "\\bar{\\nu}_\\tau^{\\prime\\prime}" | N_K2 _ -> invalid_arg "Modellib_BSM.UED.flavor_to_TeX: invalid neutrino" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" | Gl_K1 -> "g^\\prime" | Gl_K2 -> "g^{\\prime\\prime}" | B1 -> "B^\\prime" | B2 -> "B^{\\prime\\prime}" | Z1 -> "Z^\\prime" | Z2 -> "Z^{\\prime\\prime}" | Wp1 -> "W^{\\prime,,+}" | Wm1 -> "W^{\\prime,,-}" | Wp2 -> "W^{\\prime\\prime,,+}" | Wm2 -> "W^{\\prime\\prime,,-}" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H -> "H" | H1up -> "H1u+" | H1um -> "H1u-" | H1dp -> "H1d+" | H1dm -> "H1d-" | H2up -> "H2u+" | H2um -> "H2u-" | H2dp -> "H2d+" | H2dm -> "H2d-" | Grav -> "G^\\prime" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" | L_K1_L n when n > 0 -> "lk1l" ^ string_of_int n | L_K1_L n -> "lk1l" ^ string_of_int (abs n) ^ "b" | L_K1_R n when n > 0 -> "lk1r" ^ string_of_int n | L_K1_R n -> "lk1r" ^ string_of_int (abs n) ^ "b" | L_K2_L n when n > 0 -> "lk2l" ^ string_of_int n | L_K2_L n -> "lk2l" ^ string_of_int (abs n) ^ "b" | L_K2_R n when n > 0 -> "lk2r" ^ string_of_int n | L_K2_R n -> "lk2r" ^ string_of_int (abs n) ^ "b" | U_K1_L n when n > 0 -> "uk1l" ^ string_of_int n | U_K1_L n -> "uk1l" ^ string_of_int (abs n) ^ "b" | U_K1_R n when n > 0 -> "uk1r" ^ string_of_int n | U_K1_R n -> "uk1r" ^ string_of_int (abs n) ^ "b" | U_K2_L n when n > 0 -> "uk2l" ^ string_of_int n | U_K2_L n -> "uk2l" ^ string_of_int (abs n) ^ "b" | U_K2_R n when n > 0 -> "uk2r" ^ string_of_int n | U_K2_R n -> "uk2r" ^ string_of_int (abs n) ^ "b" | D_K1_L n when n > 0 -> "dk1l" ^ string_of_int n | D_K1_L n -> "dk1l" ^ string_of_int (abs n) ^ "b" | D_K1_R n when n > 0 -> "dk1r" ^ string_of_int n | D_K1_R n -> "dk1r" ^ string_of_int (abs n) ^ "b" | D_K2_L n when n > 0 -> "dk2l" ^ string_of_int n | D_K2_L n -> "dk2l" ^ string_of_int (abs n) ^ "b" | D_K2_R n when n > 0 -> "dk2r" ^ string_of_int n | D_K2_R n -> "dk2r" ^ string_of_int (abs n) ^ "b" | N_K1 n when n > 0 -> "nk1" ^ string_of_int n | N_K1 n -> "nk1" ^ string_of_int (abs n) ^ "b" | N_K2 n when n > 0 -> "nk2" ^ string_of_int n | N_K2 n -> "nk2" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" | Gl_K1 -> "gk1" | Gl_K2 -> "gk2" | B1 -> "b1" | B2 -> "b2" | Z1 -> "z1" | Z2 -> "z2" | Wp1 -> "wp1" | Wm1 -> "wm1" | Wp2 -> "wp2" | Wm2 -> "wm2" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | H1up -> "h1up" | H1um -> "h1um" | H1dp -> "h1dp" | H1dm -> "h1dm" | H2up -> "h2up" | H2um -> "h2um" | H2dp -> "h2dp" | H2dm -> "h2dm" | Grav -> "gv" end let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n | U_K1_L n when n > 0 -> 4000000 + 2*n | U_K1_L n -> - 4000000 + 2*n | D_K1_L n when n > 0 -> 3999999 + 2*n | D_K1_L n -> - 3999999 + 2*n | U_K1_R n when n > 0 -> 5000000 + 2*n | U_K1_R n -> - 5000000 + 2*n | D_K1_R n when n > 0 -> 4999999 + 2*n | D_K1_R n -> - 4999999 + 2*n | U_K2_L n when n > 0 -> 6000000 + 2*n | U_K2_L n -> - 6000000 + 2*n | D_K2_L n when n > 0 -> 5999999 + 2*n | D_K2_L n -> - 5999999 + 2*n | U_K2_R n when n > 7000000 -> 2*n | U_K2_R n -> - 7000000 + 2*n | D_K2_R n when n > 0 -> 6999999 + 2*n | D_K2_R n -> - 6999999 + 2*n | L_K1_L n when n > 0 -> 4000009 + 2*n | L_K1_L n -> - 4000009 + 2*n | L_K1_R n when n > 0 -> 5000009 + 2*n | L_K1_R n -> - 5000009 + 2*n | L_K2_L n when n > 0 -> 6000009 + 2*n | L_K2_L n -> - 6000009 + 2*n | L_K2_R n when n > 0 -> 7000009 + 2*n | L_K2_R n -> - 7000009 + 2*n | N_K1 n when n > 0 -> 4000010 + 2*n | N_K1 n -> - 4000010 + 2*n | N_K2 n when n > 0 -> 6000010 + 2*n | N_K2 n -> - 6000010 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | Gl_K1 -> 4000021 | Gl_K2 -> 6000021 | B1 -> 4000022 | B2 -> 6000022 | Z1 -> 4000023 | Z2 -> 6000024 | Wp1 -> 4000024 | Wm1 -> (-4000024) | Wp2 -> 6000024 | Wm2 -> (-6000024) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | H1up -> 4000036 | H1um -> (-4000036) | H1dp -> 4000037 | H1dm -> (-4000037) | H2up -> 6000036 | H2um -> (-6000036) | H2dp -> 6000037 | H2dm -> (-6000037) | Grav -> 39 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | G_CCQ (n1,n2) -> "gccq" ^ string_of_int n1 ^ string_of_int n2 | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | I_Q_W_K -> "iqwk" | I_G_ZWW_K1 -> "igzwwk1" | I_G_ZWW_K2 -> "igzwwk2" | I_G_ZWW_K3 -> "igzwwk3" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_HGaZ -> "ghgaz" | G_HGaGa -> "ghgaga" | G_Hgg -> "ghgg" | G_H3 -> "gh3" | G_H4 -> "gh4" | G2 -> "gs**2" | Gs -> "gs" | I_Gs -> "igs" | I_GsRt2 -> "igs/sqrt(2.0_default)" | G22 -> "gs**2/2.0_default" | G_Grav -> "ggrav" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end module GravTest (Flags : BSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type matter_field = L of int | N of int | U of int | D of int | SL of int type gauge_boson = Ga | Wp | Wm | Z | Gl | Phino type other = Phip | Phim | Phi0 | H | Grino type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.SM.gauge_symbol: internal error" let family n = List.map matter_field [ L n; SL n; N n; U n; D n ] let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl; Phino]; "Higgs", List.map other [H]; "Gravitino", List.map other [Grino]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n | SL _ -> Scalar end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector | Phino -> Majorana end | O f -> begin match f with | Grino -> Vectorspinor | _ -> Scalar end let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n | SL n -> Prop_Scalar end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity | Phino -> Prop_Majorana end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H -> Prop_Scalar | Grino -> Prop_Vectorspinor end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) | O Grino -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) | SL n -> SL (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp | Phino -> Phino end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | Grino -> Grino end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 | SL _ -> 0 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 | Phino -> 2 end | O f -> begin match f with | Grino -> 2 | _ -> 0 end module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("SM3.generation': " ^ string_of_int n) let generation f = match f with | M (L n | N n | U n | D n | SL n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | SL n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z | Phino -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Phi0 | Grino -> 0//1 | Phip -> 1//1 | Phim -> -1//1 end let lepton = function | M f -> begin match f with | L n | N n | SL n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ | SL _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_CCQ of int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_H3 | G_H4 | G_HGaZ | G_HGaGa | G_Hgg | G_strong | G_Grav | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] let charged_currents n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let yukawa = List.map mom [ ((U (-3), H, U 3), FBF (1, Psibar, S, Psi), G_Htt); ((D (-3), H, D 3), FBF (1, Psibar, S, Psi), G_Hbb); ((U (-2), H, U 2), FBF (1, Psibar, S, Psi), G_Hcc); ((L (-3), H, L 3), FBF (1, Psibar, S, Psi), G_Htautau) ] let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let standard_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW) ] let triple_gauge = standard_triple_gauge let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW ] let quartic_gauge = standard_quartic_gauge let standard_gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ) ] let standard_gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let standard_higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let standard_higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let anomalous_gauge_higgs = [] let anomalous_gauge_higgs4 = [] let anomalous_higgs = [] let anomaly_higgs = [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ; (O H, G Gl, G Gl), Dim5_Scalar_Gauge2 1, G_Hgg ] let gravitino_coup n = [ (O Grino, M (SL (-n)), M (L n)), GBG (1, Gravbar, POT, Psi), G_Grav; (M (L (-n)), M (SL n), O Grino), GBG (1, Psibar, POT, Grav), G_Grav] let gravitino_gauge = [ (O Grino, G Ga, G Phino), GBG (1, Gravbar, V, Chi), G_Grav ] let anomalous_higgs4 = [] let gauge_higgs = standard_gauge_higgs let gauge_higgs4 = standard_gauge_higgs4 let higgs = standard_higgs let higgs4 = standard_higgs4 let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ ThoList.flatmap gravitino_coup [1;2;3] @ gravitino_gauge @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ anomaly_higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "se-" -> M (SL 1) | "se+" -> M (SL (-1)) | "smu-" -> M (SL 2) | "smu+" -> M (SL (-2)) | "stau-" -> M (SL 3) | "stau+" -> M (SL (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | "GG" -> O Grino | "phino" | "Phino" -> G Phino | _ -> invalid_arg "Modellib_BSM.GravTest.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.GravTest.flavor_to_string: invalid lepton" | SL 1 -> "se-" | SL (-1) -> "se+" | SL 2 -> "smu-" | SL (-2) -> "smu+" | SL 3 -> "stau-" | SL (-3) -> "stau+" | SL _ -> invalid_arg "Modellib_BSM.GravTest.flavor_to_string: invalid slepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.GravTest.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.SM.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.GravTest.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" | Phino -> "phino" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Grino -> "GG" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.GravTest.flavor_to_TeX: invalid lepton" | SL 1 -> "\\tilde{e}^-" | SL (-1) -> "\\tilde{e}^+" | SL 2 -> "\\tilde{\\mu}^-" | SL (-2) -> "\\tilde{\\mu}^+" | SL 3 -> "\\tilde{\\tau}^-" | SL (-3) -> "\\tilde{\\tau}^+" | SL _ -> invalid_arg "Modellib_BSM.GravTest.flavor_to_TeX: invalid slepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.GravTest.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.SM.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.GravTest.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" | Phino -> "\\tilde{\\phi}" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H -> "H" | Grino -> "\\tilde{G}" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | SL n when n > 0 -> "sl" ^ string_of_int n | SL n -> "sl" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" | Phino -> "phino" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | Grino -> "gv" end let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | SL n when n > 0 -> 39 + 2*n | SL n -> - 39 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | Phino -> 46 end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | Grino -> 39 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | G_CCQ (n1,n2) -> "gccq" ^ string_of_int n1 ^ string_of_int n2 | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_HGaZ -> "ghgaz" | G_HGaGa -> "ghgaga" | G_Hgg -> "ghgg" | G_H3 -> "gh3" | G_H4 -> "gh4" | G_strong -> "gs" | G_Grav -> "ggrav" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end module Template (Flags : BSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | H type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.Template.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Higgs", List.map other [H]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> Scalar let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H -> Prop_Scalar end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("Template.generation': " ^ string_of_int n) let generation f = match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Phi0 -> 0//1 | Phip -> 1//1 | Phim -> -1//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_Htt | G_Hbb | G_Hcc | G_Hmm | G_Htautau | G_H3 | G_H4 | G_HGaZ | G_HGaGa | G_Hgg | Gs | I_Gs | G2 | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] let charged_currents n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let yukawa = [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, S, Psi), G_Htt); ((M (D (-3)), O H, M (D 3)), FBF (1, Psibar, S, Psi), G_Hbb); ((M (U (-2)), O H, M (U 2)), FBF (1, Psibar, S, Psi), G_Hcc); ((M (L (-2)), O H, M (L 2)), FBF (1, Psibar, S, Psi), G_Hmm); ((M (L (-3)), O H, M (L 3)), FBF (1, Psibar, S, Psi), G_Htautau) ] let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs) ] let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2] let gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ) ] let gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let anomaly_higgs = [] (* [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ; (O H, G Gl, G Gl), Dim5_Scalar_Gauge2 1, G_Hgg] *) let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ anomaly_higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | _ -> invalid_arg "Modellib_BSM.Template.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.Template.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.Template.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.Template.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.Template.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.Template.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.Template.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.Template.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.Template.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H -> "H" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" end let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_Hmm -> "ghmm" | G_HGaZ -> "ghgaz" | G_HGaGa -> "ghgaga" | G_Hgg -> "ghgg" | G_H3 -> "gh3" | G_H4 -> "gh4" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end module HSExt (Flags : BSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | H | S type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.HSExt.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Higgs", List.map other [H; S]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> Scalar let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H | S -> Prop_Scalar end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | S -> S end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("HSExt.generation': " ^ string_of_int n) let generation f = match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Phi0 | S -> 0//1 | Phip -> 1//1 | Phim -> -1//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_SWW | G_SSWW | G_SZZ | G_SSZZ | G_HSWW | G_HSZZ | G_Htt | G_Hbb | G_Hcc | G_Hmm | G_Htautau | G_H3 | G_H4_1 | G_H4_2 | G_H4_3 | G_H4_4 | G_H4_5 | G_Stt | G_Sbb | G_Scc | G_Smm | G_Stautau | G_HSS | G_HHS | G_HGaZ | G_HGaGa | G_Hgg | G_SGaZ | G_SGaGa | G_Sgg | Gs | I_Gs | G2 | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] let charged_currents n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let yukawa = [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, Coupling.S, Psi), G_Htt); ((M (D (-3)), O H, M (D 3)), FBF (1, Psibar, Coupling.S, Psi), G_Hbb); ((M (U (-2)), O H, M (U 2)), FBF (1, Psibar, Coupling.S, Psi), G_Hcc); ((M (L (-2)), O H, M (L 2)), FBF (1, Psibar, Coupling.S, Psi), G_Hmm); ((M (L (-3)), O H, M (L 3)), FBF (1, Psibar, Coupling.S, Psi), G_Htautau); ((M (U (-3)), O S, M (U 3)), FBF (1, Psibar, Coupling.S, Psi), G_Stt); ((M (D (-3)), O S, M (D 3)), FBF (1, Psibar, Coupling.S, Psi), G_Sbb); ((M (U (-2)), O S, M (U 2)), FBF (1, Psibar, Coupling.S, Psi), G_Scc); ((M (L (-2)), O S, M (L 2)), FBF (1, Psibar, Coupling.S, Psi), G_Smm); ((M (L (-3)), O S, M (L 3)), FBF (1, Psibar, Coupling.S, Psi), G_Stautau) ] let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs) ] let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2] let gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ); ((O S, G Wp, G Wm), Scalar_Vector_Vector 1, G_SWW); ((O S, G Z, G Z), Scalar_Vector_Vector 1, G_SZZ) ] let gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ; (O H, O S, G Wp, G Wm), Scalar2_Vector2 1, G_HSWW; (O H, O S, G Z, G Z), Scalar2_Vector2 1, G_HSZZ; (O S, O S, G Wp, G Wm), Scalar2_Vector2 1, G_SSWW; (O S, O S, G Z, G Z), Scalar2_Vector2 1, G_SSZZ ] let higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3; (O S, O H, O H), Scalar_Scalar_Scalar 1, G_HHS; (O S, O S, O H), Scalar_Scalar_Scalar 1, G_HSS ] let higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4_1; (O H, O H, O H, O S), Scalar4 1, G_H4_2; (O H, O H, O S, O S), Scalar4 1, G_H4_3; (O H, O S, O S, O S), Scalar4 1, G_H4_4; (O S, O S, O S, O S), Scalar4 1, G_H4_5 ] let anomaly_higgs = [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ; (O H, G Gl, G Gl), Dim5_Scalar_Gauge2 1, G_Hgg; (O S, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_SGaGa; (O S, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_SGaZ; (O S, G Gl, G Gl), Dim5_Scalar_Gauge2 1, G_Sgg ] let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ anomaly_higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | "S" -> O S | _ -> invalid_arg "Modellib_BSM.HSExt.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.HSExt.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.HSExt.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.HSExt.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.HSExt.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | S -> "S" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.HSExt.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.HSExt.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.HSExt.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.HSExt.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H -> "H" | S -> "S" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | S -> "s" end let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | S -> 35 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_SWW -> "gsww" | G_SZZ -> "gszz" | G_SSWW -> "gssww" | G_SSZZ -> "gsszz" | G_HSWW -> "ghsww" | G_HSZZ -> "ghszz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_Hmm -> "ghmm" | G_Stt -> "gstt" | G_Sbb -> "gsbb" | G_Stautau -> "gstautau" | G_Scc -> "gscc" | G_Smm -> "gsmm" | G_HGaZ -> "ghgaz" | G_HGaGa -> "ghgaga" | G_Hgg -> "ghgg" | G_SGaZ -> "gsgaz" | G_SGaGa -> "gsgaga" | G_Sgg -> "gsgg" | G_H3 -> "gh3" | G_H4_1 -> "gh4_1" | G_H4_2 -> "gh4_2" | G_H4_3 -> "gh4_3" | G_H4_4 -> "gh4_4" | G_H4_5 -> "gh4_5" | G_HHS -> "ghhs" | G_HSS -> "ghss" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end (* \thocwmodulesection{Three-Site Higgsless Model} *) module type Threeshl_options = sig val include_ckm: bool val include_hf: bool val diet: bool end module Threeshl_no_ckm: Threeshl_options = struct let include_ckm = false let include_hf = true let diet = false end module Threeshl_ckm: Threeshl_options = struct let include_ckm = true let include_hf = true let diet = false end module Threeshl_no_ckm_no_hf: Threeshl_options = struct let include_ckm = false let include_hf = false let diet = false end module Threeshl_ckm_no_hf: Threeshl_options = struct let include_ckm = true let include_hf = false let diet = false end module Threeshl_diet_no_hf: Threeshl_options = struct let include_ckm = false let include_hf = false let diet = true end module Threeshl_diet: Threeshl_options = struct let include_ckm = false let include_hf = true let diet = true end (* We use one generic implementation of the model and implement different features via option modules given to a functor *) module Threeshl (Module_options: Threeshl_options) = struct open Coupling let modname = "Modellib_BSM.Threeshl" (* Shamelessly stolen from Modellib.SM3, but with no support for fudged width yet *) let default_width = ref Timelike (* If this flag is set true, all gauge bosons are assumed to be massless and are assigned feynman gauge propagators. This in conjunction with the unbroken three site model is intended for checking gauge invariance via the ward identites. *) let all_feynman = ref false let options = Options.create [ "constant_width", Arg.Unit (fun _ -> default_width := Constant), "use constant width (also in t-channel)"; "custom_width", Arg.String (fun x -> default_width := Custom x), "use custom width"; "cancel_widths", Arg.Unit (fun _ -> default_width := Vanishing), "use vanishing width"; "all_feynman", Arg.Unit (fun _ -> all_feynman := true), "assign feynman gauge propagators to all gauge bosons\n" ^ "\t(for checking the ward identities); use only if you *really* know\n" ^ "\twhat you are doing"] (* The quantum numbers that are carried by the particles. \verb$csign$ is \emph{not} the charge carried by the particle, but differentiates between particles (\verb$Pos$) and antiparticles (\verb$Neg$) *) type kkmode = Light | Heavy type generation = Gen0 | Gen1 | Gen2 type csign = Pos | Neg type isospin = Iso_up | Iso_down (* Necessary to represent the indices of the couplings defined in FORTRAN *) type kk2 = Light2 | Heavy2 | Light_Heavy (* Map the different types to the constants used in the FORTRAN module *) let fspec_of_kkmode = function Light -> "l_mode" | Heavy -> "h_mode" let fspec_of_kk2 = function Light2 -> "l_mode" | Heavy2 -> "h_mode" | Light_Heavy -> "lh_mode" let fspec_of_gen = function Gen0 -> "gen_0" | Gen1 -> "gen_1" | Gen2 -> "gen_2" let fspec_of_iso = function Iso_up -> "iso_up" | Iso_down -> "iso_down" (* Covert the ``charge sign'' into a numeric sign (used e.g. in the determination of the MCID codes) *) let int_of_csign = function Pos -> 1 | Neg -> -1 (* Convert the generation into an integer (dito) *) let int_of_gen = function Gen0 -> 1 | Gen1 -> 2 | Gen2 -> 3 (* The type \verb$flavor$ is implemented as a variant. Fermions are implemented as a variant differentating between leptons and quarks (seemed the most natural way as this is also the way in which the FORTRAN code is structured). Bosons are implemented as a variant the differentiates between $W$, $Z$ and $A$. All other quantum numbers that are required for identifying the particles are carried by the variant constructors. *) type fermion = | Lepton of (kkmode * csign * generation * isospin) | Quark of (kkmode * csign * generation * isospin) type boson = | W of (kkmode * csign) | Z of kkmode | A | G type flavor = Fermion of fermion | Boson of boson (* Helpers to construct particles from quantum numbers *) let lepton kk cs gen iso = Lepton (kk, cs, gen, iso) let quark kk cs gen iso = Quark (kk, cs, gen, iso) let w kk cs = W (kk, cs) let z kk = Z kk let flavor_of_f x = Fermion x let flavor_of_b x = Boson x (* Map a list of functions to the list (partially) applied to a value *) let revmap funs v = List.map (fun x -> x v) funs (* The same for a list of values; the result is flattened *) let revmap2 funs vals = ThoList.flatmap (revmap funs) vals (* Functions to loop the constructors over quantum numbers for list creation purposes *) let loop_kk flist = revmap2 flist [Light; Heavy] let loop_cs flist = revmap2 flist [Pos; Neg] let loop_gen flist = revmap2 flist [Gen0; Gen1; Gen2] let loop_iso flist = revmap2 flist [Iso_up; Iso_down] let loop_kk2 flist = revmap2 flist [Light2; Heavy2; Light_Heavy] (* Conditional looping over kk modes depending on whether to include heavy fermions *) let cloop_kk flist = match Module_options.include_hf with | true -> loop_kk flist | false -> revmap flist Light let cloop_kk2 flist = match Module_options.include_hf with | true -> loop_kk2 flist | false -> revmap flist Light2 (* Having defined the necessary helpers, the magic of currying makes building lists of particles as easy as nesting the loop functions in the correct order... *) let all_leptons = loop_iso (loop_gen (loop_cs (cloop_kk [lepton] ))) let all_quarks = loop_iso( loop_gen (loop_cs (cloop_kk [quark] ))) let all_bosons = (loop_cs (loop_kk [w] )) @ [Z Light; Z Heavy; A; G] (* Converts a flavor spec to the BCD identifier defined in the FORTRAN module. Splitting the function into two parts \verb$prefix$ and \verb$rump$ removes a lot of redundancy. *) let bcdi_of_flavor = let prefix = function | Fermion (Lepton (Heavy, _, _, _)) | Fermion (Quark (Heavy, _, _, _)) | Boson (W (Heavy, _)) | Boson (Z Heavy) -> "h" | _ -> "" in let rump = function | Fermion (Lepton spec) -> (match spec with | (_, _, Gen0, Iso_up) -> "nue" | (_, _, Gen0, Iso_down) -> "e" | (_, _, Gen1, Iso_up) -> "numu" | (_, _, Gen1, Iso_down) -> "mu" | (_, _, Gen2, Iso_up) -> "nutau" | (_, _, Gen2, Iso_down) -> "tau") | Fermion (Quark spec) -> (match spec with | (_, _, Gen0, Iso_up) -> "u" | (_, _, Gen0, Iso_down) -> "d" | (_, _, Gen1, Iso_up) -> "c" | (_, _, Gen1, Iso_down) -> "s" | (_, _, Gen2, Iso_up) -> "t" | (_, _, Gen2, Iso_down) -> "b") | Boson (W _) -> "w" | Boson (Z _) -> "z" | Boson A -> invalid_arg (modname ^ ".bcd_of_flavor: no bcd for photon!") | Boson G -> invalid_arg (modname ^ ".bcd_of_flavor: no bcd for gluon!") in function x -> (prefix x) ^ (rump x) ^ "_bcd" (* The function defined in the model signature which returns the colour representation of a particle *) let color = let quarkrep = function | (_, Pos, _, _) -> Color.SUN 3 | (_, Neg, _, _) -> Color.SUN (-3) in function | Fermion (Quark x) -> quarkrep x | Boson G -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + (* Function for calculating the MCID code of a particle. Convenctions have been choosen such that the heavy modes are identified by the same numbers as the light ones, prefixed with \verb$99$. This is supposedly in accord with the conventions for adding new particles to the list of MCID codes. This function is required by the signature. *) let pdg = let iso_delta = function Iso_down -> 0 | Iso_up -> 1 in let gen_delta = function Gen0 -> 0 | Gen1 -> 2 | Gen2 -> 4 in let kk_delta = function Light -> 0 | Heavy -> 9900 in function | Fermion ( Lepton (kk, cs, gen, iso)) -> (int_of_csign cs) * (11 + (gen_delta gen) + (iso_delta iso) + (kk_delta kk)) | Fermion ( Quark (kk, cs, gen, iso)) -> (int_of_csign cs) * (1 + (gen_delta gen) + (iso_delta iso)+ (kk_delta kk)) | Boson (W (kk, cs)) -> (int_of_csign cs) * (24 + (kk_delta kk)) | Boson (Z kk) -> 23 + (kk_delta kk) | Boson A -> 22 | Boson G -> 21 (* Returns the lorentz representation of a particle; required by the signature. *) let lorentz = let spinor = function | (_, Pos, _, _) -> Spinor | (_, Neg, _, _) -> ConjSpinor in function | Fermion (Lepton x) | Fermion (Quark x) -> spinor x | Boson (W _) | Boson (Z _) -> Massive_Vector | Boson A -> Vector | Boson G -> Vector (* O'Mega supports models that allow different gauges; however, we only implement unitary gauge and therefore stub this (SM3 does the same thing). The \verb$gauge$ type as well as \verb$gauge_symbol$ are required by the signature. *) type gauge = unit let gauge_symbol () = failwith (modname ^ ".gauge_symbol: internal error") (* Returns the propagator for a given particle type. Required by signature. *) let propagator = let spinorprop = function | (_, Pos, _, _) -> Prop_Spinor | (_, Neg, _, _) -> Prop_ConjSpinor in function | Fermion (Lepton x) | Fermion (Quark x) -> spinorprop x | Boson (W _) | Boson (Z _) -> (match !all_feynman with false -> Prop_Unitarity | true -> Prop_Feynman) | Boson A -> Prop_Feynman | Boson G -> Prop_Feynman (* Return the width of a particle, required by signature. \\ \emph{TODO:} Refine such that stable particles always are treade via vanishing width, as this might speed up the generated code a bit. *) let width _ = !default_width (* Returns the conjugate particle; required by signature. *) let conjugate = let conj_csign = function | Pos -> Neg | Neg -> Pos in function | Fermion (Lepton (kk, cs, gen, iso)) -> Fermion (Lepton (kk, conj_csign cs, gen, iso)) | Fermion (Quark (kk, cs, gen, iso)) -> Fermion (Quark (kk, conj_csign cs, gen, iso)) | Boson (W (kk, cs)) -> Boson (W (kk, conj_csign cs)) | x -> x (* Tells the diagram generator whether a particle is a fermion, a conjugate fermion or a boson. Required by signature *) let fermion = function | Fermion (Lepton (_, cs, _, _)) | Fermion (Quark (_, cs, _, _)) -> int_of_csign cs | Boson _ -> 0 (* Charges are: charge, lepton number, baryon number, generation. Required by signature *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let qn_charge = function | Boson b -> (match b with | W (_, c) -> (int_of_csign (c)) // 1 | _ -> 0//1) | Fermion f -> (match f with | Lepton (_, c, _, Iso_up) -> 0//1 | Lepton (_, c, _, Iso_down) -> (-1 * int_of_csign (c)) // 1 | Quark (_, c, _, Iso_up) -> (2 * int_of_csign (c)) // 3 | Quark (_, c, _, Iso_down) -> (-1 * int_of_csign (c)) // 3) let qn_lepton = function | Fermion (Lepton (_, c, _, _)) -> int_of_csign (c) // 1 | _ -> 0//1 let qn_baryon = function | Fermion (Quark (_, c, _, _)) -> int_of_csign (c) // 1 | _ -> 0//1 (* Generation is conditional: if we enable the nontrivial CKM matrix, all particles carry generation [0; 0; 0] *) let qn_generation x = let qn cs gen = let c = int_of_csign (cs) in match gen with | Gen0 -> [c//1; 0//1; 0//1] | Gen1 -> [0//1; c//1; 0//1] | Gen2 -> [0//1; 0//1; c//1] in if Module_options.include_ckm then [0//1; 0//1; 0//1] else match x with | Fermion (Lepton (_, c, g, _)) -> qn c g | Fermion (Quark (_, c, g, _)) -> qn c g | _ -> [0//1; 0//1; 0//1] let charges x = [qn_charge x; qn_lepton x; qn_baryon x] @ (qn_generation x) (* A variant to represent the different coupling constants, choosen to mimic the FORTRAN part. Required by signature. *) type constant = | G_a_lep | G_a_quark of isospin | G_aww | G_aaww | G_w_lep of (kkmode * kkmode * generation * kkmode * generation) | G_w_quark of (kkmode * kkmode * generation * kkmode * generation) | G_z_lep of (kkmode * kk2 * generation * isospin) | G_z_quark of (kkmode * kk2 * generation * isospin) | G_wwz of (kk2 * kkmode) | G_wwzz of (kk2 * kk2) | G_wwza of (kk2 * kkmode) | G_wwww of int | G_s | IG_s | G_s2 (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) (* Functions for the construction of constants from indices *) let g_a_quark x = G_a_quark x let g_w_lep kk1 kk2 gen1 kk3 gen2 = G_w_lep (kk1, kk2, gen1, kk3, gen2) let g_w_quark kk1 kk2 gen1 kk3 gen2 = G_w_quark (kk1, kk2, gen1, kk3, gen2) let g_z_lep kk1 kk2 gen iso = G_z_lep (kk1, kk2, gen, iso) let g_z_quark kk1 kk2 gen iso = G_z_quark (kk1, kk2, gen, iso) let g_wwz kk1 kk2 = G_wwz (kk1, kk2) let g_wwzz kk1 kk2 = G_wwzz (kk1, kk2) let g_wwza kk1 kk2 = G_wwza (kk1, kk2) let g_wwww nhw = if (nhw >= 0) && (nhw <= 4) then G_wwww nhw else failwith (modname ^ ".g_wwww: invalid integer, very bad") (* Build a list of the different constants *) let clist = [G_a_lep; G_aww; G_aaww] @ (loop_iso [g_a_quark]) @ (loop_gen (cloop_kk (loop_gen (cloop_kk (loop_kk [g_w_lep] ))))) @ (loop_gen (cloop_kk (loop_gen (cloop_kk (loop_kk [g_w_quark] ))))) @ (loop_iso (loop_gen (cloop_kk2 (loop_kk [g_z_lep] )))) @ (loop_iso (loop_gen (cloop_kk2 (loop_kk [g_z_quark] )))) @ (loop_kk (loop_kk2 [g_wwz] )) @ (loop_kk2 (loop_kk2 [g_wwzz] )) @ (loop_kk (loop_kk2 [g_wwza] )) @ (List.map g_wwww [0; 1; 2; 3; 4]) (* Maximum number of lines meeting at a vertex, required by signature. *) let max_degree () = 4 (* Transform a pair of kk identifiers into a kk2 identifier *) let get_kk2 = function (Light, Light) -> Light2 | (Heavy, Heavy) -> Heavy2 | (Light, Heavy) | (Heavy, Light) -> Light_Heavy (* Flip isospin *) let conj_iso = function Iso_up -> Iso_down | Iso_down -> Iso_up (* Below, lists of couplings are generated which ultimately are joined into a list of all couplings in the model. The generated lists can be viewed using the \verb$dump.ml$ script in the O'Mega toplevel directory. \\ The individual couplings are defined as 5-tupels resp. 6-tupels consisting in this order of the particles meeting at the vertex, the coupling type (see \verb$couplings.ml$) and the coupling constant. *) (* List of $llA$ type vertices *) let vertices_all = let vgen kk gen = ((Fermion (Lepton (kk, Neg, gen, Iso_down)), Boson A, Fermion (Lepton (kk, Pos, gen, Iso_down))), FBF(1, Psibar, V, Psi), G_a_lep) in loop_gen (cloop_kk [vgen]) (* List of $qqA$ type vertices *) let vertices_aqq = let vgen kk gen iso = ((Fermion (Quark (kk, Neg, gen, iso)), Boson A, Fermion (Quark (kk, Pos, gen, iso))), FBF(1, Psibar, V, Psi), G_a_quark iso) in loop_iso (loop_gen (cloop_kk [vgen])) (* List of $\nu lW$ type vertices *) let vertices_wll = let vgen kkw kk_f kk_fbar iso_f gen = ((Fermion (Lepton (kk_fbar, Neg, gen, conj_iso iso_f)), Boson (W (kkw, (match iso_f with Iso_up -> Neg | _ -> Pos))), Fermion (Lepton (kk_f, Pos, gen, iso_f))), FBF (1, Psibar, VA2, Psi), G_w_lep (kkw, (match iso_f with Iso_up -> kk_f | _ -> kk_fbar), gen, (match iso_f with Iso_up -> kk_fbar | _ -> kk_f), gen) ) in loop_gen (loop_iso (cloop_kk (cloop_kk (loop_kk [vgen] )))) (* The same list, but without couplings between the $W^\prime$ and light fermions *) let vertices_wll_diet = let filter = function | ((Fermion (Lepton (Light, _, _, _)), Boson (W (Heavy, _)), Fermion (Lepton (Light, _, _, _))), _, _) -> false | _ -> true in List.filter filter vertices_wll (* List of $udW$ type vertices, flavor-diagonal *) let vertices_wqq_no_ckm = let vgen kkw kk_f kk_fbar iso_f gen = ((Fermion (Quark (kk_fbar, Neg, gen, conj_iso iso_f)), Boson (W (kkw, (match iso_f with Iso_up -> Neg | _ -> Pos))), Fermion (Quark (kk_f, Pos, gen, iso_f))), FBF (1, Psibar, VA2, Psi), G_w_quark (kkw, (match iso_f with Iso_up -> kk_f | _ -> kk_fbar), gen, (match iso_f with Iso_up -> kk_fbar | _ -> kk_f), gen) ) in loop_gen (loop_iso (cloop_kk (cloop_kk (loop_kk [vgen] )))) (* The same list, but without couplings between the $W^\prime$ and the first two generations of quarks *) let vertices_wqq_no_ckm_diet = let filter = function | ((Fermion (Quark (Light, _, gen, _)), Boson (W (Heavy, _)), Fermion (Quark (Light, _, _, _))), _, _) -> (match gen with Gen2 -> true | _ -> false) | _ -> true in List.filter filter vertices_wqq_no_ckm (* List of $udW$ type vertices, including non flavor-diagonal couplings *) let vertices_wqq = let vgen kkw kk_f gen_f kk_fbar gen_fbar iso_f = ((Fermion (Quark (kk_fbar, Neg, gen_fbar, conj_iso iso_f)), Boson (W (kkw, (match iso_f with Iso_up -> Neg | _ -> Pos))), Fermion (Quark (kk_f, Pos, gen_f, iso_f))), FBF (1, Psibar, VA2, Psi), G_w_quark (match iso_f with | Iso_up -> (kkw, kk_f, gen_f, kk_fbar, gen_fbar) | Iso_down -> (kkw, kk_fbar, gen_fbar, kk_f, gen_f))) in loop_iso (loop_gen (cloop_kk (loop_gen (cloop_kk (loop_kk [vgen] ))))) (* List of $llZ$ / $\nu\nu Z$ type vertices *) let vertices_zll = let vgen kkz kk_f kk_fbar gen iso = ((Fermion (Lepton (kk_fbar, Neg, gen, iso)), Boson (Z kkz), Fermion (Lepton (kk_f, Pos, gen, iso))), FBF (1, Psibar, VA2, Psi), G_z_lep (kkz, get_kk2 (kk_f, kk_fbar), gen, iso)) in loop_iso (loop_gen (cloop_kk (cloop_kk (loop_kk [vgen] )))) (* List of $qqZ$ type vertices *) let vertices_zqq = let vgen kkz kk_f kk_fbar gen iso = ((Fermion (Quark (kk_fbar, Neg, gen, iso)), Boson (Z kkz), Fermion (Quark (kk_f, Pos, gen, iso))), FBF (1, Psibar, VA2, Psi), G_z_quark (kkz, get_kk2 (kk_f, kk_fbar), gen, iso)) in loop_iso (loop_gen (cloop_kk (cloop_kk (loop_kk [vgen] )))) (* $gq\bar{q}$ *) let vertices_gqq = let vgen kk gen iso = ((Fermion (Quark (kk, Neg, gen, iso)), Boson G, Fermion (Quark (kk, Pos, gen, iso))), FBF (1, Psibar, V, Psi), G_s) in loop_iso (loop_gen (cloop_kk [vgen])) (* AWW *) let vertices_aww = let vgen kk = ( (Boson A, Boson (W (kk, Pos)), Boson (W (kk, Neg))), Gauge_Gauge_Gauge 1, G_aww) in loop_kk [vgen] (* ZWW *) let vertices_zww = let vgen kkz kkwp kkwm = ((Boson (Z kkz), Boson (W (kkwp, Pos)), Boson (W (kkwm, Neg))), Gauge_Gauge_Gauge 1, G_wwz (get_kk2 (kkwp, kkwm), kkz)) in loop_kk (loop_kk (loop_kk [vgen])) (* $ggg$ *) let vertices_ggg = [(Boson G, Boson G, Boson G), Gauge_Gauge_Gauge (-1), IG_s] (* Stolen from Modellib.SM; the signs seem to be OK. See \verb$couplings.ml$ for more docs. *) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] (* AAWW *) let vertices_aaww = let vgen kk = ((Boson A, Boson (W (kk, Pos)), Boson A, Boson (W (kk, Neg))), minus_gauge4, G_aaww) in loop_kk [vgen] (* WWZZ *) let vertices_wwzz = let vgen kkwp kkwm kk2z = ((Boson (Z (match kk2z with Heavy2 -> Heavy | Light2 | Light_Heavy -> Light)), Boson (W (kkwp, Pos)), Boson (Z (match kk2z with Heavy2 | Light_Heavy -> Heavy | Light2 -> Light)), Boson (W (kkwm, Neg))), minus_gauge4, G_wwzz (get_kk2 (kkwp, kkwm), kk2z)) in loop_kk2 (loop_kk (loop_kk [vgen])) (* WWZA *) let vertices_wwza = let vgen kkwp kkwm kkz = ((Boson A, Boson (W (kkwp, Pos)), Boson (Z kkz), Boson (W (kkwm, Neg))), minus_gauge4, G_wwza (get_kk2 (kkwp, kkwm), kkz)) in loop_kk (loop_kk (loop_kk [vgen])) (* WWWW *) let vertices_wwww = let count = function Light2 -> 0 | Light_Heavy -> 1 | Heavy2 -> 2 in let vgen kk2wp kk2wm = ((Boson (W ((match kk2wp with Heavy2 -> Heavy | Light2 | Light_Heavy -> Light), Pos)), Boson (W ((match kk2wm with Heavy2 -> Heavy | Light2 | Light_Heavy -> Light), Neg)), Boson (W ((match kk2wp with Heavy2 | Light_Heavy -> Heavy | Light2 -> Light), Pos)), Boson (W ((match kk2wm with Heavy2 | Light_Heavy -> Heavy | Light2 -> Light), Neg))), gauge4, G_wwww ((count kk2wp) + (count kk2wm))) in loop_kk2 (loop_kk2 [vgen]) (* gggg *) let vertices_gggg = [(Boson G, Boson G, Boson G, Boson G), gauge4, G_s2] (* The list of couplings is transformed into the fusion lists required by the generator by the Model.Fusions functor. *) (* This is copy\& paste from the other models; check again with Thorsten if it is correct *) module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end ) (* Not sure yet whether F.fusex also creates the conjugate vertices; by looking at the implementation of the other models, I assume it doesn't. Still, better ask Thorsten to be sure!!!\\ \emph{Update:} Still didn't get to ask, but since the results are consistent, I suspect my assertion is correct. \\ The stuff below is required by the signature. *) let vertices () = (vertices_all @ vertices_aqq @ (match Module_options.diet with | false -> vertices_wll | true -> vertices_wll_diet) @ (match (Module_options.include_ckm, Module_options.diet) with | (true, false) -> vertices_wqq | (false, false) -> vertices_wqq_no_ckm | (false, true) -> vertices_wqq_no_ckm_diet | (true, true) -> raise (Failure ("Modules4.Threeshl.vertices: CKM matrix together with option diet is not" ^ " implemented yet!"))) @ vertices_zll @ vertices_zqq @ vertices_aww @ vertices_zww @ vertices_gqq @ vertices_ggg, vertices_aaww @ vertices_wwzz @ vertices_wwza @ vertices_wwww @ vertices_gggg , []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table (* A function that returns a list of a flavours known to the model, required by the signature. *) let flavors () = (List.map flavor_of_f (all_leptons @ all_quarks)) @ (List.map flavor_of_b all_bosons) (* dito, external flavours, also required. *) let external_flavors () = [ "light leptons", List.map flavor_of_f (loop_iso (loop_gen( loop_cs [lepton Light]))); "light quarks", List.map flavor_of_f (loop_iso (loop_gen( loop_cs [quark Light]))); "light gauge bosons", List.map flavor_of_b [W (Light, Pos); W (Light, Neg); Z Light; A]; "heavy gauge bosons", List.map flavor_of_b [W (Heavy, Pos); W (Heavy, Neg); Z Heavy]] @ (match Module_options.include_hf with | true -> [ "heavy leptons", List.map flavor_of_f (loop_iso (loop_gen( loop_cs [lepton Heavy]))); "heavy quarks", List.map flavor_of_f (loop_iso (loop_gen( loop_cs [quark Heavy])))] | false -> [] ) @ ["gluons", [Boson G]] (* Which of the particles are goldstones? $\rightarrow$ none. Required by the signature. *) let goldstone x = None (* This is wrong but handy for debugging the constant identifier generation via -params. Usually, this function would return a record consisting of the parameters as well as expression for the dependent quantities that can be used to generate FORTRAN code for calculating them. However, we have a seperate module for the threeshl, so we can abuse this for debugging. Required by signature. *) let parameters () = {input = List.map (fun x -> (x, 0.)) clist; derived = []; derived_arrays = []} (* Convert a flavour into a ID string with which it will be referred by the user interface of the compiled generator. Required by signature *) let flavor_to_string = let prefix = function | Fermion (Lepton (Heavy, _, _, _)) | Fermion (Quark (Heavy, _, _, _)) | Boson (W (Heavy, _)) | Boson (Z Heavy) -> "H" | _ -> "" in let postfix = function | Fermion (Lepton (_, cs, _, Iso_down)) -> (match cs with Pos -> "-" | Neg -> "+") | Fermion (Quark (_, Neg, _, _)) | Fermion (Lepton (_, Neg, _, Iso_up)) -> "bar" | Boson (W (_, cs)) -> (match cs with Pos -> "+" | Neg -> "-") | _ -> "" in let rump = function | Fermion (Lepton desc) -> (match desc with | (_, _, Gen0, Iso_up) -> "nue" | (_, _, Gen0, Iso_down) -> "e" | (_, _, Gen1, Iso_up) -> "numu" | (_, _, Gen1, Iso_down) -> "mu" | (_, _, Gen2, Iso_up) -> "nutau" | (_, _, Gen2, Iso_down) -> "tau") | Fermion (Quark desc) -> (match desc with | (_, _, Gen0, Iso_up) -> "u" | (_, _, Gen0, Iso_down) -> "d" | (_, _, Gen1, Iso_up) -> "c" | (_, _, Gen1, Iso_down) -> "s" | (_, _, Gen2, Iso_up) -> "t" | (_, _, Gen2, Iso_down) -> "b") | Boson (W _) -> "W" | Boson (Z _) -> "Z" | Boson A -> "A" | Boson G -> "gl" in function x -> (prefix x) ^ (rump x) ^ (postfix x) (* Conversion of the ID string into a particle flavor. Instead of going through all cases again, we generate a ``dictionary'' of flavor / ID pairs which we use to identify the correct flavor. Required by signature. *) let flavor_of_string x = let dict = List.map (fun x -> (x, flavor_to_string x)) (flavors ()) in let get_ident = function (x, _) -> x in try get_ident (List.find (fun (_, y) -> (x = y)) dict) with Not_found -> (match x with | "g" -> Boson G | _ -> invalid_arg (modname ^ ".flavor_of_string") ) (* Converts a flavor into a symbol used as identification in the generated FORTRAN code (has to comply to the conventions of valid FORTRAN identifiers therefore). We stick to the same convenctions as SM3, prefixing heavy modes with a \verb$H$. Required by signature. *) let flavor_symbol = let prefix = function | Fermion (Lepton (Heavy, _, _, _)) | Fermion (Quark (Heavy, _, _, _)) | Boson (W (Heavy, _)) | Boson (Z Heavy) -> "H" | _ -> "" in let postfix = function | Fermion (Lepton (_, Neg, _, _)) | Fermion (Quark (_, Neg, _, _)) -> "b" | _ -> "" in let rump = function | Fermion spec -> (match spec with | Lepton (_, _, gen, Iso_up) -> "n" ^ (string_of_int (int_of_gen gen)) | Lepton (_, _, gen, Iso_down) -> "l" ^ (string_of_int (int_of_gen gen)) | Quark (_, _, gen, Iso_up) -> "u" ^ (string_of_int (int_of_gen gen)) | Quark (_, _, gen, Iso_down) -> "d"^ (string_of_int (int_of_gen gen))) | Boson spec -> (match spec with | W (_, Pos) -> "wp" | W (_, Neg) -> "wm" | Z _ -> "z" | A -> "a" | G -> "gl" ) in function x -> (prefix x) ^ (rump x) ^ (postfix x) (* Generate TeX for a flavor *) let flavor_to_TeX = let bar x y = match x with Neg -> "\\overline{" ^ y ^ "}" | Pos -> y in let pm x y = match x with Neg -> "{" ^ y ^ "}^+" | Pos -> "{" ^ y ^ "}^-" in let prime x y = match x with Light -> y | Heavy -> "{" ^ y ^ "}^\\prime" in function | Fermion (Lepton desc) -> (match desc with | (kk, cs, gen, Iso_up) -> prime kk (bar cs (match gen with | Gen0 -> "\\nu_e" | Gen1 -> "\\nu_\\mu" | Gen2 -> "\\nu_\\tau")) | (kk, cs, gen, Iso_down) -> prime kk (pm cs (match gen with | Gen0 -> "e" | Gen1 -> "\\mu" | Gen2 -> "\\tau"))) | Fermion (Quark (kk, cs, gen, iso)) -> prime kk (bar cs (match (gen, iso) with | (Gen0, Iso_up) -> "u" | (Gen0, Iso_down) -> "d" | (Gen1, Iso_up) -> "c" | (Gen1, Iso_down) -> "s" | (Gen2, Iso_up) -> "t" | (Gen2, Iso_down) -> "b")) | Boson spec -> (match spec with | W (kk, cs) -> prime kk (pm (match cs with Pos -> Neg | Neg -> Pos) "W") | Z kk -> prime kk "Z" | A -> "A" | G -> "g") (* Returns the string referring to the particle mass in the generated FORTRAN code. Required by signature. *) let mass_symbol = function | Boson A | Boson G-> "0._default" | x -> "mass_array(" ^ (bcdi_of_flavor x) ^ ")" (* Dito, for width. Required by signature. *) let width_symbol = function | Boson A | Boson G -> "0._default" | x -> "width_array(" ^ (bcdi_of_flavor x) ^ ")" (* Determines the string referring to a coupling constant in the generated FORTRAN code. Required by signature. *) let constant_symbol = let c = ", " in let g_w_ferm = function (kk1, kk2, gen1, kk3, gen2) -> ":, " ^ (fspec_of_kkmode kk1) ^ c ^ (fspec_of_kkmode kk2) ^ c ^ (fspec_of_gen gen1) ^ c ^ (fspec_of_kkmode kk3) ^ c ^ (fspec_of_gen gen2) in let g_z_ferm = function (kk1, kk2, gen, iso) -> ":, " ^ (fspec_of_kkmode kk1) ^ c ^ (fspec_of_kk2 kk2) ^ c ^ (fspec_of_gen gen) ^ c ^ (fspec_of_iso iso) in function | G_a_lep -> "g_a_lep" | G_s -> "g_s_norm" | IG_s -> "ig_s_norm" | G_s2 -> "g_s_norm2" | G_a_quark iso -> "g_a_quark(" ^ (fspec_of_iso iso) ^ ")" | G_aww -> "ig_aww" | G_aaww -> "g_aaww" | G_w_lep spec -> "g_w_lep_va(" ^ (g_w_ferm spec) ^ ")" | G_w_quark spec -> "g_w_quark_va(" ^ (g_w_ferm spec) ^ ")" | G_z_lep spec -> "g_z_lep_va(" ^ (g_z_ferm spec) ^ ")" | G_z_quark spec -> "g_z_quark_va(" ^ (g_z_ferm spec) ^ ")" | G_wwz (kk1, kk2) -> "ig_wwz(" ^ (fspec_of_kk2 kk1) ^ c ^ (fspec_of_kkmode kk2) ^ ")" | G_wwzz (kk1, kk2) -> "g_wwzz(" ^ (fspec_of_kk2 kk1) ^ c ^ (fspec_of_kk2 kk2) ^ ")" | G_wwza (kk1, kk2) -> "g_wwza(" ^(fspec_of_kk2 kk1) ^ c ^ (fspec_of_kkmode kk2) ^ ")" | G_wwww nhw -> if (0 <= nhw) && (nhw <= 4) then "g_wwww(" ^ (string_of_int nhw) ^ ")" else failwith "Modules4.Threeshl.constant_symbol: invalid int for G_wwww; very bad" end (* \thocwmodulesection{THDM with and without non-trivial flavor structure} *) module type THDM_flags = sig val ckm_present : bool end module THDM : THDM_flags = struct let ckm_present = false end module THDM_CKM : THDM_flags = struct let ckm_present = true end module TwoHiggsDoublet (Flags : THDM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | Hh | HA | HH | Hp | Hm type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.TwoHiggsDoublet.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Higgs", List.map other [Hh; HH; HA; Hp; Hm]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> Scalar let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | Hh | HH | HA | Hp | Hm -> Prop_Scalar end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | Hh -> Hh | HH -> HH | HA -> HA | Hp -> Hm | Hm -> Hp end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 (* Electrical charge, lepton number, baryon number. We could avoid the rationals altogether by multiplying the first and last by 3 \ldots *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("Modellib_BSM.TwoHiggsDoublet.generation': " ^ string_of_int n) let generation f = if Flags.ckm_present then [] else match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [ 0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | Hh | HH | HA | Phi0 -> 0//1 | Hp | Phip -> 1//1 | Hm | Phim -> -1//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | I_Q_W | I_G_ZWW | I_G_WWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_htt | G_hbb | G_hcc | G_htautau | G_hmumu | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_Hmumu | I_G_Att | I_G_Abb | I_G_Acc | I_G_Atautau | I_G_Amumu | G_Htb | G_Hcs | G_Htaunu | G_Hmunu | Gs | I_Gs | G2 | G_AHpHm | G_ZHpHm | G_Zh1h2 | G_Zh1h3 | G_Zh2h3 | G_WpHmh1 | G_WpHmh2 | G_WpHmh3 | G_WmHph1 | G_WmHph2 | G_WmHph3 | G_h1ZZ | G_h2ZZ | G_h3ZZ | G_h1WpWm | G_h2WpWm | G_h3WpWm | G_hhWpWm | G_hhZZ | G_HpHmAA | G_HpHmZZ | G_HpHmAZ | G_HpHmWpWm | G_h1HpAWm | G_h2HpAWm | G_h3HpAWm | G_h1HpZWm | G_h2HpZWm | G_h3HpZWm | G_h1HpAWmC | G_h2HpAWmC | G_h3HpAWmC | G_h1HpZWmC | G_h2HpZWmC | G_h3HpZWmC | G_h1HpHm | G_h2HpHm | G_h3HpHm | G_h111 | G_h112 | G_h113 | G_h221 | G_h222 | G_h223 | G_h331 | G_h332 | G_h333 | G_h123 | G_HpHmHpHm | G_HpHm11 | G_HpHm12 | G_HpHm13 | G_HpHm22 | G_HpHm23 | G_HpHm33 | G_h1111 | G_h1112 | G_h1113 | G_h1122 | G_h1123 | G_h1133 | G_h1222 | G_h1223 | G_h1233 | G_h1333 | G_h2222 | G_h2223 | G_h2233 | G_h2333 | G_h3333 | G_h1uu | G_h2uu | G_h3uu | G_h1uc | G_h2uc | G_h3uc | G_h1ut | G_h2ut | G_h3ut | G_h1cu | G_h2cu | G_h3cu | G_h1cc | G_h2cc | G_h3cc | G_h1ct | G_h2ct | G_h3ct | G_h1tu | G_h2tu | G_h3tu | G_h1tc | G_h2tc | G_h3tc | G_h1tt | G_h2tt | G_h3tt | G_h1dd | G_h2dd | G_h3dd | G_h1ds | G_h2ds | G_h3ds | G_h1db | G_h2db | G_h3db | G_h1sd | G_h2sd | G_h3sd | G_h1ss | G_h2ss | G_h3ss | G_h1sb | G_h2sb | G_h3sb | G_h1bd | G_h2bd | G_h3bd | G_h1bs | G_h2bs | G_h3bs | G_h1bb | G_h2bb | G_h3bb | G_hud | G_hus | G_hub | G_hcd | G_hcs | G_hcb | G_htd | G_hts | G_htb | G_hdu | G_hdc | G_hdt | G_hsu | G_hsc | G_hst | G_hbu | G_hbc | G_hbt | G_he1n1 | G_he1n2 | G_he1n3 | G_he2n1 | G_he2n2 | G_he2n3 | G_he3n1 | G_he3n2 | G_he3n3 | G_hn1e1 | G_hn1e2 | G_hn1e3 | G_hn2e1 | G_hn2e2 | G_hn2e3 | G_hn3e1 | G_hn3e2 | G_hn3e3 | G_h1e1e1 | G_h2e1e1 | G_h3e1e1 | G_h1e1e2 | G_h2e1e2 | G_h3e1e2 | G_h1e1e3 | G_h2e1e3 | G_h3e1e3 | G_h1e2e1 | G_h2e2e1 | G_h3e2e1 | G_h1e2e2 | G_h2e2e2 | G_h3e2e2 | G_h1e2e3 | G_h2e2e3 | G_h3e2e3 | G_h1e3e1 | G_h2e3e1 | G_h3e3e1 | G_h1e3e2 | G_h2e3e2 | G_h3e3e2 | G_h1e3e3 | G_h2e3e3 | G_h3e3e3 | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let array_list = [G_h1uu; G_h2uu; G_h3uu; G_h1uc; G_h2uc; G_h3uc; G_h1ut; G_h2ut; G_h3ut; G_h1cu; G_h2cu; G_h3cu; G_h1cc; G_h2cc; G_h3cc; G_h1ct; G_h2ct; G_h3ct; G_h1tu; G_h2tu; G_h3tu; G_h1tc; G_h2tc; G_h3tc; G_h1tt; G_h2tt; G_h3tt; G_h1dd; G_h2dd; G_h3dd; G_h1ds; G_h2ds; G_h3ds; G_h1db; G_h2db; G_h3db; G_h1sd; G_h2sd; G_h3sd; G_h1ss; G_h2ss; G_h3ss; G_h1sb; G_h2sb; G_h3sb; G_h1bd; G_h2bd; G_h3bd; G_h1bs; G_h2bs; G_h3bs; G_h1bb; G_h2bb; G_h3bb; G_hud; G_hus; G_hub; G_hcd; G_hcs; G_hcb; G_htd; G_hts; G_htb; G_hdu; G_hdc; G_hdt; G_hsu; G_hsc; G_hst; G_hbu; G_hbc; G_hbt; G_he1n1; G_he1n2; G_he1n3; G_he2n1; G_he2n2; G_he2n3; G_he3n1; G_he3n2; G_he3n3; G_hn1e1; G_hn1e2; G_hn1e3; G_hn2e1; G_hn2e2; G_hn2e3; G_hn3e1; G_hn3e2; G_hn3e3; G_h1e1e1; G_h2e1e1; G_h3e1e1; G_h1e1e2; G_h2e1e2; G_h3e1e2; G_h1e1e3; G_h2e1e3; G_h3e1e3; G_h1e2e1; G_h2e2e1; G_h3e2e1; G_h1e2e2; G_h2e2e2; G_h3e2e2; G_h1e2e3; G_h2e2e3; G_h3e2e3; G_h1e3e1; G_h2e3e1; G_h3e3e1; G_h1e3e2; G_h2e3e2; G_h3e3e2; G_h1e3e3; G_h2e3e3; G_h3e3e3] - let add_complex_array_tag c = (Complex_Array c, [Const 0; Const 0]) + let add_complex_array_tag c = (Complex_Array c, [Integer 0; Integer 0]) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)); + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)); ] @ (List.map add_complex_array_tag array_list) let parameters () = { input = []; derived = []; derived_arrays = derived_parameter_arrays} module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* \begin{equation} \mathcal{L}_{\textrm{EM}} = - e \sum_i q_i \bar\psi_i\fmslash{A}\psi_i \end{equation} *) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF (1, Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF (1, Psibar, V, Psi), Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{NC}} = - \frac{g}{2\cos\theta_W} \sum_i \bar\psi_i\fmslash{Z}(g_V^i-g_A^i\gamma_5)\psi_i \end{equation} *) let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let yukawa = [ ((M (U (-1)),O Hh,M (U 1)), FBF (1,Psibar,SP,Psi), G_h1uu); ((M (U (-1)),O HH,M (U 1)), FBF (1,Psibar,SP,Psi), G_h2uu); ((M (U (-1)),O HA,M (U 1)), FBF (1,Psibar,SP,Psi), G_h3uu); ((M (U (-2)),O Hh,M (U 2)), FBF (1,Psibar,SP,Psi), G_h1cc); ((M (U (-2)),O HH,M (U 2)), FBF (1,Psibar,SP,Psi), G_h2cc); ((M (U (-2)),O HA,M (U 2)), FBF (1,Psibar,SP,Psi), G_h3cc); ((M (U (-3)),O Hh,M (U 3)), FBF (1,Psibar,SP,Psi), G_h1tt); ((M (U (-3)),O HH,M (U 3)), FBF (1,Psibar,SP,Psi), G_h2tt); ((M (U (-3)),O HA,M (U 3)), FBF (1,Psibar,SP,Psi), G_h3tt); ((M (D (-1)),O Hh,M (D 1)), FBF (1,Psibar,SP,Psi), G_h1dd); ((M (D (-1)),O HH,M (D 1)), FBF (1,Psibar,SP,Psi), G_h2dd); ((M (D (-1)),O HA,M (D 1)), FBF (1,Psibar,SP,Psi), G_h3dd); ((M (D (-2)),O Hh,M (D 2)), FBF (1,Psibar,SP,Psi), G_h1ss); ((M (D (-2)),O HH,M (D 2)), FBF (1,Psibar,SP,Psi), G_h2ss); ((M (D (-2)),O HA,M (D 2)), FBF (1,Psibar,SP,Psi), G_h3ss); ((M (D (-3)),O Hh,M (D 3)), FBF (1,Psibar,SP,Psi), G_h1bb); ((M (D (-3)),O HH,M (D 3)), FBF (1,Psibar,SP,Psi), G_h2bb); ((M (D (-3)),O HA,M (D 3)), FBF (1,Psibar,SP,Psi), G_h3bb); ((M (U (-1)),O Hp,M (D 1)), FBF (1,Psibar,SP,Psi), G_hud); ((M (U (-2)),O Hp,M (D 2)), FBF (1,Psibar,SP,Psi), G_hcs); ((M (U (-3)),O Hp,M (D 3)), FBF (1,Psibar,SP,Psi), G_htb); ((M (D (-1)),O Hm,M (U 1)), FBF (1,Psibar,SP,Psi), G_hdu); ((M (D (-2)),O Hm,M (U 2)), FBF (1,Psibar,SP,Psi), G_hsc); ((M (D (-3)),O Hm,M (U 3)), FBF (1,Psibar,SP,Psi), G_hbt); ((M (L (-1)),O Hh,M (L 1)), FBF (1,Psibar,SP,Psi), G_h1e1e1); ((M (L (-1)),O HH,M (L 1)), FBF (1,Psibar,SP,Psi), G_h2e1e1); ((M (L (-1)),O HA,M (L 1)), FBF (1,Psibar,SP,Psi), G_h3e1e1); ((M (L (-2)),O Hh,M (L 2)), FBF (1,Psibar,SP,Psi), G_h1e2e2); ((M (L (-2)),O HH,M (L 2)), FBF (1,Psibar,SP,Psi), G_h2e2e2); ((M (L (-2)),O HA,M (L 2)), FBF (1,Psibar,SP,Psi), G_h3e2e2); ((M (L (-3)),O Hh,M (L 3)), FBF (1,Psibar,SP,Psi), G_h1e3e3); ((M (L (-3)),O HH,M (L 3)), FBF (1,Psibar,SP,Psi), G_h2e3e3); ((M (L (-3)),O HA,M (L 3)), FBF (1,Psibar,SP,Psi), G_h3e3e3) (*i ((M (N (-1)),O Hp,M (L 1)), FBF (1,Psibar,SR,Psi), G_hn1e1); ((M (N (-2)),O Hp,M (L 2)), FBF (1,Psibar,SR,Psi), G_hn2e2); ((M (N (-3)),O Hp,M (L 3)), FBF (1,Psibar,SR,Psi), G_hn3e3); ((M (L (-1)),O Hm,M (N 1)), FBF (1,Psibar,SL,Psi), G_he1n1); ((M (L (-2)),O Hm,M (N 2)), FBF (1,Psibar,SL,Psi), G_he2n2); ((M (L (-3)),O Hm,M (N 3)), FBF (1,Psibar,SL,Psi), G_he3n3); i*) ] @ if Flags.ckm_present then [((M (U (-1)),O Hh, M (U 2)), FBF (1,Psibar,SP,Psi), G_h1uc); ((M (U (-1)),O Hh, M (U 3)), FBF (1,Psibar,SP,Psi), G_h1ut); ((M (U (-2)),O Hh,M (U 1)), FBF (1,Psibar,SP,Psi), G_h1cu); ((M (U (-2)),O Hh,M (U 3)), FBF (1,Psibar,SP,Psi), G_h1ct); ((M (U (-1)),O HH,M (U 2)), FBF (1,Psibar,SP,Psi), G_h2uc); ((M (U (-1)),O HH,M (U 3)), FBF (1,Psibar,SP,Psi), G_h2ut); ((M (U (-1)),O HA,M (U 2)), FBF (1,Psibar,SP,Psi), G_h3uc); ((M (U (-1)),O HA,M (U 3)), FBF (1,Psibar,SP,Psi), G_h3ut); ((M (U (-2)),O HH,M (U 1)), FBF (1,Psibar,SP,Psi), G_h2cu); ((M (U (-2)),O HH,M (U 3)), FBF (1,Psibar,SP,Psi), G_h2ct); ((M (U (-2)),O HA,M (U 1)), FBF (1,Psibar,SP,Psi), G_h3cu); ((M (U (-2)),O HA,M (U 3)), FBF (1,Psibar,SP,Psi), G_h3ct); ((M (U (-3)),O Hh,M (U 1)), FBF (1,Psibar,SP,Psi), G_h1tu); ((M (U (-3)),O Hh,M (U 2)), FBF (1,Psibar,SP,Psi), G_h1tc); ((M (U (-3)),O HH,M (U 1)), FBF (1,Psibar,SP,Psi), G_h2tu); ((M (U (-3)),O HH,M (U 2)), FBF (1,Psibar,SP,Psi), G_h2tc); ((M (U (-3)),O HA,M (U 1)), FBF (1,Psibar,SP,Psi), G_h3tu); ((M (U (-3)),O HA,M (U 2)), FBF (1,Psibar,SP,Psi), G_h3tc); ((M (D (-1)),O Hh,M (D 2)), FBF (1,Psibar,SP,Psi), G_h1ds); ((M (D (-1)),O Hh,M (D 3)), FBF (1,Psibar,SP,Psi), G_h1db); ((M (D (-1)),O HH,M (D 2)), FBF (1,Psibar,SP,Psi), G_h2ds); ((M (D (-1)),O HH,M (D 3)), FBF (1,Psibar,SP,Psi), G_h2db); ((M (D (-1)),O HA,M (D 2)), FBF (1,Psibar,SP,Psi), G_h3ds); ((M (D (-1)),O HA,M (D 3)), FBF (1,Psibar,SP,Psi), G_h3db); ((M (D (-2)),O Hh,M (D 1)), FBF (1,Psibar,SP,Psi), G_h1sd); ((M (D (-2)),O Hh,M (D 3)), FBF (1,Psibar,SP,Psi), G_h1sb); ((M (D (-2)),O HH,M (D 1)), FBF (1,Psibar,SP,Psi), G_h2sd); ((M (D (-2)),O HH,M (D 3)), FBF (1,Psibar,SP,Psi), G_h2sb); ((M (D (-2)),O HA,M (D 1)), FBF (1,Psibar,SP,Psi), G_h3sd); (*i ((M (N (-1)),O Hp,M (L 2)), FBF (1,Psibar,SR,Psi), G_hn1e2); ((M (N (-1)),O Hp,M (L 3)), FBF (1,Psibar,SR,Psi), G_hn1e3); ((M (N (-2)),O Hp,M (L 1)), FBF (1,Psibar,SR,Psi), G_hn2e1); ((M (N (-2)),O Hp,M (L 3)), FBF (1,Psibar,SR,Psi), G_hn2e3); ((M (N (-3)),O Hp,M (L 1)), FBF (1,Psibar,SR,Psi), G_hn3e1); ((M (N (-3)),O Hp,M (L 2)), FBF (1,Psibar,SR,Psi), G_hn3e2); ((M (L (-1)),O Hm,M (N 2)), FBF (1,Psibar,SL,Psi), G_he1n2); ((M (L (-1)),O Hm,M (N 3)), FBF (1,Psibar,SL,Psi), G_he1n3); ((M (L (-2)),O Hm,M (N 1)), FBF (1,Psibar,SL,Psi), G_he2n1); ((M (L (-2)),O Hm,M (N 3)), FBF (1,Psibar,SL,Psi), G_he2n3); ((M (L (-3)),O Hm,M (N 1)), FBF (1,Psibar,SL,Psi), G_he3n1); ((M (L (-3)),O Hm,M (N 2)), FBF (1,Psibar,SL,Psi), G_he3n2); i*) ((M (L (-1)),O Hh,M (L 2)), FBF (1,Psibar,SP,Psi), G_h1e1e2); ((M (L (-1)),O Hh,M (L 3)), FBF (1,Psibar,SP,Psi), G_h1e1e3); ((M (L (-1)),O HH,M (L 2)), FBF (1,Psibar,SP,Psi), G_h2e1e2); ((M (L (-1)),O HH,M (L 3)), FBF (1,Psibar,SP,Psi), G_h2e1e3); ((M (L (-1)),O HA,M (L 2)), FBF (1,Psibar,SP,Psi), G_h3e1e2); ((M (L (-1)),O HA,M (L 3)), FBF (1,Psibar,SP,Psi), G_h3e1e3); ((M (L (-2)),O Hh,M (L 1)), FBF (1,Psibar,SP,Psi), G_h1e2e1); ((M (L (-2)),O Hh,M (L 3)), FBF (1,Psibar,SP,Psi), G_h1e2e3); ((M (L (-2)),O HH,M (L 1)), FBF (1,Psibar,SP,Psi), G_h2e2e1); ((M (L (-2)),O HH,M (L 3)), FBF (1,Psibar,SP,Psi), G_h2e2e3); ((M (L (-2)),O HA,M (L 1)), FBF (1,Psibar,SP,Psi), G_h3e2e1); ((M (L (-2)),O HA,M (L 3)), FBF (1,Psibar,SP,Psi), G_h3e2e3); ((M (L (-3)),O Hh,M (L 1)), FBF (1,Psibar,SP,Psi), G_h1e3e1); ((M (L (-3)),O Hh,M (L 2)), FBF (1,Psibar,SP,Psi), G_h1e3e2); ((M (L (-3)),O HH,M (L 1)), FBF (1,Psibar,SP,Psi), G_h2e3e1); ((M (L (-3)),O HH,M (L 2)), FBF (1,Psibar,SP,Psi), G_h2e3e2); ((M (L (-3)),O HA,M (L 1)), FBF (1,Psibar,SP,Psi), G_h3e3e1); ((M (L (-3)),O HA,M (L 2)), FBF (1,Psibar,SP,Psi), G_h3e3e2) ] else [] (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{QGC}} = - g^2 W_{+,\mu} W_{-,\nu} W_+^\mu W_-^\nu + \ldots \end{equation} *) (* Actually, quartic gauge couplings are a little bit more straightforward using auxiliary fields. Here we have to impose the antisymmetry manually: \begin{subequations} \begin{multline} (W^{+,\mu}_1 W^{-,\nu}_2 - W^{+,\nu}_1 W^{-,\mu}_2) (W^+_{3,\mu} W^-_{4,\nu} - W^+_{3,\nu} W^-_{4,\mu}) \\ = 2(W^+_1W^+_3)(W^-_2W^-_4) - 2(W^+_1W^-_4)(W^-_2W^+_3) \end{multline} also ($V$ can be $A$ or $Z$) \begin{multline} (W^{+,\mu}_1 V^\nu_2 - W^{+,\nu}_1 V^\mu_2) (W^-_{3,\mu} V_{4,\nu} - W^-_{3,\nu} V_{4,\mu}) \\ = 2(W^+_1W^-_3)(V_2V_4) - 2(W^+_1V_4)(V_2W^-_3) \end{multline} \end{subequations} *) (* \begin{subequations} \begin{multline} W^{+,\mu} W^{-,\nu} W^+_\mu W^-_\nu \end{multline} \end{subequations} *) let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2] let gauge_higgs = [ (G Ga, O Hp, O Hm), Vector_Scalar_Scalar 1, G_AHpHm; (G Z, O Hp, O Hm), Vector_Scalar_Scalar 1, G_ZHpHm; (G Z, O Hh, O HH), Vector_Scalar_Scalar 1, G_Zh1h2; (G Z, O Hh, O HA), Vector_Scalar_Scalar 1, G_Zh1h3; (G Z, O HH, O HA), Vector_Scalar_Scalar 1, G_Zh2h3; (G Wp, O Hm, O Hh), Vector_Scalar_Scalar 1, G_WpHmh1; (G Wp, O Hm, O HH), Vector_Scalar_Scalar 1, G_WpHmh2; (G Wp, O Hm, O HA), Vector_Scalar_Scalar 1, G_WpHmh3; (G Wm, O Hp, O Hh), Vector_Scalar_Scalar 1, G_WmHph1; (G Wm, O Hp, O HH), Vector_Scalar_Scalar 1, G_WmHph2; (G Wm, O Hp, O HA), Vector_Scalar_Scalar 1, G_WmHph3; (O Hh, G Z, G Z), Scalar_Vector_Vector 1, G_h1ZZ; (O HH, G Z, G Z), Scalar_Vector_Vector 1, G_h2ZZ; (O HA, G Z, G Z), Scalar_Vector_Vector 1, G_h3ZZ; (O Hh, G Wp, G Wm), Scalar_Vector_Vector 1, G_h1WpWm; (O HH, G Wp, G Wm), Scalar_Vector_Vector 1, G_h2WpWm; (O HA, G Wp, G Wm), Scalar_Vector_Vector 1, G_h3WpWm ] let gauge_higgs4 = [ (O Hh, O Hh, G Wp, G Wm), Scalar2_Vector2 1, G_hhWpWm; (O HH, O HH, G Wp, G Wm), Scalar2_Vector2 1, G_hhWpWm; (O HA, O HA, G Wp, G Wm), Scalar2_Vector2 1, G_hhWpWm; (O Hh, O Hh, G Z, G Z), Scalar2_Vector2 1, G_hhZZ; (O HH, O HH, G Z, G Z), Scalar2_Vector2 1, G_hhZZ; (O HA, O HA, G Z, G Z), Scalar2_Vector2 1, G_hhZZ; (O Hp, O Hm, G Ga, G Ga), Scalar2_Vector2 1, G_HpHmAA; (O Hp, O Hm, G Z, G Z), Scalar2_Vector2 1, G_HpHmZZ; (O Hp, O Hm, G Ga, G Z), Scalar2_Vector2 1, G_HpHmAZ; (O Hp, O Hm, G Wp, G Wm), Scalar2_Vector2 1, G_HpHmWpWm; (O Hh, O Hp, G Ga, G Wm), Scalar2_Vector2 1, G_h1HpAWm; (O HH, O Hp, G Ga, G Wm), Scalar2_Vector2 1, G_h2HpAWm; (O HA, O Hp, G Ga, G Wm), Scalar2_Vector2 1, G_h3HpAWm; (O Hh, O Hp, G Z, G Wm), Scalar2_Vector2 1, G_h1HpZWm; (O HH, O Hp, G Z, G Wm), Scalar2_Vector2 1, G_h2HpZWm; (O HA, O Hp, G Z, G Wm), Scalar2_Vector2 1, G_h3HpZWm; (O Hh, O Hm, G Ga, G Wp), Scalar2_Vector2 1, G_h1HpAWmC; (O HH, O Hm, G Ga, G Wp), Scalar2_Vector2 1, G_h2HpAWmC; (O HA, O Hm, G Ga, G Wp), Scalar2_Vector2 1, G_h3HpAWmC; (O Hh, O Hm, G Z, G Wp), Scalar2_Vector2 1, G_h1HpZWmC; (O HH, O Hm, G Z, G Wp), Scalar2_Vector2 1, G_h2HpZWmC; (O HA, O Hm, G Z, G Wp), Scalar2_Vector2 1, G_h3HpZWmC ] let higgs = [ (O Hh, O Hp, O Hm), Scalar_Scalar_Scalar 1, G_h1HpHm; (O HH, O Hp, O Hm), Scalar_Scalar_Scalar 1, G_h2HpHm; (O HA, O Hp, O Hm), Scalar_Scalar_Scalar 1, G_h3HpHm; (O Hh, O Hh, O Hh), Scalar_Scalar_Scalar 1, G_h111; (O Hh, O Hh, O HH), Scalar_Scalar_Scalar 1, G_h112; (O Hh, O Hh, O HA), Scalar_Scalar_Scalar 1, G_h113; (O HH, O HH, O Hh), Scalar_Scalar_Scalar 1, G_h221; (O HH, O HH, O HH), Scalar_Scalar_Scalar 1, G_h222; (O HH, O HH, O HA), Scalar_Scalar_Scalar 1, G_h223; (O HA, O HA, O Hh), Scalar_Scalar_Scalar 1, G_h331; (O HA, O HA, O HH), Scalar_Scalar_Scalar 1, G_h332; (O HA, O HA, O HA), Scalar_Scalar_Scalar 1, G_h333; (O Hh, O HH, O HA), Scalar_Scalar_Scalar 1, G_h123 ] let higgs4 = [ (O Hp, O Hm, O Hp, O Hm), Scalar4 1, G_HpHmHpHm; (O Hp, O Hm, O Hh, O Hh), Scalar4 1, G_HpHm11; (O Hp, O Hm, O Hh, O HH), Scalar4 1, G_HpHm12; (O Hp, O Hm, O Hh, O HA), Scalar4 1, G_HpHm13; (O Hp, O Hm, O HH, O HH), Scalar4 1, G_HpHm22; (O Hp, O Hm, O HH, O HA), Scalar4 1, G_HpHm23; (O Hp, O Hm, O HA, O HA), Scalar4 1, G_HpHm33; (O Hh, O Hh, O Hh, O Hh), Scalar4 1, G_h1111; (O Hh, O Hh, O Hh, O HH), Scalar4 1, G_h1112; (O Hh, O Hh, O Hh, O HA), Scalar4 1, G_h1113; (O Hh, O Hh, O HH, O HH), Scalar4 1, G_h1122; (O Hh, O Hh, O HH, O HA), Scalar4 1, G_h1123; (O Hh, O Hh, O HA, O HA), Scalar4 1, G_h1133; (O Hh, O HH, O HH, O HH), Scalar4 1, G_h1222; (O Hh, O HH, O HH, O HA), Scalar4 1, G_h1223; (O Hh, O HH, O HA, O HA), Scalar4 1, G_h1233; (O Hh, O HA, O HA, O HA), Scalar4 1, G_h1333; (O HH, O HH, O HH, O HH), Scalar4 1, G_h2222; (O HH, O HH, O HH, O HA), Scalar4 1, G_h2223; (O HH, O HH, O HA, O HA), Scalar4 1, G_h2233; (O HH, O HA, O HA, O HA), Scalar4 1, G_h2333; (O HA, O HA, O HA, O HA), Scalar4 1, G_h3333 ] let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "h0" -> O Hh | "H0" -> O HH | "A0" -> O HA | _ -> invalid_arg "Modellib_BSM.TwoHiggsDoublet.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.TwoHiggsDoublet.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.TwoHiggsDoublet.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.TwoHiggsDoublet.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.TwoHiggsDoublet.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | Hh -> "h0" | HH -> "H0" | HA -> "A0" | Hp -> "H+" | Hm -> "H-" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.TwoHiggsDoublet.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.TwoHiggsDoublet.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.TwoHiggsDoublet.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.TwoHiggsDoublet.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | Hh -> "h^0" | HH -> "H^0" | HA -> "A^0" | Hp -> "H^+" | Hm -> "H^-" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | Hh -> "h" | HH -> "h0" | HA -> "a0" | Hp -> "hp" | Hm -> "hm" end let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip -> 27 | Phim -> -27 | Phi0 -> 26 | Hh -> 25 | HH -> 35 | HA -> 36 | Hp -> 37 | Hm -> -37 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | I_G_WWW -> "igwww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_htt -> "ghtt" | G_hbb -> "ghbb" | G_hcc -> "ghcc" | G_Htt -> "gh0tt" | G_Hbb -> "gh0bb" | G_Hcc -> "gh0cc" | I_G_Att -> "iga0tt" | I_G_Abb -> "iga0bb" | I_G_Acc -> "iga0cc" | G_htautau -> "ghtautau" | G_hmumu -> "ghmumu" | G_Htautau -> "gh0tautau" | G_Hmumu -> "gh0mumu" | I_G_Atautau -> "iga0tautau" | I_G_Amumu -> "iga0mumu" | G_Htb -> "ghptb" | G_Hcs -> "ghpcs" | G_Htaunu -> "ghptaunu" | G_Hmunu -> "ghpmunu" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | G_AHpHm -> "gAHpHm" | G_ZHpHm -> "gZHpHm" | G_Zh1h2 -> "gZh1h2" | G_Zh1h3 -> "gZh1h3" | G_Zh2h3 -> "gZh2h3" | G_WpHmh1 -> "gWpHmh1" | G_WpHmh2 -> "gWpHmh2" | G_WpHmh3 -> "gWpHmh3" | G_WmHph1 -> "gWmHph1" | G_WmHph2 -> "gWmHph2" | G_WmHph3 -> "gWmHph3" | G_h1ZZ -> "gh1ZZ" | G_h2ZZ -> "gh2ZZ" | G_h3ZZ -> "gh3ZZ" | G_h1WpWm -> "gh1WpWm" | G_h2WpWm -> "gh2WpWm" | G_h3WpWm -> "gh3WpWm" | G_hhWpWm -> "ghhWpWm" | G_hhZZ -> "ghhZZ" | G_HpHmAA -> "gHpHmAA" | G_HpHmZZ -> "gHpHmZZ" | G_HpHmAZ -> "gHpHmAZ" | G_HpHmWpWm -> "gHpHmWpWm" | G_h1HpAWm -> "gh1HpAWm" | G_h2HpAWm -> "gh2HpAWm" | G_h3HpAWm -> "gh3HpAWm" | G_h1HpZWm -> "gh1HpZWm" | G_h2HpZWm -> "gh2HpZWm" | G_h3HpZWm -> "gh3HpZWm" | G_h1HpAWmC -> "gh1HpAWmC" | G_h2HpAWmC -> "gh2HpAWmC" | G_h3HpAWmC -> "gh3HpAWmC" | G_h1HpZWmC -> "gh1HpZWmC" | G_h2HpZWmC -> "gh2HpZWmC" | G_h3HpZWmC -> "gh3HpZWmC" | G_h1HpHm -> "gh1HpHm" | G_h2HpHm -> "gh2HpHm" | G_h3HpHm -> "gh3HpHm" | G_h111 -> "gh111" | G_h112 -> "gh112" | G_h113 -> "gh113" | G_h221 -> "gh221" | G_h222 -> "gh222" | G_h223 -> "gh223" | G_h331 -> "gh331" | G_h332 -> "gh332" | G_h333 -> "gh333" | G_h123 -> "gh123" | G_HpHmHpHm -> "gHpHmHpHm" | G_HpHm11 -> "gHpHm11" | G_HpHm12 -> "gHpHm12" | G_HpHm13 -> "gHpHm13" | G_HpHm22 -> "gHpHm22" | G_HpHm23 -> "gHpHm23" | G_HpHm33 -> "gHpHm33" | G_h1111 -> "gh1111" | G_h1112 -> "gh1112" | G_h1113 -> "gh1113" | G_h1122 -> "gh1122" | G_h1123 -> "gh1123" | G_h1133 -> "gh1133" | G_h1222 -> "gh1222" | G_h1223 -> "gh1223" | G_h1233 -> "gh1233" | G_h1333 -> "gh1333" | G_h2222 -> "gh2222" | G_h2223 -> "gh2223" | G_h2233 -> "gh2233" | G_h2333 -> "gh2333" | G_h3333 -> "gh3333" | G_h1uu -> "gh1uu" | G_h2uu -> "gh2uu" | G_h3uu -> "gh3uu" | G_h1uc -> "gh1uc" | G_h2uc -> "gh2uc" | G_h3uc -> "gh3uc" | G_h1ut -> "gh1ut" | G_h2ut -> "gh2ut" | G_h3ut -> "gh3ut" | G_h1cu -> "gh1cu" | G_h2cu -> "gh2cu" | G_h3cu -> "gh3cu" | G_h1cc -> "gh1cc" | G_h2cc -> "gh2cc" | G_h3cc -> "gh3cc" | G_h1ct -> "gh1ct" | G_h2ct -> "gh2ct" | G_h3ct -> "gh3ct" | G_h1tu -> "gh1tu" | G_h2tu -> "gh2tu" | G_h3tu -> "gh3tu" | G_h1tc -> "gh1tc" | G_h2tc -> "gh2tc" | G_h3tc -> "gh3tc" | G_h1tt -> "gh1tt" | G_h2tt -> "gh2tt" | G_h3tt -> "gh3tt" | G_h1dd -> "gh1dd" | G_h2dd -> "gh2dd" | G_h3dd -> "gh3dd" | G_h1ds -> "gh1ds" | G_h2ds -> "gh2ds" | G_h3ds -> "gh3ds" | G_h1db -> "gh1db" | G_h2db -> "gh2db" | G_h3db -> "gh3db" | G_h1sd -> "gh1sd" | G_h2sd -> "gh2sd" | G_h3sd -> "gh3sd" | G_h1ss -> "gh1ss" | G_h2ss -> "gh2ss" | G_h3ss -> "gh3ss" | G_h1sb -> "gh1sb" | G_h2sb -> "gh2sb" | G_h3sb -> "gh3sb" | G_h1bd -> "gh1bd" | G_h2bd -> "gh2bd" | G_h3bd -> "gh3bd" | G_h1bs -> "gh1bs" | G_h2bs -> "gh2bs" | G_h3bs -> "gh3bs" | G_h1bb -> "gh1bb" | G_h2bb -> "gh2bb" | G_h3bb -> "gh3bb" | G_hud -> "ghud" | G_hus -> "ghus" | G_hub -> "ghub" | G_hcd -> "ghcd" | G_hcs -> "ghcs" | G_hcb -> "ghcb" | G_htd -> "ghtd" | G_hts -> "ghts" | G_htb -> "ghtb" | G_hdu -> "ghdu" | G_hdc -> "ghdc" | G_hdt -> "ghdt" | G_hsu -> "ghsu" | G_hsc -> "ghsc" | G_hst -> "ghst" | G_hbu -> "ghbu" | G_hbc -> "ghbc" | G_hbt -> "ghbt" | G_he1n1 -> "ghe1n1" | G_he1n2 -> "ghe1n2" | G_he1n3 -> "ghe1n3" | G_he2n1 -> "ghe2n1" | G_he2n2 -> "ghe2n2" | G_he2n3 -> "ghe2n3" | G_he3n1 -> "ghe3n1" | G_he3n2 -> "ghe3n2" | G_he3n3 -> "ghe3n3" | G_hn1e1 -> "ghn1e1" | G_hn1e2 -> "ghn1e2" | G_hn1e3 -> "ghn1e3" | G_hn2e1 -> "ghn2e1" | G_hn2e2 -> "ghn2e2" | G_hn2e3 -> "ghn2e3" | G_hn3e1 -> "ghn3e1" | G_hn3e2 -> "ghn3e2" | G_hn3e3 -> "ghn3e3" | G_h1e1e1 -> "gh1e1e1" | G_h2e1e1 -> "gh2e1e1" | G_h3e1e1 -> "gh3e1e1" | G_h1e1e2 -> "gh1e1e2" | G_h2e1e2 -> "gh2e1e2" | G_h3e1e2 -> "gh3e1e2" | G_h1e1e3 -> "gh1e1e3" | G_h2e1e3 -> "gh2e1e3" | G_h3e1e3 -> "gh3e1e3" | G_h1e2e1 -> "gh1e2e1" | G_h2e2e1 -> "gh2e2e1" | G_h3e2e1 -> "gh3e2e1" | G_h1e2e2 -> "gh1e2e2" | G_h2e2e2 -> "gh2e2e2" | G_h3e2e2 -> "gh3e2e2" | G_h1e2e3 -> "gh1e2e3" | G_h2e2e3 -> "gh2e2e3" | G_h3e2e3 -> "gh3e2e3" | G_h1e3e1 -> "gh1e3e1" | G_h2e3e1 -> "gh2e3e1" | G_h3e3e1 -> "gh3e3e1" | G_h1e3e2 -> "gh1e3e2" | G_h2e3e2 -> "gh2e3e2" | G_h3e3e2 -> "gh3e3e2" | G_h1e3e3 -> "gh1e3e3" | G_h2e3e3 -> "gh2e3e3" | G_h3e3e3 -> "gh3e3e3" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end module type SSC_flags = sig val higgs_triangle : bool (* $H\gamma\gamma$, $Hg\gamma$ and $Hgg$ couplings *) val higgs_hmm : bool val triple_anom : bool val quartic_anom : bool val higgs_anom : bool val k_matrix : bool val k_matrix_tm : bool val ckm_present : bool val top_anom : bool val top_anom_4f : bool val cf_arbitrary : bool val higgs_matrix : bool end module SSC_kmatrix: SSC_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = false let quartic_anom = true let higgs_anom = false let k_matrix = true let k_matrix_tm = false let ckm_present = false let top_anom = false let top_anom_4f = false let cf_arbitrary = false let higgs_matrix = false end module SSC_kmatrix_2: SSC_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = false let quartic_anom = true let higgs_anom = false let k_matrix = true let k_matrix_tm = true let ckm_present = false let top_anom = false let top_anom_4f = false let cf_arbitrary = true let higgs_matrix = true end (* \thocwmodulesection{Complete Minimal Standard Model including additional Resonances} *) module SSC (Flags : SSC_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type f_aux_top = TTGG | TBWA | TBWZ | TTWW | BBWW | (*i top auxiliary field "flavors" *) QGUG | QBUB | QW | DL | DR type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | H | Rsigma | Rphin | Rphisn | Rphip | Rphim | Rphipp | Rphimm | Rf | Rtn | Rtsn | Rtp | Rtm | Rtpp | Rtmm | Aux_top of int*int*int*bool*f_aux_top (*i lorentz*color*charge*top-side*flavor *) type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.SSC.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let rec aux_top_flavors (f,l,co,ch) = List.append ( List.map other [ Aux_top(l,co,ch/2,true,f); Aux_top(l,co,ch/2,false,f) ] ) ( if ch > 1 then List.append ( List.map other [ Aux_top(l,co,-ch/2,true,f); Aux_top(l,co,-ch/2,false,f) ] ) ( aux_top_flavors (f,l,co,(ch-2)) ) else [] ) let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Higgs", List.map other [H]; "Scalar Resonances", List.map other [Rsigma; Rphin; Rphisn; Rphip; Rphim; Rphipp; Rphimm]; "Tensor Resonances", List.map other [Rf; Rtn; Rtsn; Rtp; Rtm; Rtpp; Rtmm]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = List.append ( ThoList.flatmap snd (external_flavors ()) ) ( ThoList.flatmap aux_top_flavors [ (TTGG,2,1,1); (TBWA,2,0,2); (TBWZ,2,0,2); (TTWW,2,0,1); (BBWW,2,0,1); (QGUG,1,1,1); (QBUB,1,0,1); (QW,1,0,3); (DL,0,0,3); (DR,0,0,3) ] ) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz_aux = function | 2 -> Tensor_1 | 1 -> Vector | 0 -> Scalar | _ -> invalid_arg ("SM.lorentz_aux: wrong value") let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> begin match f with | Aux_top (l,_,_,_,_) -> lorentz_aux l | Rf | Rtn | Rtsn | Rtp | Rtm | Rtpp | Rtmm -> Tensor_2 | _ -> Scalar end let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | O (Aux_top (_,co,_,_,_)) -> if co == 0 then Color.Singlet else Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let prop_aux = function | 2 -> Aux_Tensor_1 | 1 -> Aux_Vector | 0 -> Aux_Scalar | _ -> invalid_arg ("SM.prop_aux: wrong value") let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H | Rsigma -> Prop_Scalar | Rphin | Rphisn | Rphip | Rphim | Rphipp | Rphimm -> Prop_Scalar | Rf -> Prop_Tensor_2 | Rtn | Rtsn | Rtp | Rtm | Rtpp | Rtmm -> Prop_Tensor_2 | Aux_top (l,_,_,_,_) -> prop_aux l end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | Rsigma -> Rsigma | Rphin -> Rphin | Rphisn-> Rphisn | Rphip -> Rphim | Rphim -> Rphip | Rphipp -> Rphimm | Rphimm -> Rphipp | Rf -> Rf | Rtn -> Rtn | Rtsn -> Rtsn | Rtp -> Rtm | Rtm -> Rtp | Rtpp -> Rtmm | Rtmm -> Rtpp | Aux_top (l,co,ch,n,f) -> Aux_top (l,co,(-ch),(not n),f) end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 (* Electrical charge, lepton number, baryon number. We could avoid the rationals altogether by multiplying the first and last by 3 \ldots *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("SM.generation': " ^ string_of_int n) let generation f = if Flags.ckm_present then [] else match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Rsigma | Phi0 | Rphin | Rphisn | Rf | Rtn | Rtsn -> 0//1 | Phip | Rphip | Rtp -> 1//1 | Phim | Rphim | Rtm -> -1//1 | Rphipp | Rtpp -> 2//1 | Rphimm | Rtmm -> -2//1 | Aux_top (_,_,ch,_,_) -> ch//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Half | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | I_G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_CCQ of int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_TVA_ttA | G_TVA_bbA | G_VLR_ttZ | G_TVA_ttZ | G_TVA_bbZ | G_VLR_btW | G_VLR_tbW | G_TLR_btW | G_TRL_tbW | G_TLR_btWZ | G_TRL_tbWZ | G_TLR_btWA | G_TRL_tbWA | G_TVA_ttWW | G_TVA_bbWW | G_TVA_ttG | G_TVA_ttGG | G_SP_ttH | G_VLR_qGuG | G_VLR_qBuB | G_VLR_qBuB_u | G_VLR_qBuB_d | G_VLR_qBuB_e | G_VL_qBuB_n | G_VL_qW | G_VL_qW_u | G_VL_qW_d | G_SL_DttR | G_SR_DttR | G_SL_DttL | G_SLR_DbtR | G_SL_DbtL | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | I_G1_AWW | I_G1_ZWW | I_G1_plus_kappa_plus_G4_AWW | I_G1_plus_kappa_plus_G4_ZWW | I_G1_plus_kappa_minus_G4_AWW | I_G1_plus_kappa_minus_G4_ZWW | I_G1_minus_kappa_plus_G4_AWW | I_G1_minus_kappa_plus_G4_ZWW | I_G1_minus_kappa_minus_G4_AWW | I_G1_minus_kappa_minus_G4_ZWW | I_lambda_AWW | I_lambda_ZWW | G5_AWW | G5_ZWW | I_kappa5_AWW | I_kappa5_ZWW | I_lambda5_AWW | I_lambda5_ZWW | FS0_HHWW | FS0_HHZZ | FS1_HHWW | FS1_HHZZ | FM0_HHWW | FM0_HHZZ | FM1_HHWW | FM1_HHZZ | FM7_HHWW | FM7_HHZZ | Alpha_WWWW0 | Alpha_ZZWW1 | Alpha_WWWW2 | Alpha_ZZWW0 | Alpha_ZZZZ | FT0_WWWW0 | FT0_WWWW2 | FT0_ZZWW0 | FT0_ZZWW1 | FT0_ZZZZ | FT0_AAAA | FT0_AAWW0 | FT0_AAWW1 | FT0_AAZZ | FT0_AZWW0 | FT0_AZWW1 | FT0_AAAZ | FT0_AZZZ | FT1_WWWW0 | FT1_WWWW2 | FT1_ZZWW0 | FT1_ZZWW1 | FT1_ZZZZ | FT1_AAAA | FT1_AAWW0 | FT1_AAWW1 | FT1_AAZZ | FT1_AZWW0 | FT1_AZWW1 | FT1_AAAZ | FT1_AZZZ | FT2_WWWW0 | FT2_WWWW2 | FT2_ZZWW0 | FT2_ZZWW1 | FT2_ZZZZ | FT2_AAAA | FT2_AAWW0 | FT2_AAWW1 | FT2_AAZZ | FT2_AZWW0 | FT2_AZWW1 | FT2_AAAZ | FT2_AZZZ | FM0_WWWW0 | FM0_WWWW2 | FM0_ZZWW0 | FM0_ZZWW1 | FM0_ZZZZ | FM1_WWWW0 | FM1_WWWW2 | FM1_ZZWW0 | FM1_ZZWW1 | FM1_ZZZZ | FM7_WWWW0 | FM7_WWWW2 | FM7_ZZWW0 | FM7_ZZWW1 | FM7_ZZZZ | D_Alpha_ZZWW0_S | D_Alpha_ZZWW0_T | D_Alpha_ZZWW1_S | D_Alpha_ZZWW1_T | D_Alpha_ZZWW1_U | D_Alpha_WWWW0_S | D_Alpha_WWWW0_T | D_Alpha_WWWW0_U | D_Alpha_WWWW2_S | D_Alpha_WWWW2_T | D_Alpha_ZZZZ_S | D_Alpha_ZZZZ_T | D_FT0_ZZWW0_S | D_FT0_ZZWW0_T | D_FT0_ZZWW0_U | D_FT0_ZZWW1_S | D_FT0_ZZWW1_T | D_FT0_ZZWW1_U | D_FT0_WWWW0_S | D_FT0_WWWW0_T | D_FT0_WWWW0_U | D_FT0_WWWW2_S | D_FT0_WWWW2_T | D_FT0_WWWW2_U | D_FT0_ZZZZ_S | D_FT0_ZZZZ_T | D_FT0_ZZZZ_U | D_FT0_AAAA_S | D_FT0_AAAA_T | D_FT0_AAAA_U | D_FT0_AAWW0_S | D_FT0_AAWW0_T | D_FT0_AAWW0_U | D_FT0_AAWW1_S | D_FT0_AAWW1_T | D_FT0_AAWW1_U | D_FT0_AAZZ_S | D_FT0_AAZZ_T | D_FT0_AAZZ_U | D_FT0_AZWW0_S | D_FT0_AZWW0_T | D_FT0_AZWW0_U | D_FT0_AZWW1_S | D_FT0_AZWW1_T | D_FT0_AZWW1_U | D_FT0_AAAZ_S | D_FT0_AAAZ_T | D_FT0_AAAZ_U | D_FT0_AZZZ_S | D_FT0_AZZZ_T | D_FT0_AZZZ_U | D_FT1_ZZWW0_S | D_FT1_ZZWW0_T | D_FT1_ZZWW0_U | D_FT1_ZZWW1_S | D_FT1_ZZWW1_T | D_FT1_ZZWW1_U | D_FT1_WWWW0_S | D_FT1_WWWW0_T | D_FT1_WWWW0_U | D_FT1_WWWW2_S | D_FT1_WWWW2_T | D_FT1_WWWW2_U | D_FT1_ZZZZ_S | D_FT1_ZZZZ_T | D_FT1_ZZZZ_U | D_FT1_AAAA_S | D_FT1_AAAA_T | D_FT1_AAAA_U | D_FT1_AAWW0_S | D_FT1_AAWW0_T | D_FT1_AAWW0_U | D_FT1_AAWW1_S | D_FT1_AAWW1_T | D_FT1_AAWW1_U | D_FT1_AAZZ_S | D_FT1_AAZZ_T | D_FT1_AAZZ_U | D_FT1_AZWW0_S | D_FT1_AZWW0_T | D_FT1_AZWW0_U | D_FT1_AZWW1_S | D_FT1_AZWW1_T | D_FT1_AZWW1_U | D_FT1_AAAZ_S | D_FT1_AAAZ_T | D_FT1_AAAZ_U | D_FT1_AZZZ_S | D_FT1_AZZZ_T | D_FT1_AZZZ_U | D_FT2_ZZWW0_S | D_FT2_ZZWW0_T | D_FT2_ZZWW0_U | D_FT2_ZZWW1_S | D_FT2_ZZWW1_T | D_FT2_ZZWW1_U | D_FT2_WWWW0_S | D_FT2_WWWW0_T | D_FT2_WWWW0_U | D_FT2_WWWW2_S | D_FT2_WWWW2_T | D_FT2_WWWW2_U | D_FT2_ZZZZ_S | D_FT2_ZZZZ_T | D_FT2_ZZZZ_U | D_FT2_AAAA_S | D_FT2_AAAA_T | D_FT2_AAAA_U | D_FT2_AAWW0_S | D_FT2_AAWW0_T | D_FT2_AAWW0_U | D_FT2_AAWW1_S | D_FT2_AAWW1_T | D_FT2_AAWW1_U | D_FT2_AAZZ_S | D_FT2_AAZZ_T | D_FT2_AAZZ_U | D_FT2_AZWW0_S | D_FT2_AZWW0_T | D_FT2_AZWW0_U | D_FT2_AZWW1_S | D_FT2_AZWW1_T | D_FT2_AZWW1_U | D_FT2_AAAZ_S | D_FT2_AAAZ_T | D_FT2_AAAZ_U | D_FT2_AZZZ_S | D_FT2_AZZZ_T | D_FT2_AZZZ_U | D_FTrsi_ZZWW0_S | D_FTrsi_ZZWW0_T | D_FTrsi_ZZWW0_U | D_FTrsi_ZZWW1_S | D_FTrsi_ZZWW1_T | D_FTrsi_ZZWW1_U | D_FTrsi_WWWW0_S | D_FTrsi_WWWW0_T | D_FTrsi_WWWW0_U | D_FTrsi_WWWW2_S | D_FTrsi_WWWW2_T | D_FTrsi_WWWW2_U | D_FTrsi_ZZZZ_S | D_FTrsi_ZZZZ_T | D_FTrsi_ZZZZ_U | D_FTrsi_AAAA_S | D_FTrsi_AAAA_T | D_FTrsi_AAAA_U | D_FTrsi_AAWW0_S | D_FTrsi_AAWW0_T | D_FTrsi_AAWW0_U | D_FTrsi_AAWW1_S | D_FTrsi_AAWW1_T | D_FTrsi_AAWW1_U | D_FTrsi_AAZZ_S | D_FTrsi_AAZZ_T | D_FTrsi_AAZZ_U | D_FTrsi_AZWW0_S | D_FTrsi_AZWW0_T | D_FTrsi_AZWW0_U | D_FTrsi_AZWW1_S | D_FTrsi_AZWW1_T | D_FTrsi_AZWW1_U | D_FTrsi_AAAZ_S | D_FTrsi_AAAZ_T | D_FTrsi_AAAZ_U | D_FTrsi_AZZZ_S | D_FTrsi_AZZZ_T | D_FTrsi_AZZZ_U | D_FM0_ZZWW0_S | D_FM0_ZZWW0_T | D_FM0_ZZWW0_U | D_FM0_ZZWW1_S | D_FM0_ZZWW1_T | D_FM0_ZZWW1_U | D_FM0_WWWW0_S | D_FM0_WWWW0_T | D_FM0_WWWW0_U | D_FM0_WWWW2_S | D_FM0_WWWW2_T | D_FM0_WWWW2_U | D_FM0_ZZZZ_S | D_FM0_ZZZZ_T | D_FM0_ZZZZ_U | D_FM1_ZZWW0_S | D_FM1_ZZWW0_T | D_FM1_ZZWW0_U | D_FM1_ZZWW1_S | D_FM1_ZZWW1_T | D_FM1_ZZWW1_U | D_FM1_WWWW0_S | D_FM1_WWWW0_T | D_FM1_WWWW0_U | D_FM1_WWWW2_S | D_FM1_WWWW2_T | D_FM1_WWWW2_U | D_FM1_ZZZZ_S | D_FM1_ZZZZ_T | D_FM1_ZZZZ_U | D_FM7_ZZWW0_S | D_FM7_ZZWW0_T | D_FM7_ZZWW0_U | D_FM7_ZZWW1_S | D_FM7_ZZWW1_T | D_FM7_ZZWW1_U | D_FM7_WWWW0_S | D_FM7_WWWW0_T | D_FM7_WWWW0_U | D_FM7_WWWW2_S | D_FM7_WWWW2_T | D_FM7_WWWW2_U | D_FM7_ZZZZ_S | D_FM7_ZZZZ_T | D_FM7_ZZZZ_U | D_Alpha_HHHH_S | D_Alpha_HHHH_T | D_Alpha_HHZZ0_S | D_Alpha_HHWW0_S | D_Alpha_HHZZ0_T | D_Alpha_HHWW0_T | D_Alpha_HHZZ1_S | D_Alpha_HHWW1_S | D_Alpha_HHZZ1_T | D_Alpha_HHWW1_T | D_Alpha_HHZZ1_U | D_Alpha_HHWW1_U | D_FM0_HHZZ0_S | D_FM0_HHWW0_S | D_FM0_HHZZ0_T | D_FM0_HHWW0_T | D_FM0_HHZZ0_U | D_FM0_HHWW0_U | D_FM0_HHZZ1_S | D_FM0_HHWW1_S | D_FM0_HHZZ1_T | D_FM0_HHWW1_T | D_FM0_HHZZ1_U | D_FM0_HHWW1_U | D_FM1_HHZZ0_S | D_FM1_HHWW0_S | D_FM1_HHZZ0_T | D_FM1_HHWW0_T | D_FM1_HHZZ0_U | D_FM1_HHWW0_U | D_FM1_HHZZ1_S | D_FM1_HHWW1_S | D_FM1_HHZZ1_T | D_FM1_HHWW1_T | D_FM1_HHZZ1_U | D_FM1_HHWW1_U | D_FM7_HHZZ0_S | D_FM7_HHWW0_S | D_FM7_HHZZ0_T | D_FM7_HHWW0_T | D_FM7_HHZZ0_U | D_FM7_HHWW0_U | D_FM7_HHZZ1_S | D_FM7_HHWW1_S | D_FM7_HHZZ1_T | D_FM7_HHWW1_T | D_FM7_HHZZ1_U | D_FM7_HHWW1_U | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_SWW | G_SWW_T | G_SSWW | G_SZZ | G_SZZ_T | G_SSZZ | G_SHH | G_SAA_T | G_SAZ_T | G_PNWW | G_PNZZ | G_PWZ | G_PWW | G_PSNWW | G_PSNZZ | G_PSNHH | G_FWW | G_FZZ | G_FWW_CF | G_FZZ_CF | G_FWW_T | G_FZZ_T | G_FHH | G_FHH_CF | G_TNWW | G_TNZZ | G_TSNWW | G_TSNZZ | G_TWZ | G_TWW | G_TNWW_CF | G_TNZZ_CF | G_TSNWW_CF | G_TSNZZ_CF | G_TWZ_CF | G_TWW_CF | G_Htt | G_Hbb | G_Hcc | G_Hmm | G_Htautau | G_H3 | G_H4 | FS_H4 | G_HGaZ | G_HGaGa | G_Hgg | G_HGaZ_anom | G_HGaGa_anom | G_HZZ_anom | G_HWW_anom | G_HGaZ_u | G_HZZ_u | G_HWW_u | Gs | I_Gs | G2 | Mass of flavor | Width of flavor | K_Matrix_Coeff of int | K_Matrix_Pole of int (* \begin{dubious} The current abstract syntax for parameter dependencies is admittedly tedious. Later, there will be a parser for a convenient concrete syntax as a part of a concrete syntax for models. But as these examples show, it should include simple functions. \end{dubious} *) type orders = int * int let orders = function | _ -> (0,0) (* \begin{subequations} \begin{align} \alpha_{\text{QED}} &= \frac{1}{137.0359895} \\ \sin^2\theta_w &= 0.23124 \end{align} \end{subequations} *) let input_parameters = [ Alpha_QED, 1. /. 137.0359895; Sin2thw, 0.23124; Mass (G Z), 91.187; Mass (M (N 1)), 0.0; Mass (M (L 1)), 0.51099907e-3; Mass (M (N 2)), 0.0; Mass (M (L 2)), 0.105658389; Mass (M (N 3)), 0.0; Mass (M (L 3)), 1.77705; Mass (M (U 1)), 5.0e-3; Mass (M (D 1)), 3.0e-3; Mass (M (U 2)), 1.2; Mass (M (D 2)), 0.1; Mass (M (U 3)), 174.0; Mass (M (D 3)), 4.2 ] (* \begin{subequations} \begin{align} e &= \sqrt{4\pi\alpha} \\ \sin\theta_w &= \sqrt{\sin^2\theta_w} \\ \cos\theta_w &= \sqrt{1-\sin^2\theta_w} \\ g &= \frac{e}{\sin\theta_w} \\ m_W &= \cos\theta_w m_Z \\ v &= \frac{2m_W}{g} \\ g_{CC} = -\frac{g}{2\sqrt2} &= -\frac{e}{2\sqrt2\sin\theta_w} \\ Q_{\text{lepton}} = -q_{\text{lepton}}e &= e \\ Q_{\text{up}} = -q_{\text{up}}e &= -\frac{2}{3}e \\ Q_{\text{down}} = -q_{\text{down}}e &= \frac{1}{3}e \\ \ii q_We = \ii g_{\gamma WW} &= \ii e \\ \ii g_{ZWW} &= \ii g \cos\theta_w \\ \ii g_{WWW} &= \ii g \end{align} \end{subequations} *) (* \begin{dubious} \ldots{} to be continued \ldots{} The quartic couplings can't be correct, because the dimensions are wrong! \begin{subequations} \begin{align} g_{HWW} &= g m_W = 2 \frac{m_W^2}{v}\\ g_{HHWW} &= 2 \frac{m_W^2}{v^2} = \frac{g^2}{2} \\ g_{HZZ} &= \frac{g}{\cos\theta_w}m_Z \\ g_{HHZZ} &= 2 \frac{m_Z^2}{v^2} = \frac{g^2}{2\cos\theta_w} \\ g_{Htt} &= \lambda_t \\ g_{Hbb} &= \lambda_b=\frac{m_b}{m_t}\lambda_t \\ g_{H^3} &= - \frac{3g}{2}\frac{m_H^2}{m_W} = - 3 \frac{m_H^2}{v} g_{H^4} &= - \frac{3g^2}{4} \frac{m_W^2}{v^2} = -3 \frac{m_H^2}{v^2} \end{align} \end{subequations} \end{dubious} *) let derived_parameters = - [ Real E, Sqrt (Prod [Const 4; Atom Pi; Atom Alpha_QED]); + [ Real E, Sqrt (Prod [Integer 4; Atom Pi; Atom Alpha_QED]); Real Sinthw, Sqrt (Atom Sin2thw); - Real Costhw, Sqrt (Diff (Const 1, Atom Sin2thw)); + Real Costhw, Sqrt (Diff (Integer 1, Atom Sin2thw)); Real G_weak, Quot (Atom E, Atom Sinthw); Real (Mass (G Wp)), Prod [Atom Costhw; Atom (Mass (G Z))]; - Real Vev, Quot (Prod [Const 2; Atom (Mass (G Wp))], Atom G_weak); + Real Vev, Quot (Prod [Integer 2; Atom (Mass (G Wp))], Atom G_weak); Real Q_lepton, Atom E; - Real Q_up, Prod [Quot (Const (-2), Const 3); Atom E]; - Real Q_down, Prod [Quot (Const 1, Const 3); Atom E]; - Real G_CC, Neg (Quot (Atom G_weak, Prod [Const 2; Sqrt (Const 2)])); + Real Q_up, Prod [Quot (Integer (-2), Integer 3); Atom E]; + Real Q_down, Prod [Quot (Integer 1, Integer 3); Atom E]; + Real G_CC, Neg (Quot (Atom G_weak, Prod [Integer 2; Sqrt (Integer 2)])); Complex I_Q_W, Prod [I; Atom E]; Complex I_G_weak, Prod [I; Atom G_weak]; Complex I_G_ZWW, Prod [I; Atom G_weak; Atom Costhw] ] (* \begin{equation} - \frac{g}{2\cos\theta_w} \end{equation} *) let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) (* \begin{subequations} \begin{align} - \frac{g}{2\cos\theta_w} g_V &= - \frac{g}{2\cos\theta_w} (T_3 - 2 q \sin^2\theta_w) \\ - \frac{g}{2\cos\theta_w} g_A &= - \frac{g}{2\cos\theta_w} T_3 \end{align} \end{subequations} *) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* \begin{equation} \mathcal{L}_{\textrm{EM}} = - e \sum_i q_i \bar\psi_i\fmslash{A}\psi_i \end{equation} *) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{NC}} = - \frac{g}{2\cos\theta_W} \sum_i \bar\psi_i\fmslash{Z}(g_V^i-g_A^i\gamma_5)\psi_i \end{equation} *) let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents' n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents'' n = List.map mgm [ ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents_triv = ThoList.flatmap charged_currents' [1;2;3] @ ThoList.flatmap charged_currents'' [1;2;3] let charged_currents_ckm = let charged_currents_2 n1 n2 = List.map mgm [ ((D (-n1), Wm, U n2), FBF (1, Psibar, VL, Psi), G_CCQ (n2,n1)); ((U (-n1), Wp, D n2), FBF (1, Psibar, VL, Psi), G_CCQ (n1,n2)) ] in ThoList.flatmap charged_currents' [1;2;3] @ List.flatten (Product.list2 charged_currents_2 [1;2;3] [1;2;3]) let yukawa = [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, S, Psi), G_Htt); ((M (D (-3)), O H, M (D 3)), FBF (1, Psibar, S, Psi), G_Hbb); ((M (U (-2)), O H, M (U 2)), FBF (1, Psibar, S, Psi), G_Hcc); ((M (L (-3)), O H, M (L 3)), FBF (1, Psibar, S, Psi), G_Htautau) ] @ if Flags.higgs_hmm then [ ((M (L (-2)), O H, M (L 2)), FBF (1, Psibar, S, Psi), G_Hmm)] else [] (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let standard_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] (* \begin{multline} \mathcal{L}_{\textrm{TGC}}(g_1,\kappa) = g_1 \mathcal{L}_T(V,W^+,W^-) \\ + \frac{\kappa+g_1}{2} \Bigl(\mathcal{L}_T(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr)\\ + \frac{\kappa-g_1}{2} \Bigl(\mathcal{L}_L(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr) \end{multline} *) (* \begin{dubious} The whole thing in the LEP2 workshop notation: \begin{multline} \ii\mathcal{L}_{\textrm{TGC},V} / g_{WWV} = \\ g_1^V V^\mu (W^-_{\mu\nu}W^{+,\nu}-W^+_{\mu\nu}W^{-,\nu}) + \kappa_V W^+_\mu W^-_\nu V^{\mu\nu} + \frac{\lambda_V}{m_W^2} V_{\mu\nu} W^-_{\rho\mu} W^{+,\hphantom{\nu}\rho}_{\hphantom{+,}\nu} \\ + \ii g_5^V \epsilon_{\mu\nu\rho\sigma} \left( (\partial^\rho W^{-,\mu}) W^{+,\nu} - W^{-,\mu}(\partial^\rho W^{+,\nu}) \right) V^\sigma \\ + \ii g_4^V W^-_\mu W^+_\nu (\partial^\mu V^\nu + \partial^\nu V^\mu) - \frac{\tilde\kappa_V}{2} W^-_\mu W^+_\nu \epsilon^{\mu\nu\rho\sigma} V_{\rho\sigma} - \frac{\tilde\lambda_V}{2m_W^2} W^-_{\rho\mu} W^{+,\mu}_{\hphantom{+,\mu}\nu} \epsilon^{\nu\rho\alpha\beta} V_{\alpha\beta} \end{multline} using the conventions of Itzykson and Zuber with $\epsilon^{0123} = +1$. \end{dubious} *) (* \begin{dubious} This is equivalent to the notation of Hagiwara et al.~\cite{HPZH87}, if we remember that they have opposite signs for~$g_{WWV}$: \begin{multline} \mathcal{L}_{WWV} / (-g_{WWV}) = \\ \ii g_1^V \left( W^\dagger_{\mu\nu} W^\mu - W^\dagger_\mu W^\mu_{\hphantom{\mu}\nu} \right) V^\nu + \ii \kappa_V W^\dagger_\mu W_\nu V^{\mu\nu} + \ii \frac{\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} V^{\nu\lambda} \\ - g_4^V W^\dagger_\mu W_\nu \left(\partial^\mu V^\nu + \partial^\nu V^\mu \right) + g_5^V \epsilon^{\mu\nu\lambda\sigma} \left( W^\dagger_\mu \stackrel{\leftrightarrow}{\partial_\lambda} W_\nu \right) V_\sigma\\ + \ii \tilde\kappa_V W^\dagger_\mu W_\nu \tilde{V}^{\mu\nu} + \ii\frac{\tilde\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} \tilde{V}^{\nu\lambda} \end{multline} Here $V^\mu$ stands for either the photon or the~$Z$ field, $W^\mu$ is the $W^-$ field, $W_{\mu\nu} = \partial_\mu W_\nu - \partial_\nu W_\mu$, $V_{\mu\nu} = \partial_\mu V_\nu - \partial_\nu V_\mu$, and $\tilde{V}_{\mu\nu} = \frac{1}{2} \epsilon_{\mu\nu\lambda\sigma} V^{\lambda\sigma}$. \end{dubious} *) let anomalous_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_ZWW) ] let triple_gauge = if Flags.triple_anom then anomalous_triple_gauge else standard_triple_gauge (* \begin{equation} \mathcal{L}_{\textrm{QGC}} = - g^2 W_{+,\mu} W_{-,\nu} W_+^\mu W_-^\nu + \ldots \end{equation} *) (* Actually, quartic gauge couplings are a little bit more straightforward using auxiliary fields. Here we have to impose the antisymmetry manually: \begin{subequations} \begin{multline} (W^{+,\mu}_1 W^{-,\nu}_2 - W^{+,\nu}_1 W^{-,\mu}_2) (W^+_{3,\mu} W^-_{4,\nu} - W^+_{3,\nu} W^-_{4,\mu}) \\ = 2(W^+_1W^+_3)(W^-_2W^-_4) - 2(W^+_1W^-_4)(W^-_2W^+_3) \end{multline} also ($V$ can be $A$ or $Z$) \begin{multline} (W^{+,\mu}_1 V^\nu_2 - W^{+,\nu}_1 V^\mu_2) (W^-_{3,\mu} V_{4,\nu} - W^-_{3,\nu} V_{4,\mu}) \\ = 2(W^+_1W^-_3)(V_2V_4) - 2(W^+_1V_4)(V_2W^-_3) \end{multline} \end{subequations} *) (* \begin{subequations} \begin{multline} W^{+,\mu} W^{-,\nu} W^+_\mu W^-_\nu \end{multline} \end{subequations} *) let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2 ] (* \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \left( \frac{g^4}{2}\left( (W^+_\mu W^{-,\mu})^2 + W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} \right)\right.\notag \\ &\qquad\qquad\qquad \left. + \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \\ \mathcal{L}_5 &= \alpha_5 \left( g^4 (W^+_\mu W^{-,\mu})^2 + \frac{g^4}{\cos^2\theta_w} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \end{align} \end{subequations} or \begin{multline} \mathcal{L}_4 + \mathcal{L}_5 = (\alpha_4+2\alpha_5) g^4 \frac{1}{2} (W^+_\mu W^{-,\mu})^2 \\ + 2\alpha_4 g^4 \frac{1}{4} W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} + \alpha_4 \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu \\ + 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \frac{1}{2} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \frac{1}{8} (Z_\mu Z^\mu)^2 \end{multline} and therefore \begin{subequations} \begin{align} \alpha_{(WW)_0} &= (\alpha_4+2\alpha_5) g^4 \\ \alpha_{(WW)_2} &= 2\alpha_4 g^4 \\ \alpha_{(WZ)_0} &= 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{(WZ)_1} &= \alpha_4 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{ZZ} &= (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \end{align} \end{subequations} *) let anomalous_quartic_gauge = if Flags.quartic_anom then List.map qgc [ ((Wm, Wm, Wp, Wp), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4 [1, C_12_34], Alpha_WWWW2); ((Z, Z, Z, Z), Vector4 [(1, C_12_34); (1, C_13_42); (1, C_14_23)], Alpha_ZZZZ); ((Wm, Wp, Z, Z), Vector4 [1, C_12_34], Alpha_ZZWW0); ((Wm, Wp, Z, Z), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_ZZWW1)] @ (if Flags.k_matrix_tm then List.map qgc [((Wm, Wm, Wp, Wp), Dim8_Vector4_t_0 [1, C_13_42], FT0_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_0 [1, C_14_23], FT0_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_0 [1, C_12_34], FT0_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_1 [1, C_13_42], FT1_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_1 [1, C_14_23], FT1_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_1 [1, C_12_34], FT1_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_2 [1, C_13_42], FT2_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_2 [1, C_14_23], FT2_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_2 [1, C_12_34], FT2_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_0 [1, C_13_42], FM0_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_0 [1, C_14_23], FM0_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_0 [1, C_12_34], FM0_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_1 [1, C_13_42], FM1_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_1 [1, C_14_23], FM1_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_1 [1, C_12_34], FM1_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_7 [1, C_13_42], FM7_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_7 [1, C_14_23], FM7_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_7 [1, C_12_34], FM7_WWWW2); ((Wm, Wp, Z, Z), Dim8_Vector4_t_0 [1, C_12_34], FT0_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_t_0 [1, C_13_42], FT0_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_0 [1, C_14_23], FT0_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_1 [1, C_12_34], FT1_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_t_1 [1, C_13_42], FT1_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_1 [1, C_14_23], FT1_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_2 [1, C_12_34], FT2_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_t_2 [1, C_13_42], FT2_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_2 [1, C_14_23], FT2_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_0 [1, C_12_34], FM0_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_m_0 [1, C_13_42], FM0_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_0 [1, C_14_23], FM0_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_1 [1, C_12_34], FM1_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_m_1 [1, C_13_42], FM1_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_1 [1, C_14_23], FM1_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_7 [1, C_12_34], FM7_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_m_7 [1, C_13_42], FM7_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_7 [1, C_14_23], FM7_ZZWW1); ((Z, Z, Z, Z), Dim8_Vector4_t_0 [1, C_12_34], FT0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_0 [1, C_13_42], FT0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_0 [1, C_14_23], FT0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_1 [1, C_12_34], FT1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_1 [1, C_13_42], FT1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_1 [1, C_14_23], FT1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_2 [1, C_12_34], FT2_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_2 [1, C_13_42], FT2_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_2 [1, C_14_23], FT2_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_0 [1, C_12_34], FM0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_0 [1, C_13_42], FM0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_0 [1, C_14_23], FM0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_1 [1, C_12_34], FM1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_1 [1, C_13_42], FM1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_1 [1, C_14_23], FM1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_7 [1, C_12_34], FM7_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_7 [1, C_13_42], FM7_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_7 [1, C_14_23], FM7_ZZZZ); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_0 [1, C_12_34], FT0_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_0 [1, C_13_42], FT0_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_0 [1, C_14_23], FT0_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_1 [1, C_12_34], FT1_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_1 [1, C_13_42], FT1_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_1 [1, C_14_23], FT1_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_2 [1, C_12_34], FT2_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_2 [1, C_13_42], FT2_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_2 [1, C_14_23], FT2_AAAA); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_0 [1, C_12_34], FT0_AAWW0); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_0 [1, C_13_42], FT0_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_0 [1, C_14_23], FT0_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_1 [1, C_12_34], FT1_AAWW0); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_1 [1, C_13_42], FT1_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_1 [1, C_14_23], FT1_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_2 [1, C_12_34], FT2_AAWW0); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_2 [1, C_13_42], FT2_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_2 [1, C_14_23], FT2_AAWW1); ((Z, Z, Ga, Ga), Dim8_Vector4_t_0 [1, C_12_34], FT0_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_0 [1, C_13_42], FT0_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_0 [1, C_14_23], FT0_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_1 [1, C_12_34], FT1_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_1 [1, C_13_42], FT1_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_1 [1, C_14_23], FT1_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_2 [1, C_12_34], FT2_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_2 [1, C_13_42], FT2_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_2 [1, C_14_23], FT2_AAZZ); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_0 [1, C_12_34], FT0_AZWW0); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_0 [1, C_13_42], FT0_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_0 [1, C_14_23], FT0_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_1 [1, C_12_34], FT1_AZWW0); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_1 [1, C_13_42], FT1_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_1 [1, C_14_23], FT1_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_2 [1, C_12_34], FT2_AZWW0); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_2 [1, C_13_42], FT2_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_2 [1, C_14_23], FT2_AZWW1); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_0 [1, C_12_34], FT0_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_0 [1, C_13_42], FT0_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_0 [1, C_14_23], FT0_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_1 [1, C_12_34], FT1_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_1 [1, C_13_42], FT1_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_1 [1, C_14_23], FT1_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_2 [1, C_12_34], FT2_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_2 [1, C_13_42], FT2_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_2 [1, C_14_23], FT2_AAAZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_0 [1, C_12_34], FT0_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_0 [1, C_13_42], FT0_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_0 [1, C_14_23], FT0_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_1 [1, C_12_34], FT1_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_1 [1, C_13_42], FT1_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_1 [1, C_14_23], FT1_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_2 [1, C_12_34], FT2_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_2 [1, C_13_42], FT2_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_2 [1, C_14_23], FT2_AZZZ)] else [] ) else [] (* In any diagonal channel~$\chi$, the scattering amplitude~$a_\chi(s)$ is unitary iff\footnote{% Trivial proof: \begin{equation} -1 = \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = \frac{\textrm{Im}(a_\chi^*(s))}{ |a_\chi(s)|^2 } = - \frac{\textrm{Im}(a_\chi(s))}{ |a_\chi(s)|^2 } \end{equation} i.\,e.~$\textrm{Im}(a_\chi(s)) = |a_\chi(s)|^2$.} \begin{equation} \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = -1 \end{equation} For a real perturbative scattering amplitude~$r_\chi(s)$ this can be enforced easily--and arbitrarily--by \begin{equation} \frac{1}{a_\chi(s)} = \frac{1}{r_\chi(s)} - \mathrm{i} \end{equation} *) let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_WWWW2_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZWW0_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_14_23)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_13_42); (1, C_12_34)]), D_Alpha_ZZZZ_T)] else [] let k_matrix_quartic_gauge_t_0 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t0 (2, [(1, C_12_34)]), D_FT0_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t0 (2, [(1, C_13_42)]), D_FT0_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t0 (2, [(1, C_14_23)]), D_FT0_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_ZZZZ_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAAA_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AAAA_U); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAWW0_S); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAWW0_T); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAWW0_U); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAWW1_S); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAWW1_T); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AAWW1_S); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AAWW1_T); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t0 (2, [(1, C_12_34)]), D_FT0_AAWW1_S); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t0 (2, [(1, C_13_42)]), D_FT0_AAWW1_U); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t0 (2, [(1, C_14_23)]), D_FT0_AAWW1_T); ((Ga, Z, Ga, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAZZ_S); ((Ga, Z, Ga, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAZZ_T); ((Ga, Z, Ga, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAZZ_U); ((Z, Ga, Z, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAZZ_S); ((Z, Ga, Z, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAZZ_T); ((Z, Ga, Z, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAZZ_U); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAZZ_U); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AZWW0_S); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AZWW0_T); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AZWW0_U); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AZWW1_S); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AZWW1_T); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AZWW1_U); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AZWW1_S); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AZWW1_T); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AZWW1_U); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AZWW1_S); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AZWW1_T); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AZWW1_U); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AZWW1_S); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AZWW1_T); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AZWW1_U); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AAAZ_S); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AAAZ_T); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AAAZ_U); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AAAZ_S); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AAAZ_T); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AAAZ_U); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AAAZ_S); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AAAZ_T); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AAAZ_U); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AZZZ_S); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AZZZ_T); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AZZZ_U); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AZZZ_S); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AZZZ_T); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AZZZ_U); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AZZZ_S); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AZZZ_T); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AZZZ_U)] else [] let k_matrix_quartic_gauge_t_1 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t1 (2, [(1, C_12_34)]), D_FT1_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t1 (2, [(1, C_13_42)]), D_FT1_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t1 (2, [(1, C_14_23)]), D_FT1_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_ZZZZ_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AAAA_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAAA_U); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_AAWW0_S); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AAWW0_T); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AAWW0_U); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_AAWW1_S); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AAWW1_T); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AAWW1_S); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AAWW1_T); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t1 (2, [(1, C_12_34)]), D_FT1_AAWW1_S); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t1 (2, [(1, C_13_42)]), D_FT1_AAWW1_U); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t1 (2, [(1, C_14_23)]), D_FT1_AAWW1_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AAZZ_U); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAZZ_U); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_AZWW0_S); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AZWW0_T); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AZWW0_U); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AZWW1_S); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AZWW1_T); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AZWW1_U); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AZWW1_S); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AZWW1_T); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AZWW1_U); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AZWW1_S); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AZWW1_T); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AZWW1_U); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AZWW1_S); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AZWW1_T); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AZWW1_U); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAAZ_S); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAAZ_T); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAAZ_U); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAAZ_S); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAAZ_T); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAAZ_U); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAAZ_S); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAAZ_T); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAAZ_U); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AZZZ_S); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AZZZ_T); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AZZZ_U); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AZZZ_S); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AZZZ_T); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AZZZ_U); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AZZZ_S); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AZZZ_T); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AZZZ_U)] else [] let k_matrix_quartic_gauge_t_2 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t2 (2, [(1, C_12_34)]), D_FT2_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t2 (2, [(1, C_13_42)]), D_FT2_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t2 (2, [(1, C_14_23)]), D_FT2_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_ZZZZ_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AAAA_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAAA_U); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AAWW0_S); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AAWW0_T); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AAWW0_U); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AAWW1_S); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AAWW1_T); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AAWW1_S); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AAWW1_T); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t2 (2, [(1, C_12_34)]), D_FT2_AAWW1_S); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t2 (2, [(1, C_13_42)]), D_FT2_AAWW1_U); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t2 (2, [(1, C_14_23)]), D_FT2_AAWW1_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AAZZ_U); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAZZ_U); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AZWW0_S); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AZWW0_T); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AZWW0_U); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AZWW1_S); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AZWW1_T); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AZWW1_U); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AZWW1_S); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AZWW1_T); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AZWW1_U); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AZWW1_S); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AZWW1_T); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AZWW1_U); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AZWW1_S); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AZWW1_T); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AZWW1_U); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAAZ_S); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAAZ_T); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAAZ_U); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAAZ_S); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAAZ_T); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAAZ_U); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAAZ_S); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAAZ_T); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAAZ_U); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AZZZ_S); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AZZZ_T); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AZZZ_U); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AZZZ_S); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AZZZ_T); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AZZZ_U); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AZZZ_S); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AZZZ_T); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AZZZ_U)] else [] let k_matrix_quartic_gauge_t_rsi = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_12_34)]), D_FTrsi_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_13_42)]), D_FTrsi_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_14_23)]), D_FTrsi_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_ZZZZ_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAAA_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AAAA_U); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAWW0_S); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAWW0_T); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAWW0_U); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAWW1_S); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAWW1_T); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AAWW1_S); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AAWW1_T); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_12_34)]), D_FTrsi_AAWW1_S); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_13_42)]), D_FTrsi_AAWW1_U); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_14_23)]), D_FTrsi_AAWW1_T); ((Ga, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAZZ_S); ((Ga, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAZZ_T); ((Ga, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAZZ_U); ((Z, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAZZ_S); ((Z, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAZZ_T); ((Z, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAZZ_U); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAZZ_U); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AZWW0_S); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AZWW0_T); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AZWW0_U); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AZWW1_S); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AZWW1_T); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AZWW1_U); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AZWW1_S); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AZWW1_T); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AZWW1_U); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AZWW1_S); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AZWW1_T); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AZWW1_U); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AZWW1_S); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AZWW1_T); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AZWW1_U); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AAAZ_S); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AAAZ_T); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AAAZ_U); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AAAZ_S); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AAAZ_T); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AAAZ_U); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AAAZ_S); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AAAZ_T); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AAAZ_U); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AZZZ_S); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AZZZ_T); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AZZZ_U); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AZZZ_S); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AZZZ_T); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AZZZ_U); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AZZZ_S); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AZZZ_T); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AZZZ_U)] else [] let k_matrix_quartic_gauge_m_0 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m0 (1, [(1, C_12_34)]), D_FM0_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m0 (1, [(1, C_13_42)]), D_FM0_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m0 (1, [(1, C_14_23)]), D_FM0_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m0 (2, [(1, C_12_34)]), D_FM0_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m0 (2, [(1, C_13_42)]), D_FM0_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m0 (2, [(1, C_14_23)]), D_FM0_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (3, [(1, C_14_23)]), D_FM0_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (3, [(1, C_13_42)]), D_FM0_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (3, [(1, C_12_34)]), D_FM0_ZZZZ_U)] else [] let k_matrix_quartic_gauge_m_1 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m1 (1, [(1, C_12_34)]), D_FM1_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m1 (1, [(1, C_13_42)]), D_FM1_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m1 (1, [(1, C_14_23)]), D_FM1_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m1 (2, [(1, C_12_34)]), D_FM1_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m1 (2, [(1, C_13_42)]), D_FM1_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m1 (2, [(1, C_14_23)]), D_FM1_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (3, [(1, C_14_23)]), D_FM1_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (3, [(1, C_13_42)]), D_FM1_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (3, [(1, C_12_34)]), D_FM1_ZZZZ_U)] else [] let k_matrix_quartic_gauge_m_7 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m7 (1, [(1, C_12_34)]), D_FM7_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m7 (1, [(1, C_13_42)]), D_FM7_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m7 (1, [(1, C_14_23)]), D_FM7_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m7 (2, [(1, C_12_34)]), D_FM7_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m7 (2, [(1, C_13_42)]), D_FM7_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m7 (2, [(1, C_14_23)]), D_FM7_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (3, [(1, C_14_23)]), D_FM7_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (3, [(1, C_13_42)]), D_FM7_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (3, [(1, C_12_34)]), D_FM7_ZZZZ_U)] else [] let k_matrix_2scalar_2gauge = if Flags.k_matrix_tm then if Flags.higgs_matrix then [ ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (0, [(1, C_12_34)]), D_Alpha_HHZZ0_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (0, [(1, C_13_42)]), D_Alpha_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (0, [(1, C_14_23)]), D_Alpha_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (3, [(1, C_14_23)]), D_Alpha_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (3, [(1, C_13_42)]), D_Alpha_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (3, [(1, C_12_34)]), D_Alpha_HHZZ1_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (6, [(1, C_13_42)]), D_Alpha_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (6, [(1, C_12_34)]), D_Alpha_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (6, [(1, C_14_23)]), D_Alpha_HHZZ1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (0, [(1, C_12_34)]), D_Alpha_HHWW0_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (2, [(1, C_13_42)]), D_Alpha_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (1, [(1, C_14_23)]), D_Alpha_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (1, [(1, C_13_42)]), D_Alpha_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (2, [(1, C_14_23)]), D_Alpha_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (3, [(1, C_14_23)]), D_Alpha_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (6, [(1, C_13_42)]), D_Alpha_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (4, [(1, C_13_42)]), D_Alpha_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (5, [(1, C_12_34)]), D_Alpha_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (8, [(1, C_14_23)]), D_Alpha_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (7, [(1, C_12_34)]), D_Alpha_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (5, [(1, C_13_42)]), D_Alpha_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (4, [(1, C_12_34)]), D_Alpha_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (7, [(1, C_14_23)]), D_Alpha_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (8, [(1, C_12_34)]), D_Alpha_HHWW1_U) ] else [] else [] let k_matrix_2scalar_2gauge_m = if Flags.k_matrix_tm then if Flags.higgs_matrix then [ ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (0, [(1, C_12_34)]), D_FM0_HHZZ0_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (0, [(1, C_13_42)]), D_FM0_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (0, [(1, C_14_23)]), D_FM0_HHZZ0_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (3, [(1, C_14_23)]), D_FM0_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (3, [(1, C_13_42)]), D_FM0_HHZZ1_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (3, [(1, C_12_34)]), D_FM0_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (6, [(1, C_13_42)]), D_FM0_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (6, [(1, C_12_34)]), D_FM0_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (6, [(1, C_14_23)]), D_FM0_HHZZ1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (0, [(1, C_12_34)]), D_FM0_HHWW0_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (2, [(1, C_13_42)]), D_FM0_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (1, [(1, C_14_23)]), D_FM0_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (1, [(1, C_13_42)]), D_FM0_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (2, [(1, C_14_23)]), D_FM0_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (3, [(1, C_14_23)]), D_FM0_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (6, [(1, C_13_42)]), D_FM0_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (4, [(1, C_13_42)]), D_FM0_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (5, [(1, C_12_34)]), D_FM0_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (8, [(1, C_14_23)]), D_FM0_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (7, [(1, C_12_34)]), D_FM0_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (5, [(1, C_13_42)]), D_FM0_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (4, [(1, C_12_34)]), D_FM0_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (7, [(1, C_14_23)]), D_FM0_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (8, [(1, C_12_34)]), D_FM0_HHWW1_T) ] else [] else [] let k_matrix_2scalar_2gauge_m_1 = if Flags.k_matrix_tm then if Flags.higgs_matrix then [ ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (0, [(1, C_12_34)]), D_FM1_HHZZ0_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (0, [(1, C_13_42)]), D_FM1_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (0, [(1, C_14_23)]), D_FM1_HHZZ0_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (3, [(1, C_14_23)]), D_FM1_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (3, [(1, C_13_42)]), D_FM1_HHZZ1_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (3, [(1, C_12_34)]), D_FM1_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (6, [(1, C_13_42)]), D_FM1_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (6, [(1, C_12_34)]), D_FM1_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (6, [(1, C_14_23)]), D_FM1_HHZZ1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (0, [(1, C_12_34)]), D_FM1_HHWW0_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (2, [(1, C_13_42)]), D_FM1_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (1, [(1, C_14_23)]), D_FM1_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (1, [(1, C_13_42)]), D_FM1_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (2, [(1, C_14_23)]), D_FM1_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (3, [(1, C_14_23)]), D_FM1_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (6, [(1, C_13_42)]), D_FM1_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (4, [(1, C_13_42)]), D_FM1_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (5, [(1, C_12_34)]), D_FM1_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (8, [(1, C_14_23)]), D_FM1_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (7, [(1, C_12_34)]), D_FM1_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (5, [(1, C_13_42)]), D_FM1_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (4, [(1, C_12_34)]), D_FM1_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (7, [(1, C_14_23)]), D_FM1_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (8, [(1, C_12_34)]), D_FM1_HHWW1_T) ] else [] else [] let k_matrix_2scalar_2gauge_m_7 = if Flags.k_matrix_tm then if Flags.higgs_matrix then [ ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (0, [(1, C_12_34)]), D_FM7_HHZZ0_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (0, [(1, C_13_42)]), D_FM7_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (0, [(1, C_14_23)]), D_FM7_HHZZ0_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (3, [(1, C_14_23)]), D_FM7_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (3, [(1, C_13_42)]), D_FM7_HHZZ1_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (3, [(1, C_12_34)]), D_FM7_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (6, [(1, C_13_42)]), D_FM7_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (6, [(1, C_12_34)]), D_FM7_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (6, [(1, C_14_23)]), D_FM7_HHZZ1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (0, [(1, C_12_34)]), D_FM7_HHWW0_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (2, [(1, C_13_42)]), D_FM7_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (1, [(1, C_14_23)]), D_FM7_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (1, [(1, C_13_42)]), D_FM7_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (2, [(1, C_14_23)]), D_FM7_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (3, [(1, C_14_23)]), D_FM7_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (6, [(1, C_13_42)]), D_FM7_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (4, [(1, C_13_42)]), D_FM7_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (5, [(1, C_12_34)]), D_FM7_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (8, [(1, C_14_23)]), D_FM7_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (7, [(1, C_12_34)]), D_FM7_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (5, [(1, C_13_42)]), D_FM7_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (4, [(1, C_12_34)]), D_FM7_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (7, [(1, C_14_23)]), D_FM7_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (8, [(1, C_12_34)]), D_FM7_HHWW1_T) ] else [] else [] let k_matrix_4scalar = if Flags.k_matrix then if Flags.higgs_matrix then [ ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (0, [(1, C_12_34)]), D_Alpha_HHHH_S); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (0, [(1, C_13_42)]), D_Alpha_HHHH_T); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (0, [(1, C_14_23)]), D_Alpha_HHHH_T); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (3, [(1, C_14_23)]), D_Alpha_HHHH_S); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (3, [(1, C_13_42)]), D_Alpha_HHHH_T); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (3, [(1, C_12_34)]), D_Alpha_HHHH_T) ] else [] else [] (*i Thorsten's original implementation of the K matrix, which we keep since it still might be usefull for the future. let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 2, K_Matrix_Pole 2]), Alpha_WWWW2); ((Wm, Wp, Z, Z), Vector4_K_Matrix_tho (0, [(K_Matrix_Coeff 0, K_Matrix_Pole 0); (K_Matrix_Coeff 2, K_Matrix_Pole 2)]), Alpha_ZZWW0); ((Wm, Z, Wp, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 1, K_Matrix_Pole 1]), Alpha_ZZWW1); ((Z, Z, Z, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_ZZZZ) ] else [] i*) let quartic_gauge = standard_quartic_gauge @ anomalous_quartic_gauge @ k_matrix_quartic_gauge @ k_matrix_quartic_gauge_t_0 @ k_matrix_quartic_gauge_t_1 @ k_matrix_quartic_gauge_t_2 @ k_matrix_quartic_gauge_t_rsi @ k_matrix_quartic_gauge_m_0 @ k_matrix_quartic_gauge_m_1 @ k_matrix_quartic_gauge_m_7 let standard_gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ) ] let standard_gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let dim8_gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_1 1, FS0_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_1 1, FS0_HHZZ; (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_2 1, FS1_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_2 1, FS1_HHZZ ] let dim8_gauge_higgs4_m = [ (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_m_0 1, FM0_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_m_0 1, FM0_HHZZ; (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_m_1 1, FM1_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_m_1 1, FM1_HHZZ; (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_m_7 1, FM7_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_m_7 1, FM7_HHZZ] let standard_higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let standard_higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let fs_higgs4 = [ (O H, O H, O H, O H), Dim8_Scalar4 1, FS_H4 ] (* WK's couplings (apparently, he still intends to divide by $\Lambda^2_{\text{EWSB}}=16\pi^2v_{\mathrm{F}}^2$): \begin{subequations} \begin{align} \mathcal{L}^{\tau}_4 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) + \frac{g^2v_{\mathrm{F}}^2}{4} V_{\mu} V^{\mu} \right\rbrack^2 \\ \mathcal{L}^{\tau}_5 &= \left\lbrack (\partial_{\mu}H)(\partial_{\nu}H) + \frac{g^2v_{\mathrm{F}}^2}{4} V_{\mu} V_{\nu} \right\rbrack^2 \end{align} \end{subequations} with \begin{equation} V_{\mu} V_{\nu} = \frac{1}{2} \left( W^+_{\mu} W^-_{\nu} + W^+_{\nu} W^-_{\mu} \right) + \frac{1}{2\cos^2\theta_{w}} Z_{\mu} Z_{\nu} \end{equation} (note the symmetrization!), i.\,e. \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V_{\nu})^2 \\ \mathcal{L}_5 &= \alpha_5 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V^{\mu})^2 \end{align} \end{subequations} *) (* Breaking thinks up \begin{subequations} \begin{align} \mathcal{L}^{\tau,H^4}_4 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) \right\rbrack^2 \\ \mathcal{L}^{\tau,H^4}_5 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) \right\rbrack^2 \end{align} \end{subequations} and \begin{subequations} \begin{align} \mathcal{L}^{\tau,H^2V^2}_4 &= \frac{g^2v_{\mathrm{F}}^2}{2} (\partial_{\mu}H)(\partial^{\mu}H) V_{\mu}V^{\mu} \\ \mathcal{L}^{\tau,H^2V^2}_5 &= \frac{g^2v_{\mathrm{F}}^2}{2} (\partial_{\mu}H)(\partial_{\nu}H) V_{\mu}V_{\nu} \end{align} \end{subequations} i.\,e. \begin{subequations} \begin{align} \mathcal{L}^{\tau,H^2V^2}_4 &= \frac{g^2v_{\mathrm{F}}^2}{2} \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) W^+_{\nu}W^{-,\nu} + \frac{1}{2\cos^2\theta_{w}} (\partial_{\mu}H)(\partial^{\mu}H) Z_{\nu} Z^{\nu} \right\rbrack \\ \mathcal{L}^{\tau,H^2V^2}_5 &= \frac{g^2v_{\mathrm{F}}^2}{2} \left\lbrack (W^{+,\mu}\partial_{\mu}H) (W^{-,\nu}\partial_{\nu}H) + \frac{1}{2\cos^2\theta_{w}} (Z^{\mu}\partial_{\mu}H)(Z^{\nu}\partial_{\nu}H) \right\rbrack \end{align} \end{subequations} *) (* \begin{multline} \tau^4_8 \mathcal{L}^{\tau,H^2V^2}_4 + \tau^5_8 \mathcal{L}^{\tau,H^2V^2}_5 = \\ - \frac{g^2v_{\mathrm{F}}^2}{2} \Biggl\lbrack 2\tau^4_8 \frac{1}{2}(\ii\partial_{\mu}H)(\ii\partial^{\mu}H) W^+_{\nu}W^{-,\nu} + \tau^5_8 (W^{+,\mu}\ii\partial_{\mu}H) (W^{-,\nu}\ii\partial_{\nu}H) \\ + \frac{2\tau^4_8}{\cos^2\theta_{w}} \frac{1}{4} (\ii\partial_{\mu}H)(\ii\partial^{\mu}H) Z_{\nu} Z^{\nu} + \frac{\tau^5_8}{\cos^2\theta_{w}} \frac{1}{2} (Z^{\mu}\ii\partial_{\mu}H)(Z^{\nu}\ii\partial_{\nu}H) \Biggr\rbrack \end{multline} where the two powers of $\ii$ make the sign conveniently negative, i.\,e. \begin{subequations} \begin{align} \alpha_{(\partial H)^2W^2}^2 &= \tau^4_8 g^2v_{\mathrm{F}}^2\\ \alpha_{(\partial HW)^2}^2 &= \frac{\tau^5_8 g^2v_{\mathrm{F}}^2}{2} \\ \alpha_{(\partial H)^2Z^2}^2 &= \frac{\tau^4_8 g^2v_{\mathrm{F}}^2}{\cos^2\theta_{w}} \\ \alpha_{(\partial HZ)^2}^2 &=\frac{\tau^5_8 g^2v_{\mathrm{F}}^2}{2\cos^2\theta_{w}} \end{align} \end{subequations} *) let anomalous_gauge_higgs = [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa_anom; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ_anom; (O H, G Z, G Z), Dim5_Scalar_Gauge2 1, G_HZZ_anom; (O H, G Wp, G Wm), Dim5_Scalar_Gauge2 1, G_HWW_anom; (O H, G Ga, G Z), Dim5_Scalar_Vector_Vector_U 1, G_HGaZ_u; (O H, G Z, G Z), Dim5_Scalar_Vector_Vector_U 1, G_HZZ_u; (O H, G Wp, G Wm), Dim5_Scalar_Vector_Vector_U 1, G_HWW_u; (O H, G Wm, G Wp), Dim5_Scalar_Vector_Vector_U 1, G_HWW_u ] let anomalous_gauge_higgs4 = [] let anomalous_higgs = [] let higgs_triangle_vertices = if Flags.higgs_triangle then [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ; (O H, G Gl, G Gl), Dim5_Scalar_Gauge2 1, G_Hgg ] else [] let anomalous_higgs4 = [] let gauge_higgs = if Flags.higgs_anom then standard_gauge_higgs @ anomalous_gauge_higgs else standard_gauge_higgs let gauge_higgs4 = ( if Flags.higgs_anom then standard_gauge_higgs4 @ anomalous_gauge_higgs4 else standard_gauge_higgs4 ) @ ( if Flags.higgs_matrix then (dim8_gauge_higgs4 @ dim8_gauge_higgs4_m @ k_matrix_2scalar_2gauge @ k_matrix_2scalar_2gauge_m @ k_matrix_2scalar_2gauge_m_1 @ k_matrix_2scalar_2gauge_m_7) else [] ) let higgs = if Flags.higgs_anom then standard_higgs @ anomalous_higgs else standard_higgs let higgs4 = ( if Flags.higgs_anom then standard_higgs4 @ anomalous_higgs4 else standard_higgs4 ) @ ( if Flags.higgs_matrix then (fs_higgs4 @ k_matrix_4scalar ) else [] ) let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] (* New Resonances *) (* \begin{dubious} There is an extra minus in the Lagrangian to have the same sign as HWW or HZZ vertex. Effectivly this doesn't matter for SSC, because $(-1)^2=1$. This is only for completeness. \end{dubious} \begin{subequations} \begin{align} \mathbf{V}_\mu &= -\mathrm{i} g\mathbf{W}_\mu+\mathrm{i} g^\prime\mathbf{B}_\mu \\ \mathbf{W}_\mu &= W_\mu^a\frac{\tau^a}{2} \\ \mathbf{B}_\mu &= W_\mu^a\frac{\tau^3}{2} \\ \tau^{++}&= \tau^+ \otimes \tau^+ \\ \tau^+ &= \frac{1}{2} \left (\tau^+ \otimes \tau^3 + \tau^3+\tau^+ \right ) \\ \tau^0 &= \frac{1}{\sqrt{6}} \left (\tau^3\otimes\tau^3 -\tau^+ \otimes \tau^- - \tau^-+\tau^+ \right ) \\ \tau^- &= \frac{1}{2} \left (\tau^- \otimes \tau^3 + \tau^3+\tau^- \right ) \\ \tau^{--}&= \tau^- \otimes \tau^- \end{align} \end{subequations} *) (* Scalar Isoscalar Old representation \begin{equation} \mathcal{L}_{\sigma}= -\frac{g_\sigma v}{2} \text{tr} \left\lbrack \mathbf{V}_\mu \mathbf{V}^\mu \right\rbrack \sigma \end{equation} *) (* \begin{dubious} Transversal couplings like rsigma3t and rf3t are to be calculated in the new higgs matrix representation. \end{dubious} *) let rsigma3 = [ ((O Rsigma, G Wp, G Wm), Scalar_Vector_Vector 1, G_SWW); ((O Rsigma, G Z, G Z), Scalar_Vector_Vector 1, G_SZZ) ] let rsigma3h = [ ((O Rsigma, O H, O H), Dim5_Scalar_Scalar2 1, G_SHH) ] let rsigma3t = [ ((O Rsigma, G Wp, G Wm), Scalar_Vector_Vector_t 1, G_SWW_T); ((O Rsigma, G Z, G Z), Scalar_Vector_Vector_t 1, G_SZZ_T); ((O Rsigma, G Ga, G Ga), Scalar_Vector_Vector_t 1, G_SAA_T); ((O Rsigma, G Ga, G Z), Scalar_Vector_Vector_t 1, G_SAZ_T) ] let rsigma4 = [ (O Rsigma, O Rsigma, G Wp, G Wm), Scalar2_Vector2 1, G_SSWW; (O Rsigma, O Rsigma, G Z, G Z), Scalar2_Vector2 1, G_SSZZ ] (* Scalar Isotensor \begin{subequations} \begin{align} \mathcal{L}_{\phi}&= \frac{g_\phi v}{4} \text{Tr} \left \lbrack \left ( \mathbf{V}_\mu \otimes \mathbf{V}^\mu - \frac{\tau^{aa}}{6} \text{Tr} \left \lbrack \mathbf{V}_\mu \mathbf{V}^\mu \right \rbrack\right ) {\mathbf{\phi}} \right \rbrack\\ \phi&=\sqrt{2} \left (\phi^{++}\tau^{++}+\phi^+\tau^++\phi^0\tau^0+\phi^-\tau^- + \phi^{--}\tau^{--} \right ) \end{align} \end{subequations} *) let rphi3 = [ ((O Rphin, G Wp, G Wm), Scalar_Vector_Vector 1, G_PNWW); ((O Rphin, G Z, G Z), Scalar_Vector_Vector 1, G_PNZZ) ; ((O Rphisn, G Wp, G Wm), Scalar_Vector_Vector 1, G_PSNWW); ((O Rphisn, G Z, G Z), Scalar_Vector_Vector 1, G_PSNZZ) ; ((O Rphip, G Z, G Wm), Scalar_Vector_Vector 1, G_PWZ) ; ((O Rphipp, G Wm, G Wm), Scalar_Vector_Vector 1, G_PWW) ; ((O Rphim, G Wp, G Z), Scalar_Vector_Vector 1, G_PWZ) ; ((O Rphimm, G Wp, G Wp), Scalar_Vector_Vector 1, G_PWW) ] let rphi3h = [ ((O Rphisn, O H, O H), Dim5_Scalar_Scalar2 1, G_PSNHH) ] (* Tensor IsoScalar *) let rf3 = [ ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector_1 1, G_FWW); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector_1 1, G_FZZ) ] let rf3cf = [ ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector 1, G_FWW); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector 1, G_FZZ); ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector_cf 1, G_FWW_CF); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector_cf 1, G_FZZ_CF) ] let rf3h = [ ((O Rf, O H, O H), Tensor_2_Scalar_Scalar 1, G_FHH); ((O Rf, O H, O H), Tensor_2_Scalar_Scalar_cf 1, G_FHH_CF) ] let rf3t = [ ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector_t 1, G_FWW_T); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector_t 1, G_FZZ_T) ] (* Tensor Isotensor \begin{subequations} \begin{align} \mathcal{L}_{t} \end{align} \end{subequations} *) let rt3 = [ ((O Rtn, G Wp, G Wm), Tensor_2_Vector_Vector_1 1, G_TNWW); ((O Rtn, G Z, G Z), Tensor_2_Vector_Vector_1 1, G_TNZZ) ; ((O Rtsn, G Wp, G Wm), Tensor_2_Vector_Vector_1 1, G_TSNWW); ((O Rtsn, G Z, G Z), Tensor_2_Vector_Vector_1 1, G_TSNZZ) ; ((O Rtp, G Z, G Wm), Tensor_2_Vector_Vector_1 1, G_TWZ) ; ((O Rtpp, G Wm, G Wm), Tensor_2_Vector_Vector_1 1, G_TWW) ; ((O Rtm, G Wp, G Z), Tensor_2_Vector_Vector_1 1, G_TWZ) ; ((O Rtmm, G Wp, G Wp), Tensor_2_Vector_Vector_1 1, G_TWW) ] let rt3cf = [ ((O Rtn, G Wp, G Wm), Tensor_2_Vector_Vector 1, G_TNWW); ((O Rtn, G Z, G Z), Tensor_2_Vector_Vector 1, G_TNZZ) ; ((O Rtsn, G Wp, G Wm), Tensor_2_Vector_Vector 1, G_TSNWW); ((O Rtsn, G Z, G Z), Tensor_2_Vector_Vector 1, G_TSNZZ) ; ((O Rtp, G Z, G Wm), Tensor_2_Vector_Vector 1, G_TWZ) ; ((O Rtpp, G Wm, G Wm), Tensor_2_Vector_Vector 1, G_TWW) ; ((O Rtm, G Wp, G Z), Tensor_2_Vector_Vector 1, G_TWZ) ; ((O Rtmm, G Wp, G Wp), Tensor_2_Vector_Vector 1, G_TWW); ((O Rtn, G Wp, G Wm), Tensor_2_Vector_Vector_cf 1, G_TNWW_CF); ((O Rtn, G Z, G Z), Tensor_2_Vector_Vector_cf 1, G_TNZZ_CF) ; ((O Rtsn, G Wp, G Wm), Tensor_2_Vector_Vector_cf 1, G_TSNWW_CF); ((O Rtsn, G Z, G Z), Tensor_2_Vector_Vector_cf 1, G_TSNZZ_CF) ; ((O Rtp, G Z, G Wm), Tensor_2_Vector_Vector_cf 1, G_TWZ_CF) ; ((O Rtpp, G Wm, G Wm), Tensor_2_Vector_Vector_cf 1, G_TWW_CF) ; ((O Rtm, G Wp, G Z), Tensor_2_Vector_Vector_cf 1, G_TWZ_CF) ; ((O Rtmm, G Wp, G Wp), Tensor_2_Vector_Vector_cf 1, G_TWW_CF) ] (* Anomalous trilinear interactions $f_i f_j V$ and $ttH$: \begin{equation} \Delta\mathcal{L}_{tt\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{t} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) t A_\mu \end{equation} *) let anomalous_ttA = if Flags.top_anom then [ ((M (U (-3)), G Ga, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bb\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{b} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) b A_\mu \end{equation} *) let anomalous_bbA = if Flags.top_anom then [ ((M (D (-3)), G Ga, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttg} = - g_s \frac{\upsilon}{\Lambda^2} \bar{t}\lambda^a i\sigma^{\mu\nu}k_\nu (d_V(k^2)+id_A(k^2)\gamma_5)tG^a_\mu \end{equation} *) let anomalous_ttG = if Flags.top_anom then [ ((M (U (-3)), G Gl, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttG) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{t} \fmslash{Z} (X_L(k^2) P_L + X_R(k^2) P_R) t + \bar{t}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)tZ_\mu\right\rbrack \end{equation} *) let anomalous_ttZ = if Flags.top_anom then [ ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_ttZ); ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2} \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)bZ_\mu \end{equation} *) let anomalous_bbZ = if Flags.top_anom then [ ((M (D (-3)), G Z, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbW} = - \frac{g}{\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\fmslash{W}^-(V_L(k^2) P_L+V_R(k^2) P_R) t + \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)tW^-_\mu\right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbW = if Flags.top_anom then [ ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_tbW); ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, TLRM, Psi), G_TLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, TRLM, Psi), G_TRL_tbW) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttH} = - \frac{1}{\sqrt{2}} \bar{t} (Y_V(k^2)+iY_A(k^2)\gamma_5)t H \end{equation} *) let anomalous_ttH = if Flags.top_anom then [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, SPM, Psi), G_SP_ttH) ] else [] (* quartic fermion-gauge interactions $f_i f_j V_1 V_2$ emerging from gauge-invariant effective operators: \begin{equation} \Delta\mathcal{L}_{ttgg} = - \frac{g_s^2}{2} f_{abc} \frac{\upsilon}{\Lambda^2} \bar{t} \lambda^a \sigma^{\mu\nu} (d_V(k^2)+id_A(k^2)\gamma_5)t G^b_\mu G^c_\nu \end{equation} *) let anomalous_ttGG = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,1,0,true,TTGG)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttGG); ((O (Aux_top (2,1,0,false,TTGG)), G Gl, G Gl), Aux_Gauge_Gauge 1, I_Gs) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWA} = - i\sin\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t A_\mu W^-_\nu \right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbWA = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWA)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWA); ((O (Aux_top (2,0,1,false,TBWA)), G Ga, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWA)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWA); ((O (Aux_top (2,0,-1,false,TBWA)), G Wp, G Ga), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWZ} = - i\cos\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t Z_\mu W^-_\nu \right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbWZ = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWZ)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWZ); ((O (Aux_top (2,0,1,false,TBWZ)), G Z, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWZ)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWZ); ((O (Aux_top (2,0,-1,false,TBWZ)), G Wp, G Z), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{t} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)t W^-_\mu W^+_\nu \end{equation} *) let anomalous_ttWW = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,0,0,true,TTWW)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttWW); ((O (Aux_top (2,0,0,false,TTWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{b} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)b W^-_\mu W^+_\nu \end{equation} *) let anomalous_bbWW = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,0,true,BBWW)), M (D 3)), FBF (1, Psibar, TVA, Psi), G_TVA_bbWW); ((O (Aux_top (2,0,0,false,BBWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* 4-fermion contact terms emerging from operator rewriting: *) let anomalous_top_qGuG_tt = [ ((M (U (-3)), O (Aux_top (1,1,0,true,QGUG)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qGuG) ] let anomalous_top_qGuG_ff n = List.map mom [ ((U (-n), Aux_top (1,1,0,false,QGUG), U n), FBF (1, Psibar, V, Psi), Unit); ((D (-n), Aux_top (1,1,0,false,QGUG), D n), FBF (1, Psibar, V, Psi), Unit) ] let anomalous_top_qGuG = if Flags.top_anom_4f then anomalous_top_qGuG_tt @ ThoList.flatmap anomalous_top_qGuG_ff [1;2;3] else [] let anomalous_top_qBuB_tt = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QBUB)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB) ] let anomalous_top_qBuB_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QBUB), U n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_u); ((D (-n), Aux_top (1,0,0,false,QBUB), D n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_d); ((L (-n), Aux_top (1,0,0,false,QBUB), L n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_e); ((N (-n), Aux_top (1,0,0,false,QBUB), N n), FBF (1, Psibar, VL, Psi), G_VL_qBuB_n) ] let anomalous_top_qBuB = if Flags.top_anom_4f then anomalous_top_qBuB_tt @ ThoList.flatmap anomalous_top_qBuB_ff [1;2;3] else [] let anomalous_top_qW_tq = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (D (-3)), O (Aux_top (1,0,-1,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (U (-3)), O (Aux_top (1,0,1,true,QW)), M (D 3)), FBF (1, Psibar, VL, Psi), G_VL_qW) ] let anomalous_top_qW_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QW), U n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((D (-n), Aux_top (1,0,0,false,QW), D n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((N (-n), Aux_top (1,0,0,false,QW), N n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((L (-n), Aux_top (1,0,0,false,QW), L n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((D (-n), Aux_top (1,0,-1,false,QW), U n), FBF (1, Psibar, VL, Psi), Half); ((U (-n), Aux_top (1,0,1,false,QW), D n), FBF (1, Psibar, VL, Psi), Half); ((L (-n), Aux_top (1,0,-1,false,QW), N n), FBF (1, Psibar, VL, Psi), Half); ((N (-n), Aux_top (1,0,1,false,QW), L n), FBF (1, Psibar, VL, Psi), Half) ] let anomalous_top_qW = if Flags.top_anom_4f then anomalous_top_qW_tq @ ThoList.flatmap anomalous_top_qW_ff [1;2;3] else [] let anomalous_top_DuDd = if Flags.top_anom_4f then [ ((M (U (-3)), O (Aux_top (0,0,0,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,0,false,DR)), M (U 3)), FBF (1, Psibar, SL, Psi), G_SL_DttR); ((M (D (-3)), O (Aux_top (0,0,0,false,DR)), M (D 3)), FBF (1, Psibar, SR, Psi), G_SR_DttR); ((M (U (-3)), O (Aux_top (0,0,0,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (D (-3)), O (Aux_top (0,0,0,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DttL); ((M (D (-3)), O (Aux_top (0,0,-1,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DR)), M (D 3)), FBF (1, Psibar, SLR, Psi), G_SLR_DbtR); ((M (D (-3)), O (Aux_top (0,0,-1,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DbtL) ] else [] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ (if Flags.ckm_present then charged_currents_ckm else charged_currents_triv) @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ higgs_triangle_vertices @ goldstone_vertices @ rsigma3 @ rsigma3t @ rphi3 @ ( if Flags.cf_arbitrary then (rf3cf @ rt3cf) else (rf3 @ rt3) ) @ rf3t @ ( if Flags.higgs_matrix then (rsigma3h @ rphi3h @ rf3h ) else [] ) @ anomalous_ttA @ anomalous_bbA @ anomalous_ttZ @ anomalous_bbZ @ anomalous_tbW @ anomalous_tbWA @ anomalous_tbWZ @ anomalous_ttWW @ anomalous_bbWW @ anomalous_ttG @ anomalous_ttGG @ anomalous_ttH @ anomalous_top_qGuG @ anomalous_top_qBuB @ anomalous_top_qW @ anomalous_top_DuDd) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | "Rsigma" -> O Rsigma | "Rphi0" -> O Rphin | "Rphis0" -> O Rphisn | "Rphi+" -> O Rphip | "Rphi-" -> O Rphim | "Rphi++" -> O Rphip | "Rphi--" -> O Rphimm | "Rf" -> O Rf | "Rt0" -> O Rtn | "Rts0" -> O Rtsn | "Rt+" -> O Rtp | "Rt-" -> O Rtm | "Rt++" -> O Rtp | "Rt--" -> O Rtmm | "Aux_t_ttGG0" -> O (Aux_top (2,1, 0,true,TTGG)) | "Aux_ttGG0" -> O (Aux_top (2,1, 0,false,TTGG)) | "Aux_t_tbWA+" -> O (Aux_top (2,0, 1,true,TBWA)) | "Aux_tbWA+" -> O (Aux_top (2,0, 1,false,TBWA)) | "Aux_t_tbWA-" -> O (Aux_top (2,0,-1,true,TBWA)) | "Aux_tbWA-" -> O (Aux_top (2,0,-1,false,TBWA)) | "Aux_t_tbWZ+" -> O (Aux_top (2,0, 1,true,TBWZ)) | "Aux_tbWZ+" -> O (Aux_top (2,0, 1,false,TBWZ)) | "Aux_t_tbWZ-" -> O (Aux_top (2,0,-1,true,TBWZ)) | "Aux_tbWZ-" -> O (Aux_top (2,0,-1,false,TBWZ)) | "Aux_t_ttWW0" -> O (Aux_top (2,0, 0,true,TTWW)) | "Aux_ttWW0" -> O (Aux_top (2,0, 0,false,TTWW)) | "Aux_t_bbWW0" -> O (Aux_top (2,0, 0,true,BBWW)) | "Aux_bbWW0" -> O (Aux_top (2,0, 0,false,BBWW)) | "Aux_t_qGuG0" -> O (Aux_top (1,1, 0,true,QGUG)) | "Aux_qGuG0" -> O (Aux_top (1,1, 0,false,QGUG)) | "Aux_t_qBuB0" -> O (Aux_top (1,0, 0,true,QBUB)) | "Aux_qBuB0" -> O (Aux_top (1,0, 0,false,QBUB)) | "Aux_t_qW0" -> O (Aux_top (1,0, 0,true,QW)) | "Aux_qW0" -> O (Aux_top (1,0, 0,false,QW)) | "Aux_t_qW+" -> O (Aux_top (1,0, 1,true,QW)) | "Aux_qW+" -> O (Aux_top (1,0, 1,false,QW)) | "Aux_t_qW-" -> O (Aux_top (1,0,-1,true,QW)) | "Aux_qW-" -> O (Aux_top (1,0,-1,false,QW)) | "Aux_t_dL0" -> O (Aux_top (0,0, 0,true,DL)) | "Aux_dL0" -> O (Aux_top (0,0, 0,false,DL)) | "Aux_t_dL+" -> O (Aux_top (0,0, 1,true,DL)) | "Aux_dL+" -> O (Aux_top (0,0, 1,false,DL)) | "Aux_t_dL-" -> O (Aux_top (0,0,-1,true,DL)) | "Aux_dL-" -> O (Aux_top (0,0,-1,false,DL)) | "Aux_t_dR0" -> O (Aux_top (0,0, 0,true,DR)) | "Aux_dR0" -> O (Aux_top (0,0, 0,false,DR)) | "Aux_t_dR+" -> O (Aux_top (0,0, 1,true,DR)) | "Aux_dR+" -> O (Aux_top (0,0, 1,false,DR)) | "Aux_t_dR-" -> O (Aux_top (0,0,-1,true,DR)) | "Aux_dR-" -> O (Aux_top (0,0,-1,false,DR)) | _ -> invalid_arg "Modellib_BSM.SSC.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.SSC.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.SSC.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.SSC.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.SSC.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "gl" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Rsigma -> "Rsigma" | Rphin -> "Rphin" | Rphisn -> "Rphisn" | Rphip -> "Rphi+" | Rphim -> "Rphi-" | Rphipp -> "Rphi++" | Rphimm -> "Rphi--" | Rf -> "Rf" | Rtn -> "Rtn" | Rtsn -> "Rtsn" | Rtp -> "Rt+" | Rtm -> "Rt-" | Rtpp -> "Rt++" | Rtmm -> "Rt--" | Aux_top (_,_,ch,n,v) -> "Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" end ) ^ ( if ch > 0 then "+" else if ch < 0 then "-" else "0" ) end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.SSC.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.SSC.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.SSC.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.SSC.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H -> "H" | Rsigma -> "\\sigma" | Rphip -> "\\phi^+" | Rphim -> "\\phi^-" | Rphin -> "\\phi^0" | Rphisn -> "\\phi_s^0" | Rphipp -> "\\phi^{++}" | Rphimm -> "\\phi^{--}" | Rf -> "f" | Rtp -> "t^+" | Rtm -> "t^-" | Rtn -> "t^0" | Rtsn -> "t_s^0" | Rtpp -> "t^{++}" | Rtmm -> "t^{--}" | Aux_top (_,_,ch,n,v) -> "\\textnormal{Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" end ) ^ ( if ch > 0 then "^+" else if ch < 0 then "^-" else "^0" ) ^ "}" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | Rsigma -> "rsi" | Rphip -> "rpp" | Rphim -> "rpm" | Rphin -> "rpn" | Rphisn -> "rpsn" | Rphipp -> "rppp" | Rphimm -> "rpmm" | Rf -> "rf" | Rtp -> "rtp" | Rtm -> "rtm" | Rtn -> "rtn" | Rtsn -> "rtsn" | Rtpp -> "rtpp" | Rtmm -> "rtmm" | Aux_top (_,_,ch,n,v) -> "aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttgg" | TBWA -> "tbwa" | TBWZ -> "tbwz" | TTWW -> "ttww" | BBWW -> "bbww" | QGUG -> "qgug" | QBUB -> "qbub" | QW -> "qw" | DL -> "dl" | DR -> "dr" end ) ^ "_" ^ ( if ch > 0 then "p" else if ch < 0 then "m" else "0" ) end (* Introducing new Resonances from 45, there are no PDG values *) let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | Rsigma -> 45 | Rphin -> 46 | Rphip | Rphim -> 47 | Rphipp | Rphimm -> 48 | Rphisn -> 49 | Rf -> 52 | Rtn -> 53 | Rtp | Rtm -> 54 | Rtpp | Rtmm -> 55 | Rtsn -> 59 | Aux_top (_,_,_,_,_) -> 81 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Half -> "half" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | I_G_weak -> "ig" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_TVA_ttA -> "gtva_tta" | G_TVA_bbA -> "gtva_bba" | G_VLR_ttZ -> "gvlr_ttz" | G_TVA_ttZ -> "gtva_ttz" | G_TVA_bbZ -> "gtva_bbz" | G_VLR_btW -> "gvlr_btw" | G_VLR_tbW -> "gvlr_tbw" | G_TLR_btW -> "gtlr_btw" | G_TRL_tbW -> "gtrl_tbw" | G_TLR_btWA -> "gtlr_btwa" | G_TRL_tbWA -> "gtrl_tbwa" | G_TLR_btWZ -> "gtlr_btwz" | G_TRL_tbWZ -> "gtrl_tbwz" | G_TVA_ttWW -> "gtva_ttww" | G_TVA_bbWW -> "gtva_bbww" | G_TVA_ttG -> "gtva_ttg" | G_TVA_ttGG -> "gtva_ttgg" | G_SP_ttH -> "gsp_tth" | G_VLR_qGuG -> "gvlr_qgug" | G_VLR_qBuB -> "gvlr_qbub" | G_VLR_qBuB_u -> "gvlr_qbub_u" | G_VLR_qBuB_d -> "gvlr_qbub_d" | G_VLR_qBuB_e -> "gvlr_qbub_e" | G_VL_qBuB_n -> "gvl_qbub_n" | G_VL_qW -> "gvl_qw" | G_VL_qW_u -> "gvl_qw_u" | G_VL_qW_d -> "gvl_qw_d" | G_SL_DttR -> "gsl_dttr" | G_SR_DttR -> "gsr_dttr" | G_SL_DttL -> "gsl_dttl" | G_SLR_DbtR -> "gslr_dbtr" | G_SL_DbtL -> "gsl_dbtl" | G_CC -> "gcc" | G_CCQ (n1,n2) -> "gccq" ^ string_of_int n1 ^ string_of_int n2 | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | I_G1_AWW -> "ig1a" | I_G1_ZWW -> "ig1z" | I_G1_plus_kappa_plus_G4_AWW -> "ig1pkpg4a" | I_G1_plus_kappa_plus_G4_ZWW -> "ig1pkpg4z" | I_G1_plus_kappa_minus_G4_AWW -> "ig1pkmg4a" | I_G1_plus_kappa_minus_G4_ZWW -> "ig1pkmg4z" | I_G1_minus_kappa_plus_G4_AWW -> "ig1mkpg4a" | I_G1_minus_kappa_plus_G4_ZWW -> "ig1mkpg4z" | I_G1_minus_kappa_minus_G4_AWW -> "ig1mkmg4a" | I_G1_minus_kappa_minus_G4_ZWW -> "ig1mkmg4z" | I_lambda_AWW -> "ila" | I_lambda_ZWW -> "ilz" | G5_AWW -> "rg5a" | G5_ZWW -> "rg5z" | I_kappa5_AWW -> "ik5a" | I_kappa5_ZWW -> "ik5z" | I_lambda5_AWW -> "il5a" | I_lambda5_ZWW -> "il5z" | Alpha_WWWW0 -> "alww0" | Alpha_WWWW2 -> "alww2" | Alpha_ZZWW0 -> "alzw0" | Alpha_ZZWW1 -> "alzw1" | Alpha_ZZZZ -> "alzz" | FT0_WWWW0 -> "at0ww0" | FT0_WWWW2 -> "at0ww2" | FT0_ZZWW0 -> "at0zw0" | FT0_ZZWW1 -> "at0zw1" | FT0_ZZZZ -> "at0zz" | FT0_AAAA -> "at0aa" | FT0_AAWW0 -> "at0aw0" | FT0_AAWW1 -> "at0aw1" | FT0_AAZZ -> "at0az" | FT0_AZWW0 -> "at0azw0" | FT0_AZWW1 -> "at0azw1" | FT0_AAAZ -> "at03az" | FT0_AZZZ -> "at0a3z" | FT1_WWWW0 -> "at1ww0" | FT1_WWWW2 -> "at1ww2" | FT1_ZZWW0 -> "at1zw0" | FT1_ZZWW1 -> "at1zw1" | FT1_ZZZZ -> "at1zz" | FT1_AAAA -> "at1aa" | FT1_AAWW0 -> "at1aw0" | FT1_AAWW1 -> "at1aw1" | FT1_AAZZ -> "at1az" | FT1_AZWW0 -> "at1azw0" | FT1_AZWW1 -> "at1azw1" | FT1_AAAZ -> "at13az" | FT1_AZZZ -> "at1a3z" | FT2_WWWW0 -> "at2ww0" | FT2_WWWW2 -> "at2ww2" | FT2_ZZWW0 -> "at2zw0" | FT2_ZZWW1 -> "at2zw1" | FT2_ZZZZ -> "at2zz" | FT2_AAAA -> "at2aa" | FT2_AAWW0 -> "at2aw0" | FT2_AAWW1 -> "at2aw1" | FT2_AAZZ -> "at2az" | FT2_AZWW0 -> "at2azw0" | FT2_AZWW1 -> "at2azw1" | FT2_AAAZ -> "at23az" | FT2_AZZZ -> "at2a3z" | FM0_WWWW0 -> "am0ww0,am0ww0" | FM0_WWWW2 -> "am0ww2,am0ww2" | FM0_ZZWW0 -> "am0zw0/costhw**2,am0zw0*costhw**2" | FM0_ZZWW1 -> "am0zw1/costhw**2,am0zw1*costhw**2" | FM0_ZZZZ -> "am0zz,am0zz" | FM1_WWWW0 -> "am1ww0,am1ww0" | FM1_WWWW2 -> "am1ww2,am1ww2" | FM1_ZZWW0 -> "am1zw0/costhw**2,am1zw0*costhw**2" | FM1_ZZWW1 -> "am1zw1/costhw**2,am1zw1*costhw**2" | FM1_ZZZZ -> "am1zz,am1zz" | FM7_WWWW0 -> "am7ww0,am7ww0,am7ww0" | FM7_WWWW2 -> "am7ww2,am7ww2,am7ww2" | FM7_ZZWW0 -> "am7zw0/costhw**2,am7zw0,am7zw0*costhw**2" | FM7_ZZWW1 -> "am7zw1/costhw**2,am7zw1,am7zw1*costhw**2" | FM7_ZZZZ -> "am7zz,am7zz,am7zz" | FS0_HHWW -> "fs0hhww" | FS0_HHZZ -> "fs0hhzz" | FS1_HHWW -> "fs1hhww" | FS1_HHZZ -> "fs1hhzz" | FS_H4 -> "fsh4" | FM0_HHWW -> "fm0hhww" | FM0_HHZZ -> "fm0hhzz" | FM1_HHWW -> "fm1hhww" | FM1_HHZZ -> "fm1hhzz" | FM7_HHWW -> "fm7hhww" | FM7_HHZZ -> "fm7hhzz" | D_Alpha_ZZWW0_S -> "dalzz0_s(gkm,mkm," | D_Alpha_ZZWW0_T -> "dalzz0_t(gkm,mkm," | D_Alpha_ZZWW1_S -> "dalzz1_s(gkm,mkm," | D_Alpha_ZZWW1_T -> "dalzz1_t(gkm,mkm," | D_Alpha_ZZWW1_U -> "dalzz1_u(gkm,mkm," | D_Alpha_WWWW0_S -> "dalww0_s(gkm,mkm," | D_Alpha_WWWW0_T -> "dalww0_t(gkm,mkm," | D_Alpha_WWWW0_U -> "dalww0_u(gkm,mkm," | D_Alpha_WWWW2_S -> "dalww2_s(gkm,mkm," | D_Alpha_WWWW2_T -> "dalww2_t(gkm,mkm," | D_Alpha_ZZZZ_S -> "dalz4_s(gkm,mkm," | D_Alpha_ZZZZ_T -> "dalz4_t(gkm,mkm," | D_FT0_ZZWW0_S -> "datzz0_s_0(gkm,mkm," | D_FT0_ZZWW0_T -> "datzz0_t_0(gkm,mkm," | D_FT0_ZZWW0_U -> "datzz0_u_0(gkm,mkm," | D_FT0_ZZWW1_S -> "datzz1_s_0(gkm,mkm," | D_FT0_ZZWW1_T -> "datzz1_t_0(gkm,mkm," | D_FT0_ZZWW1_U -> "datzz1_u_0(gkm,mkm," | D_FT0_WWWW0_S -> "datww0_s_0(gkm,mkm," | D_FT0_WWWW0_T -> "datww0_t_0(gkm,mkm," | D_FT0_WWWW0_U -> "datww0_u_0(gkm,mkm," | D_FT0_WWWW2_S -> "datww2_s_0(gkm,mkm," | D_FT0_WWWW2_T -> "datww2_t_0(gkm,mkm," | D_FT0_WWWW2_U -> "datww2_u_0(gkm,mkm," | D_FT0_ZZZZ_S -> "datz4_s_0(gkm,mkm," | D_FT0_ZZZZ_T -> "datz4_t_0(gkm,mkm," | D_FT0_ZZZZ_U -> "datz4_u_0(gkm,mkm," | D_FT0_AAAA_S -> "data4_s_0(gkm,mkm," | D_FT0_AAAA_T -> "data4_t_0(gkm,mkm," | D_FT0_AAAA_U -> "data4_u_0(gkm,mkm," | D_FT0_AAWW0_S -> "dataw0_s_0(gkm,mkm," | D_FT0_AAWW0_T -> "dataw0_t_0(gkm,mkm," | D_FT0_AAWW0_U -> "dataw0_u_0(gkm,mkm," | D_FT0_AAWW1_S -> "dataw1_s_0(gkm,mkm," | D_FT0_AAWW1_T -> "dataw1_t_0(gkm,mkm," | D_FT0_AAWW1_U -> "dataw1_u_0(gkm,mkm," | D_FT0_AAZZ_S -> "dataz_s_0(gkm,mkm," | D_FT0_AAZZ_T -> "dataz_t_0(gkm,mkm," | D_FT0_AAZZ_U -> "dataz_u_0(gkm,mkm," | D_FT0_AZWW0_S -> "datazw0_s_0(gkm,mkm," | D_FT0_AZWW0_T -> "datazw0_t_0(gkm,mkm," | D_FT0_AZWW0_U -> "datazw0_u_0(gkm,mkm," | D_FT0_AZWW1_S -> "datazw1_s_0(gkm,mkm," | D_FT0_AZWW1_T -> "datazw1_t_0(gkm,mkm," | D_FT0_AZWW1_U -> "datazw1_u_0(gkm,mkm," | D_FT0_AAAZ_S -> "dat3az_s_0(gkm,mkm," | D_FT0_AAAZ_T -> "dat3az_t_0(gkm,mkm," | D_FT0_AAAZ_U -> "dat3az_u_0(gkm,mkm," | D_FT0_AZZZ_S -> "data3z_s_0(gkm,mkm," | D_FT0_AZZZ_T -> "data3z_t_0(gkm,mkm," | D_FT0_AZZZ_U -> "data3z_u_0(gkm,mkm," | D_FT1_ZZWW0_S -> "datzz0_s_1(gkm,mkm," | D_FT1_ZZWW0_T -> "datzz0_t_1(gkm,mkm," | D_FT1_ZZWW0_U -> "datzz0_u_1(gkm,mkm," | D_FT1_ZZWW1_S -> "datzz1_s_1(gkm,mkm," | D_FT1_ZZWW1_T -> "datzz1_t_1(gkm,mkm," | D_FT1_ZZWW1_U -> "datzz1_u_1(gkm,mkm," | D_FT1_WWWW0_S -> "datww0_s_1(gkm,mkm," | D_FT1_WWWW0_T -> "datww0_t_1(gkm,mkm," | D_FT1_WWWW0_U -> "datww0_u_1(gkm,mkm," | D_FT1_WWWW2_S -> "datww2_s_1(gkm,mkm," | D_FT1_WWWW2_T -> "datww2_t_1(gkm,mkm," | D_FT1_WWWW2_U -> "datww2_u_1(gkm,mkm," | D_FT1_ZZZZ_S -> "datz4_s_1(gkm,mkm," | D_FT1_ZZZZ_T -> "datz4_t_1(gkm,mkm," | D_FT1_ZZZZ_U -> "datz4_u_1(gkm,mkm," | D_FT1_AAAA_S -> "data4_s_1(gkm,mkm," | D_FT1_AAAA_T -> "data4_t_1(gkm,mkm," | D_FT1_AAAA_U -> "data4_u_1(gkm,mkm," | D_FT1_AAWW0_S -> "dataw0_s_1(gkm,mkm," | D_FT1_AAWW0_T -> "dataw0_t_1(gkm,mkm," | D_FT1_AAWW0_U -> "dataw0_u_1(gkm,mkm," | D_FT1_AAWW1_S -> "dataw1_s_1(gkm,mkm," | D_FT1_AAWW1_T -> "dataw1_t_1(gkm,mkm," | D_FT1_AAWW1_U -> "dataw1_u_1(gkm,mkm," | D_FT1_AAZZ_S -> "dataz_s_1(gkm,mkm," | D_FT1_AAZZ_T -> "dataz_t_1(gkm,mkm," | D_FT1_AAZZ_U -> "dataz_u_1(gkm,mkm," | D_FT1_AZWW0_S -> "datazw0_s_1(gkm,mkm," | D_FT1_AZWW0_T -> "datazw0_t_1(gkm,mkm," | D_FT1_AZWW0_U -> "datazw0_u_1(gkm,mkm," | D_FT1_AZWW1_S -> "datazw1_s_1(gkm,mkm," | D_FT1_AZWW1_T -> "datazw1_t_1(gkm,mkm," | D_FT1_AZWW1_U -> "datazw1_u_1(gkm,mkm," | D_FT1_AAAZ_S -> "dat3az_s_1(gkm,mkm," | D_FT1_AAAZ_T -> "dat3az_t_1(gkm,mkm," | D_FT1_AAAZ_U -> "dat3az_u_1(gkm,mkm," | D_FT1_AZZZ_S -> "data3z_s_1(gkm,mkm," | D_FT1_AZZZ_T -> "data3z_t_1(gkm,mkm," | D_FT1_AZZZ_U -> "data3z_u_1(gkm,mkm," | D_FT2_ZZWW0_S -> "datzz0_s_2(gkm,mkm," | D_FT2_ZZWW0_T -> "datzz0_t_2(gkm,mkm," | D_FT2_ZZWW0_U -> "datzz0_u_2(gkm,mkm," | D_FT2_ZZWW1_S -> "datzz1_s_2(gkm,mkm," | D_FT2_ZZWW1_T -> "datzz1_t_2(gkm,mkm," | D_FT2_ZZWW1_U -> "datzz1_u_2(gkm,mkm," | D_FT2_WWWW0_S -> "datww0_s_2(gkm,mkm," | D_FT2_WWWW0_T -> "datww0_t_2(gkm,mkm," | D_FT2_WWWW0_U -> "datww0_u_2(gkm,mkm," | D_FT2_WWWW2_S -> "datww2_s_2(gkm,mkm," | D_FT2_WWWW2_T -> "datww2_t_2(gkm,mkm," | D_FT2_WWWW2_U -> "datww2_u_2(gkm,mkm," | D_FT2_ZZZZ_S -> "datz4_s_2(gkm,mkm," | D_FT2_ZZZZ_T -> "datz4_t_2(gkm,mkm," | D_FT2_ZZZZ_U -> "datz4_u_2(gkm,mkm," | D_FT2_AAAA_S -> "data4_s_2(gkm,mkm," | D_FT2_AAAA_T -> "data4_t_2(gkm,mkm," | D_FT2_AAAA_U -> "data4_u_2(gkm,mkm," | D_FT2_AAWW0_S -> "dataw0_s_2(gkm,mkm," | D_FT2_AAWW0_T -> "dataw0_t_2(gkm,mkm," | D_FT2_AAWW0_U -> "dataw0_u_2(gkm,mkm," | D_FT2_AAWW1_S -> "dataw1_s_2(gkm,mkm," | D_FT2_AAWW1_T -> "dataw1_t_2(gkm,mkm," | D_FT2_AAWW1_U -> "dataw1_u_2(gkm,mkm," | D_FT2_AAZZ_S -> "dataz_s_2(gkm,mkm," | D_FT2_AAZZ_T -> "dataz_t_2(gkm,mkm," | D_FT2_AAZZ_U -> "dataz_u_2(gkm,mkm," | D_FT2_AZWW0_S -> "datazw0_s_2(gkm,mkm," | D_FT2_AZWW0_T -> "datazw0_t_2(gkm,mkm," | D_FT2_AZWW0_U -> "datazw0_u_2(gkm,mkm," | D_FT2_AZWW1_S -> "datazw1_s_2(gkm,mkm," | D_FT2_AZWW1_T -> "datazw1_t_2(gkm,mkm," | D_FT2_AZWW1_U -> "datazw1_u_2(gkm,mkm," | D_FT2_AAAZ_S -> "dat3az_s_2(gkm,mkm," | D_FT2_AAAZ_T -> "dat3az_t_2(gkm,mkm," | D_FT2_AAAZ_U -> "dat3az_u_2(gkm,mkm," | D_FT2_AZZZ_S -> "data3z_s_2(gkm,mkm," | D_FT2_AZZZ_T -> "data3z_t_2(gkm,mkm," | D_FT2_AZZZ_U -> "data3z_u_2(gkm,mkm," | D_FTrsi_ZZWW0_S -> "datzz0_s_rsi(gkm,mkm," | D_FTrsi_ZZWW0_T -> "datzz0_t_rsi(gkm,mkm," | D_FTrsi_ZZWW0_U -> "datzz0_u_rsi(gkm,mkm," | D_FTrsi_ZZWW1_S -> "datzz1_s_rsi(gkm,mkm," | D_FTrsi_ZZWW1_T -> "datzz1_t_rsi(gkm,mkm," | D_FTrsi_ZZWW1_U -> "datzz1_u_rsi(gkm,mkm," | D_FTrsi_WWWW0_S -> "datww0_s_rsi(gkm,mkm," | D_FTrsi_WWWW0_T -> "datww0_t_rsi(gkm,mkm," | D_FTrsi_WWWW0_U -> "datww0_u_rsi(gkm,mkm," | D_FTrsi_WWWW2_S -> "datww2_s_rsi(gkm,mkm," | D_FTrsi_WWWW2_T -> "datww2_t_rsi(gkm,mkm," | D_FTrsi_WWWW2_U -> "datww2_u_rsi(gkm,mkm," | D_FTrsi_ZZZZ_S -> "datz4_s_rsi(gkm,mkm," | D_FTrsi_ZZZZ_T -> "datz4_t_rsi(gkm,mkm," | D_FTrsi_ZZZZ_U -> "datz4_u_rsi(gkm,mkm," | D_FTrsi_AAAA_S -> "data4_s_rsi(gkm,mkm," | D_FTrsi_AAAA_T -> "data4_t_rsi(gkm,mkm," | D_FTrsi_AAAA_U -> "data4_u_rsi(gkm,mkm," | D_FTrsi_AAWW0_S -> "dataw0_s_rsi(gkm,mkm," | D_FTrsi_AAWW0_T -> "dataw0_t_rsi(gkm,mkm," | D_FTrsi_AAWW0_U -> "dataw0_u_rsi(gkm,mkm," | D_FTrsi_AAWW1_S -> "dataw1_s_rsi(gkm,mkm," | D_FTrsi_AAWW1_T -> "dataw1_t_rsi(gkm,mkm," | D_FTrsi_AAWW1_U -> "dataw1_u_rsi(gkm,mkm," | D_FTrsi_AAZZ_S -> "dataz_s_rsi(gkm,mkm," | D_FTrsi_AAZZ_T -> "dataz_t_rsi(gkm,mkm," | D_FTrsi_AAZZ_U -> "dataz_u_rsi(gkm,mkm," | D_FTrsi_AZWW0_S -> "datazw0_s_rsi(gkm,mkm," | D_FTrsi_AZWW0_T -> "datazw0_t_rsi(gkm,mkm," | D_FTrsi_AZWW0_U -> "datazw0_u_rsi(gkm,mkm," | D_FTrsi_AZWW1_S -> "datazw1_s_rsi(gkm,mkm," | D_FTrsi_AZWW1_T -> "datazw1_t_rsi(gkm,mkm," | D_FTrsi_AZWW1_U -> "datazw1_u_rsi(gkm,mkm," | D_FTrsi_AAAZ_S -> "dat3az_s_rsi(gkm,mkm," | D_FTrsi_AAAZ_T -> "dat3az_t_rsi(gkm,mkm," | D_FTrsi_AAAZ_U -> "dat3az_u_rsi(gkm,mkm," | D_FTrsi_AZZZ_S -> "data3z_s_rsi(gkm,mkm," | D_FTrsi_AZZZ_T -> "data3z_t_rsi(gkm,mkm," | D_FTrsi_AZZZ_U -> "data3z_u_rsi(gkm,mkm," | D_FM0_ZZWW0_S -> "damzz0_s_0(gkm,mkm," | D_FM0_ZZWW0_T -> "damzz0_t_0(gkm,mkm," | D_FM0_ZZWW0_U -> "damzz0_u_0(gkm,mkm," | D_FM0_ZZWW1_S -> "damzz1_s_0(gkm,mkm," | D_FM0_ZZWW1_T -> "damzz1_t_0(gkm,mkm," | D_FM0_ZZWW1_U -> "damzz1_u_0(gkm,mkm," | D_FM0_WWWW0_S -> "damww0_s_0(gkm,mkm," | D_FM0_WWWW0_T -> "damww0_t_0(gkm,mkm," | D_FM0_WWWW0_U -> "damww0_u_0(gkm,mkm," | D_FM0_WWWW2_S -> "damww2_s_0(gkm,mkm," | D_FM0_WWWW2_T -> "damww2_t_0(gkm,mkm," | D_FM0_WWWW2_U -> "damww2_u_0(gkm,mkm," | D_FM0_ZZZZ_S -> "damz4_s_0(gkm,mkm," | D_FM0_ZZZZ_T -> "damz4_t_0(gkm,mkm," | D_FM0_ZZZZ_U -> "damz4_u_0(gkm,mkm," | D_FM1_ZZWW0_S -> "damzz0_s_1(gkm,mkm," | D_FM1_ZZWW0_T -> "damzz0_t_1(gkm,mkm," | D_FM1_ZZWW0_U -> "damzz0_u_1(gkm,mkm," | D_FM1_ZZWW1_S -> "damzz1_s_1(gkm,mkm," | D_FM1_ZZWW1_T -> "damzz1_t_1(gkm,mkm," | D_FM1_ZZWW1_U -> "damzz1_u_1(gkm,mkm," | D_FM1_WWWW0_S -> "damww0_s_1(gkm,mkm," | D_FM1_WWWW0_T -> "damww0_t_1(gkm,mkm," | D_FM1_WWWW0_U -> "damww0_u_1(gkm,mkm," | D_FM1_WWWW2_S -> "damww2_s_1(gkm,mkm," | D_FM1_WWWW2_T -> "damww2_t_1(gkm,mkm," | D_FM1_WWWW2_U -> "damww2_u_1(gkm,mkm," | D_FM1_ZZZZ_S -> "damz4_s_1(gkm,mkm," | D_FM1_ZZZZ_T -> "damz4_t_1(gkm,mkm," | D_FM1_ZZZZ_U -> "damz4_u_1(gkm,mkm," | D_FM7_ZZWW0_S -> "damzz0_s_7(gkm,mkm," | D_FM7_ZZWW0_T -> "damzz0_t_7(gkm,mkm," | D_FM7_ZZWW0_U -> "damzz0_u_7(gkm,mkm," | D_FM7_ZZWW1_S -> "damzz1_s_7(gkm,mkm," | D_FM7_ZZWW1_T -> "damzz1_t_7(gkm,mkm," | D_FM7_ZZWW1_U -> "damzz1_u_7(gkm,mkm," | D_FM7_WWWW0_S -> "damww0_s_7(gkm,mkm," | D_FM7_WWWW0_T -> "damww0_t_7(gkm,mkm," | D_FM7_WWWW0_U -> "damww0_u_7(gkm,mkm," | D_FM7_WWWW2_S -> "damww2_s_7(gkm,mkm," | D_FM7_WWWW2_T -> "damww2_t_7(gkm,mkm," | D_FM7_WWWW2_U -> "damww2_u_7(gkm,mkm," | D_FM7_ZZZZ_S -> "damz4_s_7(gkm,mkm," | D_FM7_ZZZZ_T -> "damz4_t_7(gkm,mkm," | D_FM7_ZZZZ_U -> "damz4_u_7(gkm,mkm," | D_Alpha_HHHH_S -> "dalh4_s(gkm,mkm," | D_Alpha_HHHH_T -> "dalh4_t(gkm,mkm," | D_Alpha_HHWW0_S -> "dalhw0_s(gkm,mkm," | D_Alpha_HHWW0_T -> "dalhw0_t(gkm,mkm," | D_Alpha_HHZZ0_S -> "dalhz0_s(gkm,mkm," | D_Alpha_HHZZ0_T -> "dalhz0_t(gkm,mkm," | D_Alpha_HHWW1_S -> "dalhw1_s(gkm,mkm," | D_Alpha_HHWW1_T -> "dalhw1_t(gkm,mkm," | D_Alpha_HHWW1_U -> "dalhw1_u(gkm,mkm," | D_Alpha_HHZZ1_S -> "dalhz1_s(gkm,mkm," | D_Alpha_HHZZ1_T -> "dalhz1_t(gkm,mkm," | D_Alpha_HHZZ1_U -> "dalhz1_u(gkm,mkm," | D_FM0_HHWW0_S -> "damhw0_s_0(gkm,mkm," | D_FM0_HHWW0_T -> "damhw0_t_0(gkm,mkm," | D_FM0_HHWW0_U -> "damhw0_u_0(gkm,mkm," | D_FM0_HHZZ0_S -> "damhz0_s_0(gkm,mkm," | D_FM0_HHZZ0_T -> "damhz0_t_0(gkm,mkm," | D_FM0_HHZZ0_U -> "damhz0_u_0(gkm,mkm," | D_FM0_HHWW1_S -> "damhw1_s_0(gkm,mkm," | D_FM0_HHWW1_T -> "damhw1_t_0(gkm,mkm," | D_FM0_HHWW1_U -> "damhw1_u_0(gkm,mkm," | D_FM0_HHZZ1_S -> "damhz1_s_0(gkm,mkm," | D_FM0_HHZZ1_T -> "damhz1_t_0(gkm,mkm," | D_FM0_HHZZ1_U -> "damhz1_u_0(gkm,mkm," | D_FM1_HHWW0_S -> "damhw0_s_1(gkm,mkm," | D_FM1_HHWW0_T -> "damhw0_t_1(gkm,mkm," | D_FM1_HHWW0_U -> "damhw0_u_1(gkm,mkm," | D_FM1_HHZZ0_S -> "damhz0_s_1(gkm,mkm," | D_FM1_HHZZ0_T -> "damhz0_t_1(gkm,mkm," | D_FM1_HHZZ0_U -> "damhz0_u_1(gkm,mkm," | D_FM1_HHWW1_S -> "damhw1_s_1(gkm,mkm," | D_FM1_HHWW1_T -> "damhw1_t_1(gkm,mkm," | D_FM1_HHWW1_U -> "damhw1_u_1(gkm,mkm," | D_FM1_HHZZ1_S -> "damhz1_s_1(gkm,mkm," | D_FM1_HHZZ1_T -> "damhz1_t_1(gkm,mkm," | D_FM1_HHZZ1_U -> "damhz1_u_1(gkm,mkm," | D_FM7_HHWW0_S -> "damhw0_s_7(gkm,mkm," | D_FM7_HHWW0_T -> "damhw0_t_7(gkm,mkm," | D_FM7_HHWW0_U -> "damhw0_u_7(gkm,mkm," | D_FM7_HHZZ0_S -> "damhz0_s_7(gkm,mkm," | D_FM7_HHZZ0_T -> "damhz0_t_7(gkm,mkm," | D_FM7_HHZZ0_U -> "damhz0_u_7(gkm,mkm," | D_FM7_HHWW1_S -> "damhw1_s_7(gkm,mkm," | D_FM7_HHWW1_T -> "damhw1_t_7(gkm,mkm," | D_FM7_HHWW1_U -> "damhw1_u_7(gkm,mkm," | D_FM7_HHZZ1_S -> "damhz1_s_7(gkm,mkm," | D_FM7_HHZZ1_T -> "damhz1_t_7(gkm,mkm," | D_FM7_HHZZ1_U -> "damhz1_u_7(gkm,mkm," | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_SWW -> "gsww" | G_SZZ -> "gszz" | G_SHH -> "gshh" | G_SWW_T -> "gswwt" | G_SZZ_T -> "gszzt" | G_SAA_T -> "gsaat" | G_SAZ_T -> "gsazt" | G_PNWW -> "gpnww" | G_PNZZ -> "gpnzz" | G_PSNWW -> "gpsnww" | G_PSNZZ -> "gpsnzz" | G_PSNHH -> "gpsnhh" | G_PWZ -> "gpwz" | G_PWW -> "gpww" | G_FWW -> "gfww" | G_FZZ -> "gfzz" | G_FWW_CF -> "gfwwcf" | G_FZZ_CF -> "gfzzcf" | G_FHH -> "gfhh" | G_FHH_CF -> "gfhhcf" | G_FWW_T -> "gfwwt" | G_FZZ_T -> "gfzzt" | G_TNWW -> "gtnww" | G_TNZZ -> "gtnzz" | G_TNWW_CF -> "gtnwwcf" | G_TNZZ_CF -> "gtnzzcf" | G_TSNWW -> "gtsnww" | G_TSNZZ -> "gtsnzz" | G_TSNWW_CF -> "gtsnwwcf" | G_TSNZZ_CF -> "gtsnzzcf" | G_TWZ -> "gtwz" | G_TWW -> "gtww" | G_TWZ_CF -> "gtwzcf" | G_TWW_CF -> "gtwwcf" | G_SSWW -> "gssww" | G_SSZZ -> "gsszz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_Hmm -> "ghmm" | G_HGaZ -> "ghgaz" | G_HGaGa -> "ghgaga" | G_Hgg -> "ghgg" | G_HGaGa_anom -> "ghgaga_ac" | G_HGaZ_anom -> "ghgaz_ac" | G_HZZ_anom -> "ghzz_ac" | G_HWW_anom -> "ghww_ac" | G_HGaZ_u -> "ghgaz_u" | G_HZZ_u -> "ghzz_u" | G_HWW_u -> "ghww_u" | G_H3 -> "gh3" | G_H4 -> "gh4" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f | K_Matrix_Coeff i -> "kc" ^ string_of_int i | K_Matrix_Pole i -> "kp" ^ string_of_int i end (* \thocwmodulesection{Complete Minimal Standard Model including additional Resonances (alternate Tensor)} *) module SSC_AltT (Flags : SSC_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] type f_aux_top = TTGG | TBWA | TBWZ | TTWW | BBWW | (*i top auxiliary field "flavors" *) QGUG | QBUB | QW | DL | DR type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | H | Rsigma | Rphin | Rphisn | Rphip | Rphim | Rphipp | Rphimm | Rf | Rtn | Rtsn | Rtp | Rtm | Rtpp | Rtmm | Rff | Rfv | Rfphi | Aux_top of int*int*int*bool*f_aux_top (*i lorentz*color*charge*top-side*flavor *) type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib_BSM.SSC_AltT.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let rec aux_top_flavors (f,l,co,ch) = List.append ( List.map other [ Aux_top(l,co,ch/2,true,f); Aux_top(l,co,ch/2,false,f) ] ) ( if ch > 1 then List.append ( List.map other [ Aux_top(l,co,-ch/2,true,f); Aux_top(l,co,-ch/2,false,f) ] ) ( aux_top_flavors (f,l,co,(ch-2)) ) else [] ) let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Higgs", List.map other [H]; "Scalar Resonances", List.map other [Rsigma; Rphin; Rphisn; Rphip; Rphim; Rphipp; Rphimm]; "Tensor Resonances", List.map other [Rf; Rtn; Rtsn; Rtp; Rtm; Rtpp; Rtmm]; "Alternate Tensor", List.map other [Rff; Rfv; Rfphi]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = List.append ( ThoList.flatmap snd (external_flavors ()) ) ( ThoList.flatmap aux_top_flavors [ (TTGG,2,1,1); (TBWA,2,0,2); (TBWZ,2,0,2); (TTWW,2,0,1); (BBWW,2,0,1); (QGUG,1,1,1); (QBUB,1,0,1); (QW,1,0,3); (DL,0,0,3); (DR,0,0,3) ] ) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz_aux = function | 2 -> Tensor_1 | 1 -> Vector | 0 -> Scalar | _ -> invalid_arg ("SM.lorentz_aux: wrong value") let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> begin match f with | Aux_top (l,_,_,_,_) -> lorentz_aux l | Rf | Rtn | Rtsn | Rtp | Rtm | Rtpp | Rtmm -> Tensor_2 | Rff -> Tensor_2 | Rfv -> Vector | _ -> Scalar end let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | O (Aux_top (_,co,_,_,_)) -> if co == 0 then Color.Singlet else Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let prop_aux = function | 2 -> Aux_Tensor_1 | 1 -> Aux_Vector | 0 -> Aux_Scalar | _ -> invalid_arg ("SM.prop_aux: wrong value") let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H | Rsigma -> Prop_Scalar | Rphin | Rphisn | Rphip | Rphim | Rphipp | Rphimm -> Prop_Scalar | Rf -> Prop_Tensor_2 | Rff -> Prop_Tensor_pure | Rfv -> Prop_Vector_pure | Rfphi -> Prop_Scalar | Rtn | Rtsn | Rtp | Rtm | Rtpp | Rtmm -> Prop_Tensor_2 | Aux_top (l,_,_,_,_) -> prop_aux l end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | Rsigma -> Rsigma | Rphin -> Rphin | Rphip -> Rphim | Rphim -> Rphip | Rphisn -> Rphisn | Rphipp -> Rphimm | Rphimm -> Rphipp | Rf -> Rf | Rff -> Rff | Rfv -> Rfv | Rfphi -> Rfphi | Rtn -> Rtn | Rtsn -> Rtsn | Rtp -> Rtm | Rtm -> Rtp | Rtpp -> Rtmm | Rtmm -> Rtpp | Aux_top (l,co,ch,n,f) -> Aux_top (l,co,(-ch),(not n),f) end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 (* Electrical charge, lepton number, baryon number. We could avoid the rationals altogether by multiplying the first and last by 3 \ldots *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("SM.generation': " ^ string_of_int n) let generation f = if Flags.ckm_present then [] else match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Rsigma | Phi0 | Rphin | Rphisn | Rf | Rff | Rfv | Rfphi | Rtn | Rtsn -> 0//1 | Phip | Rphip | Rtp -> 1//1 | Phim | Rphim | Rtm -> -1//1 | Rphipp | Rtpp -> 2//1 | Rphimm | Rtmm -> -2//1 | Aux_top (_,_,ch,_,_) -> ch//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Half | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | I_G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_CCQ of int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_TVA_ttA | G_TVA_bbA | G_VLR_ttZ | G_TVA_ttZ | G_TVA_bbZ | G_VLR_btW | G_VLR_tbW | G_TLR_btW | G_TRL_tbW | G_TLR_btWZ | G_TRL_tbWZ | G_TLR_btWA | G_TRL_tbWA | G_TVA_ttWW | G_TVA_bbWW | G_TVA_ttG | G_TVA_ttGG | G_SP_ttH | G_VLR_qGuG | G_VLR_qBuB | G_VLR_qBuB_u | G_VLR_qBuB_d | G_VLR_qBuB_e | G_VL_qBuB_n | G_VL_qW | G_VL_qW_u | G_VL_qW_d | G_SL_DttR | G_SR_DttR | G_SL_DttL | G_SLR_DbtR | G_SL_DbtL | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | I_G1_AWW | I_G1_ZWW | I_G1_plus_kappa_plus_G4_AWW | I_G1_plus_kappa_plus_G4_ZWW | I_G1_plus_kappa_minus_G4_AWW | I_G1_plus_kappa_minus_G4_ZWW | I_G1_minus_kappa_plus_G4_AWW | I_G1_minus_kappa_plus_G4_ZWW | I_G1_minus_kappa_minus_G4_AWW | I_G1_minus_kappa_minus_G4_ZWW | I_lambda_AWW | I_lambda_ZWW | G5_AWW | G5_ZWW | I_kappa5_AWW | I_kappa5_ZWW | I_lambda5_AWW | I_lambda5_ZWW | FS0_HHWW | FS0_HHZZ | FS1_HHWW | FS1_HHZZ | FM0_HHWW | FM0_HHZZ | FM1_HHWW | FM1_HHZZ | FM7_HHWW | FM7_HHZZ | Alpha_WWWW0 | Alpha_ZZWW1 | Alpha_WWWW2 | Alpha_ZZWW0 | Alpha_ZZZZ | FT0_WWWW0 | FT0_WWWW2 | FT0_ZZWW0 | FT0_ZZWW1 | FT0_ZZZZ | FT0_AAAA | FT0_AAWW0 | FT0_AAWW1 | FT0_AAZZ | FT0_AZWW0 | FT0_AZWW1 | FT0_AAAZ | FT0_AZZZ | FT1_WWWW0 | FT1_WWWW2 | FT1_ZZWW0 | FT1_ZZWW1 | FT1_ZZZZ | FT1_AAAA | FT1_AAWW0 | FT1_AAWW1 | FT1_AAZZ | FT1_AZWW0 | FT1_AZWW1 | FT1_AAAZ | FT1_AZZZ | FT2_WWWW0 | FT2_WWWW2 | FT2_ZZWW0 | FT2_ZZWW1 | FT2_ZZZZ | FT2_AAAA | FT2_AAWW0 | FT2_AAWW1 | FT2_AAZZ | FT2_AZWW0 | FT2_AZWW1 | FT2_AAAZ | FT2_AZZZ | FM0_WWWW0 | FM0_WWWW2 | FM0_ZZWW0 | FM0_ZZWW1 | FM0_ZZZZ | FM1_WWWW0 | FM1_WWWW2 | FM1_ZZWW0 | FM1_ZZWW1 | FM1_ZZZZ | FM7_WWWW0 | FM7_WWWW2 | FM7_ZZWW0 | FM7_ZZWW1 | FM7_ZZZZ | D_Alpha_ZZWW0_S | D_Alpha_ZZWW0_T | D_Alpha_ZZWW1_S | D_Alpha_ZZWW1_T | D_Alpha_ZZWW1_U | D_Alpha_WWWW0_S | D_Alpha_WWWW0_T | D_Alpha_WWWW0_U | D_Alpha_WWWW2_S | D_Alpha_WWWW2_T | D_Alpha_ZZZZ_S | D_Alpha_ZZZZ_T | D_FT0_ZZWW0_S | D_FT0_ZZWW0_T | D_FT0_ZZWW0_U | D_FT0_ZZWW1_S | D_FT0_ZZWW1_T | D_FT0_ZZWW1_U | D_FT0_WWWW0_S | D_FT0_WWWW0_T | D_FT0_WWWW0_U | D_FT0_WWWW2_S | D_FT0_WWWW2_T | D_FT0_WWWW2_U | D_FT0_ZZZZ_S | D_FT0_ZZZZ_T | D_FT0_ZZZZ_U | D_FT0_AAAA_S | D_FT0_AAAA_T | D_FT0_AAAA_U | D_FT0_AAWW0_S | D_FT0_AAWW0_T | D_FT0_AAWW0_U | D_FT0_AAWW1_S | D_FT0_AAWW1_T | D_FT0_AAWW1_U | D_FT0_AAZZ_S | D_FT0_AAZZ_T | D_FT0_AAZZ_U | D_FT0_AZWW0_S | D_FT0_AZWW0_T | D_FT0_AZWW0_U | D_FT0_AZWW1_S | D_FT0_AZWW1_T | D_FT0_AZWW1_U | D_FT0_AAAZ_S | D_FT0_AAAZ_T | D_FT0_AAAZ_U | D_FT0_AZZZ_S | D_FT0_AZZZ_T | D_FT0_AZZZ_U | D_FT1_ZZWW0_S | D_FT1_ZZWW0_T | D_FT1_ZZWW0_U | D_FT1_ZZWW1_S | D_FT1_ZZWW1_T | D_FT1_ZZWW1_U | D_FT1_WWWW0_S | D_FT1_WWWW0_T | D_FT1_WWWW0_U | D_FT1_WWWW2_S | D_FT1_WWWW2_T | D_FT1_WWWW2_U | D_FT1_ZZZZ_S | D_FT1_ZZZZ_T | D_FT1_ZZZZ_U | D_FT1_AAAA_S | D_FT1_AAAA_T | D_FT1_AAAA_U | D_FT1_AAWW0_S | D_FT1_AAWW0_T | D_FT1_AAWW0_U | D_FT1_AAWW1_S | D_FT1_AAWW1_T | D_FT1_AAWW1_U | D_FT1_AAZZ_S | D_FT1_AAZZ_T | D_FT1_AAZZ_U | D_FT1_AZWW0_S | D_FT1_AZWW0_T | D_FT1_AZWW0_U | D_FT1_AZWW1_S | D_FT1_AZWW1_T | D_FT1_AZWW1_U | D_FT1_AAAZ_S | D_FT1_AAAZ_T | D_FT1_AAAZ_U | D_FT1_AZZZ_S | D_FT1_AZZZ_T | D_FT1_AZZZ_U | D_FT2_ZZWW0_S | D_FT2_ZZWW0_T | D_FT2_ZZWW0_U | D_FT2_ZZWW1_S | D_FT2_ZZWW1_T | D_FT2_ZZWW1_U | D_FT2_WWWW0_S | D_FT2_WWWW0_T | D_FT2_WWWW0_U | D_FT2_WWWW2_S | D_FT2_WWWW2_T | D_FT2_WWWW2_U | D_FT2_ZZZZ_S | D_FT2_ZZZZ_T | D_FT2_ZZZZ_U | D_FT2_AAAA_S | D_FT2_AAAA_T | D_FT2_AAAA_U | D_FT2_AAWW0_S | D_FT2_AAWW0_T | D_FT2_AAWW0_U | D_FT2_AAWW1_S | D_FT2_AAWW1_T | D_FT2_AAWW1_U | D_FT2_AAZZ_S | D_FT2_AAZZ_T | D_FT2_AAZZ_U | D_FT2_AZWW0_S | D_FT2_AZWW0_T | D_FT2_AZWW0_U | D_FT2_AZWW1_S | D_FT2_AZWW1_T | D_FT2_AZWW1_U | D_FT2_AAAZ_S | D_FT2_AAAZ_T | D_FT2_AAAZ_U | D_FT2_AZZZ_S | D_FT2_AZZZ_T | D_FT2_AZZZ_U | D_FTrsi_ZZWW0_S | D_FTrsi_ZZWW0_T | D_FTrsi_ZZWW0_U | D_FTrsi_ZZWW1_S | D_FTrsi_ZZWW1_T | D_FTrsi_ZZWW1_U | D_FTrsi_WWWW0_S | D_FTrsi_WWWW0_T | D_FTrsi_WWWW0_U | D_FTrsi_WWWW2_S | D_FTrsi_WWWW2_T | D_FTrsi_WWWW2_U | D_FTrsi_ZZZZ_S | D_FTrsi_ZZZZ_T | D_FTrsi_ZZZZ_U | D_FTrsi_AAAA_S | D_FTrsi_AAAA_T | D_FTrsi_AAAA_U | D_FTrsi_AAWW0_S | D_FTrsi_AAWW0_T | D_FTrsi_AAWW0_U | D_FTrsi_AAWW1_S | D_FTrsi_AAWW1_T | D_FTrsi_AAWW1_U | D_FTrsi_AAZZ_S | D_FTrsi_AAZZ_T | D_FTrsi_AAZZ_U | D_FTrsi_AZWW0_S | D_FTrsi_AZWW0_T | D_FTrsi_AZWW0_U | D_FTrsi_AZWW1_S | D_FTrsi_AZWW1_T | D_FTrsi_AZWW1_U | D_FTrsi_AAAZ_S | D_FTrsi_AAAZ_T | D_FTrsi_AAAZ_U | D_FTrsi_AZZZ_S | D_FTrsi_AZZZ_T | D_FTrsi_AZZZ_U | D_FM0_ZZWW0_S | D_FM0_ZZWW0_T | D_FM0_ZZWW0_U | D_FM0_ZZWW1_S | D_FM0_ZZWW1_T | D_FM0_ZZWW1_U | D_FM0_WWWW0_S | D_FM0_WWWW0_T | D_FM0_WWWW0_U | D_FM0_WWWW2_S | D_FM0_WWWW2_T | D_FM0_WWWW2_U | D_FM0_ZZZZ_S | D_FM0_ZZZZ_T | D_FM0_ZZZZ_U | D_FM1_ZZWW0_S | D_FM1_ZZWW0_T | D_FM1_ZZWW0_U | D_FM1_ZZWW1_S | D_FM1_ZZWW1_T | D_FM1_ZZWW1_U | D_FM1_WWWW0_S | D_FM1_WWWW0_T | D_FM1_WWWW0_U | D_FM1_WWWW2_S | D_FM1_WWWW2_T | D_FM1_WWWW2_U | D_FM1_ZZZZ_S | D_FM1_ZZZZ_T | D_FM1_ZZZZ_U | D_FM7_ZZWW0_S | D_FM7_ZZWW0_T | D_FM7_ZZWW0_U | D_FM7_ZZWW1_S | D_FM7_ZZWW1_T | D_FM7_ZZWW1_U | D_FM7_WWWW0_S | D_FM7_WWWW0_T | D_FM7_WWWW0_U | D_FM7_WWWW2_S | D_FM7_WWWW2_T | D_FM7_WWWW2_U | D_FM7_ZZZZ_S | D_FM7_ZZZZ_T | D_FM7_ZZZZ_U | D_Alpha_HHHH_S | D_Alpha_HHHH_T | D_Alpha_HHZZ0_S | D_Alpha_HHWW0_S | D_Alpha_HHZZ0_T | D_Alpha_HHWW0_T | D_Alpha_HHZZ1_S | D_Alpha_HHWW1_S | D_Alpha_HHZZ1_T | D_Alpha_HHWW1_T | D_Alpha_HHZZ1_U | D_Alpha_HHWW1_U | D_FM0_HHZZ0_S | D_FM0_HHWW0_S | D_FM0_HHZZ0_T | D_FM0_HHWW0_T | D_FM0_HHZZ0_U | D_FM0_HHWW0_U | D_FM0_HHZZ1_S | D_FM0_HHWW1_S | D_FM0_HHZZ1_T | D_FM0_HHWW1_T | D_FM0_HHZZ1_U | D_FM0_HHWW1_U | D_FM1_HHZZ0_S | D_FM1_HHWW0_S | D_FM1_HHZZ0_T | D_FM1_HHWW0_T | D_FM1_HHZZ0_U | D_FM1_HHWW0_U | D_FM1_HHZZ1_S | D_FM1_HHWW1_S | D_FM1_HHZZ1_T | D_FM1_HHWW1_T | D_FM1_HHZZ1_U | D_FM1_HHWW1_U | D_FM7_HHZZ0_S | D_FM7_HHWW0_S | D_FM7_HHZZ0_T | D_FM7_HHWW0_T | D_FM7_HHZZ0_U | D_FM7_HHWW0_U | D_FM7_HHZZ1_S | D_FM7_HHWW1_S | D_FM7_HHZZ1_T | D_FM7_HHWW1_T | D_FM7_HHZZ1_U | D_FM7_HHWW1_U | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_SWW | G_SWW_T | G_SSWW | G_SZZ | G_SZZ_T | G_SSZZ | G_SHH | G_SAA_T | G_SAZ_T | G_PNWW | G_PNZZ | G_PWZ | G_PWW | G_PSNWW | G_PSNZZ | G_PSNHH | G_FWW | G_FZZ | G_FWW_CF | G_FZZ_CF | G_FWW_T | G_FZZ_T | G_FHH | G_FHH_CF | G_FFWW | G_FFZZ | G_FFWW_CF | G_FFZZ_CF | G_FFHH | G_FFHH_CF | G_FVWW | G_FVZZ | G_FVHH | G_FVWW_CF | G_FVZZ_CF | G_FVHH_CF | G_FDDSWW | G_FDDSZZ | G_FDDSHH | G_FDDSWW_CF | G_FDDSZZ_CF | G_FDDSHH_CF | G_FSWW | G_FSZZ | G_FSHH | G_TNWW | G_TNZZ | G_TSNWW | G_TSNZZ | G_TWZ | G_TWW | G_TNWW_CF | G_TNZZ_CF | G_TSNWW_CF | G_TSNZZ_CF | G_TWZ_CF | G_TWW_CF | G_Htt | G_Hbb | G_Hcc | G_Hmm | G_Htautau | G_H3 | G_H4 | FS_H4 | G_HGaZ | G_HGaGa | G_Hgg | G_HGaZ_anom | G_HGaGa_anom | G_HZZ_anom | G_HWW_anom | G_HGaZ_u | G_HZZ_u | G_HWW_u | Gs | I_Gs | G2 | Mass of flavor | Width of flavor | K_Matrix_Coeff of int | K_Matrix_Pole of int (* \begin{dubious} The current abstract syntax for parameter dependencies is admittedly tedious. Later, there will be a parser for a convenient concrete syntax as a part of a concrete syntax for models. But as these examples show, it should include simple functions. \end{dubious} *) type orders = int * int let orders = function | _ -> (0,0) (* \begin{subequations} \begin{align} \alpha_{\text{QED}} &= \frac{1}{137.0359895} \\ \sin^2\theta_w &= 0.23124 \end{align} \end{subequations} *) let input_parameters = [ Alpha_QED, 1. /. 137.0359895; Sin2thw, 0.23124; Mass (G Z), 91.187; Mass (M (N 1)), 0.0; Mass (M (L 1)), 0.51099907e-3; Mass (M (N 2)), 0.0; Mass (M (L 2)), 0.105658389; Mass (M (N 3)), 0.0; Mass (M (L 3)), 1.77705; Mass (M (U 1)), 5.0e-3; Mass (M (D 1)), 3.0e-3; Mass (M (U 2)), 1.2; Mass (M (D 2)), 0.1; Mass (M (U 3)), 174.0; Mass (M (D 3)), 4.2 ] (* \begin{subequations} \begin{align} e &= \sqrt{4\pi\alpha} \\ \sin\theta_w &= \sqrt{\sin^2\theta_w} \\ \cos\theta_w &= \sqrt{1-\sin^2\theta_w} \\ g &= \frac{e}{\sin\theta_w} \\ m_W &= \cos\theta_w m_Z \\ v &= \frac{2m_W}{g} \\ g_{CC} = -\frac{g}{2\sqrt2} &= -\frac{e}{2\sqrt2\sin\theta_w} \\ Q_{\text{lepton}} = -q_{\text{lepton}}e &= e \\ Q_{\text{up}} = -q_{\text{up}}e &= -\frac{2}{3}e \\ Q_{\text{down}} = -q_{\text{down}}e &= \frac{1}{3}e \\ \ii q_We = \ii g_{\gamma WW} &= \ii e \\ \ii g_{ZWW} &= \ii g \cos\theta_w \\ \ii g_{WWW} &= \ii g \end{align} \end{subequations} *) (* \begin{dubious} \ldots{} to be continued \ldots{} The quartic couplings can't be correct, because the dimensions are wrong! \begin{subequations} \begin{align} g_{HWW} &= g m_W = 2 \frac{m_W^2}{v}\\ g_{HHWW} &= 2 \frac{m_W^2}{v^2} = \frac{g^2}{2} \\ g_{HZZ} &= \frac{g}{\cos\theta_w}m_Z \\ g_{HHZZ} &= 2 \frac{m_Z^2}{v^2} = \frac{g^2}{2\cos\theta_w} \\ g_{Htt} &= \lambda_t \\ g_{Hbb} &= \lambda_b=\frac{m_b}{m_t}\lambda_t \\ g_{H^3} &= - \frac{3g}{2}\frac{m_H^2}{m_W} = - 3 \frac{m_H^2}{v} g_{H^4} &= - \frac{3g^2}{4} \frac{m_W^2}{v^2} = -3 \frac{m_H^2}{v^2} \end{align} \end{subequations} \end{dubious} *) let derived_parameters = - [ Real E, Sqrt (Prod [Const 4; Atom Pi; Atom Alpha_QED]); + [ Real E, Sqrt (Prod [Integer 4; Atom Pi; Atom Alpha_QED]); Real Sinthw, Sqrt (Atom Sin2thw); - Real Costhw, Sqrt (Diff (Const 1, Atom Sin2thw)); + Real Costhw, Sqrt (Diff (Integer 1, Atom Sin2thw)); Real G_weak, Quot (Atom E, Atom Sinthw); Real (Mass (G Wp)), Prod [Atom Costhw; Atom (Mass (G Z))]; - Real Vev, Quot (Prod [Const 2; Atom (Mass (G Wp))], Atom G_weak); + Real Vev, Quot (Prod [Integer 2; Atom (Mass (G Wp))], Atom G_weak); Real Q_lepton, Atom E; - Real Q_up, Prod [Quot (Const (-2), Const 3); Atom E]; - Real Q_down, Prod [Quot (Const 1, Const 3); Atom E]; - Real G_CC, Neg (Quot (Atom G_weak, Prod [Const 2; Sqrt (Const 2)])); + Real Q_up, Prod [Quot (Integer (-2), Integer 3); Atom E]; + Real Q_down, Prod [Quot (Integer 1, Integer 3); Atom E]; + Real G_CC, Neg (Quot (Atom G_weak, Prod [Integer 2; Sqrt (Integer 2)])); Complex I_Q_W, Prod [I; Atom E]; Complex I_G_weak, Prod [I; Atom G_weak]; Complex I_G_ZWW, Prod [I; Atom G_weak; Atom Costhw] ] (* \begin{equation} - \frac{g}{2\cos\theta_w} \end{equation} *) let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) (* \begin{subequations} \begin{align} - \frac{g}{2\cos\theta_w} g_V &= - \frac{g}{2\cos\theta_w} (T_3 - 2 q \sin^2\theta_w) \\ - \frac{g}{2\cos\theta_w} g_A &= - \frac{g}{2\cos\theta_w} T_3 \end{align} \end{subequations} *) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* \begin{equation} \mathcal{L}_{\textrm{EM}} = - e \sum_i q_i \bar\psi_i\fmslash{A}\psi_i \end{equation} *) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{NC}} = - \frac{g}{2\cos\theta_W} \sum_i \bar\psi_i\fmslash{Z}(g_V^i-g_A^i\gamma_5)\psi_i \end{equation} *) let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents' n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents'' n = List.map mgm [ ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents_triv = ThoList.flatmap charged_currents' [1;2;3] @ ThoList.flatmap charged_currents'' [1;2;3] let charged_currents_ckm = let charged_currents_2 n1 n2 = List.map mgm [ ((D (-n1), Wm, U n2), FBF (1, Psibar, VL, Psi), G_CCQ (n2,n1)); ((U (-n1), Wp, D n2), FBF (1, Psibar, VL, Psi), G_CCQ (n1,n2)) ] in ThoList.flatmap charged_currents' [1;2;3] @ List.flatten (Product.list2 charged_currents_2 [1;2;3] [1;2;3]) let yukawa = [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, S, Psi), G_Htt); ((M (D (-3)), O H, M (D 3)), FBF (1, Psibar, S, Psi), G_Hbb); ((M (U (-2)), O H, M (U 2)), FBF (1, Psibar, S, Psi), G_Hcc); ((M (L (-3)), O H, M (L 3)), FBF (1, Psibar, S, Psi), G_Htautau) ] @ if Flags.higgs_hmm then [ ((M (L (-2)), O H, M (L 2)), FBF (1, Psibar, S, Psi), G_Hmm)] else [] (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let standard_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] (* \begin{multline} \mathcal{L}_{\textrm{TGC}}(g_1,\kappa) = g_1 \mathcal{L}_T(V,W^+,W^-) \\ + \frac{\kappa+g_1}{2} \Bigl(\mathcal{L}_T(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr)\\ + \frac{\kappa-g_1}{2} \Bigl(\mathcal{L}_L(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr) \end{multline} *) (* \begin{dubious} The whole thing in the LEP2 workshop notation: \begin{multline} \ii\mathcal{L}_{\textrm{TGC},V} / g_{WWV} = \\ g_1^V V^\mu (W^-_{\mu\nu}W^{+,\nu}-W^+_{\mu\nu}W^{-,\nu}) + \kappa_V W^+_\mu W^-_\nu V^{\mu\nu} + \frac{\lambda_V}{m_W^2} V_{\mu\nu} W^-_{\rho\mu} W^{+,\hphantom{\nu}\rho}_{\hphantom{+,}\nu} \\ + \ii g_5^V \epsilon_{\mu\nu\rho\sigma} \left( (\partial^\rho W^{-,\mu}) W^{+,\nu} - W^{-,\mu}(\partial^\rho W^{+,\nu}) \right) V^\sigma \\ + \ii g_4^V W^-_\mu W^+_\nu (\partial^\mu V^\nu + \partial^\nu V^\mu) - \frac{\tilde\kappa_V}{2} W^-_\mu W^+_\nu \epsilon^{\mu\nu\rho\sigma} V_{\rho\sigma} - \frac{\tilde\lambda_V}{2m_W^2} W^-_{\rho\mu} W^{+,\mu}_{\hphantom{+,\mu}\nu} \epsilon^{\nu\rho\alpha\beta} V_{\alpha\beta} \end{multline} using the conventions of Itzykson and Zuber with $\epsilon^{0123} = +1$. \end{dubious} *) (* \begin{dubious} This is equivalent to the notation of Hagiwara et al.~\cite{HPZH87}, if we remember that they have opposite signs for~$g_{WWV}$: \begin{multline} \mathcal{L}_{WWV} / (-g_{WWV}) = \\ \ii g_1^V \left( W^\dagger_{\mu\nu} W^\mu - W^\dagger_\mu W^\mu_{\hphantom{\mu}\nu} \right) V^\nu + \ii \kappa_V W^\dagger_\mu W_\nu V^{\mu\nu} + \ii \frac{\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} V^{\nu\lambda} \\ - g_4^V W^\dagger_\mu W_\nu \left(\partial^\mu V^\nu + \partial^\nu V^\mu \right) + g_5^V \epsilon^{\mu\nu\lambda\sigma} \left( W^\dagger_\mu \stackrel{\leftrightarrow}{\partial_\lambda} W_\nu \right) V_\sigma\\ + \ii \tilde\kappa_V W^\dagger_\mu W_\nu \tilde{V}^{\mu\nu} + \ii\frac{\tilde\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} \tilde{V}^{\nu\lambda} \end{multline} Here $V^\mu$ stands for either the photon or the~$Z$ field, $W^\mu$ is the $W^-$ field, $W_{\mu\nu} = \partial_\mu W_\nu - \partial_\nu W_\mu$, $V_{\mu\nu} = \partial_\mu V_\nu - \partial_\nu V_\mu$, and $\tilde{V}_{\mu\nu} = \frac{1}{2} \epsilon_{\mu\nu\lambda\sigma} V^{\lambda\sigma}$. \end{dubious} *) let anomalous_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_ZWW) ] let triple_gauge = if Flags.triple_anom then anomalous_triple_gauge else standard_triple_gauge (* \begin{equation} \mathcal{L}_{\textrm{QGC}} = - g^2 W_{+,\mu} W_{-,\nu} W_+^\mu W_-^\nu + \ldots \end{equation} *) (* Actually, quartic gauge couplings are a little bit more straightforward using auxiliary fields. Here we have to impose the antisymmetry manually: \begin{subequations} \begin{multline} (W^{+,\mu}_1 W^{-,\nu}_2 - W^{+,\nu}_1 W^{-,\mu}_2) (W^+_{3,\mu} W^-_{4,\nu} - W^+_{3,\nu} W^-_{4,\mu}) \\ = 2(W^+_1W^+_3)(W^-_2W^-_4) - 2(W^+_1W^-_4)(W^-_2W^+_3) \end{multline} also ($V$ can be $A$ or $Z$) \begin{multline} (W^{+,\mu}_1 V^\nu_2 - W^{+,\nu}_1 V^\mu_2) (W^-_{3,\mu} V_{4,\nu} - W^-_{3,\nu} V_{4,\mu}) \\ = 2(W^+_1W^-_3)(V_2V_4) - 2(W^+_1V_4)(V_2W^-_3) \end{multline} \end{subequations} *) (* \begin{subequations} \begin{multline} W^{+,\mu} W^{-,\nu} W^+_\mu W^-_\nu \end{multline} \end{subequations} *) let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2 ] (* \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \left( \frac{g^4}{2}\left( (W^+_\mu W^{-,\mu})^2 + W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} \right)\right.\notag \\ &\qquad\qquad\qquad \left. + \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \\ \mathcal{L}_5 &= \alpha_5 \left( g^4 (W^+_\mu W^{-,\mu})^2 + \frac{g^4}{\cos^2\theta_w} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \end{align} \end{subequations} or \begin{multline} \mathcal{L}_4 + \mathcal{L}_5 = (\alpha_4+2\alpha_5) g^4 \frac{1}{2} (W^+_\mu W^{-,\mu})^2 \\ + 2\alpha_4 g^4 \frac{1}{4} W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} + \alpha_4 \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu \\ + 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \frac{1}{2} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \frac{1}{8} (Z_\mu Z^\mu)^2 \end{multline} and therefore \begin{subequations} \begin{align} \alpha_{(WW)_0} &= (\alpha_4+2\alpha_5) g^4 \\ \alpha_{(WW)_2} &= 2\alpha_4 g^4 \\ \alpha_{(WZ)_0} &= 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{(WZ)_1} &= \alpha_4 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{ZZ} &= (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \end{align} \end{subequations} *) let anomalous_quartic_gauge = if Flags.quartic_anom then List.map qgc [ ((Wm, Wm, Wp, Wp), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4 [1, C_12_34], Alpha_WWWW2); ((Z, Z, Z, Z), Vector4 [(1, C_12_34); (1, C_13_42); (1, C_14_23)], Alpha_ZZZZ); ((Wm, Wp, Z, Z), Vector4 [1, C_12_34], Alpha_ZZWW0); ((Wm, Wp, Z, Z), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_ZZWW1)] @ (if Flags.k_matrix_tm then List.map qgc [((Wm, Wm, Wp, Wp), Dim8_Vector4_t_0 [1, C_13_42], FT0_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_0 [1, C_14_23], FT0_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_0 [1, C_12_34], FT0_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_1 [1, C_13_42], FT1_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_1 [1, C_14_23], FT1_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_1 [1, C_12_34], FT1_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_2 [1, C_13_42], FT2_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_2 [1, C_14_23], FT2_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_t_2 [1, C_12_34], FT2_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_0 [1, C_13_42], FM0_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_0 [1, C_14_23], FM0_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_0 [1, C_12_34], FM0_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_1 [1, C_13_42], FM1_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_1 [1, C_14_23], FM1_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_1 [1, C_12_34], FM1_WWWW2); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_7 [1, C_13_42], FM7_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_7 [1, C_14_23], FM7_WWWW0); ((Wm, Wm, Wp, Wp), Dim8_Vector4_m_7 [1, C_12_34], FM7_WWWW2); ((Wm, Wp, Z, Z), Dim8_Vector4_t_0 [1, C_12_34], FT0_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_t_0 [1, C_13_42], FT0_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_0 [1, C_14_23], FT0_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_1 [1, C_12_34], FT1_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_t_1 [1, C_13_42], FT1_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_1 [1, C_14_23], FT1_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_2 [1, C_12_34], FT2_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_t_2 [1, C_13_42], FT2_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_t_2 [1, C_14_23], FT2_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_0 [1, C_12_34], FM0_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_m_0 [1, C_13_42], FM0_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_0 [1, C_14_23], FM0_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_1 [1, C_12_34], FM1_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_m_1 [1, C_13_42], FM1_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_1 [1, C_14_23], FM1_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_7 [1, C_12_34], FM7_ZZWW0); ((Wm, Wp, Z, Z), Dim8_Vector4_m_7 [1, C_13_42], FM7_ZZWW1); ((Wm, Wp, Z, Z), Dim8_Vector4_m_7 [1, C_14_23], FM7_ZZWW1); ((Z, Z, Z, Z), Dim8_Vector4_t_0 [1, C_12_34], FT0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_0 [1, C_13_42], FT0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_0 [1, C_14_23], FT0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_1 [1, C_12_34], FT1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_1 [1, C_13_42], FT1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_1 [1, C_14_23], FT1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_2 [1, C_12_34], FT2_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_2 [1, C_13_42], FT2_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_t_2 [1, C_14_23], FT2_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_0 [1, C_12_34], FM0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_0 [1, C_13_42], FM0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_0 [1, C_14_23], FM0_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_1 [1, C_12_34], FM1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_1 [1, C_13_42], FM1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_1 [1, C_14_23], FM1_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_7 [1, C_12_34], FM7_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_7 [1, C_13_42], FM7_ZZZZ); ((Z, Z, Z, Z), Dim8_Vector4_m_7 [1, C_14_23], FM7_ZZZZ); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_0 [1, C_12_34], FT0_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_0 [1, C_13_42], FT0_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_0 [1, C_14_23], FT0_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_1 [1, C_12_34], FT1_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_1 [1, C_13_42], FT1_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_1 [1, C_14_23], FT1_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_2 [1, C_12_34], FT2_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_2 [1, C_13_42], FT2_AAAA); ((Ga, Ga, Ga, Ga), Dim8_Vector4_t_2 [1, C_14_23], FT2_AAAA); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_0 [1, C_12_34], FT0_AAWW0); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_0 [1, C_13_42], FT0_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_0 [1, C_14_23], FT0_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_1 [1, C_12_34], FT1_AAWW0); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_1 [1, C_13_42], FT1_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_1 [1, C_14_23], FT1_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_2 [1, C_12_34], FT2_AAWW0); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_2 [1, C_13_42], FT2_AAWW1); ((Wm, Wp, Ga, Ga), Dim8_Vector4_t_2 [1, C_14_23], FT2_AAWW1); ((Z, Z, Ga, Ga), Dim8_Vector4_t_0 [1, C_12_34], FT0_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_0 [1, C_13_42], FT0_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_0 [1, C_14_23], FT0_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_1 [1, C_12_34], FT1_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_1 [1, C_13_42], FT1_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_1 [1, C_14_23], FT1_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_2 [1, C_12_34], FT2_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_2 [1, C_13_42], FT2_AAZZ); ((Z, Z, Ga, Ga), Dim8_Vector4_t_2 [1, C_14_23], FT2_AAZZ); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_0 [1, C_12_34], FT0_AZWW0); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_0 [1, C_13_42], FT0_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_0 [1, C_14_23], FT0_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_1 [1, C_12_34], FT1_AZWW0); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_1 [1, C_13_42], FT1_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_1 [1, C_14_23], FT1_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_2 [1, C_12_34], FT2_AZWW0); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_2 [1, C_13_42], FT2_AZWW1); ((Ga, Z, Wp, Wm), Dim8_Vector4_t_2 [1, C_14_23], FT2_AZWW1); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_0 [1, C_12_34], FT0_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_0 [1, C_13_42], FT0_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_0 [1, C_14_23], FT0_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_1 [1, C_12_34], FT1_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_1 [1, C_13_42], FT1_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_1 [1, C_14_23], FT1_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_2 [1, C_12_34], FT2_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_2 [1, C_13_42], FT2_AAAZ); ((Ga, Ga, Ga, Z), Dim8_Vector4_t_2 [1, C_14_23], FT2_AAAZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_0 [1, C_12_34], FT0_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_0 [1, C_13_42], FT0_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_0 [1, C_14_23], FT0_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_1 [1, C_12_34], FT1_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_1 [1, C_13_42], FT1_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_1 [1, C_14_23], FT1_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_2 [1, C_12_34], FT2_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_2 [1, C_13_42], FT2_AZZZ); ((Ga, Z, Z, Z), Dim8_Vector4_t_2 [1, C_14_23], FT2_AZZZ)] else [] ) else [] (* In any diagonal channel~$\chi$, the scattering amplitude~$a_\chi(s)$ is unitary iff\footnote{% Trivial proof: \begin{equation} -1 = \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = \frac{\textrm{Im}(a_\chi^*(s))}{ |a_\chi(s)|^2 } = - \frac{\textrm{Im}(a_\chi(s))}{ |a_\chi(s)|^2 } \end{equation} i.\,e.~$\textrm{Im}(a_\chi(s)) = |a_\chi(s)|^2$.} \begin{equation} \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = -1 \end{equation} For a real perturbative scattering amplitude~$r_\chi(s)$ this can be enforced easily--and arbitrarily--by \begin{equation} \frac{1}{a_\chi(s)} = \frac{1}{r_\chi(s)} - \mathrm{i} \end{equation} *) let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_WWWW2_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZWW0_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_14_23)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_13_42); (1, C_12_34)]), D_Alpha_ZZZZ_T)] else [] let k_matrix_quartic_gauge_t_0 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t0 (2, [(1, C_12_34)]), D_FT0_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t0 (2, [(1, C_13_42)]), D_FT0_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t0 (2, [(1, C_14_23)]), D_FT0_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_ZZZZ_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAAA_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AAAA_U); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAWW0_S); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAWW0_T); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAWW0_U); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAWW1_S); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAWW1_T); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AAWW1_S); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AAWW1_T); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t0 (2, [(1, C_12_34)]), D_FT0_AAWW1_S); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t0 (2, [(1, C_13_42)]), D_FT0_AAWW1_U); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t0 (2, [(1, C_14_23)]), D_FT0_AAWW1_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AAZZ_U); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AAZZ_U); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_12_34)]), D_FT0_AZWW0_S); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_13_42)]), D_FT0_AZWW0_T); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t0 (0, [(1, C_14_23)]), D_FT0_AZWW0_U); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AZWW1_S); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AZWW1_T); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AZWW1_U); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AZWW1_S); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AZWW1_T); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AZWW1_U); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AZWW1_S); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AZWW1_T); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AZWW1_U); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t0 (1, [(1, C_12_34)]), D_FT0_AZWW1_S); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t0 (1, [(1, C_13_42)]), D_FT0_AZWW1_T); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t0 (1, [(1, C_14_23)]), D_FT0_AZWW1_U); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AAAZ_S); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AAAZ_T); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AAAZ_U); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AAAZ_S); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AAAZ_T); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AAAZ_U); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AAAZ_S); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AAAZ_T); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AAAZ_U); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AZZZ_S); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AZZZ_T); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AZZZ_U); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AZZZ_S); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AZZZ_T); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AZZZ_U); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_12_34)]), D_FT0_AZZZ_S); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_13_42)]), D_FT0_AZZZ_T); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t0 (3, [(1, C_14_23)]), D_FT0_AZZZ_U)] else [] let k_matrix_quartic_gauge_t_1 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t1 (2, [(1, C_12_34)]), D_FT1_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t1 (2, [(1, C_13_42)]), D_FT1_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t1 (2, [(1, C_14_23)]), D_FT1_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_ZZZZ_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1(0, [(1, C_12_34)]), D_FT1_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AAAA_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAAA_U); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_AAWW0_S); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AAWW0_T); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AAWW0_U); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_AAWW1_S); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AAWW1_T); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AAWW1_S); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AAWW1_T); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t1 (2, [(1, C_12_34)]), D_FT1_AAWW1_S); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t1 (2, [(1, C_13_42)]), D_FT1_AAWW1_U); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t1 (2, [(1, C_14_23)]), D_FT1_AAWW1_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AAZZ_U); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAZZ_U); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_12_34)]), D_FT1_AZWW0_S); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_13_42)]), D_FT1_AZWW0_T); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t1 (0, [(1, C_14_23)]), D_FT1_AZWW0_U); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AZWW1_S); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AZWW1_T); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AZWW1_U); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AZWW1_S); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AZWW1_T); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AZWW1_U); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AZWW1_S); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AZWW1_T); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AZWW1_U); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t1 (1, [(1, C_12_34)]), D_FT1_AZWW1_S); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t1 (1, [(1, C_13_42)]), D_FT1_AZWW1_T); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t1 (1, [(1, C_14_23)]), D_FT1_AZWW1_U); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAAZ_S); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAAZ_T); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAAZ_U); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAAZ_S); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAAZ_T); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAAZ_U); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AAAZ_S); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AAAZ_T); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AAAZ_U); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AZZZ_S); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AZZZ_T); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AZZZ_U); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AZZZ_S); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AZZZ_T); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AZZZ_U); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_12_34)]), D_FT1_AZZZ_S); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_13_42)]), D_FT1_AZZZ_T); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t1 (3, [(1, C_14_23)]), D_FT1_AZZZ_U)] else [] let k_matrix_quartic_gauge_t_2 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t2 (2, [(1, C_12_34)]), D_FT2_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t2 (2, [(1, C_13_42)]), D_FT2_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t2 (2, [(1, C_14_23)]), D_FT2_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_ZZZZ_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AAAA_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAAA_U); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AAWW0_S); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AAWW0_T); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AAWW0_U); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AAWW1_S); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AAWW1_T); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AAWW1_S); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AAWW1_T); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t2 (2, [(1, C_12_34)]), D_FT2_AAWW1_S); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t2 (2, [(1, C_13_42)]), D_FT2_AAWW1_U); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t2 (2, [(1, C_14_23)]), D_FT2_AAWW1_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AAZZ_U); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAZZ_U); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_12_34)]), D_FT2_AZWW0_S); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_13_42)]), D_FT2_AZWW0_T); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t2 (0, [(1, C_14_23)]), D_FT2_AZWW0_U); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AZWW1_S); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AZWW1_T); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AZWW1_U); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AZWW1_S); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AZWW1_T); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AZWW1_U); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AZWW1_S); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AZWW1_T); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AZWW1_U); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t2 (1, [(1, C_12_34)]), D_FT2_AZWW1_S); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t2 (1, [(1, C_13_42)]), D_FT2_AZWW1_T); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t2 (1, [(1, C_14_23)]), D_FT2_AZWW1_U); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAAZ_S); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAAZ_T); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAAZ_U); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAAZ_S); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAAZ_T); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAAZ_U); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AAAZ_S); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AAAZ_T); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AAAZ_U); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AZZZ_S); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AZZZ_T); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AZZZ_U); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AZZZ_S); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AZZZ_T); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AZZZ_U); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_12_34)]), D_FT2_AZZZ_S); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_13_42)]), D_FT2_AZZZ_T); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t2 (3, [(1, C_14_23)]), D_FT2_AZZZ_U)] else [] let k_matrix_quartic_gauge_t_rsi = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_12_34)]), D_FTrsi_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_13_42)]), D_FTrsi_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_14_23)]), D_FTrsi_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_ZZZZ_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAAA_U); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AAAA_S); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AAAA_T); ((Ga, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AAAA_U); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAWW0_S); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAWW0_T); ((Wm, Wp, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAWW0_U); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAWW1_S); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAWW1_T); ((Wm, Ga, Wp, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AAWW1_S); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AAWW1_U); ((Wp, Ga, Ga, Wm), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AAWW1_T); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_12_34)]), D_FTrsi_AAWW1_S); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_13_42)]), D_FTrsi_AAWW1_U); ((Ga, Wp, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (2, [(1, C_14_23)]), D_FTrsi_AAWW1_T); ((Ga, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAZZ_S); ((Ga, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAZZ_T); ((Ga, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAZZ_U); ((Z, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAZZ_S); ((Z, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAZZ_T); ((Z, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAZZ_U); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AAZZ_S); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AAZZ_T); ((Ga, Ga, Z, Z), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AAZZ_U); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_12_34)]), D_FTrsi_AZWW0_S); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_13_42)]), D_FTrsi_AZWW0_T); ((Ga, Z, Wp, Wm), Vector4_K_Matrix_cf_t_rsi (0, [(1, C_14_23)]), D_FTrsi_AZWW0_U); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AZWW1_S); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AZWW1_T); ((Wp, Ga, Wm, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AZWW1_U); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AZWW1_S); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AZWW1_T); ((Wm, Ga, Wp, Z), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AZWW1_U); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AZWW1_S); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AZWW1_T); ((Z, Wm, Ga, Wp), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AZWW1_U); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_12_34)]), D_FTrsi_AZWW1_S); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_13_42)]), D_FTrsi_AZWW1_T); ((Wp, Z, Wm, Ga), Vector4_K_Matrix_cf_t_rsi (1, [(1, C_14_23)]), D_FTrsi_AZWW1_U); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AAAZ_S); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AAAZ_T); ((Ga, Ga, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AAAZ_U); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AAAZ_S); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AAAZ_T); ((Z, Ga, Ga, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AAAZ_U); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AAAZ_S); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AAAZ_T); ((Ga, Ga, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AAAZ_U); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AZZZ_S); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AZZZ_T); ((Z, Z, Z, Ga), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AZZZ_U); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AZZZ_S); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AZZZ_T); ((Ga, Z, Z, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AZZZ_U); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_12_34)]), D_FTrsi_AZZZ_S); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_13_42)]), D_FTrsi_AZZZ_T); ((Z, Z, Ga, Z), Vector4_K_Matrix_cf_t_rsi (3, [(1, C_14_23)]), D_FTrsi_AZZZ_U)] else [] let k_matrix_quartic_gauge_m_0 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m0 (1, [(1, C_12_34)]), D_FM0_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m0 (1, [(1, C_13_42)]), D_FM0_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m0 (1, [(1, C_14_23)]), D_FM0_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m0 (2, [(1, C_12_34)]), D_FM0_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m0 (2, [(1, C_13_42)]), D_FM0_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m0 (2, [(1, C_14_23)]), D_FM0_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_12_34)]), D_FM0_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_13_42)]), D_FM0_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (0, [(1, C_14_23)]), D_FM0_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (3, [(1, C_14_23)]), D_FM0_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (3, [(1, C_13_42)]), D_FM0_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m0 (3, [(1, C_12_34)]), D_FM0_ZZZZ_U)] else [] let k_matrix_quartic_gauge_m_1 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m1 (1, [(1, C_12_34)]), D_FM1_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m1 (1, [(1, C_13_42)]), D_FM1_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m1 (1, [(1, C_14_23)]), D_FM1_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m1 (2, [(1, C_12_34)]), D_FM1_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m1 (2, [(1, C_13_42)]), D_FM1_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m1 (2, [(1, C_14_23)]), D_FM1_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_12_34)]), D_FM1_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_13_42)]), D_FM1_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (0, [(1, C_14_23)]), D_FM1_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (3, [(1, C_14_23)]), D_FM1_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (3, [(1, C_13_42)]), D_FM1_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m1 (3, [(1, C_12_34)]), D_FM1_ZZZZ_U)] else [] let k_matrix_quartic_gauge_m_7 = if Flags.k_matrix_tm then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_WWWW2_T); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_WWWW2_U); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_ZZWW0_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_ZZWW0_U); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m7 (1, [(1, C_12_34)]), D_FM7_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m7 (1, [(1, C_13_42)]), D_FM7_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_cf_m7 (1, [(1, C_14_23)]), D_FM7_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m7 (2, [(1, C_12_34)]), D_FM7_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m7 (2, [(1, C_13_42)]), D_FM7_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_cf_m7 (2, [(1, C_14_23)]), D_FM7_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_12_34)]), D_FM7_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_13_42)]), D_FM7_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (0, [(1, C_14_23)]), D_FM7_ZZZZ_U); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (3, [(1, C_14_23)]), D_FM7_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (3, [(1, C_13_42)]), D_FM7_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_cf_m7 (3, [(1, C_12_34)]), D_FM7_ZZZZ_U)] else [] let k_matrix_2scalar_2gauge = if Flags.k_matrix_tm then if Flags.higgs_matrix then [ ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (0, [(1, C_12_34)]), D_Alpha_HHZZ0_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (0, [(1, C_13_42)]), D_Alpha_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (0, [(1, C_14_23)]), D_Alpha_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (3, [(1, C_14_23)]), D_Alpha_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (3, [(1, C_13_42)]), D_Alpha_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (3, [(1, C_12_34)]), D_Alpha_HHZZ1_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (6, [(1, C_13_42)]), D_Alpha_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (6, [(1, C_12_34)]), D_Alpha_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_K_Matrix_ms (6, [(1, C_14_23)]), D_Alpha_HHZZ1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (0, [(1, C_12_34)]), D_Alpha_HHWW0_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (2, [(1, C_13_42)]), D_Alpha_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (1, [(1, C_14_23)]), D_Alpha_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (1, [(1, C_13_42)]), D_Alpha_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (2, [(1, C_14_23)]), D_Alpha_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (3, [(1, C_14_23)]), D_Alpha_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (6, [(1, C_13_42)]), D_Alpha_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (4, [(1, C_13_42)]), D_Alpha_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (5, [(1, C_12_34)]), D_Alpha_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (8, [(1, C_14_23)]), D_Alpha_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (7, [(1, C_12_34)]), D_Alpha_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (5, [(1, C_13_42)]), D_Alpha_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (4, [(1, C_12_34)]), D_Alpha_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (7, [(1, C_14_23)]), D_Alpha_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_K_Matrix_ms (8, [(1, C_12_34)]), D_Alpha_HHWW1_U) ] else [] else [] let k_matrix_2scalar_2gauge_m = if Flags.k_matrix_tm then if Flags.higgs_matrix then [ ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (0, [(1, C_12_34)]), D_FM0_HHZZ0_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (0, [(1, C_13_42)]), D_FM0_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (0, [(1, C_14_23)]), D_FM0_HHZZ0_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (3, [(1, C_14_23)]), D_FM0_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (3, [(1, C_13_42)]), D_FM0_HHZZ1_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (3, [(1, C_12_34)]), D_FM0_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (6, [(1, C_13_42)]), D_FM0_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (6, [(1, C_12_34)]), D_FM0_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_0_K_Matrix_cf (6, [(1, C_14_23)]), D_FM0_HHZZ1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (0, [(1, C_12_34)]), D_FM0_HHWW0_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (2, [(1, C_13_42)]), D_FM0_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (1, [(1, C_14_23)]), D_FM0_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (1, [(1, C_13_42)]), D_FM0_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (2, [(1, C_14_23)]), D_FM0_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (3, [(1, C_14_23)]), D_FM0_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (6, [(1, C_13_42)]), D_FM0_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (4, [(1, C_13_42)]), D_FM0_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (5, [(1, C_12_34)]), D_FM0_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (8, [(1, C_14_23)]), D_FM0_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (7, [(1, C_12_34)]), D_FM0_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (5, [(1, C_13_42)]), D_FM0_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (4, [(1, C_12_34)]), D_FM0_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (7, [(1, C_14_23)]), D_FM0_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_0_K_Matrix_cf (8, [(1, C_12_34)]), D_FM0_HHWW1_T) ] else [] else [] let k_matrix_2scalar_2gauge_m_1 = if Flags.k_matrix_tm then if Flags.higgs_matrix then [ ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (0, [(1, C_12_34)]), D_FM1_HHZZ0_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (0, [(1, C_13_42)]), D_FM1_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (0, [(1, C_14_23)]), D_FM1_HHZZ0_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (3, [(1, C_14_23)]), D_FM1_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (3, [(1, C_13_42)]), D_FM1_HHZZ1_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (3, [(1, C_12_34)]), D_FM1_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (6, [(1, C_13_42)]), D_FM1_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (6, [(1, C_12_34)]), D_FM1_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_1_K_Matrix_cf (6, [(1, C_14_23)]), D_FM1_HHZZ1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (0, [(1, C_12_34)]), D_FM1_HHWW0_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (2, [(1, C_13_42)]), D_FM1_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (1, [(1, C_14_23)]), D_FM1_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (1, [(1, C_13_42)]), D_FM1_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (2, [(1, C_14_23)]), D_FM1_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (3, [(1, C_14_23)]), D_FM1_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (6, [(1, C_13_42)]), D_FM1_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (4, [(1, C_13_42)]), D_FM1_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (5, [(1, C_12_34)]), D_FM1_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (8, [(1, C_14_23)]), D_FM1_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (7, [(1, C_12_34)]), D_FM1_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (5, [(1, C_13_42)]), D_FM1_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (4, [(1, C_12_34)]), D_FM1_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (7, [(1, C_14_23)]), D_FM1_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_1_K_Matrix_cf (8, [(1, C_12_34)]), D_FM1_HHWW1_T) ] else [] else [] let k_matrix_2scalar_2gauge_m_7 = if Flags.k_matrix_tm then if Flags.higgs_matrix then [ ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (0, [(1, C_12_34)]), D_FM7_HHZZ0_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (0, [(1, C_13_42)]), D_FM7_HHZZ0_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (0, [(1, C_14_23)]), D_FM7_HHZZ0_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (3, [(1, C_14_23)]), D_FM7_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (3, [(1, C_13_42)]), D_FM7_HHZZ1_U); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (3, [(1, C_12_34)]), D_FM7_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (6, [(1, C_13_42)]), D_FM7_HHZZ1_S); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (6, [(1, C_12_34)]), D_FM7_HHZZ1_T); ((O H,O H,G Z,G Z), DScalar2_Vector2_m_7_K_Matrix_cf (6, [(1, C_14_23)]), D_FM7_HHZZ1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (0, [(1, C_12_34)]), D_FM7_HHWW0_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (2, [(1, C_13_42)]), D_FM7_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (1, [(1, C_14_23)]), D_FM7_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (1, [(1, C_13_42)]), D_FM7_HHWW0_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (2, [(1, C_14_23)]), D_FM7_HHWW0_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (3, [(1, C_14_23)]), D_FM7_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (6, [(1, C_13_42)]), D_FM7_HHWW1_S); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (4, [(1, C_13_42)]), D_FM7_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (5, [(1, C_12_34)]), D_FM7_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (8, [(1, C_14_23)]), D_FM7_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (7, [(1, C_12_34)]), D_FM7_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (5, [(1, C_13_42)]), D_FM7_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (4, [(1, C_12_34)]), D_FM7_HHWW1_T); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (7, [(1, C_14_23)]), D_FM7_HHWW1_U); ((O H,O H,G Wp,G Wm), DScalar2_Vector2_m_7_K_Matrix_cf (8, [(1, C_12_34)]), D_FM7_HHWW1_T) ] else [] else [] let k_matrix_4scalar = if Flags.k_matrix then if Flags.higgs_matrix then [ ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (0, [(1, C_12_34)]), D_Alpha_HHHH_S); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (0, [(1, C_13_42)]), D_Alpha_HHHH_T); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (0, [(1, C_14_23)]), D_Alpha_HHHH_T); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (3, [(1, C_14_23)]), D_Alpha_HHHH_S); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (3, [(1, C_13_42)]), D_Alpha_HHHH_T); ((O H,O H,O H,O H), DScalar4_K_Matrix_ms (3, [(1, C_12_34)]), D_Alpha_HHHH_T) ] else [] else [] (*i Thorsten's original implementation of the K matrix, which we keep since it still might be usefull for the future. let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 2, K_Matrix_Pole 2]), Alpha_WWWW2); ((Wm, Wp, Z, Z), Vector4_K_Matrix_tho (0, [(K_Matrix_Coeff 0, K_Matrix_Pole 0); (K_Matrix_Coeff 2, K_Matrix_Pole 2)]), Alpha_ZZWW0); ((Wm, Z, Wp, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 1, K_Matrix_Pole 1]), Alpha_ZZWW1); ((Z, Z, Z, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_ZZZZ) ] else [] i*) let quartic_gauge = standard_quartic_gauge @ anomalous_quartic_gauge @ k_matrix_quartic_gauge @ k_matrix_quartic_gauge_t_0 @ k_matrix_quartic_gauge_t_1 @ k_matrix_quartic_gauge_t_2 @ k_matrix_quartic_gauge_t_rsi @ k_matrix_quartic_gauge_m_0 @ k_matrix_quartic_gauge_m_1 @ k_matrix_quartic_gauge_m_7 let standard_gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ) ] let standard_gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let dim8_gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_1 1, FS0_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_1 1, FS0_HHZZ; (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_2 1, FS1_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_2 1, FS1_HHZZ ] let dim8_gauge_higgs4_m = [ (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_m_0 1, FM0_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_m_0 1, FM0_HHZZ; (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_m_1 1, FM1_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_m_1 1, FM1_HHZZ; (O H, O H, G Wp, G Wm), Dim8_Scalar2_Vector2_m_7 1, FM7_HHWW; (O H, O H, G Z, G Z), Dim8_Scalar2_Vector2_m_7 1, FM7_HHZZ] let standard_higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let standard_higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let fs_higgs4 = [ (O H, O H, O H, O H), Dim8_Scalar4 1, FS_H4 ] (* WK's couplings (apparently, he still intends to divide by $\Lambda^2_{\text{EWSB}}=16\pi^2v_{\mathrm{F}}^2$): \begin{subequations} \begin{align} \mathcal{L}^{\tau}_4 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) + \frac{g^2v_{\mathrm{F}}^2}{4} V_{\mu} V^{\mu} \right\rbrack^2 \\ \mathcal{L}^{\tau}_5 &= \left\lbrack (\partial_{\mu}H)(\partial_{\nu}H) + \frac{g^2v_{\mathrm{F}}^2}{4} V_{\mu} V_{\nu} \right\rbrack^2 \end{align} \end{subequations} with \begin{equation} V_{\mu} V_{\nu} = \frac{1}{2} \left( W^+_{\mu} W^-_{\nu} + W^+_{\nu} W^-_{\mu} \right) + \frac{1}{2\cos^2\theta_{w}} Z_{\mu} Z_{\nu} \end{equation} (note the symmetrization!), i.\,e. \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V_{\nu})^2 \\ \mathcal{L}_5 &= \alpha_5 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V^{\mu})^2 \end{align} \end{subequations} *) (* Breaking thinks up \begin{subequations} \begin{align} \mathcal{L}^{\tau,H^4}_4 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) \right\rbrack^2 \\ \mathcal{L}^{\tau,H^4}_5 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) \right\rbrack^2 \end{align} \end{subequations} and \begin{subequations} \begin{align} \mathcal{L}^{\tau,H^2V^2}_4 &= \frac{g^2v_{\mathrm{F}}^2}{2} (\partial_{\mu}H)(\partial^{\mu}H) V_{\mu}V^{\mu} \\ \mathcal{L}^{\tau,H^2V^2}_5 &= \frac{g^2v_{\mathrm{F}}^2}{2} (\partial_{\mu}H)(\partial_{\nu}H) V_{\mu}V_{\nu} \end{align} \end{subequations} i.\,e. \begin{subequations} \begin{align} \mathcal{L}^{\tau,H^2V^2}_4 &= \frac{g^2v_{\mathrm{F}}^2}{2} \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) W^+_{\nu}W^{-,\nu} + \frac{1}{2\cos^2\theta_{w}} (\partial_{\mu}H)(\partial^{\mu}H) Z_{\nu} Z^{\nu} \right\rbrack \\ \mathcal{L}^{\tau,H^2V^2}_5 &= \frac{g^2v_{\mathrm{F}}^2}{2} \left\lbrack (W^{+,\mu}\partial_{\mu}H) (W^{-,\nu}\partial_{\nu}H) + \frac{1}{2\cos^2\theta_{w}} (Z^{\mu}\partial_{\mu}H)(Z^{\nu}\partial_{\nu}H) \right\rbrack \end{align} \end{subequations} *) (* \begin{multline} \tau^4_8 \mathcal{L}^{\tau,H^2V^2}_4 + \tau^5_8 \mathcal{L}^{\tau,H^2V^2}_5 = \\ - \frac{g^2v_{\mathrm{F}}^2}{2} \Biggl\lbrack 2\tau^4_8 \frac{1}{2}(\ii\partial_{\mu}H)(\ii\partial^{\mu}H) W^+_{\nu}W^{-,\nu} + \tau^5_8 (W^{+,\mu}\ii\partial_{\mu}H) (W^{-,\nu}\ii\partial_{\nu}H) \\ + \frac{2\tau^4_8}{\cos^2\theta_{w}} \frac{1}{4} (\ii\partial_{\mu}H)(\ii\partial^{\mu}H) Z_{\nu} Z^{\nu} + \frac{\tau^5_8}{\cos^2\theta_{w}} \frac{1}{2} (Z^{\mu}\ii\partial_{\mu}H)(Z^{\nu}\ii\partial_{\nu}H) \Biggr\rbrack \end{multline} where the two powers of $\ii$ make the sign conveniently negative, i.\,e. \begin{subequations} \begin{align} \alpha_{(\partial H)^2W^2}^2 &= \tau^4_8 g^2v_{\mathrm{F}}^2\\ \alpha_{(\partial HW)^2}^2 &= \frac{\tau^5_8 g^2v_{\mathrm{F}}^2}{2} \\ \alpha_{(\partial H)^2Z^2}^2 &= \frac{\tau^4_8 g^2v_{\mathrm{F}}^2}{\cos^2\theta_{w}} \\ \alpha_{(\partial HZ)^2}^2 &=\frac{\tau^5_8 g^2v_{\mathrm{F}}^2}{2\cos^2\theta_{w}} \end{align} \end{subequations} *) let anomalous_gauge_higgs = [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa_anom; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ_anom; (O H, G Z, G Z), Dim5_Scalar_Gauge2 1, G_HZZ_anom; (O H, G Wp, G Wm), Dim5_Scalar_Gauge2 1, G_HWW_anom; (O H, G Ga, G Z), Dim5_Scalar_Vector_Vector_U 1, G_HGaZ_u; (O H, G Z, G Z), Dim5_Scalar_Vector_Vector_U 1, G_HZZ_u; (O H, G Wp, G Wm), Dim5_Scalar_Vector_Vector_U 1, G_HWW_u; (O H, G Wm, G Wp), Dim5_Scalar_Vector_Vector_U 1, G_HWW_u ] let anomalous_gauge_higgs4 = [] let anomalous_higgs = [] let higgs_triangle_vertices = if Flags.higgs_triangle then [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ; (O H, G Gl, G Gl), Dim5_Scalar_Gauge2 1, G_Hgg ] else [] let anomalous_higgs4 = [] let gauge_higgs = if Flags.higgs_anom then standard_gauge_higgs @ anomalous_gauge_higgs else standard_gauge_higgs let gauge_higgs4 = ( if Flags.higgs_anom then standard_gauge_higgs4 @ anomalous_gauge_higgs4 else standard_gauge_higgs4 ) @ ( if Flags.higgs_matrix then (dim8_gauge_higgs4 @ dim8_gauge_higgs4_m @ k_matrix_2scalar_2gauge @ k_matrix_2scalar_2gauge_m @ k_matrix_2scalar_2gauge_m_1 @ k_matrix_2scalar_2gauge_m_7) else [] ) let higgs = if Flags.higgs_anom then standard_higgs @ anomalous_higgs else standard_higgs let higgs4 = ( if Flags.higgs_anom then standard_higgs4 @ anomalous_higgs4 else standard_higgs4 ) @ ( if Flags.higgs_matrix then (fs_higgs4 @ k_matrix_4scalar ) else [] ) let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] (* New Resonances *) (* \begin{dubious} There is an extra minus in the Lagrangian to have the same sign as HWW or HZZ vertex. Effectivly this doesn't matter for SSC, because $(-1)^2=1$. This is only for completeness. \end{dubious} \begin{subequations} \begin{align} \mathbf{V}_\mu &= -\mathrm{i} g\mathbf{W}_\mu+\mathrm{i} g^\prime\mathbf{B}_\mu \\ \mathbf{W}_\mu &= W_\mu^a\frac{\tau^a}{2} \\ \mathbf{B}_\mu &= W_\mu^a\frac{\tau^3}{2} \\ \tau^{++}&= \tau^+ \otimes \tau^+ \\ \tau^+ &= \frac{1}{2} \left (\tau^+ \otimes \tau^3 + \tau^3+\tau^+ \right ) \\ \tau^0 &= \frac{1}{\sqrt{6}} \left (\tau^3\otimes\tau^3 -\tau^+ \otimes \tau^- - \tau^-+\tau^+ \right ) \\ \tau^- &= \frac{1}{2} \left (\tau^- \otimes \tau^3 + \tau^3+\tau^- \right ) \\ \tau^{--}&= \tau^- \otimes \tau^- \end{align} \end{subequations} *) (* Scalar Isoscalar Old representation \begin{equation} \mathcal{L}_{\sigma}= -\frac{g_\sigma v}{2} \text{tr} \left\lbrack \mathbf{V}_\mu \mathbf{V}^\mu \right\rbrack \sigma \end{equation} *) (* \begin{dubious} Transversal couplings like rsigma3t and rf3t are to be calculated in the new higgs matrix representation. \end{dubious} *) let rsigma3 = [ ((O Rsigma, G Wp, G Wm), Scalar_Vector_Vector 1, G_SWW); ((O Rsigma, G Z, G Z), Scalar_Vector_Vector 1, G_SZZ) ] let rsigma3h = [ ((O Rsigma, O H, O H), Dim5_Scalar_Scalar2 1, G_SHH) ] let rsigma3t = [ ((O Rsigma, G Wp, G Wm), Scalar_Vector_Vector_t 1, G_SWW_T); ((O Rsigma, G Z, G Z), Scalar_Vector_Vector_t 1, G_SZZ_T); ((O Rsigma, G Ga, G Ga), Scalar_Vector_Vector_t 1, G_SAA_T); ((O Rsigma, G Ga, G Z), Scalar_Vector_Vector_t 1, G_SAZ_T) ] let rsigma4 = [ (O Rsigma, O Rsigma, G Wp, G Wm), Scalar2_Vector2 1, G_SSWW; (O Rsigma, O Rsigma, G Z, G Z), Scalar2_Vector2 1, G_SSZZ ] (* Scalar Isotensor \begin{subequations} \begin{align} \mathcal{L}_{\phi}&= \frac{g_\phi v}{4} \text{Tr} \left \lbrack \left ( \mathbf{V}_\mu \otimes \mathbf{V}^\mu - \frac{\tau^{aa}}{6} \text{Tr} \left \lbrack \mathbf{V}_\mu \mathbf{V}^\mu \right \rbrack\right ) {\mathbf{\phi}} \right \rbrack\\ \phi&=\sqrt{2} \left (\phi^{++}\tau^{++}+\phi^+\tau^++\phi^0\tau^0+\phi^-\tau^- + \phi^{--}\tau^{--} \right ) \end{align} \end{subequations} *) let rphi3 = [ ((O Rphin, G Wp, G Wm), Scalar_Vector_Vector 1, G_PNWW); ((O Rphin, G Z, G Z), Scalar_Vector_Vector 1, G_PNZZ) ; ((O Rphisn, G Wp, G Wm), Scalar_Vector_Vector 1, G_PSNWW); ((O Rphisn, G Z, G Z), Scalar_Vector_Vector 1, G_PSNZZ) ; ((O Rphip, G Z, G Wm), Scalar_Vector_Vector 1, G_PWZ) ; ((O Rphipp, G Wm, G Wm), Scalar_Vector_Vector 1, G_PWW) ; ((O Rphim, G Wp, G Z), Scalar_Vector_Vector 1, G_PWZ) ; ((O Rphimm, G Wp, G Wp), Scalar_Vector_Vector 1, G_PWW) ] let rphi3h = [ ((O Rphisn, O H, O H), Dim5_Scalar_Scalar2 1, G_PSNHH) ] (* Tensor IsoScalar *) let rf3 = [ ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector_1 1, G_FWW); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector_1 1, G_FZZ) ] let rf3cf = [ ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector 1, G_FWW); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector 1, G_FZZ); ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector_cf 1, G_FWW_CF); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector_cf 1, G_FZZ_CF) ] let rff3cf = [ ((O Rff, G Wp, G Wm), Tensor_2_Vector_Vector 1, G_FFWW); ((O Rff, G Z, G Z), Tensor_2_Vector_Vector 1, G_FFZZ); ((O Rff, G Wp, G Wm), Tensor_2_Vector_Vector_cf 1, G_FFWW_CF); ((O Rff, G Z, G Z), Tensor_2_Vector_Vector_cf 1, G_FFZZ_CF) ] let rfv3cf = [ ((O Rfv, G Wp, G Wm), TensorVector_Vector_Vector 1, G_FVWW); ((O Rfv, G Z, G Z), TensorVector_Vector_Vector 1, G_FVZZ); ((O Rfv, G Wp, G Wm), TensorVector_Vector_Vector_cf 1, G_FVWW_CF); ((O Rfv, G Z, G Z), TensorVector_Vector_Vector_cf 1, G_FVZZ_CF) ] let rfddphi3cf = [ ((O Rfphi, G Wp, G Wm), TensorScalar_Vector_Vector 1, G_FDDSWW); ((O Rfphi, G Z, G Z), TensorScalar_Vector_Vector 1, G_FDDSZZ); ((O Rfphi, G Wp, G Wm), TensorScalar_Vector_Vector_cf 1, G_FDDSWW_CF); ((O Rfphi, G Z, G Z), TensorScalar_Vector_Vector_cf 1, G_FDDSZZ_CF) ] let rfphi3cf = [ ((O Rfphi, G Wp, G Wm), Scalar_Vector_Vector 1, G_FSWW); ((O Rfphi, G Z, G Z), Scalar_Vector_Vector 1, G_FSZZ) ] let rf3h = [ ((O Rf, O H, O H), Tensor_2_Scalar_Scalar 1, G_FHH); ((O Rf, O H, O H), Tensor_2_Scalar_Scalar_cf 1, G_FHH_CF) ] let rff3h = [ ((O Rff, O H, O H), Tensor_2_Scalar_Scalar 1, G_FFHH); ((O Rff, O H, O H), Tensor_2_Scalar_Scalar_cf 1, G_FFHH_CF); ((O Rfv, O H, O H), TensorVector_Scalar_Scalar 1, G_FVHH); ((O Rfv, O H, O H), TensorVector_Scalar_Scalar_cf 1, G_FVHH_CF); ((O Rfphi, O H, O H), TensorScalar_Scalar_Scalar 1, G_FDDSHH); ((O Rfphi, O H, O H), TensorScalar_Scalar_Scalar_cf 1, G_FDDSHH_CF); ((O Rfphi, O H, O H), Dim5_Scalar_Scalar2 1, G_FSHH) ] let rf3t = [ ((O Rf, G Wp, G Wm), Tensor_2_Vector_Vector_t 1, G_FWW_T); ((O Rf, G Z, G Z), Tensor_2_Vector_Vector_t 1, G_FZZ_T) ] (* Tensor Isotensor \begin{subequations} \begin{align} \mathcal{L}_{t} \end{align} \end{subequations} *) let rt3 = [ ((O Rtn, G Wp, G Wm), Tensor_2_Vector_Vector_1 1, G_TNWW); ((O Rtn, G Z, G Z), Tensor_2_Vector_Vector_1 1, G_TNZZ) ; ((O Rtsn, G Wp, G Wm), Tensor_2_Vector_Vector_1 1, G_TSNWW); ((O Rtsn, G Z, G Z), Tensor_2_Vector_Vector_1 1, G_TSNZZ) ; ((O Rtp, G Z, G Wm), Tensor_2_Vector_Vector_1 1, G_TWZ) ; ((O Rtpp, G Wm, G Wm), Tensor_2_Vector_Vector_1 1, G_TWW) ; ((O Rtm, G Wp, G Z), Tensor_2_Vector_Vector_1 1, G_TWZ) ; ((O Rtmm, G Wp, G Wp), Tensor_2_Vector_Vector_1 1, G_TWW) ] let rt3cf = [ ((O Rtn, G Wp, G Wm), Tensor_2_Vector_Vector 1, G_TNWW); ((O Rtn, G Z, G Z), Tensor_2_Vector_Vector 1, G_TNZZ) ; ((O Rtsn, G Wp, G Wm), Tensor_2_Vector_Vector 1, G_TSNWW); ((O Rtsn, G Z, G Z), Tensor_2_Vector_Vector 1, G_TSNZZ) ; ((O Rtp, G Z, G Wm), Tensor_2_Vector_Vector 1, G_TWZ) ; ((O Rtpp, G Wm, G Wm), Tensor_2_Vector_Vector 1, G_TWW) ; ((O Rtm, G Wp, G Z), Tensor_2_Vector_Vector 1, G_TWZ) ; ((O Rtmm, G Wp, G Wp), Tensor_2_Vector_Vector 1, G_TWW); ((O Rtn, G Wp, G Wm), Tensor_2_Vector_Vector_cf 1, G_TNWW_CF); ((O Rtn, G Z, G Z), Tensor_2_Vector_Vector_cf 1, G_TNZZ_CF) ; ((O Rtsn, G Wp, G Wm), Tensor_2_Vector_Vector_cf 1, G_TSNWW_CF); ((O Rtsn, G Z, G Z), Tensor_2_Vector_Vector_cf 1, G_TSNZZ_CF) ; ((O Rtp, G Z, G Wm), Tensor_2_Vector_Vector_cf 1, G_TWZ_CF) ; ((O Rtpp, G Wm, G Wm), Tensor_2_Vector_Vector_cf 1, G_TWW_CF) ; ((O Rtm, G Wp, G Z), Tensor_2_Vector_Vector_cf 1, G_TWZ_CF) ; ((O Rtmm, G Wp, G Wp), Tensor_2_Vector_Vector_cf 1, G_TWW_CF) ] (* Anomalous trilinear interactions $f_i f_j V$ and $ttH$: \begin{equation} \Delta\mathcal{L}_{tt\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{t} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) t A_\mu \end{equation} *) let anomalous_ttA = if Flags.top_anom then [ ((M (U (-3)), G Ga, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bb\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{b} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) b A_\mu \end{equation} *) let anomalous_bbA = if Flags.top_anom then [ ((M (D (-3)), G Ga, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttg} = - g_s \frac{\upsilon}{\Lambda^2} \bar{t}\lambda^a i\sigma^{\mu\nu}k_\nu (d_V(k^2)+id_A(k^2)\gamma_5)tG^a_\mu \end{equation} *) let anomalous_ttG = if Flags.top_anom then [ ((M (U (-3)), G Gl, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttG) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{t} \fmslash{Z} (X_L(k^2) P_L + X_R(k^2) P_R) t + \bar{t}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)tZ_\mu\right\rbrack \end{equation} *) let anomalous_ttZ = if Flags.top_anom then [ ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_ttZ); ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2} \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)bZ_\mu \end{equation} *) let anomalous_bbZ = if Flags.top_anom then [ ((M (D (-3)), G Z, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbW} = - \frac{g}{\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\fmslash{W}^-(V_L(k^2) P_L+V_R(k^2) P_R) t + \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)tW^-_\mu\right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbW = if Flags.top_anom then [ ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_tbW); ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, TLRM, Psi), G_TLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, TRLM, Psi), G_TRL_tbW) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttH} = - \frac{1}{\sqrt{2}} \bar{t} (Y_V(k^2)+iY_A(k^2)\gamma_5)t H \end{equation} *) let anomalous_ttH = if Flags.top_anom then [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, SPM, Psi), G_SP_ttH) ] else [] (* quartic fermion-gauge interactions $f_i f_j V_1 V_2$ emerging from gauge-invariant effective operators: \begin{equation} \Delta\mathcal{L}_{ttgg} = - \frac{g_s^2}{2} f_{abc} \frac{\upsilon}{\Lambda^2} \bar{t} \lambda^a \sigma^{\mu\nu} (d_V(k^2)+id_A(k^2)\gamma_5)t G^b_\mu G^c_\nu \end{equation} *) let anomalous_ttGG = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,1,0,true,TTGG)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttGG); ((O (Aux_top (2,1,0,false,TTGG)), G Gl, G Gl), Aux_Gauge_Gauge 1, I_Gs) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWA} = - i\sin\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t A_\mu W^-_\nu \right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbWA = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWA)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWA); ((O (Aux_top (2,0,1,false,TBWA)), G Ga, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWA)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWA); ((O (Aux_top (2,0,-1,false,TBWA)), G Wp, G Ga), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWZ} = - i\cos\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t Z_\mu W^-_\nu \right\rbrack + \textnormal{H.c.} \end{equation} *) let anomalous_tbWZ = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWZ)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWZ); ((O (Aux_top (2,0,1,false,TBWZ)), G Z, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWZ)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWZ); ((O (Aux_top (2,0,-1,false,TBWZ)), G Wp, G Z), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{t} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)t W^-_\mu W^+_\nu \end{equation} *) let anomalous_ttWW = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,0,0,true,TTWW)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttWW); ((O (Aux_top (2,0,0,false,TTWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{b} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)b W^-_\mu W^+_\nu \end{equation} *) let anomalous_bbWW = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,0,true,BBWW)), M (D 3)), FBF (1, Psibar, TVA, Psi), G_TVA_bbWW); ((O (Aux_top (2,0,0,false,BBWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* 4-fermion contact terms emerging from operator rewriting: *) let anomalous_top_qGuG_tt = [ ((M (U (-3)), O (Aux_top (1,1,0,true,QGUG)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qGuG) ] let anomalous_top_qGuG_ff n = List.map mom [ ((U (-n), Aux_top (1,1,0,false,QGUG), U n), FBF (1, Psibar, V, Psi), Unit); ((D (-n), Aux_top (1,1,0,false,QGUG), D n), FBF (1, Psibar, V, Psi), Unit) ] let anomalous_top_qGuG = if Flags.top_anom_4f then anomalous_top_qGuG_tt @ ThoList.flatmap anomalous_top_qGuG_ff [1;2;3] else [] let anomalous_top_qBuB_tt = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QBUB)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB) ] let anomalous_top_qBuB_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QBUB), U n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_u); ((D (-n), Aux_top (1,0,0,false,QBUB), D n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_d); ((L (-n), Aux_top (1,0,0,false,QBUB), L n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_e); ((N (-n), Aux_top (1,0,0,false,QBUB), N n), FBF (1, Psibar, VL, Psi), G_VL_qBuB_n) ] let anomalous_top_qBuB = if Flags.top_anom_4f then anomalous_top_qBuB_tt @ ThoList.flatmap anomalous_top_qBuB_ff [1;2;3] else [] let anomalous_top_qW_tq = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (D (-3)), O (Aux_top (1,0,-1,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (U (-3)), O (Aux_top (1,0,1,true,QW)), M (D 3)), FBF (1, Psibar, VL, Psi), G_VL_qW) ] let anomalous_top_qW_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QW), U n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((D (-n), Aux_top (1,0,0,false,QW), D n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((N (-n), Aux_top (1,0,0,false,QW), N n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((L (-n), Aux_top (1,0,0,false,QW), L n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((D (-n), Aux_top (1,0,-1,false,QW), U n), FBF (1, Psibar, VL, Psi), Half); ((U (-n), Aux_top (1,0,1,false,QW), D n), FBF (1, Psibar, VL, Psi), Half); ((L (-n), Aux_top (1,0,-1,false,QW), N n), FBF (1, Psibar, VL, Psi), Half); ((N (-n), Aux_top (1,0,1,false,QW), L n), FBF (1, Psibar, VL, Psi), Half) ] let anomalous_top_qW = if Flags.top_anom_4f then anomalous_top_qW_tq @ ThoList.flatmap anomalous_top_qW_ff [1;2;3] else [] let anomalous_top_DuDd = if Flags.top_anom_4f then [ ((M (U (-3)), O (Aux_top (0,0,0,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,0,false,DR)), M (U 3)), FBF (1, Psibar, SL, Psi), G_SL_DttR); ((M (D (-3)), O (Aux_top (0,0,0,false,DR)), M (D 3)), FBF (1, Psibar, SR, Psi), G_SR_DttR); ((M (U (-3)), O (Aux_top (0,0,0,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (D (-3)), O (Aux_top (0,0,0,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DttL); ((M (D (-3)), O (Aux_top (0,0,-1,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DR)), M (D 3)), FBF (1, Psibar, SLR, Psi), G_SLR_DbtR); ((M (D (-3)), O (Aux_top (0,0,-1,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DbtL) ] else [] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ (if Flags.ckm_present then charged_currents_ckm else charged_currents_triv) @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ higgs_triangle_vertices @ goldstone_vertices @ rsigma3 @ rsigma3t @ rphi3 @ ( if Flags.cf_arbitrary then ( rt3cf @ rff3cf @ rfv3cf @ rfphi3cf @ rfddphi3cf ) else (rf3 @ rt3 ) ) @ rf3t @ ( if Flags.higgs_matrix then (rsigma3h @ rff3h ) else [] ) @ anomalous_ttA @ anomalous_bbA @ anomalous_ttZ @ anomalous_bbZ @ anomalous_tbW @ anomalous_tbWA @ anomalous_tbWZ @ anomalous_ttWW @ anomalous_bbWW @ anomalous_ttG @ anomalous_ttGG @ anomalous_ttH @ anomalous_top_qGuG @ anomalous_top_qBuB @ anomalous_top_qW @ anomalous_top_DuDd) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | "Rsigma" -> O Rsigma | "Rphi0" -> O Rphin | "Rphis0" -> O Rphisn | "Rphi+" -> O Rphip | "Rphi-" -> O Rphim | "Rphi++" -> O Rphip | "Rphi--" -> O Rphimm | "Rf" -> O Rf | "Rff" -> O Rff | "Rfv" -> O Rfv | "Rfphi" -> O Rfphi | "Rt0" -> O Rtn | "Rts0" -> O Rtsn | "Rt+" -> O Rtp | "Rt-" -> O Rtm | "Rt++" -> O Rtp | "Rt--" -> O Rtmm | "Aux_t_ttGG0" -> O (Aux_top (2,1, 0,true,TTGG)) | "Aux_ttGG0" -> O (Aux_top (2,1, 0,false,TTGG)) | "Aux_t_tbWA+" -> O (Aux_top (2,0, 1,true,TBWA)) | "Aux_tbWA+" -> O (Aux_top (2,0, 1,false,TBWA)) | "Aux_t_tbWA-" -> O (Aux_top (2,0,-1,true,TBWA)) | "Aux_tbWA-" -> O (Aux_top (2,0,-1,false,TBWA)) | "Aux_t_tbWZ+" -> O (Aux_top (2,0, 1,true,TBWZ)) | "Aux_tbWZ+" -> O (Aux_top (2,0, 1,false,TBWZ)) | "Aux_t_tbWZ-" -> O (Aux_top (2,0,-1,true,TBWZ)) | "Aux_tbWZ-" -> O (Aux_top (2,0,-1,false,TBWZ)) | "Aux_t_ttWW0" -> O (Aux_top (2,0, 0,true,TTWW)) | "Aux_ttWW0" -> O (Aux_top (2,0, 0,false,TTWW)) | "Aux_t_bbWW0" -> O (Aux_top (2,0, 0,true,BBWW)) | "Aux_bbWW0" -> O (Aux_top (2,0, 0,false,BBWW)) | "Aux_t_qGuG0" -> O (Aux_top (1,1, 0,true,QGUG)) | "Aux_qGuG0" -> O (Aux_top (1,1, 0,false,QGUG)) | "Aux_t_qBuB0" -> O (Aux_top (1,0, 0,true,QBUB)) | "Aux_qBuB0" -> O (Aux_top (1,0, 0,false,QBUB)) | "Aux_t_qW0" -> O (Aux_top (1,0, 0,true,QW)) | "Aux_qW0" -> O (Aux_top (1,0, 0,false,QW)) | "Aux_t_qW+" -> O (Aux_top (1,0, 1,true,QW)) | "Aux_qW+" -> O (Aux_top (1,0, 1,false,QW)) | "Aux_t_qW-" -> O (Aux_top (1,0,-1,true,QW)) | "Aux_qW-" -> O (Aux_top (1,0,-1,false,QW)) | "Aux_t_dL0" -> O (Aux_top (0,0, 0,true,DL)) | "Aux_dL0" -> O (Aux_top (0,0, 0,false,DL)) | "Aux_t_dL+" -> O (Aux_top (0,0, 1,true,DL)) | "Aux_dL+" -> O (Aux_top (0,0, 1,false,DL)) | "Aux_t_dL-" -> O (Aux_top (0,0,-1,true,DL)) | "Aux_dL-" -> O (Aux_top (0,0,-1,false,DL)) | "Aux_t_dR0" -> O (Aux_top (0,0, 0,true,DR)) | "Aux_dR0" -> O (Aux_top (0,0, 0,false,DR)) | "Aux_t_dR+" -> O (Aux_top (0,0, 1,true,DR)) | "Aux_dR+" -> O (Aux_top (0,0, 1,false,DR)) | "Aux_t_dR-" -> O (Aux_top (0,0,-1,true,DR)) | "Aux_dR-" -> O (Aux_top (0,0,-1,false,DR)) | _ -> invalid_arg "Modellib_BSM.SSC_AltT.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib_BSM.SSC_AltT.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib_BSM.SSC_AltT.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_BSM.SSC_AltT.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_BSM.SSC_AltT.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "gl" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Rsigma -> "Rsigma" | Rphin -> "Rphin" | Rphip -> "Rphi+" | Rphim -> "Rphi-" | Rphipp -> "Rphi++" | Rphimm -> "Rphi--" | Rphisn -> "Rphisn" | Rf -> "Rf" | Rff -> "Rff" | Rfv -> "Rfv" | Rfphi -> "Rfphi" | Rtn -> "Rtn" | Rtsn -> "Rtsn" | Rtp -> "Rt+" | Rtm -> "Rt-" | Rtpp -> "Rt++" | Rtmm -> "Rt--" | Aux_top (_,_,ch,n,v) -> "Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" end ) ^ ( if ch > 0 then "+" else if ch < 0 then "-" else "0" ) end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib_BSM.SSC_AltT.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib_BSM.SSC_AltT.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib_BSM.SSC_AltT.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib_BSM.SSC_AltT.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H -> "H" | Rsigma -> "\\sigma" | Rphip -> "\\phi^+" | Rphim -> "\\phi^-" | Rphin -> "\\phi^0" | Rphisn -> "\\phi_s^0" | Rphipp -> "\\phi^{++}" | Rphimm -> "\\phi^{--}" | Rf -> "f" | Rff -> "f^f" | Rfv -> "f^v" | Rfphi -> "f^s" | Rtp -> "t^+" | Rtm -> "t^-" | Rtn -> "t^0" | Rtsn -> "t_s^0" | Rtpp -> "t^{++}" | Rtmm -> "t^{--}" | Aux_top (_,_,ch,n,v) -> "\\textnormal{Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" end ) ^ ( if ch > 0 then "^+" else if ch < 0 then "^-" else "^0" ) ^ "}" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | Rsigma -> "rsi" | Rphip -> "rpp" | Rphim -> "rpm" | Rphin -> "rpn" | Rphisn -> "rpsn" | Rphipp -> "rppp" | Rphimm -> "rpmm" | Rf -> "rf" | Rff -> "rff" | Rfv -> "rfv" | Rfphi -> "rfphi" | Rtp -> "rtp" | Rtm -> "rtm" | Rtn -> "rtn" | Rtsn -> "rtsn" | Rtpp -> "rtpp" | Rtmm -> "rtmm" | Aux_top (_,_,ch,n,v) -> "aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttgg" | TBWA -> "tbwa" | TBWZ -> "tbwz" | TTWW -> "ttww" | BBWW -> "bbww" | QGUG -> "qgug" | QBUB -> "qbub" | QW -> "qw" | DL -> "dl" | DR -> "dr" end ) ^ "_" ^ ( if ch > 0 then "p" else if ch < 0 then "m" else "0" ) end (* Introducing new Resonances from 45, there are no PDG values *) let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | Rsigma -> 45 | Rphin -> 46 | Rphip | Rphim -> 47 | Rphipp | Rphimm -> 48 | Rphisn -> 49 | Rf -> 52 | Rtn -> 53 | Rtp | Rtm -> 54 | Rtpp | Rtmm -> 55 | Rff -> 56 | Rfv -> 57 | Rfphi -> 58 | Rtsn -> 59 | Aux_top (_,_,_,_,_) -> 81 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Half -> "half" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | I_G_weak -> "ig" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_TVA_ttA -> "gtva_tta" | G_TVA_bbA -> "gtva_bba" | G_VLR_ttZ -> "gvlr_ttz" | G_TVA_ttZ -> "gtva_ttz" | G_TVA_bbZ -> "gtva_bbz" | G_VLR_btW -> "gvlr_btw" | G_VLR_tbW -> "gvlr_tbw" | G_TLR_btW -> "gtlr_btw" | G_TRL_tbW -> "gtrl_tbw" | G_TLR_btWA -> "gtlr_btwa" | G_TRL_tbWA -> "gtrl_tbwa" | G_TLR_btWZ -> "gtlr_btwz" | G_TRL_tbWZ -> "gtrl_tbwz" | G_TVA_ttWW -> "gtva_ttww" | G_TVA_bbWW -> "gtva_bbww" | G_TVA_ttG -> "gtva_ttg" | G_TVA_ttGG -> "gtva_ttgg" | G_SP_ttH -> "gsp_tth" | G_VLR_qGuG -> "gvlr_qgug" | G_VLR_qBuB -> "gvlr_qbub" | G_VLR_qBuB_u -> "gvlr_qbub_u" | G_VLR_qBuB_d -> "gvlr_qbub_d" | G_VLR_qBuB_e -> "gvlr_qbub_e" | G_VL_qBuB_n -> "gvl_qbub_n" | G_VL_qW -> "gvl_qw" | G_VL_qW_u -> "gvl_qw_u" | G_VL_qW_d -> "gvl_qw_d" | G_SL_DttR -> "gsl_dttr" | G_SR_DttR -> "gsr_dttr" | G_SL_DttL -> "gsl_dttl" | G_SLR_DbtR -> "gslr_dbtr" | G_SL_DbtL -> "gsl_dbtl" | G_CC -> "gcc" | G_CCQ (n1,n2) -> "gccq" ^ string_of_int n1 ^ string_of_int n2 | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | I_G1_AWW -> "ig1a" | I_G1_ZWW -> "ig1z" | I_G1_plus_kappa_plus_G4_AWW -> "ig1pkpg4a" | I_G1_plus_kappa_plus_G4_ZWW -> "ig1pkpg4z" | I_G1_plus_kappa_minus_G4_AWW -> "ig1pkmg4a" | I_G1_plus_kappa_minus_G4_ZWW -> "ig1pkmg4z" | I_G1_minus_kappa_plus_G4_AWW -> "ig1mkpg4a" | I_G1_minus_kappa_plus_G4_ZWW -> "ig1mkpg4z" | I_G1_minus_kappa_minus_G4_AWW -> "ig1mkmg4a" | I_G1_minus_kappa_minus_G4_ZWW -> "ig1mkmg4z" | I_lambda_AWW -> "ila" | I_lambda_ZWW -> "ilz" | G5_AWW -> "rg5a" | G5_ZWW -> "rg5z" | I_kappa5_AWW -> "ik5a" | I_kappa5_ZWW -> "ik5z" | I_lambda5_AWW -> "il5a" | I_lambda5_ZWW -> "il5z" | Alpha_WWWW0 -> "alww0" | Alpha_WWWW2 -> "alww2" | Alpha_ZZWW0 -> "alzw0" | Alpha_ZZWW1 -> "alzw1" | Alpha_ZZZZ -> "alzz" | FT0_WWWW0 -> "at0ww0" | FT0_WWWW2 -> "at0ww2" | FT0_ZZWW0 -> "at0zw0" | FT0_ZZWW1 -> "at0zw1" | FT0_ZZZZ -> "at0zz" | FT0_AAAA -> "at0aa" | FT0_AAWW0 -> "at0aw0" | FT0_AAWW1 -> "at0aw1" | FT0_AAZZ -> "at0az" | FT0_AZWW0 -> "at0azw0" | FT0_AZWW1 -> "at0azw1" | FT0_AAAZ -> "at03az" | FT0_AZZZ -> "at0a3z" | FT1_WWWW0 -> "at1ww0" | FT1_WWWW2 -> "at1ww2" | FT1_ZZWW0 -> "at1zw0" | FT1_ZZWW1 -> "at1zw1" | FT1_ZZZZ -> "at1zz" | FT1_AAAA -> "at1aa" | FT1_AAWW0 -> "at1aw0" | FT1_AAWW1 -> "at1aw1" | FT1_AAZZ -> "at1az" | FT1_AZWW0 -> "at1azw0" | FT1_AZWW1 -> "at1azw1" | FT1_AAAZ -> "at13az" | FT1_AZZZ -> "at1a3z" | FT2_WWWW0 -> "at2ww0" | FT2_WWWW2 -> "at2ww2" | FT2_ZZWW0 -> "at2zw0" | FT2_ZZWW1 -> "at2zw1" | FT2_ZZZZ -> "at2zz" | FT2_AAAA -> "at2aa" | FT2_AAWW0 -> "at2aw0" | FT2_AAWW1 -> "at2aw1" | FT2_AAZZ -> "at2az" | FT2_AZWW0 -> "at2azw0" | FT2_AZWW1 -> "at2azw1" | FT2_AAAZ -> "at23az" | FT2_AZZZ -> "at2a3z" | FM0_WWWW0 -> "am0ww0,am0ww0" | FM0_WWWW2 -> "am0ww2,am0ww2" | FM0_ZZWW0 -> "am0zw0/costhw**2,am0zw0*costhw**2" | FM0_ZZWW1 -> "am0zw1/costhw**2,am0zw1*costhw**2" | FM0_ZZZZ -> "am0zz,am0zz" | FM1_WWWW0 -> "am1ww0,am1ww0" | FM1_WWWW2 -> "am1ww2,am1ww2" | FM1_ZZWW0 -> "am1zw0/costhw**2,am1zw0*costhw**2" | FM1_ZZWW1 -> "am1zw1/costhw**2,am1zw1*costhw**2" | FM1_ZZZZ -> "am1zz,am1zz" | FM7_WWWW0 -> "am7ww0,am7ww0,am7ww0" | FM7_WWWW2 -> "am7ww2,am7ww2,am7ww2" | FM7_ZZWW0 -> "am7zw0/costhw**2,am7zw0,am7zw0*costhw**2" | FM7_ZZWW1 -> "am7zw1/costhw**2,am7zw1,am7zw1*costhw**2" | FM7_ZZZZ -> "am7zz,am7zz,am7zz" | FS0_HHWW -> "fs0hhww" | FS0_HHZZ -> "fs0hhzz" | FS1_HHWW -> "fs1hhww" | FS1_HHZZ -> "fs1hhzz" | FS_H4 -> "fsh4" | FM0_HHWW -> "fm0hhww" | FM0_HHZZ -> "fm0hhzz" | FM1_HHWW -> "fm1hhww" | FM1_HHZZ -> "fm1hhzz" | FM7_HHWW -> "fm7hhww" | FM7_HHZZ -> "fm7hhzz" | D_Alpha_ZZWW0_S -> "dalzz0_s(gkm,mkm," | D_Alpha_ZZWW0_T -> "dalzz0_t(gkm,mkm," | D_Alpha_ZZWW1_S -> "dalzz1_s(gkm,mkm," | D_Alpha_ZZWW1_T -> "dalzz1_t(gkm,mkm," | D_Alpha_ZZWW1_U -> "dalzz1_u(gkm,mkm," | D_Alpha_WWWW0_S -> "dalww0_s(gkm,mkm," | D_Alpha_WWWW0_T -> "dalww0_t(gkm,mkm," | D_Alpha_WWWW0_U -> "dalww0_u(gkm,mkm," | D_Alpha_WWWW2_S -> "dalww2_s(gkm,mkm," | D_Alpha_WWWW2_T -> "dalww2_t(gkm,mkm," | D_Alpha_ZZZZ_S -> "dalz4_s(gkm,mkm," | D_Alpha_ZZZZ_T -> "dalz4_t(gkm,mkm," | D_FT0_ZZWW0_S -> "datzz0_s_0(gkm,mkm," | D_FT0_ZZWW0_T -> "datzz0_t_0(gkm,mkm," | D_FT0_ZZWW0_U -> "datzz0_u_0(gkm,mkm," | D_FT0_ZZWW1_S -> "datzz1_s_0(gkm,mkm," | D_FT0_ZZWW1_T -> "datzz1_t_0(gkm,mkm," | D_FT0_ZZWW1_U -> "datzz1_u_0(gkm,mkm," | D_FT0_WWWW0_S -> "datww0_s_0(gkm,mkm," | D_FT0_WWWW0_T -> "datww0_t_0(gkm,mkm," | D_FT0_WWWW0_U -> "datww0_u_0(gkm,mkm," | D_FT0_WWWW2_S -> "datww2_s_0(gkm,mkm," | D_FT0_WWWW2_T -> "datww2_t_0(gkm,mkm," | D_FT0_WWWW2_U -> "datww2_u_0(gkm,mkm," | D_FT0_ZZZZ_S -> "datz4_s_0(gkm,mkm," | D_FT0_ZZZZ_T -> "datz4_t_0(gkm,mkm," | D_FT0_ZZZZ_U -> "datz4_u_0(gkm,mkm," | D_FT0_AAAA_S -> "data4_s_0(gkm,mkm," | D_FT0_AAAA_T -> "data4_t_0(gkm,mkm," | D_FT0_AAAA_U -> "data4_u_0(gkm,mkm," | D_FT0_AAWW0_S -> "dataw0_s_0(gkm,mkm," | D_FT0_AAWW0_T -> "dataw0_t_0(gkm,mkm," | D_FT0_AAWW0_U -> "dataw0_u_0(gkm,mkm," | D_FT0_AAWW1_S -> "dataw1_s_0(gkm,mkm," | D_FT0_AAWW1_T -> "dataw1_t_0(gkm,mkm," | D_FT0_AAWW1_U -> "dataw1_u_0(gkm,mkm," | D_FT0_AAZZ_S -> "dataz_s_0(gkm,mkm," | D_FT0_AAZZ_T -> "dataz_t_0(gkm,mkm," | D_FT0_AAZZ_U -> "dataz_u_0(gkm,mkm," | D_FT0_AZWW0_S -> "datazw0_s_0(gkm,mkm," | D_FT0_AZWW0_T -> "datazw0_t_0(gkm,mkm," | D_FT0_AZWW0_U -> "datazw0_u_0(gkm,mkm," | D_FT0_AZWW1_S -> "datazw0_s_1(gkm,mkm," | D_FT0_AZWW1_T -> "datazw0_t_1(gkm,mkm," | D_FT0_AZWW1_U -> "datazw0_u_1(gkm,mkm," | D_FT0_AAAZ_S -> "dat3az_s_0(gkm,mkm," | D_FT0_AAAZ_T -> "dat3az_t_0(gkm,mkm," | D_FT0_AAAZ_U -> "dat3az_u_0(gkm,mkm," | D_FT0_AZZZ_S -> "data3z_s_0(gkm,mkm," | D_FT0_AZZZ_T -> "data3z_t_0(gkm,mkm," | D_FT0_AZZZ_U -> "data3z_u_0(gkm,mkm," | D_FT1_ZZWW0_S -> "datzz0_s_1(gkm,mkm," | D_FT1_ZZWW0_T -> "datzz0_t_1(gkm,mkm," | D_FT1_ZZWW0_U -> "datzz0_u_1(gkm,mkm," | D_FT1_ZZWW1_S -> "datzz1_s_1(gkm,mkm," | D_FT1_ZZWW1_T -> "datzz1_t_1(gkm,mkm," | D_FT1_ZZWW1_U -> "datzz1_u_1(gkm,mkm," | D_FT1_WWWW0_S -> "datww0_s_1(gkm,mkm," | D_FT1_WWWW0_T -> "datww0_t_1(gkm,mkm," | D_FT1_WWWW0_U -> "datww0_u_1(gkm,mkm," | D_FT1_WWWW2_S -> "datww2_s_1(gkm,mkm," | D_FT1_WWWW2_T -> "datww2_t_1(gkm,mkm," | D_FT1_WWWW2_U -> "datww2_u_1(gkm,mkm," | D_FT1_ZZZZ_S -> "datz4_s_1(gkm,mkm," | D_FT1_ZZZZ_T -> "datz4_t_1(gkm,mkm," | D_FT1_ZZZZ_U -> "datz4_u_1(gkm,mkm," | D_FT1_AAAA_S -> "data4_s_1(gkm,mkm," | D_FT1_AAAA_T -> "data4_t_1(gkm,mkm," | D_FT1_AAAA_U -> "data4_u_1(gkm,mkm," | D_FT1_AAWW0_S -> "dataw0_s_1(gkm,mkm," | D_FT1_AAWW0_T -> "dataw0_t_1(gkm,mkm," | D_FT1_AAWW0_U -> "dataw0_u_1(gkm,mkm," | D_FT1_AAWW1_S -> "dataw1_s_1(gkm,mkm," | D_FT1_AAWW1_T -> "dataw1_t_1(gkm,mkm," | D_FT1_AAWW1_U -> "dataw1_u_1(gkm,mkm," | D_FT1_AAZZ_S -> "dataz_s_1(gkm,mkm," | D_FT1_AAZZ_T -> "dataz_t_1(gkm,mkm," | D_FT1_AAZZ_U -> "dataz_u_1(gkm,mkm," | D_FT1_AZWW0_S -> "datazw0_s_1(gkm,mkm," | D_FT1_AZWW0_T -> "datazw0_t_1(gkm,mkm," | D_FT1_AZWW0_U -> "datazw0_u_1(gkm,mkm," | D_FT1_AZWW1_S -> "datazw1_s_1(gkm,mkm," | D_FT1_AZWW1_T -> "datazw1_t_1(gkm,mkm," | D_FT1_AZWW1_U -> "datazw1_u_1(gkm,mkm," | D_FT1_AAAZ_S -> "dat3az_s_1(gkm,mkm," | D_FT1_AAAZ_T -> "dat3az_t_1(gkm,mkm," | D_FT1_AAAZ_U -> "dat3az_u_1(gkm,mkm," | D_FT1_AZZZ_S -> "data3z_s_1(gkm,mkm," | D_FT1_AZZZ_T -> "data3z_t_1(gkm,mkm," | D_FT1_AZZZ_U -> "data3z_u_1(gkm,mkm," | D_FT2_ZZWW0_S -> "datzz0_s_2(gkm,mkm," | D_FT2_ZZWW0_T -> "datzz0_t_2(gkm,mkm," | D_FT2_ZZWW0_U -> "datzz0_u_2(gkm,mkm," | D_FT2_ZZWW1_S -> "datzz1_s_2(gkm,mkm," | D_FT2_ZZWW1_T -> "datzz1_t_2(gkm,mkm," | D_FT2_ZZWW1_U -> "datzz1_u_2(gkm,mkm," | D_FT2_WWWW0_S -> "datww0_s_2(gkm,mkm," | D_FT2_WWWW0_T -> "datww0_t_2(gkm,mkm," | D_FT2_WWWW0_U -> "datww0_u_2(gkm,mkm," | D_FT2_WWWW2_S -> "datww2_s_2(gkm,mkm," | D_FT2_WWWW2_T -> "datww2_t_2(gkm,mkm," | D_FT2_WWWW2_U -> "datww2_u_2(gkm,mkm," | D_FT2_ZZZZ_S -> "datz4_s_2(gkm,mkm," | D_FT2_ZZZZ_T -> "datz4_t_2(gkm,mkm," | D_FT2_ZZZZ_U -> "datz4_u_2(gkm,mkm," | D_FT2_AAAA_S -> "data4_s_2(gkm,mkm," | D_FT2_AAAA_T -> "data4_t_2(gkm,mkm," | D_FT2_AAAA_U -> "data4_u_2(gkm,mkm," | D_FT2_AAWW0_S -> "dataw0_s_2(gkm,mkm," | D_FT2_AAWW0_T -> "dataw0_t_2(gkm,mkm," | D_FT2_AAWW0_U -> "dataw0_u_2(gkm,mkm," | D_FT2_AAWW1_S -> "dataw1_s_2(gkm,mkm," | D_FT2_AAWW1_T -> "dataw1_t_2(gkm,mkm," | D_FT2_AAWW1_U -> "dataw1_u_2(gkm,mkm," | D_FT2_AAZZ_S -> "dataz_s_2(gkm,mkm," | D_FT2_AAZZ_T -> "dataz_t_2(gkm,mkm," | D_FT2_AAZZ_U -> "dataz_u_2(gkm,mkm," | D_FT2_AZWW0_S -> "datazw0_s_2(gkm,mkm," | D_FT2_AZWW0_T -> "datazw0_t_2(gkm,mkm," | D_FT2_AZWW0_U -> "datazw0_u_2(gkm,mkm," | D_FT2_AZWW1_S -> "datazw1_s_2(gkm,mkm," | D_FT2_AZWW1_T -> "datazw1_t_2(gkm,mkm," | D_FT2_AZWW1_U -> "datazw1_u_2(gkm,mkm," | D_FT2_AAAZ_S -> "dat3az_s_2(gkm,mkm," | D_FT2_AAAZ_T -> "dat3az_t_2(gkm,mkm," | D_FT2_AAAZ_U -> "dat3az_u_2(gkm,mkm," | D_FT2_AZZZ_S -> "data3z_s_2(gkm,mkm," | D_FT2_AZZZ_T -> "data3z_t_2(gkm,mkm," | D_FT2_AZZZ_U -> "data3z_u_2(gkm,mkm," | D_FTrsi_ZZWW0_S -> "datzz0_s_rsi(gkm,mkm," | D_FTrsi_ZZWW0_T -> "datzz0_t_rsi(gkm,mkm," | D_FTrsi_ZZWW0_U -> "datzz0_u_rsi(gkm,mkm," | D_FTrsi_ZZWW1_S -> "datzz1_s_rsi(gkm,mkm," | D_FTrsi_ZZWW1_T -> "datzz1_t_rsi(gkm,mkm," | D_FTrsi_ZZWW1_U -> "datzz1_u_rsi(gkm,mkm," | D_FTrsi_WWWW0_S -> "datww0_s_rsi(gkm,mkm," | D_FTrsi_WWWW0_T -> "datww0_t_rsi(gkm,mkm," | D_FTrsi_WWWW0_U -> "datww0_u_rsi(gkm,mkm," | D_FTrsi_WWWW2_S -> "datww2_s_rsi(gkm,mkm," | D_FTrsi_WWWW2_T -> "datww2_t_rsi(gkm,mkm," | D_FTrsi_WWWW2_U -> "datww2_u_rsi(gkm,mkm," | D_FTrsi_ZZZZ_S -> "datz4_s_rsi(gkm,mkm," | D_FTrsi_ZZZZ_T -> "datz4_t_rsi(gkm,mkm," | D_FTrsi_ZZZZ_U -> "datz4_u_rsi(gkm,mkm," | D_FTrsi_AAAA_S -> "data4_s_rsi(gkm,mkm," | D_FTrsi_AAAA_T -> "data4_t_rsi(gkm,mkm," | D_FTrsi_AAAA_U -> "data4_u_rsi(gkm,mkm," | D_FTrsi_AAWW0_S -> "dataw0_s_rsi(gkm,mkm," | D_FTrsi_AAWW0_T -> "dataw0_t_rsi(gkm,mkm," | D_FTrsi_AAWW0_U -> "dataw0_u_rsi(gkm,mkm," | D_FTrsi_AAWW1_S -> "dataw1_s_rsi(gkm,mkm," | D_FTrsi_AAWW1_T -> "dataw1_t_rsi(gkm,mkm," | D_FTrsi_AAWW1_U -> "dataw1_u_rsi(gkm,mkm," | D_FTrsi_AAZZ_S -> "dataz_s_rsi(gkm,mkm," | D_FTrsi_AAZZ_T -> "dataz_t_rsi(gkm,mkm," | D_FTrsi_AAZZ_U -> "dataz_u_rsi(gkm,mkm," | D_FTrsi_AZWW0_S -> "datazw0_s_rsi(gkm,mkm," | D_FTrsi_AZWW0_T -> "datazw0_t_rsi(gkm,mkm," | D_FTrsi_AZWW0_U -> "datazw0_u_rsi(gkm,mkm," | D_FTrsi_AZWW1_S -> "datazw1_s_rsi(gkm,mkm," | D_FTrsi_AZWW1_T -> "datazw1_t_rsi(gkm,mkm," | D_FTrsi_AZWW1_U -> "datazw1_u_rsi(gkm,mkm," | D_FTrsi_AAAZ_S -> "dat3az_s_rsi(gkm,mkm," | D_FTrsi_AAAZ_T -> "dat3az_t_rsi(gkm,mkm," | D_FTrsi_AAAZ_U -> "dat3az_u_rsi(gkm,mkm," | D_FTrsi_AZZZ_S -> "data3z_s_rsi(gkm,mkm," | D_FTrsi_AZZZ_T -> "data3z_t_rsi(gkm,mkm," | D_FTrsi_AZZZ_U -> "data3z_u_rsi(gkm,mkm," | D_FM0_ZZWW0_S -> "damzz0_s_0(gkm,mkm," | D_FM0_ZZWW0_T -> "damzz0_t_0(gkm,mkm," | D_FM0_ZZWW0_U -> "damzz0_u_0(gkm,mkm," | D_FM0_ZZWW1_S -> "damzz1_s_0(gkm,mkm," | D_FM0_ZZWW1_T -> "damzz1_t_0(gkm,mkm," | D_FM0_ZZWW1_U -> "damzz1_u_0(gkm,mkm," | D_FM0_WWWW0_S -> "damww0_s_0(gkm,mkm," | D_FM0_WWWW0_T -> "damww0_t_0(gkm,mkm," | D_FM0_WWWW0_U -> "damww0_u_0(gkm,mkm," | D_FM0_WWWW2_S -> "damww2_s_0(gkm,mkm," | D_FM0_WWWW2_T -> "damww2_t_0(gkm,mkm," | D_FM0_WWWW2_U -> "damww2_u_0(gkm,mkm," | D_FM0_ZZZZ_S -> "damz4_s_0(gkm,mkm," | D_FM0_ZZZZ_T -> "damz4_t_0(gkm,mkm," | D_FM0_ZZZZ_U -> "damz4_u_0(gkm,mkm," | D_FM1_ZZWW0_S -> "damzz0_s_1(gkm,mkm," | D_FM1_ZZWW0_T -> "damzz0_t_1(gkm,mkm," | D_FM1_ZZWW0_U -> "damzz0_u_1(gkm,mkm," | D_FM1_ZZWW1_S -> "damzz1_s_1(gkm,mkm," | D_FM1_ZZWW1_T -> "damzz1_t_1(gkm,mkm," | D_FM1_ZZWW1_U -> "damzz1_u_1(gkm,mkm," | D_FM1_WWWW0_S -> "damww0_s_1(gkm,mkm," | D_FM1_WWWW0_T -> "damww0_t_1(gkm,mkm," | D_FM1_WWWW0_U -> "damww0_u_1(gkm,mkm," | D_FM1_WWWW2_S -> "damww2_s_1(gkm,mkm," | D_FM1_WWWW2_T -> "damww2_t_1(gkm,mkm," | D_FM1_WWWW2_U -> "damww2_u_1(gkm,mkm," | D_FM1_ZZZZ_S -> "damz4_s_1(gkm,mkm," | D_FM1_ZZZZ_T -> "damz4_t_1(gkm,mkm," | D_FM1_ZZZZ_U -> "damz4_u_1(gkm,mkm," | D_FM7_ZZWW0_S -> "damzz0_s_7(gkm,mkm," | D_FM7_ZZWW0_T -> "damzz0_t_7(gkm,mkm," | D_FM7_ZZWW0_U -> "damzz0_u_7(gkm,mkm," | D_FM7_ZZWW1_S -> "damzz1_s_7(gkm,mkm," | D_FM7_ZZWW1_T -> "damzz1_t_7(gkm,mkm," | D_FM7_ZZWW1_U -> "damzz1_u_7(gkm,mkm," | D_FM7_WWWW0_S -> "damww0_s_7(gkm,mkm," | D_FM7_WWWW0_T -> "damww0_t_7(gkm,mkm," | D_FM7_WWWW0_U -> "damww0_u_7(gkm,mkm," | D_FM7_WWWW2_S -> "damww2_s_7(gkm,mkm," | D_FM7_WWWW2_T -> "damww2_t_7(gkm,mkm," | D_FM7_WWWW2_U -> "damww2_u_7(gkm,mkm," | D_FM7_ZZZZ_S -> "damz4_s_7(gkm,mkm," | D_FM7_ZZZZ_T -> "damz4_t_7(gkm,mkm," | D_FM7_ZZZZ_U -> "damz4_u_7(gkm,mkm," | D_Alpha_HHHH_S -> "dalh4_s(gkm,mkm," | D_Alpha_HHHH_T -> "dalh4_t(gkm,mkm," | D_Alpha_HHWW0_S -> "dalhw0_s(gkm,mkm," | D_Alpha_HHWW0_T -> "dalhw0_t(gkm,mkm," | D_Alpha_HHZZ0_S -> "dalhz0_s(gkm,mkm," | D_Alpha_HHZZ0_T -> "dalhz0_t(gkm,mkm," | D_Alpha_HHWW1_S -> "dalhw1_s(gkm,mkm," | D_Alpha_HHWW1_T -> "dalhw1_t(gkm,mkm," | D_Alpha_HHWW1_U -> "dalhw1_u(gkm,mkm," | D_Alpha_HHZZ1_S -> "dalhz1_s(gkm,mkm," | D_Alpha_HHZZ1_T -> "dalhz1_t(gkm,mkm," | D_Alpha_HHZZ1_U -> "dalhz1_u(gkm,mkm," | D_FM0_HHWW0_S -> "damhw0_s_0(gkm,mkm," | D_FM0_HHWW0_T -> "damhw0_t_0(gkm,mkm," | D_FM0_HHWW0_U -> "damhw0_u_0(gkm,mkm," | D_FM0_HHZZ0_S -> "damhz0_s_0(gkm,mkm," | D_FM0_HHZZ0_T -> "damhz0_t_0(gkm,mkm," | D_FM0_HHZZ0_U -> "damhz0_u_0(gkm,mkm," | D_FM0_HHWW1_S -> "damhw1_s_0(gkm,mkm," | D_FM0_HHWW1_T -> "damhw1_t_0(gkm,mkm," | D_FM0_HHWW1_U -> "damhw1_u_0(gkm,mkm," | D_FM0_HHZZ1_S -> "damhz1_s_0(gkm,mkm," | D_FM0_HHZZ1_T -> "damhz1_t_0(gkm,mkm," | D_FM0_HHZZ1_U -> "damhz1_u_0(gkm,mkm," | D_FM1_HHWW0_S -> "damhw0_s_1(gkm,mkm," | D_FM1_HHWW0_T -> "damhw0_t_1(gkm,mkm," | D_FM1_HHWW0_U -> "damhw0_u_1(gkm,mkm," | D_FM1_HHZZ0_S -> "damhz0_s_1(gkm,mkm," | D_FM1_HHZZ0_T -> "damhz0_t_1(gkm,mkm," | D_FM1_HHZZ0_U -> "damhz0_u_1(gkm,mkm," | D_FM1_HHWW1_S -> "damhw1_s_1(gkm,mkm," | D_FM1_HHWW1_T -> "damhw1_t_1(gkm,mkm," | D_FM1_HHWW1_U -> "damhw1_u_1(gkm,mkm," | D_FM1_HHZZ1_S -> "damhz1_s_1(gkm,mkm," | D_FM1_HHZZ1_T -> "damhz1_t_1(gkm,mkm," | D_FM1_HHZZ1_U -> "damhz1_u_1(gkm,mkm," | D_FM7_HHWW0_S -> "damhw0_s_1(gkm,mkm," | D_FM7_HHWW0_T -> "damhw0_t_1(gkm,mkm," | D_FM7_HHWW0_U -> "damhw0_u_1(gkm,mkm," | D_FM7_HHZZ0_S -> "damhz0_s_1(gkm,mkm," | D_FM7_HHZZ0_T -> "damhz0_t_1(gkm,mkm," | D_FM7_HHZZ0_U -> "damhz0_u_1(gkm,mkm," | D_FM7_HHWW1_S -> "damhw1_s_1(gkm,mkm," | D_FM7_HHWW1_T -> "damhw1_t_1(gkm,mkm," | D_FM7_HHWW1_U -> "damhw1_u_1(gkm,mkm," | D_FM7_HHZZ1_S -> "damhz1_s_1(gkm,mkm," | D_FM7_HHZZ1_T -> "damhz1_t_1(gkm,mkm," | D_FM7_HHZZ1_U -> "damhz1_u_1(gkm,mkm," | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_SWW -> "gsww" | G_SZZ -> "gszz" | G_SHH -> "gshh" | G_SWW_T -> "gswwt" | G_SZZ_T -> "gszzt" | G_SAA_T -> "gsaat" | G_SAZ_T -> "gsazt" | G_PNWW -> "gpnww" | G_PNZZ -> "gpnzz" | G_PSNWW -> "gpsnww" | G_PSNZZ -> "gpsnzz" | G_PSNHH -> "gpsnhh" | G_PWZ -> "gpwz" | G_PWW -> "gpww" | G_FWW -> "gfww" | G_FZZ -> "gfzz" | G_FWW_CF -> "gfwwcf" | G_FZZ_CF -> "gfzzcf" | G_FHH -> "gfhh" | G_FHH_CF -> "gfhhcf" | G_FWW_T -> "gfwwt" | G_FZZ_T -> "gfzzt" | G_FFWW -> "gffww" | G_FFZZ -> "gffzz" | G_FFWW_CF -> "gffwwcf" | G_FFZZ_CF -> "gffzzcf" | G_FFHH -> "gffhh" | G_FFHH_CF -> "gffhhcf" | G_FVWW -> "gfvww" | G_FVZZ -> "gfvzz" | G_FVWW_CF -> "gfvwwcf" | G_FVZZ_CF -> "gfvzzcf" | G_FVHH -> "gfvhh" | G_FVHH_CF -> "gfvhhcf" | G_FDDSWW -> "gfddsww" | G_FDDSZZ -> "gfddszz" | G_FDDSWW_CF -> "gfddswwcf" | G_FDDSZZ_CF -> "gfddszzcf" | G_FDDSHH -> "gfddshh" | G_FDDSHH_CF -> "gfddshhcf" | G_FSWW -> "gfsww" | G_FSZZ -> "gfszz" | G_FSHH -> "gfshh" | G_TNWW -> "gtnww" | G_TNZZ -> "gtnzz" | G_TNWW_CF -> "gtnwwcf" | G_TNZZ_CF -> "gtnzzcf" | G_TSNWW -> "gtsnww" | G_TSNZZ -> "gtsnzz" | G_TSNWW_CF -> "gtsnwwcf" | G_TSNZZ_CF -> "gtsnzzcf" | G_TWZ -> "gtwz" | G_TWW -> "gtww" | G_TWZ_CF -> "gtwzcf" | G_TWW_CF -> "gtwwcf" | G_SSWW -> "gssww" | G_SSZZ -> "gsszz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_Hmm -> "ghmm" | G_HGaZ -> "ghgaz" | G_HGaGa -> "ghgaga" | G_Hgg -> "ghgg" | G_HGaGa_anom -> "ghgaga_ac" | G_HGaZ_anom -> "ghgaz_ac" | G_HZZ_anom -> "ghzz_ac" | G_HWW_anom -> "ghww_ac" | G_HGaZ_u -> "ghgaz_u" | G_HZZ_u -> "ghzz_u" | G_HWW_u -> "ghww_u" | G_H3 -> "gh3" | G_H4 -> "gh4" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f | K_Matrix_Coeff i -> "kc" ^ string_of_int i | K_Matrix_Pole i -> "kp" ^ string_of_int i end Index: trunk/omega/src/product.mli =================================================================== --- trunk/omega/src/product.mli (revision 8274) +++ trunk/omega/src/product.mli (revision 8275) @@ -1,63 +1,71 @@ (* product.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Lists} Since April 2001, we preserve lexicographic ordering. *) val fold2 : ('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c val fold3 : ('a -> 'b -> 'c -> 'd -> 'd) -> 'a list -> 'b list -> 'c list -> 'd -> 'd val fold : ('a list -> 'b -> 'b) -> 'a list list -> 'b -> 'b val list2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list val list3 : ('a -> 'b -> 'c -> 'd) -> 'a list -> 'b list -> 'c list -> 'd list val list : ('a list -> 'b) -> 'a list list -> 'b list +(* Suppress all [None] in the results. *) +val list2_opt : + ('a -> 'b -> 'c option) -> 'a list -> 'b list -> 'c list +val list3_opt : + ('a -> 'b -> 'c -> 'd option) -> 'a list -> 'b list -> 'c list -> 'd list +val list_opt : + ('a list -> 'b option) -> 'a list list -> 'b list + val power : int -> 'a list -> 'a list list val thread : 'a list list -> 'a list list (* \thocwmodulesection{Sets} *) (* ['a_set] is actually ['a set] for a suitable [set], but this relation can not be expressed polymorphically (in [set]) in O'Caml. The two sets can be of different type, but we provide a symmetric version as syntactic sugar. *) type 'a set type ('a, 'a_set, 'b) fold = ('a -> 'b -> 'b) -> 'a_set -> 'b -> 'b type ('a, 'a_set, 'b, 'b_set, 'c) fold2 = ('a -> 'b -> 'c -> 'c) -> 'a_set -> 'b_set -> 'c -> 'c val outer : ('a, 'a_set, 'c) fold -> ('b, 'b_set, 'c) fold -> ('a, 'a_set, 'b, 'b_set, 'c) fold2 val outer_self : ('a, 'a_set, 'b) fold -> ('a, 'a_set, 'a, 'a_set, 'b) fold2 (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/omega.tex =================================================================== --- trunk/omega/src/omega.tex (revision 8274) +++ trunk/omega/src/omega.tex (revision 8275) @@ -1,1177 +1,1191 @@ % omega.tex -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \RequirePackage{ifpdf} \ifpdf \documentclass[a4paper,notitlepage,chapters]{flex} \usepackage{type1cm} \usepackage[pdftex,colorlinks]{hyperref} \usepackage[pdftex]{graphicx,feynmp,emp} \DeclareGraphicsRule{*}{mps}{*}{} \else \documentclass[a4paper,notitlepage,chapters]{flex} \usepackage[T1]{fontenc} % \usepackage[hypertex]{hyperref} \usepackage{graphicx,feynmp,emp} \fi \usepackage{verbatim,array,amsmath,amssymb} \usepackage{url,thophys,thohacks} \setlength{\unitlength}{1mm} \empaddtoTeX{\usepackage{amsmath,amssymb}} \empaddtoTeX{\usepackage{thophys,thohacks}} \empaddtoprelude{input graph;} \empaddtoprelude{input boxes;} +\IfFileExists{geometry.sty}% + {\usepackage{geometry}% + \geometry{a4paper,margin=2cm}}% + {\relax} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% This should be part of flex.cls and/or thopp.sty \makeatletter \@ifundefined{frontmatter}% {\def\frontmatter{\pagenumbering{roman}}% \def\mainmatter{\cleardoublepage\pagenumbering{arabic}}} {} \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% \makeatletter %%% %%% Italic figure captions to separate them visually from the text %%% %%% (this should be supported by flex.cls): %%% \makeatletter %%% \@secpenalty=-1000 %%% \def\fps@figure{t} %%% \def\fps@table{b} %%% \long\def\@makecaption#1#2{% %%% \vskip\abovecaptionskip %%% \sbox\@tempboxa{#1: \textit{#2}}% %%% \ifdim\wd\@tempboxa>\hsize %%% #1: \textit{#2}\par %%% \else %%% \global\@minipagefalse %%% \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% %%% \fi %%% \vskip\belowcaptionskip} %%% \makeatother \widowpenalty=4000 \clubpenalty=4000 \displaywidowpenalty=4000 %%% \pagestyle{headings} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \allowdisplaybreaks \renewcommand{\topfraction}{0.8} \renewcommand{\bottomfraction}{0.8} \renewcommand{\textfraction}{0.2} \setlength{\abovecaptionskip}{.5\baselineskip} \setlength{\belowcaptionskip}{\baselineskip} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% allow VERY overfull hboxes \setlength{\hfuzz}{5cm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{noweb} %%% \usepackage{nocondmac} \setlength{\nwmarginglue}{1em} \noweboptions{smallcode,noidentxref}%%%{webnumbering} %%% Saving paper: \def\nwendcode{\endtrivlist\endgroup} \nwcodepenalty=0 \let\nwdocspar\relax %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\ttfilename}[1]{\texttt{\detokenize{#1}}} \usepackage[noweb,bypages]{ocamlweb} \empaddtoTeX{\usepackage[noweb,bypages]{ocamlweb}} \renewcommand{\ocwinterface}[1]{\section{Interface of \ocwupperid{#1}}} \renewcommand{\ocwmodule}[1]{\section{Implementation of \ocwupperid{#1}}} \renewcommand{\ocwinterfacepart}{\relax} \renewcommand{\ocwcodepart}{\relax} \renewcommand{\ocwbeginindex}{\begin{theindex}} \newcommand{\thocwmodulesection}[1]{\subsection{#1}} \newcommand{\thocwmodulesubsection}[1]{\subsubsection{#1}} \newcommand{\thocwmoduleparagraph}[1]{\paragraph{#1}} \renewcommand{\ocwindent}[1]{\noindent\ignorespaces} \renewcommand{\ocwbegincode}{\renewcommand{\ocwindent}[1]{\noindent\kern##1}} \renewcommand{\ocwendcode}{\renewcommand{\ocwindent}[1]{\noindent\ignorespaces}} \renewcommand{\ocweol}{\setlength\parskip{0pt}\par} \makeatletter \renewcommand{\@oddfoot}{\reset@font\hfil\thepage\hfil} \let\@evenfoot\@oddfoot \def\@evenhead{\leftmark{} \hrulefill}% \def\@oddhead{\hrulefill{} \rightmark}% \let\@mkboth\markboth \renewcommand{\chaptermark}[1]{\markboth{\hfil}{\hfil}}% \renewcommand{\sectionmark}[1]{\markboth{#1}{#1}} \renewcommand{\chapter}{% \clearpage\global\@topnum\z@\@afterindentfalse \secdef\@chapter\@schapter} \makeatother \newcommand{\signature}[1]{% \InputIfFileExists{#1.interface}{}% {\begin{dubious}\textit{Interface \ttfilename{#1.mli} unavailable!}\end{dubious}}} \newcommand{\application}[1]{% \InputIfFileExists{#1.implementation}{}% {\begin{dubious}\textit{Application \ttfilename{#1.ml} unavailable!}\end{dubious}}} \newcommand{\module}[1]{% \label{mod:#1}% \InputIfFileExists{#1.interface}{}% {\begin{dubious}\textit{Interface \ttfilename{#1.mli} unavailable!}\end{dubious}}% \InputIfFileExists{#1.implementation}{}% {\begin{dubious}\textit{Implementation \ttfilename{#1.ml} unavailable!}\end{dubious}}} \newcommand{\lexer}[1]{\application{#1_lexer}} \renewcommand{\ocwlexmodule}[1]{\relax} \newcommand{\parser}[1]{\application{#1_parser}} \renewcommand{\ocwyaccmodule}[1]{\relax} \newcommand{\thocwincludegraphics}[2]{\includegraphics[#1]{#2}} \ifpdf \newcommand{\thocwdefref}[1]{\textbf{\pageref{#1}}}% \newcommand{\thocwuseref}[1]{\textrm{\pageref{#1}}}% \renewcommand{\ocwrefindexentry}[5]% {\item #1,\quad\let\ref\thocwdefref{#4}, used: \let\ref\thocwuseref{#5}} \fi \newcommand{\thocwmakebox}[4]{\makebox(#1,#2)[#3]{#4}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newenvironment{modules}[1]% {\begin{list}{}% {\setlength{\leftmargin}{3em}% \setlength{\rightmargin}{2em}% \setlength{\itemindent}{-1em}% \setlength{\listparindent}{0pt}% %%%\setlength{\itemsep}{0pt}% \settowidth{\labelwidth}{\textbf{\ocwupperid{#1}:}}% \renewcommand{\makelabel}[1]{\ocwupperid{##1:}}}}% {\end{list}} \newenvironment{JR}% {\begin{dubious}\textit{JR sez' (regarding the Majorana Feynman rules):}} {\textit{(JR's probably right, but I need to check myself \ldots)} \end{dubious}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareMathOperator{\tr}{tr} \newcommand{\dd}{\mathrm{d}} \newcommand{\ii}{\mathrm{i}} \newcommand{\ee}{\mathrm{e}} \renewcommand{\Re}{\text{Re}} \renewcommand{\Im}{\text{Im}} \newcommand{\ketbra}[2]{\ket{#1}\!\bra{#2}} \newcommand{\Ketbra}[2]{\Ket{#1}\!\Bra{#2}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \makeindex \begin{document} \begin{fmffile}{\jobname pics} \fmfset{arrow_ang}{10} \fmfset{curly_len}{2mm} \fmfset{wiggly_len}{3mm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \fmfcmd{% numeric joindiameter; joindiameter := 7thick;} \fmfcmd{% vardef sideways_at (expr d, p, frac) = save len; len = length p; (point frac*len of p) shifted ((d,0) rotated (90 + angle direction frac*len of p)) enddef; secondarydef p sideways d = for frac = 0 step 0.01 until 0.99: sideways_at (d, p, frac) .. endfor sideways_at (d, p, 1) enddef; secondarydef p choptail d = subpath (ypart (fullcircle scaled d shifted (point 0 of p) intersectiontimes p), infinity) of p enddef; secondarydef p choptip d = reverse ((reverse p) choptail d) enddef; secondarydef p pointtail d = fullcircle scaled d shifted (point 0 of p) intersectionpoint p enddef; secondarydef p pointtip d = (reverse p) pointtail d enddef; secondarydef pa join pb = pa choptip joindiameter .. pb choptail joindiameter enddef; vardef cyclejoin (expr p) = subpath (0.5*length p, infinity) of p join subpath (0, 0.5*length p) of p .. cycle enddef;} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \fmfcmd{% style_def double_line_arrow expr p = save pi, po; path pi, po; pi = reverse (p sideways thick); po = p sideways -thick; cdraw pi; cdraw po; cfill (arrow pi); cfill (arrow po); enddef;} \fmfcmd{% style_def double_line_arrow_beg expr p = save pi, po, pc; path pi, po, pc; pc = p choptail 7thick; pi = reverse (pc sideways thick); po = pc sideways -thick; cdraw pi .. p pointtail 5thick .. po; cfill (arrow pi); cfill (arrow po); enddef;} \fmfcmd{% style_def double_line_arrow_end expr p = save pi, po, pc; path pi, po, pc; pc = p choptip 7thick; pi = reverse (pc sideways thick); po = pc sideways -thick; cdraw po .. p pointtip 5thick .. pi; cfill (arrow pi); cfill (arrow po); enddef;} \fmfcmd{% style_def double_line_arrow_both expr p = save pi, po, pc; path pi, po, pc; pc = p choptip 7thick choptail 7thick; pi = reverse (pc sideways thick); po = pc sideways -thick; cdraw po .. p pointtip 5thick .. pi .. p pointtail 5thick .. cycle; cfill (arrow pi); cfill (arrow po); enddef;} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \fmfcmd{vardef middir (expr p, ang) = dir (angle direction length(p)/2 of p + ang) enddef;} \fmfcmd{style_def arrow_left expr p = shrink (.7); cfill (arrow p shifted (4thick * middir (p, 90))); endshrink enddef;} \fmfcmd{style_def arrow_right expr p = shrink (.7); cfill (arrow p shifted (4thick * middir (p, -90))); endshrink enddef;} \fmfcmd{style_def warrow_left expr p = shrink (.7); cfill (arrow p shifted (8thick * middir (p, 90))); endshrink enddef;} \fmfcmd{style_def warrow_right expr p = shrink (.7); cfill (arrow p shifted (8thick * middir (p, -90))); endshrink enddef;} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\threeexternal}[3]{% \fmfsurround{d1,e1,d2,e2,d3,e3}% \fmfv{label=$#1$,label.ang=0}{e1}% \fmfv{label=$#2$,label.ang=180}{e2}% \fmfv{label=$#3$,label.ang=0}{e3}} \newcommand{\Threeexternal}[3]{% \fmfsurround{d1,e1,d3,e3,d2,e2}% \fmfv{label=$#1$,label.ang=0}{e1}% \fmfv{label=$#2$,label.ang=0}{e2}% \fmfv{label=$#3$,label.ang=180}{e3}} \newcommand{\Fourexternal}[4]{% \fmfsurround{d2,e2,d1,e1,d4,e4,d3,e3}% \fmfv{label=$#1$,label.ang=180}{e1}% \fmfv{label=$#2$,label.ang=0}{e2}% \fmfv{label=$#3$,label.ang=0}{e3}% \fmfv{label=$#4$,label.ang=180}{e4}} \newcommand{\Fiveexternal}[5]{% \fmfsurround{d2,e2,d1,e1,d5,e5,d4,e4,d3,e3}% \fmfv{label=$#1$,label.ang=180}{e1}% \fmfv{label=$#2$,label.ang=0}{e2}% \fmfv{label=$#3$,label.ang=0}{e3}% \fmfv{label=$#4$,label.ang=0}{e4}% \fmfv{label=$#5$,label.ang=180}{e5}} \newcommand{\twoincoming}{% \fmfdot{v}% \fmffreeze% \fmf{warrow_right}{e1,v}% \fmf{warrow_right}{e2,v}% \fmf{warrow_right}{v,e3}} \newcommand{\threeincoming}{% \fmfdot{v}% \fmffreeze% \fmf{warrow_right}{e1,v}% \fmf{warrow_right}{e2,v}% \fmf{warrow_right}{e3,v}} \newcommand{\threeoutgoing}{% \fmfdot{v}% \fmffreeze% \fmf{warrow_right}{v,e1}% \fmf{warrow_right}{v,e2}% \fmf{warrow_right}{v,e3}} \newcommand{\fouroutgoing}{% \threeoutgoing% \fmf{warrow_right}{v,e4}} \newcommand{\fiveoutgoing}{% \fouroutgoing% \fmf{warrow_right}{v,e5}} \newcommand{\setupthreegluons}{% \fmftop{g3} \fmfbottom{g1,g2} \fmf{phantom}{v,g1} \fmf{phantom}{v,g2} \fmf{phantom}{v,g3} \fmffreeze \fmfipair{v,g[],a[],b[]} \fmfiset{g1}{vloc (__g1)} \fmfiset{g2}{vloc (__g2)} \fmfiset{g3}{vloc (__g3)} \fmfiset{v}{vloc (__v)} \fmfiset{a1}{g1 shifted (-3thin,0)} \fmfiset{b1}{g1 shifted (+1thin,-2thin)} \fmfiset{a2}{g2 shifted (0,-3thin)} \fmfiset{b2}{g2 shifted (0,+3thin)} \fmfiset{a3}{g3 shifted (+1thin,+2thin)} \fmfiset{b3}{g3 shifted (-3thin,0)}} \begin{empfile} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \frontmatter \title{ O'Mega:\\ Optimal~Monte-Carlo\\ Event~Generation~Amplitudes} \author{% Thorsten Ohl\thanks{% \texttt{ohl@physik.uni-wuerzburg.de}, \texttt{http://physik.uni-wuerzburg.de/ohl}}\\ \hfil\\ Institut f\"ur Theoretische~Physik und Astrophysik\\ Julius-Maximilians-Universit\"at~W\"urzburg\\ Emil-Hilb-Weg 22, 97074~W\"urzburg, Germany\\ \hfil\\ J\"urgen Reuter\thanks{\texttt{juergen.reuter@desy.de}}\\ \hfil\\ DESY Theory Group, Notkestr. 85, 22603 Hamburg, Germany\\ \hfil\\ Wolfgang Kilian${}^{c,}$\thanks{\texttt{kilian@physik.uni-siegen.de}}\\ \hfil\\ Theoretische Physik 1\\ Universit\"at Siegen\\ Walter-Flex-Str.~3, 57068 Siegen, Germany\\ \hfil\\ with contributions from Christian Speckner${}^{d,}$\thanks{\texttt{cnspeckn@googlemail.com}}\\ as well as Christian Schwinn et al.} \date{\textbf{unpublished draft, printed \timestamp}} \maketitle \begin{abstract} \ldots \end{abstract} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newpage \begin{quote} Copyright \textcopyright~1999-2017 by \begin{itemize} \item Wolfgang~Kilian ~\texttt{} \item Thorsten~Ohl~\texttt{} \item J\"urgen~Reuter~\texttt{} \end{itemize} \end{quote} \begin{quote} WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. \end{quote} \begin{quote} WHIZARD is distributed in the hope that it will be useful, but \emph{without any warranty}; without even the implied warranty of \emph{merchantability} or \emph{fitness for a particular purpose}. See the GNU General Public License for more details. \end{quote} \begin{quote} You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. \end{quote} \setcounter{tocdepth}{2} \tableofcontents \mainmatter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Introduction} \label{sec:intro} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Complexity} \label{sec:complexity} \begin{table} \begin{center} \begin{tabular}{r|r|r} $n$ & $P(n)$& $F(n)$ \\\hline 4 & 3 & 3 \\ 5 & 10 & 15 \\ 6 & 25 & 105 \\ 7 & 56 & 945 \\ 8 & 119 & 10395 \\ 9 & 246 & 135135 \\ 10 & 501 & 2027025 \\ 11 & 1012 & 34459425 \\ 12 & 2035 & 654729075 \\ 13 & 4082 & 13749310575 \\ 14 & 8177 & 316234143225 \\ 15 & 16368 & 7905853580625 \\ 16 & 32751 & 213458046676875 \end{tabular} \end{center} \caption{\label{tab:P(n),F(n)} The number of $\phi^3$ Feynman diagrams~$F(n)$ and independent poles~$P(n)$.} \end{table} There are \begin{equation} P(n) = \frac{2^n-2}{2} - n = 2^{n-1} - n - 1 \end{equation} independent internal momenta in a $n$-particle scattering amplitude~\cite{ALPHA:1997}. This grows much slower than the number \begin{equation} F(n) = (2n-5)!! = (2n-5)\cdot(2n-7)\cdot\ldots\cdot3\cdot1 \end{equation} of tree Feynman diagrams in vanilla $\phi^3$ (see table~\ref{tab:P(n),F(n)}). There are no known corresponding expressions for theories with more than one particle type. However, empirical evidence from numerical studies~\cite{ALPHA:1997,HELAC:2000} as well as explicit counting results from O'Mega suggest \begin{equation} P^*(n) \propto 10^{n/2} \end{equation} while he factorial growth of the number of Feynman diagrams remains unchecked, of course. The number of independent momenta in an amplitude is a better measure for the complexity of the amplitude than the number of Feynman diagrams, since there can be substantial cancellations among the latter. Therefore it should be possible to express the scattering amplitude more compactly than by a sum over Feynman diagrams. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Ancestors} \label{sec:ancestors} Some of the ideas that O'Mega is based on can be traced back to HELAS~\cite{HELAS}. HELAS builts Feynman amplitudes by recursively forming off-shell `wave functions' from joining external lines with other external lines or off-shell `wave functions'. The program Madgraph~\cite{MADGRAPH:1994} automatically generates Feynman diagrams and writes a Fortran program corresponding to their sum. The amplitudes are calculated by calls to HELAS~\cite{HELAS}. Madgraph uses one straightforward optimization: no statement is written more than once. Since each statement corresponds to a collection of trees, this optimization is very effective for up to four particles in the final state. However, since the amplitudes are given as a sum of Feynman diagrams, this optimization can, by design, \emph{not} remove the factorial growth and is substantially weaker than the algorithms of~\cite{ALPHA:1997,HELAC:2000} and the algorithm of O'Mega for more particles in the final state. Then ALPHA~\cite{ALPHA:1997} (see also the slightly modified variant~\cite{HELAC:2000}) provided a numerical algorithm for calculating scattering amplitudes and it could be shown empirically, that the calculational costs are rising with a power instead of factorially. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Architecture} \label{sec:architecture} \begin{figure} \begin{center} \includegraphics[width=\textwidth]{modules} %includegraphics[height=.8\textheight]{modules} \end{center} \caption{\label{fig:modules}% Module dependencies in O'Mega.} %% The diamond shaped nodes are abstract signatures defininng functor %% domains and co-domains. The rectangular boxes are modules and %% functors and oval boxes are examples for applications. \end{figure} \subsection{General purpose libraries} Functions that are not specific to O'Mega and could be part of the O'Caml standard library \begin{modules}{} \item[ThoList] (mostly) simple convenience functions for lists that are missing from the standard library module \ocwupperid{List} (section~\ref{sec:tholist}, p.~\pageref{sec:tholist}) \item[Product] effcient tensor products for lists and sets (section~\ref{sec:product}, p.~\pageref{sec:product}) \item[Combinatorics] combinatorical formulae, sets of subsets, etc. (section~\ref{sec:combinatorics}, p.~\pageref{sec:combinatorics}) \end{modules} \subsection{O'Mega} The non-trivial algorithms that constitute O'Mega: \begin{modules}{} \item[DAG] Directed Acyclical Graphs (section~\ref{sec:DAG}, p.~\pageref{sec:DAG}) \item[Topology] unusual enumerations of unflavored tree diagrams (section~\ref{sec:topology}, p.~\pageref{sec:topology}) \item[Momentum] finite sums of external momenta (section~\ref{sec:momentum}, p.~\pageref{sec:momentum}) \item[Fusion] off shell wave functions (section~\ref{sec:fusion}, p.~\pageref{sec:fusion}) \item[Omega] functor constructing an application from a model and a target (section~\ref{sec:omega}, p.~\pageref{sec:omega}) \end{modules} \subsection{Abstract interfaces} The domains and co-domains of functors (section~\ref{sec:coupling}, p.~\pageref{sec:coupling}) \begin{modules}{} \item[Coupling] all possible couplings (not comprensive yet) \item[Model] physical models \item[Target] target programming languages \end{modules} \subsection{Models} (section~\ref{sec:models}, p.~\pageref{sec:models}) \begin{modules}{} \item[Modellib_SM.QED] Quantum Electrodynamics \item[Modellib_SM.QCD] Quantum Chromodynamics (not complete yet) \item[Modellib_SM.SM] Minimal Standard Model (not complete yet) \end{modules} etc. \subsection{Targets} Any programming language that supports arithmetic and a textual representation of programs can be targeted by O'Caml. The implementations translate the abstract expressions derived by \ocwupperid{Fusion} to expressions in the target (section~\ref{sec:targets}, p.~\pageref{sec:targets}). \begin{modules}{} \item[Targets.Fortran] Fortran95 language implementation, calling subroutines \end{modules} Other targets could come in the future: \texttt{C}, \texttt{C++}, O'Caml itself, symbolic manipulation languages, etc. \subsection{Applications} (section~\ref{sec:omega}, p.~\pageref{sec:omega}) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{The Big To Do Lists} \label{sec:TODO} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Required} All features required for leading order physics applications are in place. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Useful} \begin{enumerate} \item select allowed helicity combinations for massless fermions \item Weyl-Van der Waerden spinors \item speed up helicity sums by using discrete symmetries \item general triple and quartic vector couplings \item diagnostics: count corresponding Feynman diagrams more efficiently for more than ten external lines \item recognize potential cascade decays ($\tau$, $b$, etc.) \begin{itemize} \item warn the user to add additional \item kill fusions (at runtime), that contribute to a cascade \end{itemize} \item complete standard model in $R_\xi$-gauge \item groves (the simple method of cloned generations works) \end{enumerate} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Future Features} \begin{enumerate} \item investigate if unpolarized squared matrix elements can be calculated faster as traces of densitiy matrices. Unfortunately, the answer apears to be \emph{no} for fermions and \emph{up to a constant factor} for massive vectors. Since the number of fusions in the amplitude grows like~$10^{n/2}$, the number of fusions in the squared matrix element grows like~$10^n$. On the other hand, there are $2^{\#\text{fermions}+\#\text{massless vectors}} \cdot3^{\#\text{massive vectors}}$ terms in the helicity sum, which grows \emph{slower} than~$10^{n/2}$. The constant factor is probably also not favorable. However, there will certainly be asymptotic gains for sums over gauge (and other) multiplets, like color sums. \item compile Feynman rules from Lagrangians \item evaluate amplitues in O'Caml by compiling it to three address code for a virtual machine \begin{flushleft} \ocwkw{type}~$\ocwlowerid{mem}~=~\ocwlowerid{scalar}~$\ocwbt{array}~$% \times{}~\ocwlowerid{spinor}~$\ocwbt{array}~$% \times{}~\ocwlowerid{spinor}~$\ocwbt{array}~$% \times{}~\ocwlowerid{vector}~$\ocwbt{array}\\ \ocwkw{type}~$\ocwlowerid{instr}~=$\\ \qquad|~$\ocwupperid{VSS}~$\ocwkw{of}~\ocwbt{int}~$% \times{}~$\ocwbt{int}~$\times{}~$\ocwbt{int}\\ \qquad|~$\ocwupperid{SVS}~$\ocwkw{of}~\ocwbt{int}~$% \times{}~$\ocwbt{int}~$\times{}~$\ocwbt{int}\\ \qquad|~$\ocwupperid{AVA}~$\ocwkw{of}~\ocwbt{int}~$% \times{}~$\ocwbt{int}~$\times{}~$\ocwbt{int}\\ \qquad\ldots \end{flushleft} this could be as fast as~\cite{ALPHA:1997} or~\cite{HELAC:2000}. \item a virtual machine will be useful for for other target as well, because native code appears to become to large for most compilers for more than ten external particles. Bytecode might even be faster due to improved cache locality. \item use the virtual machine in O'Giga \end{enumerate} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Science Fiction} \begin{enumerate} \item numerical and symbolical loop calculations with \textsc{O'Tera: O'Mega Tool for Evaluating Renormalized Amplitudes} \end{enumerate} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Tuples and Polytuples} \label{sec:tuple} \module{tuple} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Topologies} \label{sec:topology} \module{topology} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Directed Acyclical Graphs} \label{sec:DAG} \module{DAG} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Momenta} \label{sec:momentum} \module{momentum} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Cascades} \label{sec:cascades} \module{cascade_syntax} \section{Lexer} \lexer{cascade} \section{Parser} \parser{cascade} \module{cascade} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Color} \label{sec:color} \module{color} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Fusions} \label{sec:fusion} \module{fusion} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Lorentz Representations, Couplings, Models and Targets} \label{sec:coupling} \signature{coupling} \signature{model} +\module{dirac} \module{vertex} \signature{target} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Conserved Quantum Numbers} \label{sec:charges} \module{charges} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Colorization} \label{sec:colorize} \module{colorize} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Processes} \label{sec:process} \module{process} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Model Files} \label{sec:model-files} \module{vertex_syntax} \section{Lexer} \lexer{vertex} \section{Parser} \parser{vertex} \module{vertex} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{UFO Models} \label{sec:ufo} \section{Abstract Expression Syntax} \module{UFOx_syntax} \section{Expression Lexer} \lexer{UFOx} \section{Expression Parser} \parser{UFOx} \section{Expressions} \module{UFOx} \section{Abstract Syntax} \module{UFO_syntax} \section{Lexer} \lexer{UFO} \section{Parser} \parser{UFO} \section{Models} +\module{UFO_Lorentz} \module{UFO} \section{Targets} \module{UFO_targets} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Hardcoded Targets} \label{sec:targets} \module{format_Fortran} \module{targets} \module{targets_Kmatrix} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Phase Space} \label{sec:phasespace} \module{phasespace} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Whizard} \label{sec:whizard} Talk to~\cite{Kilian:WHIZARD}. \module{whizard} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Applications} \label{sec:omega} \section{Sample} {\small\verbatiminput{sample.prc}} \module{omega} %application{omega_Phi3} %application{omega_Phi3h} %application{omega_Phi4} %application{omega_Phi4h} \application{omega_QED} %application{omega_QCD} %application{omega_SM3} %application{omega_SM3_ac} \application{omega_SM} \application{omega_SYM} %application{omega_SM_ac} %application{f90Maj_SM} %application{f90Maj_SM4} %application{omega_MSSM} %application{omega_MSSM_g} %application{omega_SM_Rxi} %application{omega_SM_clones} %application{omega_THDM} %application{omega_SMh} %application{omega_SM4h} %application{helas_QED} %application{helas_QCD} %application{helas_SM} %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% \chapter{O'Giga: O'Mega Graphical Interface for Generation and Analysis} %%% \label{sec:ogiga} %%% {\itshape NB: The code in this chapter \emph{must} be compiled with %%% \verb+-labels+, since \verb+lablgtk+ doesn't appear to work in classic mode.} %%% \begin{dubious} %%% Keep in mind that \texttt{ocamlweb} doesn't work properly with %%% O'Caml~3 yet. The colons in label declarations are typeset with %%% erroneous white space. %%% \end{dubious} %%% %%% \application{ogiga} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter*{Acknowledgements} We thank Mauro Moretti for fruitful discussions of the ALPHA algorithm~\cite{ALPHA:1997}, that inspired our solution of the double counting problem. We thank Wolfgang Kilian for providing the WHIZARD environment that turns our numbers into real events with unit weight. Thanks to the ECFA/DESY workshops and their participants for providing a showcase. Thanks to Edward Boos for discussions in Kaluza-Klein gravitons. This research is supported by Bundesministerium f\"ur Bildung und Forschung, Germany, (05\,HT9RDA) and Deutsche Forschungsgemeinschaft (MA\,676/6-1). Thanks to the Caml and Objective Caml teams from INRIA for the development and the lean and mean implementation of a programming language that does not insult the programmer's intelligence. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{thebibliography}{10} \bibitem{ALPHA:1997} F. Caravaglios, M. Moretti, Z.{} Phys.{} \textbf{C74} (1997) 291. \bibitem{HELAC:2000} A. Kanaki, C. Papadopoulos, DEMO-HEP-2000/01, hep-ph/0002082, February 2000. \bibitem{Ler97} Xavier Leroy, \textit{The Objective Caml system, documentation and user's guide}, Technical Report, INRIA, 1997. \bibitem{Okasaki:1998:book} Chris Okasaki, \textit{Purely Functional Data Structures}, Cambridge University Press, 1998. \bibitem{HELAS} H. Murayama, I. Watanabe, K. Hagiwara, KEK Report 91-11, January 1992. \bibitem{MADGRAPH:1994} T. Stelzer, W.F. Long, Comput.{} Phys.{} Commun.{} \textbf{81} (1994) 357. \bibitem{Denner:Majorana} A. Denner, H. Eck, O. Hahn and J. K\"ublbeck, Phys.{} Lett.{} \textbf{B291} (1992) 278; Nucl.{} Phys.{} \textbf{B387} (1992) 467. \bibitem{Barger/etal:1992:color} V.~Barger, A.~L.~Stange, R.~J.~N.~Phillips, Phys.~Rev.~\textbf{D45}, (1992) 1751. \bibitem{Ohl:LOTR} T. Ohl, \textit{Lord of the Rings}, (Computer algebra library for O'Caml, unpublished). \bibitem{Ohl:bocages} T. Ohl, \textit{Bocages}, (Feynman diagram library for O'Caml, unpublished). \bibitem{Kilian:WHIZARD} W. Kilian, \textit{\texttt{WHIZARD}}, University of Karlsruhe, 2000. \bibitem{Boos/Ohl:groves} E.\,E. Boos, T. Ohl, Phys.\ Rev.\ Lett.\ \textbf{83} (1999) 480. \bibitem{Han/Lykken/Zhang:1999:Kaluza-Klein} T.~Han, J.~D.~Lykken and R.~Zhang, %``On Kaluza-Klein states from large extra dimensions,'' Phys.{} Rev.{} \textbf{D59} (1999) 105006 [hep-ph/9811350]. %%CITATION = HEP-PH 9811350;%% \bibitem{PTVF92} William H. Press, Saul A. Teukolsky, William T. Vetterling, Brian P. Flannery, \textit{Numerical Recipes: The Art of Scientific Computing}, Second Edition, Cambridge University Press, 1992. \bibitem{Cvi76} P.~Cvitanovi\'c, % author={Predrag Cvitanovi\'c}, % title={Group Theory for {Feynman} Diagrams in Non-{Abelian} % Gauge Theories}, Phys.{} Rev.{} \textbf{D14} (1976) 1536. %%%\bibitem{Kleiss/etal:Color-Monte-Carlo} %%% \begin{dubious} %%% ``\texttt{Kleiss/etal:Color-Monte-Carlo}'' %%% \end{dubious} +%\cite{Kilian:2012pz} +\bibitem{Kilian:2012pz} + W.~Kilian, T.~Ohl, J.~Reuter and C.~Speckner, + %``QCD in the Color-Flow Representation,'' + JHEP \textbf{1210} (2012) 022 + [arXiv:1206.3700 [hep-ph]]. + %%CITATION = doi:10.1007/JHEP10(2012)022;%% + %37 citations counted in INSPIRE as of 23 Apr 2019 \end{thebibliography} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \appendix %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Autotools} \label{sec:autotools} \module{config} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Textual Options} \label{sec:options} \module{options} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Progress Reports} \label{sec:progress} \module{progress} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{More on Filenames} \label{sec:thoFilename} \module{thoFilename} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Cache Files} \label{sec:cache} \module{cache} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{More On Lists} \label{sec:tholist} \module{thoList} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{More On Arrays} \label{sec:thoarray} \module{thoArray} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{More On Strings} \label{sec:thostring} \module{thoString} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Polymorphic Maps} \label{sec:pmap} From~\cite{Ohl:LOTR}. \module{pmap} \module{partial} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Tries} \label{sec:trie} From~\cite{Okasaki:1998:book}, extended for~\cite{Ohl:LOTR}. \module{trie} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Tensor Products} \label{sec:product} From~\cite{Ohl:LOTR}. \module{product} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{(Fiber) Bundles} \label{sec:bundle} \module{bundle} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Power Sets} \label{sec:powSet} \module{powSet} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Combinatorics} \label{sec:combinatorics} \module{combinatorics} \module{permutation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Partitions} \label{sec:partition} \module{partition} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Trees} \label{sec:tree} From~\cite{Ohl:bocages}: Trees with one root admit a straightforward recursive definition \begin{equation} \label{eq:trees} T(N,L) = L \cup N\times T(N,L)\times T(N,L) \end{equation} that is very well adapted to mathematical reasoning. Such recursive definitions are useful because they allow us to prove properties of elements by induction \begin{multline} \label{eq:tree-induction} \forall l\in L: p(l) \land (\forall n\in N: \forall t_1,t_2\in T(N,L): p(t_1) \land p(t_2) \Rightarrow p(n\times t_1\times t_2)) \\ \Longrightarrow \forall t\in T(N,L): p(t) \end{multline} i.\,e.~establishing a property for all leaves and showing that a node automatically satisfies the property if it is true for all children proves the property for \emph{all} trees. This induction is of course modelled after standard mathematical induction \begin{equation} p(1) \land (\forall n\in \mathbf{N}: p(n) \Rightarrow p(n+1)) \Longrightarrow \forall n\in \mathbf{N}: p(n) \end{equation} The recursive definition~(\ref{eq:trees}) is mirrored by the two tree construction functions\footnote{To make the introduction more accessible to non-experts, I avoid the `curried' notation for functions with multiple arguments and use tuples instead. The actual implementation takes advantage of curried functions, however. Experts can read $\alpha\to\beta\to\gamma$ for $\alpha\times\beta\to\gamma$.} \begin{subequations} \begin{align} \ocwlowerid{leaf}:\;& \nu\times\lambda \to(\nu,\lambda) T \\ \ocwlowerid{node}:\;& \nu\times(\nu,\lambda)T \times(\nu,\lambda)T \to(\nu,\lambda)T \end{align} \end{subequations} Renaming leaves and nodes leaves the structure of the tree invariant. Therefore, morphisms~$L\to L'$ and~$N\to N'$ of the sets of leaves and nodes induce natural homomorphisms~$T(N,L)\to T(N',L')$ of trees \begin{equation} \ocwlowerid{map}:\; (\nu\to\nu')\times(\lambda\to\lambda') \times(\nu,\lambda)T \to(\nu',\lambda') T \end{equation} The homomorphisms constructed by \ocwlowerid{map} are trivial, but ubiquitous. More interesting are the morphisms \begin{equation} \begin{aligned} \ocwlowerid{fold}:\;& (\nu\times\lambda\to\alpha) \times(\nu\times\alpha\times\alpha\to\alpha) \times(\nu,\lambda)T \to\alpha \\ & (f_1,f_2,l\in L) \mapsto f_1(l) \\ & (f_1,f_2,(n,t_1,t_2)) \mapsto f_2(n,\ocwlowerid{fold}(f_1,f_2,t_1), \ocwlowerid{fold}(f_1,f_2,t_2)) \end{aligned} \end{equation} and \begin{equation} \begin{aligned} \ocwlowerid{fan}:\;& (\nu\times\lambda\to\{\alpha\}) \times(\nu\times\alpha\times\alpha\to\{\alpha\}) \times(\nu,\lambda)T \to\{\alpha\} \\ & (f_1,f_2,l\in L) \mapsto f_1(l) \\ & (f_1,f_2,(n,t_1,t_2)) \mapsto f_2(n, \ocwlowerid{fold}(f_1,f_2,t_1) \otimes\ocwlowerid{fold}(f_1,f_2,t_2)) \end{aligned} \end{equation} where the tensor product notation means that~$f_2$ is applied to all combinations of list members in the argument: \begin{equation} \phi(\{x\}\otimes \{y\}) = \left\{ \phi(x,y) | x\in\{x\} \land y\in\{y\} \right\} \end{equation} But note that due to the recursive nature of trees, \ocwlowerid{fan} is \emph{not} a morphism from $T(N,L)$ to $T(N\otimes N,L)$.\par If we identify singleton sets with their members, \ocwlowerid{fold} could be viewed as a special case of \ocwlowerid{fan}, but that is probably more confusing than helpful. Also, using the special case~$\alpha=(\nu',\lambda')T$, the homomorphism \ocwlowerid{map} can be expressed in terms of \ocwlowerid{fold} and the constructors \begin{equation} \begin{aligned} \ocwlowerid{map}:\;& (\nu\to\nu')\times(\lambda\to\lambda') \times(\nu,\lambda)T \to(\nu',\lambda')T \\ &(f,g,t) \mapsto \ocwlowerid{fold} (\ocwlowerid{leaf}\circ (f\times g), \ocwlowerid{node}\circ (f\times\ocwlowerid{id} \times\ocwlowerid{id}), t) \end{aligned} \end{equation} \ocwlowerid{fold} is much more versatile than \ocwlowerid{map}, because it can be used with constructors for other tree representations to translate among different representations. The target type can also be a mathematical expression. This is used extensively below for evaluating Feynman diagrams.\par Using \ocwlowerid{fan} with~$\alpha=(\nu',\lambda')T$ can be used to construct a multitude of homomorphic trees. In fact, below it will be used extensively to construct all Feynman diagrams~$\{(\nu,\{p_1,\ldots,p_n\})T\}$ of a given topology~$t\in (\emptyset,\{1,\ldots,n\})T$. \begin{dubious} The physicist in me guesses that there is another morphism of trees that is related to \ocwlowerid{fan} like a Lie-algebra is related to the it's Lie-group. I have not been able to pin it down, but I guess that it is a generalization of \ocwlowerid{grow} below. \end{dubious} \module{tree} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Dependency Trees} \label{sec:tree2} \module{tree2} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Consistency Checks} \label{sec:count} \application{count} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Complex Numbers} \label{sec:complex} \module{complex} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Algebra} \label{sec:algebra} \module{algebra} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Simple Linear Algebra} \label{sec:linalg} \module{linalg} %application{test_linalg} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Partial Maps} \label{sec:partial} \module{partial} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Talk To The WHiZard \ldots} \label{sec:whizard_tool} Talk to~\cite{Kilian:WHIZARD}. \begin{dubious} Temporarily disabled, until, we implement some conditional weaving\ldots \end{dubious} %application{whizard_tool} %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% \chapter{Widget Library and Class Hierarchy for O'Giga} %%% \label{sec:thogtk} %%% {\itshape NB: The code in this chapter \emph{must} be compiled with %%% \verb+-labels+, since \verb+lablgtk+ doesn't appear to work in classic mode.} %%% \begin{dubious} %%% Keep in mind that \texttt{ocamlweb} doesn't work properly with %%% O'Caml~3 yet. The colons in label declarations are typeset with %%% erroneous white space. %%% \end{dubious} %%% %%% \section{Architecture} %%% In \texttt{lablgtk}, O'Caml objects are typically constructed in %%% parallel to constructors for \texttt{GTK+} widgets. The objects %%% provide inheritance and all that, while the constructors implement the %%% semantics. %%% %%% \subsection{Inheritance vs.~Aggregation} %%% We have two mechanisms for creating new widgets: inheritance and %%% aggregation. Inheritance makes it easy to extend a given widget with %%% new methods or to combine orthogonal widgets (\emph{multiple %%% inheritance}). Aggregation is more suitable for combining %%% non-orthogonal widgets (e.\,g.~multiple instances of the same widget). %%% %%% The problem with inheritance in \texttt{lablgtk} is, that it is a %%% \emph{bad} idea to implement the semantics in the objects. In a %%% multi-level inheritance hierarchy, O'Caml can evaluate class functions %%% more than once. Since functions accessing \texttt{GTK+} change the %%% state of \texttt{GTK+}, we could accidentally violate invariants. %%% Therefore inheritance forces us to use the two-tiered approach of %%% \texttt{lablgtk} ourselves. It is not really complicated, but tedious %%% and it appears to be a good idea to use aggregation whenever in doubt. %%% %%% Nevertheless, there are examples (like %%% \ocwupperid{ThoGButton.mutable\_button} below, where just one new %%% method is added), that cry out for inheritance for the benefit of the %%% application developer. %%% %%% \module{thoGWindow} %%% \module{thoGButton} %%% \module{thoGMenu} %%% \module{thoGDraw} %%% %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% \chapter{O'Mega Virtual Machine} %%% \label{sec:ovm} %%% \module{OVM} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{\texttt{Fortran} Libraries} \label{sec:fortran} \input{omegalib} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{raggedright} \ifpdf \chapter{Index} \let\origtwocolumn\twocolumn \def\twocolumn[#1]{\origtwocolumn}% This index has been generated automatically and might not be 100\%ly accurate. In particular, hyperlinks have been observed to be off by one page. \fi \input{index.tex} \end{raggedright} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{empfile} \end{fmffile} \end{document} \endinput Local Variables: mode:latex indent-tabs-mode:nil page-delimiter:"^%%%%%.*\n" End: Index: trunk/omega/src/dump_ufo.sh =================================================================== --- trunk/omega/src/dump_ufo.sh (revision 8274) +++ trunk/omega/src/dump_ufo.sh (revision 8275) @@ -1,21 +1,31 @@ #! /bin/sh +######################################################################## +# This script is for developers only and needs not to be portable. +# This script takes TO's directory structure for granted. +######################################################################## +# tl;dr : don't try this at home, kids ;) +######################################################################## jobs=12 UFO_SM=$HOME/physics/SM/ -UFO_SMEFT=$HOME/physics/SMEFT_mW_UFO/ +UFO_MSSM=$HOME/physics/MSSM_UFO/ UFO_SMEFT=$HOME/physics/SMEFTsim_A_U35_alphaScheme_UFO_v2_1/ +UFO_SMEFT=$HOME/physics/SMEFT_mW_UFO/ root=$HOME/physics/whizard build=$root/_build +omega=omega_UFO case X"$1" in X"-SM") UFO=$UFO_SM; shift;; X"-SMEFT") UFO=$UFO_SMEFT; shift;; + X"-MSSM") UFO=$UFO_MSSM; omega=omega_UFO_Majorana; shift;; + X"-X") UFO="$2"; shift 2;; *) UFO=$UFO_SM;; esac OCAMLFLAGS="-w -D -warn-error +P" make OCAMLFLAGS="$OCAMLFLAGS" -j $jobs -C $build/omega/src || exit 1 -make -j $jobs -C $build/omega/bin omega_UFO.opt || exit 1 -$build/omega/bin/omega_UFO.opt -model:UFO_dir $UFO -model:dump -model:exec "$@" +make -j $jobs -C $build/omega/bin $omega.opt || exit 1 +$build/omega/bin/$omega.opt -model:UFO_dir $UFO -model:dump -model:exec "$@" Index: trunk/omega/src/modeltools.ml =================================================================== --- trunk/omega/src/modeltools.ml (revision 8274) +++ trunk/omega/src/modeltools.ml (revision 8275) @@ -1,474 +1,573 @@ (* modeltools.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Compilation} *) (* Flavors and coupling constants: flavors can be tested for equality and charge conjugation is defined. *) module type Flavor = sig type f type c val compare : f -> f -> int val conjugate : f -> f end (* Compiling fusions from a list of vertices: *) module type Fusions = sig type t type f type c val fuse2 : t -> f -> f -> (f * c Coupling.t) list val fuse3 : t -> f -> f -> f -> (f * c Coupling.t) list val fuse : t -> f list -> (f * c Coupling.t) list val of_vertices : (((f * f * f) * c Coupling.vertex3 * c) list * ((f * f * f * f) * c Coupling.vertex4 * c) list * (f list * c Coupling.vertexn * c) list) -> t end module Fusions (F : Flavor) : Fusions with type f = F.f and type c = F.c = struct type f = F.f type c = F.c module F2 = struct type t = f * f let hash = Hashtbl.hash let compare (f1, f2) (f1', f2') = let c1 = F.compare f1 f1' in if c1 <> 0 then c1 else F.compare f2 f2' let equal f f' = compare f f' = 0 end module F3 = struct type t = f * f * f let hash = Hashtbl.hash let compare (f1, f2, f3) (f1', f2', f3') = let c1 = F.compare f1 f1' in if c1 <> 0 then c1 else let c2 = F.compare f2 f2' in if c2 <> 0 then c2 else F.compare f3 f3' let equal f f' = compare f f' = 0 end module Fn = struct type t = f list let hash = Hashtbl.hash let compare f f' = ThoList.compare ~cmp:F.compare f f' let equal f f' = compare f f' = 0 end module H2 = Hashtbl.Make (F2) module H3 = Hashtbl.Make (F3) module Hn = Hashtbl.Make (Fn) type t = { v3 : (f * c Coupling.t) list H2.t; v4 : (f * c Coupling.t) list H3.t; vn : (f * c Coupling.t) list Hn.t } + let lookup_fuse2 table f1 f2 = + try H2.find table.v3 (f1, f2) with Not_found -> [] + + let lookup_fuse3 table f1 f2 f3 = + try H3.find table.v4 (f1, f2, f3) with Not_found -> [] + + let lookup_fusen table f = + try Hn.find table.vn f with Not_found -> [] + let fuse2 table f1 f2 = - try - H2.find table.v3 (f1, f2) - with - | Not_found -> [] + List.rev_append + (lookup_fusen table [f1; f2]) + (lookup_fuse2 table f1 f2) let fuse3 table f1 f2 f3 = - try - H3.find table.v4 (f1, f2, f3) - with - | Not_found -> [] + List.rev_append + (lookup_fusen table [f1; f2; f3]) + (lookup_fuse3 table f1 f2 f3) let fusen table f = - try - Hn.find table.vn f - with - | Not_found -> [] + lookup_fusen table f - let fuse table = function + let fuse table = function | [] | [_] -> invalid_arg "Fusions().fuse" | [f1; f2] -> fuse2 table f1 f2 | [f1; f2; f3] -> fuse3 table f1 f2 f3 | f -> fusen table f (* Note that a pair or a triplet can appear more than once (e.\,g.~$e^+e^-\to \gamma$ and~$e^+e^-\to Z$). Therefore don't replace the entry, but augment it instead. *) let add_fusion2 table f1 f2 fusions = - H2.add table.v3 (f1, f2) (fusions :: fuse2 table f1 f2) + H2.add table.v3 (f1, f2) (fusions :: lookup_fuse2 table f1 f2) let add_fusion3 table f1 f2 f3 fusions = - H3.add table.v4 (f1, f2, f3) (fusions :: fuse3 table f1 f2 f3) + H3.add table.v4 (f1, f2, f3) (fusions :: lookup_fuse3 table f1 f2 f3) let add_fusionn table f fusions = - Hn.add table.vn f (fusions :: fusen table f) + Hn.add table.vn f (fusions :: lookup_fusen table f) (* \begin{dubious} Do we need to take into account the charge conjugation of the coupling constants here? \end{dubious} *) (* If some flavors are identical, we must not introduce the same vertex more than once: *) open Coupling let permute3 (f1, f2, f3) = [ (f1, f2), F.conjugate f3, F12; (f2, f1), F.conjugate f3, F21; (f2, f3), F.conjugate f1, F23; (f3, f2), F.conjugate f1, F32; (f3, f1), F.conjugate f2, F31; (f1, f3), F.conjugate f2, F13 ] (* Here we add identical permutations of pairs only once: *) module F2' = Set.Make (F2) let add_permute3 table v c set ((f1, f2 as f12), f, p) = if F2'.mem f12 set then set else begin add_fusion2 table f1 f2 (f, V3 (v, p, c)); F2'.add f12 set end let add_vertex3 table (f123, v, c) = ignore (List.fold_left (fun set f -> add_permute3 table v c set f) F2'.empty (permute3 f123)) (* \begin{dubious} Handling all the cases explicitely is OK for cubic vertices, but starts to become questionable already for quartic couplings. The advantage remains that we can check completeness in [Targets]. \end{dubious} *) let permute4 (f1, f2, f3, f4) = [ (f1, f2, f3), F.conjugate f4, F123; (f2, f3, f1), F.conjugate f4, F231; (f3, f1, f2), F.conjugate f4, F312; (f2, f1, f3), F.conjugate f4, F213; (f3, f2, f1), F.conjugate f4, F321; (f1, f3, f2), F.conjugate f4, F132; (f1, f2, f4), F.conjugate f3, F124; (f2, f4, f1), F.conjugate f3, F241; (f4, f1, f2), F.conjugate f3, F412; (f2, f1, f4), F.conjugate f3, F214; (f4, f2, f1), F.conjugate f3, F421; (f1, f4, f2), F.conjugate f3, F142; (f1, f3, f4), F.conjugate f2, F134; (f3, f4, f1), F.conjugate f2, F341; (f4, f1, f3), F.conjugate f2, F413; (f3, f1, f4), F.conjugate f2, F314; (f4, f3, f1), F.conjugate f2, F431; (f1, f4, f3), F.conjugate f2, F143; (f2, f3, f4), F.conjugate f1, F234; (f3, f4, f2), F.conjugate f1, F342; (f4, f2, f3), F.conjugate f1, F423; (f3, f2, f4), F.conjugate f1, F324; (f4, f3, f2), F.conjugate f1, F432; (f2, f4, f3), F.conjugate f1, F243 ] (* Add identical permutations of triplets only once: *) module F3' = Set.Make (F3) let add_permute4 table v c set ((f1, f2, f3 as f123), f, p) = if F3'.mem f123 set then set else begin add_fusion3 table f1 f2 f3 (f, V4 (v, p, c)); F3'.add f123 set end let add_vertex4 table (f1234, v, c) = ignore (List.fold_left (fun set f -> add_permute4 table v c set f) F3'.empty (permute4 f1234)) + module Fn' = Set.Make (Fn) + + let permuten = function + | [] -> invalid_arg "Modeltools.permuten" + | f -> + List.map + (fun f' -> + match List.split f' with + | i :: i_list, f :: f_list -> + (f_list, F.conjugate f, i_list @ [i]) + | _ -> failwith "Modeltools.permuten: impossible") + (Combinatorics.permute (ThoList.enumerate 1 f)) + + (* This is for debugging: it provides the same permutations + than the legacy version. *) + let permutations = function + | [f1; f2; f3] -> + [ [f1; f2; f3]; + [f2; f1; f3]; + [f2; f3; f1]; + [f3; f2; f1]; + [f3; f1; f2]; + [f1; f3; f2] ] + | [f1; f2; f3; f4] -> + [ [f1; f2; f3; f4]; + [f1; f2; f4; f3]; + [f1; f3; f2; f4]; + [f1; f3; f4; f2]; + [f1; f4; f2; f3]; + [f1; f4; f3; f2]; + [f2; f1; f3; f4]; + [f2; f1; f4; f3]; + [f2; f3; f1; f4]; + [f2; f3; f4; f1]; + [f2; f4; f1; f3]; + [f2; f4; f3; f1]; + [f3; f1; f2; f4]; + [f3; f1; f4; f2]; + [f3; f2; f1; f4]; + [f3; f2; f4; f1]; + [f3; f4; f1; f2]; + [f3; f4; f2; f1]; + [f4; f1; f2; f3]; + [f4; f1; f3; f2]; + [f4; f2; f1; f3]; + [f4; f2; f3; f1]; + [f4; f3; f1; f2]; + [f4; f3; f2; f1] ] + | flist -> Combinatorics.permute flist + + let permutations = Combinatorics.permute + + let permuten = function + | [] -> invalid_arg "Modeltools.permuten" + | f -> + List.map + (fun f' -> + match List.split (List.rev f') with + | i_list, f :: f_list -> + (* [Printf.eprintf + "permuten: %s\n" + (ThoList.to_string string_of_int (List.rev i_list));] *) + (List.rev f_list, F.conjugate f, List.rev i_list) + | _ -> failwith "Modeltools.permuten: impossible") + (permutations (ThoList.enumerate 1 f)) + + let add_permuten table v c set (f12__n, f, p) = + if Fn'.mem f12__n set then + set + else begin + add_fusionn table f12__n (f, Vn (v, p, c)); + Fn'.add f12__n set + end + + (* \begin{dubious} + We could apply any necessary permutations + to objects that are hidden inside of the vertex [v] here + instead of in [Fusion.stat_fuse] and [Colorize.fuse]. + \end{dubious} *) + let add_vertexn table (f12__n, v, c) = + ignore + (List.fold_left + (fun set f -> add_permuten table v c set f) + Fn'.empty (permuten f12__n)) + let of_vertices (vlist3, vlist4, vlistn) = - match vlistn with - | [] -> - let table = - { v3 = H2.create 37; v4 = H3.create 37; vn = Hn.create 37 } in - List.iter (add_vertex3 table) vlist3; - List.iter (add_vertex4 table) vlist4; - table - | _ -> failwith "Models.Fusions.of_vertices: incomplete" + let table = + { v3 = H2.create 37; v4 = H3.create 37; vn = Hn.create 37 } in + List.iter (add_vertex3 table) vlist3; + List.iter (add_vertex4 table) vlist4; + List.iter (add_vertexn table) vlistn; + table end module type Constant = sig type t val of_string : string -> t end module Constant (M : Model.T) : Constant with type t = M.constant = struct type t = M.constant module String_Key = struct type t = string let hash = Hashtbl.hash let equal = (=) end module String_Hash = Hashtbl.Make (String_Key) let table = String_Hash.create 37 let fill_table table vs = List.iter (fun (_, _, c) -> String_Hash.add table (M.constant_symbol c) c) vs (* Delay loading of the tables until the first use, so that [M.vertices] can be initialized from a file. *) let tables_filled = ref false let fill_tables () = if not !tables_filled then begin let (v3, v4, vn) = M.vertices () in fill_table table v3; fill_table table v4; fill_table table vn; tables_filled := true end let of_string name = try fill_tables (); String_Hash.find table name with | Not_found -> invalid_arg ("Constant(Model).of_string: unknown coupling constant: " ^ name) end (* \thocwmodulesection{Mutable Models} *) module Mutable (FGC : sig type f and g and c end) : Model.Mutable with type flavor = FGC.f and type gauge = FGC.g and type constant = FGC.c = struct type flavor = FGC.f type gauge = FGC.g type constant = FGC.c let init () = () let options = Options.empty module Ch = Charges.Null let charges _ = () exception Uninitialized of string let uninitialized name = raise (Uninitialized name) (* Note that [lookup] works, by the magic of currying, for any arity. But we need to supply one argument to delay evaluation. *) (* Also note that the references are \emph{not} shared among results of functor applications. Simple module renaming causes sharing. *) let declare template = let reference = ref template in let update fct = reference := fct and lookup arg = !reference arg in (update, lookup) let set_color, color = declare (fun f -> uninitialized "color") + let set_nc, nc = + declare (fun f -> uninitialized "nc") + let set_pdg, pdg = declare (fun f -> uninitialized "pdg") let set_lorentz, lorentz = declare (fun f -> uninitialized "lorentz") let set_propagator, propagator = declare (fun f -> uninitialized "propagator") let set_width, width = declare (fun f -> uninitialized "width") let set_goldstone, goldstone = declare (fun f -> uninitialized "goldstone") let set_conjugate, conjugate = declare (fun f -> uninitialized "conjugate") let set_fermion, fermion = declare (fun f -> uninitialized "fermion") let set_max_degree, max_degree = declare (fun () -> uninitialized "max_degree") let set_vertices, vertices = declare (fun () -> uninitialized "vertices") let set_fuse2, fuse2 = declare (fun f1 f2 -> uninitialized "fuse2") let set_fuse3, fuse3 = declare (fun f1 f2 f3 -> uninitialized "fuse3") let set_fuse, fuse = declare (fun f -> uninitialized "fuse") let set_flavors, flavors = declare (fun () -> []) let set_external_flavors, external_flavors = declare (fun () -> [("uninitialized", [])]) let set_parameters, parameters = declare (fun () -> uninitialized "parameters") let set_flavor_of_string, flavor_of_string = declare (fun f -> uninitialized "flavor_of_string") let set_flavor_to_string, flavor_to_string = declare (fun f -> uninitialized "flavor_to_string") let set_flavor_to_TeX, flavor_to_TeX = declare (fun f -> uninitialized "flavor_to_TeX") let set_flavor_symbol, flavor_symbol = declare (fun f -> uninitialized "flavor_symbol") let set_gauge_symbol, gauge_symbol = declare (fun g -> uninitialized "gauge_symbol") let set_mass_symbol, mass_symbol = declare (fun f -> uninitialized "mass_symbol") let set_width_symbol, width_symbol = declare (fun f -> uninitialized "width_symbol") let set_constant_symbol, constant_symbol = declare (fun c -> uninitialized "constant_symbol") module F = Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) - let setup ~color ~pdg ~lorentz ~propagator ~width ~goldstone + let max_degree_of_vertices (v3, v4, vn) = + List.fold_left + (fun acc (p, _, _) -> max acc (List.length p)) + (max (match v3 with [] -> 0 | _ -> 3) (match v4 with [] -> 0 | _ -> 4)) + vn + + let setup ~color ~nc ~pdg ~lorentz ~propagator ~width ~goldstone ~conjugate ~fermion ~vertices ~flavors ~parameters ~flavor_of_string ~flavor_to_string ~flavor_to_TeX ~flavor_symbol ~gauge_symbol ~mass_symbol ~width_symbol ~constant_symbol = set_color color; + set_nc nc; set_pdg pdg; set_lorentz lorentz; set_propagator propagator; set_width width; set_goldstone goldstone; set_conjugate conjugate; set_fermion fermion; - let (_, v4, _) as v = vertices () in - set_max_degree (fun () -> match v4 with [] -> 3 | _ -> 4); + let v = vertices () in + let max_degree = max_degree_of_vertices v in + set_max_degree (fun () -> max_degree); set_vertices (fun () -> v); let table = F.of_vertices v in set_fuse2 (F.fuse2 table); set_fuse3 (F.fuse3 table); set_fuse (F.fuse table); set_external_flavors (fun () -> flavors); let flavors = ThoList.flatmap snd flavors in set_flavors (fun () -> flavors); set_parameters parameters; set_flavor_of_string flavor_of_string; set_flavor_to_string flavor_to_string; set_flavor_to_TeX flavor_to_TeX; set_flavor_symbol flavor_symbol; set_gauge_symbol gauge_symbol; set_mass_symbol mass_symbol; set_width_symbol width_symbol; set_constant_symbol constant_symbol end module Static (M : Model.T) = struct type flavor = M.flavor type gauge = M.gauge type constant = M.constant module Ch = M.Ch let color = M.color + let nc = M.nc let charges = M.charges let pdg = M.pdg let lorentz = M.lorentz let propagator = M.propagator let width = M.width let conjugate = M.conjugate let fermion = M.fermion let max_degree = M.max_degree let vertices = M.vertices let fuse2 = M.fuse2 let fuse3 = M.fuse3 let fuse = M.fuse let flavors = M.flavors let external_flavors = M.external_flavors let goldstone = M.goldstone let parameters = M.parameters let flavor_of_string = M.flavor_of_string let flavor_to_string = M.flavor_to_string let flavor_to_TeX = M.flavor_to_TeX let flavor_symbol = M.flavor_symbol let gauge_symbol = M.gauge_symbol let mass_symbol = M.mass_symbol let width_symbol = M.width_symbol let constant_symbol = M.constant_symbol let options = M.options let init () = () - let setup ~color ~pdg ~lorentz ~propagator ~width ~goldstone + let setup ~color ~nc ~pdg ~lorentz ~propagator ~width ~goldstone ~conjugate ~fermion ~vertices ~flavors ~parameters ~flavor_of_string ~flavor_to_string ~flavor_to_TeX ~flavor_symbol ~gauge_symbol ~mass_symbol ~width_symbol ~constant_symbol = () end Index: trunk/omega/src/omega_MSSM.ml =================================================================== --- trunk/omega/src/omega_MSSM.ml (revision 8274) +++ trunk/omega/src/omega_MSSM.ml (revision 8275) @@ -1,35 +1,35 @@ (* omega_MSSM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23_Majorana)(Targets.Fortran_Majorana) +module O = Omega.Make(Fusion_vintage.Mixed23_Majorana)(Targets.Fortran_Majorana) (Modellib_MSSM.MSSM(Modellib_MSSM.MSSM_no_4)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/fusion_vintage.mli =================================================================== --- trunk/omega/src/fusion_vintage.mli (revision 0) +++ trunk/omega/src/fusion_vintage.mli (revision 8275) @@ -0,0 +1,376 @@ +(* fusion.mli -- + + Copyright (C) 1999-2019 by + + Wolfgang Kilian + Thorsten Ohl + Juergen Reuter + with contributions from + Christian Speckner + + WHIZARD is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + WHIZARD is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) + +module type T = + sig + + val options : Options.t + +(* Wavefunctions are an abstract data type, containing a momentum~[p] + and additional quantum numbers, collected in~[flavor]. *) + type wf + val conjugate : wf -> wf + +(* Obviously, [flavor] is not restricted to the physical notion of + flavor, but can carry spin, color, etc. *) + type flavor + val flavor : wf -> flavor + type flavor_sans_color + val flavor_sans_color : wf -> flavor_sans_color + +(* Momenta are represented by an abstract datatype (defined + in~[Momentum]) that is optimized for performance. They can be + accessed either abstractly or as lists of indices of the external + momenta. These indices are assigned sequentially by [amplitude] below. *) + type p + val momentum : wf -> p + val momentum_list : wf -> int list + +(* At tree level, the wave functions are uniquely specified by [flavor] + and momentum. If loops are included, we need to distinguish among + orders. Also, if we build a result from an incomplete sum of diagrams, + we need to add a distinguishing mark. At the moment, we assume that a + [string] that can be attached to the symbol suffices. *) + val wf_tag : wf -> string option + +(* Coupling constants *) + type constant + +(* and right hand sides of assignments. The latter are formed from a sign from + Fermi statistics, a coupling (constand and Lorentz structure) and wave + functions. *) + type coupling + type rhs + type 'a children + val sign : rhs -> int + val coupling : rhs -> constant Coupling.t + + val coupling_tag : rhs -> string option + + type exclusions + val no_exclusions : exclusions + +(* In renormalized perturbation theory, couplings come in different orders + of the loop expansion. Be prepared: [val order : rhs -> int] *) + +(* \begin{dubious} + This is here only for the benefit of [Target] and shall become + [val children : rhs -> wf children] later \ldots + \end{dubious} *) + val children : rhs -> wf list + +(* Fusions come in two types: fusions of wave functions to off-shell wave + functions: + \begin{equation*} + \phi(p+q) = \phi(p)\phi(q) + \end{equation*} *) + type fusion + val lhs : fusion -> wf + val rhs : fusion -> rhs list + +(* and products at the keystones: + \begin{equation*} + \phi(-p-q)\cdot\phi(p)\phi(q) + \end{equation*} *) + type braket + val bra : braket -> wf + val ket : braket -> rhs list + +(* [amplitude goldstones incoming outgoing] calculates the + amplitude for scattering of [incoming] to [outgoing]. If + [goldstones] is true, also non-propagating off-shell Goldstone + amplitudes are included to allow the checking of Slavnov-Taylor + identities. *) + type amplitude + type amplitude_sans_color + type selectors + val amplitudes : bool -> exclusions -> selectors -> + flavor_sans_color list -> flavor_sans_color list -> amplitude list + val amplitude_sans_color : bool -> exclusions -> selectors -> + flavor_sans_color list -> flavor_sans_color list -> amplitude_sans_color + + val dependencies : amplitude -> wf -> (wf, coupling) Tree2.t + +(* We should be precise regarding the semantics of the following functions, since + modules implementating [Target] must not make any mistakes interpreting the + return values. Instead of calculating the amplitude + \begin{subequations} + \begin{equation} + \label{eq:physical-amplitude} + \Braket{f_3,p_3,f_4,p_4,\ldots|T|f_1,p_1,f_2,p_2} + \end{equation} + directly, O'Mega calculates the---equivalent, but more symmetrical---crossed + amplitude + \begin{equation} + \Braket{\bar f_1,-p_1,\bar f_2,-p_2,f_3,p_3,f_4,p_4,\ldots|T|0} + \end{equation} + Internally, all flavors are represented by their charge conjugates + \begin{equation} + \label{eq:internal-amplitude} + A(f_1,-p_1,f_2,-p_2,\bar f_3,p_3,\bar f_4,p_4,\ldots) + \end{equation} + \end{subequations} + The correspondence of vertex and term in the lagrangian + \begin{equation} + \parbox{26\unitlength}{% + \fmfframe(5,3)(5,3){% + \begin{fmfgraph*}(15,20) + \fmfleft{v} + \fmfright{p,A,e} + \fmflabel{$\mathrm{e}^-$}{e} + \fmflabel{$\mathrm{e}^+$}{p} + \fmflabel{$\mathrm{A}$}{A} + \fmf{fermion}{p,v,e} + \fmf{photon}{A,v} + \fmfdot{v} + \end{fmfgraph*}}}: \bar\psi\fmslash{A}\psi + \end{equation} + suggests to denote the \emph{outgoing} particle by the flavor of the + \emph{anti}particle and the \emph{outgoing} \emph{anti}particle by the + flavor of the particle, since this choice allows to represent the vertex + by a triple + \begin{equation} + \bar\psi\fmslash{A}\psi: (\mathrm{e}^+,A,\mathrm{e}^-) + \end{equation} + which is more intuitive than the alternative $(\mathrm{e}^-,A,\mathrm{e}^+)$. + Also, when thinking in terms of building wavefunctions from the outside in, + the outgoing \emph{antiparticle} is represented by a \emph{particle} + propagator and vice versa\footnote{Even if this choice will appear slightly + counter-intuitive on the [Target] side, one must keep in mind that much more + people are expected to prepare [Model]s.}. + [incoming] and [outgoing] are the physical flavors as + in~(\ref{eq:physical-amplitude}) *) + val incoming : amplitude -> flavor list + val outgoing : amplitude -> flavor list + +(* [externals] are flavors and momenta as in~(\ref{eq:internal-amplitude}) *) + val externals : amplitude -> wf list + + val variables : amplitude -> wf list + val fusions : amplitude -> fusion list + val brakets : amplitude -> braket list + val on_shell : amplitude -> (wf -> bool) + val is_gauss : amplitude -> (wf -> bool) + val constraints : amplitude -> string option + val symmetry : amplitude -> int + + val allowed : amplitude -> bool + +(* \thocwmodulesubsection{Performance Hacks} *) + + val initialize_cache : string -> unit + val set_cache_name : string -> unit + +(* \thocwmodulesubsection{Diagnostics} *) + + val check_charges : unit -> flavor_sans_color list list + val count_fusions : amplitude -> int + val count_propagators : amplitude -> int + val count_diagrams : amplitude -> int + + val forest : wf -> amplitude -> ((wf * coupling option, wf) Tree.t) list + val poles : amplitude -> wf list list + val s_channel : amplitude -> wf list + + val tower_to_dot : out_channel -> amplitude -> unit + val amplitude_to_dot : out_channel -> amplitude -> unit + +(* \thocwmodulesubsection{WHIZARD} *) + + val phase_space_channels : out_channel -> amplitude_sans_color -> unit + val phase_space_channels_flipped : out_channel -> amplitude_sans_color -> unit + + end + +(* There is more than one way to make fusions. *) + +module type Maker = + functor (P : Momentum.T) -> functor (M : Model.T) -> + T with type p = P.t + and type flavor = Colorize.It(M).flavor + and type flavor_sans_color = M.flavor + and type constant = M.constant + and type selectors = Cascade.Make(M)(P).selectors + +(*i If we want or need to expose [Make], here's how to do it: + +module type Stat = + sig + type flavor + type stat + exception Impossible + val stat : flavor -> int -> stat + val stat_fuse : stat -> stat -> flavor -> stat + val stat_sign : stat -> int + end + +module type Stat_Maker = functor (M : Model.T) -> + Stat with type flavor = M.flavor + +module Make : functor (PT : Tuple.Poly) (Stat : Stat_Maker) + (T : Topology.T with type 'a children = 'a PT.t) -> Maker + +i*) + +(* Straightforward Dirac fermions vs. slightly more complicated + Majorana fermions: *) + +module Binary : Maker +module Binary_Majorana : Maker + +module Mixed23 : Maker +module Mixed23_Majorana : Maker + +module Nary : functor (B : Tuple.Bound) -> Maker +module Nary_Majorana : functor (B : Tuple.Bound) -> Maker + +(* We can also proceed \'a la~\cite{HELAC:2000}. Empirically, + this will use slightly~($O(10\%)$) fewer fusions than the + symmetric factorization. Our implementation uses + significantly~($O(50\%)$) fewer fusions than reported + by~\cite{HELAC:2000}. Our pruning of the DAG might + be responsible for this. *) + +module Helac : functor (B : Tuple.Bound) -> Maker +module Helac_Majorana : functor (B : Tuple.Bound) -> Maker + +(* \thocwmodulesection{Multiple Amplitudes} *) + +module type Multi = + sig + exception Mismatch + val options : Options.t + + type flavor + type process = flavor list * flavor list + type amplitude + type fusion + type wf + type exclusions + val no_exclusions : exclusions + type selectors + type amplitudes + + (* Construct all possible color flow amplitudes for a given process. *) + val amplitudes : bool -> int option -> + exclusions -> selectors -> process list -> amplitudes + val empty : amplitudes + + (* Precompute the vertex table cache. *) + val initialize_cache : string -> unit + val set_cache_name : string -> unit + + (* The list of all combinations of incoming and outgoing particles + with a nonvanishing scattering amplitude. *) + val flavors : amplitudes -> process list + + (* The list of all combinations of incoming and outgoing particles that + don't lead to any color flow with non vanishing scattering amplitude. *) + val vanishing_flavors : amplitudes -> process list + + (* The list of all color flows with a nonvanishing scattering amplitude. *) + val color_flows : amplitudes -> Color.Flow.t list + + (* The list of all valid helicity combinations. *) + val helicities : amplitudes -> (int list * int list) list + + (* The list of all amplitudes. *) + val processes : amplitudes -> amplitude list + + (* [(process_table a).(f).(c)] returns the amplitude for the [f]th + allowed flavor combination and the [c]th allowed color flow as + an [amplitude option]. *) + val process_table : amplitudes -> amplitude option array array + + (* The list of all non redundant fusions together with the amplitudes + they came from. *) + val fusions : amplitudes -> (fusion * amplitude) list + + (* If there's more than external flavor state, the wavefunctions are + \emph{not} uniquely specified by [flavor] and [Momentum.t]. This + function can be used to determine how many variables must be allocated. *) + val multiplicity : amplitudes -> wf -> int + + (* This function can be used to disambiguate wavefunctions with the same + combination of [flavor] and [Momentum.t]. *) + val dictionary : amplitudes -> amplitude -> wf -> int + + (* [(color_factors a).(c1).(c2)] power of~$N_C$ for the given product + of color flows. *) + val color_factors : amplitudes -> Color.Flow.factor array array + + (* A description of optional diagram selectors. *) + val constraints : amplitudes -> string option + + end + +module type Multi_Maker = functor (Fusion_Maker : Maker) -> + functor (P : Momentum.T) -> + functor (M : Model.T) -> + Multi with type flavor = M.flavor + and type amplitude = Fusion_Maker(P)(M).amplitude + and type fusion = Fusion_Maker(P)(M).fusion + and type wf = Fusion_Maker(P)(M).wf + and type selectors = Fusion_Maker(P)(M).selectors + +module Multi : Multi_Maker + +(* \thocwmodulesection{Tags} *) + +(* It appears that there are useful applications for tagging couplings + and wave functions, e.\,g.~skeleton expansion and diagram selections. + We can abstract this in a [Tags] signature: *) + +module type Tags = + sig + type wf + type coupling + type 'a children + val null_wf : wf + val null_coupling : coupling + val fuse : coupling -> wf children -> wf + val wf_to_string : wf -> string option + val coupling_to_string : coupling -> string option + end + +module type Tagger = + functor (PT : Tuple.Poly) -> Tags with type 'a children = 'a PT.t + +module type Tagged_Maker = + functor (Tagger : Tagger) -> + functor (P : Momentum.T) -> functor (M : Model.T) -> + T with type p = P.t + and type flavor = Colorize.It(M).flavor + and type flavor_sans_color = M.flavor + and type constant = M.constant + +module Tagged_Binary : Tagged_Maker + +(*i + * Local Variables: + * mode:caml + * indent-tabs-mode:nil + * page-delimiter:"^(\\* .*\n" + * End: +i*) Index: trunk/omega/src/omega.ocamlinit =================================================================== --- trunk/omega/src/omega.ocamlinit (revision 0) +++ trunk/omega/src/omega.ocamlinit (revision 8275) @@ -0,0 +1,12 @@ +(* This is for running O'Mega inside the utop O'Caml + toplevel in order to debug some modules. *) + +#install_printer Algebra.Laurent.pp;; +#install_printer Color.Birdtracks.pp;; +#install_printer Color.SU3.pp;; +#install_printer Color.U3.pp;; +module A = Algebra.Laurent;; +module SU3 = Color.SU3;; +module U3 = Color.U3;; +open SU3;; +open BinOps;; Index: trunk/omega/src/permutation.ml =================================================================== --- trunk/omega/src/permutation.ml (revision 8274) +++ trunk/omega/src/permutation.ml (revision 8275) @@ -1,335 +1,389 @@ (* permutation.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from cf. main AUTHORS file WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) module type T = sig type t val of_list : int list -> t val of_array : int array -> t + val of_lists : 'a list -> 'a list -> t val inverse : t -> t val compose : t -> t -> t + val compose_inv : t -> t -> t val list : t -> 'a list -> 'a list val array : t -> 'a array -> 'a array val all : int -> t list val even : int -> t list val odd : int -> t list val cyclic : int -> t list val signed : int -> (int * t) list val to_string : t -> string end +let same_elements l1 l2 = + List.sort compare l1 = List.sort compare l2 + +module PM = Pmap.Tree + +let offset_map l = + let _, offsets = + List.fold_left + (fun (i, map) a -> (succ i, PM.add compare a i map)) + (0, PM.empty) l in + offsets + +(* TODO: this algorithm fails if the lists contain duplicate elements. *) +let of_lists_list l l' = + if same_elements l l' then + let offsets' = offset_map l' in + let _, p_rev = + List.fold_left + (fun (i, acc) a -> (succ i, PM.find compare a offsets' :: acc)) + (0, []) l in + List.rev p_rev + else + invalid_arg "Permutation.of_lists: incompatible lists" + module Using_Lists : T = struct type t = int list let of_list p = if List.sort compare p <> (ThoList.range 0 (List.length p - 1)) then invalid_arg "Permutation.of_list" else p let of_array p = try of_list (Array.to_list p) with | Invalid_argument "Permutation.of_list" -> invalid_arg "Permutation.of_array" + let of_lists = of_lists_list + let inverse p = snd (ThoList.ariadne_sort p) let list p l = List.map snd (List.sort (fun (i, _) (j, _) -> compare i j) (try List.rev_map2 (fun i x -> (i, x)) p l with | Invalid_argument "List.rev_map2" -> invalid_arg "Permutation.list: length mismatch")) let array p a = try Array.of_list (list p (Array.to_list a)) with | Invalid_argument "Permutation.list: length mismatch" -> invalid_arg "Permutation.array: length mismatch" + let compose_inv p q = + list q p + (* Probably not optimal (or really inefficient), but correct by associativity. *) let compose p q = list (inverse q) p let all n = List.map of_list (Combinatorics.permute (ThoList.range 0 (pred n))) let even n = List.map of_list (Combinatorics.permute_even (ThoList.range 0 (pred n))) let odd n = List.map of_list (Combinatorics.permute_odd (ThoList.range 0 (pred n))) let cyclic n = List.map of_list (Combinatorics.permute_cyclic (ThoList.range 0 (pred n))) let signed n = List.map (fun (eps, l) -> (eps, of_list l)) (Combinatorics.permute_signed (ThoList.range 0 (pred n))) let to_string p = String.concat "" (List.map string_of_int p) end module Using_Arrays : T = struct type t = int array let of_list p = if List.sort compare p <> (ThoList.range 0 (List.length p - 1)) then invalid_arg "Permutation.of_list" else Array.of_list p let of_array p = try of_list (Array.to_list p) with | Invalid_argument "Permutation.of_list" -> invalid_arg "Permutation.of_array" - - let inverse p = + + let of_lists l l' = + Array.of_list (of_lists_list l l') + + let inverse p = let len_p = Array.length p in let p' = Array.make len_p p.(0) in for i = 0 to pred len_p do p'.(p.(i)) <- i done; p' let array p a = let len_a = Array.length a and len_p = Array.length p in if len_a <> len_p then invalid_arg "Permutation.array: length mismatch"; let a' = Array.make len_a a.(0) in for i = 0 to pred len_a do a'.(p.(i)) <- a.(i) done; a' let list p l = try Array.to_list (array p (Array.of_list l)) with | Invalid_argument "Permutation.array: length mismatch" -> invalid_arg "Permutation.list: length mismatch" + let compose_inv p q = + array q p + let compose p q = array (inverse q) p let all n = List.map of_list (Combinatorics.permute (ThoList.range 0 (pred n))) let even n = List.map of_list (Combinatorics.permute_even (ThoList.range 0 (pred n))) let odd n = List.map of_list (Combinatorics.permute_odd (ThoList.range 0 (pred n))) let cyclic n = List.map of_list (Combinatorics.permute_cyclic (ThoList.range 0 (pred n))) let signed n = List.map (fun (eps, l) -> (eps, of_list l)) (Combinatorics.permute_signed (ThoList.range 0 (pred n))) let to_string p = String.concat "" (List.map string_of_int (Array.to_list p)) end module Default = Using_Arrays (* This is the Fisher-Yates shuffle, cf. D. Knuth, {\em Seminumerical algorithms. The Art of Computer Programming. 2}. Reading, MA: Addison–Wesley. pp. 139-140. *) (*i To shuffle an array a of n elements (indices 0..n-1): for i from n − 1 downto 1 do j ← random integer with 0 ≤ j ≤ i exchange a[j] and a[i] To initialize an array a of n elements to a randomly shuffled copy of source, both 0-based: a[0] ← source[0] for i from 1 to n − 1 do j ← random integer with 0 ≤ j ≤ i a[i] ← a[j] a[j] ← source[i] i*) let shuffle l = let a = Array.of_list l in for n = Array.length a - 1 downto 1 do let k = Random.int (succ n) in if k <> n then let tmp = Array.get a n in Array.set a n (Array.get a k); Array.set a k tmp done; Array.to_list a let time f x = let start = Sys.time () in let f_x = f x in let stop = Sys.time () in (f_x, stop -. start) let print_time msg f x = let f_x, seconds = time f x in Printf.printf "%s took %10.2f ms\n" msg (seconds *. 1000.); f_x +let random_int_list imax n = + let imax_plus = succ imax in + Array.to_list (Array.init n (fun _ -> Random.int imax_plus)) + module Test (P : T) : sig val suite : OUnit.test val time : unit -> unit end = struct open OUnit open P let of_list_overlap = "overlap" >:: (fun () -> assert_raises (Invalid_argument "Permutation.of_list") (fun () -> of_list [0;1;2;2])) let of_list_gap = "gap" >:: (fun () -> assert_raises (Invalid_argument "Permutation.of_list") (fun () -> of_list [0;1;2;4;5])) let of_list_ok = "ok" >:: (fun () -> let l = ThoList.range 0 10 in assert_equal (of_list l) (of_list l)) let suite_of_list = "of_list" >::: [of_list_overlap; of_list_gap; of_list_ok] + let suite_of_lists = + "of_lists" >::: + [ "ok" >:: + (fun () -> + for i = 1 to 10 do + let l = random_int_list 1000000 100 in + let l' = shuffle l in + assert_equal + ~printer:(ThoList.to_string string_of_int) + l' (list (of_lists l l') l) + done) ] + let apply_invalid_lengths = "invalid/lengths" >:: (fun () -> assert_raises (Invalid_argument "Permutation.list: length mismatch") (fun () -> list (of_list [0;1;2;3;4]) [0;1;2;3])) let apply_ok = "ok" >:: (fun () -> assert_equal [2;0;1;3;5;4] (list (of_list [1;2;0;3;5;4]) [0;1;2;3;4;5])) let suite_apply = "apply" >::: [apply_invalid_lengths; apply_ok] let inverse_ok = "ok" >:: (fun () -> let l = shuffle (ThoList.range 0 1000) in let p = of_list (shuffle l) in assert_equal l (list (inverse p) (list p l))) let suite_inverse = "inverse" >::: [inverse_ok] let compose_ok = "ok" >:: (fun () -> let id = ThoList.range 0 1000 in let p = of_list (shuffle id) and q = of_list (shuffle id) and l = id in assert_equal (list p (list q l)) (list (compose p q) l)) let compose_inverse_ok = "inverse/ok" >:: (fun () -> let id = ThoList.range 0 1000 in let p = of_list (shuffle id) and q = of_list (shuffle id) in assert_equal (compose (inverse p) (inverse q)) (inverse (compose q p))) let suite_compose = "compose" >::: [compose_ok; compose_inverse_ok] let suite = "Permutations" >::: [suite_of_list; + suite_of_lists; suite_apply; suite_inverse; suite_compose] let repeat repetitions size = let id = ThoList.range 0 size in let p = of_list (shuffle id) and l = shuffle (List.map string_of_int id) in print_time (Printf.sprintf "reps=%d, len=%d" repetitions size) (fun () -> for i = 1 to repetitions do ignore (P.list p l) done) () let time () = repeat 100000 10; repeat 10000 100; repeat 1000 1000; repeat 100 10000; repeat 10 100000; () end Index: trunk/omega/src/omega_PSSSM.ml =================================================================== --- trunk/omega/src/omega_PSSSM.ml (revision 8274) +++ trunk/omega/src/omega_PSSSM.ml (revision 8275) @@ -1,35 +1,35 @@ (* omega_PSSSM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23_Majorana)(Targets.Fortran_Majorana) +module O = Omega.Make(Fusion_vintage.Mixed23_Majorana)(Targets.Fortran_Majorana) (Modellib_PSSSM.ExtMSSM(Modellib_PSSSM.PSSSM)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/thoList.ml =================================================================== --- trunk/omega/src/thoList.ml (revision 8274) +++ trunk/omega/src/thoList.ml (revision 8275) @@ -1,408 +1,512 @@ (* thoList.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) let rec hdn n l = if n <= 0 then [] else match l with | x :: rest -> x :: hdn (pred n) rest | [] -> invalid_arg "ThoList.hdn" let rec tln n l = if n <= 0 then l else match l with | _ :: rest -> tln (pred n) rest | [] -> invalid_arg "ThoList.tln" let rec splitn' n l1_rev l2 = if n <= 0 then (List.rev l1_rev, l2) else match l2 with | x :: l2' -> splitn' (pred n) (x :: l1_rev) l2' | [] -> invalid_arg "ThoList.splitn n > len" let splitn n l = if n < 0 then invalid_arg "ThoList.splitn n < 0" else splitn' n [] l +let split_last l = + match List.rev l with + | [] -> invalid_arg "ThoList.split_last []" + | ln :: l12_rev -> (List.rev l12_rev, ln) + (* This is [splitn'] all over again, but without the exception. *) let rec chopn'' n l1_rev l2 = if n <= 0 then (List.rev l1_rev, l2) else match l2 with | x :: l2' -> chopn'' (pred n) (x :: l1_rev) l2' | [] -> (List.rev l1_rev, []) let rec chopn' n ll_rev = function | [] -> List.rev ll_rev | l -> begin match chopn'' n [] l with | [], [] -> List.rev ll_rev | l1, [] -> List.rev (l1 :: ll_rev) | l1, l2 -> chopn' n (l1 :: ll_rev) l2 end let chopn n l = if n <= 0 then invalid_arg "ThoList.chopn n <= 0" else chopn' n [] l +(* Find a member [a] in the list [l] and return the + cyclically permuted list with [a] as head. *) +let cycle_until a l = + let rec cycle_until' acc = function + | [] -> raise Not_found + | a' :: l' as al' -> + if a' = a then + al' @ List.rev acc + else + cycle_until' (a' :: acc) l' in + cycle_until' [] l + +let rec cycle' i acc l = + if i <= 0 then + l @ List.rev acc + else + match l with + | [] -> invalid_arg "ThoList.cycle" + | a' :: l' as al' -> + cycle' (pred i) (a' :: acc) l' + +let cycle n l = + if n < 0 then + invalid_arg "ThoList.cycle" + else + cycle' n [] l + let of_subarray n1 n2 a = let rec of_subarray' n1 n2 = if n1 > n2 then [] else a.(n1) :: of_subarray' (succ n1) n2 in of_subarray' (max 0 n1) (min n2 (pred (Array.length a))) let range ?(stride=1) n1 n2 = if stride <= 0 then invalid_arg "ThoList.range: stride <= 0" else let rec range' n = if n > n2 then [] else n :: range' (n + stride) in range' n1 (* Tail recursive: *) let enumerate ?(stride=1) n l = let _, l_rev = List.fold_left (fun (i, acc) a -> (i + stride, (i, a) :: acc)) (n, []) l in List.rev l_rev (* Take the elements of [list] that satisfy [predicate] and form a list of pairs of an offset into the original list and the element with the offsets starting from [offset]. NB: the order of the returned alist is not specified! *) let alist_of_list ?(predicate=(fun _ -> true)) ?(offset=0) list = let _, alist = List.fold_left (fun (n, acc) x -> (succ n, if predicate x then (n, x) :: acc else acc)) (offset, []) list in alist (* This is \emph{not} tail recursive! *) let rec flatmap f = function | [] -> [] | x :: rest -> f x @ flatmap f rest (* This is! *) let rev_flatmap f l = let rec rev_flatmap' acc f = function | [] -> acc | x :: rest -> rev_flatmap' (List.rev_append (f x) acc) f rest in rev_flatmap' [] f l let fold_left2 f acc lists = List.fold_left (List.fold_left f) acc lists let fold_right2 f lists acc = List.fold_right (List.fold_right f) lists acc let iteri f start list = ignore (List.fold_left (fun i a -> f i a; succ i) start list) let iteri2 f start_outer star_inner lists = iteri (fun j -> iteri (f j) star_inner) start_outer lists let mapi f start list = let next, list' = List.fold_left (fun (i, acc) a -> (succ i, f i a :: acc)) (start, []) list in List.rev list' (* Is there a more efficient implementation? *) let transpose lists = let rec transpose' rest = if List.for_all ((=) []) rest then [] else List.map List.hd rest :: transpose' (List.map List.tl rest) in try transpose' lists with | Failure "tl" -> invalid_arg "ThoList.transpose: not rectangular" let compare ?(cmp=Pervasives.compare) l1 l2 = let rec compare' l1' l2' = match l1', l2' with | [], [] -> 0 | [], _ -> -1 | _, [] -> 1 | n1 :: r1, n2 :: r2 -> let c = cmp n1 n2 in if c <> 0 then c else compare' r1 r2 in compare' l1 l2 let rec uniq' x = function | [] -> [] | x' :: rest -> if x' = x then uniq' x rest else x' :: uniq' x' rest let uniq = function | [] -> [] | x :: rest -> x :: uniq' x rest let rec homogeneous = function | [] | [_] -> true | a1 :: (a2 :: _ as rest) -> if a1 <> a2 then false else homogeneous rest let rec pairs' acc = function | [] -> acc | [x] -> invalid_arg "pairs: odd number of elements" | x :: y :: indices -> if x <> y then invalid_arg "pairs: not in pairs" else begin match acc with | [] -> pairs' [x] indices | x' :: _ -> if x = x' then invalid_arg "pairs: more than twice" else pairs' (x :: acc) indices end let pairs l = pairs' [] (List.sort Pervasives.compare l) (* If we needed it, we could use a polymorphic version of [Set] to speed things up from~$O(n^2)$ to~$O(n\ln n)$. But not before it matters somewhere \ldots *) let classify l = let rec add_to_class a = function | [] -> [1, a] | (n, a') :: rest -> if a = a' then (succ n, a) :: rest else (n, a') :: add_to_class a rest in let rec classify' cl = function | [] -> cl | a :: rest -> classify' (add_to_class a cl) rest in classify' [] l let rec factorize l = let rec add_to_class x y = function | [] -> [(x, [y])] | (x', ys) :: rest -> if x = x' then (x, y :: ys) :: rest else (x', ys) :: add_to_class x y rest in let rec factorize' fl = function | [] -> fl | (x, y) :: rest -> factorize' (add_to_class x y fl) rest in List.map (fun (x, ys) -> (x, List.rev ys)) (factorize' [] l) let rec clone n x = if n < 0 then invalid_arg "ThoList.clone" else if n = 0 then [] else x :: clone (pred n) x let interleave f list = let rec interleave' rev_head tail = let rev_head' = List.rev_append (f rev_head tail) rev_head in match tail with | [] -> List.rev rev_head' | x :: tail' -> interleave' (x :: rev_head') tail' in interleave' [] list let interleave_nearest f list = interleave (fun head tail -> match head, tail with | h :: _, t :: _ -> f h t | _ -> []) list let rec rev_multiply n rl l = if n < 0 then invalid_arg "ThoList.multiply" else if n = 0 then [] else List.rev_append rl (rev_multiply (pred n) rl l) let multiply n l = rev_multiply n (List.rev l) l exception Overlapping_indices exception Out_of_bounds let iset_of_list list = List.fold_right Sets.Int.add list Sets.Int.empty let iset_list_union list = List.fold_right Sets.Int.union list Sets.Int.empty let complement_index_sets n index_set_lists = let index_sets = List.map iset_of_list index_set_lists in let index_set = iset_list_union index_sets in let size_index_sets = List.fold_left (fun acc s -> Sets.Int.cardinal s + acc) 0 index_sets in if size_index_sets <> Sets.Int.cardinal index_set then raise Overlapping_indices else if Sets.Int.exists (fun i -> i < 0 || i >= n) index_set then raise Overlapping_indices else match Sets.Int.elements (Sets.Int.diff (iset_of_list (range 0 (pred n))) index_set) with | [] -> index_set_lists | complement -> complement :: index_set_lists let sort_section cmp array index_set = List.iter2 (Array.set array) index_set (List.sort cmp (List.map (Array.get array) index_set)) let partitioned_sort cmp index_sets list = let array = Array.of_list list in List.fold_left (fun () -> sort_section cmp array) () (complement_index_sets (List.length list) index_sets); Array.to_list array let ariadne_sort ?(cmp=Pervasives.compare) list = let sorted = List.sort (fun (n1, a1) (n2, a2) -> cmp a1 a2) (enumerate 0 list) in (List.map snd sorted, List.map fst sorted) let ariadne_unsort (sorted, indices) = List.map snd (List.sort (fun (n1, a1) (n2, a2) -> Pervasives.compare n1 n2) (List.map2 (fun n a -> (n, a)) indices sorted)) let lexicographic ?(cmp=Pervasives.compare) l1 l2 = let rec lexicographic' = function | [], [] -> 0 | [], _ -> -1 | _, [] -> 1 | x1 :: rest1, x2 :: rest2 -> let res = cmp x1 x2 in if res <> 0 then res else lexicographic' (rest1, rest2) in lexicographic' (l1, l2) (* If there was a polymorphic [Set], we could also say [Set.elements (Set.union (Set.of_list l1) (Set.of_list l2))]. *) let common l1 l2 = List.fold_left (fun acc x1 -> if List.mem x1 l2 then x1 :: acc else acc) [] l1 let complement l1 = function | [] -> l1 | l2 -> if List.for_all (fun x -> List.mem x l1) l2 then List.filter (fun x -> not (List.mem x l2)) l1 else invalid_arg "ThoList.complement" let to_string a2s alist = "[" ^ String.concat "; " (List.map a2s alist) ^ "]" +let random_int_list imax n = + let imax_plus = succ imax in + Array.to_list (Array.init n (fun _ -> Random.int imax_plus)) module Test = struct open OUnit + let suite_split = + "split*" >::: + [ "split_last []" >:: + (fun () -> + assert_raises + (Invalid_argument "ThoList.split_last []") + (fun () -> split_last [])); + "split_last [1]" >:: + (fun () -> + assert_equal + ([], 1) + (split_last [1])); + "split_last [2;3;1;4]" >:: + (fun () -> + assert_equal + ([2;3;1], 4) + (split_last [2;3;1;4])) ] + + let test_list = random_int_list 1000 100 + + let assert_equal_int_list = + assert_equal ~printer:(to_string string_of_int) + + let suite_cycle = + "cycle_until" >::: + [ "cycle (-1) [1;2;3]" >:: + (fun () -> + assert_raises + (Invalid_argument "ThoList.cycle") + (fun () -> cycle 4 [1;2;3])); + "cycle 4 [1;2;3]" >:: + (fun () -> + assert_raises + (Invalid_argument "ThoList.cycle") + (fun () -> cycle 4 [1;2;3])); + "cycle 42 [...]" >:: + (fun () -> + let n = 42 in + assert_equal_int_list + (tln n test_list @ hdn n test_list) + (cycle n test_list)); + "cycle_until 1 []" >:: + (fun () -> + assert_raises + (Not_found) + (fun () -> cycle_until 1 [])); + "cycle_until 1 [2;3;4]" >:: + (fun () -> + assert_raises + (Not_found) + (fun () -> cycle_until 1 [2;3;4])); + "cycle_until 1 [1;2;3;4]" >:: + (fun () -> + assert_equal + [1;2;3;4] + (cycle_until 1 [1;2;3;4])); + "cycle_until 3 [1;2;3;4]" >:: + (fun () -> + assert_equal + [3;4;1;2] + (cycle_until 3 [3;4;1;2])); + "cycle_until 4 [1;2;3;4]" >:: + (fun () -> + assert_equal + [4;1;2;3] + (cycle_until 4 [4;1;2;3])) ] + let suite_alist_of_list = "alist_of_list" >::: [ "simple" >:: (fun () -> assert_equal [(46, 4); (44, 2); (42, 0)] (alist_of_list ~predicate:(fun n -> n mod 2 = 0) ~offset:42 [0;1;2;3;4;5])) ] let suite_complement = "complement" >::: [ "simple" >:: (fun () -> assert_equal [2;4] (complement [1;2;3;4] [1; 3])); "empty" >:: (fun () -> assert_equal [1;2;3;4] (complement [1;2;3;4] [])); "failure" >:: (fun () -> assert_raises (Invalid_argument ("ThoList.complement")) (fun () -> complement (complement [1;2;3;4] [5]))) ] let suite = "ThoList" >::: - [suite_alist_of_list; + [suite_split; + suite_cycle; + suite_alist_of_list; suite_complement] end (*i * Local Variables: * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * compile-command:"ocamlc -o vertex thoList.ml{i,} pmap.ml{i,} vertex.ml" * End: i*) Index: trunk/omega/src/count.ml =================================================================== --- trunk/omega/src/count.ml (revision 8274) +++ trunk/omega/src/count.ml (revision 8275) @@ -1,252 +1,252 @@ (* count.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) open Num (* Factorial and double factorial for big integers. *) let rec factorial' fn n = if sign_num n <= 0 then fn else factorial' (n */ fn) (pred_num n) let factorial n = factorial' (Int 1) n let rec dfactorial' fn n = if sign_num n <= 0 then fn else dfactorial' (n */ fn) (n -/ (Int 2)) let dfactorial n = dfactorial' (Int 1) n (* \thocwmodulesection{[Binary]: $\lambda\phi^3$} *) module B = struct module T = Topology.Binary let partition_to_string p = "(" ^ String.concat "," (List.map string_of_int (T.inspect_partition p)) ^ ")" let print_partitions n = for i = 4 to n do Printf.printf "%d -> %s\n" i (String.concat ", " (List.map partition_to_string (T.partitions i))) done (* See equation~(\ref{eq:S(1,2,3)}): *) let symmetry n1 n2 n3 = if n1 = n2 && n2 = n3 then Int 6 else if n1 = n2 && n3 = 2 * n1 then Int 4 else if n1 = n2 || n2 = n3 then Int 2 else if n3 = n1 + n2 then Int 2 else Int 1 let trees n = dfactorial (n +/ n -/ (Int 5)) let number p = match T.inspect_partition p with | [n1'; n2'; n3'] -> let n1 = Int n1' and n2 = Int n2' and n3 = Int n3' in factorial (n1 +/ n2 +/ n3) */ trees (succ_num n1) */ trees (succ_num n2) */ trees (succ_num n3) // factorial n1 // factorial n2 // factorial n3 // symmetry n1' n2' n3' | _ -> invalid_arg "B.number" let partition_sum n = List.fold_left (fun sum n' -> number n' +/ sum) (Int 0) (T.partitions n) let partition_count n = Printf.sprintf "%s*%s" (string_of_num (number n)) (partition_to_string n) let print_symmetry n = for i = 4 to n do let p = partition_sum i in Printf.printf "%d -> %s %s = %s\n" i (string_of_num p) (if compare_num p (trees (Int i)) = 0 then "(OK)" else "???") (String.concat " + " (List.map partition_count (T.partitions i))) done let print_diagrams n = for i = 4 to n do Printf.printf " %d & %s & %s \\\\\n" i (string_of_num (power_num (Int 2) (pred_num (Int i)) -/ Int (i + 1))) (string_of_num (trees (Int i))) done end (* \thocwmodulesection{[Nary]: $\sum_n\lambda_n\phi^n$} *) module N = struct module I = struct type t = num let zero = num_of_int 0 let one = num_of_int 1 let ( + ) = add_num let ( - ) = sub_num let ( * ) = mult_num let ( / ) = quo_num let pred = pred_num let succ = succ_num let ( = ) = ( =/ ) let ( <> ) = ( <>/ ) let ( < ) = ( ) = ( >/ ) let ( >= ) = ( >=/ ) let of_int = num_of_int let to_int = int_of_num let to_string = string_of_num let compare = compare_num let factorial = factorial end let max_degree = 6 module C = Topology.Count(I) - module T = Topology.Nary(struct let max_arity = pred max_degree end) + module T = Topology.Nary(struct let max_arity = fun () -> pred max_degree end) let partition_to_string p = "(" ^ String.concat "," (List.map string_of_int (T.inspect_partition p)) ^ ")" let print_partitions n = for i = 4 to n do Printf.printf "%d -> %s\n" i (String.concat ", " (List.map partition_to_string (T.partitions i))) done let partition_count p0 = let p = List.map I.of_int (T.inspect_partition p0) and d = I.of_int max_degree in I.to_string ((C.diagrams_per_keystone d p) */ (C.keystones p)) ^ "*" ^ partition_to_string p0 let print_symmetry n = let d = I.of_int max_degree in for i = 4 to n do let i' = I.of_int i in let count = C.diagrams d i' in Printf.printf "%d -> %s %s = %s\n" i (I.to_string count) (if count =/ C.diagrams_via_keystones d i' then "(OK)" else "???") (String.concat " + " (List.map partition_count (T.partitions i))) done let print_symmetries n = let l = ThoList.range 1 n in List.iter (fun p -> let p = T.inspect_partition p in let n = List.length (Combinatorics.keystones p l) and n' = I.to_int (C.keystones (List.map I.of_int p)) and name = String.concat "," (List.map string_of_int p) in if n = n' then Printf.printf "(%s): %d (OK)\n" name n else Printf.printf "(%s): %d != %d\n" name n n') (T.partitions n) end (* \thocwmodulesection{Main Program} *) let _ = let usage = "usage: " ^ Sys.argv.(0) ^ " [options]" in Arg.parse ["-d", Arg.Int B.print_diagrams, "diagrams"; "-p", Arg.Int B.print_partitions, "partitions"; "-P", Arg.Int N.print_partitions, "partitions"; "-s", Arg.Int B.print_symmetry, "symmetry"; "-S", Arg.Int N.print_symmetry, "symmetry"; "-X", Arg.Int N.print_symmetries, "symmetry"] (fun _ -> print_endline usage; exit 1) usage; exit 0 (*i (* \begin{dubious} [Numerix.Slong] appears to be \emph{slower} here \ldots \end{dubious} *) module BI = struct open Numerix.Slong type t = Numerix.Slong.t let zero = of_int 0 let one = of_int 1 let ( + ) = add let ( - ) = sub let ( * ) = mul let ( / ) = quo let pred n = sub_1 n 1 let succ n = add_1 n 1 let ( = ) = eq let ( <> ) = neq let ( < ) = inf let ( <= ) = infeq let ( > ) = sup let ( >= ) = supeq let of_int = of_int let to_int = int_of let to_string = string_of let compare = cmp let rec factorial' fn n = if infeq_1 n 0 then fn else factorial' (n * fn) (pred n) let factorial n = factorial' (of_int 1) n end i*) (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/try_ufo.sh =================================================================== --- trunk/omega/src/try_ufo.sh (revision 8274) +++ trunk/omega/src/try_ufo.sh (revision 8275) @@ -1,26 +1,36 @@ #! /bin/sh +######################################################################## +# This script is for developers only and needs not to be portable. +# This script takes TO's directory structure for granted. +######################################################################## +# tl;dr : don't try this at home, kids ;) +######################################################################## jobs=12 UFO_SM=$HOME/physics/SM/ -UFO_SMEFT=$HOME/physics/SMEFT_mW_UFO/ +UFO_MSSM=$HOME/physics/MSSM_UFO/ UFO_SMEFT=$HOME/physics/SMEFTsim_A_U35_alphaScheme_UFO_v2_1/ +UFO_SMEFT=$HOME/physics/SMEFT_mW_UFO/ root=$HOME/physics/whizard build=$root/_build +omega=omega_UFO case X"$1" in X"-SM") UFO=$UFO_SM; shift;; X"-SMEFT") UFO=$UFO_SMEFT; shift;; + X"-MSSM") UFO=$UFO_MSSM; omega=omega_UFO_Majorana; shift;; + X"-X") UFO="$2"; shift 2;; *) UFO=$UFO_SM;; esac OCAMLFLAGS="-w -D -warn-error +P" make OCAMLFLAGS="$OCAMLFLAGS" -j $jobs -C $build/omega/src || exit 1 -make -j $jobs -C $build/omega/bin omega_UFO.opt || exit 1 +make -j $jobs -C $build/omega/bin $omega.opt || exit 1 -omega="$build/omega/bin/omega_UFO.opt -model:UFO_dir $UFO -model:exec -target:parameter_module parameters_ufo" +omega="$build/omega/bin/$omega.opt -model:UFO_dir $UFO -model:exec -target:parameter_module parameters_ufo" ( $omega -params; $omega -scatter "$1" ) > omega_amplitude.f90 gfortran -Wall -c -I ../../_build/omega/src/ omega_amplitude.f90 Index: trunk/omega/src/coupling.mli =================================================================== --- trunk/omega/src/coupling.mli (revision 8274) +++ trunk/omega/src/coupling.mli (revision 8275) @@ -1,2886 +1,2889 @@ (* coupling.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner Marco Sekulla So Young Shim (only parts of this file) WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* The enumeration types used for communication from [Models] to [Targets]. On the physics side, the modules in [Models] must implement the Feynman rules according to the conventions set up here. On the numerics side, the modules in [Targets] must handle all cases according to the same conventions. *) (* \thocwmodulesection{Propagators} The Lorentz representation of the particle. NB: O'Mega treats all lines as \emph{outgoing} and particles are therefore transforming as [ConjSpinor] and antiparticles as [Spinor]. *) type lorentz = | Scalar | Spinor (* $\psi$ *) | ConjSpinor (* $\bar\psi$ *) | Majorana (* $\chi$ *) | Maj_Ghost (* SUSY ghosts *) | Vector (*i | Ward_Vector i*) | Massive_Vector | Vectorspinor (* supersymmetric currents and gravitinos *) | Tensor_1 | Tensor_2 (* massive gravitons (large extra dimensions) *) | BRS of lorentz type lorentz3 = lorentz * lorentz * lorentz type lorentz4 = lorentz * lorentz * lorentz * lorentz type lorentzn = lorentz list +type fermion_lines = (int * int) list + (* \begin{table} \begin{center} \renewcommand{\arraystretch}{2.2} \begin{tabular}{|r|l|l|}\hline & only Dirac fermions & incl.~Majorana fermions \\\hline [Prop_Scalar] & \multicolumn{2}{ l |}{% $\displaystyle\phi(p)\leftarrow \frac{\ii}{p^2-m^2+\ii m\Gamma}\phi(p)$} \\\hline [Prop_Spinor] & $\displaystyle\psi(p)\leftarrow \frac{\ii(-\fmslash{p}+m)}{p^2-m^2+\ii m\Gamma}\psi(p)$ & $\displaystyle\psi(p)\leftarrow \frac{\ii(-\fmslash{p}+m)}{p^2-m^2+\ii m\Gamma}\psi(p)$ \\\hline [Prop_ConjSpinor] & $\displaystyle\bar\psi(p)\leftarrow \bar\psi(p)\frac{\ii(\fmslash{p}+m)}{p^2-m^2+\ii m\Gamma}$ & $\displaystyle\psi(p)\leftarrow \frac{\ii(-\fmslash{p}+m)}{p^2-m^2+\ii m\Gamma}\psi(p)$ \\\hline [Prop_Majorana] & \multicolumn{1}{ c |}{N/A} & $\displaystyle\chi(p)\leftarrow \frac{\ii(-\fmslash{p}+m)}{p^2-m^2+\ii m\Gamma}\chi(p)$ \\\hline [Prop_Unitarity] & \multicolumn{2}{ l |}{% $\displaystyle\epsilon_\mu(p)\leftarrow \frac{\ii}{p^2-m^2+\ii m\Gamma} \left(-g_{\mu\nu}+\frac{p_\mu p_\nu}{m^2}\right)\epsilon^\nu(p)$} \\\hline [Prop_Feynman] & \multicolumn{2}{ l |}{% $\displaystyle\epsilon^\nu(p)\leftarrow \frac{-\ii}{p^2-m^2+\ii m\Gamma}\epsilon^\nu(p)$} \\\hline [Prop_Gauge] & \multicolumn{2}{ l |}{% $\displaystyle\epsilon_\mu(p)\leftarrow \frac{\ii}{p^2} \left(-g_{\mu\nu}+(1-\xi)\frac{p_\mu p_\nu}{p^2}\right)\epsilon^\nu(p)$} \\\hline [Prop_Rxi] & \multicolumn{2}{ l |}{% $\displaystyle\epsilon_\mu(p)\leftarrow \frac{\ii}{p^2-m^2+\ii m\Gamma} \left(-g_{\mu\nu}+(1-\xi)\frac{p_\mu p_\nu}{p^2-\xi m^2}\right) \epsilon^\nu(p)$} \\\hline \end{tabular} \end{center} \caption{\label{tab:propagators} Propagators. NB: The sign of the momenta in the spinor propagators comes about because O'Mega treats all momenta as \emph{outgoing} and the charge flow for [Spinor] is therefore opposite to the momentum, while the charge flow for [ConjSpinor] is parallel to the momentum.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.5} \begin{tabular}{|r|l|}\hline [Aux_Scalar] & $\displaystyle\phi(p)\leftarrow\ii\phi(p)$ \\\hline [Aux_Spinor] & $\displaystyle\psi(p)\leftarrow\ii\psi(p)$ \\\hline [Aux_ConjSpinor] & $\displaystyle\bar\psi(p)\leftarrow\ii\bar\psi(p)$ \\\hline [Aux_Vector] & $\displaystyle\epsilon^\mu(p)\leftarrow\ii\epsilon^\mu(p)$ \\\hline [Aux_Tensor_1] & $\displaystyle T^{\mu\nu}(p)\leftarrow\ii T^{\mu\nu}(p)$ \\\hline [Only_Insertion] & \multicolumn{1}{ c |}{N/A} \\\hline \end{tabular} \end{center} \caption{\label{tab:aux-propagators} Auxiliary and non propagating fields} \end{table} If there were no vectors or auxiliary fields, we could deduce the propagator from the Lorentz representation. While we're at it, we can introduce ``propagators'' for the contact interactions of auxiliary fields as well. [Prop_Gauge] and [Prop_Feynman] are redundant as special cases of [Prop_Rxi]. The special case [Only_Insertion] corresponds to operator insertions that do not correspond to a propagating field all. These are used for checking Slavnov-Taylor identities \begin{equation} \partial_\mu\Braket{\text{out}|W^\mu(x)|\text{in}} = m_W\Braket{\text{out}|\phi(x)|\text{in}} \end{equation} of gauge theories in unitarity gauge where the Goldstone bosons are not propagating. Numerically, it would suffice to use a vanishing propagator, but then superflous fusions would be calculated in production code in which the Slavnov-Taylor identities are not tested. *) type 'a propagator = | Prop_Scalar | Prop_Ghost | Prop_Spinor | Prop_ConjSpinor | Prop_Majorana | Prop_Unitarity | Prop_Feynman | Prop_Gauge of 'a | Prop_Rxi of 'a | Prop_Tensor_2 | Prop_Tensor_pure | Prop_Vector_pure | Prop_Vectorspinor | Prop_Col_Scalar | Prop_Col_Feynman | Prop_Col_Majorana | Prop_Col_Unitarity | Aux_Scalar | Aux_Vector | Aux_Tensor_1 | Aux_Col_Scalar | Aux_Col_Vector | Aux_Col_Tensor_1 | Aux_Spinor | Aux_ConjSpinor | Aux_Majorana | Only_Insertion (* \begin{JR} We don't need different fermionic propagators as supposed by the variable names [Prop_Spinor], [Prop_ConjSpinor] or [Prop_Majorana]. The propagator in all cases has to be multiplied on the left hand side of the spinor out of which a new one should be built. All momenta are treated as \emph{outgoing}, so for the propagation of the different fermions the following table arises, in which the momentum direction is always downwards and the arrows show whether the momentum and the fermion line, respectively are parallel or antiparallel to the direction of calculation: \begin{center} \begin{tabular}{|l|c|c|c|c|}\hline Fermion type & fermion arrow & mom. & calc. & sign \\\hline\hline Dirac fermion & $\uparrow$ & $\uparrow~\downarrow$ & $\uparrow~\uparrow$ & negative \\\hline Dirac antifermion & $\downarrow$ & $\downarrow~\downarrow$ & $\uparrow~\downarrow$ & negative \\\hline Majorana fermion & - & $\uparrow~\downarrow$ & - & negative \\\hline \end{tabular} \end{center} So the sign of the momentum is always negative and no further distinction is needed. \end{JR} *) type width = | Vanishing | Constant | Timelike | Running | Fudged | Complex_Mass | Custom of string (* \thocwmodulesection{Vertices} The combined $S-P$ and $V-A$ couplings (see tables~\ref{tab:dim4-fermions-SP}, \ref{tab:dim4-fermions-VA}, \ref{tab:dim4-fermions-SPVA-maj} and~\ref{tab:dim4-fermions-SPVA-maj2}) are redundant, of course, but they allow some targets to create more efficient numerical code.\footnote{An additional benefit is that the counting of Feynman diagrams is not upset by a splitting of the vectorial and axial pieces of gauge bosons.} Choosing VA2 over VA will cause the FORTRAN backend to pass the coupling as a whole array *) type fermion = Psi | Chi | Grav type fermionbar = Psibar | Chibar | Gravbar type boson = | SP | SPM | S | P | SL | SR | SLR | VA | V | A | VL | VR | VLR | VLRM | VAM | TVA | TLR | TRL | TVAM | TLRM | TRLM | POT | MOM | MOM5 | MOML | MOMR | LMOM | RMOM | VMOM | VA2 | VA3 | VA3M type boson2 = S2 | P2 | S2P | S2L | S2R | S2LR | SV | PV | SLV | SRV | SLRV | V2 | V2LR (* The integer is an additional coefficient that multiplies the respective coupling constant. This allows to reduce the number of required coupling constants in manifestly symmetrc cases. Most of times it will be equal unity, though. *) (* The two vertex types [PBP] and [BBB] for the couplings of two fermions or two antifermions ("clashing arrows") is unavoidable in supersymmetric theories. \begin{dubious} \ldots{} tho doesn't like the names and has promised to find a better mnemonics! \end{dubious} *) type 'a vertex3 = - | UFO3 of Algebra.QC.t * string * lorentz3 * Color.vertex3 | FBF of int * fermionbar * boson * fermion | PBP of int * fermion * boson * fermion | BBB of int * fermionbar * boson * fermionbar | GBG of int * fermionbar * boson * fermion (* gravitino-boson-fermion *) | Gauge_Gauge_Gauge of int | Aux_Gauge_Gauge of int | I_Gauge_Gauge_Gauge of int | Scalar_Vector_Vector of int | Aux_Vector_Vector of int | Aux_Scalar_Vector of int | Scalar_Scalar_Scalar of int | Aux_Scalar_Scalar of int | Vector_Scalar_Scalar of int | Graviton_Scalar_Scalar of int | Graviton_Vector_Vector of int | Graviton_Spinor_Spinor of int | Dim4_Vector_Vector_Vector_T of int | Dim4_Vector_Vector_Vector_L of int | Dim4_Vector_Vector_Vector_T5 of int | Dim4_Vector_Vector_Vector_L5 of int | Dim6_Gauge_Gauge_Gauge of int | Dim6_Gauge_Gauge_Gauge_5 of int | Aux_DScalar_DScalar of int | Aux_Vector_DScalar of int | Dim5_Scalar_Gauge2 of int (* % $\frac12 \phi F_{1,\mu\nu} F_2^{\mu\nu} = - \frac12 \phi (\ii \partial_{[\mu,} V_{1,\nu]})(\ii \partial^{[\mu,} V_2^{\nu]})$ *) | Dim5_Scalar_Gauge2_Skew of int (* % $\frac14 \phi F_{1,\mu\nu} \tilde{F}_2^{\mu\nu} = - \phi (\ii \partial_\mu V_{1,\nu})(\ii \partial_\rho V_{2,\sigma})\epsilon^{\mu\nu\rho\sigma}$ *) | Dim5_Scalar_Scalar2 of int (* % $\phi_1 \partial_\mu \phi_2 \partial^\mu \phi_3$ *) | Dim5_Scalar_Vector_Vector_T of int (* % $\phi(\ii\partial_\mu V_1^\nu)(\ii\partial_\nu V_2^\mu)$ *) | Dim5_Scalar_Vector_Vector_TU of int (* % $(\ii\partial_\nu\phi) (\ii\partial_\mu V_1^\nu) V_2^\mu$ *) | Dim5_Scalar_Vector_Vector_U of int (* % $(\ii\partial_\nu\phi) (\ii\partial_\mu V^\nu) V^\mu$ *) | Scalar_Vector_Vector_t of int (* % $ ( \partial_\mu V_\nu-\partial_\nu V_\mu )^2 $ *) | Dim6_Vector_Vector_Vector_T of int (* % $V_1^\mu ((\ii\partial_\nu V_2^\rho) % \ii\overleftrightarrow{\partial_\mu}(\ii\partial_\rho V_3^\nu))$ *) | Tensor_2_Vector_Vector of int (* % $T^{\mu\nu} (V_{1,\mu}V_{2,\nu} + V_{1,\nu}V_{2,\mu})$ *) | Tensor_2_Vector_Vector_1 of int (* % $T^{\mu\nu} (V_{1,\mu}V_{2,\nu} + V_{1,\nu}V_{2,\mu} - g_{\mu,\nu}V_1^\rho V_{2,\rho} )$ *) | Tensor_2_Vector_Vector_cf of int (* % $T^{\mu\nu} ( % - \frac{c_f}{2} g_{\mu,\nu}V_1^\rho V_{2,\rho} )$ *) | Tensor_2_Scalar_Scalar of int (* % $T^{\mu\nu} (\partial_{\mu}\phi_1\partial_{\nu}\phi_2 + % \partial_{\nu}\phi_1\partial_{\mu}\phi_2 )$ *) | Tensor_2_Scalar_Scalar_cf of int (* % $T^{\mu\nu} ( - \frac{c_f}{2} g_{\mu,\nu} % \partial_{\rho}\phi_1\partial_{\rho}\phi_2 )$ *) | Tensor_2_Vector_Vector_t of int (* % $T^{\mu\nu} (V_{1,\mu}V_{2,\nu} + V_{1,\nu}V_{2,\mu} - g_{\mu,\nu}V_1^\rho V_{2,\rho} )$ *) | Dim5_Tensor_2_Vector_Vector_1 of int (* % $T^{\alpha\beta} (V_1^\mu \ii\overleftrightarrow\partial_\alpha \ii\overleftrightarrow\partial_\beta V_{2,\mu}$ *) | Dim5_Tensor_2_Vector_Vector_2 of int (* % $T^{\alpha\beta} ( V_1^\mu \ii\overleftrightarrow\partial_\beta (\ii\partial_\mu V_{2,\alpha}) + V_1^\mu \ii\overleftrightarrow\partial_\alpha (\ii\partial_\mu V_{2,\beta}))$ *) | Dim7_Tensor_2_Vector_Vector_T of int (* % $T^{\alpha\beta} ((\ii\partial^\mu V_1^\nu) \ii\overleftrightarrow\partial_\alpha \ii\overleftrightarrow\partial_\beta (\ii\partial_\nu V_{2,\mu})) $ *) | Dim6_Scalar_Vector_Vector_D of int (* % $\ii \phi ( - (\partial^\mu \partial^\nu W^{-}_{\mu})W^{+}_{\nu} - (\partial^\mu \partial^\nu W^{+}_{\nu})W^{-}_{\mu} \\ \mbox{} \qquad + ( (\partial^\rho \partial_\rho W^{-}_{\mu})W^{+}_{\nu} + (\partial^\rho \partial_\rho W^{+}_{\nu})W^{-}_{\mu}) g^{\mu\nu}) $ *) | Dim6_Scalar_Vector_Vector_DP of int (* % $\ii ( (\partial^\mu H)(\partial^\nu W^{-}_{\mu})W^{+}_{\nu} + (\partial^\nu H)(\partial^\mu W^{+}_{\nu})W^{-}_{\mu} \\ \mbox{} \qquad - ((\partial^\rho H)(\partial_\rho W^{-}_{\mu})W^{+}_{\nu} (\partial^\rho H)(\partial^\rho W^{+}_{\nu})W^{-}_{\mu}) g^{\mu\nu}) $*) | Dim6_HAZ_D of int (* % $\ii ((\partial^\mu \partial^\nu A_{\mu})Z_{\nu} + (\partial^\rho \partial_\rho A_{\mu})Z_{\nu}g^{\mu\nu} )$ *) | Dim6_HAZ_DP of int (* % $\ii ((\partial^{\nu} A_{\mu})(\partial^{\mu} H)Z_{\nu} - (\partial^{\rho} A_{\mu})(\partial_{\rho} H)Z_{\nu} g^{\mu\nu})$ *) | Dim6_AWW_DP of int (* % $\ii ((\partial^{\rho} A_{\mu}) W^{-}_{\nu} W^{+}_{\rho} g^{\mu\nu} - (\partial^{\nu} A_{\mu}) W^{-}_{\nu} W^{+}_{\rho} g^{\mu\rho}) $ *) | Dim6_AWW_DW of int (*% $\ii [ (3(\partial^\rho A_{\mu})W^{-}_{\nu}W^{+}_{\rho} - (\partial^\rho W^{-}_{\nu})A_{\mu}W^{+}_{\rho} + (\partial^\rho W^{+}_{\rho})A_{\mu} W^{-}_{\nu})g^{\mu\nu} \\ \mbox{} \qquad +(-3(\partial^\nu A_{\mu})W^{-}_{\nu}W^{+}_{\rho} - (\partial^\nu W^{-}_{\nu})A_{\mu}W^{+}_{\rho} + (\partial^\nu W^{+}_{\rho})A_{\mu}W^{-}_{\nu})g^{\mu\rho} \\ \mbox{} \qquad +(2(\partial^\mu W^{-}_{\nu})A_{\mu}W^{+}_{\rho} - 2(\partial^\mu W^{+}_{\rho})A_{\mu}W^{-}_{\nu})g^{\nu\rho} ]$ *) | Dim6_HHH of int (*% $\ii(-(\partial^{\mu}H_1)(\partial_{\mu}H_2)H_3 - (\partial^{\mu}H_1)H_2(\partial_{\mu}H_3) - H_1(\partial^{\mu}H_2)(\partial_{\mu}H_3) )$ *) | Dim6_Gauge_Gauge_Gauge_i of int (*% $\ii (-(\partial^{\nu}V_{\mu})(\partial^{\rho}V_{\nu})(\partial^{\mu}V_{\rho}) + (\partial^{\rho}V_{\mu})(\partial^{\mu}V_{\nu})(\partial^{\nu}V_{\rho}) \\ \mbox{} \qquad + (-\partial^{\nu}V_{\rho} g^{\mu\rho} + \partial^{\mu}V_{\rho} g^{\nu\rho}) (\partial^{\sigma}V_{\mu})(\partial_{\sigma}V_{\nu}) + (\partial^{\rho}V_{\nu} g^{\mu\nu} - \partial^{\mu}V_{\nu} g^{\nu\rho}) (\partial^{\sigma}V_{\mu})(\partial_{\sigma}V_{\rho}) \\ \mbox{} \qquad + (-\partial^{\rho}V_{\mu} g^{\mu\nu} + \partial^{\mu}V_{\mu} g^{\mu\rho}) (\partial^{\sigma}V_{\nu})(\partial_{\sigma}V_{\rho}) )$ *) | Gauge_Gauge_Gauge_i of int | Dim6_GGG of int | Dim6_WWZ_DPWDW of int (* % $\ii( ((\partial^\rho V_{\mu})V_{\nu}V_{\rho} - (\partial^{\rho}V_{\nu})V_{\mu}V_{\rho})g^{\mu\nu} - (\partial^{\nu}V_{\mu})V_{\nu}V_{\rho}g^{\mu\rho} + (\partial^{\mu}V_{\nu})V_{\mu}V_{\rho})g^{\rho\nu} )$ *) | Dim6_WWZ_DW of int (* % $\ii( ((\partial^\mu V_{\mu})V_{\nu}V_{\rho} + V_{\mu}(\partial^\mu V_{\nu})V_{\rho})g^{\nu\rho} - ((\partial^\nu V_{\mu})V_{\nu}V_{\rho} + V_{\mu}(\partial^\nu V_{\nu})V_{\rho})g^{\mu\rho})$ *) | Dim6_WWZ_D of int (* % $\ii ( V_{\mu})V_{\nu}(\partial^{\nu}V_{\rho})g^{\mu\rho} + V_{\mu}V_{\nu}(\partial^{\mu}V_{\rho})g^{\nu\rho})$ *) | TensorVector_Vector_Vector of int | TensorVector_Vector_Vector_cf of int | TensorVector_Scalar_Scalar of int | TensorVector_Scalar_Scalar_cf of int | TensorScalar_Vector_Vector of int | TensorScalar_Vector_Vector_cf of int | TensorScalar_Scalar_Scalar of int | TensorScalar_Scalar_Scalar_cf of int (* As long as we stick to renormalizable couplings, there are only three types of quartic couplings: [Scalar4], [Scalar2_Vector2] and [Vector4]. However, there are three inequivalent contractions for the latter and the general vertex will be a linear combination with integer coefficients: \begin{subequations} \begin{align} \ocwupperid{Scalar4}\,1 :&\;\;\;\;\; \phi_1 \phi_2 \phi_3 \phi_4 \\ \ocwupperid{Scalar2\_Vector2}\,1 :&\;\;\;\;\; \phi_1^{\vphantom{\mu}} \phi_2^{\vphantom{\mu}} V_3^\mu V_{4,\mu}^{\vphantom{\mu}} \\ \ocwupperid{Vector4}\,\lbrack 1, \ocwupperid{C\_12\_34} \rbrack :&\;\;\;\;\; V_1^\mu V_{2,\mu}^{\vphantom{\mu}} V_3^\nu V_{4,\nu}^{\vphantom{\mu}} \\ \ocwupperid{Vector4}\,\lbrack 1, \ocwupperid{C\_13\_42} \rbrack :&\;\;\;\;\; V_1^\mu V_2^\nu V_{3,\mu}^{\vphantom{\mu}} V_{4,\nu}^{\vphantom{\mu}} \\ \ocwupperid{Vector4}\,\lbrack 1, \ocwupperid{C\_14\_23} \rbrack :&\;\;\;\;\; V_1^\mu V_2^\nu V_{3,\nu}^{\vphantom{\mu}} V_{4,\mu}^{\vphantom{\mu}} \end{align} \end{subequations} *) type contract4 = C_12_34 | C_13_42 | C_14_23 (*i\begin{dubious} CS objected to the polymorphic [type 'a vertex4], since it broke the implementation of some of his extensions. Is there another way of getting coupling constants into [Vector4_K_Matrix], besides the brute force solution of declaring the possible coupling constants here? \textit{I'd like to put the blame on CS for two reasons: it's not clear that the brute force solution will actually work and everytime a new vertex that depends non-linearly on coupling contanst pops up, the problem will make another appearance.} \end{dubious}i*) type 'a vertex4 = - | UFO4 of Algebra.QC.t * string * lorentz4 * Color.vertex4 | Scalar4 of int | Scalar2_Vector2 of int | Vector4 of (int * contract4) list | DScalar4 of (int * contract4) list | DScalar2_Vector2 of (int * contract4) list | Dim8_Scalar2_Vector2_1 of int | Dim8_Scalar2_Vector2_2 of int | Dim8_Scalar2_Vector2_m_0 of int | Dim8_Scalar2_Vector2_m_1 of int | Dim8_Scalar2_Vector2_m_7 of int | Dim8_Scalar4 of int | Dim8_Vector4_t_0 of (int * contract4) list | Dim8_Vector4_t_1 of (int * contract4) list | Dim8_Vector4_t_2 of (int * contract4) list | Dim8_Vector4_m_0 of (int * contract4) list | Dim8_Vector4_m_1 of (int * contract4) list | Dim8_Vector4_m_7 of (int * contract4) list | GBBG of int * fermionbar * boson2 * fermion (* In some applications, we have to allow for contributions outside of perturbation theory. The most prominent example is heavy gauge boson scattering at very high energies, where the perturbative expression violates unitarity. *) (* One solution is the `$K$-matrix' ansatz. Such unitarizations typically introduce effective propagators and/or vertices that violate crossing symmetry and vanish in the $t$-channel. This can be taken care of in [Fusion] by filtering out vertices that have the wrong momenta. *) (* In this case the ordering of the fields in a vertex of the Feynman rules becomes significant. In particular, we assume that $(V_1,V_2,V_3,V_4)$ implies \begin{equation} \parbox{25mm}{\fmfframe(2,3)(2,3){\begin{fmfgraph*}(20,20) \fmfleft{v1,v2} \fmfright{v4,v3} \fmflabel{$V_1$}{v1} \fmflabel{$V_2$}{v2} \fmflabel{$V_3$}{v3} \fmflabel{$V_4$}{v4} \fmf{plain}{v,v1} \fmf{plain}{v,v2} \fmf{plain}{v,v3} \fmf{plain}{v,v4} \fmfblob{.2w}{v} \end{fmfgraph*}}} \qquad\Longrightarrow\qquad \parbox{45mm}{\fmfframe(2,3)(2,3){\begin{fmfgraph*}(40,20) \fmfleft{v1,v2} \fmfright{v4,v3} \fmflabel{$V_1$}{v1} \fmflabel{$V_2$}{v2} \fmflabel{$V_3$}{v3} \fmflabel{$V_4$}{v4} \fmf{plain}{v1,v12,v2} \fmf{plain}{v3,v34,v4} \fmf{dots,label=$\Theta((p_1+p_2)^2)$,tension=0.7}{v12,v34} \fmfdot{v12,v34} \end{fmfgraph*}}} \end{equation} The list of pairs of parameters denotes the location and strengths of the poles in the $K$-matrix ansatz: \begin{equation} (c_1,a_1,c_2,a_2,\ldots,c_n,a_n) \Longrightarrow f(s) = \sum_{i=1}^{n} \frac{c_i}{s-a_i} \end{equation} *) | Vector4_K_Matrix_tho of int * ('a * 'a) list | Vector4_K_Matrix_jr of int * (int * contract4) list | Vector4_K_Matrix_cf_t0 of int * (int * contract4) list | Vector4_K_Matrix_cf_t1 of int * (int * contract4) list | Vector4_K_Matrix_cf_t2 of int * (int * contract4) list | Vector4_K_Matrix_cf_t_rsi of int * (int * contract4) list | Vector4_K_Matrix_cf_m0 of int * (int * contract4) list | Vector4_K_Matrix_cf_m1 of int * (int * contract4) list | Vector4_K_Matrix_cf_m7 of int * (int * contract4) list | DScalar2_Vector2_K_Matrix_ms of int * (int * contract4) list | DScalar2_Vector2_m_0_K_Matrix_cf of int * (int * contract4) list | DScalar2_Vector2_m_1_K_Matrix_cf of int * (int * contract4) list | DScalar2_Vector2_m_7_K_Matrix_cf of int * (int * contract4) list | DScalar4_K_Matrix_ms of int * (int * contract4) list | Dim6_H4_P2 of int (* % $\ii( -(\partial^{\mu}H_1)(\partial_{\mu}H_2) H_3 H_4 - (\partial^{\mu}H_1)H_2(\partial_{\mu}H_3) H_4 -(\partial^{\mu}H_1)H_2 H_3 (\partial_{mu}H_4) \\ \mbox{} \qquad - H_1(\partial^{\mu}H_2)(\partial_{\mu}H_3) H_4 - H_1(\partial^{\mu}H_2) H_3(\partial_{\mu} H_4) - H_1 H_2 (\partial^{\mu}H_3)(\partial_{\mu} H_4) )$ *) | Dim6_AHWW_DPB of int (* % $\ii H ( (\partial^{\rho} A_{\mu}) W_{\nu}W_{\rho} g^{\mu\nu} - (\partial^{\nu}A_{\mu})W_{\nu}W_{\rho}g^{\mu\rho})$ *) | Dim6_AHWW_DPW of int (* % $\ii ( ((\partial^{\rho}A_{\mu})W_{\nu}W_{\rho} - (\partial^{\rho} H)A_{\mu}W_{\nu}W_{\rho})g^{\mu\nu} \\ \mbox{} \qquad (-(\partial^{\nu}A_{\mu})W_{\nu}W_{\rho} + (\partial^{\nu} H)A_{\mu}W_{\nu}W_{\rho})g^{\mu\rho})$ *) | Dim6_AHWW_DW of int (* % $\ii H( (3(\partial^{\rho}A_{\mu})W_{\nu}W_{\rho} - A_{\mu}(\partial^{\rho}W_{\nu})W_{\rho} + A_{\mu}W_{\nu}(\partial^{\rho}W_{\rho})) g^{\mu\nu} \\ \mbox{} \qquad + (-3(\partial^{\nu}A_{\mu})W_{\nu}W_{\rho} - A_{\mu}(\partial^{\nu}W_{\nu})W_{\rho} + A_{\mu}W_{\nu}(\partial^{\nu}W_{\rho})) g^{\mu\rho} \\ \mbox{} \qquad + 2(A_{\mu}(\partial^{\mu}W_{\nu})W_{\rho} + A_{\mu}W_{\nu}(\partial^{\mu}W_{\rho}))) g^{\nu\rho}) $ *) | Dim6_Vector4_DW of int (*% $\ii ( -V_{1,\mu}V_{2,\nu}V^{3,\nu}V^{4,\mu} - V_{1,\mu}V_{2,\nu}V^{3,\mu}V^{4,\nu} \\ \mbox{} \qquad + 2V_{1,\mu}V^{2,\mu}V_{3,\nu}V^{4,\nu} $ *) | Dim6_Vector4_W of int (* % $\ii (((\partial^{\rho}V_{1,\mu})V_{2}^{\mu} (\partial^{\sigma}V_{3,\rho})V_{4,\sigma} + V_{1,\mu}(\partial^{\rho}V_{2}^{\mu}) (\partial^{\sigma}V_{3,\rho})V_{4,\sigma} \\ \mbox{} \qquad + (\partial^{\sigma}V_{1,\mu})V_{2}^{\mu}V_{3,\rho} (\partial^{\rho}V_{4,\sigma}) + V_{1,\mu}(\partial^{\sigma}V_{2}^{\mu})V_{3,\rho} (\partial^{\rho}V_{4,\sigma})) \\ \mbox{} \qquad + ((\partial^{\sigma}V_{1,\mu})V_{2,\nu} (\partial^{\nu}V_{3}^{\mu})V_{4,\sigma} - V_{1,\mu}(\partial^{\sigma}V_{2,\nu}) (\partial^{\nu}V_{3}^{\mu})V_{4,\sigma} \\ \mbox{} \qquad - (\partial^{\nu}V_{1}^{\mu})V_{2,\nu} (\partial^{\sigma}V_{3,\mu})V_{4,\sigma} - (\partial^{\sigma}V_{1,\mu})V_{2,\nu}V_{3}^{\mu} (\partial^{\nu}V_{4,\sigma})) \\ \mbox{} \qquad + ( -(\partial^{\rho}V_{1,\mu})V_{2,\nu} (\partial^{\nu}V_{3,\rho})V_{4}^{\mu} + (\partial^{\rho}V_{1,\mu})V_{2,\nu}V_{3,\rho} (\partial^{\nu}V_{4}^{\mu}) \\ \mbox{} \qquad - V_{1,\mu}(\partial^{\rho}V_{2,\nu})V_{3,\rho} (\partial^{\nu}V_{4}^{\mu}) - (\partial^{\nu}V_{1,\mu})V_{2,\nu}V_{3,\rho} (\partial^{\rho}V_{4}^{\mu}) ) \\ \mbox{} \qquad +( -(\partial^{\sigma}V_{1,\mu})V_{2,\nu} (\partial^{\mu}V_{3}^{\nu})V_{4,\sigma} + V_{1,\mu}(\partial^{\sigma}V_{2,\nu}) (\partial^{\mu}V_{3}^{\nu})V_{4,\sigma} \\ \mbox{} \qquad - V_{1,\mu}(\partial^{\mu}V_{2,\nu}) (\partial^{\sigma}V_{3}^{\nu})V_{4,\sigma} - V_{1,\mu}(\partial^{\sigma}V_{2,\nu})V_{3}^{\nu} (\partial^{\mu}V_{4,\sigma}) \\ \mbox{} \qquad + ( -V_{1,\mu}(\partial^{\rho}V_{2,\nu}) (\partial^{\mu}V_{3,\rho})V_{4}^{\nu} - (\partial^{\rho}V_{1,\mu})V_{2,\nu}V_{3,\rho} (\partial^{\mu}V_{4}^{\nu}) \\ \mbox{} \qquad + V_{1,\mu}(\partial^{\rho}V_{2,\nu})V_{3,\rho} (\partial^{\mu}V_{4}^{\nu}) - V_{1,\mu}(\partial^{\mu}V_{2,\nu})V_{3,\rho} (\partial^{\rho}V_{4}^{\nu}) ) \\ \mbox{} \qquad + ((\partial^{\nu}V_{1,\mu})V_{2,\nu} (\partial^{\mu}V_{3,\rho})V_{4}^{\rho} + V_{1,\mu}(\partial^{\mu}V_{2,\nu}) (\partial^{\nu}V_{3,\rho})V_{4}^{\rho} \\ \mbox{} \qquad + (\partial^{\nu}V_{1,\mu})V_{2,\nu}V_{3,\rho} (\partial^{\mu}V_{4}^{\rho}) + V_{1,\mu}(\partial^{\mu}V_{2,\nu})V_{3,\rho} (\partial^{\nu}V_{4}^{\rho})) \\ \mbox{} \qquad + (\partial^{\rho}V_{1,\mu})V_{2,\nu}V_{3}^{\mu} (\partial_{\rho}V_{4}^{\nu}) - (\partial^{\rho}V_{1,\mu})V_{2}^{\mu}V_{3,\nu} (\partial_{\rho}V_{4}^{\nu}) \\ \mbox{} \qquad + V_{1,\mu}(\partial^{\rho}V_{2,\nu}) (\partial_{\rho}V_{3}^{\mu})V_{4}^{\nu} - V_{1,\mu}(\partial^{\rho}V_{2}^{\mu}) (\partial_{\rho}V_{3,\nu})V_{4}^{\nu} \\ \mbox{} \qquad + (\partial^{\rho}V_{1,\mu})V_{2,\nu} (\partial_{\rho}V_{3}^{\nu})V_{4}^{\mu} - (\partial^{\rho}V_{1,\mu})V_{2}^{\mu} (\partial_{\rho}V_{3, \nu})V_{4}^{\nu} \\ \mbox{} \qquad + V_{1,\mu}(\partial^{\rho}V_{2,\nu})V_{3}^{\nu} (\partial_{\rho}V_{4}^{\mu}) - V_{1,\mu}(\partial^{\rho}V_{2}^{\mu})V_{3,\nu} (\partial_{\rho}V_{4}^{\nu}) )$ *) | Dim6_Scalar2_Vector2_D of int (*% $\ii H_1 H_2 (-(\partial^{\mu}\partial^{\nu}V_{3,\mu})V_{4,\nu} + (\partial^{\mu}\partial_{\mu}V_{3,\nu})V_{4}^{\nu} \\ \mbox{}\qquad - V_{3,\mu}(\partial^{\mu}\partial^{\nu}V_{4,\nu}) + V_{3,\mu}(\partial^{\nu}\partial_{\nu}V_{4}^{\mu}))$ *) | Dim6_Scalar2_Vector2_DP of int (*% $\ii ((\partial^{\mu}H_1)H_2(\partial^{\nu}V_{3,\mu})V_{4,\nu} - (\partial^{\nu}H_1)H_2(\partial_{\nu}V_{3,\mu})V^{4,\mu} + H_1(\partial^{\mu}H_2)(\partial^{\nu}V_{3,\mu})V_{4,\nu} \\ \mbox{} \qquad - H_1(\partial^{\nu}H_2)(\partial_{\nu}V_{3,\mu})V^{4,\mu} + (\partial^{\nu}H_1)H_2V_{3,\mu}(\partial^{\mu}V_{4,\nu}) - (\partial^{\nu}H_1)H_2V_{3,\mu}(\partial_{\nu}V^{4,\mu}) \\ \mbox{} \qquad + H_1(\partial^{\nu}H_2)V_{3,\mu}(\partial^{\mu}V_{4,\nu}) - H_1(\partial^{\nu}H_2)V_{3,\mu}(\partial_{\nu}V^{4,\mu})) $ *) | Dim6_Scalar2_Vector2_PB of int (*% $\ii (H_1H_2(\partial^{\nu}V_{3,\mu})(\partial^{\mu}V_{4,\nu}) - H_1H_2(\partial^{\nu}V_{3,\mu})(\partial_{\nu}V^{4,\mu})) $ *) | Dim6_HHZZ_T of int (*% $\ii H_1H_2V_{3,\mu}V^{4,\mu}$ *) | Dim6_HWWZ_DW of int (* % $\ii( H_1(\partial^{\rho}W_{2,\mu})W^{3,\mu}Z_{4,\rho} - H_1W_{2,\mu}(\partial^{\rho}W^{3,\mu})Z_{4,\rho} - 2H_1(\partial^{\nu}W_{2,\mu})W_{3,\nu}Z^{4,\mu} \\ \mbox{} \qquad - H_1W_{2,\mu}(\partial^{\nu}W_{3,\nu})Z^{4,\mu} + H_1(\partial^{\mu}W_{2,\mu})W_{3,\nu}Z^{4,\nu} + 2H_1W_{2,\mu}(\partial^{\mu}W_{3,\nu})Z^{4,\nu})$ *) | Dim6_HWWZ_DPB of int (* % $\ii ( - H_1W_{2,\mu}W_{3,\nu}(\partial^{\nu}Z^{4,\mu}) + H_1W_{2,\mu}W_{3,\nu}(\partial^{\mu}Z^{4,\nu}))$ *) | Dim6_HWWZ_DDPW of int (* % $ \ii(H_1(\partial^{\nu}W_{2,\mu})W^{3,\mu}Z_{4,\nu} - H_1W_{2,\mu}(\partial^{\nu}W^{3,\mu})Z_{4,\nu} - H_1(\partial^{\nu}W_{2,\mu})W_{3,\nu}Z^{4,\mu} \\ \mbox{} \qquad + H_1W_{2,\mu}W_{3,\nu}(\partial^{\nu}Z^{4,\mu}) + H_1W_{2,\mu}(\partial^{\mu}W_{3,\nu})Z^{4,\nu} - H_1W_{2,\mu}W_{3,\nu}(\partial^{\mu}Z^{4,\nu}))$ *) | Dim6_HWWZ_DPW of int (* % $\ii ( H_1(\partial^{\nu}W_{2,\mu})W^{3,\mu}Z_{4,\nu} - H_1W_{2,\mu}(\partial^{\nu}W^{3,\mu})Z_{4,\nu} + (\partial^{\nu}H_1)W_{2,\mu}W_{3,\nu}Z^{4,\mu} \\ \mbox{} \qquad - H_1(\partial^{\nu}W_{2,\mu})W_{3,\nu}Z^{4,\mu} - (\partial^{\mu}H_1)W_{2,\mu}W_{3,\nu}Z^{4,\nu} + H_1W_{2,\mu}(\partial^{\mu}W_{3,\nu})Z^{4,\nu} )$ *) | Dim6_AHHZ_D of int (* % $\ii (H_1H_2(\partial^{\mu}\partial^{\nu}A_{\mu})Z_{\nu} - H_1H_2(\partial^{\nu}\partial_{\nu}A_{\mu})Z^{\mu})$ *) | Dim6_AHHZ_DP of int (* % $\ii ((\partial^{\mu}H_1)H_2(\partial^{\nu}A_{\mu})Z_{\nu} + H_1(\partial^{\mu}H_2)(\partial^{\nu}A_{\mu})Z_{\nu} \\ \mbox{} \qquad - (\partial^{\nu}H_1)H_2(\partial_{\nu}A_{\mu})Z^{\mu} - H_1(\partial^{\nu}H_2)(\partial_{\nu}A_{\mu})Z^{\mu} ) $ *) | Dim6_AHHZ_PB of int (* % $\ii (H_1H_2(\partial^{\nu}A_{\mu})(\partial_{\nu}Z^{\mu}) - H_1H_2(\partial^{\nu}A_{\mu})(\partial^{\mu}Z_{\nu}))$ *) type 'a vertexn = - | UFOn of Algebra.QC.t * string * lorentzn * Color.vertex + | UFO of Algebra.QC.t * string * lorentzn * fermion_lines * Color.Vertex.t (* An obvious candidate for addition to [boson] is [T], of course. *) (* \begin{dubious} This list is sufficient for the minimal standard model, but not comprehensive enough for most of its extensions, supersymmetric or otherwise. In particular, we need a \emph{general} parameterization for all trilinear vertices. One straightforward possibility are polynomials in the momenta for each combination of fields. \end{dubious} \begin{JR} Here we use the rules which can be found in~\cite{Denner:Majorana} and are more properly described in [Targets] where the performing of the fusion rules in analytical expressions is encoded. \end{JR} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.2} \begin{tabular}{|r|l|l|}\hline & only Dirac fermions & incl.~Majorana fermions \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, S, Psi)]: $\mathcal{L}_I=g_S\bar\psi_1 S\psi_2$}\\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot g_S\bar\psi_1 S$ & $\psi_2\leftarrow\ii\cdot g_S\psi_1 S$ \\\hline [F21] & $\bar\psi_2\leftarrow\ii\cdot g_S S \bar\psi_1$ & $\psi_2\leftarrow\ii\cdot g_SS\psi_1$ \\\hline [F13] & $S\leftarrow\ii\cdot g_S\bar\psi_1\psi_2$ & $S\leftarrow\ii\cdot g_S\psi_1^T{\mathrm{C}}\psi_2$ \\\hline [F31] & $S\leftarrow\ii\cdot g_S\psi_{2,\alpha}\bar\psi_{1,\alpha}$ & $S\leftarrow\ii\cdot g_S\psi_2^T{\mathrm{C}} \psi_1$\\\hline [F23] & $\psi_1\leftarrow\ii\cdot g_SS\psi_2$ & $\psi_1\leftarrow\ii\cdot g_SS\psi_2$ \\\hline [F32] & $\psi_1\leftarrow\ii\cdot g_S\psi_2 S$ & $\psi_1\leftarrow\ii\cdot g_S\psi_2 S$ \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, P, Psi)]: $\mathcal{L}_I=g_P\bar\psi_1 P\gamma_5\psi_2$} \\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot g_P\bar\psi_1\gamma_5 P$ & $\psi_2\leftarrow\ii\cdot g_P \gamma_5\psi_1 P$ \\\hline [F21] & $\bar\psi_2\leftarrow\ii\cdot g_P P\bar\psi_1\gamma_5$ & $\psi_2\leftarrow\ii\cdot g_P P\gamma_5\psi_1$ \\\hline [F13] & $P\leftarrow\ii\cdot g_P\bar\psi_1\gamma_5\psi_2$ & $P\leftarrow\ii\cdot g_P\psi_1^T {\mathrm{C}}\gamma_5\psi_2$ \\\hline [F31] & $P\leftarrow\ii\cdot g_P[\gamma_5\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $P\leftarrow\ii\cdot g_P\psi_2^T {\mathrm{C}}\gamma_5\psi_1$ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot g_P P\gamma_5\psi_2$ & $\psi_1\leftarrow\ii\cdot g_P P\gamma_5\psi_2$ \\\hline [F32] & $\psi_1\leftarrow\ii\cdot g_P \gamma_5\psi_2 P$ & $\psi_1\leftarrow\ii\cdot g_P \gamma_5\psi_2 P$ \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, V, Psi)]: $\mathcal{L}_I=g_V\bar\psi_1\fmslash{V}\psi_2$} \\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot g_V\bar\psi_1\fmslash{V}$ & $\psi_{2,\alpha}\leftarrow\ii\cdot (-g_V)\psi_{1,\beta}\fmslash{V}_{\alpha\beta}$ \\\hline [F21] & $\bar\psi_{2,\beta}\leftarrow\ii\cdot g_V\fmslash{V}_{\alpha\beta} \bar\psi_{1,\alpha}$ & $\psi_2\leftarrow\ii\cdot (-g_V)\fmslash{V}\psi_1$ \\\hline [F13] & $V_\mu\leftarrow\ii\cdot g_V\bar\psi_1\gamma_\mu\psi_2$ & $V_\mu\leftarrow\ii\cdot g_V (\psi_1)^T {\mathrm{C}}\gamma_{\mu}\psi_2$ \\\hline [F31] & $V_\mu\leftarrow\ii\cdot g_V[\gamma_\mu\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $V_\mu\leftarrow\ii\cdot (-g_V)(\psi_2)^T {\mathrm{C}}\gamma_{\mu}\psi_1$ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot g_V\fmslash{V}\psi_2$ & $\psi_1\leftarrow\ii\cdot g_V\fmslash{V}\psi_2$ \\\hline [F32] & $\psi_{1,\alpha}\leftarrow\ii\cdot g_V\psi_{2,\beta}\fmslash{V}_{\alpha\beta}$ & $\psi_{1,\alpha}\leftarrow\ii\cdot g_V\psi_{2,\beta}\fmslash{V}_{\alpha\beta}$ \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, A, Psi)]: $\mathcal{L}_I=g_A\bar\psi_1\gamma_5\fmslash{A}\psi_2$} \\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot g_A\bar\psi_1\gamma_5\fmslash{A}$ & $\psi_{2,\alpha}\leftarrow\ii\cdot g_A\psi_{\beta}[\gamma_5\fmslash{A}]_{\alpha\beta}$ \\\hline [F21] & $\bar\psi_{2,\beta}\leftarrow\ii\cdot g_A [\gamma_5\fmslash{A}]_{\alpha\beta} \bar\psi_{1,\alpha}$ & $\psi_2\leftarrow\ii\cdot g_A \gamma_5\fmslash{A}\psi$ \\\hline [F13] & $A_\mu\leftarrow\ii\cdot g_A\bar\psi_1\gamma_5\gamma_\mu\psi_2$ & $A_\mu\leftarrow\ii\cdot g_A \psi_1^T {\textrm{C}}\gamma_5\gamma_{\mu}\psi_2$ \\\hline [F31] & $A_\mu\leftarrow\ii\cdot g_A[\gamma_5\gamma_\mu\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $A_\mu\leftarrow\ii\cdot g_A \psi_2^T {\textrm{C}}\gamma_5\gamma_{\mu}\psi_1$ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot g_A\gamma_5\fmslash{A}\psi_2$ & $\psi_1\leftarrow\ii\cdot g_A\gamma_5\fmslash{A}\psi_2$ \\\hline [F32] & $\psi_{1,\alpha}\leftarrow\ii\cdot g_A \psi_{2,\beta}[\gamma_5\fmslash{A}]_{\alpha\beta}$ & $\psi_{1,\alpha}\leftarrow\ii\cdot g_A\psi_{2,\beta}[\gamma_5\fmslash{A}]_{\alpha\beta}$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions} Dimension-4 trilinear fermionic couplings. The momenta are unambiguous, because there are no derivative couplings and all participating fields are different.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|r|l|l|}\hline & only Dirac fermions & incl.~Majorana fermions \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, T, Psi)]: $\mathcal{L}_I=g_TT_{\mu\nu}\bar\psi_1 [\gamma^\mu,\gamma^\nu]_-\psi_2$}\\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot g_T \bar\psi_1[\gamma^\mu,\gamma^\nu]_-T_{\mu\nu}$ & $\bar\psi_2\leftarrow\ii\cdot g_T \cdots$ \\\hline [F21] & $\bar\psi_2\leftarrow\ii\cdot g_T T_{\mu\nu} \bar\psi_1[\gamma^\mu,\gamma^\nu]_-$ & $\bar\psi_2\leftarrow\ii\cdot g_T \cdots$ \\\hline [F13] & $T_{\mu\nu}\leftarrow\ii\cdot g_T\bar\psi_1[\gamma_\mu,\gamma_\nu]_-\psi_2$ & $T_{\mu\nu}\leftarrow\ii\cdot g_T \cdots $ \\\hline [F31] & $T_{\mu\nu}\leftarrow\ii\cdot g_T [[\gamma_\mu,\gamma_\nu]_-\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $T_{\mu\nu}\leftarrow\ii\cdot g_T \cdots $ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot g_T T_{\mu\nu}[\gamma^\mu,\gamma^\nu]_-\psi_2$ & $\psi_1\leftarrow\ii\cdot g_T \cdots$ \\\hline [F32] & $\psi_1\leftarrow\ii\cdot g_T [\gamma^\mu,\gamma^\nu]_-\psi_2 T_{\mu\nu}$ & $\psi_1\leftarrow\ii\cdot g_T \cdots$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim5-fermions} Dimension-5 trilinear fermionic couplings (NB: the coefficients and signs are not fixed yet). The momenta are unambiguous, because there are no derivative couplings and all participating fields are different.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|r|l|l|}\hline & only Dirac fermions & incl.~Majorana fermions \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, SP, Psi)]: $\mathcal{L}_I=\bar\psi_1\phi(g_S+g_P\gamma_5)\psi_2$}\\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot\bar\psi_1(g_S+g_P\gamma_5)\phi$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F21] & $\bar\psi_2\leftarrow\ii\cdot\phi\bar\psi_1(g_S+g_P\gamma_5)$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F13] & $\phi\leftarrow\ii\cdot\bar\psi_1(g_S+g_P\gamma_5)\psi_2$ & $\phi\leftarrow\ii\cdot\cdots$ \\\hline [F31] & $\phi\leftarrow\ii\cdot[(g_S+g_P\gamma_5)\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $\phi\leftarrow\ii\cdot\cdots$ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot \phi(g_S+g_P\gamma_5)\psi_2$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline [F32] & $\psi_1\leftarrow\ii\cdot(g_S+g_P\gamma_5)\psi_2\phi$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, SL, Psi)]: $\mathcal{L}_I=g_L\bar\psi_1\phi(1-\gamma_5)\psi_2$}\\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot g_L\bar\psi_1(1-\gamma_5)\phi$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F21] & $\bar\psi_2\leftarrow\ii\cdot g_L\phi\bar\psi_1(1-\gamma_5)$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F13] & $\phi\leftarrow\ii\cdot g_L\bar\psi_1(1-\gamma_5)\psi_2$ & $\phi\leftarrow\ii\cdot\cdots$ \\\hline [F31] & $\phi\leftarrow\ii\cdot g_L[(1-\gamma_5)\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $\phi\leftarrow\ii\cdot\cdots$ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot g_L\phi(1-\gamma_5)\psi_2$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline [F32] & $\psi_1\leftarrow\ii\cdot g_L(1-\gamma_5)\psi_2\phi$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, SR, Psi)]: $\mathcal{L}_I=g_R\bar\psi_1\phi(1+\gamma_5)\psi_2$}\\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot g_R\bar\psi_1(1+\gamma_5)\phi$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F21] & $\bar\psi_2\leftarrow\ii\cdot g_R\phi\bar\psi_1(1+\gamma_5)$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F13] & $\phi\leftarrow\ii\cdot g_R\bar\psi_1(1+\gamma_5)\psi_2$ & $\phi\leftarrow\ii\cdot\cdots$ \\\hline [F31] & $\phi\leftarrow\ii\cdot g_R[(1+\gamma_5)\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $\phi\leftarrow\ii\cdot\cdots$ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot g_R\phi(1+\gamma_5)\psi_2$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline [F32] & $\psi_1\leftarrow\ii\cdot g_R(1+\gamma_5)\psi_2\phi$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, SLR, Psi)]: $\mathcal{L}_I=g_L\bar\psi_1\phi(1-\gamma_5)\psi_2 +g_R\bar\psi_1\phi(1+\gamma_5)\psi_2$}\\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions-SP} Combined dimension-4 trilinear fermionic couplings.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|r|l|l|}\hline & only Dirac fermions & incl.~Majorana fermions \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, VA, Psi)]: $\mathcal{L}_I=\bar\psi_1\fmslash{Z}(g_V-g_A\gamma_5)\psi_2$}\\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot\bar\psi_1\fmslash{Z}(g_V-g_A\gamma_5)$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F21] & $\bar\psi_{2,\beta}\leftarrow\ii\cdot [\fmslash{Z}(g_V-g_A\gamma_5)]_{\alpha\beta}\bar\psi_{1,\alpha}$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F13] & $Z_\mu\leftarrow\ii\cdot\bar\psi_1\gamma_\mu(g_V-g_A\gamma_5)\psi_2$ & $Z_\mu\leftarrow\ii\cdot \cdots$ \\\hline [F31] & $Z_\mu\leftarrow\ii\cdot [\gamma_\mu(g_V-g_A\gamma_5)\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $Z_\mu\leftarrow\ii\cdot \cdots$ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot\fmslash{Z}(g_V-g_A\gamma_5)\psi_2$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline [F32] & $\psi_{1,\alpha}\leftarrow\ii\cdot \psi_{2,\beta}[\fmslash{Z}(g_V-g_A\gamma_5)]_{\alpha\beta}$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, VL, Psi)]: $\mathcal{L}_I=g_L\bar\psi_1\fmslash{Z}(1-\gamma_5)\psi_2$}\\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot g_L\bar\psi_1\fmslash{Z}(1-\gamma_5)$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F21] & $\bar\psi_{2,\beta}\leftarrow\ii\cdot g_L[\fmslash{Z}(1-\gamma_5)]_{\alpha\beta}\bar\psi_{1,\alpha}$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F13] & $Z_\mu\leftarrow\ii\cdot g_L\bar\psi_1\gamma_\mu(1-\gamma_5)\psi_2$ & $Z_\mu\leftarrow\ii\cdot \cdots$ \\\hline [F31] & $Z_\mu\leftarrow\ii\cdot g_L[\gamma_\mu(1-\gamma_5)\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $Z_\mu\leftarrow\ii\cdot \cdots$ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot g_L\fmslash{Z}(1-\gamma_5)\psi_2$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline [F32] & $\psi_{1,\alpha}\leftarrow\ii\cdot g_L\psi_{2,\beta}[\fmslash{Z}(1-\gamma_5)]_{\alpha\beta}$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, VR, Psi)]: $\mathcal{L}_I=g_R\bar\psi_1\fmslash{Z}(1+\gamma_5)\psi_2$}\\\hline [F12] & $\bar\psi_2\leftarrow\ii\cdot g_R\bar\psi_1\fmslash{Z}(1+\gamma_5)$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F21] & $\bar\psi_{2,\beta}\leftarrow\ii\cdot g_R[\fmslash{Z}(1+\gamma_5)]_{\alpha\beta}\bar\psi_{1,\alpha}$ & $\psi_2\leftarrow\ii\cdot \cdots$ \\\hline [F13] & $Z_\mu\leftarrow\ii\cdot g_R\bar\psi_1\gamma_\mu(1+\gamma_5)\psi_2$ & $Z_\mu\leftarrow\ii\cdot \cdots$ \\\hline [F31] & $Z_\mu\leftarrow\ii\cdot g_R[\gamma_\mu(1+\gamma_5)\psi_2]_\alpha\bar\psi_{1,\alpha}$ & $Z_\mu\leftarrow\ii\cdot \cdots$ \\\hline [F23] & $\psi_1\leftarrow\ii\cdot g_R\fmslash{Z}(1+\gamma_5)\psi_2$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline [F32] & $\psi_{1,\alpha}\leftarrow\ii\cdot g_R\psi_{2,\beta}[\fmslash{Z}(1+\gamma_5)]_{\alpha\beta}$ & $\psi_1\leftarrow\ii\cdot\cdots$ \\\hline \multicolumn{3}{|l|}{[FBF (Psibar, VLR, Psi)]: $\mathcal{L}_I=g_L\bar\psi_1\fmslash{Z}(1-\gamma_5)\psi_2 +g_R\bar\psi_1\fmslash{Z}(1+\gamma_5)\psi_2$}\\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions-VA} Combined dimension-4 trilinear fermionic couplings continued.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[FBF (Psibar, S, Chi)]: $\bar\psi S\chi$}\\\hline [F12] & $\chi\leftarrow\psi S$ & [F21] & $\chi\leftarrow S \psi$ \\\hline [F13] & $S\leftarrow \psi^T{\rm C}\chi$ & [F31] & $S\leftarrow \chi^T {\rm C}\psi$ \\\hline [F23] & $\psi\leftarrow S\chi$ & [F32] & $\psi\leftarrow\chi S$ \\\hline \multicolumn{4}{|l|}{[FBF (Psibar, P, Chi)]: $\bar\psi P\gamma_5\chi$}\\\hline [F12] & $\chi\leftarrow \gamma_5 \psi P$ & [F21] & $\chi\leftarrow P \gamma_5 \psi$ \\\hline [F13] & $P\leftarrow \psi^T {\rm C}\gamma_5\chi$ & [F31] & $P\leftarrow \chi^T {\rm C}\gamma_5\psi$ \\\hline [F23] & $\psi\leftarrow P\gamma_5\chi$ & [F32] & $\psi\leftarrow\gamma_5\chi P$ \\\hline \multicolumn{4}{|l|}{[FBF (Psibar, V, Chi)]: $\bar\psi\fmslash{V}\chi$}\\\hline [F12] & $\chi_{\alpha}\leftarrow-\psi_{\beta}\fmslash{V}_{\alpha\beta}$ & [F21] & $\chi\leftarrow-\fmslash{V}\psi$ \\\hline [F13] & $V_{\mu}\leftarrow \psi^T {\rm C}\gamma_{\mu}\chi$ & [F31] & $V_{\mu}\leftarrow \chi^T {\rm C}(-\gamma_{\mu}\psi)$ \\\hline [F23] & $\psi\leftarrow\fmslash{V}\chi$ & [F32] & $\psi_\alpha\leftarrow\chi_\beta\fmslash{V}_{\alpha\beta}$ \\\hline \multicolumn{4}{|l|}{[FBF (Psibar, A, Chi)]: $\bar\psi\gamma^5\fmslash{A}\chi$}\\\hline [F12] & $\chi_{\alpha}\leftarrow\psi_{\beta}\lbrack \gamma^5 \fmslash{A} \rbrack_{\alpha\beta}$ & [F21] & $\chi\leftarrow\gamma^5\fmslash{A}\psi$ \\\hline [F13] & $A_{\mu}\leftarrow \psi^T {\rm C}\gamma^5\gamma_{\mu}\chi$ & [F31] & $A_{\mu}\leftarrow \chi^T {\rm C}(\gamma^5 \gamma_{\mu}\psi)$ \\\hline [F23] & $\psi\leftarrow\gamma^5\fmslash{A}\chi$ & [F32] & $\psi_\alpha\leftarrow\chi_\beta\lbrack \gamma^5 \fmslash{A} \rbrack_{\alpha\beta}$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions-maj} Dimension-4 trilinear couplings including one Dirac and one Majorana fermion} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[FBF (Psibar, SP, Chi)]: $\bar\psi\phi(g_S+g_P\gamma_5)\chi$}\\\hline [F12] & $\chi \leftarrow (g_S+g_P\gamma_5)\psi \phi$ & [F21] & $\chi\leftarrow\phi(g_S+g_P\gamma_5)\psi$ \\\hline [F13] & $\phi\leftarrow \psi^T {\rm C}(g_S+g_P\gamma_5)\chi$ & [F31] & $\phi\leftarrow \chi^T {\rm C}(g_S+g_P\gamma_5) \chi$ \\\hline [F23] & $\psi\leftarrow \phi(g_S+g_P\gamma_5)\chi$ & [F32] & $\psi\leftarrow(g_S+g_P\gamma_5)\chi\phi$ \\\hline \multicolumn{4}{|l|}{[FBF (Psibar, VA, Chi)]: $\bar\psi\fmslash{Z}(g_V - g_A\gamma_5)\chi$}\\\hline [F12] & $\chi_\alpha\leftarrow \psi_\beta[\fmslash{Z}(-g_V-g_A\gamma_5)]_{\alpha\beta}$ & [F21] & $\chi\leftarrow\fmslash{Z}(-g_V-g_A\gamma_5)] \psi$ \\\hline [F13] & $Z_\mu\leftarrow \psi^T {\rm C}\gamma_\mu(g_V-g_A\gamma_5)\chi$ & [F31] & $Z_\mu\leftarrow \chi^T {\rm C}\gamma_\mu(-g_V-g_A\gamma_5)\psi$ \\\hline [F23] & $\psi\leftarrow\fmslash{Z}(g_V-g_A\gamma_5)\chi$ & [F32] & $\psi_\alpha\leftarrow \chi_\beta[\fmslash{Z}(g_V-g_A\gamma_5)]_{\alpha\beta}$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions-SPVA-maj} Combined dimension-4 trilinear fermionic couplings including one Dirac and one Majorana fermion.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[FBF (Chibar, S, Psi)]: $\bar\chi S\psi$}\\\hline [F12] & $\psi\leftarrow\chi S$ & [F21] & $\psi\leftarrow S\chi$ \\\hline [F13] & $S\leftarrow \chi^T {\rm C}\psi$ & [F31] & $S\leftarrow \psi^T {\rm C}\chi$ \\\hline [F23] & $\chi\leftarrow S \psi$ & [F32] & $\chi\leftarrow\psi S$ \\\hline \multicolumn{4}{|l|}{[FBF (Chibar, P, Psi)]: $\bar\chi P\gamma_5\psi$}\\\hline [F12] & $\psi\leftarrow\gamma_5\chi P$ & [F21] & $\psi\leftarrow P\gamma_5\chi$ \\\hline [F13] & $P\leftarrow \chi^T {\rm C}\gamma_5\psi$ & [F31] & $P\leftarrow \psi^T {\rm C}\gamma_5\chi$ \\\hline [F23] & $\chi\leftarrow P \gamma_5 \psi$ & [F32] & $\chi\leftarrow \gamma_5 \psi P$ \\\hline \multicolumn{4}{|l|}{[FBF (Chibar, V, Psi)]: $\bar\chi\fmslash{V}\psi$}\\\hline [F12] & $\psi_\alpha\leftarrow-\chi_\beta\fmslash{V}_{\alpha\beta}$ & [F21] & $\psi\leftarrow-\fmslash{V}\chi$ \\\hline [F13] & $V_{\mu}\leftarrow \chi^T {\rm C}\gamma_{\mu}\psi$ & [F31] & $V_{\mu}\leftarrow \psi^T {\rm C}(-\gamma_{\mu}\chi)$ \\\hline [F23] & $\chi\leftarrow\fmslash{V}\psi$ & [F32] & $\chi_{\alpha}\leftarrow\psi_{\beta}\fmslash{V}_{\alpha\beta}$ \\\hline \multicolumn{4}{|l|}{[FBF (Chibar, A, Psi)]: $\bar\chi\gamma^5\fmslash{A}\psi$}\\\hline [F12] & $\psi_\alpha\leftarrow\chi_\beta\lbrack\gamma^5\fmslash{A} \rbrack_{\alpha\beta}$ & [F21] & $\psi\leftarrow\gamma^5\fmslash{A}\chi$ \\\hline [F13] & $A_{\mu}\leftarrow \chi^T {\rm C}(\gamma^5\gamma_{\mu}\psi)$ & [F31] & $A_{\mu}\leftarrow \psi^T {\rm C}\gamma^5\gamma_{\mu}\chi$ \\\hline [F23] & $\chi\leftarrow\gamma^5\fmslash{A}\psi$ & [F32] & $\chi_{\alpha}\leftarrow\psi_{\beta}\lbrack\gamma^5\fmslash{A} \rbrack_{\alpha\beta}$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions-maj'} Dimension-4 trilinear couplings including one Dirac and one Majorana fermion} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[FBF (Chibar, SP, Psi)]: $\bar\chi\phi(g_S+g_P\gamma_5)\psi$}\\\hline [F12] & $\psi\leftarrow(g_S+g_P\gamma_5)\chi\phi$ & [F21] & $\psi\leftarrow \phi(g_S+g_P\gamma_5)\chi$ \\\hline [F13] & $\phi\leftarrow \chi^T {\rm C}(g_S+g_P\gamma_5) \psi$ & [F31] & $\phi\leftarrow \psi^T {\rm C}(g_S+g_P\gamma_5)\chi$ \\\hline [F23] & $\chi\leftarrow\phi(g_S+g_P\gamma_5)\psi$ & [F32] & $\chi \leftarrow (g_S+g_P\gamma_5)\psi \phi$ \\\hline \multicolumn{4}{|l|}{[FBF (Chibar, VA, Psi)]: $\bar\chi\fmslash{Z}(g_V - g_A\gamma_5)\psi$}\\\hline [F12] & $\psi_\alpha\leftarrow \chi_\beta[\fmslash{Z}(-g_V-g_A\gamma_5)]_{\alpha\beta}$ & [F21] & $\psi\leftarrow\fmslash{Z}(-g_V-g_A\gamma_5)\chi$ \\\hline [F13] & $Z_\mu\leftarrow \chi^T {\rm C}\gamma_\mu(g_V-g_A\gamma_5)\psi$ & [F31] & $Z_\mu\leftarrow \psi^T {\rm C}\gamma_\mu(-g_V-g_A\gamma_5)\chi$ \\\hline [F23] & $\chi\leftarrow\fmslash{Z}(g_V-g_A\gamma_5)] \psi$ & [F32] & $\chi_\alpha\leftarrow\psi_\beta[\fmslash{Z}(g_V-g_A\gamma_5)]_{\alpha\beta}$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions-SPVA-maj'} Combined dimension-4 trilinear fermionic couplings including one Dirac and one Majorana fermion.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[FBF (Chibar, S, Chi)]: $\bar\chi_a S\chi_b$}\\\hline [F12] & $\chi_b\leftarrow\chi_a S$ & [F21] & $\chi_b\leftarrow S \chi_a$ \\\hline [F13] & $S\leftarrow \chi^T_a {\rm C}\chi_b$ & [F31] & $S\leftarrow \chi^T_b {\rm C}\chi_a$ \\\hline [F23] & $\chi_a\leftarrow S\chi_b$ & [F32] & $\chi_a\leftarrow\chi S_b$ \\\hline \multicolumn{4}{|l|}{[FBF (Chibar, P, Chi)]: $\bar\chi_a P\gamma_5\psi_b$}\\\hline [F12] & $\chi_b\leftarrow \gamma_5 \chi_a P$ & [F21] & $\chi_b\leftarrow P \gamma_5 \chi_a$ \\\hline [F13] & $P\leftarrow \chi^T_a {\rm C}\gamma_5\chi_b$ & [F31] & $P\leftarrow \chi^T_b {\rm C}\gamma_5\chi_a$ \\\hline [F23] & $\chi_a\leftarrow P\gamma_5\chi_b$ & [F32] & $\chi_a\leftarrow\gamma_5\chi_b P$ \\\hline \multicolumn{4}{|l|}{[FBF (Chibar, V, Chi)]: $\bar\chi_a\fmslash{V}\chi_b$}\\\hline [F12] & $\chi_{b,\alpha}\leftarrow-\chi_{a,\beta}\fmslash{V}_{\alpha\beta}$ & [F21] & $\chi_b\leftarrow-\fmslash{V}\chi_a$ \\\hline [F13] & $V_{\mu}\leftarrow \chi^T_a {\rm C}\gamma_{\mu}\chi_b$ & [F31] & $V_{\mu}\leftarrow - \chi^T_b {\rm C}\gamma_{\mu}\chi_a$ \\\hline [F23] & $\chi_a\leftarrow\fmslash{V}\chi_b$ & [F32] & $\chi_{a,\alpha}\leftarrow\chi_{b,\beta}\fmslash{V}_{\alpha\beta}$ \\\hline \multicolumn{4}{|l|}{[FBF (Chibar, A, Chi)]: $\bar\chi_a\gamma^5\fmslash{A}\chi_b$}\\\hline [F12] & $\chi_{b,\alpha}\leftarrow\chi_{a,\beta}\lbrack\gamma^5\fmslash{A} \rbrack_{\alpha\beta}$ & [F21] & $\chi_b\leftarrow\gamma^5\fmslash{A}\chi_a$ \\\hline [F13] & $A_{\mu}\leftarrow \chi^T_a {\rm C}\gamma^5\gamma_{\mu}\chi_b$ & [F31] & $A_{\mu}\leftarrow \chi^T_b {\rm C}(\gamma^5\gamma_{\mu}\chi_a)$ \\\hline [F23] & $\chi_a\leftarrow\gamma^5\fmslash{A}\chi_b$ & [F32] & $\chi_{a,\alpha}\leftarrow\chi_{b,\beta}\lbrack\gamma^5\fmslash{A} \rbrack_{\alpha\beta}$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions-maj2} Dimension-4 trilinear couplings of two Majorana fermions} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[FBF (Chibar, SP, Chi)]: $\bar\chi\phi_a(g_S+g_P\gamma_5)\chi_b$}\\\hline [F12] & $\chi_b \leftarrow (g_S+g_P\gamma_5)\chi_a \phi$ & [F21] & $\chi_b\leftarrow\phi(g_S+g_P\gamma_5)\chi_a$ \\\hline [F13] & $\phi\leftarrow \chi^T_a {\rm C}(g_S+g_P\gamma_5)\chi_b$ & [F31] & $\phi\leftarrow \chi^T_b {\rm C}(g_S+g_P\gamma_5) \chi_a$ \\\hline [F23] & $\chi_a\leftarrow \phi(g_S+g_P\gamma_5)\chi_b$ & [F32] & $\chi_a\leftarrow(g_S+g_P\gamma_5)\chi_b\phi$ \\\hline \multicolumn{4}{|l|}{[FBF (Chibar, VA, Chi)]: $\bar\chi_a\fmslash{Z}(g_V-g_A\gamma_5)\chi_b$}\\\hline [F12] & $\chi_{b,\alpha}\leftarrow\chi_{a,\beta}[\fmslash{Z}(-g_V-g_A\gamma_5)]_{\alpha\beta}$ & [F21] & $\chi_b\leftarrow\fmslash{Z}(-g_V-g_A\gamma_5)]\chi_a$ \\\hline [F13] & $Z_\mu\leftarrow \chi^T_a {\rm C}\gamma_\mu(g_V-g_A\gamma_5)\chi_b$ & [F31] & $Z_\mu\leftarrow \chi^T_b {\rm C}\gamma_\mu(-g_V-g_A\gamma_5)\chi_a$ \\\hline [F23] & $\chi_a\leftarrow\fmslash{Z}(g_V-g_A\gamma_5)\chi_b$ & [F32] & $\chi_{a,\alpha}\leftarrow \chi_{b,\beta}[\fmslash{Z}(g_V-g_A\gamma_5)]_{\alpha\beta}$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions-SPVA-maj2} Combined dimension-4 trilinear fermionic couplings of two Majorana fermions.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Gauge_Gauge_Gauge]: $\mathcal{L}_I=gf_{abc} A_a^\mu A_b^\nu\partial_\mu A_{c,\nu}$}\\\hline [_] & $A_a^\mu\leftarrow\ii\cdot (-\ii g/2)\cdot C_{abc}^{\mu\rho\sigma}(-k_2-k_3,k_2,k_3) A^b_\rho A^c_\sigma$\\\hline \multicolumn{2}{|l|}{[Aux_Gauge_Gauge]: $\mathcal{L}_I=gf_{abc}X_{a,\mu\nu}(k_1) ( A_b^{\mu}(k_2)A_c^{\nu}(k_3) -A_b^{\nu}(k_2)A_c^{\mu}(k_3))$}\\\hline [F23]$\lor$[F32] & $X_a^{\mu\nu}(k_2+k_3)\leftarrow\ii\cdot gf_{abc}( A_b^\mu(k_2)A_c^\nu(k_3) -A_b^\nu(k_2)A_c^\mu(k_3))$ \\\hline [F12]$\lor$[F13] & $A_{a,\mu}(k_1+k_{2/3})\leftarrow\ii\cdot gf_{abc}X_{b,\nu\mu}(k_1)A_c^\nu(k_{2/3})$ \\\hline [F21]$\lor$[F31] & $A_{a,\mu}(k_{2/3}+k_1)\leftarrow\ii\cdot gf_{abc}A_b^\nu(k_{2/3}) X_{c,\mu\nu}(k_1)$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-bosons} Dimension-4 Vector Boson couplings with \emph{outgoing} momenta. See~(\ref{eq:C123}) and~(\ref{eq:C123'}) for the definition of the antisymmetric tensor $C^{\mu_1\mu_2\mu_3}(k_1,k_2,k_3)$.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[Scalar_Vector_Vector]: $\mathcal{L}_I=g\phi V_1^\mu V_{2,\mu}$}\\\hline [F13] & $\leftarrow\ii\cdot g\cdots$ & [F31] & $\leftarrow\ii\cdot g\cdots$ \\\hline [F12] & $\leftarrow\ii\cdot g\cdots$ & [F21] & $\leftarrow\ii\cdot g\cdots$ \\\hline [F23] & $\phi\leftarrow\ii\cdot g V_1^\mu V_{2,\mu}$ & [F32] & $\phi\leftarrow\ii\cdot g V_{2,\mu} V_1^\mu$ \\\hline \multicolumn{4}{|l|}{[Aux_Vector_Vector]: $\mathcal{L}_I=gX V_1^\mu V_{2,\mu}$}\\\hline [F13] & $\leftarrow\ii\cdot g\cdots$ & [F31] & $\leftarrow\ii\cdot g\cdots$ \\\hline [F12] & $\leftarrow\ii\cdot g\cdots$ & [F21] & $\leftarrow\ii\cdot g\cdots$ \\\hline [F23] & $X\leftarrow\ii\cdot g V_1^\mu V_{2,\mu}$ & [F32] & $X\leftarrow\ii\cdot g V_{2,\mu} V_1^\mu$ \\\hline \multicolumn{4}{|l|}{[Aux_Scalar_Vector]: $\mathcal{L}_I=gX^\mu \phi V_\mu$}\\\hline [F13] & $\leftarrow\ii\cdot g\cdots$ & [F31] & $\leftarrow\ii\cdot g\cdots$ \\\hline [F12] & $\leftarrow\ii\cdot g\cdots$ & [F21] & $\leftarrow\ii\cdot g\cdots$ \\\hline [F23] & $\leftarrow\ii\cdot g\cdots$ & [F32] & $\leftarrow\ii\cdot g\cdots$ \\\hline \end{tabular} \end{center} \caption{\label{tab:scalar-vector} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[Scalar_Scalar_Scalar]: $\mathcal{L}_I=g\phi_1\phi_2\phi_3$}\\\hline [F13] & $\phi_2\leftarrow\ii\cdot g \phi_1\phi_3$ & [F31] & $\phi_2\leftarrow\ii\cdot g \phi_3\phi_1$ \\\hline [F12] & $\phi_3\leftarrow\ii\cdot g \phi_1\phi_2$ & [F21] & $\phi_3\leftarrow\ii\cdot g \phi_2\phi_1$ \\\hline [F23] & $\phi_1\leftarrow\ii\cdot g \phi_2\phi_3$ & [F32] & $\phi_1\leftarrow\ii\cdot g \phi_3\phi_2$ \\\hline \multicolumn{4}{|l|}{[Aux_Scalar_Scalar]: $\mathcal{L}_I=gX\phi_1\phi_2$}\\\hline [F13] & $\leftarrow\ii\cdot g\cdots$ & [F31] & $\leftarrow\ii\cdot g\cdots$ \\\hline [F12] & $\leftarrow\ii\cdot g\cdots$ & [F21] & $\leftarrow\ii\cdot g\cdots$ \\\hline [F23] & $X\leftarrow\ii\cdot g \phi_1\phi_2$ & [F32] & $X\leftarrow\ii\cdot g \phi_2\phi_1$ \\\hline \end{tabular} \end{center} \caption{\label{tab:scalars} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Vector_Scalar_Scalar]: $\mathcal{L}_I=gV^\mu\phi_1 \ii\overleftrightarrow{\partial_\mu}\phi_2$}\\\hline [F23] & $V^\mu(k_2+k_3)\leftarrow\ii\cdot g(k_2^\mu-k_3^\mu)\phi_1(k_2)\phi_2(k_3)$ \\\hline [F32] & $V^\mu(k_2+k_3)\leftarrow\ii\cdot g(k_2^\mu-k_3^\mu)\phi_2(k_3)\phi_1(k_2)$ \\\hline [F12] & $\phi_2(k_1+k_2)\leftarrow\ii\cdot g(k_1^\mu+2k_2^\mu)V_\mu(k_1)\phi_1(k_2)$ \\\hline [F21] & $\phi_2(k_1+k_2)\leftarrow\ii\cdot g(k_1^\mu+2k_2^\mu)\phi_1(k_2)V_\mu(k_1)$ \\\hline [F13] & $\phi_1(k_1+k_3)\leftarrow\ii\cdot g(-k_1^\mu-2k_3^\mu)V_\mu(k_1)\phi_2(k_3)$ \\\hline [F31] & $\phi_1(k_1+k_3)\leftarrow\ii\cdot g(-k_1^\mu-2k_3^\mu)\phi_2(k_3)V_\mu(k_1)$ \\\hline \end{tabular} \end{center} \caption{\label{tab:scalar-current} \ldots} \end{table} *) (* \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Aux_DScalar_DScalar]: $\mathcal{L}_I=g\chi (\ii\partial_\mu\phi_1)(\ii\partial^\mu\phi_2)$}\\\hline [F23] & $\chi(k_2+k_3)\leftarrow\ii\cdot g (k_2\cdot k_3) \phi_1(k_2) \phi_2(k_3) $ \\\hline [F32] & $\chi(k_2+k_3)\leftarrow\ii\cdot g (k_3\cdot k_2) \phi_2(k_3) \phi_1(k_2) $ \\\hline [F12] & $\phi_2(k_1+k_2)\leftarrow\ii\cdot g ((-k_1-k_2) \cdot k_2) \chi(k_1) \phi_1(k_2) $ \\\hline [F21] & $\phi_2(k_1+k_2)\leftarrow\ii\cdot g (k_2 \cdot (-k_1-k_2)) \phi_1(k_2) \chi(k_1) $ \\\hline [F13] & $\phi_1(k_1+k_3)\leftarrow\ii\cdot g ((-k_1-k_3) \cdot k_3) \chi(k_1) \phi_2(k_3) $ \\\hline [F31] & $\phi_1(k_1+k_3)\leftarrow\ii\cdot g (k_3 \cdot (-k_1-k_3)) \phi_2(k_3) \chi(k_1) $ \\\hline \end{tabular} \end{center} \caption{\label{tab:dscalar-dscalar} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Aux_Vector_DScalar]: $\mathcal{L}_I=g\chi V_\mu (\ii\partial^\mu\phi)$}\\\hline [F23] & $\chi(k_2+k_3)\leftarrow\ii\cdot g k_3^\mu V_\mu(k_2) \phi(k_3) $ \\\hline [F32] & $\chi(k_2+k_3)\leftarrow\ii\cdot g \phi(k_3) k_3^\mu V_\mu(k_2) $ \\\hline [F12] & $\phi(k_1+k_2)\leftarrow\ii\cdot g \chi(k_1) (-k_1-k_2)^\mu V_\mu(k_2) $ \\\hline [F21] & $\phi(k_1+k_2)\leftarrow\ii\cdot g (-k_1-k_2)^\mu V_\mu(k_2) \chi(k_1) $ \\\hline [F13] & $V_\mu(k_1+k_3)\leftarrow\ii\cdot g (-k_1-k_3)_\mu \chi(k_1) \phi(k_3) $ \\\hline [F31] & $V_\mu(k_1+k_3)\leftarrow\ii\cdot g (-k_1-k_3)_\mu \phi(k_3) \chi(k_1) $ \\\hline \end{tabular} \end{center} \caption{\label{tab:vector-dscalar} \ldots} \end{table} *) (* Signify which two of three fields are fused: *) type fuse2 = F23 | F32 | F31 | F13 | F12 | F21 (* Signify which three of four fields are fused: *) type fuse3 = | F123 | F231 | F312 | F132 | F321 | F213 | F124 | F241 | F412 | F142 | F421 | F214 | F134 | F341 | F413 | F143 | F431 | F314 | F234 | F342 | F423 | F243 | F432 | F324 (* Explicit enumeration types make no sense for higher degrees. *) type fusen = int list (* The third member of the triplet will contain the coupling constant: *) type 'a t = | V3 of 'a vertex3 * fuse2 * 'a | V4 of 'a vertex4 * fuse3 * 'a | Vn of 'a vertexn * fusen * 'a (* \thocwmodulesection{Gauge Couplings} Dimension-4 trilinear vector boson couplings \begin{subequations} \begin{multline} f_{abc}\partial^{\mu}A^{a,\nu}A^b_{\mu}A^c_{\nu} \rightarrow \ii f_{abc}k_1^\mu A^{a,\nu}(k_1)A^b_{\mu}(k_2)A^c_{\nu}(k_3) \\ = -\frac{\ii}{3!} f_{a_1a_2a_3} C^{\mu_1\mu_2\mu_3}(k_1,k_2,k_3) A^{a_1}_{\mu_1}(k_1)A^{a_2}_{\mu_2}(k_2)A^{a_3}_{\mu_3}(k_3) \end{multline} with the totally antisymmetric tensor (under simultaneous permutations of all quantum numbers $\mu_i$ and $k_i$) and all momenta \emph{outgoing} \begin{equation} \label{eq:C123} C^{\mu_1\mu_2\mu_3}(k_1,k_2,k_3) = ( g^{\mu_1\mu_2} (k_1^{\mu_3}-k_2^{\mu_3}) + g^{\mu_2\mu_3} (k_2^{\mu_1}-k_3^{\mu_1}) + g^{\mu_3\mu_1} (k_3^{\mu_2}-k_1^{\mu_2}) ) \end{equation} \end{subequations} Since~$f_{a_1a_2a_3}C^{\mu_1\mu_2\mu_3}(k_1,k_2,k_3)$ is totally symmetric (under simultaneous permutations of all quantum numbers $a_i$, $\mu_i$ and $k_i$), it is easy to take the partial derivative \begin{subequations} \label{eq:AofAA} \begin{equation} A^{a,\mu}(k_2+k_3) = - \frac{\ii}{2!} f_{abc}C^{\mu\rho\sigma}(-k_2-k_3,k_2,k_3) A^b_\rho(k_2)A^c_\sigma(k_3) \end{equation} with \begin{equation} \label{eq:C123'} C^{\mu\rho\sigma}(-k_2-k_3,k_2,k_3) = ( g^{\rho\sigma} ( k_2^{\mu} -k_3^{\mu} ) + g^{\mu\sigma} (2k_3^{\rho} +k_2^{\rho} ) - g^{\mu\rho} (2k_2^{\sigma}+k_3^{\sigma}) ) \end{equation} i.\,e. \begin{multline} \label{eq:fuse-gauge} A^{a,\mu}(k_2+k_3) = - \frac{\ii}{2!} f_{abc} \bigl( (k_2^{\mu}-k_3^{\mu})A^b(k_2) \cdot A^c(k_3) \\ + (2k_3+k_2)\cdot A^b(k_2)A^{c,\mu}(k_3) - A^{b,\mu}(k_2)A^c(k_3)\cdot(2k_2+k_3) \bigr) \end{multline} \end{subequations} \begin{dubious} Investigate the rearrangements proposed in~\cite{HELAS} for improved numerical stability. \end{dubious} *) (* \thocwmodulesubsection{Non-Gauge Vector Couplings} As a basis for the dimension-4 couplings of three vector bosons, we choose ``transversal'' and ``longitudinal'' (with respect to the first vector field) tensors that are odd and even under permutation of the second and third argument \begin{subequations} \begin{align} \mathcal{L}_T(V_1,V_2,V_3) &= V_1^\mu (V_{2,\nu}\ii\overleftrightarrow{\partial_\mu}V_3^\nu) = - \mathcal{L}_T(V_1,V_3,V_2) \\ \mathcal{L}_L(V_1,V_2,V_3) &= (\ii\partial_\mu V_1^\mu) V_{2,\nu}V_3^\nu = \mathcal{L}_L(V_1,V_3,V_2) \end{align} \end{subequations} Using partial integration in~$\mathcal{L}_L$, we find the convenient combinations \begin{subequations} \begin{align} \mathcal{L}_T(V_1,V_2,V_3) + \mathcal{L}_L(V_1,V_2,V_3) &= - 2 V_1^\mu \ii\partial_\mu V_{2,\nu} V_3^\nu \\ \mathcal{L}_T(V_1,V_2,V_3) - \mathcal{L}_L(V_1,V_2,V_3) &= 2 V_1^\mu V_{2,\nu} \ii\partial_\mu V_3^\nu \end{align} \end{subequations} As an important example, we can rewrite the dimension-4 ``anomalous'' triple gauge couplings \begin{multline} \ii\mathcal{L}_{\textrm{TGC}}(g_1,\kappa,g_4)/g_{VWW} = g_1 V^\mu (W^-_{\mu\nu} W^{+,\nu} - W^+_{\mu\nu} W^{-,\nu}) \\ + \kappa W^+_\mu W^-_\nu V^{\mu\nu} + g_4 W^+_\mu W^-_\nu (\partial^\mu V^\nu + \partial^\nu V^\mu) \end{multline} as \begin{multline} \mathcal{L}_{\textrm{TGC}}(g_1,\kappa,g_4) = g_1 \mathcal{L}_T(V,W^-,W^+) \\ - \frac{\kappa+g_1-g_4}{2} \mathcal{L}_T(W^-,V,W^+) + \frac{\kappa+g_1+g_4}{2} \mathcal{L}_T(W^+,V,W^-) \\ - \frac{\kappa-g_1-g_4}{2} \mathcal{L}_L(W^-,V,W^+) + \frac{\kappa-g_1+g_4}{2} \mathcal{L}_L(W^+,V,W^-) \end{multline} \thocwmodulesubsection{$CP$ Violation} \begin{subequations} \begin{align} \mathcal{L}_{\tilde T}(V_1,V_2,V_3) &= V_{1,\mu}(V_{2,\rho}\ii\overleftrightarrow{\partial_\nu} V_{3,\sigma})\epsilon^{\mu\nu\rho\sigma} = + \mathcal{L}_T(V_1,V_3,V_2) \\ \mathcal{L}_{\tilde L}(V_1,V_2,V_3) &= (\ii\partial_\mu V_{1,\nu}) V_{2,\rho}V_{3,\sigma}\epsilon^{\mu\nu\rho\sigma} = - \mathcal{L}_L(V_1,V_3,V_2) \end{align} \end{subequations} Here the notations~$\tilde T$ and~$\tilde L$ are clearly \textit{abuse de langage}, because $\mathcal{L}_{\tilde L}(V_1,V_2,V_3)$ is actually the transversal combination, due to the antisymmetry of~$\epsilon$. Using partial integration in~$\mathcal{L}_{\tilde L}$, we could again find combinations \begin{subequations} \begin{align} \mathcal{L}_{\tilde T}(V_1,V_2,V_3) + \mathcal{L}_{\tilde L}(V_1,V_2,V_3) &= - 2 V_{1,\mu} V_{2,\nu} \ii\partial_\rho V_{3,\sigma} \epsilon^{\mu\nu\rho\sigma} \\ \mathcal{L}_{\tilde T}(V_1,V_2,V_3) - \mathcal{L}_{\tilde L}(V_1,V_2,V_3) &= - 2 V_{1,\mu} \ii\partial_\nu V_{2,\rho} V_{3,\sigma} \epsilon^{\mu\nu\rho\sigma} \end{align} \end{subequations} but we don't need them, since \begin{multline} \ii\mathcal{L}_{\textrm{TGC}}(g_5,\tilde\kappa)/g_{VWW} = g_5 \epsilon_{\mu\nu\rho\sigma} (W^{+,\mu} \ii\overleftrightarrow{\partial^\rho} W^{-,\nu}) V^\sigma \\ - \frac{\tilde\kappa_V}{2} W^-_\mu W^+_\nu \epsilon^{\mu\nu\rho\sigma} V_{\rho\sigma} \end{multline} is immediately recognizable as \begin{equation} \mathcal{L}_{\textrm{TGC}}(g_5,\tilde\kappa) / g_{VWW} = - \ii g_5 \mathcal{L}_{\tilde L}(V,W^-,W^+) + \tilde\kappa \mathcal{L}_{\tilde T}(V,W^-,W^+) \end{equation} %%% #procedure decl %%% symbol g1, kappa; %%% vector V, Wp, Wm, k0, kp, km; %%% vector v, V1, V2, V3, k1, k2, k3; %%% index mu, nu; %%% #endprocedure %%% %%% #call decl %%% %%% global L_T(k1,V1,k2,V2,k3,V3) %%% = (V1.k2 - V1.k3) * V2.V3; %%% %%% global L_L(k1,V1,k2,V2,k3,V3) %%% = - V1.k1 * V2.V3; %%% %%% global L_g1(k1,V1,k2,V2,k3,V3) %%% = - V1(mu) * ( (k2(mu)*V2(nu) - k2(nu)*V2(mu)) * V3(nu) %%% - (k3(mu)*V3(nu) - k3(nu)*V3(mu)) * V2(nu) ); %%% %%% global L_kappa(k1,V1,k2,V2,k3,V3) %%% = (k1(mu)*V1(nu) - k1(nu)*V1(mu)) * V2(mu) * V3(nu); %%% %%% print; %%% .sort %%% .store %%% %%% #call decl %%% %%% local lp = L_T(k1,V1,k2,V2,k3,V3) + L_L(k1,V1,k2,V2,k3,V3); %%% local lm = L_T(k1,V1,k2,V2,k3,V3) - L_L(k1,V1,k2,V2,k3,V3); %%% print; %%% .sort %%% id k1.v? = - k2.v - k3.v; %%% print; %%% .sort %%% .store %%% %%% #call decl %%% %%% local [sum(TL)-g1] = - L_g1(k0,V,km,Wm,kp,Wp) %%% + L_T(k0,V,kp,Wp,km,Wm) %%% + (L_T(km,Wm,k0,V,kp,Wp) - L_T(kp,Wp,k0,V,km,Wm)) / 2 %%% - (L_L(km,Wm,k0,V,kp,Wp) - L_L(kp,Wp,k0,V,km,Wm)) / 2; %%% %%% local [sum(TL)-kappa] = - L_kappa(k0,V,km,Wm,kp,Wp) %%% + (L_T(km,Wm,k0,V,kp,Wp) - L_T(kp,Wp,k0,V,km,Wm)) / 2 %%% + (L_L(km,Wm,k0,V,kp,Wp) - L_L(kp,Wp,k0,V,km,Wm)) / 2; %%% %%% local delta = %%% - (g1 * L_g1(k0,V,km,Wm,kp,Wp) + kappa * L_kappa(k0,V,km,Wm,kp,Wp)) %%% + g1 * L_T(k0,V,kp,Wp,km,Wm) %%% + ( g1 + kappa) / 2 * (L_T(km,Wm,k0,V,kp,Wp) - L_T(kp,Wp,k0,V,km,Wm)) %%% + (- g1 + kappa) / 2 * (L_L(km,Wm,k0,V,kp,Wp) - L_L(kp,Wp,k0,V,km,Wm)); %%% %%% print; %%% .sort %%% %%% id k0.v? = - kp.v - km.v; %%% print; %%% .sort %%% .store %%% %%% .end *) (* \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dim4_Vector_Vector_Vector_T]: $\mathcal{L}_I=gV_1^\mu V_{2,\nu}\ii\overleftrightarrow{\partial_\mu}V_3^\nu$}\\\hline [F23] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g(k_2^\mu-k_3^\mu)V_{2,\nu}(k_2)V_3^\nu(k_3)$ \\\hline [F32] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g(k_2^\mu-k_3^\mu)V_3^\nu(k_3)V_{2,\nu}(k_2)$ \\\hline [F12] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g(2k_2^\nu+k_1^\nu)V_{1,\nu}(k_1)V_2^\mu(k_2)$ \\\hline [F21] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g(2k_2^\nu+k_1^\nu)V_2^\mu(k_2)V_{1,\nu}(k_1)$ \\\hline [F13] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g(-k_1^\nu-2k_3^\nu)V_1^\nu(k_1)V_3^\mu(k_3)$ \\\hline [F31] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g(-k_1^\nu-2k_3^\nu)V_3^\mu(k_3)V_1^\nu(k_1)$ \\\hline \multicolumn{2}{|l|}{[Dim4_Vector_Vector_Vector_L]: $\mathcal{L}_I=g\ii\partial_\mu V_1^\mu V_{2,\nu}V_3^\nu$}\\\hline [F23] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g(k_2^\mu+k_3^\mu)V_{2,\nu}(k_2)V_3^\nu(k_3)$ \\\hline [F32] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g(k_2^\mu+k_3^\mu)V_3^\nu(k_3)V_{2,\nu}(k_2)$ \\\hline [F12] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g(-k_1^\nu)V_{1,\nu}(k_1)V_2^\mu(k_2)$ \\\hline [F21] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g(-k_1^\nu)V_2^\mu(k_2)V_{1,\nu}(k_1)$ \\\hline [F13] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g(-k_1^\nu)V_1^\nu(k_1)V_3^\mu(k_3)$ \\\hline [F31] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g(-k_1^\nu)V_3^\mu(k_3)V_1^\nu(k_1)$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-TGC} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dim4_Vector_Vector_Vector_T5]: $\mathcal{L}_I=gV_{1,\mu} V_{2,\rho}\ii\overleftrightarrow{\partial_\nu} V_{3,\sigma}\epsilon^{\mu\nu\rho\sigma}$}\\\hline [F23] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(k_{2,\nu}-k_{3,\nu}) V_{2,\rho}(k_2)V_{3,\sigma}(k_3)$ \\\hline [F32] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(k_{2,\nu}-k_{3,\nu}) V_{3,\sigma}(k_3)V_{2,\rho}(k_2)$ \\\hline [F12] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(2k_{2,\nu}+k_{1,\nu}) V_{1,\rho}(k_1)V_{2,\sigma}(k_2)$ \\\hline [F21] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(2k_{2,\nu}+k_{1,\nu}) V_{2,\sigma}(k_2)V_{1,\rho}(k_1)$ \\\hline [F13] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(-k_{1,\nu}-2k_{3,\nu}) V_{1,\rho}(k_1)V_{3,\sigma}(k_3)$ \\\hline [F31] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(-k_{1,\nu}-2k_{3,\nu}) V_{3,\sigma}(k_3)V_{1,\rho}(k_1)$ \\\hline \multicolumn{2}{|l|}{[Dim4_Vector_Vector_Vector_L5]: $\mathcal{L}_I=g\ii\partial_\mu V_{1,\nu} V_{2,\nu}V_{3,\sigma}\epsilon^{\mu\nu\rho\sigma}$}\\\hline [F23] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(k_{2,\nu}+k_{3,\nu}) V_{2,\rho}(k_2)V_{3,\sigma}(k_3)$ \\\hline [F32] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(k_{2,\nu}+k_{3,\nu}) V_{2,\rho}(k_2)V_{3,\sigma}(k_3)$ \\\hline [F12] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(-k_{1,\nu}) V_{1,\rho}(k_1)V_{2,\sigma}(k_2)$ \\\hline [F21] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(-k_{1,\nu}) V_{2,\sigma}(k_2)V_{1,\rho}(k_1)$ \\\hline [F13] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(-k_{1,\nu}) V_{1,\rho}(k_1)V_{3,\sigma}(k_3)$ \\\hline [F31] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g\epsilon^{\mu\nu\rho\sigma}(-k_{1,\nu}) V_{3,\sigma}(k_3)V_{1,\rho}(k_1)$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-TGC5} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dim6_Gauge_Gauge_Gauge]: $\mathcal{L}_I=gF_1^{\mu\nu}F_{2,\nu\rho} F_{3,\hphantom{\rho}\mu}^{\hphantom{3,}\rho}$}\\\hline [_] & $A_1^\mu(k_2+k_3)\leftarrow-\ii\cdot \Lambda^{\mu\rho\sigma}(-k_2-k_3,k_2,k_3) A_{2,\rho} A_{c,\sigma}$\\\hline \end{tabular} \end{center} \caption{\label{tab:dim6-TGC} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dim6_Gauge_Gauge_Gauge_5]: $\mathcal{L}_I=g/2\cdot\epsilon^{\mu\nu\lambda\tau} F_{1,\mu\nu}F_{2,\tau\rho} F_{3,\hphantom{\rho}\lambda}^{\hphantom{3,}\rho}$}\\\hline [F23] & $A_1^\mu(k_2+k_3)\leftarrow-\ii\cdot \Lambda_5^{\mu\rho\sigma}(-k_2-k_3,k_2,k_3) A_{2,\rho} A_{3,\sigma}$\\\hline [F32] & $A_1^\mu(k_2+k_3)\leftarrow-\ii\cdot \Lambda_5^{\mu\rho\sigma}(-k_2-k_3,k_2,k_3) A_{3,\sigma} A_{2,\rho}$\\\hline [F12] & $A_3^\mu(k_1+k_2)\leftarrow-\ii\cdot$\\\hline [F21] & $A_3^\mu(k_1+k_2)\leftarrow-\ii\cdot$\\\hline [F13] & $A_2^\mu(k_1+k_3)\leftarrow-\ii\cdot$\\\hline [F31] & $A_2^\mu(k_1+k_3)\leftarrow-\ii\cdot$\\\hline \end{tabular} \end{center} \caption{\label{tab:dim6-TGC5} \ldots} \end{table} *) (* \thocwmodulesection{$\textrm{SU}(2)$ Gauge Bosons} An important special case for table~\ref{tab:dim4-bosons} are the two usual coordinates of~$\textrm{SU}(2)$ \begin{equation} W_\pm = \frac{1}{\sqrt2} \left(W_1 \mp \ii W_2\right) \end{equation} i.\,e. \begin{subequations} \begin{align} W_1 &= \frac{1}{\sqrt2} \left(W_+ + W_-\right) \\ W_2 &= \frac{\ii}{\sqrt2} \left(W_+ - W_-\right) \end{align} \end{subequations} and \begin{equation} W_1^\mu W_2^\nu - W_2^\mu W_1^\nu = \ii\left(W_-^\mu W_+^\nu - W_+^\mu W_-^\nu\right) \end{equation} Thus the symmtry remains after the change of basis: \begin{multline} \epsilon^{abc} W_a^{\mu_1}W_b^{\mu_2}W_c^{\mu_3} = \ii W_-^{\mu_1} (W_+^{\mu_2}W_3^{\mu_3} - W_3^{\mu_2}W_+^{\mu_3}) \\ + \ii W_+^{\mu_1} (W_3^{\mu_2}W_-^{\mu_3} - W_-^{\mu_2}W_3^{\mu_3}) + \ii W_3^{\mu_1} (W_-^{\mu_2}W_+^{\mu_3} - W_+^{\mu_2}W_-^{\mu_3}) \end{multline} *) (* \thocwmodulesection{Quartic Couplings and Auxiliary Fields} Quartic couplings can be replaced by cubic couplings to a non-propagating auxiliary field. The quartic term should get a negative sign so that it the energy is bounded from below for identical fields. In the language of functional integrals \begin{subequations} \label{eq:quartic-aux} \begin{multline} \mathcal{L}_{\phi^4} = - g^2\phi_1\phi_2\phi_3\phi_4 \Longrightarrow \\ \mathcal{L}_{X\phi^2} = X^*X \pm gX\phi_1\phi_2 \pm gX^*\phi_3\phi_4 = (X^* \pm g\phi_1\phi_2)(X \pm g\phi_3\phi_4) - g^2\phi_1\phi_2\phi_3\phi_4 \end{multline} and in the language of Feynman diagrams \begin{equation} \parbox{21mm}{\begin{fmfgraph*}(20,20) \fmfleft{e1,e2} \fmfright{e3,e4} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{plain}{v,e3} \fmf{plain}{v,e4} \fmfv{d.sh=circle,d.si=dot_size,label=$-\ii g^2$}{v} \end{fmfgraph*}} \qquad\Longrightarrow\qquad \parbox{21mm}{\begin{fmfgraph*}(20,20) \fmfleft{e1,e2} \fmfright{e3,e4} \fmf{plain}{v12,e1} \fmf{plain}{v12,e2} \fmf{plain}{v34,e3} \fmf{plain}{v34,e4} \fmf{dashes,label=$+\ii$}{v12,v34} \fmfv{d.sh=circle,d.si=dot_size,label=$\pm\ii g$}{v12} \fmfv{d.sh=circle,d.si=dot_size,label=$\pm\ii g$}{v34} \end{fmfgraph*}} \end{equation} \end{subequations} The other choice of signs \begin{equation} \mathcal{L}_{X\phi^2}' = - X^*X \pm gX\phi_1\phi_2 \mp gX^*\phi_3\phi_4 = - (X^* \pm g\phi_1\phi_2)(X \mp g\phi_3\phi_4) - g^2\phi_1\phi_2\phi_3\phi_4 \end{equation} can not be extended easily to identical particles and is therefore not used. For identical particles we have \begin{multline} \mathcal{L}_{\phi^4} = - \frac{g^2}{4!}\phi^4 \Longrightarrow \\ \mathcal{L}_{X\phi^2} = \frac{1}{2}X^2 \pm \frac{g}{2}X\phi^2 \pm \frac{g}{2}X\phi^2 = \frac{1}{2}\left(X \pm \frac{g}{2}\phi^2\right) \left(X \pm \frac{g}{2}\phi^2\right) - \frac{g^2}{4!}\phi^4 \end{multline} \begin{dubious} Explain the factor~$1/3$ in the functional setting and its relation to the three diagrams in the graphical setting? \end{dubious} \thocwmodulesubsection{Quartic Gauge Couplings} \begin{figure} \begin{subequations} \label{eq:Feynman-QCD} \begin{align} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,24) \threeexternal{k,,\mu,,a}{p}{p'} \fmf{gluon}{v,e1} \fmf{fermion}{e2,v,e3} \fmfdot{v} \end{fmfgraph*}}} \,&= \begin{split} \mbox{} + & \ii g\gamma_\mu T_a \end{split} \\ \label{eq:TGV} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,24) \threeexternal{1}{2}{3} \fmf{gluon}{v,e1} \fmf{gluon}{v,e2} \fmf{gluon}{v,e3} \threeoutgoing \end{fmfgraph*}}} \,&= \begin{split} & g f_{a_1a_2a_3} C^{\mu_1\mu_2\mu_3} (k_1,k_2,k_3) \end{split} \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,24) \fmfsurround{d1,e1,d2,e2,d3,e3,d4,e4} \fmf{gluon}{v,e1} \fmf{gluon}{v,e2} \fmf{gluon}{v,e3} \fmf{gluon}{v,e4} \fmflabel{1}{e1} \fmflabel{2}{e2} \fmflabel{3}{e3} \fmflabel{4}{e4} \fmfdot{v} \fmffreeze \fmf{warrow_right}{v,e1} \fmf{warrow_right}{v,e2} \fmf{warrow_right}{v,e3} \fmf{warrow_right}{v,e4} \end{fmfgraph*}}} \,&= \begin{split} \mbox{} - & \ii g^2 f_{a_1a_2b}f_{a_3a_4b} (g_{\mu_1\mu_3} g_{\mu_4\mu_2} - g_{\mu_1\mu_4} g_{\mu_2\mu_3}) \\ \mbox{} - & \ii g^2 f_{a_1a_3b}f_{a_4a_2b} (g_{\mu_1\mu_4} g_{\mu_2\mu_3} - g_{\mu_1\mu_2} g_{\mu_3\mu_4}) \\ \mbox{} - & \ii g^2 f_{a_1a_4b}f_{a_2a_3b} (g_{\mu_1\mu_2} g_{\mu_3\mu_4} - g_{\mu_1\mu_3} g_{\mu_4\mu_2}) \end{split} \end{align} \end{subequations} \caption{\label{fig:gauge-feynman-rules} Gauge couplings. See~(\ref{eq:C123}) for the definition of the antisymmetric tensor $C^{\mu_1\mu_2\mu_3}(k_1,k_2,k_3)$.} \end{figure} \begin{figure} \begin{equation} \label{eq:Feynman-QCD'} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,24) \fmfsurround{d1,e1,d2,e2,d3,e3,d4,e4} \fmf{gluon}{v12,e1} \fmf{gluon}{v12,e2} \fmf{gluon}{v34,e3} \fmf{gluon}{v34,e4} \fmf{dashes}{v12,v34} \fmflabel{1}{e1} \fmflabel{2}{e2} \fmflabel{3}{e3} \fmflabel{4}{e4} \fmfdot{v12,v34} \fmffreeze \fmf{warrow_right}{v12,e1} \fmf{warrow_right}{v12,e2} \fmf{warrow_right}{v34,e3} \fmf{warrow_right}{v34,e4} \end{fmfgraph*}}} \,= \mbox{} - \ii g^2 f_{a_1a_2b}f_{a_3a_4b} (g_{\mu_1\mu_3} g_{\mu_4\mu_2} - g_{\mu_1\mu_4} g_{\mu_2\mu_3}) \end{equation} \caption{\label{fig:gauge-feynman-rules'} Gauge couplings.} \end{figure} The three crossed versions of figure~\ref{fig:gauge-feynman-rules'} reproduces the quartic coupling in figure~\ref{fig:gauge-feynman-rules}, because \begin{multline} - \ii g^2 f_{a_1a_2b}f_{a_3a_4b} (g_{\mu_1\mu_3} g_{\mu_4\mu_2} - g_{\mu_1\mu_4} g_{\mu_2\mu_3}) \\ = (\ii g f_{a_1a_2b} T_{\mu_1\mu_2,\nu_1\nu_2}) \left(\frac{\ii g^{\nu_1\nu_3} g^{\nu_2\nu_4}}{2}\right) (\ii g f_{a_3a_4b} T_{\mu_3\mu_4,\nu_3\nu_4}) \end{multline} with $T_{\mu_1\mu_2,\mu_3\mu_4} = g_{\mu_1\mu_3}g_{\mu_4\mu_2}-g_{\mu_1\mu_4}g_{\mu_2\mu_3}$. *) (* \thocwmodulesection{Gravitinos and supersymmetric currents} In supergravity theories there is a fermionic partner of the graviton, the gravitino. Therefore we have introduced the Lorentz type [Vectorspinor]. *) (* \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[GBG (Fermbar, MOM, Ferm)]: $\bar\psi_1(\ii\fmslash{\partial}\pm m)\phi\psi_2$}\\\hline [F12] & $\psi_2\leftarrow-(\fmslash{k}\mp m)\psi_1S$ & [F21] & $\psi_2\leftarrow-S(\fmslash{k}\mp m)\psi_1$ \\\hline [F13] & $S\leftarrow \psi^T_1 {\rm C}(\fmslash{k}\pm m)\psi_2$ & [F31] & $S\leftarrow \psi^T_2 {\rm C}(-(\fmslash{k}\mp m)\psi_1)$ \\\hline [F23] & $\psi_1\leftarrow S(\fmslash{k}\pm m)\psi_2$ & [F32] & $\psi_1\leftarrow(\fmslash{k}\pm m)\psi_2 S$ \\\hline \multicolumn{4}{|l|}{[GBG (Fermbar, MOM5, Ferm)]: $\bar\psi_1(\ii\fmslash{\partial}\pm m)\phi\gamma^5\psi_2$}\\\hline [F12] & $\psi_2\leftarrow(\fmslash{k}\pm m)\gamma^5\psi_1P$ & [F21] & $\psi_2\leftarrow P(\fmslash{k}\pm m)\gamma^5\psi_1$ \\\hline [F13] & $P\leftarrow \psi^T_1 {\rm C}(\fmslash{k}\pm m)\gamma^5\psi_2$ & [F31] & $P\leftarrow \psi^T_2 {\rm C}(\fmslash{k}\pm m)\gamma^5\psi_1$ \\\hline [F23] & $\psi_1\leftarrow P(\fmslash{k}\pm m)\gamma^5\psi_2$ & [F32] & $\psi_1\leftarrow(\fmslash{k}\pm m)\gamma^5\psi_2 P$ \\\hline \multicolumn{4}{|l|}{[GBG (Fermbar, MOML, Ferm)]: $\bar\psi_1 (\ii\fmslash{\partial}\pm m)\phi(1-\gamma^5)\psi_2$}\\\hline [F12] & $\psi_2\leftarrow-(1-\gamma^5)(\fmslash{k}\mp m)\psi_1\phi$ & [F21] & $\psi_2\leftarrow-\phi(1-\gamma^5)(\fmslash{k}\mp m)\psi_1$ \\\hline [F13] & $\phi\leftarrow \psi^T_1 {\rm C}(\fmslash{k}\pm m)(1-\gamma^5)\psi_2$ & [F31] & $\phi\leftarrow \psi^T_2 {\rm C}(1-\gamma^5)(-(\fmslash{k}\mp m)\psi_1)$ \\\hline [F23] & $\psi_1\leftarrow\phi(\fmslash{k}\pm m)(1-\gamma^5)\psi_2$ & [F32] & $\psi_1\leftarrow(\fmslash{k}\pm m)(1-\gamma^5)\psi_2 \phi$ \\\hline \multicolumn{4}{|l|}{[GBG (Fermbar, LMOM, Ferm)]: $\bar\psi_1 \phi(1-\gamma^5)(\ii\fmslash{\partial}\pm m)\psi_2$}\\\hline [F12] & $\psi_2\leftarrow-(\fmslash{k}\mp m)\psi_1(1-\gamma^5)\phi$ & [F21] & $\psi_2\leftarrow-\phi(\fmslash{k}\mp m)(1-\gamma^5)\psi_1$ \\\hline [F13] & $\phi\leftarrow \psi^T_1 {\rm C}(1-\gamma^5)(\fmslash{k}\pm m)\psi_2$ & [F31] & $\phi\leftarrow \psi^T_2 {\rm C}(-(\fmslash{k}\mp m)(1-\gamma^5)\psi_1)$ \\\hline [F23] & $\psi_1\leftarrow\phi(1-\gamma^5)(\fmslash{k}\pm m)\psi_2$ & [F32] & $\psi_1\leftarrow(1-\gamma^5)(\fmslash{k}\pm m)\psi_2 \phi$ \\\hline \multicolumn{4}{|l|}{[GBG (Fermbar, VMOM, Ferm)]: $\bar\psi_1 \ii\fmslash{\partial}_\alpha V_\beta \lbrack \gamma^\alpha, \gamma^\beta \rbrack \psi_2$}\\\hline [F12] & $\psi_2\leftarrow-\lbrack\fmslash{k},\gamma^\alpha\rbrack\psi_1 V_\alpha$ & [F21] & $\psi_2\leftarrow-\lbrack\fmslash{k},\fmslash{V}\rbrack\psi_1$ \\\hline [F13] & $V_\alpha\leftarrow \psi^T_1 {\rm C}\lbrack\fmslash{k},\gamma_\alpha\rbrack\psi_2$ & [F31] & $V_\alpha\leftarrow \psi^T_2 {\rm C}(-\lbrack\fmslash{k}, \gamma_\alpha\rbrack\psi_1)$ \\\hline [F23] & $\psi_1\leftarrow\rbrack\fmslash{k},\fmslash{V}\rbrack\psi_2$ & [F32] & $\psi_1\leftarrow\lbrack\fmslash{k},\gamma^\alpha\rbrack\psi_2 V_\alpha$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim4-fermions-MOM} Combined dimension-4 trilinear fermionic couplings including a momentum. $Ferm$ stands for $Psi$ and $Chi$. The case of $MOMR$ is identical to $MOML$ if one substitutes $1+\gamma^5$ for $1-\gamma^5$, as well as for $LMOM$ and $RMOM$. The mass term forces us to keep the chiral projector always on the left after "inverting the line" for $MOML$ while on the right for $LMOM$.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{2}{|l|}{[GBBG (Fermbar, S2LR, Ferm)]: $\bar\psi_1 S_1 S_2 (g_L P_L + g_R P_R) \psi_2$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_2\leftarrow S_1 S_2 (g_R P_L + g_L P_R) \psi_1$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_1 \leftarrow S_1 S_2 (g_L P_L + g_R P_R) \psi_2$ \\ \hline [F134] [F143] [F314] & $S_1 \leftarrow \psi^T_1 C S_2 (g_L P_L + g_R P_R) \psi_2$ \\ \hline [F124] [F142] [F214] & $S_2 \leftarrow \psi^T_1 C S_1 (g_L P_L + g_R P_R) \psi_2$ \\ \hline [F413] [F431] [F341] & $S_1 \leftarrow \psi^T_2 C S_2 (g_R P_L + g_L P_R) \psi_1$ \\ \hline [F412] [F421] [F241] & $S_2 \leftarrow \psi^T_2 C S_1 (g_R P_L + g_L P_R) \psi_1$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Fermbar, S2, Ferm)]: $\bar\psi_1 S_1 S_2 \gamma^5 \psi_2$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_2\leftarrow S_1 S_2 \gamma^5 \psi_1$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_1 \leftarrow S_1 S_2 \gamma^5 \psi_2$ \\ \hline [F134] [F143] [F314] & $S_1 \leftarrow \psi^T_1 C S_2 \gamma^5 \psi_2$ \\ \hline [F124] [F142] [F214] & $S_2 \leftarrow \psi^T_1 C S_1 \gamma^5 \psi_2$ \\ \hline [F413] [F431] [F341] & $S_1 \leftarrow \psi^T_2 C S_2 \gamma^5 \psi_1$ \\ \hline [F412] [F421] [F241] & $S_2 \leftarrow \psi^T_2 C S_1 \gamma^5 \psi_1$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Fermbar, V2, Ferm)]: $\bar\psi_1 \lbrack \fmslash{V}_1 , \fmslash{V}_2 \rbrack \psi_2$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_2\leftarrow - \lbrack \fmslash{V}_1 , \fmslash{V}_2 \rbrack \psi_1$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_1 \leftarrow \lbrack \fmslash{V}_1 , \fmslash{V}_2 \rbrack \psi_2$ \\ \hline [F134] [F143] [F314] & $V_{1\:\alpha} \leftarrow \psi^T_1 C \lbrack \gamma_\alpha , \fmslash{V}_2 \rbrack \psi_2$ \\ \hline [F124] [F142] [F214] & $V_{2\:\alpha} \leftarrow \psi^T_1 C (-\lbrack \gamma_\alpha , \fmslash{V}_1 \rbrack) \psi_2$ \\ \hline [F413] [F431] [F341] & $V_{1\:\alpha} \leftarrow \psi^T_2 C (-\lbrack \gamma_\alpha , \fmslash{V}_2 \rbrack) \psi_1$ \\ \hline [F412] [F421] [F241] & $V_{2\:\alpha} \leftarrow \psi^T_2 C \lbrack \gamma_\alpha , \fmslash{V}_1 \rbrack \psi_1$ \\ \hline \end{tabular} \end{center} \caption{\label{tab:dim5-mom2} Vertices with two fermions ($Ferm$ stands for $Psi$ and $Chi$, but not for $Grav$) and two bosons (two scalars, scalar/vector, two vectors) for the BRST transformations. Part I} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{2}{|l|}{[GBBG (Fermbar, SV, Ferm)]: $\bar\psi_1 \fmslash{V} S \psi_2$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_2\leftarrow - \fmslash{V} S \psi_1$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_1 \leftarrow \fmslash{V} S \psi_2$ \\ \hline [F134] [F143] [F314] & $V_\alpha \leftarrow \psi^T_1 C \gamma_\alpha S \psi_2$ \\ \hline [F124] [F142] [F214] & $S \leftarrow \psi^T_1 C \fmslash{V} \psi_2$ \\ \hline [F413] [F431] [F341] & $V_\alpha \leftarrow \psi^T_2 C (- \gamma_\alpha S \psi_1)$ \\ \hline [F412] [F421] [F241] & $S \leftarrow \psi^T_2 C (- \fmslash{V} \psi_1)$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Fermbar, PV, Ferm)]: $\bar\psi_1 \fmslash{V} \gamma^5 P \psi_2$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_2\leftarrow \fmslash{V} \gamma^5 P \psi_1$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_1 \leftarrow \fmslash{V} \gamma^5 P \psi_2$ \\ \hline [F134] [F143] [F314] & $V_\alpha \leftarrow \psi^T_1 C \gamma_\alpha \gamma^5 P \psi_2$ \\ \hline [F124] [F142] [F214] & $P \leftarrow \psi^T_1 C \fmslash{V} \gamma^5 \psi_2$ \\ \hline [F413] [F431] [F341] & $V_\alpha \leftarrow \psi^T_2 C \gamma_\alpha \gamma^5 P \psi_1$ \\ \hline [F412] [F421] [F241] & $P \leftarrow \psi^T_2 C \fmslash{V} \gamma^5 \psi_1$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Fermbar, S(L/R)V, Ferm)]: $\bar\psi_1 \fmslash{V} (1 \mp\gamma^5) \phi \psi_2$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_2\leftarrow - \fmslash{V} (1\pm\gamma^5) \phi \psi_1$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_1 \leftarrow \fmslash{V} (1\mp\gamma^5) \phi \psi_2$ \\ \hline [F134] [F143] [F314] & $V_\alpha \leftarrow \psi^T_1 C \gamma_\alpha (1\mp\gamma^5) \phi \psi_2$ \\ \hline [F124] [F142] [F214] & $\phi \leftarrow \psi^T_1 C \fmslash{V} (1\mp\gamma^5) \psi_2$ \\ \hline [F413] [F431] [F341] & $V_\alpha \leftarrow \psi^T_2 C \gamma_\alpha (-(1\pm\gamma^5) \phi \psi_1)$ \\ \hline [F412] [F421] [F241] & $\phi \leftarrow \psi^T_2 C \fmslash{V} (-(1\pm\gamma^5) \psi_1)$ \\ \hline \end{tabular} \end{center} \caption{\label{tab:dim5-mom2} Vertices with two fermions ($Ferm$ stands for $Psi$ and $Chi$, but not for $Grav$) and two bosons (two scalars, scalar/vector, two vectors) for the BRST transformations. Part II} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[GBG (Gravbar, POT, Psi)]: $\bar\psi_\mu S \gamma^\mu \psi$}\\\hline [F12] & $\psi\leftarrow - \gamma^\mu \psi_\mu S$ & [F21] & $\psi\leftarrow - S\gamma^\mu \psi_\mu$ \\\hline [F13] & $S\leftarrow \psi^T_\mu {\rm C} \gamma^\mu \psi$ & [F31] & $S\leftarrow \psi^T{\rm C} (-\gamma^\mu)\psi_\mu$ \\\hline [F23] & $\psi_\mu\leftarrow S\gamma_\mu\psi$ & [F32] & $\psi_\mu\leftarrow \gamma_\mu \psi S$ \\\hline \multicolumn{4}{|l|}{[GBG (Gravbar, S, Psi)]: $\bar\psi_\mu \fmslash{k}_S S \gamma^\mu \psi$}\\\hline [F12] & $\psi\leftarrow \gamma^\mu \fmslash{k}_S \psi_\mu S$ & [F21] & $\psi\leftarrow S\gamma^\mu \fmslash{k}_S \psi_\mu$ \\\hline [F13] & $S\leftarrow \psi^T_\mu {\rm C} \fmslash{k}_S \gamma^\mu \psi$ & [F31] & $S\leftarrow \psi^T{\rm C}\gamma^\mu\fmslash{k}_S \psi_\mu$ \\\hline [F23] & $\psi_\mu\leftarrow S\fmslash{k}_S\gamma_\mu\psi$ & [F32] & $\psi_\mu\leftarrow \fmslash{k}_S \gamma_\mu \psi S$ \\\hline \multicolumn{4}{|l|}{[GBG (Gravbar, P, Psi)]: $\bar\psi_\mu \fmslash{k}_P P \gamma^\mu \gamma_5 \psi$}\\\hline [F12] & $\psi\leftarrow \gamma^\mu\fmslash{k}_P\gamma_5\psi_\mu P$ & [F21] & $\psi\leftarrow P\gamma^\mu\fmslash{k}_P\gamma_5\psi_\mu$ \\\hline [F13] & $P\leftarrow \psi^T_\mu {\rm C}\fmslash{k}_P\gamma^\mu\gamma_5\psi$ & [F31] & $P\leftarrow \psi^T {\rm C}\gamma^\mu\fmslash{k}_P\gamma_5\psi_\mu$ \\\hline [F23] & $\psi_\mu\leftarrow P\fmslash{k}_P \gamma_\mu \gamma_5 \psi$ & [F32] & $\psi_\mu\leftarrow \fmslash{k}_P \gamma_\mu \gamma_5 \psi P$ \\\hline \multicolumn{4}{|l|}{[GBG (Gravbar, V, Psi)]: $\bar\psi_\mu\lbrack\fmslash{k}_V,\fmslash{V}\rbrack\gamma^\mu\gamma^5\psi$}\\\hline [F12] & $\psi\leftarrow \gamma^5\gamma^\mu \lbrack \fmslash{k}_V , \gamma^\alpha \rbrack \psi_\mu V_\alpha$ & [F21] & $\psi\leftarrow \gamma^5\gamma^\mu \lbrack \fmslash{k}_V , \fmslash{V} \rbrack\psi_\mu$ \\\hline [F13] & $V_{\mu}\leftarrow \psi^T_\rho {\rm C} \lbrack \fmslash{k}_V , \gamma_\mu \rbrack \gamma^\rho \gamma^5 \psi$ & [F31] & $V_{\mu}\leftarrow \psi^T {\rm C} \gamma^5 \gamma^{\rho} \lbrack \fmslash{k}_V , \gamma_\mu \rbrack \psi_\rho$ \\\hline [F23] & $\psi_\mu\leftarrow\lbrack \fmslash{k}_V , \fmslash{V} \rbrack \gamma_\mu \gamma^5 \psi $ & [F32] & $\psi_\mu\leftarrow\lbrack \fmslash{k}_V , \gamma^\alpha \rbrack \gamma_\mu \gamma^5 \psi V_\alpha$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim5-fermions-gravdirac} Dimension-5 trilinear couplings including one Dirac, one Gravitino fermion and one additional particle.The option [POT] is for the coupling of the supersymmetric current to the derivative of the quadratic terms in the superpotential.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[GBG (Psibar, POT, Grav)]: $\bar\psi \gamma^\mu S \psi_\mu$}\\\hline [F12] & $\psi_\mu\leftarrow - \gamma_\mu \psi S$ & [F21] & $\psi_\mu\leftarrow - S \gamma_\mu\psi$ \\\hline [F13] & $S\leftarrow \psi^T{\rm C}\gamma^\mu\psi_\mu$ & [F31] & $S\leftarrow \psi^T_\mu {\rm C} (-\gamma^\mu) \psi$ \\\hline [F23] & $\psi\leftarrow S\gamma^\mu\psi_\mu$ & [F32] & $\psi\leftarrow \gamma^\mu\psi_\mu S$ \\\hline \multicolumn{4}{|l|}{[GBG (Psibar, S, Grav)]: $\bar\psi \gamma^\mu \fmslash{k}_S S \psi_\mu$}\\\hline [F12] & $\psi_\mu\leftarrow \fmslash{k}_S \gamma_\mu \psi S$ & [F21] & $\psi_\mu\leftarrow S \fmslash{k}_S \gamma_\mu\psi$ \\\hline [F13] & $S\leftarrow \psi^T{\rm C}\gamma^\mu\fmslash{k}_S \psi_\mu$ & [F31] & $S\leftarrow \psi^T_\mu {\rm C} \fmslash{k}_S \gamma^\mu \psi$ \\\hline [F23] & $\psi\leftarrow S\gamma^\mu\fmslash{k}_S\psi_\mu$ & [F32] & $\psi\leftarrow \gamma^\mu\fmslash{k}_S\psi_\mu S$ \\\hline \multicolumn{4}{|l|}{[GBG (Psibar, P, Grav)]: $\bar\psi \gamma^\mu\gamma^5 P\fmslash{k}_P \psi_\mu$}\\\hline [F12] & $\psi_\mu\leftarrow -\fmslash{k}_P \gamma_\mu \gamma^5 \psi P$ & [F21] & $\psi_\mu\leftarrow -P\fmslash{k}_P \gamma_\mu \gamma^5 \psi$ \\\hline [F13] & $P\leftarrow \psi^T {\rm C}\gamma^\mu\gamma^5\fmslash{k}_P\psi_\mu$ & [F31] & $P\leftarrow -\psi^T_\mu {\rm C}\fmslash{k}_P\gamma^\mu\gamma_5\psi$ \\\hline [F23] & $\psi\leftarrow P \gamma^\mu\gamma^5\fmslash{k}_P\psi_\mu$ & [F32] & $\psi\leftarrow \gamma^\mu\gamma^5\fmslash{k}_P\psi_\mu P$ \\\hline \multicolumn{4}{|l|}{[GBG (Psibar, V, Grav)]: $\bar\psi\gamma^5\gamma^\mu\lbrack\fmslash{k}_V,\fmslash{V}\rbrack\psi_\mu$}\\\hline [F12] & $\psi_\mu\leftarrow \lbrack \fmslash{k}_V , \gamma^\alpha \rbrack \gamma_\mu \gamma^5 \psi V_\alpha$ & [F21] & $\psi_\mu\leftarrow \lbrack \fmslash{k}_V , \fmslash{V} \rbrack \gamma_\mu \gamma^5 \psi$ \\\hline [F13] & $V_{\mu}\leftarrow \psi^T {\rm C} \gamma^5 \gamma^\rho \lbrack \fmslash{k}_V , \gamma_\mu \rbrack \psi_\rho$ & [F31] & $V_{\mu}\leftarrow \psi^T_\rho {\rm C} \lbrack \fmslash{k}_V , \gamma_\mu \rbrack \gamma^\rho \gamma^5 \psi$ \\\hline [F23] & $\psi\leftarrow\gamma^5\gamma^\mu\lbrack \fmslash{k}_V , \fmslash{V} \rbrack\psi_\mu$ & [F32] & $\psi\leftarrow\gamma^5\gamma^\mu\lbrack \fmslash{k}_V , \gamma^\alpha \rbrack\psi_\mu V_\alpha$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim5-fermions-diracgrav} Dimension-5 trilinear couplings including one conjugated Dirac, one Gravitino fermion and one additional particle.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[GBG (Gravbar, POT, Chi)]: $\bar\psi_\mu S \gamma^\mu \chi$}\\\hline [F12] & $\chi\leftarrow - \gamma^\mu \psi_\mu S$ & [F21] & $\chi\leftarrow - S\gamma^\mu \psi_\mu$ \\\hline [F13] & $S\leftarrow \psi^T_\mu {\rm C} \gamma^\mu \chi$ & [F31] & $S\leftarrow \chi^T{\rm C} (-\gamma^\mu)\psi_\mu$ \\\hline [F23] & $\psi_\mu\leftarrow S\gamma_\mu\chi$ & [F32] & $\psi_\mu\leftarrow \gamma_\mu \chi S$ \\\hline \multicolumn{4}{|l|}{[GBG (Gravbar, S, Chi)]: $\bar\psi_\mu \fmslash{k}_S S \gamma^\mu \chi$}\\\hline [F12] & $\chi\leftarrow \gamma^\mu \fmslash{k}_S \psi_\mu S$ & [F21] & $\chi\leftarrow S\gamma^\mu \fmslash{k}_S \psi_\mu$ \\\hline [F13] & $S\leftarrow \psi^T_\mu {\rm C} \fmslash{k}_S \gamma^\mu \chi$ & [F31] & $S\leftarrow \chi^T{\rm C}\gamma^\mu\fmslash{k}_S \psi_\mu$ \\\hline [F23] & $\psi_\mu\leftarrow S\fmslash{k}_S\gamma_\mu\chi$ & [F32] & $\psi_\mu\leftarrow \fmslash{k}_S \gamma_\mu \chi S$ \\\hline \multicolumn{4}{|l|}{[GBG (Gravbar, P, Chi)]: $\bar\psi_\mu \fmslash{k}_P P \gamma^\mu \gamma_5 \chi$}\\\hline [F12] & $\chi\leftarrow \gamma^\mu\fmslash{k}_P\gamma_5\psi_\mu P$ & [F21] & $\chi\leftarrow P\gamma^\mu\fmslash{k}_P\gamma_5\psi_\mu$ \\\hline [F13] & $P\leftarrow \psi^T_\mu {\rm C}\fmslash{k}_P\gamma^\mu\gamma_5\chi$ & [F31] & $P\leftarrow \chi^T {\rm C}\gamma^\mu\fmslash{k}_P\gamma_5\psi_\mu$ \\\hline [F23] & $\psi_\mu\leftarrow P\fmslash{k}_P \gamma_\mu \gamma_5 \chi$ & [F32] & $\psi_\mu\leftarrow \fmslash{k}_P \gamma_\mu \gamma_5 \chi P$ \\\hline \multicolumn{4}{|l|}{[GBG (Gravbar, V, Chi)]: $\bar\psi_\mu\lbrack\fmslash{k}_V,\fmslash{V}\rbrack\gamma^\mu\gamma^5\chi$}\\\hline [F12] & $\chi\leftarrow \gamma^5\gamma^\mu \lbrack \fmslash{k}_V , \gamma^\alpha \rbrack \psi_\mu V_\alpha$ & [F21] & $\chi\leftarrow \gamma^5\gamma^\mu \lbrack \fmslash{k}_V , \fmslash{V} \rbrack\psi_\mu$ \\\hline [F13] & $V_{\mu}\leftarrow \psi^T_\rho {\rm C} \lbrack \fmslash{k}_V , \gamma_\mu \rbrack \gamma^\rho \gamma^5 \chi$ & [F31] & $V_{\mu}\leftarrow \chi^T {\rm C} \gamma^5 \gamma^{\rho} \lbrack \fmslash{k}_V , \gamma_\mu \rbrack \psi_\rho$ \\\hline [F23] & $\psi_\mu\leftarrow\lbrack \fmslash{k}_V , \fmslash{V} \rbrack \gamma_\mu \gamma^5 \chi $ & [F32] & $\psi_\mu\leftarrow\lbrack \fmslash{k}_V , \gamma^\alpha \rbrack \gamma_\mu \gamma^5 \chi V_\alpha$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim5-fermions-gravmajo} Dimension-5 trilinear couplings including one Majorana, one Gravitino fermion and one additional particle. The table is essentially the same as the one with the Dirac fermion and only written for the sake of completeness.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{4}{|l|}{[GBG (Chibar, POT, Grav)]: $\bar\chi \gamma^\mu S \psi_\mu$}\\\hline [F12] & $\psi_\mu\leftarrow - \gamma_\mu \chi S$ & [F21] & $\psi_\mu\leftarrow - S \gamma_\mu\chi$ \\\hline [F13] & $S\leftarrow \chi^T{\rm C}\gamma^\mu\psi_\mu$ & [F31] & $S\leftarrow \psi^T_\mu {\rm C} (-\gamma^\mu) \chi$ \\\hline [F23] & $\chi\leftarrow S\gamma^\mu\psi_\mu$ & [F32] & $\chi\leftarrow \gamma^\mu\psi_\mu S$ \\\hline \multicolumn{4}{|l|}{[GBG (Chibar, S, Grav)]: $\bar\chi \gamma^\mu \fmslash{k}_S S \psi_\mu$}\\\hline [F12] & $\psi_\mu\leftarrow \fmslash{k}_S \gamma_\mu \chi S$ & [F21] & $\psi_\mu\leftarrow S \fmslash{k}_S \gamma_\mu\chi$ \\\hline [F13] & $S\leftarrow \chi^T{\rm C}\gamma^\mu\fmslash{k}_S \psi_\mu$ & [F31] & $S\leftarrow \psi^T_\mu {\rm C} \fmslash{k}_S \gamma^\mu \chi$ \\\hline [F23] & $\chi\leftarrow S\gamma^\mu\fmslash{k}_S\psi_\mu$ & [F32] & $\chi\leftarrow \gamma^\mu\fmslash{k}_S\psi_\mu S$ \\\hline \multicolumn{4}{|l|}{[GBG (Chibar, P, Grav)]: $\bar\chi \gamma^\mu\gamma^5 P\fmslash{k}_P \psi_\mu$}\\\hline [F12] & $\psi_\mu\leftarrow -\fmslash{k}_P \gamma_\mu \gamma^5 \chi P$ & [F21] & $\psi_\mu\leftarrow -P\fmslash{k}_P \gamma_\mu \gamma^5 \chi$ \\\hline [F13] & $P\leftarrow \chi^T {\rm C}\gamma^\mu\gamma^5\fmslash{k}_P\psi_\mu$ & [F31] & $P\leftarrow -\psi^T_\mu {\rm C}\fmslash{k}_P\gamma^\mu\gamma_5\chi$ \\\hline [F23] & $\chi\leftarrow P \gamma^\mu\gamma^5\fmslash{k}_P\psi_\mu$ & [F32] & $\chi\leftarrow \gamma^\mu\gamma^5\fmslash{k}_P\psi_\mu P$ \\\hline \multicolumn{4}{|l|}{[GBG (Chibar, V, Grav)]: $\bar\chi\gamma^5\gamma^\mu\lbrack\fmslash{k}_V,\fmslash{V}\rbrack\psi_\mu$}\\\hline [F12] & $\psi_\mu\leftarrow \lbrack \fmslash{k}_V , \gamma^\alpha \rbrack \gamma_\mu \gamma^5 \chi V_\alpha$ & [F21] & $\psi_\mu\leftarrow \lbrack \fmslash{k}_V , \fmslash{V} \rbrack \gamma_\mu \gamma^5 \chi$ \\\hline [F13] & $V_{\mu}\leftarrow \chi^T {\rm C} \gamma^5 \gamma^\rho \lbrack \fmslash{k}_V , \gamma_\mu \rbrack \psi_\rho$ & [F31] & $V_{\mu}\leftarrow \psi^T_\rho {\rm C} \lbrack \fmslash{k}_V , \gamma_\mu \rbrack \gamma^\rho \gamma^5 \chi$ \\\hline [F23] & $\chi\leftarrow\gamma^5\gamma^\mu\lbrack \fmslash{k}_V , \fmslash{V} \rbrack\psi_\mu$ & [F32] & $\chi\leftarrow\gamma^5\gamma^\mu\lbrack \fmslash{k}_V , \gamma^\alpha \rbrack\psi_\mu V_\alpha$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim5-fermions-majograv} Dimension-5 trilinear couplings including one conjugated Majorana, one Gravitino fermion and one additional particle. This table is not only the same as the one with the conjugated Dirac fermion but also the same part of the Lagrangian density as the one with the Majorana particle on the right of the gravitino.} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{2}{|l|}{[GBBG (Gravbar, S2, Psi)]: $\bar\psi_\mu S_1 S_2 \gamma^\mu \psi$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi\leftarrow - \gamma^\mu S_1 S_2 \psi_\mu$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_\mu \leftarrow \gamma_\mu S_1 S_2 \psi$ \\ \hline [F134] [F143] [F314] & $S_1 \leftarrow \psi^T_\mu C S_2 \gamma^\mu \psi$ \\ \hline [F124] [F142] [F214] & $S_2 \leftarrow \psi^T_\mu C S_1 \gamma^\mu \psi$ \\ \hline [F413] [F431] [F341] & $S_1 \leftarrow - \psi^T C S_2 \gamma^\mu \psi_\mu$ \\ \hline [F412] [F421] [F241] & $S_2 \leftarrow - \psi^T C S_1 \gamma^\mu \psi_\mu$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Gravbar, SV, Psi)]: $\bar\psi_\mu S \fmslash{V} \gamma^\mu \gamma^5 \psi$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi\leftarrow \gamma^5 \gamma^\mu S \fmslash{V} \psi_\mu$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_\mu \leftarrow \fmslash{V} S \gamma_\mu \gamma^5 \psi$ \\ \hline [F134] [F143] [F314] & $S \leftarrow \psi^T_\mu C \fmslash{V} \gamma^\mu \gamma^5 \psi$ \\ \hline [F124] [F142] [F214] & $V_\mu \leftarrow \psi^T_\rho C S \gamma_\mu \gamma^\rho \gamma^5 \psi$ \\ \hline [F413] [F431] [F341] & $S \leftarrow \psi^T C \gamma^5 \gamma^\mu \fmslash{V} \psi_\mu$ \\ \hline [F412] [F421] [F241] & $V_\mu \leftarrow \psi^T C S \gamma^5 \gamma^\rho \gamma_\mu \psi_\rho$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Gravbar, PV, Psi)]: $\bar\psi_\mu P \fmslash{V} \gamma^\mu \psi$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi\leftarrow \gamma^\mu P \fmslash{V} \psi_\mu$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_\mu \leftarrow \fmslash{V} P \gamma_\mu \psi$ \\ \hline [F134] [F143] [F314] & $P \leftarrow \psi^T_\mu C \fmslash{V} \gamma^\mu \psi$ \\ \hline [F124] [F142] [F214] & $V_\mu \leftarrow \psi^T_\rho C P \gamma_\mu \gamma^\rho \psi$ \\ \hline [F413] [F431] [F341] & $P \leftarrow \psi^T C \gamma^\mu \fmslash{V} \psi_\mu$ \\ \hline [F412] [F421] [F241] & $V_\mu \leftarrow \psi^T C P \gamma^\rho \gamma_\mu \psi_\rho$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Gravbar, V2, Psi)]: $\bar\psi_\mu f_{abc} \lbrack \fmslash{V}^a , \fmslash{V}^b \rbrack\gamma^\mu \gamma^5 \psi$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi\leftarrow f_{abc} \gamma^5 \gamma^\mu \lbrack \fmslash{V}^a , \fmslash{V}^b \rbrack \psi_\mu$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi_\mu \leftarrow f_{abc} \lbrack \fmslash{V}^a , \fmslash{V}^b \rbrack \gamma_\mu \gamma^5 \psi$ \\ \hline [F134] [F143] [F314] [F124] [F142] [F214] & $V_\mu^a \leftarrow\psi^T_\rho C f_{abc} \lbrack \gamma_\mu , \fmslash{V}^b \rbrack \gamma^\rho \gamma^5 \psi$ \\ \hline [F413] [F431] [F341] [F412] [F421] [F241] & $V_\mu^a \leftarrow\psi^T C f_{abc} \gamma^5 \gamma^\rho\lbrack \gamma_\mu , \fmslash{V}^b \rbrack \psi_\rho$ \\ \hline \end{tabular} \end{center} \caption{\label{tab:dim5-gravferm2boson} Dimension-5 trilinear couplings including one Dirac, one Gravitino fermion and two additional bosons. In each lines we list the fusion possibilities with the same order of the fermions, but the order of the bosons is arbitrary (of course, one has to take care of this order in the mapping of the wave functions in [fusion]).} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|r<{:}l|}\hline \multicolumn{2}{|l|}{[GBBG (Psibar, S2, Grav)]: $\bar\psi S_1 S_2 \gamma^\mu \psi_\mu$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_\mu\leftarrow - \gamma_\mu S_1 S_2 \psi$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi \leftarrow \gamma^\mu S_1 S_2 \psi_\mu$ \\ \hline [F134] [F143] [F314] & $S_1 \leftarrow \psi^T C S_2 \gamma^\mu \psi_\mu$ \\ \hline [F124] [F142] [F214] & $S_2 \leftarrow \psi^T C S_1 \gamma^\mu \psi_\mu$ \\ \hline [F413] [F431] [F341] & $S_1 \leftarrow - \psi^T_\mu C S_2 \gamma^\mu \psi$ \\ \hline [F412] [F421] [F241] & $S_2 \leftarrow - \psi^T_\mu C S_1 \gamma^\mu \psi$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Psibar, SV, Grav)]: $\bar\psi S \gamma^\mu \gamma^5 \fmslash{V} \psi_\mu$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_\mu\leftarrow \fmslash{V} S \gamma^5 \gamma^\mu \psi$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi\leftarrow \gamma^\mu\gamma^5 S\fmslash{V}\psi_\mu$ \\ \hline [F134] [F143] [F314] & $S \leftarrow \psi^T C \gamma^\mu \gamma^5 \fmslash{V}\psi$ \\ \hline [F124] [F142] [F214] & $V_\mu \leftarrow \psi^T C \gamma^\rho \gamma^5 S \gamma_\mu \psi_\rho$ \\ \hline [F413] [F431] [F341] & $S \leftarrow \psi^T_\mu C \fmslash{V} \gamma^5 \gamma^\mu \psi$ \\ \hline [F412] [F421] [F241] & $V_\mu \leftarrow \psi^T_\rho C S \gamma_\mu \gamma^5 \gamma^\rho \psi$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Psibar, PV, Grav)]: $\bar\psi P \gamma^\mu \fmslash{V} \psi_\mu$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_\mu\leftarrow \fmslash{V}\gamma_\mu P \psi$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi\leftarrow \gamma^\mu\fmslash{V} P\psi_\mu$ \\ \hline [F134] [F143] [F314] & $P \leftarrow \psi^T C \gamma^\mu\fmslash{V}\psi_\mu$ \\ \hline [F124] [F142] [F214] & $V_\mu \leftarrow \psi^T C P \gamma^\rho \gamma_\mu \psi_\rho$ \\ \hline [F413] [F431] [F341] & $P \leftarrow \psi^T_\mu C \fmslash{V}\gamma^\mu \psi$ \\ \hline [F412] [F421] [F241] & $V_\mu \leftarrow \psi^T_\rho C P \gamma_\mu \gamma^\rho \psi$ \\ \hline \multicolumn{2}{|l|}{[GBBG (Psibar, V2, Grav)]: $\bar\psi f_{abc} \gamma^5 \gamma^\mu \lbrack \fmslash{V}^a , \fmslash{V}^b \rbrack\psi_\mu$}\\\hline [F123] [F213] [F132] [F231] [F312] [F321] & $\psi_\mu\leftarrow f_{abc} \lbrack \fmslash{V}^a , \fmslash{V}^b \rbrack \gamma_\mu \gamma^5 \psi$ \\ \hline [F423] [F243] [F432] [F234] [F342] [F324] & $\psi\leftarrow f_{abc} \gamma^5\gamma^\mu\lbrack \fmslash{V}^a , \fmslash{V}^b \rbrack\psi_\mu$ \\ \hline [F134] [F143] [F314] [F124] [F142] [F214] & $V_\mu^a \leftarrow\psi^T C f_{abc} \gamma^5\gamma^\rho\lbrack \gamma_\mu , \fmslash{V}^b \rbrack\psi_\rho$ \\ \hline [F413] [F431] [F341] [F412] [F421] [F241] & $V_\mu^a \leftarrow\psi^T_\rho C f_{abc}\lbrack \gamma_\mu , \fmslash{V}^b \rbrack\gamma^\rho\gamma^5 \psi$ \\ \hline \end{tabular} \end{center} \caption{\label{tab:dim5-gravferm2boson2} Dimension-5 trilinear couplings including one conjugated Dirac, one Gravitino fermion and two additional bosons. The couplings of Majorana fermions to the gravitino and two bosons are essentially the same as for Dirac fermions and they are omitted here.} \end{table} *) (* \thocwmodulesection{Perturbative Quantum Gravity and Kaluza-Klein Interactions} The gravitational coupling constant and the relative strength of the dilaton coupling are abbreviated as \begin{subequations} \begin{align} \kappa &= \sqrt{16\pi G_N} \\ \omega &= \sqrt{\frac{2}{3(n+2)}} = \sqrt{\frac{2}{3(d-2)}}\,, \end{align} \end{subequations} where~$n=d-4$ is the number of extra space dimensions. *) (* In~(\ref{eq:graviton-feynman-rules3}-\ref{eq:dilaton-feynman-rules5}), we use the notation of~\cite{Han/Lykken/Zhang:1999:Kaluza-Klein}: \begin{subequations} \begin{equation} C_{\mu\nu,\rho\sigma} = g_{\mu\rho} g_{\nu\sigma} + g_{\mu\sigma} g_{\nu\rho} - g_{\mu\nu} g_{\rho\sigma} \end{equation} \begin{multline} D_{\mu\nu,\rho\sigma}(k_1,k_2) = g_{\mu\nu} k_{1,\sigma} k_{2,\rho} \\ \mbox{} - ( g_{\mu\sigma} k_{1,\nu} k_{2,\rho} + g_{\mu\rho} k_{1,\sigma} k_{2,\nu} - g_{\rho\sigma} k_{1,\mu} k_{2,\nu} + (\mu\leftrightarrow\nu)) \end{multline} \begin{multline} E_{\mu\nu,\rho\sigma}(k_1,k_2) = g_{\mu\nu} (k_{1,\rho} k_{1,\sigma} + k_{2,\rho} k_{2,\sigma} + k_{1,\rho} k_{2,\sigma}) \\ \mbox{} - ( g_{\nu\sigma} k_{1,\mu} k_{1,\rho} + g_{\nu\rho} k_{2,\mu} k_{2,\sigma} + (\mu\leftrightarrow\nu)) \end{multline} \begin{multline} F_{\mu\nu,\rho\sigma\lambda}(k_1,k_2,k_3) = \\ g_{\mu\rho} g_{\sigma\lambda} (k_2 - k_3)_{\nu} + g_{\mu\sigma} g_{\lambda\rho} (k_3 - k_1)_{\nu} + g_{\mu\lambda} g_{\rho\sigma} (k_1 - k_2)_{\nu} + (\mu\leftrightarrow\nu) \end{multline} \begin{multline} G_{\mu\nu,\rho\sigma\lambda\delta} = g_{\mu\nu} (g_{\rho\sigma}g_{\lambda\delta} - g_{\rho\delta}g_{\lambda\sigma}) \\ \mbox{} + ( g_{\mu\rho}g_{\nu\delta}g_{\lambda\sigma} + g_{\mu\lambda}g_{\nu\sigma}g_{\rho\delta} - g_{\mu\rho}g_{\nu\sigma}g_{\lambda\delta} - g_{\mu\lambda}g_{\nu\delta}g_{\rho\sigma} + (\mu\leftrightarrow\nu) ) \end{multline} \end{subequations} *) (* \begin{figure} \begin{subequations} \label{eq:graviton-feynman-rules3} \begin{align} \label{eq:graviton-scalar-scalar} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Threeexternal{1}{2}{h_{\mu\nu}} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{dbl_dots}{v,e3} \threeoutgoing \end{fmfgraph*}}} \,&= \begin{split} \mbox{} & - \ii \frac{\kappa}{2} g_{\mu\nu} m^2 + \ii \frac{\kappa}{2} C_{\mu\nu,\mu_1\mu_2}k^{\mu_1}_1k^{\mu_2}_2 \end{split} \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Threeexternal{1}{2}{h_{\mu\nu}} \fmf{photon}{v,e1} \fmf{photon}{v,e2} \fmf{dbl_dots}{v,e3} \threeoutgoing \end{fmfgraph*}}} \,&= \begin{split} \mbox{} - \ii \frac{\kappa}{2} m^2 C_{\mu\nu,\mu_1\mu_2} - \ii \frac{\kappa}{2} (& k_1k_2 C_{\mu\nu,\mu_1\mu_2} \\ &\mbox{} + D_{\mu\nu,\mu_1\mu_2}(k_1,k_2) \\ &\mbox{} + \xi^{-1} E_{\mu\nu,\mu_1\mu_2}(k_1,k_2)) \end{split} \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Threeexternal{p}{p'}{h_{\mu\nu}} \fmf{fermion}{e1,v,e2} \fmf{dbl_dots}{v,e3} \fmfdot{v} \end{fmfgraph*}}} \,&= \begin{split} \mbox{} - \ii \frac{\kappa}{2} m g_{\mu\nu} - \ii \frac{\kappa}{8} (& \gamma_{\mu}(p+p')_{\nu} + \gamma_{\nu}(p+p')_{\mu} \\ & \mbox{} - 2 g_{\mu\nu} (\fmslash{p}+\fmslash{p}') ) \end{split} \end{align} \end{subequations} \caption{\label{fig:graviton-feynman-rules3} Three-point graviton couplings.} \end{figure} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Graviton_Scalar_Scalar]: $h_{\mu\nu} C^{\mu\nu}_{0}(k_1,k_2)\phi_1\phi_2$}\\\hline [F12|F21] & $\phi_2 \leftarrow \ii\cdot h_{\mu\nu} C^{\mu\nu}_{0} (k_1, -k-k_1)\phi_1 $ \\\hline [F13|F31] & $\phi_1 \leftarrow \ii\cdot h_{\mu\nu} C^{\mu\nu}_{0} (-k-k_2, k_2)\phi_2 $ \\\hline [F23|F32] & $h^{\mu\nu} \leftarrow \ii\cdot C^{\mu\nu}_0 (k_1,k_2)\phi_1\phi_2 $ \\\hline \multicolumn{2}{|l|}{[Graviton_Vector_Vector]: $h_{\mu\nu} C^{\mu\nu,\mu_1\mu_2}_1(k_1,k_2,\xi) V_{\mu_1}V_{\mu_2} $}\\\hline [F12|F21] & $ V^\mu_2 \leftarrow \ii\cdot h_{\kappa\lambda} C^{\kappa\lambda,\mu\nu}_1(-k-k_1,k_1\xi) V_{1,\nu}$ \\\hline [F13|F31] & $ V^\mu_1 \leftarrow \ii\cdot h_{\kappa\lambda} C^{\kappa\lambda,\mu\nu}_1(-k-k_2,k_2,\xi) V_{2,\nu}$ \\\hline [F23|F32] & $h^{\mu\nu} \leftarrow \ii\cdot C^{\mu\nu,\mu_1\mu_2}_1(k_1,k_2,\xi) V_{1,\mu_1}V_{2,\mu_2} $ \\\hline \multicolumn{2}{|l|}{[Graviton_Spinor_Spinor]: $h_{\mu\nu} \bar\psi_1 C^{\mu\nu}_{\frac{1}{2}}(k_1,k_2)\psi_2 $}\\\hline [F12] & $ \bar\psi_2 \leftarrow \ii\cdot h_{\mu\nu} \bar\psi_1 C^{\mu\nu}_{\frac{1}{2}}(k_1,-k-k_1) $ \\\hline [F21] & $ \bar\psi_2 \leftarrow \ii\cdot\ldots $ \\\hline [F13] & $ \psi_1 \leftarrow \ii\cdot h_{\mu\nu}C^{\mu\nu}_{\frac{1}{2}}(-k-k_2,k_2)\psi_2$ \\\hline [F31] & $ \psi_1 \leftarrow \ii\cdot\ldots $ \\\hline [F23] & $ h^{\mu\nu} \leftarrow \ii\cdot \bar\psi_1 C^{\mu\nu}_{\frac{1}{2}}(k_1,k_2)\psi_2 $ \\\hline [F32] & $ h^{\mu\nu} \leftarrow \ii\cdot\ldots $ \\\hline \end{tabular} \end{center} \caption{\label{tab:graviton-three-point} \ldots} \end{table} Derivation of~(\ref{eq:graviton-scalar-scalar}) \begin{subequations} \begin{align} L &= \frac{1}{2} (\partial_\mu \phi) (\partial^\mu \phi) - \frac{m^2}{2} \phi^2 \\ (\partial_\mu\phi) \frac{\partial L}{\partial(\partial^\nu\phi)} &= (\partial_\mu\phi)(\partial_\nu\phi) \\ T_{\mu\nu} &= -g_{\mu\nu} L + (\partial_\mu\phi) \frac{\partial L}{\partial(\partial^\nu\phi)} + \end{align} \end{subequations} \begin{subequations} \begin{align} C^{\mu\nu}_{0}(k_1,k_2) &= C^{\mu\nu,\mu_1\mu_2} k_{1,\mu_1} k_{2,\mu_2} \\ C^{\mu\nu,\mu_1\mu_2}_1(k_1,k_2,\xi) &= k_1k_2 C^{\mu\nu,\mu_1\mu_2} + D^{\mu\nu,\mu_1\mu_2}(k_1,k_2) + \xi^{-1} E^{\mu\nu,\mu_1\mu_2}(k_1,k_2) \\ C^{\mu\nu}_{\frac{1}{2},\alpha\beta}(p,p') &= \gamma^{\mu}_{\alpha\beta}(p+p')^{\nu} + \gamma^{\nu}_{\alpha\beta}(p+p')^{\mu} - 2 g^{\mu\nu} (\fmslash{p}+\fmslash{p}')_{\alpha\beta} \end{align} \end{subequations} *) (* \begin{figure} \begin{subequations} \label{eq:dilaton-feynman-rules3} \begin{align} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Threeexternal{1}{2}{\phi(k)} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{dots}{v,e3} \threeoutgoing \end{fmfgraph*}}} \,&= - \ii \omega \kappa 2m^2 - \ii \omega \kappa k_1k_2 \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Threeexternal{1}{2}{\phi(k)} \fmf{photon}{v,e1} \fmf{photon}{v,e2} \fmf{dots}{v,e3} \threeoutgoing \end{fmfgraph*}}} \,&= - \ii \omega \kappa g_{\mu_1\mu_2}m^2 - \ii \omega \kappa \xi^{-1} (k_{1,\mu_1}k_{\mu_2} + k_{2,\mu_2}k_{\mu_1}) \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Threeexternal{p}{p'}{\phi(k)} \fmf{fermion}{e1,v,e2} \fmf{dots}{v,e3} \fmfdot{v} \end{fmfgraph*}}} \,&= - \ii \omega \kappa 2m + \ii \omega \kappa \frac{3}{4}(\fmslash{p}+\fmslash{p}') \end{align} \end{subequations} \caption{\label{fig:dilaton-feynman-rules3} Three-point dilaton couplings.} \end{figure} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.4} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dilaton_Scalar_Scalar]: $\phi \ldots k_1k_2\phi_1\phi_2 $}\\\hline [F12|F21] & $ \phi_2 \leftarrow \ii\cdot k_1(-k-k_1)\phi\phi_1 $ \\\hline [F13|F31] & $ \phi_1 \leftarrow \ii\cdot (-k-k_2)k_2\phi\phi_2 $ \\\hline [F23|F32] & $ \phi \leftarrow \ii\cdot k_1k_2\phi_1\phi_2 $ \\\hline \multicolumn{2}{|l|}{[Dilaton_Vector_Vector]: $\phi \ldots $}\\\hline [F12] & $ V_{2,\mu} \leftarrow \ii\cdot\ldots $ \\\hline [F21] & $ V_{2,\mu} \leftarrow \ii\cdot\ldots $ \\\hline [F13] & $ V_{1,\mu} \leftarrow \ii\cdot\ldots $ \\\hline [F31] & $ V_{1,\mu} \leftarrow \ii\cdot\ldots $ \\\hline [F23] & $ \phi \leftarrow \ii\cdot\ldots $ \\\hline [F32] & $ \phi \leftarrow \ii\cdot\ldots $ \\\hline \multicolumn{2}{|l|}{[Dilaton_Spinor_Spinor]: $\phi \ldots $}\\\hline [F12] & $ \bar\psi_2 \leftarrow \ii\cdot\ldots $ \\\hline [F21] & $ \bar\psi_2 \leftarrow \ii\cdot\ldots $ \\\hline [F13] & $ \psi_1 \leftarrow \ii\cdot\ldots $ \\\hline [F31] & $ \psi_1 \leftarrow \ii\cdot\ldots $ \\\hline [F23] & $ \phi \leftarrow \ii\cdot\ldots $ \\\hline [F32] & $ \phi \leftarrow \ii\cdot\ldots $ \\\hline \end{tabular} \end{center} \caption{\label{tab:dilaton-three-point} \ldots} \end{table} *) (* \begin{figure} \begin{subequations} \label{eq:graviton-feynman-rules4} \begin{align} \label{eq:graviton-scalar-scalar-scalar} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{h_{\mu\nu}} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{plain}{v,e3} \fmf{dbl_dots}{v,e4} \fouroutgoing \end{fmfgraph*}}} \,&= \begin{split} \mbox{} & ??? \end{split} \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{h_{\mu\nu}} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{photon}{v,e3} \fmf{dbl_dots}{v,e4} \fouroutgoing \end{fmfgraph*}}} \,&= \begin{split} \mbox{} & - \ii g\frac{\kappa}{2} C_{\mu\nu,\mu_3\rho}(k_1-k_2)^{\rho} T^{a_3}_{n_2n_1} \end{split} \\ \label{eq:graviton-scalar-vector-vector} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{h_{\mu\nu}} \fmf{plain}{v,e1} \fmf{photon}{v,e2} \fmf{photon}{v,e3} \fmf{dbl_dots}{v,e4} \fouroutgoing \end{fmfgraph*}}} \,&= \begin{split} \mbox{} & ??? \end{split} \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{h_{\mu\nu}} \fmf{photon}{v,e1} \fmf{photon}{v,e2} \fmf{photon}{v,e3} \fmf{dbl_dots}{v,e4} \fouroutgoing \end{fmfgraph*}}} \,&= \begin{split} \mbox{} - g \frac{\kappa}{2} f^{a_1a_2a_3} (& C_{\mu\nu,\mu_1\mu_2} (k_1-k_2)_{\mu_3} \\ & \mbox{} + C_{\mu\nu,\mu_2\mu_3} (k_2-k_3)_{\mu_1} \\ & \mbox{} + C_{\mu\nu,\mu_3\mu_1} (k_3-k_1)_{\mu_2} \\ & \mbox{} + F_{\mu\nu,\mu_1\mu_2\mu_3}(k_1,k_2,k_3) ) \end{split} \\ \label{eq:graviton-yukawa} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{h_{\mu\nu}} \fmf{fermion}{e1,v,e2} \fmf{plain}{v,e3} \fmf{dbl_dots}{v,e4} \fmfdot{v} \fmffreeze \fmf{warrow_right}{v,e3} \fmf{warrow_right}{v,e4} \end{fmfgraph*}}} \,&= \begin{split} \mbox{} & ??? \end{split} \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{h_{\mu\nu}} \fmf{fermion}{e1,v,e2} \fmf{photon}{v,e3} \fmf{dbl_dots}{v,e4} \fmfdot{v} \fmffreeze \fmf{warrow_right}{v,e3} \fmf{warrow_right}{v,e4} \end{fmfgraph*}}} \,&= \begin{split} \mbox{} & \ii g\frac{\kappa}{4} (C_{\mu\nu,\mu_3\rho} - g_{\mu\nu}g_{\mu_3\rho}) \gamma^{\rho} T^{a_3}_{n_2n_1} \end{split} \end{align} \end{subequations} \caption{\label{fig:graviton-feynman-rules4} Four-point graviton couplings. (\ref{eq:graviton-scalar-scalar-scalar}), (\ref{eq:graviton-scalar-vector-vector}), and~(\ref{eq:graviton-yukawa)} are missing in~\cite{Han/Lykken/Zhang:1999:Kaluza-Klein}, but should be generated by standard model Higgs selfcouplings, Higgs-gaugeboson couplings, and Yukawa couplings.} \end{figure} *) (* \begin{figure} \begin{subequations} \label{eq:dilaton-feynman-rules4} \begin{align} \label{eq:dilaton-scalar-scalar-scalar} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{\phi(k)} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{plain}{v,e3} \fmf{dots}{v,e4} \fouroutgoing \end{fmfgraph*}}} \,&= ??? \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{\phi(k)} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{photon}{v,e3} \fmf{dots}{v,e4} \fouroutgoing \end{fmfgraph*}}} \,&= - \ii \omega \kappa (k_1 + k_2)_{\mu_3} T^{a_3}_{n_1,n_2} \\ \label{eq:dilaton-scalar-vector-vector} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{\phi(k)} \fmf{plain}{v,e1} \fmf{photon}{v,e2} \fmf{photon}{v,e3} \fmf{dots}{v,e4} \fouroutgoing \end{fmfgraph*}}} \,&= ??? \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{\phi(k)} \fmf{photon}{v,e1} \fmf{photon}{v,e2} \fmf{photon}{v,e3} \fmf{dots}{v,e4} \fouroutgoing \end{fmfgraph*}}} \,&= 0 \\ \label{eq:dilaton-yukawa} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{h_{\mu\nu}} \fmf{fermion}{e1,v,e2} \fmf{plain}{v,e3} \fmf{dots}{v,e4} \fmfdot{v} \fmffreeze \fmf{warrow_right}{v,e3} \fmf{warrow_right}{v,e4} \end{fmfgraph*}}} \,&= ??? \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fourexternal{1}{2}{3}{\phi(k)} \fmf{fermion}{e1,v,e2} \fmf{photon}{v,e3} \fmf{dots}{v,e4} \fmfdot{v} \fmffreeze \fmf{warrow_right}{v,e3} \fmf{warrow_right}{v,e4} \end{fmfgraph*}}} \,&= - \ii \frac{3}{2} \omega g \kappa \gamma_{\mu_3} T^{a_3}_{n_1n_2} \end{align} \end{subequations} \caption{\label{fig:dilaton-feynman-rules4} Four-point dilaton couplings. (\ref{eq:dilaton-scalar-scalar-scalar}), (\ref{eq:dilaton-scalar-vector-vector}) and~(\ref{eq:dilaton-yukawa}) are missing in~\cite{Han/Lykken/Zhang:1999:Kaluza-Klein}, but could be generated by standard model Higgs selfcouplings, Higgs-gaugeboson couplings, and Yukawa couplings.} \end{figure} *) (* \begin{figure} \begin{subequations} \label{eq:graviton-feynman-rules5} \begin{align} \label{eq:graviton-scalar-scalar-scalar-scalar} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fiveexternal{1}{2}{3}{4}{h_{\mu\nu}} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{plain}{v,e3} \fmf{plain}{v,e4} \fmf{dots}{v,e5} \fiveoutgoing \end{fmfgraph*}}} \,&= \begin{split} \mbox{} & ??? \end{split} \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fiveexternal{1}{2}{3}{4}{h_{\mu\nu}} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{photon}{v,e3} \fmf{photon}{v,e4} \fmf{dots}{v,e5} \fiveoutgoing \end{fmfgraph*}}} \,&= \begin{split} \mbox{} & - \ii g^2 \frac{\kappa}{2} C_{\mu\nu,\mu_3\mu_4} (T^{a_3}T^{a_4} + T^{a_4}T^{a_3})_{n_2n_1} \end{split} \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fiveexternal{1}{2}{3}{4}{h_{\mu\nu}} \fmf{photon}{v,e1} \fmf{photon}{v,e2} \fmf{photon}{v,e3} \fmf{photon}{v,e4} \fmf{dots}{v,e5} \fiveoutgoing \end{fmfgraph*}}} \,&= \begin{split} \mbox{} - \ii g^2 \frac{\kappa}{2} (& f^{ba_1a_3} f^{ba_2a_4} G_{\mu\nu,\mu_1\mu_2\mu_3\mu_4} \\ & \mbox + f^{ba_1a_2} f^{ba_3a_4} G_{\mu\nu,\mu_1\mu_3\mu_2\mu_4} \\ & \mbox + f^{ba_1a_4} f^{ba_2a_3} G_{\mu\nu,\mu_1\mu_2\mu_4\mu_3} ) \end{split} \end{align} \end{subequations} \caption{\label{fig:graviton-feynman-rules5} Five-point graviton couplings. (\ref{eq:graviton-scalar-scalar-scalar-scalar}) is missing in~\cite{Han/Lykken/Zhang:1999:Kaluza-Klein}, but should be generated by standard model Higgs selfcouplings.} \end{figure} *) (* \begin{figure} \begin{subequations} \label{eq:dilaton-feynman-rules5} \begin{align} \label{eq:dilaton-scalar-scalar-scalar-scalar} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fiveexternal{1}{2}{3}{4}{\phi(k)} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{plain}{v,e3} \fmf{plain}{v,e4} \fmf{dots}{v,e5} \fiveoutgoing \end{fmfgraph*}}} \,&= ??? \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fiveexternal{1}{2}{3}{4}{\phi(k)} \fmf{plain}{v,e1} \fmf{plain}{v,e2} \fmf{photon}{v,e3} \fmf{photon}{v,e4} \fmf{dots}{v,e5} \fiveoutgoing \end{fmfgraph*}}} \,&= \ii \omega g^2 \kappa g_{\mu_3\mu_4} (T^{a_3}T^{a_4} + T^{a_4}T^{a_3})_{n_2n_1} \\ \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,22) \Fiveexternal{1}{2}{3}{4}{\phi(k)} \fmf{photon}{v,e1} \fmf{photon}{v,e2} \fmf{photon}{v,e3} \fmf{photon}{v,e4} \fmf{dots}{v,e5} \fiveoutgoing \end{fmfgraph*}}} \,&= 0 \end{align} \end{subequations} \caption{\label{fig:dilaton-feynman-rules5} Five-point dilaton couplings. (\ref{eq:dilaton-scalar-scalar-scalar-scalar}) is missing in~\cite{Han/Lykken/Zhang:1999:Kaluza-Klein}, but could be generated by standard model Higgs selfcouplings.} \end{figure} *) (* \thocwmodulesection{Dependent Parameters} This is a simple abstract syntax for parameter dependencies. Later, there will be a parser for a convenient concrete syntax as a part of a concrete syntax for models. There is no intention to do \emph{any} symbolic manipulation with this. The expressions will be translated directly by [Targets] to the target language. *) type 'a expr = - | I | Const of int + | I + | Integer of int + | Float of float | Atom of 'a | Sum of 'a expr list | Diff of 'a expr * 'a expr | Neg of 'a expr | Prod of 'a expr list | Quot of 'a expr * 'a expr | Rec of 'a expr | Pow of 'a expr * int | PowX of 'a expr * 'a expr | Sqrt of 'a expr | Sin of 'a expr | Cos of 'a expr | Tan of 'a expr | Cot of 'a expr | Atan2 of 'a expr * 'a expr + | Atan of 'a expr | Exp of 'a expr | Conj of 'a expr type 'a variable = Real of 'a | Complex of 'a type 'a variable_array = Real_Array of 'a | Complex_Array of 'a type 'a parameters = { input : ('a * float) list; derived : ('a variable * 'a expr) list; derived_arrays : ('a variable_array * 'a expr list) list } (* \thocwmodulesection{More Exotic Couplings} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dim5_Scalar_Vector_Vector_T]: $\mathcal{L}_I=g\phi (\ii\partial_\mu V_1^\nu)(\ii\partial_\nu V_2^\mu)$}\\\hline [F23] & $\phi(k_2+k_3)\leftarrow\ii\cdot g k_3^\mu V_{1,\mu}(k_2) k_2^\nu V_{2,\nu}(k_3)$ \\\hline [F32] & $\phi(k_2+k_3)\leftarrow\ii\cdot g k_2^\mu V_{2,\mu}(k_3) k_3^\nu V_{1,\nu}(k_2)$ \\\hline [F12] & $V_2^\mu(k_1+k_2)\leftarrow\ii\cdot g k_2^\mu \phi(k_1) (-k_1^\nu-k_2^\nu) V_{1,\nu}(k_2)$ \\\hline [F21] & $V_2^\mu(k_1+k_2)\leftarrow\ii\cdot g k_2^\mu (-k_1^\nu-k_2^\nu)V_{1,\nu}(k_2) \phi(k_1)$ \\\hline [F13] & $V_1^\mu(k_1+k_3)\leftarrow\ii\cdot g k_3^\mu \phi(k_1) (-k_1^\nu-k_3^\nu)V_{2,\nu}(k_3)$ \\\hline [F31] & $V_1^\mu(k_1+k_3)\leftarrow\ii\cdot g k_3^\mu (-k_1^\nu-k_3^\nu)V_{2,\nu}(k_3) \phi(k_1)$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim5-scalar-vector-vector} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dim6_Vector_Vector_Vector_T]: $\mathcal{L}_I=gV_1^\mu ((\ii\partial_\nu V_2^\rho)% \ii\overleftrightarrow{\partial_\mu} (\ii\partial_\rho V_3^\nu))$}\\\hline [F23] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g (k_2^\mu - k_3^\mu) k_3^\nu V_{2,\nu} (k_2) k_2^\rho V_{3,\rho}(k_3)$ \\\hline [F32] & $V_1^\mu(k_2+k_3)\leftarrow\ii\cdot g (k_2^\mu - k_3^\mu) k_2^\nu V_{3,\nu} (k_3) k_3^\rho V_{2,\rho}(k_2)$ \\\hline [F12] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g k_2^\mu (k_1^\nu+2k_2^\nu) V_{1,\nu} (k_1) (-k_1^\rho-k_2^\rho) V_{2,\rho}(k_2)$ \\\hline [F21] & $V_3^\mu(k_1+k_2)\leftarrow\ii\cdot g k_2^\mu (-k_1^\rho-k_2^\rho) V_{2,\rho}(k_2) (k_1^\nu+2k_2^\nu) V_{1,\nu} (k_1)$ \\\hline [F13] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g k_3^\mu (k_1^\nu+2k_3^\nu) V_{1,\nu} (k_1) (-k_1^\rho-k_3^\rho) V_{3,\rho}(k_3)$ \\\hline [F31] & $V_2^\mu(k_1+k_3)\leftarrow\ii\cdot g k_3^\mu (-k_1^\rho-k_3^\rho) V_{3,\rho}(k_3) (k_1^\nu+2k_3^\nu) V_{1,\nu} (k_1)$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim6-vector-vector-vector} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Tensor_2_Vector_Vector]: $\mathcal{L}_I=gT^{\mu\nu} (V_{1,\mu}V_{2,\nu} + V_{1,\nu}V_{2,\mu})$}\\\hline [F23] & $T^{\mu\nu}(k_2+k_3)\leftarrow\ii\cdot g (V_{1,\mu}(k_2) V_{2,\nu}(k_3) + V_{1,\nu}(k_2) V_{2,\mu}(k_3))$ \\\hline [F32] & $T^{\mu\nu}(k_2+k_3)\leftarrow\ii\cdot g (V_{2,\nu}(k_3) V_{1,\mu}(k_2) + V_{2,\mu}(k_3) V_{1,\nu}(k_2))$ \\\hline [F12] & $V_2^\mu(k_1+k_2)\leftarrow\ii\cdot g (T^{\mu\nu}(k_1) + T^{\nu\mu}(k_1)) V_{1,\nu}(k_2)$ \\\hline [F21] & $V_2^\mu(k_1+k_2)\leftarrow\ii\cdot g V_{1,\nu}(k_2)(T^{\mu\nu}(k_1) + T^{\nu\mu}(k_1))$ \\\hline [F13] & $V_1^\mu(k_1+k_3)\leftarrow\ii\cdot g (T^{\mu\nu}(k_1) + T^{\nu\mu}(k_1)) V_{2,\nu}(k_3)$ \\\hline [F31] & $V_1^\mu(k_1+k_3)\leftarrow\ii\cdot g V_{2,\nu}(k_3) (T^{\mu\nu}(k_1) + T^{\nu\mu}(k_1))$ \\\hline \end{tabular} \end{center} \caption{\label{tab:tensor2-vector-vector} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dim5_Tensor_2_Vector_Vector_1]: $\mathcal{L}_I=gT^{\alpha\beta} (V_1^\mu \ii\overleftrightarrow\partial_\alpha \ii\overleftrightarrow\partial_\beta V_{2,\mu})$}\\\hline [F23] & $T^{\alpha\beta}(k_2+k_3)\leftarrow\ii\cdot g (k_2^\alpha-k_3^\alpha)(k_2^\beta-k_3^\beta) V_1^\mu(k_2)V_{2,\mu}(k_3)$ \\\hline [F32] & $T^{\alpha\beta}(k_2+k_3)\leftarrow\ii\cdot g (k_2^\alpha-k_3^\alpha)(k_2^\beta-k_3^\beta) V_{2,\mu}(k_3)V_1^\mu(k_2)$ \\\hline [F12] & $V_2^\mu(k_1+k_2)\leftarrow\ii\cdot g (k_1^\alpha+2k_2^\alpha) (k_1^\beta+2k_2^\beta) T_{\alpha\beta}(k_1) V_1^\mu(k_2)$ \\\hline [F21] & $V_2^\mu(k_1+k_2)\leftarrow\ii\cdot g (k_1^\alpha+2k_2^\alpha) (k_1^\beta+2k_2^\beta) V_1^\mu(k_2) T_{\alpha\beta}(k_1)$ \\\hline [F13] & $V_1^\mu(k_1+k_3)\leftarrow\ii\cdot g (k_1^\alpha+2k_3^\alpha) (k_1^\beta+2k_3^\beta) T_{\alpha\beta}(k_1) V_2^\mu(k_3)$ \\\hline [F31] & $V_1^\mu(k_1+k_3)\leftarrow\ii\cdot g (k_1^\alpha+2k_3^\alpha) (k_1^\beta+2k_3^\beta) V_2^\mu(k_3) T_{\alpha\beta}(k_1)$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim5-tensor2-vector-vector-1} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dim5_Tensor_2_Vector_Vector_2]: $\mathcal{L}_I=gT^{\alpha\beta} ( V_1^\mu \ii\overleftrightarrow\partial_\beta (\ii\partial_\mu V_{2,\alpha}) + V_1^\mu \ii\overleftrightarrow\partial_\alpha (\ii\partial_\mu V_{2,\beta})) $}\\\hline [F23] & $T^{\alpha\beta}(k_2+k_3)\leftarrow\ii\cdot g (k_3^\beta-k_2^\beta) k_3^\mu V_{1,\mu}(k_2)V_2^\alpha(k_3) + (\alpha\leftrightarrow\beta)$ \\\hline [F32] & $T^{\alpha\beta}(k_2+k_3)\leftarrow\ii\cdot g (k_3^\beta-k_2^\beta) V_2^\alpha(k_3) k_3^\mu V_{1,\mu}(k_2) + (\alpha\leftrightarrow\beta)$ \\\hline [F12] & $V_2^\alpha(k_1+k_2)\leftarrow\ii\cdot g (k_1^\beta+2k_2^\beta) (T^{\alpha\beta}(k_1)+T^{\beta\alpha}(k_1)) (k_1^\mu+k_2^\mu) V_{1,\mu}(k_2)$ \\\hline [F21] & $V_2^\alpha(k_1+k_2)\leftarrow\ii\cdot g (k_1^\mu+k_2^\mu) V_{1,\mu}(k_2) (k_1^\beta+2k_2^\beta) (T^{\alpha\beta}(k_1)+T^{\beta\alpha}(k_1))$ \\\hline [F13] & $V_1^\alpha(k_1+k_3)\leftarrow\ii\cdot g (k_1^\beta+2k_3^\beta) (T^{\alpha\beta}(k_1)+T^{\beta\alpha}(k_1)) (k_1^\mu+k_3^\mu) V_{2,\mu}(k_3)$ \\\hline [F31] & $V_1^\alpha(k_1+k_3)\leftarrow\ii\cdot g (k_1^\mu+k_3^\mu) V_{2,\mu}(k_3) (k_1^\beta+2k_3^\beta) (T^{\alpha\beta}(k_1)+T^{\beta\alpha}(k_1))$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim5-tensor2-vector-vector-1'} \ldots} \end{table} \begin{table} \begin{center} \renewcommand{\arraystretch}{1.3} \begin{tabular}{|>{\qquad}r<{:}l|}\hline \multicolumn{2}{|l|}{[Dim7_Tensor_2_Vector_Vector_T]: $\mathcal{L}_I=gT^{\alpha\beta} ((\ii\partial^\mu V_1^\nu) \ii\overleftrightarrow\partial_\alpha \ii\overleftrightarrow\partial_\beta (\ii\partial_\nu V_{2,\mu}))$}\\\hline [F23] & $T^{\alpha\beta}(k_2+k_3)\leftarrow\ii\cdot g (k_2^\alpha-k_3^\alpha)(k_2^\beta-k_3^\beta) k_3^\mu V_{1,\mu}(k_2) k_2^\nu V_{2,\nu}(k_3)$ \\\hline [F32] & $T^{\alpha\beta}(k_2+k_3)\leftarrow\ii\cdot g (k_2^\alpha-k_3^\alpha)(k_2^\beta-k_3^\beta) k_2^\nu V_{2,\nu}(k_3) k_3^\mu V_{1,\mu}(k_2)$ \\\hline [F12] & $V_2^\mu(k_1+k_2)\leftarrow\ii\cdot g k_2^\mu (k_1^\alpha+2k_2^\alpha) (k_1^\beta+2k_2^\beta) T_{\alpha\beta}(k_1) (-k_1^\nu-k_2^\nu)V_{1,\nu}(k_2)$ \\\hline [F21] & $V_2^\mu(k_1+k_2)\leftarrow\ii\cdot g k_2^\mu (-k_1^\nu-k_2^\nu)V_{1,\nu}(k_2) (k_1^\alpha+2k_2^\alpha) (k_1^\beta+2k_2^\beta) T_{\alpha\beta}(k_1)$ \\\hline [F13] & $V_1^\mu(k_1+k_3)\leftarrow\ii\cdot g k_3^\mu (k_1^\alpha+2k_3^\alpha) (k_1^\beta+2k_3^\beta) T_{\alpha\beta}(k_1) (-k_1^\nu-k_3^\nu) V_{2,\nu}(k_3)$ \\\hline [F31] & $V_1^\mu(k_1+k_3)\leftarrow\ii\cdot g k_3^\mu (-k_1^\nu-k_3^\nu) V_{2,\nu}(k_3) (k_1^\alpha+2k_3^\alpha) (k_1^\beta+2k_3^\beta) T_{\alpha\beta}(k_1)$ \\\hline \end{tabular} \end{center} \caption{\label{tab:dim7-tensor2-vector-vector-T} \ldots} \end{table} *) Index: trunk/omega/src/omega_UFO.ml =================================================================== --- trunk/omega/src/omega_UFO.ml (revision 8274) +++ trunk/omega/src/omega_UFO.ml (revision 8275) @@ -1,33 +1,42 @@ (* omega_UFO.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23)(Targets.Fortran)(UFO.Model) +module Bound (M : Model.T) : Tuple.Bound = + struct + (* \begin{dubious} + Above [max_degree = 6], the performance drops \emph{dramatically}! + \end{dubious} *) + let max_arity () = + pred (M.max_degree ()) + end + +module O = Omega.Make(Fusion.Nary(Bound(UFO.Model)))(Targets.Fortran)(UFO.Model) let _ = O.main () (*i * Local Variables: * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/UFO_Lorentz.ml =================================================================== --- trunk/omega/src/UFO_Lorentz.ml (revision 0) +++ trunk/omega/src/UFO_Lorentz.ml (revision 8275) @@ -0,0 +1,450 @@ +(* UFO_Lorentz.ml -- + + Copyright (C) 1999-2017 by + + Wolfgang Kilian + Thorsten Ohl + Juergen Reuter + with contributions from + Christian Speckner + + WHIZARD is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + WHIZARD is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) + +(* \thocwmodulesection{Processed UFO Lorentz Structures} *) + +module Q = Algebra.Q +module QC = Algebra.QC +module A = UFOx.Lorentz_Atom +module D = Dirac.Chiral + +(* Take a [A.t list] and return the corresponding pair + [A.dirac list * A.vector list], without preserving the + order (currently, the order is reversed). *) +let split_atoms atoms = + List.fold_left + (fun (d, v) -> function + | A.Vector v' -> (d, v' :: v) + | A.Dirac d' -> (d' :: d, v)) + ([], []) atoms + +(* Just like [UFOx.Lorentz_Atom.dirac], but without the Dirac matrix indices. *) +type dirac = + | Gamma5 + | ProjM + | ProjP + | Gamma of int + | Sigma of int * int + | C + +let map_indices_gamma f = function + | (Gamma5 | ProjM | ProjP | C as g) -> g + | Gamma mu -> Gamma (f mu) + | Sigma (mu, nu) -> Sigma (f mu, f nu) + +(* A sandwich of a string of $\gamma$-matrices. [bra] and [ket] are + positions of fields in the vertex. *) +type dirac_string = + { bra : int; + ket : int; + gammas : dirac list } + +let map_indices_dirac f d = + { bra = f d.bra; + ket = f d.ket; + gammas = List.map (map_indices_gamma f) d.gammas } + +(* [dirac_string bind ds] applies the mapping [bind] to the indices + of $\gamma_\mu$ and~$\sigma_{\mu\nu}$ and multiplies the resulting + matrices in order using complex rational arithmetic. *) +module type To_Matrix = + sig + val dirac_string : (int -> int) -> dirac_string -> D.t + end + +module To_Matrix : To_Matrix = + struct + + let half = QC.make (Q.make 1 2) Q.null + let half_i = QC.make Q.null (Q.make 1 2) + + let gamma_L = D.times half (D.sub D.unit D.gamma5) + let gamma_R = D.times half (D.add D.unit D.gamma5) + + let sigma = Array.make_matrix 4 4 D.null + let () = + for mu = 0 to 3 do + for nu = 0 to 3 do + sigma.(mu).(nu) <- + D.times + half_i + (D.sub + (D.mul D.gamma.(mu) D.gamma.(nu)) + (D.mul D.gamma.(nu) D.gamma.(mu))) + done + done + + let dirac bind_indices = function + | Gamma5 -> D.gamma5 + | ProjM -> gamma_L + | ProjP -> gamma_R + | Gamma (mu) -> D.gamma.(bind_indices mu) + | Sigma (mu, nu) -> sigma.(bind_indices mu).(bind_indices nu) + | C -> D.cc + + let dirac_string bind_indices ds = + D.product (List.map (dirac bind_indices) ds.gammas) + + end + +let dirac_string_to_matrix = To_Matrix.dirac_string + +(* The Lorentz indices appearing in a term are either negative + internal summation indices or positive external polarization + indices. Note that the external + indices are not really indices, but denote the position + of the particle in the vertex. *) +type 'a term = + { indices : int list; + atom : 'a } + +let map_atom f term = + { term with atom = f term.atom } + +let map_term f_index f_atom term = + { indices = List.map f_index term.indices; + atom = f_atom term.atom } + +(* Return a pair of lists: first the (negative) summation indices, + second the (positive) external indices. *) +let classify_indices ilist = + List.partition + (fun i -> + if i < 0 then + true + else if i > 0 then + false + else + invalid_arg "classify_indices") + ilist + +type contraction = + { coeff : Q.t; + dirac : dirac_string term list; + vector : A.vector term list } + +let fermion_lines_of_contraction contraction = + List.sort + compare + (List.map (fun term -> (term.atom.ket, term.atom.bra)) contraction.dirac) + +let map_indices_contraction f c = + { coeff = c.coeff; + dirac = List.map (map_term f (map_indices_dirac f)) c.dirac; + vector = List.map (map_term f (A.map_indices_vector f)) c.vector } + +type t = contraction list + +let fermion_lines contractions = + let pairs = List.map fermion_lines_of_contraction contractions in + match ThoList.uniq (List.sort compare pairs) with + | [] -> invalid_arg "UFO_Lorentz.fermion_lines: impossible" + | [pairs] -> pairs + | _ -> invalid_arg "UFO_Lorentz.fermion_lines: ambiguous" + +let map_indices f contractions = + List.map (map_indices_contraction f) contractions + +let map_fermion_lines f pairs = + List.map (fun (i, j) -> (f i, f j)) pairs + +let dirac_of_atom = function + | A.Identity (_, _) -> [] + | A.C (_, _) -> [C] + | A.Gamma5 (_, _) -> [Gamma5] + | A.ProjP (_, _) -> [ProjP] + | A.ProjM (_, _) -> [ProjM] + | A.Gamma (mu, _, _) -> [Gamma mu] + | A.Sigma (mu, nu, _, _) -> [Sigma (mu, nu)] + +let dirac_indices = function + | A.Identity (i, j) | A.C (i, j) + | A.Gamma5 (i, j) | A.ProjP (i, j) | A.ProjM (i, j) + | A.Gamma (_, i, j) | A.Sigma (_, _, i, j) -> (i, j) + +let rec scan_for_dirac_string stack = function + + | [] -> + (* We're done with this pass. There must be + no leftover atoms on the [stack] of spinor atoms, + but we'll check this in the calling function. *) + (None, List.rev stack) + + | atom :: atoms -> + let i, j = dirac_indices atom in + if i > 0 then + if j > 0 then + (* That's an atomic Dirac string. Collect + all atoms for further processing. *) + (Some { bra = i; ket = j; gammas = dirac_of_atom atom}, + List.rev_append stack atoms) + else + (* That's the start of a new Dirac string. Search + for the remaining elements, not forgetting matrices + that we might pushed on the [stack] earlier. *) + collect_dirac_string + i j (dirac_of_atom atom) [] (List.rev_append stack atoms) + else + (* The interior of a Dirac string. Push it on the + stack until we find the start. *) + scan_for_dirac_string (atom :: stack) atoms + +(* Complete the string starting with [i] and the current summation + index [j]. *) +and collect_dirac_string i j rev_ds stack = function + + | [] -> + (* We have consumed all atoms without finding + the end of the string. *) + invalid_arg "collect_dirac_string: open string" + + | atom :: atoms -> + let i', j' = dirac_indices atom in + if i' = j then + if j' > 0 then + (* Found the conclusion. Collect + all atoms on the [stack] for further processing. *) + (Some { bra = i; ket = j'; + gammas = List.rev_append rev_ds (dirac_of_atom atom)}, + List.rev_append stack atoms) + else + (* Found the continuation. Pop the stack of open indices, + since we're looking for a new one. *) + collect_dirac_string + i j' (dirac_of_atom atom @ rev_ds) [] (List.rev_append stack atoms) + else + (* Either the start of another Dirac string or a + non-matching continuation. Push it on the + stack until we're done with the current one. *) + collect_dirac_string i j rev_ds (atom :: stack) atoms + +let dirac_string_of_dirac_atoms atoms = + scan_for_dirac_string [] atoms + +let rec dirac_strings_of_dirac_atoms' rev_ds atoms = + match dirac_string_of_dirac_atoms atoms with + | (None, []) -> List.rev rev_ds + | (None, _) -> invalid_arg "dirac_string_of_dirac_atoms: leftover atoms" + | (Some ds, atoms) -> dirac_strings_of_dirac_atoms' (ds :: rev_ds) atoms + +let dirac_strings_of_dirac_atoms atoms = + dirac_strings_of_dirac_atoms' [] atoms + +let indices_of_vector = function + | A.Epsilon (mu1, mu2, mu3, mu4) -> [mu1; mu2; mu3; mu4] + | A.Metric (mu1, mu2) -> [mu1; mu2] + | A.P (mu, n) -> + if n > 0 then + [mu] + else + invalid_arg "indices_of_vector: invalid momentum" + +let classify_vector atom = + { indices = indices_of_vector atom; + atom } + +let indices_of_dirac = function + | Gamma5 | ProjM | ProjP | C -> [] + | Gamma (mu) -> [mu] + | Sigma (mu, nu) -> [mu; nu] + +let indices_of_dirac_string ds = + ThoList.flatmap indices_of_dirac ds.gammas + +let classify_dirac atom = + { indices = indices_of_dirac_string atom; + atom } + +let contraction_of_lorentz_atoms (atoms, coeff) = + let dirac_atoms, vector_atoms = split_atoms atoms in + let dirac = + List.map classify_dirac (dirac_strings_of_dirac_atoms dirac_atoms) + and vector = + List.map classify_vector vector_atoms in + { coeff; dirac; vector } + +type redundancy = + | Trace of int + | Replace of int * int + +let rec redundant_metric' rev_atoms = function + | [] -> (None, List.rev rev_atoms) + | { atom = A.Metric (mu, nu) } as atom :: atoms -> + if mu < 1 then + if nu = mu then + (Some (Trace mu), List.rev_append rev_atoms atoms) + else + (Some (Replace (mu, nu)), List.rev_append rev_atoms atoms) + else if nu < 0 then + (Some (Replace (nu, mu)), List.rev_append rev_atoms atoms) + else + redundant_metric' (atom :: rev_atoms) atoms + | { atom = (A.Epsilon (_, _, _, _ ) | A.P (_, _) ) } as atom :: atoms -> + redundant_metric' (atom :: rev_atoms) atoms + +let redundant_metric atoms = + redundant_metric' [] atoms + +(* Substitude any occurance of the index [mu] by the index [nu]: *) +let substitute_index_vector1 mu nu = function + | A.Epsilon (mu1, mu2, mu3, mu4) as eps -> + if mu = mu1 then + A.Epsilon (nu, mu2, mu3, mu4) + else if mu = mu2 then + A.Epsilon (mu1, nu, mu3, mu4) + else if mu = mu3 then + A.Epsilon (mu1, mu2, nu, mu4) + else if mu = mu4 then + A.Epsilon (mu1, mu2, mu3, nu) + else + eps + | A.Metric (mu1, mu2) as g -> + if mu = mu1 then + A.Metric (nu, mu2) + else if mu = mu2 then + A.Metric (mu1, nu) + else + g + | A.P (mu1, n) as p -> + if mu = mu1 then + A.P (nu, n) + else + p + +let remove a alist = + List.filter ((<>) a) alist + +let substitute_index1 mu nu mu1 = + if mu = mu1 then + nu + else + mu1 + +let substitute_index mu nu indices = + List.map (substitute_index1 mu nu) indices + +(* This assumes that [mu] is a summation index and + [nu] is a polarization index. *) +let substitute_index_vector mu nu vectors = + List.map + (fun v -> + { indices = substitute_index mu nu v.indices; + atom = substitute_index_vector1 mu nu v.atom }) + vectors + +(* Substitude any occurance of the index [mu] by the index [nu]: *) +let substitute_index_dirac1 mu nu = function + | (Gamma5 | ProjM | ProjP | C) as g -> g + | Gamma (mu1) as g -> + if mu = mu1 then + Gamma (nu) + else + g + | Sigma (mu1, mu2) as g -> + if mu = mu1 then + Sigma (nu, mu2) + else if mu = mu2 then + Sigma (mu1, nu) + else + g + +(* This assumes that [mu] is a summation index and + [nu] is a polarization index. *) +let substitute_index_dirac mu nu dirac_strings = + List.map + (fun ds -> + { indices = substitute_index mu nu ds.indices; + atom = { ds.atom with + gammas = + List.map + (substitute_index_dirac1 mu nu) + ds.atom.gammas } } ) + dirac_strings + +let trace_metric = Q.make 4 1 + +(* FIXME: can this be made typesafe by mapping to a + type that \emph{only} contains [P] and [Epsilon]? *) +let rec compress_metrics c = + match redundant_metric c.vector with + | None, _ -> c + | Some (Trace mu), vector' -> + compress_metrics + { coeff = Q.mul trace_metric c.coeff; + dirac = c.dirac; + vector = vector' } + | Some (Replace (mu, nu)), vector' -> + compress_metrics + { coeff = c.coeff; + dirac = substitute_index_dirac mu nu c.dirac; + vector = substitute_index_vector mu nu vector' } + +let dummy = + [] + +let parse1 spins atom = + compress_metrics (contraction_of_lorentz_atoms atom) + +let parse spins l = + List.map (parse1 spins) l + +let vector_to_string = function + | A.Epsilon (mu, nu, ka, la) -> + Printf.sprintf "Epsilon(%d,%d,%d,%d)" mu nu ka la + | A.Metric (mu, nu) -> + Printf.sprintf "Metric(%d,%d)" mu nu + | A.P (mu, n) -> + Printf.sprintf "P(%d,%d)" mu n + +let dirac_to_string = function + | Gamma5 -> "g5" + | ProjM -> "(1-g5)/2" + | ProjP -> "(1+g5)/2" + | Gamma (mu) -> Printf.sprintf "g(%d)" mu + | Sigma (mu, nu) -> Printf.sprintf "s(%d,%d)" mu nu + | C -> "C" + +let dirac_string_to_string ds = + match ds.gammas with + | [] -> Printf.sprintf "<%d|%d>" ds.bra ds.ket + | gammas -> + Printf.sprintf + "<%d|%s|%d>" + ds.bra (String.concat "*" (List.map dirac_to_string gammas)) ds.ket + +let contraction_to_string c = + Q.to_string c.coeff ^ " * " ^ + String.concat + " * " (List.map (fun ds -> dirac_string_to_string ds.atom) c.dirac) ^ + " * " ^ + String.concat + " * " (List.map (fun v -> vector_to_string v.atom) c.vector) + +let fermion_lines_to_string fermion_lines = + ThoList.to_string + (fun (bra, ket) -> Printf.sprintf "%d->%d" bra ket) + fermion_lines + +let to_string contractions = + String.concat " + " (List.map contraction_to_string contractions) Index: trunk/omega/src/omega_SM_top.ml =================================================================== --- trunk/omega/src/omega_SM_top.ml (revision 8274) +++ trunk/omega/src/omega_SM_top.ml (revision 8275) @@ -1,624 +1,626 @@ (* omega_SM_top.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{SM with charge $4/3$ top} *) module type SM_flags = sig val include_anomalous : bool val k_matrix : bool end module SM_no_anomalous : SM_flags = struct let include_anomalous = false let k_matrix = false end module SM_gluons : SM_flags = struct let include_anomalous = false let k_matrix = false end module Anomtop (Flags : SM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width" ] type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | H type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Models.Anomtop.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Higgs", [O H]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> Scalar let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H -> Prop_Scalar end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 (* Electrical charge, lepton number, baryon number. We could avoid the rationals altogether by multiplying the first and last by 3 \ldots *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("SM_top.generation': " ^ string_of_int n) let generation f = match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U (1|2) -> 2//3 | U ((-1)|(-2)) -> -2//3 | U 3 -> -4//3 | U (-3) -> 4//3 | U n -> invalid_arg ("SM_top.charge: up quark " ^ string_of_int n) | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Phi0 -> 0//1 | Phip -> 1//1 | Phim -> -1//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | Q_lepton | Q_up | Q_down | Q_top | G_CC | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_NC_top | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_H3 | G_H4 | Gs | I_Gs | G2 | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let derived_parameter_arrays = [] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* \begin{equation} \mathcal{L}_{\textrm{EM}} = - e \sum_i q_i \bar\psi_i\fmslash{A}\psi_i \end{equation} *) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let electromagnetic_currents' n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let em_up_type_currents = List.map mgm [ ((U (-1), Ga, U 1), FBF (1, Psibar, V, Psi), Q_up); ((U (-2), Ga, U 2), FBF (1, Psibar, V, Psi), Q_up); ((U (-3), Ga, U 3), FBF (1, Psibar, V, Psi), Q_top)] let electromagnetic_currents = ThoList.flatmap electromagnetic_currents' [1;2;3] @ em_up_type_currents let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{NC}} = - \frac{g}{2\cos\theta_W} \sum_i \bar\psi_i\fmslash{Z}(g_V^i-g_A^i\gamma_5)\psi_i \end{equation} *) let neutral_currents' n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] let neutral_up_type_currents = List.map mgm [ ((U (-1), Z, U 1), FBF (1, Psibar, VA, Psi), G_NC_up); ((U (-2), Z, U 2), FBF (1, Psibar, VA, Psi), G_NC_up); ((U (-3), Z, U 3), FBF (1, Psibar, VA, Psi), G_NC_top) ] let neutral_currents = ThoList.flatmap neutral_currents' [1;2;3] @ neutral_up_type_currents (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents' n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_up_currents = List.map mgm [ ((U (-1), Wp, D 1), FBF (1, Psibar, VL, Psi), G_CC); ((U (-2), Wp, D 2), FBF (1, Psibar, VL, Psi), G_CC); ((U (-3), Wm, D 3), FBF (1, Psibar, VL, Psi), G_CC); ((D (-1), Wm, U 1), FBF (1, Psibar, VL, Psi), G_CC); ((D (-2), Wm, U 2), FBF (1, Psibar, VL, Psi), G_CC); ((D (-3), Wp, U 3), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents = ThoList.flatmap charged_currents' [1;2;3] @ charged_up_currents let yukawa = [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, S, Psi), G_Htt); ((M (D (-3)), O H, M (D 3)), FBF (1, Psibar, S, Psi), G_Hbb); ((M (U (-2)), O H, M (U 2)), FBF (1, Psibar, S, Psi), G_Hcc); ((M (L (-3)), O H, M (L 3)), FBF (1, Psibar, S, Psi), G_Htautau) ] (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2 ] let gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ) ] let gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (electromagnetic_currents @ ThoList.flatmap color_currents [1;2;3] @ neutral_currents @ charged_currents @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | _ -> invalid_arg "Models.Anomtop.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Models.Anomtop.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Models.Anomtop.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Models.Anomtop.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Models.Anomtop.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Models.Anomtop.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Models.Anomtop.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Models.Anomtop.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Models.Anomtop.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" end let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | Q_top -> "qtop" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_NC_top -> "gnctop" | G_CC -> "gcc" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_H3 -> "gh3" | G_H4 -> "gh4" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end module O = Omega.Make(Fusion.Mixed23)(Targets.Fortran) (Anomtop(SM_no_anomalous)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/color.ml =================================================================== --- trunk/omega/src/color.ml (revision 8274) +++ trunk/omega/src/color.ml (revision 8275) @@ -1,426 +1,2110 @@ (* color.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Quantum Numbers} *) type t = | Singlet | SUN of int | AdjSUN of int let conjugate = function | Singlet -> Singlet | SUN n -> SUN (-n) | AdjSUN n -> AdjSUN n let compare c1 c2 = match c1, c2 with | Singlet, Singlet -> 0 | Singlet, _ -> -1 | _, Singlet -> 1 | SUN n, SUN n' -> compare n n' | SUN _, AdjSUN _ -> -1 | AdjSUN _, SUN _ -> 1 | AdjSUN n, AdjSUN n' -> compare n n' module type Line = sig type t val conj : t -> t val equal : t -> t -> bool val to_string : t -> string end module type Cycles = sig type line type t = (line * line) list (* Contract the graph by connecting lines and return the number of cycles together with the contracted graph. \begin{dubious} The semantics of the contracted graph is not yet 100\%ly fixed. \end{dubious} *) val contract : t -> int * t (* The same as [contract], but returns only the number of cycles and raises [Open_line] when not all lines are closed. *) val count : t -> int exception Open_line (* Mainly for debugging \ldots *) val to_string : t -> string end module Cycles (L : Line) : Cycles with type line = L.t = struct type line = L.t type t = (line * line) list exception Open_line (* NB: The following algorithm for counting the cycles is quadratic since it performs nested scans of the lists. If this was a serious problem one could replace the lists of pairs by a [Map] and replace one power by a logarithm. *) let rec find_fst c_final c1 disc seen = function | [] -> ((L.conj c_final, c1) :: disc, List.rev seen) | (c1', c2') as c12' :: rest -> if L.equal c1 c1' then find_snd c_final (L.conj c2') disc [] (List.rev_append seen rest) else find_fst c_final c1 disc (c12' :: seen) rest and find_snd c_final c2 disc seen = function | [] -> ((L.conj c_final, L.conj c2) :: disc, List.rev seen) | (c1', c2') as c12' :: rest-> if L.equal c2' c2 then begin if L.equal c1' c_final then (disc, List.rev_append seen rest) else find_fst c_final (L.conj c1') disc [] (List.rev_append seen rest) end else find_snd c_final c2 disc (c12' :: seen) rest let consume = function | [] -> ([], []) | (c1, c2) :: rest -> find_snd (L.conj c1) (L.conj c2) [] [] rest let contract lines = let rec contract' acc disc = function | [] -> (acc, List.rev disc) | rest -> begin match consume rest with | [], rest' -> contract' (succ acc) disc rest' | disc', rest' -> contract' acc (List.rev_append disc' disc) rest' end in contract' 0 [] lines let count lines = match contract lines with | n, [] -> n | n, _ -> raise Open_line let to_string lines = String.concat "" (List.map (fun (c1, c2) -> "[" ^ L.to_string c1 ^ "," ^ L.to_string c2 ^ "]") lines) end (* \thocwmodulesection{Color Flows} *) module type Flow = sig type color type t = color list * color list val rank : t -> int val of_list : int list -> color val ghost : unit -> color val to_lists : t -> int list list val in_to_lists : t -> int list list val out_to_lists : t -> int list list val ghost_flags : t -> bool list val in_ghost_flags : t -> bool list val out_ghost_flags : t -> bool list type power = { num : int; den : int; power : int } type factor = power list val factor : t -> t -> factor val zero : factor end -module Flow (* [: Flow] *) = +module Flow : Flow = struct type color = | Lines of int * int | Ghost type t = color list * color list let rank cflow = 2 (* \thocwmodulesubsection{Constructors} *) let ghost () = Ghost let of_list = function | [c1; c2] -> Lines (c1, c2) | _ -> invalid_arg "Color.Flow.of_list: num_lines != 2" let to_list = function | Lines (c1, c2) -> [c1; c2] | Ghost -> [0; 0] let to_lists (cfin, cfout) = (List.map to_list cfin) @ (List.map to_list cfout) let in_to_lists (cfin, _) = List.map to_list cfin let out_to_lists (_, cfout) = List.map to_list cfout let ghost_flag = function | Lines _ -> false | Ghost -> true let ghost_flags (cfin, cfout) = (List.map ghost_flag cfin) @ (List.map ghost_flag cfout) let in_ghost_flags (cfin, _) = List.map ghost_flag cfin let out_ghost_flags (_, cfout) = List.map ghost_flag cfout (* \thocwmodulesubsection{Evaluation} *) type power = { num : int; den : int; power : int } type factor = power list let zero = [] let count_ghosts1 colors = List.fold_left (fun acc -> function Ghost -> succ acc | _ -> acc) 0 colors let count_ghosts (fin, fout) = count_ghosts1 fin + count_ghosts1 fout type 'a square = | Square of 'a | Mismatch let conjugate = function | Lines (c1, c2) -> Lines (-c2, -c1) | Ghost -> Ghost let cross_in (cin, cout) = cin @ (List.map conjugate cout) let cross_out (cin, cout) = (List.map conjugate cin) @ cout module C = Cycles (struct type t = int let conj = (~-) let equal = (=) let to_string = string_of_int end) let square f1 f2 = let rec square' acc f1' f2' = match f1', f2' with | [], [] -> Square (List.rev acc) | _, [] | [], _ -> Mismatch | Ghost :: rest1, Ghost :: rest2 -> square' acc rest1 rest2 | Lines (0, 0) :: rest1, Lines (0, 0) :: rest2 -> square' acc rest1 rest2 | Lines (0, c1') :: rest1, Lines (0, c2') :: rest2 -> square' ((c1', c2') :: acc) rest1 rest2 | Lines (c1, 0) :: rest1, Lines (c2, 0) :: rest2 -> square' ((c1, c2) :: acc) rest1 rest2 | Lines (0, _) :: _, _ | _ , Lines (0, _) :: _ | Lines (_, 0) :: _, _ | _, Lines (_, 0) :: _ -> Mismatch | Lines (_, _) :: _, Ghost :: _ | Ghost :: _, Lines (_, _) :: _ -> Mismatch | Lines (c1, c1') :: rest1, Lines (c2, c2') :: rest2 -> square' ((c1', c2') :: (c1, c2) :: acc) rest1 rest2 in square' [] (cross_out f1) (cross_out f2) (* In addition to counting closed color loops, we also need to count closed gluon loops. Fortunately, we can use the same algorithm on a different data type, provided it doesn't require all lines to be closed. *) module C2 = Cycles (struct type t = int * int let conj (c1, c2) = (- c2, - c1) let equal (c1, c2) (c1', c2') = c1 = c1' && c2 = c2' let to_string (c1, c2) = "(" ^ string_of_int c1 ^ "," ^ string_of_int c2 ^ ")" end) let square2 f1 f2 = let rec square2' acc f1' f2' = match f1', f2' with | [], [] -> Square (List.rev acc) | _, [] | [], _ -> Mismatch | Ghost :: rest1, Ghost :: rest2 -> square2' acc rest1 rest2 | Lines (0, 0) :: rest1, Lines (0, 0) :: rest2 -> square2' acc rest1 rest2 | Lines (0, _) :: rest1, Lines (0, _) :: rest2 | Lines (_, 0) :: rest1, Lines (_, 0) :: rest2 -> square2' acc rest1 rest2 | Lines (0, _) :: _, _ | _ , Lines (0, _) :: _ | Lines (_, 0) :: _, _ | _, Lines (_, 0) :: _ -> Mismatch | Lines (_, _) :: _, Ghost :: _ | Ghost :: _, Lines (_, _) :: _ -> Mismatch | Lines (c1, c1') :: rest1, Lines (c2, c2') :: rest2 -> square2' (((c1, c1'), (c2, c2')) :: acc) rest1 rest2 in square2' [] (cross_out f1) (cross_out f2) (* $\ocwlowerid{int\_power}: n\, p \to n^p$ for integers is missing from [Pervasives]! *) let int_power n p = let rec int_power' acc i = if i < 0 then invalid_arg "int_power" else if i = 0 then acc else int_power' (n * acc) (pred i) in int_power' 1 p (* Instead of implementing a full fledged algebraic evaluator, let's simply expand the binomial by hand: \begin{equation} \left(\frac{N_C^2-2}{N_C^2}\right)^n = \sum_{i=0}^n \binom{n}{i} (-2)^i N_C^{-2i} \end{equation} *) (* NB: Any result of [square] other than [Mismatch] guarantees [count_ghosts f1 = count_ghosts f2]. *) let factor f1 f2 = match square f1 f2, square2 f1 f2 with | Mismatch, _ | _, Mismatch -> [] | Square f12, Square f12' -> let num_cycles = C.count f12 and num_cycles2, disc = C2.contract f12' and num_ghosts = count_ghosts f1 in (*i Printf.eprintf "f12 = %s -> #loops = %d\n" (C.to_string f12) num_cycles; Printf.eprintf "f12' = %s -> #loops = %d, disc = %s\n" (C2.to_string f12') num_cycles2 (C2.to_string disc); flush stderr; i*) List.map (fun i -> let parity = if num_ghosts mod 2 = 0 then 1 else -1 and power = num_cycles - num_ghosts in let coeff = int_power (-2) i * Combinatorics.binomial num_cycles2 i and power2 = - 2 * i in { num = parity * coeff; den = 1; power = power + power2 }) (ThoList.range 0 num_cycles2) end (* later: *) module General_Flow = struct type color = | Lines of int list | Ghost of int type t = color list * color list let rank_default = 2 (* Standard model *) let rank cflow = try begin match List.hd cflow with | Lines lines -> List.length lines | Ghost n_lines -> n_lines end with | _ -> rank_default end -(* \thocwmodulesection{Color Structure of Vertices } *) +(* \thocwmodulesection{Vertex Color Flows} *) -type pair3 = - | P3_12 | P3_23 | P3_31 - | P3_21 | P3_32 | P3_13 - -type vertex3 = - | Legacy3 - | Trivial3 - | Delta3 of pair3 - | Delta8 of pair3 - | T of pair3 - | F - | Eps - -type pair4 = - | P4_12 - | P4_13 - | P4_14 - | P4_23 - | P4_24 - | P4_34 - -type triplet4 = - | P4_123 - | P4_234 - | P4_341 - | P4_412 - -type cyclic4 = - | C4_234 - | C4_342 - | C4_423 - -type vertex4 = - | Legacy4 - | Trivial4 - | Delta13 of pair4 - | Delta18 of pair4 - | Delta38 of pair4 - | Delta33 of cyclic4 - | Delta88 of cyclic4 - | TT of cyclic4 - | FF of (int * int) * (int * int) - | TF of pair4 - | T4 of triplet4 - | F4 of triplet4 - | Eps4 of triplet4 - -let signed_order_pair (a, b as p) = - if a < b then - (1, p) - else - (-1, (b, a)) - -(* Use the symmetries of $f_{abe}f_{cde}$ to bring the indices - in a canonical oder with $a int + val relocate : (int -> int) -> endpoint -> endpoint + type tip = endpoint + type tail = endpoint + type ghost = endpoint + type ('tail, 'tip, 'ghost) t = + | Arrow of 'tail * 'tip + | Ghost of 'ghost + type free = (tail, tip, ghost) t + type factor + val free_to_string : free -> string + val factor_to_string : factor -> string + val map : (endpoint -> endpoint) -> free -> free + val to_left_factor : (endpoint -> bool) -> free -> factor + val to_right_factor : (endpoint -> bool) -> free -> factor + val of_factor : factor -> free + val negatives : free -> endpoint list + val is_free : factor -> bool + val is_ghost : free -> bool + val single : endpoint -> endpoint -> free + val double : endpoint -> endpoint -> free list + val ghost : endpoint -> free + val chain : int list -> free list + val cycle : int list -> free list + type merge = + | Match of factor + | Ghost_Match + | Loop_Match + | Mismatch + | No_Match + val merge : factor -> factor -> merge + module BinOps : sig + val (=>) : int -> int -> free + val (==>) : int -> int -> free list + val (<=>) : int -> int -> free list + val (>=>) : int * int -> int -> free + val (=>>) : int -> int * int -> free + val (>=>>) : int * int -> int * int -> free + val (??) : int -> free + end + module Test : Test + end + +module Arrow : Arrow = + struct + + type endpoint = + | I of int + | M of int * int + + let position = function + | I i -> i + | M (i, _) -> i + + let relocate f = function + | I i -> I (f i) + | M (i, n) -> M (f i, n) + + type tip = endpoint + type tail = endpoint + type ghost = endpoint + + (* Note that the \emph{same} index can appear multiple + times on in \emph{each} side. Thus, we \emph{must not} + combine the arrows in the two factors. + In fact, we cannot disambiguate them by + distinguishing tips from tails alone. *) + + type 'a index = + | Free of 'a + | SumL of 'a + | SumR of 'a + + type ('tail, 'tip, 'ghost) t = + | Arrow of 'tail * 'tip + | Ghost of 'ghost + + type free = (tail, tip, ghost) t + type factor = (tail index, tip index, ghost index) t + + let endpoint_to_string = function + | I i -> string_of_int i + | M (i, n) -> Printf.sprintf "%d.%d" i n + + let index_to_string = function + | Free i -> endpoint_to_string i + | SumL i -> endpoint_to_string i ^ "L" + | SumR i -> endpoint_to_string i ^ "R" + + let to_string i2s = function + | Arrow (tail, tip) -> Printf.sprintf "%s>%s" (i2s tail) (i2s tip) + | Ghost ghost -> Printf.sprintf "{%s}" (i2s ghost) + + let free_to_string = to_string endpoint_to_string + + let factor_to_string = to_string index_to_string + + let index_matches i1 i2 = + match i1, i2 with + | SumL i1, SumR i2 | SumR i1, SumL i2 -> i1 = i2 + | _ -> false + + let map f = function + | Arrow (tail, tip) -> Arrow (f tail, f tip) + | Ghost ghost -> Ghost (f ghost) + + let free_index = function + | Free i -> i + | SumL i -> invalid_arg "Color.Arrow.free_index: leftover LHS summation" + | SumR i -> invalid_arg "Color.Arrow.free_index: leftover RHS summation" + + let to_left_index is_sum i = + if is_sum i then + SumL i + else + Free i + + let to_right_index is_sum i = + if is_sum i then + SumR i + else + Free i + + let to_left_factor is_sum = map (to_left_index is_sum) + let to_right_factor is_sum = map (to_right_index is_sum) + let of_factor = map free_index + + let negatives = function + | Arrow (tail, tip) -> + if position tail < 0 then + if position tip < 0 then + [tail; tip] + else + [tail] + else if position tip < 0 then + [tip] + else + [] + | Ghost ghost -> + if position ghost < 0 then + [ghost] + else + [] + + let is_free = function + | Arrow (Free _, Free _) | Ghost (Free _) -> true + | _ -> false + + let is_ghost = function + | Ghost _ -> true + | Arrow _ -> false + + let single tail tip = + Arrow (tail, tip) + + let double a b = + if a = b then + [single a b] + else + [single a b; single b a] + + let ghost g = + Ghost g + + type merge = + | Match of factor + | Ghost_Match + | Loop_Match + | Mismatch + | No_Match + + let merge arrow1 arrow2 = + match arrow1, arrow2 with + | Ghost g1, Ghost g2 -> + if index_matches g1 g2 then + Ghost_Match + else + No_Match + | Arrow (tail, tip), Ghost g + | Ghost g, Arrow (tail, tip) -> + if index_matches g tail || index_matches g tip then + Mismatch + else + No_Match + | Arrow (tail, tip), Arrow (tail', tip') -> + if index_matches tip tail' then + if index_matches tip' tail then + Loop_Match + else + Match (Arrow (tail, tip')) + else if index_matches tip' tail then + Match (Arrow (tail', tip)) + else + No_Match + + module BinOps = + struct + let (=>) i j = single (I i) (I j) + let (==>) i j = [i => j] + let (<=>) i j = double (I i) (I j) + let ( >=> ) (i, n) j = single (M (i, n)) (I j) + let ( =>> ) i (j, m) = single (I i) (M (j, m)) + let ( >=>> ) (i, n) (j, m) = single (M (i, n)) (M (j, m)) + (* I wanted to use [~~] instead of [??], but ocamlweb doesn't like + operators starting with [~] in the index. *) + let (??) i = ghost (I i) + end + + open BinOps + + (* Composite Arrows. *) + + let rec chain' = function + | [] -> [] + | [a] -> [a => a] + | [a; b] -> [a => b] + | a :: (b :: _ as rest) -> (a => b) :: chain' rest + + let chain = function + | [] -> [] + | a :: _ as a_list -> chain' a_list + + let rec cycle' a = function + | [] -> [a => a] + | [b] -> [b => a] + | b :: (c :: _ as rest) -> (b => c) :: cycle' a rest + + let cycle = function + | [] -> [] + | a :: _ as a_list -> cycle' a a_list + + module Test : Test = + struct + + open OUnit + + let suite_chain = + "chain" >::: + + [ "chain []" >:: + (fun () -> + assert_equal [] (chain [])); + + "chain [1]" >:: + (fun () -> + assert_equal [1 => 1] (chain [1])); + + "chain [1;2]" >:: + (fun () -> + assert_equal [1 => 2] (chain [1; 2])); + + "chain [1;2;3]" >:: + (fun () -> + assert_equal [1 => 2; 2 => 3] (chain [1; 2; 3])); + + "chain [1;2;3;4]" >:: + (fun () -> + assert_equal [1 => 2; 2 => 3; 3 => 4] (chain [1; 2; 3; 4])) ] + + let suite_cycle = + "cycle" >::: + + [ "cycle []" >:: + (fun () -> + assert_equal [] (cycle [])); + + "cycle [1]" >:: + (fun () -> + assert_equal [1 => 1] (cycle [1])); + + "cycle [1;2]" >:: + (fun () -> + assert_equal [1 => 2; 2 => 1] (cycle [1; 2])); + + "cycle [1;2;3]" >:: + (fun () -> + assert_equal [1 => 2; 2 => 3; 3 => 1] (cycle [1; 2; 3])); + + "cycle [1;2;3;4]" >:: + (fun () -> + assert_equal + [1 => 2; 2 => 3; 3 => 4; 4 => 1] + (cycle [1; 2; 3; 4])) ] + + let suite = + "Color.Arrow" >::: + [suite_chain; + suite_cycle] + + end + + end + +module type Propagator = + sig + type cf_in = int + type cf_out = int + type t = W | I of cf_in | O of cf_out | IO of cf_in * cf_out | G + val to_string : t -> string + end + +module Propagator : Propagator = + struct + type cf_in = int + type cf_out = int + type t = W | I of cf_in | O of cf_out | IO of cf_in * cf_out | G + let to_string = function + | W -> "W" + | I cf -> Printf.sprintf "I(%d)" cf + | O cf' -> Printf.sprintf "O(%d)" cf' + | IO (cf, cf') -> Printf.sprintf "IO(%d,%d)" cf cf' + | G -> "G" + end + +module type LP = + sig + val rationals : (Algebra.Q.t * int) list -> Algebra.Laurent.t + val ints : (int * int) list -> Algebra.Laurent.t + + val rational : Algebra.Q.t -> Algebra.Laurent.t + val int : int -> Algebra.Laurent.t + val fraction : int -> Algebra.Laurent.t + val imag : int -> Algebra.Laurent.t + val nc : int -> Algebra.Laurent.t + val over_nc : int -> Algebra.Laurent.t + end + +module LP : LP = + struct + module L = Algebra.Laurent + + (* Rationals from integers. *) + let q_int n = Q.make n 1 + let q_fraction n = Q.make 1 n + + (* Complex rationals: *) + let qc_rational q = QC.make q Q.null + let qc_int n = qc_rational (q_int n) + let qc_fraction n = qc_rational (q_fraction n) + let qc_imag n = QC.make Q.null (q_int n) + + (* Laurent polynomials: *) + let of_pairs f pairs = + L.sum (List.map (fun (coeff, power) -> L.atom (f coeff) power) pairs) + + let rationals = of_pairs qc_rational + let ints = of_pairs qc_int + + let rational q = rationals [(q, 0)] + let int n = ints [(n, 0)] + let fraction n = L.const (qc_fraction n) + let imag n = L.const (qc_imag n) + let nc n = ints [(n, 1)] + let over_nc n = ints [(n, -1)] + + end + +module type Birdtracks = + sig + type t + val to_string : t -> string + val pp : Format.formatter -> t -> unit + val trivial : t -> bool + val is_null : t -> bool + val unit : t + val null : t + val two : t + val half : t + val third : t + val minus : t + val nc : t + val imag : t + val ints : (int * int) list -> t + val const : Algebra.Laurent.t -> t + val times : t -> t -> t + val multiply : t list -> t + val scale : Q.t -> t -> t + val sum : t list -> t + val diff : t -> t -> t + val f_of_rep : (int -> int -> int -> t) -> int -> int -> int -> t + val d_of_rep : (int -> int -> int -> t) -> int -> int -> int -> t + module BinOps : sig + val ( +++ ) : t -> t -> t + val ( --- ) : t -> t -> t + val ( *** ) : t -> t -> t + end + val map : (int -> int) -> t -> t + val fuse : int -> t -> Propagator.t list -> (QC.t * Propagator.t) list + module Test : Test + end + +module Birdtracks = + struct + + module A = Arrow + open A.BinOps + module P = Propagator + module L = Algebra.Laurent + + type connection = L.t * A.free list + type t = connection list + + let trivial = function + | [] -> true + | [(coeff, [])] -> coeff = L.unit + | _ -> false + + (* Rationals from integers. *) + let q_int n = Q.make n 1 + let q_fraction n = Q.make 1 n + + (* Complex rationals: *) + let qc_rational q = QC.make q Q.null + let qc_int n = qc_rational (q_int n) + let qc_fraction n = qc_rational (q_fraction n) + let qc_imag n = QC.make Q.null (q_int n) + + (* Laurent polynomials: *) + let laurent_of_pairs f pairs = + L.sum (List.map (fun (coeff, power) -> L.atom (f coeff) power) pairs) + + let l_rationals = laurent_of_pairs qc_rational + let l_ints = laurent_of_pairs qc_int + + let l_rational q = l_rationals [(q, 0)] + let l_int n = l_ints [(n, 0)] + let l_fraction n = L.const (qc_fraction n) + let l_imag n = L.const (qc_imag n) + let l_nc n = l_ints [(n, 1)] + let l_over_nc n = l_ints [(n, -1)] + + (* Expressions *) + let unit = [] + let const c = [c, []] + let ints pairs = const (LP.ints pairs) + let null = const L.null + let half = const (LP.fraction 2) + let third = const (LP.fraction 3) + let two = const (LP.int 2) + let minus = const (LP.int (-1)) + let nc = const (LP.nc 1) + let imag = const (LP.imag 1) + + module AMap = Pmap.Tree + + let find_arrows_opt arrows map = + try Some (AMap.find Pervasives.compare arrows map) with Not_found -> None + + let canonicalize1 (coeff, io_list) = + (coeff, List.sort Pervasives.compare io_list) + + let canonicalize terms = + let map = + List.fold_left + (fun acc term -> + let coeff, arrows = canonicalize1 term in + if coeff = L.null then + acc + else + match find_arrows_opt arrows acc with + | None -> AMap.add Pervasives.compare arrows coeff acc + | Some coeff' -> + let coeff'' = L.add coeff coeff' in + if coeff'' = L.null then + AMap.remove Pervasives.compare arrows acc + else + AMap.add Pervasives.compare arrows coeff'' acc) + AMap.empty terms in + if AMap.is_empty map then + null + else + AMap.fold (fun arrows coeff acc -> (coeff, arrows) :: acc) map [] + + let arrows_to_string_aux f arrows = + ThoList.to_string f arrows + + let to_string1_aux f (coeff, arrows) = + Printf.sprintf + "(%s) * %s" + (L.to_string "N" coeff) (arrows_to_string_aux f arrows) + + let to_string1_opt_aux f = function + | None -> "None" + | Some v -> to_string1_aux f v + + let to_string_raw_aux f v = + ThoList.to_string (to_string1_aux f) v + + let to_string_aux f v = + to_string_raw_aux f (canonicalize v) + + let factor_arrows_to_string = arrows_to_string_aux A.factor_to_string + let factor_to_string1 = to_string1_aux A.factor_to_string + let factor_to_string1_opt = to_string1_opt_aux A.factor_to_string + let factor_to_string_raw = to_string_raw_aux A.factor_to_string + let factor_to_string = to_string_aux A.factor_to_string + + let arrows_to_string = arrows_to_string_aux A.free_to_string + let to_string1 = to_string1_aux A.free_to_string + let to_string1_opt = to_string1_opt_aux A.free_to_string + let to_string_raw = to_string_raw_aux A.free_to_string + let to_string = to_string_aux A.free_to_string + + let pp fmt v = + Format.fprintf fmt "%s" (to_string v) + + let is_null v = + match canonicalize v with + | [c, _] -> c = L.null + | _ -> false + + let is_white = function + | P.W -> true + | _ -> false + + let map1 f (c, v) = + (c, List.map (A.map (A.relocate f)) v) + + let map f = List.map (map1 f) + + let add_arrow arrow (coeff, arrows) = + let rec add_arrow' arrow (coeff, acc) = function + | [] -> + (* No opportunities for further matches *) + Some (coeff, arrow :: acc) + | arrow' :: arrows' -> + begin match A.merge arrow arrow' with + | A.Mismatch -> + None + | A.Ghost_Match -> + Some (L.mul (LP.over_nc (-1)) coeff, + List.rev_append acc arrows') + | A.Loop_Match -> + Some (L.mul (LP.nc 1) coeff, List.rev_append acc arrows') + | A.Match arrow'' -> + if A.is_free arrow'' then + Some (coeff, arrow'' :: List.rev_append acc arrows') + else + (* the new [arrow''] ist not yet saturated, try again: *) + add_arrow' arrow'' (coeff, acc) arrows' + | A.No_Match -> + add_arrow' arrow (coeff, arrow' :: acc) arrows' + end in + add_arrow' arrow (coeff, []) arrows + + let logging_add_arrow arrow (coeff, arrows) = + let result = add_arrow arrow (coeff, arrows) in + Printf.eprintf + "add_arrow %s to %s ==> %s\n" + (A.factor_to_string arrow) + (factor_to_string1 (coeff, arrows)) + (factor_to_string1_opt result); + result + + (* We can reject the contributions with unsaturated summation indices + from Ghost contributions to~$T_a$ only \emph{after} adding all + arrows that might saturate an open index. *) + + let add_arrows factor1 arrows2 = + let rec add_arrows' (_, arrows as acc) = function + | [] -> + if List.for_all A.is_free arrows then + Some acc + else + None + | arrow :: arrows -> + begin match add_arrow arrow acc with + | None -> None + | Some acc' -> add_arrows' acc' arrows + end in + add_arrows' factor1 arrows2 + + let logging_add_arrows factor1 arrows2 = + let result = add_arrows factor1 arrows2 in + Printf.eprintf + "add_arrows %s to %s ==> %s\n" + (factor_to_string1 factor1) + (factor_arrows_to_string arrows2) + (factor_to_string1_opt result); + result + + (* Note that a negative index might be summed only + later in a sequence of binary products and must + therefore be treated as free in this product. Therefore, + we have to classify the indices as summation indices + \emph{not only} based on their sign, but in addition based on + whether they appear in both factors. Only then can we reject + surviving ghosts. *) + + module ESet = + Set.Make + (struct + type t = A.endpoint + let compare = Pervasives.compare + end) + + let negatives arrows = + List.fold_left + (fun acc arrow -> + List.fold_left + (fun acc' i -> ESet.add i acc') + acc (A.negatives arrow)) + ESet.empty arrows + + let times1 (coeff1, arrows1) (coeff2, arrows2) = + let summations = ESet.inter (negatives arrows1) (negatives arrows2) in + let is_sum i = ESet.mem i summations in + let arrows1' = List.map (A.to_left_factor is_sum) arrows1 + and arrows2' = List.map (A.to_right_factor is_sum) arrows2 in + match add_arrows (coeff1, arrows1') arrows2' with + | None -> None + | Some (coeff1, arrows) -> + Some (L.mul coeff1 coeff2, List.map A.of_factor arrows) + + let logging_times1 factor1 factor2 = + let result = times1 factor1 factor2 in + Printf.eprintf + "%s times1 %s ==> %s\n" + (to_string1 factor1) + (to_string1 factor2) + (to_string1_opt result); + result + + let sum terms = + canonicalize (List.concat terms) + + let times term term' = + canonicalize (Product.list2_opt times1 term term') + + (* \begin{dubious} + Is that more efficient than the following implementation? + \end{dubious} *) + + let rec multiply1' acc = function + | [] -> Some acc + | factor :: factors -> + begin match times1 acc factor with + | None -> None + | Some acc' -> multiply1' acc' factors + end + + let multiply1 = function + | [] -> Some (L.unit, []) + | [factor] -> Some factor + | factor :: factors -> multiply1' factor factors + + let multiply termss = + canonicalize (Product.list_opt multiply1 termss) + + (* \begin{dubious} + Isn't that the more straightforward implementation? + \end{dubious} *) + + let multiply = function + | [] -> [] + | term :: terms -> + canonicalize (List.fold_left times term terms) + + let scale1 q (coeff, arrows) = + (L.scale (qc_rational q) coeff, arrows) + let scale q = List.map (scale1 q) + + let diff term1 term2 = + canonicalize (List.rev_append term1 (scale (q_int (-1)) term2)) + + module BinOps = + struct + let ( +++ ) term term' = sum [term; term'] + let ( --- ) = diff + let ( *** ) = times + end + + open BinOps + + let trace3 r a b c = + r a (-1) (-2) *** r b (-2) (-3) *** r c (-3) (-1) + + let f_of_rep r a b c = + minus *** imag *** (trace3 r a b c --- trace3 r a c b) + + let d_of_rep r a b c = + trace3 r a b c +++ trace3 r a c b + + module IMap = + Map.Make (struct type t = int let compare = Pervasives.compare end) + + let line_map lines = + let _, map = + List.fold_left + (fun (i, acc) line -> + (succ i, + match line with + | P.W -> acc + | _ -> IMap.add i line acc)) + (1, IMap.empty) + lines in + map + + let find_opt i map = + try Some (IMap.find i map) with Not_found -> None + + let lines_to_string lines = + match IMap.bindings lines with + | [] -> "W" + | lines -> + String.concat + " " + (List.map + (fun (i, c) -> Printf.sprintf "%s@%d" (P.to_string c) i) + lines) + + let clear = IMap.remove + + let add_in i cf lines = + match find_opt i lines with + | Some (P.O cf') -> IMap.add i (P.IO (cf, cf')) lines + | _ -> IMap.add i (P.I cf) lines + + let add_out i cf' lines = + match find_opt i lines with + | Some (P.I cf) -> IMap.add i (P.IO (cf, cf')) lines + | _ -> IMap.add i (P.O cf') lines + + let add_ghost i lines = + IMap.add i P.G lines + + let connect1 n arrow lines = + match arrow with + | A.Ghost g -> + let g = A.position g in + if g = n then + Some (add_ghost n lines) + else + begin match find_opt g lines with + | Some P.G -> Some (clear g lines) + | _ -> None + end + | A.Arrow (i, o) -> + let i = A.position i + and o = A.position o in + if o = n then + match find_opt i lines with + | Some (P.I cfi) -> Some (add_in o cfi (clear i lines)) + | Some (P.IO (cfi, cfi')) -> Some (add_in o cfi (add_out i cfi' lines)) + | _ -> None + else if i = n then + match find_opt o lines with + | Some (P.O cfo') -> Some (add_out i cfo' (clear o lines)) + | Some (P.IO (cfo, cfo')) -> Some (add_out i cfo' (add_in o cfo lines)) + | _ -> None + else + match find_opt i lines, find_opt o lines with + | Some (P.I cfi), Some (P.O cfo') when cfi = cfo' -> + Some (clear o (clear i lines)) + | Some (P.I cfi), Some (P.IO (cfo, cfo')) when cfi = cfo'-> + Some (add_in o cfo (clear i lines)) + | Some (P.IO (cfi, cfi')), Some (P.O cfo') when cfi = cfo' -> + Some (add_out i cfi' (clear o lines)) + | Some (P.IO (cfi, cfi')), Some (P.IO (cfo, cfo')) when cfi = cfo' -> + Some (add_in o cfo (add_out i cfi' lines)) + | _ -> None + + let connect connections lines = + let n = succ (List.length lines) + and lines = line_map lines in + let rec connect' acc = function + | arrow :: arrows -> + begin match connect1 n arrow acc with + | None -> None + | Some acc -> connect' acc arrows + end + | [] -> Some acc in + match connect' lines connections with + | None -> None + | Some acc -> + begin match IMap.bindings acc with + | [] -> Some P.W + | [(i, cf)] when i = n -> Some cf + | _ -> None + end + + let fuse1 nc lines (c, vertex) = + match connect vertex lines with + | None -> [] + | Some cf -> [(L.eval (qc_int nc) c, cf)] + + let fuse nc vertex lines = + match vertex with + | [] -> + if List.for_all is_white lines then + [(QC.one, P.W)] + else + [] + | vertex -> + ThoList.flatmap (fuse1 nc lines) vertex + + module Test : Test = + struct + open OUnit + + let vertices1_equal v1 v2 = + match v1, v2 with + | None, None -> true + | Some v1, Some v2 -> (canonicalize1 v1) = (canonicalize1 v2) + | _ -> false + + let assert_equal_vertices1 v1 v2 = + assert_equal ~printer:to_string1_opt ~cmp:vertices1_equal v1 v2 + + let suite_times1 = + "times1" >::: + + [ "merge two" >:: + (fun () -> + assert_equal_vertices1 + (Some (L.unit, 1 ==> 2)) + (times1 (L.unit, 1 ==> -1) (L.unit, -1 ==> 2))); + + "merge two exchanged" >:: + (fun () -> + assert_equal_vertices1 + (Some (L.unit, 1 ==> 2)) + (times1 (L.unit, -1 ==> 2) (L.unit, 1 ==> -1))); + + "ghost1" >:: + (fun () -> + assert_equal_vertices1 + (Some (l_over_nc (-1), 1 ==> 2)) + (times1 + (L.unit, [-1 => 2; ?? (-3)]) + (L.unit, [ 1 => -1; ?? (-3)]))); + + "ghost2" >:: + (fun () -> + assert_equal_vertices1 + None + (times1 + (L.unit, [ 1 => -1; ?? (-3)]) + (L.unit, [-1 => 2; -3 => -4; -4 => -3]))); + + "ghost2 exchanged" >:: + (fun () -> + assert_equal_vertices1 + None + (times1 + (L.unit, [-1 => 2; -3 => -4; -4 => -3]) + (L.unit, [ 1 => -1; ?? (-3)]))) ] + + let suite_canonicalize = + "canonicalize" >::: + + [ ] + + let line_option_to_string = function + | None -> "no match" + | Some line -> P.to_string line + + let test_connect_msg vertex formatter (expected, result) = + Format.fprintf + formatter + "[%s]: expected %s, got %s" + (arrows_to_string vertex) + (line_option_to_string expected) + (line_option_to_string result) + + let test_connect expected lines vertex = + assert_equal + ~printer:line_option_to_string + expected (connect vertex lines) + + let test_connect_permutations expected lines vertex = + List.iter + (fun v -> + assert_equal + ~pp_diff:(test_connect_msg v) + expected (connect v lines)) + (Combinatorics.permute vertex) + + let suite_connect = + "connect" >::: + + [ "delta" >:: + (fun () -> + test_connect_permutations + (Some (P.I 1)) + [ P.I 1; P.W ] + ( 1 ==> 3 )); + + "f: 1->3->2->1" >:: + (fun () -> + test_connect_permutations + (Some (P.IO (1, 3))) + [P.IO (1, 2); P.IO (2, 3)] + (A.cycle [1; 3; 2])); + + "f: 1->2->3->1" >:: + (fun () -> + test_connect_permutations + (Some (P.IO (1, 2))) + [P.IO (3, 2); P.IO (1, 3)] + (A.cycle [1; 2; 3])) ] + + let suite = + "Color.Birdtracks" >::: + [suite_times1; + suite_canonicalize; + suite_connect] + end + + let vertices_equal v1 v2 = + is_null (v1 --- v2) + + let assert_equal_vertices v1 v2 = + OUnit.assert_equal ~printer:to_string ~cmp:vertices_equal v1 v2 + + end + +(* \thocwmodulesubsection{$\mathrm{SU}(N_C)$} + We're computing with a general $N_C$, but [epsilon] and [epsilonbar] + make only sense for $N_C=3$. Also some of the terminology alludes + to $N_C=3$: triplet, sextet, octet. *) + +module type SU3 = + sig + include Birdtracks + val delta3 : int -> int -> t + val delta8 : int -> int -> t + val delta8_loop : int -> int -> t + val gluon : int -> int -> t + val t : int -> int -> int -> t + val f : int -> int -> int -> t + val d : int -> int -> int -> t + val epsilon : int -> int -> int -> t + val epsilonbar : int -> int -> int -> t + val t6 : int -> int -> int -> t + val k6 : int -> int -> int -> t + val k6bar : int -> int -> int -> t + end + +module SU3 : SU3 = + struct + + module A = Arrow + open Arrow.BinOps + + module B = Birdtracks + type t = B.t + let to_string = B.to_string + let pp = B.pp + let trivial = B.trivial + let is_null = B.is_null + let null = B.null + let unit = B.unit + let const = B.const + let two = B.two + let half = B.half + let third = B.third + let nc = B.imag + let minus = B.minus + let imag = B.imag + let ints = B.ints + let sum = B.sum + let diff = B.diff + let scale = B.scale + let times = B.times + let multiply = B.multiply + let map = B.map + let fuse = B.fuse + let f_of_rep = B.f_of_rep + let d_of_rep = B.d_of_rep + module BinOps = B.BinOps + + let delta3 i j = + [(LP.int 1, i ==> j)] + + let delta8 a b = + [(LP.int 1, a <=> b)] + + (* If the~$\delta_{ab}$ originates from + a~$\tr(T_aT_b)$, like an effective~$gg\to H\ldots$ + coupling, it makes a difference in the color + flow basis and we must write the full expression~(6.2) + from~\cite{Kilian:2012pz} instead. *) + + let delta8_loop a b = + [(LP.int 1, a <=> b); + (LP.int 1, [a => a; ?? b]); + (LP.int 1, [?? a; b => b]); + (LP.nc 1, [?? a; ?? b])] + + (* The following can be used for computing polarization sums + (eventually, this could make the [Flow] module redundant). + Note that we have $-N_C$ instead of $-1/N_C$ in the ghost + contribution here, because + two factors of $-1/N_C$ will be produced by [add_arrow] + below, when contracting two ghost indices. + Indeed, with this definition we can maintain + [multiply [delta8 1 (-1); gluon (-1) (-2); delta8 (-2) 2] + = delta8 1 2]. *) + + let ghost a b = + [ (LP.nc (-1), [?? a; ?? b])] + + let gluon a b = + delta8 a b @ ghost a b + +(* \begin{dubious} + Do we need to introduce an + index \emph{pair} for each sextet index? Is that all? + \end{dubious} *) + + let sextet n m = + [ (LP.fraction 2, [(n, 0) >=>> (m, 0); (n, 1) >=>> (m, 1)]); + (LP.fraction 2, [(n, 0) >=>> (m, 1); (n, 1) >=>> (m, 0)]) ] + + (* FIXME: note the flipped [i] and [j]! *) + let t a j i = + [ (LP.int 1, [i => a; a => j]); + (LP.int 1, [i => j; ?? a]) ] + +(* Using the normalization~$\tr(T_{a}T_{b}) = \delta_{ab}$ + we find with + \begin{equation} + \label{eq:f=tr(TTT)'} + \ii f_{a_1a_2a_3} + = \tr\left(T_{a_1}\left\lbrack T_{a_2},T_{a_3}\right\rbrack\right) + = \tr\left(T_{a_1}T_{a_2}T_{a_3}\right) + - \tr\left(T_{a_1}T_{a_3}T_{a_2}\right) + \end{equation} + and + \begin{multline} + \tr\left(T_{a_1}T_{a_2}T_{a_3}\right) + T_{a_1}^{i_1j_1} T_{a_2}^{i_2j_2} T_{a_3}^{i_3j_3} + = T_{a_1}^{l_1l_2} T_{a_2}^{l_2l_3} T_{a_3}^{l_3l_1} + T_{a_1}^{i_1j_1} T_{a_2}^{i_2j_2} T_{a_3}^{i_3j_3} = \\ + \left( \delta^{l_1j_1} \delta^{i_1l_2} + - \frac{1}{N_C} \delta^{l_1l_2} \delta^{i_1j_1}\right) + \left( \delta^{l_2j_2} \delta^{i_2l_3} + - \frac{1}{N_C} \delta^{l_2l_3} \delta^{i_2j_2}\right) + \left( \delta^{l_3j_3} \delta^{i_3l_1} + - \frac{1}{N_C} \delta^{l_3l_1} \delta^{i_3j_3}\right) + \end{multline} + the decomposition + \begin{equation} + \label{eq:fTTT'} + \ii f_{a_1a_2a_3} T_{a_1}^{i_1j_1}T_{a_2}^{i_2j_2}T_{a_3}^{i_3j_3} + = \delta^{i_1j_2}\delta^{i_2j_3}\delta^{i_3j_1} + - \delta^{i_1j_3}\delta^{i_3j_2}\delta^{i_2j_1}\,. + \end{equation} *) + +(* Indeed, +\begin{verbatim} +symbol nc; +Dimension nc; +vector i1, i2, i3, j1, j2, j3; +index l1, l2, l3; + +local [TT] = + ( j1(l1) * i1(l2) - d_(l1,l2) * i1.j1 / nc ) + * ( j2(l2) * i2(l1) - d_(l2,l1) * i2.j2 / nc ); + +#procedure TTT(sign) +local [TTT`sign'] = + ( j1(l1) * i1(l2) - d_(l1,l2) * i1.j1 / nc ) + * ( j2(l2) * i2(l3) - d_(l2,l3) * i2.j2 / nc ) + * ( j3(l3) * i3(l1) - d_(l3,l1) * i3.j3 / nc ) + `sign' ( j1(l1) * i1(l2) - d_(l1,l2) * i1.j1 / nc ) + * ( j3(l2) * i3(l3) - d_(l2,l3) * i3.j3 / nc ) + * ( j2(l3) * i2(l1) - d_(l3,l1) * i2.j2 / nc ); +#endprocedure + +#call TTT(-) +#call TTT(+) + +bracket nc; +print; +.sort +.end +\end{verbatim} +gives +\begin{verbatim} + [TT] = + + nc^-1 * ( - i1.j1*i2.j2 ) + + i1.j2*i2.j1; + + [TTT-] = + + i1.j2*i2.j3*i3.j1 - i1.j3*i2.j1*i3.j2; + + [TTT+] = + + nc^-2 * ( 4*i1.j1*i2.j2*i3.j3 ) + + nc^-1 * ( - 2*i1.j1*i2.j3*i3.j2 + - 2*i1.j2*i2.j1*i3.j3 + - 2*i1.j3*i2.j2*i3.j1 ) + + i1.j2*i2.j3*i3.j1 + i1.j3*i2.j1*i3.j2; +\end{verbatim} +*) + +(* \begin{dubious} + What about the overall sign? + \end{dubious} *) + + let f a b c = + [ (LP.imag ( 1), A.cycle [a; b; c]); + (LP.imag (-1), A.cycle [a; c; b]) ] + +(* Except for the signs, the symmetric combination + \emph{is} compatible with~(6.11) in our color flow + paper~\cite{Kilian:2012pz}. There the signs are + probably wrong, as they cancel in~(6.13). *) + + let d a b c = + [ (LP.int 1, A.cycle [a; b; c]); + (LP.int 1, A.cycle [a; c; b]); + (LP.int 2, (a <=> b) @ [?? c]); + (LP.int 2, (b <=> c) @ [?? a]); + (LP.int 2, (c <=> a) @ [?? b]); + (LP.int 2, [a => a; ?? b; ?? c]); + (LP.int 2, [?? a; b => b; ?? c]); + (LP.int 2, [?? a; ?? b; c => c]); + (LP.nc 2, [?? a; ?? b; ?? c]) ] + + let incomplete tensor = + failwith ("Color.Vertex: " ^ tensor ^ " not supported yet!") + + let experimental tensor = + Printf.eprintf + "Color.Vertex: %s support still experimental and untested!\n" + tensor + + let epsilon i j k = incomplete "epsilon-tensor" + let epsilonbar i j k = incomplete "epsilon-tensor" + + (* \begin{dubious} + Is it enough to introduce an index \emph{pair} for + each sextet index? + \end{dubious} *) + + (* \begin{dubious} + We need to find a way to make sure that we use + particle/antiparticle assignments that a consistent + with FeynRules. + \end{dubious} *) + + let t6 a m n = + experimental "t6-tensor"; + [ (LP.int ( 1), [(n, 0) >=> a; a =>> (m, 0); (n, 1) >=>> (m, 1)]); + (LP.int (-1), [(n, 0) >=>> (m, 0); (n, 1) >=>> (m, 1); ?? a]) ] + + (* \begin{dubious} + How much symmetrization is required? + \end{dubious} *) + + let t6_symmetrized a m n = + experimental "t6-tensor"; + [ (LP.int ( 1), [(n, 0) >=> a; a =>> (m, 0); (n, 1) >=>> (m, 1)]); + (LP.int ( 1), [(n, 1) >=> a; a =>> (m, 0); (n, 0) >=>> (m, 1)]); + (LP.int (-1), [(n, 0) >=>> (m, 0); (n, 1) >=>> (m, 1); ?? a]); + (LP.int (-1), [(n, 1) >=>> (m, 0); (n, 0) >=>> (m, 1); ?? a]) ] + + let k6 m i j = + experimental "k6-tensor"; + [ (LP.int 1, [(m, 0) >=> i; (m, 1) >=> j]); + (LP.int 1, [(m, 1) >=> i; (m, 0) >=> j]) ] + + let k6bar m i j = + experimental "k6-tensor"; + [ (LP.int 1, [i =>> (m, 0); j =>> (m, 1)]); + (LP.int 1, [i =>> (m, 1); j =>> (m, 0)]) ] + + (* \thocwmodulesubsection{Unit Tests} *) + + module Test : Test = + struct + + open OUnit + module L = Algebra.Laurent + + module B = Birdtracks + + open Birdtracks + open Birdtracks.BinOps + + let exorcise vertex = + List.filter + (fun (_, arrows) -> not (List.exists A.is_ghost arrows)) + vertex + + let suite_sum = + "sum" >::: + + [ "atoms" >:: + (fun () -> + assert_equal_vertices + (two *** delta3 1 2) + (delta3 1 2 +++ delta3 1 2)) ] + + let suite_diff = + "diff" >::: + + [ "atoms" >:: + (fun () -> + assert_equal_vertices + (delta3 3 4) + (delta3 1 2 +++ delta3 3 4 --- delta3 1 2)) ] + + let suite_times = + "times" >::: + + [ "t1*t2=t2*t1" >:: + (fun () -> + let t1 = t (-1) 1 (-2) + and t2 = t (-1) (-2) 2 in + assert_equal_vertices (t1 *** t2) (t2 *** t1)); + + "tr(t1*t2)=tr(t2*t1)" >:: + (fun () -> + let t1 = t 1 (-1) (-2) + and t2 = t 2 (-2) (-1) in + assert_equal_vertices (t1 *** t2) (t2 *** t1)); + + "reorderings" >:: + (fun () -> + let v1 = [(L.unit, [ 1 => -2; -2 => -1; -1 => 1])] + and v2 = [(L.unit, [-1 => 2; 2 => -2; -2 => -1])] + and v' = [(L.unit, [ 1 => 1; 2 => 2])] in + assert_equal_vertices v' (v1 *** v2)) ] + + let suite_loops = + "loops" >::: + + [ ] + + let suite_normalization = + "normalization" >::: + + [ "tr(t*t)" >:: + (fun () -> + (* The use of [exorcise] appears to be legitimate + here in the color flow representation, cf.~(6.2) + of~\cite{Kilian:2012pz}. *) + assert_equal_vertices + (delta8 1 2) + (exorcise (t 1 (-1) (-2) *** t 2 (-2) (-1)))); + "d*d" >:: + (fun () -> + assert_equal_vertices + [ (LP.ints [(2, 1); (-8,-1)], 1 <=> 2); + (LP.ints [(2, 0); ( 4,-2)], [1=>1; 2=>2]) ] + (exorcise (d 1 (-1) (-2) *** d 2 (-2) (-1)))) ] + + let commutator rep_t i_sum a b i j = + multiply [rep_t a i i_sum; rep_t b i_sum j] + --- multiply [rep_t b i i_sum; rep_t a i_sum j] + + let anti_commutator rep_t i_sum a b i j = + multiply [rep_t a i i_sum; rep_t b i_sum j] + +++ multiply [rep_t b i i_sum; rep_t a i_sum j] + + let trace3 rep_t a b c = + rep_t a (-1) (-2) *** rep_t b (-2) (-3) *** rep_t c (-3) (-1) + + let trace3c rep_t a b c = + third *** + sum [trace3 rep_t a b c; trace3 rep_t b c a; trace3 rep_t c a b] + + let loop3 a b c = + [ (LP.int 1, A.cycle (List.rev [a; b; c])); + (LP.int 1, (a <=> b) @ [?? c]); + (LP.int 1, (b <=> c) @ [?? a]); + (LP.int 1, (c <=> a) @ [?? b]); + (LP.int 1, [a => a; ?? b; ?? c]); + (LP.int 1, [?? a; b => b; ?? c]); + (LP.int 1, [?? a; ?? b; c => c]); + (LP.nc 1, [?? a; ?? b; ?? c]) ] + + let suite_trace = + "trace" >::: + + [ "tr(ttt)" >:: + (fun () -> + assert_equal_vertices (trace3 t 1 2 3) (loop3 1 2 3)); + + "tr(ttt) cyclic 1" >:: + (fun () -> + assert_equal_vertices (trace3 t 1 2 3) (trace3 t 2 3 1)); + + "tr(ttt) cyclic 2" >:: + (fun () -> + assert_equal_vertices (trace3 t 1 2 3) (trace3 t 3 1 2)) ] + + let suite_ghosts = + "ghosts" >::: + + [ "H->gg" >:: + (fun () -> + assert_equal_vertices + (delta8_loop 1 2) + (t 1 (-1) (-2) *** t 2 (-2) (-1))); + + "H->ggg f" >:: + (fun () -> + assert_equal_vertices + (imag *** f 1 2 3) + (trace3c t 1 2 3 --- trace3c t 1 3 2)); + + "H->ggg d" >:: + (fun () -> + assert_equal_vertices + (d 1 2 3) + (trace3c t 1 2 3 +++ trace3c t 1 3 2)); + + "H->ggg f'" >:: + (fun () -> + assert_equal_vertices + (imag *** f 1 2 3) + (t 1 (-3) (-2) *** commutator t (-1) 2 3 (-2) (-3))); + + "H->ggg d'" >:: + (fun () -> + assert_equal_vertices + (d 1 2 3) + (t 1 (-3) (-2) *** anti_commutator t (-1) 2 3 (-2) (-3))); + + "H->ggg cyclic'" >:: + (fun () -> + let trace a b c = + t a (-3) (-2) *** commutator t (-1) b c (-2) (-3) in + assert_equal_vertices (trace 1 2 3) (trace 2 3 1)) ] + + (* FIXME: note the flipped [i], [j], [l], [k]! *) + let tt j i l k = + [ (LP.int 1, [i => l; k => j]); + (LP.over_nc (-1), [i => j; k => l]) ] + + let ff a1 a2 a3 a4 = + [ (LP.int (-1), A.cycle [a1; a2; a3; a4]); + (LP.int ( 1), A.cycle [a2; a1; a3; a4]); + (LP.int ( 1), A.cycle [a1; a2; a4; a3]); + (LP.int (-1), A.cycle [a2; a1; a4; a3]) ] + + let tf j i a b = + [ (LP.imag ( 1), A.chain [i; a; b; j]); + (LP.imag (-1), A.chain [i; b; a; j]) ] + + let suite_ff = + "f*f" >::: + + [ "1" >:: + (fun () -> + assert_equal_vertices + (ff 1 2 3 4) + (f (-1) 1 2 *** f (-1) 3 4)) ] + + let suite_tf = + "t*f" >::: + + [ "1" >:: + (fun () -> + assert_equal_vertices + (tf 1 2 3 4) + (t (-1) 1 2 *** f (-1) 3 4)) ] + + let suite_tt = + "t*t" >::: + + [ "1" >:: + (fun () -> + assert_equal_vertices + (tt 1 2 3 4) + (t (-1) 1 2 *** t (-1) 3 4)) ] + + let trace_comm rep_t a b c = + rep_t a (-3) (-2) *** commutator rep_t (-1) b c (-2) (-3) + + (* FIXME: note the flipped [b], [c]! *) + let t8 a c b = + imag *** f a b c + + let suite_lie = + "Lie algebra relations" >::: + + [ "[t,t]=ift" >:: + (fun () -> + assert_equal_vertices + (imag *** f 1 2 (-1) *** t (-1) 3 4) + (commutator t (-1) 1 2 3 4)); + + "if = tr(t[t,t])" >:: + (fun () -> + assert_equal_vertices + (f 1 2 3) + (f_of_rep t 1 2 3)); + + "[f,f]=-ff" >:: + (fun () -> + assert_equal_vertices + (minus *** f 1 2 (-1) *** f (-1) 3 4) + (commutator f (-1) 1 2 3 4)); + + "f = tr(f[f,f])" >:: + (fun () -> + assert_equal_vertices + (two *** nc *** f 1 2 3) + (trace_comm f 1 2 3)); + + "[t8,t8]=ift8" >:: + (fun () -> + assert_equal_vertices + (imag *** f 1 2 (-1) *** t8 (-1) 3 4) + (commutator t8 (-1) 1 2 3 4)); + + "inf = tr(t8[t8,t8])" >:: + (fun () -> + assert_equal_vertices + (two *** nc *** f 1 2 3) + (f_of_rep t8 1 2 3)); + + "[t6,t6]=ift6" >:: + (fun () -> + assert_equal_vertices + (imag *** f 1 2 (-1) *** t6 (-1) 3 4) + (commutator t6 (-1) 1 2 3 4)); + + "inf = tr(t6[t6,t6])" >:: + (fun () -> + assert_equal_vertices + (nc *** f 1 2 3) + (f_of_rep t6 1 2 3)) ] + + + let prod3 rep_t a b c i j = + rep_t a i (-1) *** rep_t b (-1) (-2) *** rep_t c (-2) j + + let jacobi1 rep_t a b c i j = + (prod3 rep_t a b c i j --- prod3 rep_t a c b i j) + --- (prod3 rep_t b c a i j --- prod3 rep_t c b a i j) + + let jacobi rep_t = + sum [jacobi1 rep_t 1 2 3 4 5; + jacobi1 rep_t 2 3 1 4 5; + jacobi1 rep_t 3 1 2 4 5] + + let suite_jacobi = + "Jacobi identities" >::: + + [ "fund." >:: (fun () -> assert_equal_vertices null (jacobi t)); + "adj." >:: (fun () -> assert_equal_vertices null (jacobi f)); + "S2" >:: (fun () -> assert_equal_vertices null (jacobi t6)) ] + + (* From \texttt{hep-ph/0611341} for $\mathrm{SU}(N)$ for + the adjoint, symmetric and antisymmetric representations + \begin{subequations} + \begin{align} + C_2(\text{adj}) &= 2N \\ + C_2(S_n) &= \frac{n(N-1)(N+n)}{N} \\ + C_2(A_n) &= \frac{n(N-n)(N+1)}{N} + \end{align} + \end{subequations} + adjusted for our normalization. + In particular + \begin{subequations} + \begin{align} + C_2(\text{fund.}) = C_2(S_1) &= \frac{N^2-1}{N} \\ + C_2(S_2) &= \frac{2(N-1)(N+2)}{N} + = 2 \frac{N^2+N-2}{N} + \end{align} + \end{subequations} *) + + (* $N_C-1/N_C=(N_C^2-1)/N_C$ *) + let cf = LP.ints [(1, 1); (-1, -1)] + + (* $N_C^2-5+4/N_C^2=(N_C^2-1)(N_C^2-4)/N_C^2$ *) + let c3f = LP.ints [(1, 2); (-5, 0); (4, -2)] + + (* $2N_C$ *) + let ca = LP.ints [(2, 1)] + + (* $2N_C+2N_C-4/N_C=2(N_C-1)(N_C+2)/N_C$ *) + let c6 = LP.ints [(2, 1); (2, 0); (-4, -1)] + + let casimir_tt i j = + [(cf, i ==> j)] + + let casimir_ttt i j = + [(c3f, i ==> j)] + + let casimir_ff a b = + [(ca, 1 <=> 2); (LP.int (-2), [1=>1; 2=>2])] + + (* FIXME: normalization and/or symmetrization? *) + let casimir_t6t6 i j = + [(cf, [(i,0) >=>> (j,0); (i,1) >=>> (j,1)])] + + let casimir_t6t6_symmetrized i j = + half *** + [ (c6, [(i,0) >=>> (j,0); (i,1) >=>> (j,1)]); + (c6, [(i,0) >=>> (j,1); (i,1) >=>> (j,0)]) ] + + let suite_casimir = + "Casimir operators" >::: + + [ "t*t" >:: + (* Again, we appear to have the complex conjugate + (transposed) representation\ldots *) + (fun () -> + assert_equal_vertices + (casimir_tt 2 1) + (t (-1) (-2) 2 *** t (-1) 1 (-2))); + + "t*t*t" >:: + (fun () -> + assert_equal_vertices + (casimir_ttt 2 1) + (d (-1) (-2) (-3) *** + t (-1) 1 (-4) *** t (-2) (-4) (-5) *** t (-3) (-5) 2)); + + "f*f" >:: + (fun () -> + assert_equal_vertices + (casimir_ff 1 2) + (minus *** f (-1) 1 (-2) *** f (-1) (-2) 2)); + + "t6*t6" >:: + (fun () -> + assert_equal_vertices + (casimir_t6t6 2 1) + (t6 (-1) (-2) 2 *** t6 (-1) 1 (-2))) ] + + let suite_colorsums = + "(squared) color sums" >::: + + [ "gluon normalization" >:: + (fun () -> + assert_equal_vertices + (delta8 1 2) + (delta8 1 (-1) *** gluon (-1) (-2) *** delta8 (-2) 2)); + + "f*f" >:: + (fun () -> + let sum_ff = + multiply [ f (-11) (-12) (-13); + f (-21) (-22) (-23); + gluon (-11) (-21); + gluon (-12) (-22); + gluon (-13) (-23) ] + and expected = ints [(2, 3); (-2, 1)] in + assert_equal_vertices expected sum_ff); + + "d*d" >:: + (fun () -> + let sum_dd = + multiply [ d (-11) (-12) (-13); + d (-21) (-22) (-23); + gluon (-11) (-21); + gluon (-12) (-22); + gluon (-13) (-23) ] + and expected = ints [(2, 3); (-10, 1); (8, -1)] in + assert_equal_vertices expected sum_dd); + + "f*d" >:: + (fun () -> + let sum_fd = + multiply [ f (-11) (-12) (-13); + d (-21) (-22) (-23); + gluon (-11) (-21); + gluon (-12) (-22); + gluon (-13) (-23) ] in + assert_equal_vertices null sum_fd); + + "Hgg" >:: + (fun () -> + let sum_hgg = + multiply [ delta8_loop (-11) (-12); + delta8_loop (-21) (-22); + gluon (-11) (-21); + gluon (-12) (-22) ] + and expected = ints [(1, 2); (-1, 0)] in + assert_equal_vertices expected sum_hgg) ] + + let suite = + "Color.SU3" >::: + [suite_sum; + suite_diff; + suite_times; + suite_normalization; + suite_ghosts; + suite_loops; + suite_trace; + suite_ff; + suite_tf; + suite_tt; + suite_lie; + suite_jacobi; + suite_casimir; + suite_colorsums] + + end + + end + +module U3 : SU3 = + struct + + module A = Arrow + open Arrow.BinOps + + module B = Birdtracks + type t = B.t + let to_string = B.to_string + let pp = B.pp + let trivial = B.trivial + let is_null = B.is_null + let null = B.null + let unit = B.unit + let const = B.const + let two = B.two + let half = B.half + let third = B.third + let nc = B.imag + let minus = B.minus + let imag = B.imag + let ints = B.ints + let sum = B.sum + let diff = B.diff + let scale = B.scale + let times = B.times + let multiply = B.multiply + let map = B.map + let fuse = B.fuse + let f_of_rep = B.f_of_rep + let d_of_rep = B.d_of_rep + module BinOps = B.BinOps + + let delta3 i j = + [(LP.int 1, i ==> j)] + + let delta8 a b = + [(LP.int 1, a <=> b)] + + let delta8_loop = delta8 + + let gluon a b = + delta8 a b + +(* \begin{dubious} + Do we need to introduce an + index \emph{pair} for each sextet index? Is that all? + \end{dubious} *) + + let sextet n m = + [ (LP.fraction 2, [(n, 0) >=>> (m, 0); (n, 1) >=>> (m, 1)]); + (LP.fraction 2, [(n, 0) >=>> (m, 1); (n, 1) >=>> (m, 0)]) ] + + let t a j i = + [ (LP.int 1, [i => a; a => j]) ] + + let f a b c = + [ (LP.imag ( 1), A.cycle [a; b; c]); + (LP.imag (-1), A.cycle [a; c; b]) ] + + let d a b c = + [ (LP.int 1, A.cycle [a; b; c]); + (LP.int 1, A.cycle [a; c; b]) ] + + let incomplete tensor = + failwith ("Color.Vertex: " ^ tensor ^ " not supported yet!") + + let experimental tensor = + Printf.eprintf + "Color.Vertex: %s support still experimental and untested!\n" + tensor + + let epsilon i j k = incomplete "epsilon-tensor" + let epsilonbar i j k = incomplete "epsilon-tensor" + + let t6 a m n = + experimental "t6-tensor"; + [ (LP.int ( 1), [(n, 0) >=> a; a =>> (m, 0); (n, 1) >=>> (m, 1)]) ] + + (* \begin{dubious} + How much symmetrization is required? + \end{dubious} *) + + let t6_symmetrized a m n = + experimental "t6-tensor"; + [ (LP.int ( 1), [(n, 0) >=> a; a =>> (m, 0); (n, 1) >=>> (m, 1)]); + (LP.int ( 1), [(n, 1) >=> a; a =>> (m, 0); (n, 0) >=>> (m, 1)]) ] + + let k6 m i j = + experimental "k6-tensor"; + [ (LP.int 1, [(m, 0) >=> i; (m, 1) >=> j]); + (LP.int 1, [(m, 1) >=> i; (m, 0) >=> j]) ] + + let k6bar m i j = + experimental "k6-tensor"; + [ (LP.int 1, [i =>> (m, 0); j =>> (m, 1)]); + (LP.int 1, [i =>> (m, 1); j =>> (m, 0)]) ] + + (* \thocwmodulesubsection{Unit Tests} *) + + module Test : Test = + struct + + open OUnit + open Birdtracks + open BinOps + + let suite_lie = + "Lie algebra relations" >::: + + [ "if = tr(t[t,t])" >:: + (fun () -> assert_equal_vertices (f 1 2 3) (f_of_rep t 1 2 3)) ] + + (* $N_C=N_C^2/N_C$ *) + let cf = LP.ints [(1, 1)] + + let casimir_tt i j = + [(cf, i ==> j)] + + let suite_casimir = + "Casimir operators" >::: + + [ "t*t" >:: + (fun () -> + assert_equal_vertices + (casimir_tt 2 1) + (t (-1) (-2) 2 *** t (-1) 1 (-2))) ] + + let suite = + "Color.U3" >::: + [suite_lie; + suite_casimir] + + end + + end + +module Vertex = SU3 Index: trunk/omega/src/product.ml =================================================================== --- trunk/omega/src/product.ml (revision 8274) +++ trunk/omega/src/product.ml (revision 8275) @@ -1,124 +1,148 @@ (* product.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Lists} *) (* We use the tail recursive [List.fold_left] over [List.fold_right] for efficiency, but revert the argument lists in order to preserve lexicographic ordering. The argument lists are much shorter than the results, so the cost of the [List.rev] is negligible. *) let fold2_rev f l1 l2 acc = List.fold_left (fun acc1 x1 -> List.fold_left (fun acc2 x2 -> f x1 x2 acc2) acc1 l2) acc l1 let fold2 f l1 l2 acc = fold2_rev f (List.rev l1) (List.rev l2) acc let fold3_rev f l1 l2 l3 acc = List.fold_left (fun acc1 x1 -> fold2 (f x1) l2 l3 acc1) acc l1 let fold3 f l1 l2 l3 acc = fold3_rev f (List.rev l1) (List.rev l2) (List.rev l3) acc (* If all lists have the same type, there's also *) let rec fold_rev f ll acc = match ll with | [] -> acc | [l] -> List.fold_left (fun acc' x -> f [x] acc') acc l | l :: rest -> List.fold_left (fun acc' x -> fold_rev (fun xr -> f (x::xr)) rest acc') acc l let fold f ll acc = fold_rev f (List.map List.rev ll) acc let list2 op l1 l2 = fold2 (fun x1 x2 c -> op x1 x2 :: c) l1 l2 [] let list3 op l1 l2 l3 = fold3 (fun x1 x2 x3 c -> op x1 x2 x3 :: c) l1 l2 l3 [] let list op ll = fold (fun l c -> op l :: c) ll [] +let list2_opt op l1 l2 = + fold2 + (fun x1 x2 c -> + match op x1 x2 with + | None -> c + | Some op_x1_x2 -> op_x1_x2 :: c) + l1 l2 [] + +let list3_opt op l1 l2 l3 = + fold3 + (fun x1 x2 x3 c -> + match op x1 x2 x3 with + | None -> c + | Some op_x1_x2_x3 -> op_x1_x2_x3 :: c) + l1 l2 l3 [] + +let list_opt op ll = + fold + (fun l c -> + match op l with + | None -> c + | Some op_l -> op_l :: c) + ll [] + let power n l = list (fun x -> x) (ThoList.clone n l) (* Reshuffling lists: \begin{equation} \lbrack \lbrack a_1;\ldots;a_k \rbrack; \lbrack b_1;\ldots;b_k \rbrack; \lbrack c_1;\ldots;c_k \rbrack; \ldots\rbrack \rightarrow \lbrack \lbrack a_1;b_1;c_1;\ldots\rbrack; \lbrack a_2;b_2;c_2;\ldots\rbrack; \ldots\rbrack \end{equation} *) (*i JR/WK let thread l = List.map List.rev (List.fold_left (fun i acc -> List.map2 (fun a b -> b::a) i acc) (List.map (fun i -> [i]) (List.hd l)) (List.tl l)) i*) (* \begin{dubious} [tho:] Is this really an optimal implementation? \end{dubious} *) let thread = function | head :: tail -> List.map List.rev (List.fold_left (fun i acc -> List.map2 (fun a b -> b::a) i acc) (List.map (fun i -> [i]) head) tail) | [] -> [] (* \thocwmodulesection{Sets} *) (* The implementation is amazingly simple: *) type 'a set type ('a, 'a_set, 'b) fold = ('a -> 'b -> 'b) -> 'a_set -> 'b -> 'b type ('a, 'a_set, 'b, 'b_set, 'c) fold2 = ('a -> 'b -> 'c -> 'c) -> 'a_set -> 'b_set -> 'c -> 'c let outer fold1 fold2 f l1 l2 = fold1 (fun x1 -> fold2 (f x1) l2) l1 let outer_self fold f l1 l2 = fold (fun x1 -> fold (f x1) l2) l1 (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/modellib_SM.ml =================================================================== --- trunk/omega/src/modellib_SM.ml (revision 8274) +++ trunk/omega/src/modellib_SM.ml (revision 8275) @@ -1,2903 +1,2910 @@ (* modellib_SM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner Fabian Bach (only parts of this file) So Young Shim (only parts of this file) WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{$\phi^3$} *) module Phi3 = struct open Coupling let options = Options.empty type flavor = Phi let external_flavors () = [ "", [Phi]] let flavors () = ThoList.flatmap snd (external_flavors ()) type gauge = unit type constant = G type orders = unit let orders = function | _ -> () let lorentz _ = Scalar let color _ = Color.Singlet + let nc () = 0 let propagator _ = Prop_Scalar let width _ = Timelike let goldstone _ = None let conjugate f = f let fermion _ = 0 module Ch = Charges.Null let charges _ = () module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let vertices () = ([(Phi, Phi, Phi), Scalar_Scalar_Scalar 1, G], [], []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 3 let parameters () = { input = [G, 1.0]; derived = []; derived_arrays = [] } let flavor_of_string = function | "p" -> Phi | _ -> invalid_arg "Modellib.Phi3.flavor_of_string" let flavor_to_string Phi = "phi" let flavor_to_TeX Phi = "\\phi" let flavor_symbol Phi = "phi" let gauge_symbol () = failwith "Modellib.Phi3.gauge_symbol: internal error" let pdg _ = 1 let mass_symbol _ = "m" let width_symbol _ = "w" let constant_symbol G = "g" end (* \thocwmodulesection{$\lambda_3\phi^3+\lambda_4\phi^4$} *) module Phi4 = struct open Coupling let options = Options.empty type flavor = Phi let external_flavors () = [ "", [Phi]] let flavors () = ThoList.flatmap snd (external_flavors ()) type gauge = unit type constant = G3 | G4 type orders = unit let orders = function | _ -> () let lorentz _ = Scalar let color _ = Color.Singlet + let nc () = 0 let propagator _ = Prop_Scalar let width _ = Timelike let goldstone _ = None let conjugate f = f let fermion _ = 0 module Ch = Charges.Null let charges _ = () module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let vertices () = ([(Phi, Phi, Phi), Scalar_Scalar_Scalar 1, G3], [(Phi, Phi, Phi, Phi), Scalar4 1, G4], []) let fuse2 _ = failwith "Modellib.Phi4.fuse2" let fuse3 _ = failwith "Modellib.Phi4.fuse3" let fuse = function | [] | [_] -> invalid_arg "Modellib.Phi4.fuse" | [_; _] -> [Phi, V3 (Scalar_Scalar_Scalar 1, F23, G3)] | [_; _; _] -> [Phi, V4 (Scalar4 1, F234, G4)] | _ -> [] let max_degree () = 4 let parameters () = { input = [G3, 1.0; G4, 1.0]; derived = []; derived_arrays = [] } let flavor_of_string = function | "p" -> Phi | _ -> invalid_arg "Modellib.Phi4.flavor_of_string" let flavor_to_string Phi = "phi" let flavor_to_TeX Phi = "\\phi" let flavor_symbol Phi = "phi" let gauge_symbol () = failwith "Modellib.Phi4.gauge_symbol: internal error" let pdg _ = 1 let mass_symbol _ = "m" let width_symbol _ = "w" let constant_symbol = function | G3 -> "g3" | G4 -> "g4" end (* \thocwmodulesection{Quantum Electro Dynamics} *) module QED = struct open Coupling let options = Options.empty type flavor = | Electron | Positron | Muon | AntiMuon | Tau | AntiTau | Photon let external_flavors () = [ "Leptons", [Electron; Positron; Muon; AntiMuon; Tau; AntiTau]; "Gauge Bosons", [Photon] ] let flavors () = ThoList.flatmap snd (external_flavors ()) type gauge = unit type constant = Q type orders = unit let orders = function | _ -> () let lorentz = function | Electron | Muon | Tau -> Spinor | Positron | AntiMuon | AntiTau -> ConjSpinor | Photon -> Vector let color _ = Color.Singlet + let nc () = 0 let propagator = function | Electron | Muon | Tau -> Prop_Spinor | Positron | AntiMuon | AntiTau -> Prop_ConjSpinor | Photon -> Prop_Feynman let width _ = Timelike let goldstone _ = None let conjugate = function | Electron -> Positron | Positron -> Electron | Muon -> AntiMuon | AntiMuon -> Muon | Tau -> AntiTau | AntiTau -> Tau | Photon -> Photon let fermion = function | Electron | Muon | Tau -> 1 | Positron | AntiMuon | AntiTau -> -1 | Photon -> 0 (* Taking generation numbers makes electric charge redundant. *) module Ch = Charges.ZZ let charges = function | Electron -> [1; 0; 0] | Muon -> [0; 1; 0] | Tau -> [0; 0; 1] | Positron -> [-1;0; 0] | AntiMuon -> [0;-1; 0] | AntiTau -> [0; 0;-1] | Photon -> [0; 0; 0] module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let vertices () = ([(Positron, Photon, Electron), FBF (1, Psibar, V, Psi), Q; (AntiMuon, Photon, Muon), FBF (1, Psibar, V, Psi), Q; (AntiTau, Photon, Tau), FBF (1, Psibar, V, Psi), Q], [], []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 3 let parameters () = { input = [Q, 1.0]; derived = []; derived_arrays = [] } let flavor_of_string = function | "e-" -> Electron | "e+" -> Positron | "m-" -> Muon | "m+" -> AntiMuon | "t-" -> Tau | "t+" -> AntiTau | "A" -> Photon | _ -> invalid_arg "Modellib.QED.flavor_of_string" let flavor_to_string = function | Electron -> "e-" | Positron -> "e+" | Muon -> "m-" | AntiMuon -> "m+" | Tau -> "t-" | AntiTau -> "t+" | Photon -> "A" let flavor_to_TeX = function | Electron -> "e^-" | Positron -> "e^+" | Muon -> "\\mu^-" | AntiMuon -> "\\mu^+" | Tau -> "^\\tau^-" | AntiTau -> "\\tau+^" | Photon -> "\\gamma" let flavor_symbol = function | Electron -> "ele" | Positron -> "pos" | Muon -> "muo" | AntiMuon -> "amu" | Tau -> "tau" | AntiTau -> "ata" | Photon -> "gam" let gauge_symbol () = failwith "Modellib.QED.gauge_symbol: internal error" let pdg = function | Electron -> 11 | Positron -> -11 | Muon -> 13 | AntiMuon -> -13 | Tau -> 15 | AntiTau -> -15 | Photon -> 22 let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Q -> "qlep" end (* \thocwmodulesection{Quantum Chromo Dynamics} *) module QCD = struct open Coupling let options = Options.empty type flavor = | U | Ubar | D | Dbar | C | Cbar | S | Sbar | T | Tbar | B | Bbar | Gl let external_flavors () = [ "Quarks", [U; D; C; S; T; B; Ubar; Dbar; Cbar; Sbar; Tbar; Bbar]; "Gauge Bosons", [Gl]] let flavors () = ThoList.flatmap snd (external_flavors ()) type gauge = unit type constant = Gs | G2 | I_Gs type orders = unit let orders = function | _ -> () let lorentz = function | U | D | C | S | T | B -> Spinor | Ubar | Dbar | Cbar | Sbar | Tbar | Bbar -> ConjSpinor | Gl -> Vector let color = function | U | D | C | S | T | B -> Color.SUN 3 | Ubar | Dbar | Cbar | Sbar | Tbar | Bbar -> Color.SUN (-3) | Gl -> Color.AdjSUN 3 + let nc () = 3 let propagator = function | U | D | C | S | T | B -> Prop_Spinor | Ubar | Dbar | Cbar | Sbar | Tbar | Bbar -> Prop_ConjSpinor | Gl -> Prop_Feynman let width _ = Timelike let goldstone _ = None let conjugate = function | U -> Ubar | D -> Dbar | C -> Cbar | S -> Sbar | T -> Tbar | B -> Bbar | Ubar -> U | Dbar -> D | Cbar -> C | Sbar -> S | Tbar -> T | Bbar -> B | Gl -> Gl let fermion = function | U | D | C | S | T | B -> 1 | Ubar | Dbar | Cbar | Sbar | Tbar | Bbar -> -1 | Gl -> 0 module Ch = Charges.ZZ let charges = function | D -> [1; 0; 0; 0; 0; 0] | U -> [0; 1; 0; 0; 0; 0] | S -> [0; 0; 1; 0; 0; 0] | C -> [0; 0; 0; 1; 0; 0] | B -> [0; 0; 0; 0; 1; 0] | T -> [0; 0; 0; 0; 0; 1] | Dbar -> [-1; 0; 0; 0; 0; 0] | Ubar -> [0; -1; 0; 0; 0; 0] | Sbar -> [0; 0; -1; 0; 0; 0] | Cbar -> [0; 0; 0; -1; 0; 0] | Bbar -> [0; 0; 0; 0; -1; 0] | Tbar -> [0; 0; 0; 0; 0; -1] | Gl -> [0; 0; 0; 0; 0; 0] module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* This is compatible with CD+. *) let color_current = [ ((Dbar, Gl, D), FBF ((-1), Psibar, V, Psi), Gs); ((Ubar, Gl, U), FBF ((-1), Psibar, V, Psi), Gs); ((Cbar, Gl, C), FBF ((-1), Psibar, V, Psi), Gs); ((Sbar, Gl, S), FBF ((-1), Psibar, V, Psi), Gs); ((Tbar, Gl, T), FBF ((-1), Psibar, V, Psi), Gs); ((Bbar, Gl, B), FBF ((-1), Psibar, V, Psi), Gs)] let three_gluon = [ ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let four_gluon = [ ((Gl, Gl, Gl, Gl), gauge4, G2)] let vertices3 = (color_current @ three_gluon) let vertices4 = four_gluon let vertices () = (vertices3, vertices4, []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let parameters () = { input = [Gs, 1.0]; derived = []; derived_arrays = [] } let flavor_of_string = function | "u" -> U | "d" -> D | "c" -> C | "s" -> S | "t" -> T | "b" -> B | "ubar" -> Ubar | "dbar" -> Dbar | "cbar" -> Cbar | "sbar" -> Sbar | "tbar" -> Tbar | "bbar" -> Bbar | "gl" -> Gl | _ -> invalid_arg "Modellib.QCD.flavor_of_string" let flavor_to_string = function | U -> "u" | Ubar -> "ubar" | D -> "d" | Dbar -> "dbar" | C -> "c" | Cbar -> "cbar" | S -> "s" | Sbar -> "sbar" | T -> "t" | Tbar -> "tbar" | B -> "b" | Bbar -> "bbar" | Gl -> "gl" let flavor_to_TeX = function | U -> "u" | Ubar -> "\\bar{u}" | D -> "d" | Dbar -> "\\bar{d}" | C -> "c" | Cbar -> "\\bar{c}" | S -> "s" | Sbar -> "\\bar{s}" | T -> "t" | Tbar -> "\\bar{t}" | B -> "b" | Bbar -> "\\bar{b}" | Gl -> "g" let flavor_symbol = function | U -> "u" | Ubar -> "ubar" | D -> "d" | Dbar -> "dbar" | C -> "c" | Cbar -> "cbar" | S -> "s" | Sbar -> "sbar" | T -> "t" | Tbar -> "tbar" | B -> "b" | Bbar -> "bbar" | Gl -> "gl" let gauge_symbol () = failwith "Modellib.QCD.gauge_symbol: internal error" let pdg = function | D -> 1 | Dbar -> -1 | U -> 2 | Ubar -> -2 | S -> 3 | Sbar -> -3 | C -> 4 | Cbar -> -4 | B -> 5 | Bbar -> -5 | T -> 6 | Tbar -> -6 | Gl -> 21 let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | I_Gs -> "(0,1)*gs" | Gs -> "gs" | G2 -> "gs**2" end (* \thocwmodulesection{Complete Minimal Standard Model (Unitarity Gauge)} *) module type SM_flags = sig val higgs_triangle : bool (* $H\gamma\gamma$, $Hg\gamma$ and $Hgg$ couplings *) val higgs_hmm : bool (* $H\mu^+\mu^-$ and $He^+e^-$ couplings *) val triple_anom : bool val quartic_anom : bool val higgs_anom : bool val dim6 : bool val k_matrix : bool val ckm_present : bool val top_anom : bool val top_anom_4f : bool val tt_threshold : bool end module SM_no_anomalous : SM_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = false let quartic_anom = false let higgs_anom = false let dim6 = false let k_matrix = false let ckm_present = false let top_anom = false let top_anom_4f = false let tt_threshold = false end module SM_no_anomalous_ckm : SM_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = false let quartic_anom = false let higgs_anom = false let dim6 = false let k_matrix = false let ckm_present = true let top_anom = false let top_anom_4f = false let tt_threshold = false end module SM_anomalous : SM_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = true let quartic_anom = true let higgs_anom = true let dim6 = false let k_matrix = false let ckm_present = false let top_anom = false let top_anom_4f = false let tt_threshold = false end module SM_anomalous_ckm : SM_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = true let quartic_anom = true let higgs_anom = true let dim6 = false let k_matrix = false let ckm_present = true let top_anom = false let top_anom_4f = false let tt_threshold = false end module SM_k_matrix : SM_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = false let quartic_anom = true let higgs_anom = false let dim6 = false let k_matrix = true let ckm_present = false let top_anom = false let top_anom_4f = false let tt_threshold = false end module SM_Higgs : SM_flags = struct let higgs_triangle = true let higgs_hmm = true let triple_anom = false let quartic_anom = false let higgs_anom = false let dim6 = false let k_matrix = false let ckm_present = false let top_anom = false let top_anom_4f = false let tt_threshold = false end module SM_Higgs_CKM : SM_flags = struct let higgs_triangle = true let higgs_hmm = true let triple_anom = false let quartic_anom = false let higgs_anom = false let dim6 = false let k_matrix = false let ckm_present = true let top_anom = false let top_anom_4f = false let tt_threshold = false end module SM_anomalous_top : SM_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = false let quartic_anom = false let higgs_anom = false let dim6 = false let k_matrix = false let ckm_present = false let top_anom = true let top_anom_4f = true let tt_threshold = false end module SM_tt_threshold : SM_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = false let quartic_anom = false let higgs_anom = false let dim6 = false let k_matrix = false let ckm_present = true let top_anom = false let top_anom_4f = false let tt_threshold = true end module SM_dim6 : SM_flags = struct let higgs_triangle = false let higgs_hmm = false let triple_anom = false let quartic_anom = false let higgs_anom = false let dim6 = true let k_matrix = false let ckm_present = false let top_anom = false let top_anom_4f = false let tt_threshold = false end (* \thocwmodulesection{Complete Minimal Standard Model (including some extensions)} *) module SM (Flags : SM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme" ] type f_aux_top = TTGG | TBWA | TBWZ | TTWW | BBWW | TCGG | TUGG (*i top auxiliary field "flavors" i*) | QGUG | QBUB | QW | DL | DR | QUQD1L | QUQD1R | QUQD8L | QUQD8R type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | H | Aux_top of int*int*int*bool*f_aux_top (*i lorentz*color*charge*top-side*flavor i*) type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Modellib.SM.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let rec aux_top_flavors (f,l,co,ch) = List.append ( List.map other [ Aux_top (l,co,ch/2,true,f); Aux_top (l,co,ch/2,false,f) ] ) ( if ch > 1 then List.append ( List.map other [ Aux_top (l,co,-ch/2,true,f); Aux_top (l,co,-ch/2,false,f) ] ) ( aux_top_flavors (f,l,co,(ch-2)) ) else [] ) let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Higgs", List.map other [H]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = List.append ( ThoList.flatmap snd (external_flavors ()) ) ( ThoList.flatmap aux_top_flavors [ (TTGG,2,1,1); (TCGG,2,1,1); (TUGG,2,1,1); (TBWA,2,0,2); (TBWZ,2,0,2); (TTWW,2,0,1); (BBWW,2,0,1); (QGUG,1,1,1); (QBUB,1,0,1); (QW,1,0,3); (DL,0,0,3); (DR,0,0,3); (QUQD1L,0,0,3); (QUQD1R,0,0,3); (QUQD8L,0,1,3); (QUQD8R,0,1,3) ] ) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz_aux = function | 2 -> Tensor_1 | 1 -> Vector | 0 -> Scalar | _ -> invalid_arg ("SM.lorentz_aux: wrong value") let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> begin match f with | Aux_top (l,_,_,_,_) -> lorentz_aux l | _ -> Scalar end let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | O (Aux_top (_,co,_,_,_)) -> if co == 0 then Color.Singlet else Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let prop_aux = function | 2 -> Aux_Tensor_1 | 1 -> Aux_Vector | 0 -> Aux_Scalar | _ -> invalid_arg ("SM.prop_aux: wrong value") let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H -> Prop_Scalar | Aux_top (l,_,_,_,_) -> prop_aux l end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) -> Fudged | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | Aux_top (l,co,ch,n,f) -> Aux_top (l,co,(-ch),(not n),f) end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 (* Electrical charge, lepton number, baryon number. We could avoid the rationals altogether by multiplying the first and last by 3 \ldots *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("SM.generation': " ^ string_of_int n) (* Generation is not a good quantum number for models with flavor mixing, i.e. if CKM mixing is present. Also, for the FCNC vertices implemented in the SM variant with anomalous top couplings it is not a valid symmetry. *) let generation f = if (Flags.ckm_present || Flags.top_anom) then [] else match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Phi0 -> 0//1 | Phip -> 1//1 | Phim -> -1//1 | Aux_top (_,_,ch,_,_) -> ch//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Half | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | I_G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_CCQ of int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_TVA_ttA | G_TVA_bbA | G_TVA_tuA | G_TVA_tcA | G_TVA_tcZ | G_TVA_tuZ | G_TVA_bbZ | G_VLR_ttZ | G_TVA_ttZ | G_VLR_tcZ | G_VLR_tuZ | VA_ILC_ttA | VA_ILC_ttZ | G_VLR_btW | G_VLR_tbW | G_TLR_btW | G_TRL_tbW | G_TLR_btWZ | G_TRL_tbWZ | G_TLR_btWA | G_TRL_tbWA | G_TVA_ttWW | G_TVA_bbWW | G_TVA_ttG | G_TVA_ttGG | G_TVA_tcG | G_TVA_tcGG | G_TVA_tuG | G_TVA_tuGG | G_SP_ttH | G_VLR_qGuG | G_VLR_qBuB | G_VLR_qBuB_u | G_VLR_qBuB_d | G_VLR_qBuB_e | G_VL_qBuB_n | G_VL_qW | G_VL_qW_u | G_VL_qW_d | G_SL_DttR | G_SR_DttR | G_SL_DttL | G_SLR_DbtR | G_SL_DbtL | C_quqd1R_bt | C_quqd1R_tb | C_quqd1L_bt | C_quqd1L_tb | C_quqd8R_bt | C_quqd8R_tb | C_quqd8L_bt | C_quqd8L_tb | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | I_G1_AWW | I_G1_ZWW | I_G1_plus_kappa_plus_G4_AWW | I_G1_plus_kappa_plus_G4_ZWW | I_G1_plus_kappa_minus_G4_AWW | I_G1_plus_kappa_minus_G4_ZWW | I_G1_minus_kappa_plus_G4_AWW | I_G1_minus_kappa_plus_G4_ZWW | I_G1_minus_kappa_minus_G4_AWW | I_G1_minus_kappa_minus_G4_ZWW | I_lambda_AWW | I_lambda_ZWW | G5_AWW | G5_ZWW | I_kappa5_AWW | I_kappa5_ZWW | I_lambda5_AWW | I_lambda5_ZWW | Alpha_WWWW0 | Alpha_ZZWW1 | Alpha_WWWW2 | Alpha_ZZWW0 | Alpha_ZZZZ | D_Alpha_ZZWW0_S | D_Alpha_ZZWW0_T | D_Alpha_ZZWW1_S | D_Alpha_ZZWW1_T | D_Alpha_ZZWW1_U | D_Alpha_WWWW0_S | D_Alpha_WWWW0_T | D_Alpha_WWWW0_U | D_Alpha_WWWW2_S | D_Alpha_WWWW2_T | D_Alpha_ZZZZ_S | D_Alpha_ZZZZ_T | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_Htt | G_Hbb | G_Hcc | G_Hmm | G_Hee | G_Htautau | G_H3 | G_H4 | G_HGaZ | G_HGaGa | G_Hgg | G_HGaZ_anom | G_HGaGa_anom | G_HZZ_anom | G_HWW_anom | G_HGaZ_u | G_HZZ_u | G_HWW_u | Gs | I_Gs | G2 | Mass of flavor | Width of flavor | K_Matrix_Coeff of int | K_Matrix_Pole of int | I_Dim6_AWW_Gauge | I_Dim6_AWW_GGG | I_Dim6_AWW_DP | I_Dim6_AWW_DW | I_Dim6_WWZ_W | I_Dim6_WWZ_DPWDW | I_Dim6_WWZ_DW | I_Dim6_WWZ_D (*i | I_Dim6_GGG_G | I_Dim6_GGG_CG i*) | G_HZZ6_V3 | G_HZZ6_D | G_HZZ6_DP | G_HZZ6_PB | G_HWW_6_D | G_HWW_6_DP | G_HGaZ6_D | G_HGaZ6_DP | G_HGaZ6_PB | G_HGaGa6 | Dim6_vev3 | Dim6_Cphi | Anom_Dim6_AAWW_DW | Anom_Dim6_AAWW_W | Anom_Dim6_H4_v2 | Anom_Dim6_H4_P2 | Anom_Dim6_AHWW_DPB | Anom_Dim6_AHWW_DPW | Anom_Dim6_AHWW_DW | Anom_Dim6_HHWW_DW | Anom_Dim6_HHWW_DPW | Anom_Dim6_HWWZ_DW | Anom_Dim6_HWWZ_DDPW | Anom_Dim6_HWWZ_DPW | Anom_Dim6_HWWZ_DPB | Anom_Dim6_AHHZ_D | Anom_Dim6_AHHZ_DP | Anom_Dim6_AHHZ_PB | Anom_Dim6_AZWW_W | Anom_Dim6_AZWW_DWDPW | Anom_Dim6_WWWW_W | Anom_Dim6_WWWW_DWDPW | Anom_Dim6_WWZZ_W | Anom_Dim6_WWZZ_DWDPW | Anom_Dim6_HHAA | Anom_Dim6_HHZZ_D | Anom_Dim6_HHZZ_DP | Anom_Dim6_HHZZ_PB | Anom_Dim6_HHZZ_T (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | Q_lepton | Q_up | Q_down | G_NC_lepton | G_NC_neutrino | G_NC_up | G_NC_down | G_CC | G_CCQ _ | G_Htt | G_H3 | G_Hbb | G_Hcc | G_Htautau | G_Hmm | G_Hee | I_Q_W | I_G_ZWW | I_G1_AWW | I_G1_ZWW | I_G_weak | G_HWW | G_HZZ | G_HWW_u | G_HZZ_u | G_HGaZ_u | G_HWW_anom | G_HZZ_anom | G_HGaZ | G_HGaGa | G_HGaZ_anom | G_HGaGa_anom | Half | Unit | I_G1_plus_kappa_plus_G4_AWW | I_G1_plus_kappa_plus_G4_ZWW | I_G1_minus_kappa_plus_G4_AWW | I_G1_minus_kappa_plus_G4_ZWW | I_G1_plus_kappa_minus_G4_AWW | I_G1_plus_kappa_minus_G4_ZWW | I_G1_minus_kappa_minus_G4_AWW | I_G1_minus_kappa_minus_G4_ZWW | I_kappa5_AWW | I_kappa5_ZWW | G5_AWW | G5_ZWW | I_lambda_AWW | I_lambda_ZWW | I_lambda5_AWW | I_lambda5_ZWW | G_TVA_ttA | G_TVA_bbA | G_TVA_tcA | G_TVA_tuA | G_VLR_ttZ | G_TVA_ttZ | G_VLR_tcZ | G_TVA_tcZ | G_TVA_bbZ | VA_ILC_ttA | VA_ILC_ttZ | G_VLR_tuZ | G_TVA_tuZ | G_VLR_btW | G_VLR_tbW | G_TLR_btW | G_TRL_tbW | G_TLR_btWA | G_TRL_tbWA | G_TLR_btWZ | G_TRL_tbWZ | G_VLR_qBuB | G_VLR_qBuB_u | G_VLR_qBuB_d | G_VLR_qBuB_e | G_VL_qBuB_n | G_VL_qW | G_VL_qW_u | G_VL_qW_d | G_SL_DttR | G_SR_DttR | G_SL_DttL | G_SLR_DbtR | G_SL_DbtL | G_HZZ6_V3 | G_HZZ6_D | G_HZZ6_DP | G_HZZ6_PB | G_HGaZ6_D | G_HGaZ6_DP | G_HGaZ6_PB | G_HWW_6_D | G_HWW_6_DP | G_HGaGa6 | I_Dim6_AWW_Gauge | I_Dim6_AWW_GGG | I_Dim6_AWW_DP | I_Dim6_AWW_DW | I_Dim6_WWZ_W | I_Dim6_WWZ_DPWDW | I_Dim6_WWZ_DW | I_Dim6_WWZ_D (*i | I_Dim6_GGG_G | I_Dim6_GGG_CG i*) | Dim6_vev3 | Dim6_Cphi | Anom_Dim6_H4_v2 | Anom_Dim6_H4_P2 | Anom_Dim6_AAWW_DW | Anom_Dim6_AAWW_W | Anom_Dim6_AHWW_DPB | Anom_Dim6_AHWW_DPW | Anom_Dim6_AHWW_DW | Anom_Dim6_HHWW_DW | Anom_Dim6_HHWW_DPW | Anom_Dim6_HWWZ_DW | Anom_Dim6_HWWZ_DDPW | Anom_Dim6_HWWZ_DPW | Anom_Dim6_HWWZ_DPB | Anom_Dim6_AHHZ_D | Anom_Dim6_AHHZ_DP | Anom_Dim6_AHHZ_PB | Anom_Dim6_AZWW_W | Anom_Dim6_AZWW_DWDPW | Anom_Dim6_WWWW_W | Anom_Dim6_WWWW_DWDPW | Anom_Dim6_WWZZ_W | Anom_Dim6_WWZZ_DWDPW | Anom_Dim6_HHAA | Anom_Dim6_HHZZ_D | Anom_Dim6_HHZZ_DP | Anom_Dim6_HHZZ_PB | Anom_Dim6_HHZZ_T | G_TVA_ttWW | G_TVA_bbWW | G_SP_ttH -> (0,1) | G_HHWW | G_HHZZ | G_H4 | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | Alpha_WWWW0 | Alpha_WWWW2 | Alpha_ZZWW0 | Alpha_ZZWW1 | Alpha_ZZZZ | D_Alpha_WWWW0_S | D_Alpha_WWWW0_T | D_Alpha_WWWW0_U | D_Alpha_WWWW2_S | D_Alpha_WWWW2_T | D_Alpha_ZZWW0_S | D_Alpha_ZZWW0_T | D_Alpha_ZZWW1_S | D_Alpha_ZZWW1_T | D_Alpha_ZZWW1_U | D_Alpha_ZZZZ_S | D_Alpha_ZZZZ_T -> (0,2) | Gs | I_Gs | G_TVA_ttG | G_TVA_ttGG | G_TVA_tcG | G_TVA_tcGG | G_TVA_tuG | G_TVA_tuGG | G_VLR_qGuG | C_quqd1R_bt | C_quqd1R_tb | C_quqd1L_bt | C_quqd1L_tb | C_quqd8R_bt | C_quqd8R_tb | C_quqd8L_bt | C_quqd8L_tb -> (1,0) | G2 | G_Hgg -> (2,0) (* These constants are not used, hence initialized to zero. *) | Sinthw | Sin2thw | Costhw | Pi | Alpha_QED | G_weak | K_Matrix_Coeff _ | K_Matrix_Pole _ | Mass _ | Width _ | Vev | E -> (0,0) (* \begin{dubious} The current abstract syntax for parameter dependencies is admittedly tedious. Later, there will be a parser for a convenient concrete syntax as a part of a concrete syntax for models. But as these examples show, it should include simple functions. \end{dubious} *) (* \begin{subequations} \begin{align} \alpha_{\text{QED}} &= \frac{1}{137.0359895} \\ \sin^2\theta_w &= 0.23124 \end{align} \end{subequations} *) let input_parameters = [ Alpha_QED, 1. /. 137.0359895; Sin2thw, 0.23124; Mass (G Z), 91.187; Mass (M (N 1)), 0.0; Mass (M (L 1)), 0.51099907e-3; Mass (M (N 2)), 0.0; Mass (M (L 2)), 0.105658389; Mass (M (N 3)), 0.0; Mass (M (L 3)), 1.77705; Mass (M (U 1)), 5.0e-3; Mass (M (D 1)), 3.0e-3; Mass (M (U 2)), 1.2; Mass (M (D 2)), 0.1; Mass (M (U 3)), 174.0; Mass (M (D 3)), 4.2 ] (* \begin{subequations} \begin{align} e &= \sqrt{4\pi\alpha} \\ \sin\theta_w &= \sqrt{\sin^2\theta_w} \\ \cos\theta_w &= \sqrt{1-\sin^2\theta_w} \\ g &= \frac{e}{\sin\theta_w} \\ m_W &= \cos\theta_w m_Z \\ v &= \frac{2m_W}{g} \\ g_{CC} = -\frac{g}{2\sqrt2} &= -\frac{e}{2\sqrt2\sin\theta_w} \\ Q_{\text{lepton}} = -q_{\text{lepton}}e &= e \\ Q_{\text{up}} = -q_{\text{up}}e &= -\frac{2}{3}e \\ Q_{\text{down}} = -q_{\text{down}}e &= \frac{1}{3}e \\ \ii q_We = \ii g_{\gamma WW} &= \ii e \\ \ii g_{ZWW} &= \ii g \cos\theta_w \\ \ii g_{WWW} &= \ii g \end{align} \end{subequations} *) (* \begin{dubious} \ldots{} to be continued \ldots{} The quartic couplings can't be correct, because the dimensions are wrong! \begin{subequations} \begin{align} g_{HWW} &= g m_W = 2 \frac{m_W^2}{v}\\ g_{HHWW} &= 2 \frac{m_W^2}{v^2} = \frac{g^2}{2} \\ g_{HZZ} &= \frac{g}{\cos\theta_w}m_Z \\ g_{HHZZ} &= 2 \frac{m_Z^2}{v^2} = \frac{g^2}{2\cos\theta_w} \\ g_{Htt} &= \lambda_t \\ g_{Hbb} &= \lambda_b=\frac{m_b}{m_t}\lambda_t \\ g_{H^3} &= - \frac{3g}{2}\frac{m_H^2}{m_W} = - 3 \frac{m_H^2}{v} g_{H^4} &= - \frac{3g^2}{4} \frac{m_W^2}{v^2} = -3 \frac{m_H^2}{v^2} \end{align} \end{subequations} \end{dubious} *) let derived_parameters = - [ Real E, Sqrt (Prod [Const 4; Atom Pi; Atom Alpha_QED]); + [ Real E, Sqrt (Prod [Integer 4; Atom Pi; Atom Alpha_QED]); Real Sinthw, Sqrt (Atom Sin2thw); - Real Costhw, Sqrt (Diff (Const 1, Atom Sin2thw)); + Real Costhw, Sqrt (Diff (Integer 1, Atom Sin2thw)); Real G_weak, Quot (Atom E, Atom Sinthw); Real (Mass (G Wp)), Prod [Atom Costhw; Atom (Mass (G Z))]; - Real Vev, Quot (Prod [Const 2; Atom (Mass (G Wp))], Atom G_weak); + Real Vev, Quot (Prod [Integer 2; Atom (Mass (G Wp))], Atom G_weak); Real Q_lepton, Atom E; - Real Q_up, Prod [Quot (Const (-2), Const 3); Atom E]; - Real Q_down, Prod [Quot (Const 1, Const 3); Atom E]; - Real G_CC, Neg (Quot (Atom G_weak, Prod [Const 2; Sqrt (Const 2)])); + Real Q_up, Prod [Quot (Integer (-2), Integer 3); Atom E]; + Real Q_down, Prod [Quot (Integer 1, Integer 3); Atom E]; + Real G_CC, Neg (Quot (Atom G_weak, Prod [Integer 2; Sqrt (Integer 2)])); Complex I_Q_W, Prod [I; Atom E]; Complex I_G_weak, Prod [I; Atom G_weak]; Complex I_G_ZWW, Prod [I; Atom G_weak; Atom Costhw] ] (* \begin{equation} - \frac{g}{2\cos\theta_w} \end{equation} *) let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) (* \begin{subequations} \begin{align} - \frac{g}{2\cos\theta_w} g_V &= - \frac{g}{2\cos\theta_w} (T_3 - 2 q \sin^2\theta_w) \\ - \frac{g}{2\cos\theta_w} g_A &= - \frac{g}{2\cos\theta_w} T_3 \end{align} \end{subequations} *) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* \begin{equation} \mathcal{L}_{\textrm{EM}} = - e \sum_i q_i \bar\psi_i\fmslash{A}\psi_i \end{equation} *) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF ((-1), Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF ((-1), Psibar, V, Psi), Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{NC}} = - \frac{g}{2\cos\theta_W} \sum_i \bar\psi_i\fmslash{Z}(g_V^i-g_A^i\gamma_5)\psi_i \end{equation} *) let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents' n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents'' n = List.map mgm [ ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let charged_currents_triv = ThoList.flatmap charged_currents' [1;2;3] @ ThoList.flatmap charged_currents'' [1;2;3] let charged_currents_ckm = let charged_currents_2 n1 n2 = List.map mgm [ ((D (-n1), Wm, U n2), FBF (1, Psibar, VL, Psi), G_CCQ (n2,n1)); ((U (-n1), Wp, D n2), FBF (1, Psibar, VL, Psi), G_CCQ (n1,n2)) ] in ThoList.flatmap charged_currents' [1;2;3] @ List.flatten (Product.list2 charged_currents_2 [1;2;3] [1;2;3]) let yukawa = [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, S, Psi), G_Htt); ((M (D (-3)), O H, M (D 3)), FBF (1, Psibar, S, Psi), G_Hbb); ((M (U (-2)), O H, M (U 2)), FBF (1, Psibar, S, Psi), G_Hcc); ((M (L (-3)), O H, M (L 3)), FBF (1, Psibar, S, Psi), G_Htautau) ] @ if Flags.higgs_hmm then [ ((M (L (-2)), O H, M (L 2)), FBF (1, Psibar, S, Psi), G_Hmm); ((M (L (-1)), O H, M (L 1)), FBF (1, Psibar, S, Psi), G_Hee) ] else [] (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let standard_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] (* \begin{multline} \mathcal{L}_{\textrm{TGC}}(g_1,\kappa) = g_1 \mathcal{L}_T(V,W^+,W^-) \\ + \frac{\kappa+g_1}{2} \Bigl(\mathcal{L}_T(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr)\\ + \frac{\kappa-g_1}{2} \Bigl(\mathcal{L}_L(W^-,V,W^+) - \mathcal{L}_T(W^+,V,W^-)\Bigr) \end{multline} *) (* \begin{dubious} The whole thing in the LEP2 workshop notation: \begin{multline} \ii\mathcal{L}_{\textrm{TGC},V} / g_{WWV} = \\ g_1^V V^\mu (W^-_{\mu\nu}W^{+,\nu}-W^+_{\mu\nu}W^{-,\nu}) + \kappa_V W^+_\mu W^-_\nu V^{\mu\nu} + \frac{\lambda_V}{m_W^2} V_{\mu\nu} W^-_{\rho\mu} W^{+,\hphantom{\nu}\rho}_{\hphantom{+,}\nu} \\ + \ii g_5^V \epsilon_{\mu\nu\rho\sigma} \left( (\partial^\rho W^{-,\mu}) W^{+,\nu} - W^{-,\mu}(\partial^\rho W^{+,\nu}) \right) V^\sigma \\ + \ii g_4^V W^-_\mu W^+_\nu (\partial^\mu V^\nu + \partial^\nu V^\mu) - \frac{\tilde\kappa_V}{2} W^-_\mu W^+_\nu \epsilon^{\mu\nu\rho\sigma} V_{\rho\sigma} - \frac{\tilde\lambda_V}{2m_W^2} W^-_{\rho\mu} W^{+,\mu}_{\hphantom{+,\mu}\nu} \epsilon^{\nu\rho\alpha\beta} V_{\alpha\beta} \end{multline} using the conventions of Itzykson and Zuber with $\epsilon^{0123} = +1$. \end{dubious} *) (* \begin{dubious} This is equivalent to the notation of Hagiwara et al.~\cite{HPZH87}, if we remember that they have opposite signs for~$g_{WWV}$: \begin{multline} \mathcal{L}_{WWV} / (-g_{WWV}) = \\ \ii g_1^V \left( W^\dagger_{\mu\nu} W^\mu - W^\dagger_\mu W^\mu_{\hphantom{\mu}\nu} \right) V^\nu + \ii \kappa_V W^\dagger_\mu W_\nu V^{\mu\nu} + \ii \frac{\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} V^{\nu\lambda} \\ - g_4^V W^\dagger_\mu W_\nu \left(\partial^\mu V^\nu + \partial^\nu V^\mu \right) + g_5^V \epsilon^{\mu\nu\lambda\sigma} \left( W^\dagger_\mu \stackrel{\leftrightarrow}{\partial_\lambda} W_\nu \right) V_\sigma\\ + \ii \tilde\kappa_V W^\dagger_\mu W_\nu \tilde{V}^{\mu\nu} + \ii\frac{\tilde\lambda_V}{m_W^2} W^\dagger_{\lambda\mu} W^\mu_{\hphantom{\mu}\nu} \tilde{V}^{\nu\lambda} \end{multline} Here $V^\mu$ stands for either the photon or the~$Z$ field, $W^\mu$ is the $W^-$ field, $W_{\mu\nu} = \partial_\mu W_\nu - \partial_\nu W_\mu$, $V_{\mu\nu} = \partial_\mu V_\nu - \partial_\nu V_\mu$, and $\tilde{V}_{\mu\nu} = \frac{1}{2} \epsilon_{\mu\nu\lambda\sigma} V^{\lambda\sigma}$. \end{dubious} *) let anomalous_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T (-1), I_G1_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_T 1, I_G1_plus_kappa_minus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_T (-1), I_G1_plus_kappa_plus_G4_ZWW); ((Wm, Ga, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_AWW); ((Wm, Z, Wp), Dim4_Vector_Vector_Vector_L (-1), I_G1_minus_kappa_plus_G4_ZWW); ((Wp, Ga, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_AWW); ((Wp, Z, Wm), Dim4_Vector_Vector_Vector_L 1, I_G1_minus_kappa_minus_G4_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_L5 (-1), I_kappa5_ZWW); ((Ga, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_AWW); ((Z, Wm, Wp), Dim4_Vector_Vector_Vector_T5 (-1), G5_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge (-1), I_lambda_ZWW); ((Ga, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_AWW); ((Z, Wp, Wm), Dim6_Gauge_Gauge_Gauge_5 (-1), I_lambda5_ZWW) ] let anomalous_dim6_triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Dim6_Gauge_Gauge_Gauge_i 1, I_Dim6_AWW_GGG); ((Ga, Wm, Wp), Dim6_AWW_DP 1, I_Dim6_AWW_DP); ((Ga, Wm, Wp), Dim6_AWW_DW 1, I_Dim6_AWW_DW); ((Wm, Wp, Z), Dim6_Gauge_Gauge_Gauge_i 1, I_Dim6_WWZ_W); ((Wm, Wp, Z), Dim6_WWZ_DPWDW 1, I_Dim6_WWZ_DPWDW); ((Wm, Wp, Z), Dim6_WWZ_DW 1, I_Dim6_WWZ_DW); ((Wm, Wp, Z), Dim6_WWZ_D 1, I_Dim6_WWZ_D)(*i ; ((G, G, G), Dim6_Glu_Glu_Glu 1, I_Dim6_GGG_G); ((G, G, G), Gauge_Gauge_Gauge_I 1, I_Dim6_GGG_CG) i*) ] let triple_gauge = if Flags.triple_anom then anomalous_triple_gauge else if Flags.dim6 then standard_triple_gauge @ anomalous_dim6_triple_gauge else standard_triple_gauge (* \begin{equation} \mathcal{L}_{\textrm{QGC}} = - g^2 W_{+,\mu} W_{-,\nu} W_+^\mu W_-^\nu + \ldots \end{equation} *) (* Actually, quartic gauge couplings are a little bit more straightforward using auxiliary fields. Here we have to impose the antisymmetry manually: \begin{subequations} \begin{multline} (W^{+,\mu}_1 W^{-,\nu}_2 - W^{+,\nu}_1 W^{-,\mu}_2) (W^+_{3,\mu} W^-_{4,\nu} - W^+_{3,\nu} W^-_{4,\mu}) \\ = 2(W^+_1W^+_3)(W^-_2W^-_4) - 2(W^+_1W^-_4)(W^-_2W^+_3) \end{multline} also ($V$ can be $A$ or $Z$) \begin{multline} (W^{+,\mu}_1 V^\nu_2 - W^{+,\nu}_1 V^\mu_2) (W^-_{3,\mu} V_{4,\nu} - W^-_{3,\nu} V_{4,\mu}) \\ = 2(W^+_1W^-_3)(V_2V_4) - 2(W^+_1V_4)(V_2W^-_3) \end{multline} \end{subequations} *) (* \begin{subequations} \begin{multline} W^{+,\mu} W^{-,\nu} W^+_\mu W^-_\nu \end{multline} \end{subequations} *) let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let standard_quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2 ] (* \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \left( \frac{g^4}{2}\left( (W^+_\mu W^{-,\mu})^2 + W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} \right)\right.\notag \\ &\qquad\qquad\qquad \left. + \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \\ \mathcal{L}_5 &= \alpha_5 \left( g^4 (W^+_\mu W^{-,\mu})^2 + \frac{g^4}{\cos^2\theta_w} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + \frac{g^4}{4\cos^4\theta_w} (Z_\mu Z^\mu)^2 \right) \end{align} \end{subequations} or \begin{multline} \mathcal{L}_4 + \mathcal{L}_5 = (\alpha_4+2\alpha_5) g^4 \frac{1}{2} (W^+_\mu W^{-,\mu})^2 \\ + 2\alpha_4 g^4 \frac{1}{4} W^+_\mu W^{+,\mu} W^-_\mu W^{-,\mu} + \alpha_4 \frac{g^4}{\cos^2\theta_w} W^+_\mu Z^\mu W^-_\nu Z^\nu \\ + 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \frac{1}{2} W^+_\mu W^{-,\mu} Z_\nu Z^\nu + (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \frac{1}{8} (Z_\mu Z^\mu)^2 \end{multline} and therefore \begin{subequations} \begin{align} \alpha_{(WW)_0} &= (\alpha_4+2\alpha_5) g^4 \\ \alpha_{(WW)_2} &= 2\alpha_4 g^4 \\ \alpha_{(WZ)_0} &= 2\alpha_5 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{(WZ)_1} &= \alpha_4 \frac{g^4}{\cos^2\theta_w} \\ \alpha_{ZZ} &= (2\alpha_4 + 2\alpha_5) \frac{g^4}{\cos^4\theta_w} \end{align} \end{subequations} *) let anomalous_quartic_gauge = if Flags.quartic_anom then List.map qgc [ ((Wm, Wm, Wp, Wp), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4 [1, C_12_34], Alpha_WWWW2); ((Wm, Wp, Z, Z), Vector4 [1, C_12_34], Alpha_ZZWW0); ((Wm, Wp, Z, Z), Vector4 [(1, C_13_42); (1, C_14_23)], Alpha_ZZWW1); ((Z, Z, Z, Z), Vector4 [(1, C_12_34); (1, C_13_42); (1, C_14_23)], Alpha_ZZZZ) ] else [] let anomalous_dim6_quartic_gauge = if Flags.dim6 then List.map qgc [ ((Ga, Ga, Wm, Wp), Dim6_Vector4_DW 1, Anom_Dim6_AAWW_DW); ((Ga, Ga, Wm, Wp), Dim6_Vector4_W 1, Anom_Dim6_AAWW_W); ((Ga, Z, Wm, Wp), Dim6_Vector4_W 1, Anom_Dim6_AZWW_W); ((Ga, Z, Wm, Wp), Dim6_Vector4_DW 1, Anom_Dim6_AZWW_DWDPW); ((Wm, Wp, Wm, Wp), Dim6_Vector4_W 1, Anom_Dim6_WWWW_W); ((Wm, Wp, Wm, Wp), Dim6_Vector4_DW 1, Anom_Dim6_WWWW_DWDPW); ((Z, Z, Wm, Wp), Dim6_Vector4_W 1, Anom_Dim6_WWZZ_W); ((Z, Z, Wm, Wp), Dim6_Vector4_DW 1, Anom_Dim6_WWZZ_DWDPW) ] else [] (* In any diagonal channel~$\chi$, the scattering amplitude~$a_\chi(s)$ is unitary iff\footnote{% Trivial proof: \begin{equation} -1 = \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = \frac{\textrm{Im}(a_\chi^*(s))}{ |a_\chi(s)|^2 } = - \frac{\textrm{Im}(a_\chi(s))}{ |a_\chi(s)|^2 } \end{equation} i.\,e.~$\textrm{Im}(a_\chi(s)) = |a_\chi(s)|^2$.} \begin{equation} \textrm{Im}\left(\frac{1}{a_\chi(s)}\right) = -1 \end{equation} For a real perturbative scattering amplitude~$r_\chi(s)$ this can be enforced easily--and arbitrarily--by \begin{equation} \frac{1}{a_\chi(s)} = \frac{1}{r_\chi(s)} - \mathrm{i} \end{equation} *) let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW0_S); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_WWWW0_T); ((Wp, Wm, Wp, Wm), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_WWWW0_U); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_WWWW2_S); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_WWWW2_T); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW0_S); ((Wm, Wp, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZWW0_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42)]), D_Alpha_ZZWW1_T); ((Wm, Z, Wp, Z), Vector4_K_Matrix_jr (0, [(1, C_14_23)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Wp, Z, Z, Wm), Vector4_K_Matrix_jr (1, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_12_34)]), D_Alpha_ZZWW1_S); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_13_42)]), D_Alpha_ZZWW1_U); ((Z, Wp, Wm, Z), Vector4_K_Matrix_jr (2, [(1, C_14_23)]), D_Alpha_ZZWW1_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_12_34)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (0, [(1, C_13_42); (1, C_14_23)]), D_Alpha_ZZZZ_T); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_14_23)]), D_Alpha_ZZZZ_S); ((Z, Z, Z, Z), Vector4_K_Matrix_jr (3, [(1, C_13_42); (1, C_12_34)]), D_Alpha_ZZZZ_T)] else [] (*i Thorsten's original implementation of the K matrix, which we keep since it still might be usefull for the future. let k_matrix_quartic_gauge = if Flags.k_matrix then List.map qgc [ ((Wm, Wp, Wm, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_WWWW0); ((Wm, Wm, Wp, Wp), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 2, K_Matrix_Pole 2]), Alpha_WWWW2); ((Wm, Wp, Z, Z), Vector4_K_Matrix_tho (0, [(K_Matrix_Coeff 0, K_Matrix_Pole 0); (K_Matrix_Coeff 2, K_Matrix_Pole 2)]), Alpha_ZZWW0); ((Wm, Z, Wp, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 1, K_Matrix_Pole 1]), Alpha_ZZWW1); ((Z, Z, Z, Z), Vector4_K_Matrix_tho (0, [K_Matrix_Coeff 0, K_Matrix_Pole 0]), Alpha_ZZZZ) ] else [] i*) let quartic_gauge = standard_quartic_gauge @ anomalous_quartic_gauge @ anomalous_dim6_quartic_gauge @ k_matrix_quartic_gauge let standard_gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ) ] let standard_gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let standard_higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let standard_higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] (* WK's couplings (apparently, he still intends to divide by $\Lambda^2_{\text{EWSB}}=16\pi^2v_{\mathrm{F}}^2$): \begin{subequations} \begin{align} \mathcal{L}^{\tau}_4 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) + \frac{g^2v_{\mathrm{F}}^2}{4} V_{\mu} V^{\mu} \right\rbrack^2 \\ \mathcal{L}^{\tau}_5 &= \left\lbrack (\partial_{\mu}H)(\partial_{\nu}H) + \frac{g^2v_{\mathrm{F}}^2}{4} V_{\mu} V_{\nu} \right\rbrack^2 \end{align} \end{subequations} with \begin{equation} V_{\mu} V_{\nu} = \frac{1}{2} \left( W^+_{\mu} W^-_{\nu} + W^+_{\nu} W^-_{\mu} \right) + \frac{1}{2\cos^2\theta_{w}} Z_{\mu} Z_{\nu} \end{equation} (note the symmetrization!), i.\,e. \begin{subequations} \begin{align} \mathcal{L}_4 &= \alpha_4 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V_{\nu})^2 \\ \mathcal{L}_5 &= \alpha_5 \frac{g^4v_{\mathrm{F}}^4}{16} (V_{\mu} V^{\mu})^2 \end{align} \end{subequations} *) (* Breaking thinks up \begin{subequations} \begin{align} \mathcal{L}^{\tau,H^4}_4 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) \right\rbrack^2 \\ \mathcal{L}^{\tau,H^4}_5 &= \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) \right\rbrack^2 \end{align} \end{subequations} and \begin{subequations} \begin{align} \mathcal{L}^{\tau,H^2V^2}_4 &= \frac{g^2v_{\mathrm{F}}^2}{2} (\partial_{\mu}H)(\partial^{\mu}H) V_{\mu}V^{\mu} \\ \mathcal{L}^{\tau,H^2V^2}_5 &= \frac{g^2v_{\mathrm{F}}^2}{2} (\partial_{\mu}H)(\partial_{\nu}H) V_{\mu}V_{\nu} \end{align} \end{subequations} i.\,e. \begin{subequations} \begin{align} \mathcal{L}^{\tau,H^2V^2}_4 &= \frac{g^2v_{\mathrm{F}}^2}{2} \left\lbrack (\partial_{\mu}H)(\partial^{\mu}H) W^+_{\nu}W^{-,\nu} + \frac{1}{2\cos^2\theta_{w}} (\partial_{\mu}H)(\partial^{\mu}H) Z_{\nu} Z^{\nu} \right\rbrack \\ \mathcal{L}^{\tau,H^2V^2}_5 &= \frac{g^2v_{\mathrm{F}}^2}{2} \left\lbrack (W^{+,\mu}\partial_{\mu}H) (W^{-,\nu}\partial_{\nu}H) + \frac{1}{2\cos^2\theta_{w}} (Z^{\mu}\partial_{\mu}H)(Z^{\nu}\partial_{\nu}H) \right\rbrack \end{align} \end{subequations} *) (* \begin{multline} \tau^4_8 \mathcal{L}^{\tau,H^2V^2}_4 + \tau^5_8 \mathcal{L}^{\tau,H^2V^2}_5 = \\ - \frac{g^2v_{\mathrm{F}}^2}{2} \Biggl\lbrack 2\tau^4_8 \frac{1}{2}(\ii\partial_{\mu}H)(\ii\partial^{\mu}H) W^+_{\nu}W^{-,\nu} + \tau^5_8 (W^{+,\mu}\ii\partial_{\mu}H) (W^{-,\nu}\ii\partial_{\nu}H) \\ + \frac{2\tau^4_8}{\cos^2\theta_{w}} \frac{1}{4} (\ii\partial_{\mu}H)(\ii\partial^{\mu}H) Z_{\nu} Z^{\nu} + \frac{\tau^5_8}{\cos^2\theta_{w}} \frac{1}{2} (Z^{\mu}\ii\partial_{\mu}H)(Z^{\nu}\ii\partial_{\nu}H) \Biggr\rbrack \end{multline} where the two powers of $\ii$ make the sign conveniently negative, i.\,e. \begin{subequations} \begin{align} \alpha_{(\partial H)^2W^2}^2 &= \tau^4_8 g^2v_{\mathrm{F}}^2\\ \alpha_{(\partial HW)^2}^2 &= \frac{\tau^5_8 g^2v_{\mathrm{F}}^2}{2} \\ \alpha_{(\partial H)^2Z^2}^2 &= \frac{\tau^4_8 g^2v_{\mathrm{F}}^2}{\cos^2\theta_{w}} \\ \alpha_{(\partial HZ)^2}^2 &=\frac{\tau^5_8 g^2v_{\mathrm{F}}^2}{2\cos^2\theta_{w}} \end{align} \end{subequations} *) let anomalous_gauge_higgs = [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa_anom; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ_anom; (O H, G Z, G Z), Dim5_Scalar_Gauge2 1, G_HZZ_anom; (O H, G Wp, G Wm), Dim5_Scalar_Gauge2 1, G_HWW_anom; (O H, G Ga, G Z), Dim5_Scalar_Vector_Vector_TU 1, G_HGaZ_u; (O H, G Z, G Z), Dim5_Scalar_Vector_Vector_U 1, G_HZZ_u; (O H, G Wp, G Wm), Dim5_Scalar_Vector_Vector_U 1, G_HWW_u ] let anomalous_dim6_gauge_higgs = [ (O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ6_V3; (O H, G Z, G Z), Dim6_Scalar_Vector_Vector_D 1, G_HZZ6_D; (O H, G Z, G Z), Dim6_Scalar_Vector_Vector_DP 1, G_HZZ6_DP; (O H, G Z, G Z), Scalar_Vector_Vector_t 1, G_HZZ6_PB; (O H, G Ga, G Z), Dim6_HAZ_D 1, G_HGaZ6_D; (O H, G Ga, G Z), Dim6_HAZ_DP 1, G_HGaZ6_DP; (O H, G Ga, G Z), Scalar_Vector_Vector_t 1, G_HGaZ6_PB; (O H, G Ga, G Ga), Scalar_Vector_Vector_t 1, G_HGaGa6; (O H, G Wm, G Wp), Dim6_Scalar_Vector_Vector_D 1, G_HWW_6_D; (O H, G Wm, G Wp), Dim6_Scalar_Vector_Vector_DP 1, G_HWW_6_DP ] let anomalous_gauge_higgs4 = [] let anomalous_dim6_gauge_higgs4 = [(G Ga, O H, G Wm, G Wp), Dim6_AHWW_DPB 1, Anom_Dim6_AHWW_DPB; (G Ga, O H, G Wm, G Wp), Dim6_AHWW_DPW 1, Anom_Dim6_AHWW_DPW; (G Ga, O H, G Wm, G Wp), Dim6_AHWW_DW 1, Anom_Dim6_AHWW_DW; (O H, G Wm, G Wp, G Z), Dim6_HWWZ_DW 1, Anom_Dim6_HWWZ_DW; (O H, G Wm, G Wp, G Z), Dim6_HWWZ_DDPW 1, Anom_Dim6_HWWZ_DDPW; (O H, G Wm, G Wp, G Z), Dim6_HWWZ_DPW 1, Anom_Dim6_HWWZ_DPW; (O H, G Wm, G Wp, G Z), Dim6_HWWZ_DPB 1, Anom_Dim6_HWWZ_DPB; (G Ga, O H, O H, G Z), Dim6_AHHZ_D 1, Anom_Dim6_AHHZ_D; (G Ga, O H, O H, G Z), Dim6_AHHZ_DP 1, Anom_Dim6_AHHZ_DP; (G Ga, O H, O H, G Z), Dim6_AHHZ_PB 1, Anom_Dim6_AHHZ_PB; (O H, O H, G Ga, G Ga), Dim6_Scalar2_Vector2_PB 1, Anom_Dim6_HHAA; (O H, O H, G Wm, G Wp), Dim6_Scalar2_Vector2_D 1, Anom_Dim6_HHWW_DW; (O H, O H, G Wm, G Wp), Dim6_Scalar2_Vector2_DP 1, Anom_Dim6_HHWW_DPW; (O H, O H, G Z, G Z), Dim6_HHZZ_T 1, Anom_Dim6_HHZZ_T; (O H, O H, G Z, G Z), Dim6_Scalar2_Vector2_D 1, Anom_Dim6_HHZZ_D; (O H, O H, G Z, G Z), Dim6_Scalar2_Vector2_DP 1, Anom_Dim6_HHZZ_DP; (O H, O H, G Z, G Z), Dim6_Scalar2_Vector2_PB 1, Anom_Dim6_HHZZ_PB ] let anomalous_higgs = [] let anomalous_dim6_higgs = [(O H, O H, O H), Scalar_Scalar_Scalar 1, Dim6_vev3; (O H, O H, O H), Dim6_HHH 1, Dim6_Cphi ] let higgs_triangle_vertices = if Flags.higgs_triangle then [ (O H, G Ga, G Ga), Dim5_Scalar_Gauge2 1, G_HGaGa; (O H, G Ga, G Z), Dim5_Scalar_Gauge2 1, G_HGaZ; (O H, G Gl, G Gl), Dim5_Scalar_Gauge2 1, G_Hgg ] else [] let anomalous_higgs4 = [] let anomalous_dim6_higgs4 = [(O H, O H, O H, O H), Scalar4 1, Anom_Dim6_H4_v2; (O H, O H, O H, O H), Dim6_H4_P2 1, Anom_Dim6_H4_P2] let gauge_higgs = if Flags.higgs_anom then standard_gauge_higgs @ anomalous_gauge_higgs else if Flags.dim6 then standard_gauge_higgs @ anomalous_dim6_gauge_higgs else standard_gauge_higgs let gauge_higgs4 = if Flags.higgs_anom then standard_gauge_higgs4 @ anomalous_gauge_higgs4 else if Flags.dim6 then standard_gauge_higgs4 @ anomalous_dim6_gauge_higgs4 else standard_gauge_higgs4 let higgs = if Flags.higgs_anom then standard_higgs @ anomalous_higgs else if Flags.dim6 then standard_higgs @ anomalous_dim6_higgs else standard_higgs let higgs4 = if Flags.higgs_anom then standard_higgs4 @ anomalous_higgs4 else if Flags.dim6 then standard_higgs4 @ anomalous_dim6_higgs4 else standard_higgs4 let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] (* Anomalous trilinear interactions $f_i f_j V$ and $ttH$: \begin{equation} \Delta\mathcal{L}_{tt\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{t} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) t A_\mu \end{equation} \begin{equation} \Delta\mathcal{L}_{tc\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{t} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) c A_\mu \,\text{+\,h.c.} \end{equation} *) let anomalous_ttA = if Flags.top_anom then [ ((M (U (-3)), G Ga, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttA); ((M (U (-3)), G Ga, M (U 2)), FBF (1, Psibar, TVAM, Psi), G_TVA_tcA); ((M (U (-2)), G Ga, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_tcA); ((M (U (-3)), G Ga, M (U 1)), FBF (1, Psibar, TVAM, Psi), G_TVA_tuA); ((M (U (-1)), G Ga, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_tuA)] else [] let tt_threshold_ttA = if Flags.tt_threshold then [ ((M (U (-3)), G Ga, M (U 3)), FBF (1, Psibar, VAM, Psi), VA_ILC_ttA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bb\gamma} = - e \frac{\upsilon}{\Lambda^2} \bar{b} i\sigma^{\mu\nu} k_\nu (d_V(k^2) + i d_A(k^2) \gamma_5) b A_\mu \end{equation} *) let anomalous_bbA = if Flags.top_anom then [ ((M (D (-3)), G Ga, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbA) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttg} = - g_s \frac{\upsilon}{\Lambda^2} \bar{t}\lambda^a i\sigma^{\mu\nu}k_\nu (d_V(k^2)+id_A(k^2)\gamma_5)tG^a_\mu \end{equation} \begin{equation} \Delta\mathcal{L}_{tcg} = - g_s \frac{\upsilon}{\Lambda^2} \bar{t}\lambda^a i\sigma^{\mu\nu}k_\nu (d_V(k^2)+id_A(k^2)\gamma_5)cG^a_\mu\,\text{+\,h.c.} \end{equation} *) let anomalous_ttG = if Flags.top_anom then [ ((M (U (-3)), G Gl, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttG); ((M (U (-3)), G Gl, M (U 2)), FBF (1, Psibar, TVAM, Psi), G_TVA_tcG); ((M (U (-2)), G Gl, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_tcG); ((M (U (-3)), G Gl, M (U 1)), FBF (1, Psibar, TVAM, Psi), G_TVA_tuG); ((M (U (-1)), G Gl, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_tuG)] else [] (* \begin{equation} \Delta\mathcal{L}_{ttZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{t} \fmslash{Z} (X_L(k^2) P_L + X_R(k^2) P_R) t + \bar{t}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)tZ_\mu\right\rbrack \end{equation} \begin{equation} \Delta\mathcal{L}_{tcZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{t} \fmslash{Z} (X_L(k^2) P_L + X_R(k^2) P_R) c + \bar{t}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)cZ_\mu\right\rbrack \,\text{+\,h.c.} \end{equation} *) let anomalous_ttZ = if Flags.top_anom then [ ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_ttZ); ((M (U (-3)), G Z, M (U 2)), FBF (1, Psibar, VLRM, Psi), G_VLR_tcZ); ((M (U (-2)), G Z, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_tcZ); ((M (U (-3)), G Z, M (U 1)), FBF (1, Psibar, VLRM, Psi), G_VLR_tuZ); ((M (U (-1)), G Z, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_tuZ); ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_ttZ); ((M (U (-2)), G Z, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_tcZ); ((M (U (-3)), G Z, M (U 2)), FBF (1, Psibar, TVAM, Psi), G_TVA_tcZ); ((M (U (-1)), G Z, M (U 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_tuZ); ((M (U (-3)), G Z, M (U 1)), FBF (1, Psibar, TVAM, Psi), G_TVA_tuZ)] else [] let tt_threshold_ttZ = if Flags.tt_threshold then [ ((M (U (-3)), G Z, M (U 3)), FBF (1, Psibar, VAM, Psi), VA_ILC_ttZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbZ} = - \frac{g}{2 c_W} \frac{\upsilon^2}{\Lambda^2} \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_Z} (d_V(k^2)+id_A(k^2)\gamma_5)bZ_\mu \end{equation} *) let anomalous_bbZ = if Flags.top_anom then [ ((M (D (-3)), G Z, M (D 3)), FBF (1, Psibar, TVAM, Psi), G_TVA_bbZ) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbW} = - \frac{g}{\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\fmslash{W}^-(V_L(k^2) P_L+V_R(k^2) P_R) t + \bar{b}\frac{i\sigma^{\mu\nu}k_\nu}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)tW^-_\mu\right\rbrack \,\text{+\,h.c.} \end{equation} *) let anomalous_tbW = if Flags.top_anom then [ ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, VLRM, Psi), G_VLR_tbW); ((M (D (-3)), G Wm, M (U 3)), FBF (1, Psibar, TLRM, Psi), G_TLR_btW); ((M (U (-3)), G Wp, M (D 3)), FBF (1, Psibar, TRLM, Psi), G_TRL_tbW) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttH} = - \frac{1}{\sqrt{2}} \bar{t} (Y_V(k^2)+iY_A(k^2)\gamma_5)t H \end{equation} *) let anomalous_ttH = if Flags.top_anom then [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, SPM, Psi), G_SP_ttH) ] else [] (* quartic fermion-gauge interactions $f_i f_j V_1 V_2$ emerging from gauge-invariant effective operators: \begin{equation} \Delta\mathcal{L}_{ttgg} = - \frac{g_s^2}{2} f_{abc} \frac{\upsilon}{\Lambda^2} \bar{t} \lambda^a \sigma^{\mu\nu} (d_V(k^2)+id_A(k^2)\gamma_5)t G^b_\mu G^c_\nu \end{equation} \begin{equation} \Delta\mathcal{L}_{tcgg} = - \frac{g_s^2}{2} f_{abc} \frac{\upsilon}{\Lambda^2} \bar{t} \lambda^a \sigma^{\mu\nu} (d_V(k^2)+id_A(k^2)\gamma_5)c G^b_\mu G^c_\nu \,\text{+\,h.c.} \end{equation} *) let anomalous_ttGG = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,1,0,true,TTGG)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttGG); ((M (U (-3)), O (Aux_top (2,1,0,true,TCGG)), M (U 2)), FBF (1, Psibar, TVA, Psi), G_TVA_tcGG); ((M (U (-2)), O (Aux_top (2,1,0,true,TCGG)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_tcGG); ((M (U (-3)), O (Aux_top (2,1,0,true,TUGG)), M (U 1)), FBF (1, Psibar, TVA, Psi), G_TVA_tuGG); ((M (U (-1)), O (Aux_top (2,1,0,true,TUGG)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_tuGG); ((O (Aux_top (2,1,0,false,TTGG)), G Gl, G Gl), Aux_Gauge_Gauge 1, I_Gs); ((O (Aux_top (2,1,0,false,TCGG)), G Gl, G Gl), Aux_Gauge_Gauge 1, I_Gs); ((O (Aux_top (2,1,0,false,TUGG)), G Gl, G Gl), Aux_Gauge_Gauge 1, I_Gs)] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWA} = - i\sin\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t A_\mu W^-_\nu \right\rbrack \,\text{+\,h.c.} \end{equation} *) let anomalous_tbWA = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWA)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWA); ((O (Aux_top (2,0,1,false,TBWA)), G Ga, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWA)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWA); ((O (Aux_top (2,0,-1,false,TBWA)), G Wp, G Ga), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{tbWZ} = - i\cos\theta_w \frac{g^2}{2\sqrt{2}} \frac{\upsilon^2}{\Lambda^2}\left\lbrack \bar{b}\frac{\sigma^{\mu\nu}}{m_W} (g_L(k^2)P_L+g_R(k^2)P_R)t Z_\mu W^-_\nu \right\rbrack \,\text{+\,h.c.} \end{equation} *) let anomalous_tbWZ = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,-1,true,TBWZ)), M (U 3)), FBF (1, Psibar, TLR, Psi), G_TLR_btWZ); ((O (Aux_top (2,0,1,false,TBWZ)), G Z, G Wm), Aux_Gauge_Gauge 1, I_G_weak); ((M (U (-3)), O (Aux_top (2,0,1,true,TBWZ)), M (D 3)), FBF (1, Psibar, TRL, Psi), G_TRL_tbWZ); ((O (Aux_top (2,0,-1,false,TBWZ)), G Wp, G Z), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{ttWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{t} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)t W^-_\mu W^+_\nu \end{equation} *) let anomalous_ttWW = if Flags.top_anom then [ ((M (U (-3)), O (Aux_top (2,0,0,true,TTWW)), M (U 3)), FBF (1, Psibar, TVA, Psi), G_TVA_ttWW); ((O (Aux_top (2,0,0,false,TTWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* \begin{equation} \Delta\mathcal{L}_{bbWW} = - i \frac{g^2}{2} \frac{\upsilon^2}{\Lambda^2} \bar{b} \frac{\sigma^{\mu\nu}}{m_W} (d_V(k^2)+id_A(k^2)\gamma_5)b W^-_\mu W^+_\nu \end{equation} *) let anomalous_bbWW = if Flags.top_anom then [ ((M (D (-3)), O (Aux_top (2,0,0,true,BBWW)), M (D 3)), FBF (1, Psibar, TVA, Psi), G_TVA_bbWW); ((O (Aux_top (2,0,0,false,BBWW)), G Wm, G Wp), Aux_Gauge_Gauge 1, I_G_weak) ] else [] (* 4-fermion contact terms emerging from operator rewriting: *) let anomalous_top_qGuG_tt = [ ((M (U (-3)), O (Aux_top (1,1,0,true,QGUG)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qGuG) ] let anomalous_top_qGuG_ff n = List.map mom [ ((U (-n), Aux_top (1,1,0,false,QGUG), U n), FBF (1, Psibar, V, Psi), Unit); ((D (-n), Aux_top (1,1,0,false,QGUG), D n), FBF (1, Psibar, V, Psi), Unit) ] let anomalous_top_qGuG = if Flags.top_anom_4f then anomalous_top_qGuG_tt @ ThoList.flatmap anomalous_top_qGuG_ff [1;2;3] else [] let anomalous_top_qBuB_tt = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QBUB)), M (U 3)), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB) ] let anomalous_top_qBuB_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QBUB), U n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_u); ((D (-n), Aux_top (1,0,0,false,QBUB), D n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_d); ((L (-n), Aux_top (1,0,0,false,QBUB), L n), FBF (1, Psibar, VLR, Psi), G_VLR_qBuB_e); ((N (-n), Aux_top (1,0,0,false,QBUB), N n), FBF (1, Psibar, VL, Psi), G_VL_qBuB_n) ] let anomalous_top_qBuB = if Flags.top_anom_4f then anomalous_top_qBuB_tt @ ThoList.flatmap anomalous_top_qBuB_ff [1;2;3] else [] let anomalous_top_qW_tq = [ ((M (U (-3)), O (Aux_top (1,0,0,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (D (-3)), O (Aux_top (1,0,-1,true,QW)), M (U 3)), FBF (1, Psibar, VL, Psi), G_VL_qW); ((M (U (-3)), O (Aux_top (1,0,1,true,QW)), M (D 3)), FBF (1, Psibar, VL, Psi), G_VL_qW) ] let anomalous_top_qW_ff n = List.map mom [ ((U (-n), Aux_top (1,0,0,false,QW), U n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((D (-n), Aux_top (1,0,0,false,QW), D n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((N (-n), Aux_top (1,0,0,false,QW), N n), FBF (1, Psibar, VL, Psi), G_VL_qW_u); ((L (-n), Aux_top (1,0,0,false,QW), L n), FBF (1, Psibar, VL, Psi), G_VL_qW_d); ((D (-n), Aux_top (1,0,-1,false,QW), U n), FBF (1, Psibar, VL, Psi), Half); ((U (-n), Aux_top (1,0,1,false,QW), D n), FBF (1, Psibar, VL, Psi), Half); ((L (-n), Aux_top (1,0,-1,false,QW), N n), FBF (1, Psibar, VL, Psi), Half); ((N (-n), Aux_top (1,0,1,false,QW), L n), FBF (1, Psibar, VL, Psi), Half) ] let anomalous_top_qW = if Flags.top_anom_4f then anomalous_top_qW_tq @ ThoList.flatmap anomalous_top_qW_ff [1;2;3] else [] let anomalous_top_DuDd = if Flags.top_anom_4f then [ ((M (U (-3)), O (Aux_top (0,0,0,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,0,false,DR)), M (U 3)), FBF (1, Psibar, SL, Psi), G_SL_DttR); ((M (D (-3)), O (Aux_top (0,0,0,false,DR)), M (D 3)), FBF (1, Psibar, SR, Psi), G_SR_DttR); ((M (U (-3)), O (Aux_top (0,0,0,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (D (-3)), O (Aux_top (0,0,0,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DttL); ((M (D (-3)), O (Aux_top (0,0,-1,true,DR)), M (U 3)), FBF (1, Psibar, SR, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DR)), M (D 3)), FBF (1, Psibar, SLR, Psi), G_SLR_DbtR); ((M (D (-3)), O (Aux_top (0,0,-1,true,DL)), M (U 3)), FBF (1, Psibar, SL, Psi), Half); ((M (U (-3)), O (Aux_top (0,0,1,false,DL)), M (D 3)), FBF (1, Psibar, SL, Psi), G_SL_DbtL) ] else [] let anomalous_top_quqd1_tq = [ ((M (D (-3)), O (Aux_top (0,0,-1,true,QUQD1R)), M (U 3)), FBF (1, Psibar, SR, Psi), C_quqd1R_bt); ((M (U (-3)), O (Aux_top (0,0, 1,true,QUQD1R)), M (D 3)), FBF (1, Psibar, SL, Psi), C_quqd1R_tb); ((M (D (-3)), O (Aux_top (0,0,-1,true,QUQD1L)), M (U 3)), FBF (1, Psibar, SL, Psi), C_quqd1L_bt); ((M (U (-3)), O (Aux_top (0,0, 1,true,QUQD1L)), M (D 3)), FBF (1, Psibar, SR, Psi), C_quqd1L_tb) ] let anomalous_top_quqd1_ff n = List.map mom [ ((U (-n), Aux_top (0,0, 1,false,QUQD1R), D n), FBF (1, Psibar, SR, Psi), Half); ((D (-n), Aux_top (0,0,-1,false,QUQD1R), U n), FBF (1, Psibar, SL, Psi), Half); ((U (-n), Aux_top (0,0, 1,false,QUQD1L), D n), FBF (1, Psibar, SL, Psi), Half); ((D (-n), Aux_top (0,0,-1,false,QUQD1L), U n), FBF (1, Psibar, SR, Psi), Half) ] let anomalous_top_quqd1 = if Flags.top_anom_4f then anomalous_top_quqd1_tq @ ThoList.flatmap anomalous_top_quqd1_ff [1;2;3] else [] let anomalous_top_quqd8_tq = [ ((M (D (-3)), O (Aux_top (0,1,-1,true,QUQD8R)), M (U 3)), FBF (1, Psibar, SR, Psi), C_quqd8R_bt); ((M (U (-3)), O (Aux_top (0,1, 1,true,QUQD8R)), M (D 3)), FBF (1, Psibar, SL, Psi), C_quqd8R_tb); ((M (D (-3)), O (Aux_top (0,1,-1,true,QUQD8L)), M (U 3)), FBF (1, Psibar, SL, Psi), C_quqd8L_bt); ((M (U (-3)), O (Aux_top (0,1, 1,true,QUQD8L)), M (D 3)), FBF (1, Psibar, SR, Psi), C_quqd8L_tb) ] let anomalous_top_quqd8_ff n = List.map mom [ ((U (-n), Aux_top (0,1, 1,false,QUQD8R), D n), FBF (1, Psibar, SR, Psi), Half); ((D (-n), Aux_top (0,1,-1,false,QUQD8R), U n), FBF (1, Psibar, SL, Psi), Half); ((U (-n), Aux_top (0,1, 1,false,QUQD8L), D n), FBF (1, Psibar, SL, Psi), Half); ((D (-n), Aux_top (0,1,-1,false,QUQD8L), U n), FBF (1, Psibar, SR, Psi), Half) ] let anomalous_top_quqd8 = if Flags.top_anom_4f then anomalous_top_quqd8_tq @ ThoList.flatmap anomalous_top_quqd8_ff [1;2;3] else [] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ (if Flags.ckm_present then charged_currents_ckm else charged_currents_triv) @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ higgs_triangle_vertices @ goldstone_vertices @ tt_threshold_ttA @ tt_threshold_ttZ @ anomalous_ttA @ anomalous_bbA @ anomalous_ttZ @ anomalous_bbZ @ anomalous_tbW @ anomalous_tbWA @ anomalous_tbWZ @ anomalous_ttWW @ anomalous_bbWW @ anomalous_ttG @ anomalous_ttGG @ anomalous_ttH @ anomalous_top_qGuG @ anomalous_top_qBuB @ anomalous_top_qW @ anomalous_top_DuDd @ anomalous_top_quqd1 @ anomalous_top_quqd8) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "H" -> O H | "Aux_t_ttGG0" -> O (Aux_top (2,1, 0,true,TTGG)) | "Aux_ttGG0" -> O (Aux_top (2,1, 0,false,TTGG)) | "Aux_t_tcGG0" -> O (Aux_top (2,1, 0,true,TCGG)) | "Aux_tcGG0" -> O (Aux_top (2,1, 0,false,TCGG)) | "Aux_t_tbWA+" -> O (Aux_top (2,0, 1,true,TBWA)) | "Aux_tbWA+" -> O (Aux_top (2,0, 1,false,TBWA)) | "Aux_t_tbWA-" -> O (Aux_top (2,0,-1,true,TBWA)) | "Aux_tbWA-" -> O (Aux_top (2,0,-1,false,TBWA)) | "Aux_t_tbWZ+" -> O (Aux_top (2,0, 1,true,TBWZ)) | "Aux_tbWZ+" -> O (Aux_top (2,0, 1,false,TBWZ)) | "Aux_t_tbWZ-" -> O (Aux_top (2,0,-1,true,TBWZ)) | "Aux_tbWZ-" -> O (Aux_top (2,0,-1,false,TBWZ)) | "Aux_t_ttWW0" -> O (Aux_top (2,0, 0,true,TTWW)) | "Aux_ttWW0" -> O (Aux_top (2,0, 0,false,TTWW)) | "Aux_t_bbWW0" -> O (Aux_top (2,0, 0,true,BBWW)) | "Aux_bbWW0" -> O (Aux_top (2,0, 0,false,BBWW)) | "Aux_t_qGuG0" -> O (Aux_top (1,1, 0,true,QGUG)) | "Aux_qGuG0" -> O (Aux_top (1,1, 0,false,QGUG)) | "Aux_t_qBuB0" -> O (Aux_top (1,0, 0,true,QBUB)) | "Aux_qBuB0" -> O (Aux_top (1,0, 0,false,QBUB)) | "Aux_t_qW0" -> O (Aux_top (1,0, 0,true,QW)) | "Aux_qW0" -> O (Aux_top (1,0, 0,false,QW)) | "Aux_t_qW+" -> O (Aux_top (1,0, 1,true,QW)) | "Aux_qW+" -> O (Aux_top (1,0, 1,false,QW)) | "Aux_t_qW-" -> O (Aux_top (1,0,-1,true,QW)) | "Aux_qW-" -> O (Aux_top (1,0,-1,false,QW)) | "Aux_t_dL0" -> O (Aux_top (0,0, 0,true,DL)) | "Aux_dL0" -> O (Aux_top (0,0, 0,false,DL)) | "Aux_t_dL+" -> O (Aux_top (0,0, 1,true,DL)) | "Aux_dL+" -> O (Aux_top (0,0, 1,false,DL)) | "Aux_t_dL-" -> O (Aux_top (0,0,-1,true,DL)) | "Aux_dL-" -> O (Aux_top (0,0,-1,false,DL)) | "Aux_t_dR0" -> O (Aux_top (0,0, 0,true,DR)) | "Aux_dR0" -> O (Aux_top (0,0, 0,false,DR)) | "Aux_t_dR+" -> O (Aux_top (0,0, 1,true,DR)) | "Aux_dR+" -> O (Aux_top (0,0, 1,false,DR)) | "Aux_t_dR-" -> O (Aux_top (0,0,-1,true,DR)) | "Aux_dR-" -> O (Aux_top (0,0,-1,false,DR)) | "Aux_t_quqd1L+" -> O (Aux_top (0,0, 1,true,QUQD1L)) | "Aux_quqd1L+" -> O (Aux_top (0,0, 1,false,QUQD1L)) | "Aux_t_quqd1L-" -> O (Aux_top (0,0,-1,true,QUQD1L)) | "Aux_quqd1L-" -> O (Aux_top (0,0,-1,false,QUQD1L)) | "Aux_t_quqd1R+" -> O (Aux_top (0,0, 1,true,QUQD1R)) | "Aux_quqd1R+" -> O (Aux_top (0,0, 1,false,QUQD1R)) | "Aux_t_quqd1R-" -> O (Aux_top (0,0,-1,true,QUQD1R)) | "Aux_quqd1R-" -> O (Aux_top (0,0,-1,false,QUQD1R)) | "Aux_t_quqd8L+" -> O (Aux_top (0,1, 1,true,QUQD8L)) | "Aux_quqd8L+" -> O (Aux_top (0,1, 1,false,QUQD8L)) | "Aux_t_quqd8L-" -> O (Aux_top (0,1,-1,true,QUQD8L)) | "Aux_quqd8L-" -> O (Aux_top (0,1,-1,false,QUQD8L)) | "Aux_t_quqd8R+" -> O (Aux_top (0,1, 1,true,QUQD8R)) | "Aux_quqd8R+" -> O (Aux_top (0,1, 1,false,QUQD8R)) | "Aux_t_quqd8R-" -> O (Aux_top (0,1,-1,true,QUQD8R)) | "Aux_quqd8R-" -> O (Aux_top (0,1,-1,false,QUQD8R)) | _ -> invalid_arg "Modellib.SM.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Modellib.SM.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Modellib.SM.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib.SM.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib.SM.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "gl" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Aux_top (_,_,ch,n,v) -> "Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | TCGG -> "tcgg" | TUGG -> "tugg" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" | QUQD1L -> "quqd1L" | QUQD1R -> "quqd1R" | QUQD8L -> "quqd8L" | QUQD8R -> "quqd8R" end ) ^ ( if ch > 0 then "+" else if ch < 0 then "-" else "0" ) end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Modellib.SM.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Modellib.SM.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Modellib.SM.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Modellib.SM.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "\\phi^+" | Phim -> "\\phi^-" | Phi0 -> "\\phi^0" | H -> "H" | Aux_top (_,_,ch,n,v) -> "\\textnormal{Aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttGG" | TBWA -> "tbWA" | TBWZ -> "tbWZ" | TTWW -> "ttWW" | BBWW -> "bbWW" | TCGG -> "tcgg" | TUGG -> "tugg" | QGUG -> "qGuG" | QBUB -> "qBuB" | QW -> "qW" | DL -> "dL" | DR -> "dR" | QUQD1L -> "quqd1L" | QUQD1R -> "quqd1R" | QUQD8L -> "quqd8L" | QUQD8R -> "quqd8R" end ) ^ ( if ch > 0 then "^+" else if ch < 0 then "^-" else "^0" ) ^ "}" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | Aux_top (_,_,ch,n,v) -> "aux_" ^ (if n then "t_" else "") ^ ( begin match v with | TTGG -> "ttgg" | TBWA -> "tbwa" | TBWZ -> "tbwz" | TTWW -> "ttww" | BBWW -> "bbww" | TCGG -> "tcgg" | TUGG -> "tugg" | QGUG -> "qgug" | QBUB -> "qbub" | QW -> "qw" | DL -> "dl" | DR -> "dr" | QUQD1L -> "quqd1l" | QUQD1R -> "quqd1r" | QUQD8L -> "quqd8l" | QUQD8R -> "quqd8r" end ) ^ "_" ^ ( if ch > 0 then "p" else if ch < 0 then "m" else "0" ) end let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | Aux_top (_,_,ch,t,f) -> let n = begin match f with | QW -> 0 | QUQD1R -> 1 | QUQD1L -> 2 | QUQD8R -> 3 | QUQD8L -> 4 | _ -> 5 end in (602 + 3*n - ch) * ( if t then (1) else (-1) ) end let mass_symbol f = if ( Flags.tt_threshold && (abs (pdg f)) == 6 ) then "ttv_mtpole(p12*p12)" else "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Half -> "half" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | I_G_weak -> "ig" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_TVA_ttA -> "gtva_tta" | G_TVA_bbA -> "gtva_bba" | G_VLR_ttZ -> "gvlr_ttz" | G_TVA_ttZ -> "gtva_ttz" | G_VLR_tcZ -> "gvlr_tcz" | G_TVA_tcZ -> "gtva_tcz" | G_VLR_tuZ -> "gvlr_tuz" | G_TVA_tuZ -> "gtva_tuz" | G_TVA_bbZ -> "gtva_bbz" | G_TVA_tcA -> "gtva_tca" | G_TVA_tuA -> "gtva_tua" | VA_ILC_ttA -> "va_ilc_tta" | VA_ILC_ttZ -> "va_ilc_ttz" | G_VLR_btW -> "gvlr_btw" | G_VLR_tbW -> "gvlr_tbw" | G_TLR_btW -> "gtlr_btw" | G_TRL_tbW -> "gtrl_tbw" | G_TLR_btWA -> "gtlr_btwa" | G_TRL_tbWA -> "gtrl_tbwa" | G_TLR_btWZ -> "gtlr_btwz" | G_TRL_tbWZ -> "gtrl_tbwz" | G_TVA_ttWW -> "gtva_ttww" | G_TVA_bbWW -> "gtva_bbww" | G_TVA_ttG -> "gtva_ttg" | G_TVA_ttGG -> "gtva_ttgg" | G_TVA_tcG -> "gtva_tcg" | G_TVA_tcGG -> "gtva_tcgg" | G_TVA_tuG -> "gtva_tug" | G_TVA_tuGG -> "gtva_tugg" | G_SP_ttH -> "gsp_tth" | G_VLR_qGuG -> "gvlr_qgug" | G_VLR_qBuB -> "gvlr_qbub" | G_VLR_qBuB_u -> "gvlr_qbub_u" | G_VLR_qBuB_d -> "gvlr_qbub_d" | G_VLR_qBuB_e -> "gvlr_qbub_e" | G_VL_qBuB_n -> "gvl_qbub_n" | G_VL_qW -> "gvl_qw" | G_VL_qW_u -> "gvl_qw_u" | G_VL_qW_d -> "gvl_qw_d" | G_SL_DttR -> "gsl_dttr" | G_SR_DttR -> "gsr_dttr" | G_SL_DttL -> "gsl_dttl" | G_SLR_DbtR -> "gslr_dbtr" | G_SL_DbtL -> "gsl_dbtl" | C_quqd1R_bt -> "c_quqd1_1" | C_quqd1R_tb -> "conjg(c_quqd1_1)" | C_quqd1L_bt -> "conjg(c_quqd1_2)" | C_quqd1L_tb -> "c_quqd1_2" | C_quqd8R_bt -> "c_quqd8_1" | C_quqd8R_tb -> "conjg(c_quqd8_1)" | C_quqd8L_bt -> "conjg(c_quqd8_2)" | C_quqd8L_tb -> "c_quqd8_2" | G_CC -> "gcc" | G_CCQ (n1,n2) -> "gccq" ^ string_of_int n1 ^ string_of_int n2 | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | I_G1_AWW -> "ig1a" | I_G1_ZWW -> "ig1z" | I_G1_plus_kappa_plus_G4_AWW -> "ig1pkpg4a" | I_G1_plus_kappa_plus_G4_ZWW -> "ig1pkpg4z" | I_G1_plus_kappa_minus_G4_AWW -> "ig1pkmg4a" | I_G1_plus_kappa_minus_G4_ZWW -> "ig1pkmg4z" | I_G1_minus_kappa_plus_G4_AWW -> "ig1mkpg4a" | I_G1_minus_kappa_plus_G4_ZWW -> "ig1mkpg4z" | I_G1_minus_kappa_minus_G4_AWW -> "ig1mkmg4a" | I_G1_minus_kappa_minus_G4_ZWW -> "ig1mkmg4z" | I_lambda_AWW -> "ila" | I_lambda_ZWW -> "ilz" | G5_AWW -> "rg5a" | G5_ZWW -> "rg5z" | I_kappa5_AWW -> "ik5a" | I_kappa5_ZWW -> "ik5z" | I_lambda5_AWW -> "il5a" | I_lambda5_ZWW -> "il5z" | Alpha_WWWW0 -> "alww0" | Alpha_WWWW2 -> "alww2" | Alpha_ZZWW0 -> "alzw0" | Alpha_ZZWW1 -> "alzw1" | Alpha_ZZZZ -> "alzz" | D_Alpha_ZZWW0_S -> "dalzz0_s(gkm,mkm," | D_Alpha_ZZWW0_T -> "dalzz0_t(gkm,mkm," | D_Alpha_ZZWW1_S -> "dalzz1_s(gkm,mkm," | D_Alpha_ZZWW1_T -> "dalzz1_t(gkm,mkm," | D_Alpha_ZZWW1_U -> "dalzz1_u(gkm,mkm," | D_Alpha_WWWW0_S -> "dalww0_s(gkm,mkm," | D_Alpha_WWWW0_T -> "dalww0_t(gkm,mkm," | D_Alpha_WWWW0_U -> "dalww0_u(gkm,mkm," | D_Alpha_WWWW2_S -> "dalww2_s(gkm,mkm," | D_Alpha_WWWW2_T -> "dalww2_t(gkm,mkm," | D_Alpha_ZZZZ_S -> "dalz4_s(gkm,mkm," | D_Alpha_ZZZZ_T -> "dalz4_t(gkm,mkm," | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Hee -> "ghee" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_Hmm -> "ghmm" | G_HGaZ -> "ghgaz" | G_HGaGa -> "ghgaga" | G_Hgg -> "ghgg" | G_HGaGa_anom -> "ghgaga_ac" | G_HGaZ_anom -> "ghgaz_ac" | G_HZZ_anom -> "ghzz_ac" | G_HWW_anom -> "ghww_ac" | G_HGaZ_u -> "ghgaz_u" | G_HZZ_u -> "ghzz_u" | G_HWW_u -> "ghww_u" | G_H3 -> "gh3" | G_H4 -> "gh4" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f | K_Matrix_Coeff i -> "kc" ^ string_of_int i | K_Matrix_Pole i -> "kp" ^ string_of_int i | G_HZZ6_V3 -> "ghzz6v3" | G_HZZ6_D ->"ghzz6d" | G_HZZ6_DP ->"ghzz6dp" | G_HZZ6_PB ->"ghzz6pb" | G_HGaZ6_D -> "ghaz6d" | G_HGaZ6_DP -> "ghaz6dp" | G_HGaZ6_PB -> "ghaz6pb" | G_HGaGa6 -> "ghgaga6" | G_HWW_6_D -> "ghww6d" | G_HWW_6_DP ->"ghww6dp" | I_Dim6_AWW_Gauge -> "dim6awwgauge" | I_Dim6_AWW_GGG -> "dim6awwggg" | I_Dim6_AWW_DP -> "dim6awwdp" | I_Dim6_AWW_DW -> "dim6awwdw" | I_Dim6_WWZ_W -> "dim6wwzw" | I_Dim6_WWZ_DPWDW -> "dim6wwzdpwdw" | I_Dim6_WWZ_DW -> "dim6wwzdw" | I_Dim6_WWZ_D -> "dim6wwzd" | Dim6_vev3 -> "dim6vev3" | Dim6_Cphi -> "dim6cphi" (*i | I_Dim6_GGG_G -> "dim6gggg" | I_Dim6_GGG_CG -> "dim6gggcg" i*) | Anom_Dim6_H4_v2 -> "adim6h4v2" | Anom_Dim6_H4_P2 -> "adim6h4p2" | Anom_Dim6_AHWW_DPB -> "adim6ahwwdpb" | Anom_Dim6_AHWW_DPW -> "adim6ahwwdpw" | Anom_Dim6_AHWW_DW -> "adim6ahwwdw" | Anom_Dim6_AAWW_DW -> "adim6aawwdw" | Anom_Dim6_AAWW_W -> "adim6aawww" | Anom_Dim6_HHWW_DW -> "adim6hhwwdw" | Anom_Dim6_HHWW_DPW -> "adim6hhwwdpw" | Anom_Dim6_HWWZ_DW -> "adim6hwwzdw" | Anom_Dim6_HWWZ_DDPW -> "adim6hwwzddpw" | Anom_Dim6_HWWZ_DPW -> "adim6hwwzdpw" | Anom_Dim6_HWWZ_DPB -> "adim6hwwzdpb" | Anom_Dim6_AHHZ_D -> "adim6ahhzd" | Anom_Dim6_AHHZ_DP -> "adim6ahhzdp" | Anom_Dim6_AHHZ_PB -> "adim6ahhzpb" | Anom_Dim6_AZWW_W -> "adim6azwww" | Anom_Dim6_AZWW_DWDPW -> "adim6azwwdwdpw" | Anom_Dim6_WWWW_W -> "adim6wwwww" | Anom_Dim6_WWWW_DWDPW -> "adim6wwwwdwdpw" | Anom_Dim6_WWZZ_W -> "adim6wwzzw" | Anom_Dim6_WWZZ_DWDPW -> "adim6wwzzdwdpw" | Anom_Dim6_HHAA -> "adim6hhaa" | Anom_Dim6_HHZZ_D -> "adim6hhzzd" | Anom_Dim6_HHZZ_DP -> "adim6hhzzdp" | Anom_Dim6_HHZZ_PB -> "adim6hhzzpb" | Anom_Dim6_HHZZ_T -> "adim6hhzzt" end (* \thocwmodulesection{Incomplete Standard Model in $R_\xi$ Gauge} *) (* \begin{dubious} At the end of the day, we want a functor mapping from gauge models in unitarity gauge to $R_\xi$ gauge and vice versa. For this, we will need a more abstract implementation of (spontaneously broken) gauge theories. \end{dubious} *) module SM_Rxi = struct open Coupling module SM = SM(SM_no_anomalous) let options = SM.options type flavor = SM.flavor let flavors = SM.flavors let external_flavors = SM.external_flavors (* Later: [type orders = SM.orders] *) type constant = SM.constant (* Later: [let orders = SM.orders] *) let lorentz = SM.lorentz let color = SM.color + let nc = SM.nc let goldstone = SM.goldstone let conjugate = SM.conjugate let fermion = SM.fermion (* \begin{dubious} Check if it makes sense to have separate gauge fixing parameters for each vector boson. There's probably only one independent parameter for each group factor. \end{dubious} *) type gauge = | XiA | XiZ | XiW let gauge_symbol = function | XiA -> "xia" | XiZ -> "xi0" | XiW -> "xipm" (* Change the gauge boson propagators and make the Goldstone bosons propagating. *) let propagator = function | SM.G SM.Ga -> Prop_Gauge XiA | SM.G SM.Z -> Prop_Rxi XiZ | SM.G SM.Wp | SM.G SM.Wm -> Prop_Rxi XiW | SM.O SM.Phip | SM.O SM.Phim | SM.O SM.Phi0 -> Prop_Scalar | f -> SM.propagator f let width = SM.width module Ch = Charges.QQ let charges = SM.charges module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) let vertices = SM.vertices let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 3 let parameters = SM.parameters let flavor_of_string = SM.flavor_of_string let flavor_to_string = SM.flavor_to_string let flavor_to_TeX = SM.flavor_to_TeX let flavor_symbol = SM.flavor_symbol let pdg = SM.pdg let mass_symbol = SM.mass_symbol let width_symbol = SM.width_symbol let constant_symbol = SM.constant_symbol end (* \thocwmodulesection{Groves} *) module Groves (M : Model.Gauge) : Model.Gauge with module Ch = M.Ch = struct let max_generations = 5 let options = M.options type matter_field = M.matter_field * int type gauge_boson = M.gauge_boson type other = M.other type field = | Matter of matter_field | Gauge of gauge_boson | Other of other type flavor = M of matter_field | G of gauge_boson | O of other let matter_field (f, g) = M (f, g) let gauge_boson f = G f let other f = O f let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f let project = function | M (f, _) -> M.matter_field f | G f -> M.gauge_boson f | O f -> M.other f let inject g f = match M.field f with | M.Matter f -> M (f, g) | M.Gauge f -> G f | M.Other f -> O f type gauge = M.gauge let gauge_symbol = M.gauge_symbol let color f = M.color (project f) + let nc () = 3 let pdg f = M.pdg (project f) let lorentz f = M.lorentz (project f) let propagator f = M.propagator (project f) let fermion f = M.fermion (project f) let width f = M.width (project f) let mass_symbol f = M.mass_symbol (project f) let width_symbol f = M.width_symbol (project f) let flavor_symbol f = M.flavor_symbol (project f) type constant = M.constant (* Later: [type orders = M.orders] *) let constant_symbol = M.constant_symbol let max_degree = M.max_degree let parameters = M.parameters (* Later: [let orders = M.orders] *) let conjugate = function | M (_, g) as f -> inject g (M.conjugate (project f)) | f -> inject 0 (M.conjugate (project f)) let read_generation s = try let offset = String.index s '/' in (int_of_string (String.sub s (succ offset) (String.length s - offset - 1)), String.sub s 0 offset) with | Not_found -> (1, s) let format_generation c s = s ^ "/" ^ string_of_int c let flavor_of_string s = let g, s = read_generation s in inject g (M.flavor_of_string s) let flavor_to_string = function | M (_, g) as f -> format_generation g (M.flavor_to_string (project f)) | f -> M.flavor_to_string (project f) let flavor_to_TeX = function | M (_, g) as f -> format_generation g (M.flavor_to_TeX (project f)) | f -> M.flavor_to_TeX (project f) let goldstone = function | G _ as f -> begin match M.goldstone (project f) with | None -> None | Some (f, c) -> Some (inject 0 f, c) end | M _ | O _ -> None let clone generations flavor = match M.field flavor with | M.Matter f -> List.map (fun g -> M (f, g)) generations | M.Gauge f -> [G f] | M.Other f -> [O f] let generations = ThoList.range 1 max_generations let flavors () = ThoList.flatmap (clone generations) (M.flavors ()) let external_flavors () = List.map (fun (s, fl) -> (s, ThoList.flatmap (clone generations) fl)) (M.external_flavors ()) module Ch = M.Ch let charges f = M.charges (project f) module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* In the following functions, we might replace [_] by [(M.Gauge _ | M.Other _)], in order to allow the compiler to check completeness. However, this makes the code much less readable. *) let clone3 ((f1, f2, f3), v, c) = match M.field f1, M.field f2, M.field f3 with | M.Matter _, M.Matter _, M.Matter _ -> invalid_arg "Modellib.Groves().vertices: three matter fields!" | M.Matter f1', M.Matter f2', _ -> List.map (fun g -> ((M (f1', g), M (f2', g), inject 0 f3), v, c)) generations | M.Matter f1', _, M.Matter f3' -> List.map (fun g -> ((M (f1', g), inject 0 f2, M (f3', g)), v, c)) generations | _, M.Matter f2', M.Matter f3' -> List.map (fun g -> ((inject 0 f1, M (f2', g), M (f3', g)), v, c)) generations | M.Matter _, _, _ | _, M.Matter _, _ | _, _, M.Matter _ -> invalid_arg "Modellib.Groves().vertices: lone matter field!" | _, _, _ -> [(inject 0 f1, inject 0 f2, inject 0 f3), v, c] let clone4 ((f1, f2, f3, f4), v, c) = match M.field f1, M.field f2, M.field f3, M.field f4 with | M.Matter _, M.Matter _, M.Matter _, M.Matter _ -> invalid_arg "Modellib.Groves().vertices: four matter fields!" | M.Matter _, M.Matter _, M.Matter _, _ | M.Matter _, M.Matter _, _, M.Matter _ | M.Matter _, _, M.Matter _, M.Matter _ | _, M.Matter _, M.Matter _, M.Matter _ -> invalid_arg "Modellib.Groves().vertices: three matter fields!" | M.Matter f1', M.Matter f2', _, _ -> List.map (fun g -> ((M (f1', g), M (f2', g), inject 0 f3, inject 0 f4), v, c)) generations | M.Matter f1', _, M.Matter f3', _ -> List.map (fun g -> ((M (f1', g), inject 0 f2, M (f3', g), inject 0 f4), v, c)) generations | M.Matter f1', _, _, M.Matter f4' -> List.map (fun g -> ((M (f1', g), inject 0 f2, inject 0 f3, M (f4', g)), v, c)) generations | _, M.Matter f2', M.Matter f3', _ -> List.map (fun g -> ((inject 0 f1, M (f2', g), M (f3', g), inject 0 f4), v, c)) generations | _, M.Matter f2', _, M.Matter f4' -> List.map (fun g -> ((inject 0 f1, M (f2', g), inject 0 f3, M (f4', g)), v, c)) generations | _, _, M.Matter f3', M.Matter f4' -> List.map (fun g -> ((inject 0 f1, inject 0 f2, M (f3', g), M (f4', g)), v, c)) generations | M.Matter _, _, _, _ | _, M.Matter _, _, _ | _, _, M.Matter _, _ | _, _, _, M.Matter _ -> invalid_arg "Modellib.Groves().vertices: lone matter field!" | _, _, _, _ -> [(inject 0 f1, inject 0 f2, inject 0 f3, inject 0 f4), v, c] let clonen (fl, v, c) = match List.map M.field fl with | _ -> failwith "Modellib.Groves().vertices: incomplete" let vertices () = let vertices3, vertices4, verticesn = M.vertices () in (ThoList.flatmap clone3 vertices3, ThoList.flatmap clone4 vertices4, ThoList.flatmap clonen verticesn) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table (* \begin{dubious} The following (incomplete) alternative implementations are included for illustrative purposes only: \end{dubious} *) let injectl g fcl = List.map (fun (f, c) -> (inject g f, c)) fcl let alt_fuse2 f1 f2 = match f1, f2 with | M (f1', g1'), M (f2', g2') -> if g1' = g2' then injectl 0 (M.fuse2 (M.matter_field f1') (M.matter_field f2')) else [] | M (f1', g'), _ -> injectl g' (M.fuse2 (M.matter_field f1') (project f2)) | _, M (f2', g') -> injectl g' (M.fuse2 (project f1) (M.matter_field f2')) | _, _ -> injectl 0 (M.fuse2 (project f1) (project f2)) let alt_fuse3 f1 f2 f3 = match f1, f2, f3 with | M (f1', g1'), M (f2', g2'), M (f3', g3') -> invalid_arg "Modellib.Groves().fuse3: three matter fields!" | M (f1', g1'), M (f2', g2'), _ -> if g1' = g2' then injectl 0 (M.fuse3 (M.matter_field f1') (M.matter_field f2') (project f3)) else [] | M (f1', g1'), _, M (f3', g3') -> if g1' = g3' then injectl 0 (M.fuse3 (M.matter_field f1') (project f2) (M.matter_field f3')) else [] | _, M (f2', g2'), M (f3', g3') -> if g2' = g3' then injectl 0 (M.fuse3 (project f1) (M.matter_field f2') (M.matter_field f3')) else [] | M (f1', g'), _, _ -> injectl g' (M.fuse3 (M.matter_field f1') (project f2) (project f3)) | _, M (f2', g'), _ -> injectl g' (M.fuse3 (project f1) (M.matter_field f2') (project f3)) | _, _, M (f3', g') -> injectl g' (M.fuse3 (project f1) (project f2) (M.matter_field f3')) | _, _, _ -> injectl 0 (M.fuse3 (project f1) (project f2) (project f3)) end (* \thocwmodulesection{MSM With Cloned Families} *) module SM_clones = Groves(SM(SM_no_anomalous)) Index: trunk/omega/src/fusion.ml =================================================================== --- trunk/omega/src/fusion.ml (revision 8274) +++ trunk/omega/src/fusion.ml (revision 8275) @@ -1,2841 +1,3345 @@ (* fusion.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner Marco Sekulla WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) module type T = sig val options : Options.t type wf val conjugate : wf -> wf type flavor type flavor_sans_color val flavor : wf -> flavor val flavor_sans_color : wf -> flavor_sans_color type p val momentum : wf -> p val momentum_list : wf -> int list val wf_tag : wf -> string option type constant type coupling type rhs type 'a children val sign : rhs -> int val coupling : rhs -> constant Coupling.t val coupling_tag : rhs -> string option type exclusions val no_exclusions : exclusions val children : rhs -> wf list type fusion val lhs : fusion -> wf val rhs : fusion -> rhs list type braket val bra : braket -> wf val ket : braket -> rhs list type amplitude type amplitude_sans_color type selectors val amplitudes : bool -> exclusions -> selectors -> flavor_sans_color list -> flavor_sans_color list -> amplitude list val amplitude_sans_color : bool -> exclusions -> selectors -> flavor_sans_color list -> flavor_sans_color list -> amplitude_sans_color val dependencies : amplitude -> wf -> (wf, coupling) Tree2.t val incoming : amplitude -> flavor list val outgoing : amplitude -> flavor list val externals : amplitude -> wf list val variables : amplitude -> wf list val fusions : amplitude -> fusion list val brakets : amplitude -> braket list val on_shell : amplitude -> (wf -> bool) val is_gauss : amplitude -> (wf -> bool) val constraints : amplitude -> string option val symmetry : amplitude -> int val allowed : amplitude -> bool val initialize_cache : string -> unit val set_cache_name : string -> unit val check_charges : unit -> flavor_sans_color list list val count_fusions : amplitude -> int val count_propagators : amplitude -> int val count_diagrams : amplitude -> int val forest : wf -> amplitude -> ((wf * coupling option, wf) Tree.t) list val poles : amplitude -> wf list list val s_channel : amplitude -> wf list val tower_to_dot : out_channel -> amplitude -> unit val amplitude_to_dot : out_channel -> amplitude -> unit val phase_space_channels : out_channel -> amplitude_sans_color -> unit val phase_space_channels_flipped : out_channel -> amplitude_sans_color -> unit end module type Maker = functor (P : Momentum.T) -> functor (M : Model.T) -> T with type p = P.t and type flavor = Colorize.It(M).flavor and type flavor_sans_color = M.flavor and type constant = M.constant and type selectors = Cascade.Make(M)(P).selectors (* \thocwmodulesection{Fermi Statistics} *) module type Stat = sig type flavor type stat exception Impossible val stat : flavor -> int -> stat - val stat_fuse : stat -> stat -> flavor -> stat + val stat_fuse : + Coupling.fermion_lines option -> stat list -> flavor -> stat + val stat_keystone : + Coupling.fermion_lines option -> stat list -> flavor -> stat val stat_sign : stat -> int + (* debugging \ldots *) + val stat_to_string : stat -> string + val equal : stat -> stat -> bool + val complete : stat -> bool end module type Stat_Maker = functor (M : Model.T) -> Stat with type flavor = M.flavor (* \thocwmodulesection{Dirac Fermions} *) +exception Majorana + module Stat_Dirac (M : Model.T) : (Stat with type flavor = M.flavor) = struct type flavor = M.flavor (* \begin{equation} \gamma_\mu\psi(1)\,G^{\mu\nu}\,\bar\psi(2)\gamma_\nu\psi(3) - \gamma_\mu\psi(3)\,G^{\mu\nu}\,\bar\psi(2)\gamma_\nu\psi(1) \end{equation} *) type stat = | Fermion of int * (int option * int option) list | AntiFermion of int * (int option * int option) list | Boson of (int option * int option) list + let lines_to_string lines = + ThoList.to_string + (function + | Some i, Some j -> Printf.sprintf "%d>%d" i j + | Some i, None -> Printf.sprintf "%d>*" i + | None, Some j -> Printf.sprintf "*>%d" j + | None, None -> "*>*") + lines + + let stat_to_string = function + | Boson lines -> Printf.sprintf "Boson %s" (lines_to_string lines) + | Fermion (p, lines) -> + Printf.sprintf "Fermion (%d, %s)" p (lines_to_string lines) + | AntiFermion (p, lines) -> + Printf.sprintf "AntiFermion (%d, %s)" p (lines_to_string lines) + + let equal s1 s2 = + match s1, s2 with + | Boson l1, Boson l2 -> + List.sort compare l1 = List.sort compare l2 + | Fermion (p1, l1), Fermion (p2, l2) + | AntiFermion (p1, l1), AntiFermion (p2, l2) -> + p1 = p2 && List.sort compare l1 = List.sort compare l2 + | _ -> false + + let complete = function + | Boson _ -> true + | _ -> false + let stat f p = - let s = M.fermion f in - if s = 0 then - Boson [] - else if s < 0 then - AntiFermion (p, []) - else (* [if s > 0 then] *) - Fermion (p, []) + match M.fermion f with + | 0 -> Boson [] + | 1 -> Fermion (p, []) + | -1 -> AntiFermion (p, []) + | 2 -> raise Majorana + | _ -> invalid_arg "Fusion.Stat_Dirac: invalid fermion number" exception Impossible - let stat_fuse s1 s2 f = + let stat_fuse_pair_legacy f s1 s2 = match s1, s2 with | Boson l1, Boson l2 -> Boson (l1 @ l2) | Boson l1, Fermion (p, l2) -> Fermion (p, l1 @ l2) | Boson l1, AntiFermion (p, l2) -> AntiFermion (p, l1 @ l2) | Fermion (p, l1), Boson l2 -> Fermion (p, l1 @ l2) | AntiFermion (p, l1), Boson l2 -> AntiFermion (p, l1 @ l2) | AntiFermion (pbar, l1), Fermion (p, l2) -> Boson ((Some pbar, Some p) :: l1 @ l2) | Fermion (p, l1), AntiFermion (pbar, l2) -> Boson ((Some pbar, Some p) :: l1 @ l2) | Fermion _, Fermion _ | AntiFermion _, AntiFermion _ -> raise Impossible + let stat_fuse_legacy s1 s23__n f = + List.fold_right (stat_fuse_pair_legacy f) s23__n s1 + + let stat_fuse_legacy_logging s1 s23__n f = + let s = stat_fuse_legacy s1 s23__n f in + Printf.eprintf + "Fusion.Stat_Dirac.stat_fuse_legacy: %s <- %s -> %s\n" + (M.flavor_to_string f) + (ThoList.to_string stat_to_string (s1 :: s23__n)) + (stat_to_string s); + s + + module IMap = Map.Make (struct type t = int let compare = compare end) + + type partial = + { stat : stat; + fermions : int IMap.t; + antifermions : int IMap.t; + n : int } + + let partial_to_string p = + Printf.sprintf + "n = %d, fermions = %s, antifermions = %s, stat = %s" + p.n + (ThoList.to_string + (fun (i, f) -> Printf.sprintf "%d@%d" f i) + (IMap.bindings p.fermions)) + (ThoList.to_string + (fun (i, f) -> Printf.sprintf "%d@%d" f i) + (IMap.bindings p.antifermions)) + (stat_to_string p.stat) + + let add_lines l = function + | Boson l' -> Boson (List.rev_append l l') + | Fermion (n, l') -> Fermion (n, List.rev_append l l') + | AntiFermion (n, l') -> AntiFermion (n, List.rev_append l l') + + let partial_of_slist slist = + List.fold_left + (fun acc s -> + let n = succ acc.n in + match s with + | Boson l -> + { acc with + stat = add_lines l acc.stat; + n } + | Fermion (p, l) -> + { acc with + fermions = IMap.add n p acc.fermions; + stat = add_lines l acc.stat; + n } + | AntiFermion (p, l) -> + { acc with + antifermions = IMap.add n p acc.antifermions; + stat = add_lines l acc.stat; + n } ) + { stat = Boson []; + fermions = IMap.empty; + antifermions = IMap.empty; + n = 0 } + slist + + let find_opt p map = + try Some (IMap.find p map) with Not_found -> None + + let match_fermion_line p (i, j) = + if i <= p.n && j <= p.n then + match find_opt i p.fermions, find_opt j p.antifermions with + | (Some _ as f), (Some _ as fbar) -> + { p with + stat = add_lines [fbar, f] p.stat; + fermions = IMap.remove i p.fermions; + antifermions = IMap.remove j p.antifermions } + | _ -> + invalid_arg "match_fermion_line: mismatch" + else if i <= p.n then + match find_opt i p.fermions, p.stat with + | Some f, Boson l -> + { p with + stat = Fermion (f, l); + fermions = IMap.remove i p.fermions } + | _ -> + invalid_arg "match_fermion_line: mismatch" + else if j <= p.n then + match find_opt j p.antifermions, p.stat with + | Some fbar, Boson l -> + { p with + stat = AntiFermion (fbar, l); + antifermions = IMap.remove j p.antifermions } + | _ -> + invalid_arg "match_fermion_line: mismatch" + else + failwith "match_fermion_line: impossible" + + let match_fermion_line_logging p (i, j) = + Printf.eprintf + "Fusion.match_fermion_line <<< %s (%d, %d)\n" + (partial_to_string p) i j; + let p' = match_fermion_line p (i, j) in + Printf.eprintf + "Fusion.match_fermion_line >>> %s\n" + (partial_to_string p'); + p' + + let match_fermion_lines flines s1 s23__n = + let p = partial_of_slist (s1 :: s23__n) in + List.fold_left match_fermion_line p flines + + let stat_fuse_new flines s1 s23__n f = + (match_fermion_lines flines s1 s23__n).stat + + let stat_fuse_new_checking flines s1 s23__n f = + let stat = stat_fuse_new flines s1 s23__n f in + if List.length flines < 2 then + begin + let legacy = stat_fuse_legacy s1 s23__n f in + if not (equal stat legacy) then + failwith + (Printf.sprintf + "Fusion.Stat_Dirac.stat_fuse_new: %s <> %s!" + (stat_to_string stat) + (stat_to_string legacy)) + end; + stat + + let stat_fuse_new_logging flines s1 s23__n f = + Printf.eprintf + "Fusion.Stat_Dirac.stat_fuse_new: \ + connecting fermion lines %s in %s <- %s\n" + (UFO_Lorentz.fermion_lines_to_string flines) + (M.flavor_to_string f) + (ThoList.to_string stat_to_string (s1 :: s23__n)); + stat_fuse_new_checking flines s1 s23__n f + + let stat_fuse flines_opt slist f = + match slist with + | [] -> invalid_arg "Fusion.Stat_Dirac.stat_fuse: empty" + | s1 :: s23__n -> + begin match flines_opt with + | Some flines -> stat_fuse_new flines s1 s23__n f + | None -> stat_fuse_legacy s1 s23__n f + end + + let stat_fuse_logging flines_opt slist f = + Printf.eprintf + "Fusion.Stat_Dirac.stat_fuse: %s <- %s\n" + (M.flavor_to_string f) + (ThoList.to_string stat_to_string slist); + stat_fuse flines_opt slist f + + let stat_keystone_legacy s1 s23__n f = + let s2 = List.hd s23__n + and s34__n = List.tl s23__n in + stat_fuse_legacy s1 [stat_fuse_legacy s2 s34__n (M.conjugate f)] f + + let stat_keystone_legacy_logging s1 s23__n f = + let s = stat_keystone_legacy s1 s23__n f in + Printf.eprintf + "Fusion.Stat_Dirac.stat_keystone_legacy: %s (%s) %s -> %s\n" + (stat_to_string s1) + (M.flavor_to_string f) + (ThoList.to_string stat_to_string s23__n) + (stat_to_string s); + s + + let stat_keystone flines_opt slist f = + match slist with + | [] -> invalid_arg "Fusion.Stat_Dirac.stat_keystone: empty" + | s1 :: s23__n -> + begin match flines_opt with + | None -> stat_keystone_legacy s1 s23__n f + | Some flines -> + let stat = stat_fuse_new flines s1 s23__n f in + if complete stat then + stat + else + failwith + (Printf.sprintf + "Fusion.Stat_Dirac.stat_keystone: incomplete %s!" + (stat_to_string stat)) + end + + (* \begin{figure} \begin{displaymath} \parbox{26\unitlength}{% \begin{fmfgraph*}(25,15) \fmfstraight \fmfleft{f} \fmfright{f1,f2,f3} \fmflabel{$\psi(1)$}{f1} \fmflabel{$\bar\psi(2)$}{f2} \fmflabel{$\psi(3)$}{f3} \fmflabel{$0$}{f} \fmf{fermion}{f1,v1,f} \fmffreeze \fmf{fermion,tension=0.5}{f3,v2,f2} \fmf{photon}{v1,v2} \fmfdot{v1,v2} \end{fmfgraph*}} \qquad\qquad-\qquad \parbox{26\unitlength}{% \begin{fmfgraph*}(25,15) \fmfstraight \fmfleft{f} \fmfright{f1,f2,f3} \fmflabel{$\psi(1)$}{f1} \fmflabel{$\bar\psi(2)$}{f2} \fmflabel{$\psi(3)$}{f3} \fmflabel{$0$}{f} \fmf{fermion}{f3,v1,f} \fmffreeze \fmf{fermion,tension=0.5}{f1,v2,f2} \fmf{photon}{v1,v2} \fmfdot{v1,v2} \end{fmfgraph*}} \end{displaymath} \caption{\label{fig:stat_fuse} Relative sign from Fermi statistics.} \end{figure} *) (* \begin{equation} \epsilon \left(\left\{ (0,1), (2,3) \right\}\right) = - \epsilon \left(\left\{ (0,3), (2,1) \right\}\right) \end{equation} *) let permutation lines = let fout, fin = List.split lines in let eps_in, _ = Combinatorics.sort_signed fin and eps_out, _ = Combinatorics.sort_signed fout in (eps_in * eps_out) (* \begin{dubious} This comparing of permutations of fermion lines is a bit tedious and takes a macroscopic fraction of time. However, it's less than 20\,\%, so we don't focus on improving on it yet. \end{dubious} *) let stat_sign = function | Boson lines -> permutation lines | Fermion (p, lines) -> permutation ((None, Some p) :: lines) | AntiFermion (pbar, lines) -> permutation ((Some pbar, None) :: lines) end (* \thocwmodulesection{Tags} *) module type Tags = sig type wf type coupling type 'a children val null_wf : wf val null_coupling : coupling val fuse : coupling -> wf children -> wf val wf_to_string : wf -> string option val coupling_to_string : coupling -> string option end module type Tagger = functor (PT : Tuple.Poly) -> Tags with type 'a children = 'a PT.t module type Tagged_Maker = functor (Tagger : Tagger) -> functor (P : Momentum.T) -> functor (M : Model.T) -> T with type p = P.t and type flavor = Colorize.It(M).flavor and type flavor_sans_color = M.flavor and type constant = M.constant (* No tags is one option for good tags \ldots *) module No_Tags (PT : Tuple.Poly) = struct type wf = unit type coupling = unit type 'a children = 'a PT.t let null_wf = () let null_coupling = () let fuse () _ = () let wf_to_string () = None let coupling_to_string () = None end (* \begin{dubious} Here's a simple additive tag that can grow into something useful for loop calculations. \end{dubious} *) module Loop_Tags (PT : Tuple.Poly) = struct type wf = int type coupling = int type 'a children = 'a PT.t let null_wf = 0 let null_coupling = 0 let fuse c wfs = PT.fold_left (+) c wfs let wf_to_string n = Some (string_of_int n) let coupling_to_string n = Some (string_of_int n) end module Order_Tags (PT : Tuple.Poly) = struct type wf = int type coupling = int type 'a children = 'a PT.t let null_wf = 0 let null_coupling = 0 let fuse c wfs = PT.fold_left (+) c wfs let wf_to_string n = Some (string_of_int n) let coupling_to_string n = Some (string_of_int n) end (* \thocwmodulesection{[Tagged], the [Fusion.Make] Functor} *) module Tagged (Tagger : Tagger) (PT : Tuple.Poly) (Stat : Stat_Maker) (T : Topology.T with type 'a children = 'a PT.t) (P : Momentum.T) (M : Model.T) = struct type cache_mode = Cache_Use | Cache_Ignore | Cache_Overwrite let cache_option = ref Cache_Ignore type qcd_order = | QCD_order of int type ew_order = | EW_order of int let qcd_order = ref (QCD_order 99) let ew_order = ref (EW_order 99) let options = Options.create [ "ignore-cache", Arg.Unit (fun () -> cache_option := Cache_Ignore), " ignore cached model tables (default)"; "use-cache", Arg.Unit (fun () -> cache_option := Cache_Use), " use cached model tables"; "overwrite-cache", Arg.Unit (fun () -> cache_option := Cache_Overwrite), " overwrite cached model tables"; "qcd", Arg.Int (fun n -> qcd_order := QCD_order n), " set QCD order n [>= 0, default = 99] (ignored)"; "ew", Arg.Int (fun n -> ew_order := EW_order n), " set QCD order n [>=0, default = 99] (ignored)"] exception Negative_QCD_order exception Negative_EW_order exception Vanishing_couplings exception Negative_QCD_EW_orders let int_orders = match !qcd_order, !ew_order with | QCD_order n, EW_order n' when n < 0 && n' >= 0 -> raise Negative_QCD_order | QCD_order n, EW_order n' when n >= 0 && n' < 0 -> raise Negative_EW_order | QCD_order n, EW_order n' when n < 0 && n' < 0 -> raise Negative_QCD_EW_orders | QCD_order n, EW_order n' -> (n, n') open Coupling module S = Stat(M) type stat = S.stat let stat = S.stat let stat_sign = S.stat_sign (* \begin{dubious} This will do \emph{something} for 4-, 6-, \ldots fermion vertices, but not necessarily the right thing \ldots \end{dubious} *) - let stat_fuse s f = - PT.fold_right_internal (fun s' acc -> S.stat_fuse s' acc f) s + (* \begin{dubious} + This is copied from [Colorize] and should be factored! + \end{dubious} *) + + (* \begin{dubious} + In the long run, it will probably be beneficial to apply + the permutations in [Modeltools.add_vertexn]! + \end{dubious} *) + + module PosMap = + Partial.Make (struct type t = int let compare = compare end) + + let partial_map_undoing_permutation l l' = + let module P = Permutation.Default in + let p = P.of_list (List.map pred l') in + PosMap.of_lists l (P.list p l) + + let partial_map_undoing_fuse fuse = + partial_map_undoing_permutation + (ThoList.range 1 (List.length fuse)) + fuse + + let undo_permutation_of_fuse fuse = + PosMap.apply_with_fallback + (fun _ -> invalid_arg "permutation_of_fuse") + (partial_map_undoing_fuse fuse) + + let fermion_lines = function + | Coupling.V3 _ | Coupling.V4 _ -> None + | Coupling.Vn (Coupling.UFO (_, _, _, fl, _), fuse, _) -> + Some (UFO_Lorentz.map_fermion_lines (undo_permutation_of_fuse fuse) fl) type constant = M.constant (* \thocwmodulesubsection{Wave Functions} *) (* \begin{dubious} The code below is not yet functional. Too often, we assign to [Tags.null_wf] instead of calling [Tags.fuse]. \end{dubious} *) (* We will need two types of amplitudes: with color and without color. Since we can build them using the same types with only [flavor] replaced, it pays to use a functor to set up the scaffolding. *) module Tags = Tagger(PT) (* In the future, we might want to have [Coupling] among the functor arguments. However, for the moment, [Coupling] is assumed to be comprehensive. *) module type Tagged_Coupling = sig type sign = int type t = { sign : sign; coupling : constant Coupling.t; coupling_tag : Tags.coupling } val sign : t -> sign val coupling : t -> constant Coupling.t val coupling_tag : t -> string option end module Tagged_Coupling : Tagged_Coupling = struct type sign = int type t = { sign : sign; coupling : constant Coupling.t; coupling_tag : Tags.coupling } let sign c = c.sign let coupling c = c.coupling let coupling_tag_raw c = c.coupling_tag let coupling_tag rhs = Tags.coupling_to_string (coupling_tag_raw rhs) end (* \thocwmodulesubsection{Amplitudes: Monochrome and Colored} *) module type Amplitude = sig module Tags : Tags type flavor type p type wf = { flavor : flavor; momentum : p; wf_tag : Tags.wf } val flavor : wf -> flavor val conjugate : wf -> wf val momentum : wf -> p val momentum_list : wf -> int list val wf_tag : wf -> string option val wf_tag_raw : wf -> Tags.wf val order_wf : wf -> wf -> int val external_wfs : int -> (flavor * int) list -> wf list type 'a children type coupling = Tagged_Coupling.t type rhs = coupling * wf children val sign : rhs -> int val coupling : rhs -> constant Coupling.t val coupling_tag : rhs -> string option type exclusions val no_exclusions : exclusions val children : rhs -> wf list type fusion = wf * rhs list val lhs : fusion -> wf val rhs : fusion -> rhs list type braket = wf * rhs list val bra : braket -> wf val ket : braket -> rhs list module D : DAG.T with type node = wf and type edge = coupling and type children = wf children val wavefunctions : braket list -> wf list type amplitude = { fusions : fusion list; brakets : braket list; on_shell : (wf -> bool); is_gauss : (wf -> bool); constraints : string option; incoming : flavor list; outgoing : flavor list; externals : wf list; symmetry : int; dependencies : (wf -> (wf, coupling) Tree2.t); fusion_tower : D.t; fusion_dag : D.t } val incoming : amplitude -> flavor list val outgoing : amplitude -> flavor list val externals : amplitude -> wf list val variables : amplitude -> wf list val fusions : amplitude -> fusion list val brakets : amplitude -> braket list val on_shell : amplitude -> (wf -> bool) val is_gauss : amplitude -> (wf -> bool) val constraints : amplitude -> string option val symmetry : amplitude -> int val dependencies : amplitude -> wf -> (wf, coupling) Tree2.t val fusion_dag : amplitude -> D.t end module Amplitude (PT : Tuple.Poly) (P : Momentum.T) (M : Model.T) : Amplitude with type p = P.t and type flavor = M.flavor and type 'a children = 'a PT.t and module Tags = Tags = struct type flavor = M.flavor type p = P.t module Tags = Tags type wf = { flavor : flavor; momentum : p; wf_tag : Tags.wf } let flavor wf = wf.flavor let conjugate wf = { wf with flavor = M.conjugate wf.flavor } let momentum wf = wf.momentum let momentum_list wf = P.to_ints wf.momentum let wf_tag wf = Tags.wf_to_string wf.wf_tag let wf_tag_raw wf = wf.wf_tag let external_wfs rank particles = List.map (fun (f, p) -> { flavor = f; momentum = P.singleton rank p; wf_tag = Tags.null_wf }) particles (* Order wavefunctions so that the external come first, then the pairs, etc. Also put possible Goldstone bosons \emph{before} their gauge bosons. *) let lorentz_ordering f = match M.lorentz f with | Coupling.Scalar -> 0 | Coupling.Spinor -> 1 | Coupling.ConjSpinor -> 2 | Coupling.Majorana -> 3 | Coupling.Vector -> 4 | Coupling.Massive_Vector -> 5 | Coupling.Tensor_2 -> 6 | Coupling.Tensor_1 -> 7 | Coupling.Vectorspinor -> 8 | Coupling.BRS Coupling.Scalar -> 9 | Coupling.BRS Coupling.Spinor -> 10 | Coupling.BRS Coupling.ConjSpinor -> 11 | Coupling.BRS Coupling.Majorana -> 12 | Coupling.BRS Coupling.Vector -> 13 | Coupling.BRS Coupling.Massive_Vector -> 14 | Coupling.BRS Coupling.Tensor_2 -> 15 | Coupling.BRS Coupling.Tensor_1 -> 16 | Coupling.BRS Coupling.Vectorspinor -> 17 | Coupling.BRS _ -> invalid_arg "Fusion.lorentz_ordering: not needed" | Coupling.Maj_Ghost -> 18 (*i | Coupling.Ward_Vector -> 19 i*) let order_flavor f1 f2 = let c = compare (lorentz_ordering f1) (lorentz_ordering f2) in if c <> 0 then c else compare f1 f2 (* Note that [Momentum().compare] guarantees that wavefunctions will be ordered according to \emph{increasing} [Momentum().rank] of their momenta. *) let order_wf wf1 wf2 = let c = P.compare wf1.momentum wf2.momentum in if c <> 0 then c else let c = order_flavor wf1.flavor wf2.flavor in if c <> 0 then c else compare wf1.wf_tag wf2.wf_tag (* This \emph{must} be a pair matching the [edge * node children] pairs of [DAG.Forest]! *) type coupling = Tagged_Coupling.t type 'a children = 'a PT.t type rhs = coupling * wf children let sign (c, _) = Tagged_Coupling.sign c let coupling (c, _) = Tagged_Coupling.coupling c let coupling_tag (c, _) = Tagged_Coupling.coupling_tag c type exclusions = { x_flavors : flavor list; x_couplings : coupling list } let no_exclusions = { x_flavors = []; x_couplings = [] } let children (_, wfs) = PT.to_list wfs type fusion = wf * rhs list let lhs (l, _) = l let rhs (_, r) = r type braket = wf * rhs list let bra (b, _) = b let ket (_, k) = k module D = DAG.Make (DAG.Forest(PT) (struct type t = wf let compare = order_wf end) (struct type t = coupling let compare = compare end)) module WFSet = Set.Make (struct type t = wf let compare = order_wf end) let wavefunctions brakets = WFSet.elements (List.fold_left (fun set (wf1, wf23) -> WFSet.add wf1 (List.fold_left (fun set' (_, wfs) -> PT.fold_right WFSet.add wfs set') set wf23)) WFSet.empty brakets) type amplitude = { fusions : fusion list; brakets : braket list; on_shell : (wf -> bool); is_gauss : (wf -> bool); constraints : string option; incoming : flavor list; outgoing : flavor list; externals : wf list; symmetry : int; dependencies : (wf -> (wf, coupling) Tree2.t); fusion_tower : D.t; fusion_dag : D.t } let incoming a = a.incoming let outgoing a = a.outgoing let externals a = a.externals let fusions a = a.fusions let brakets a = a.brakets let symmetry a = a.symmetry let on_shell a = a.on_shell let is_gauss a = a.is_gauss let constraints a = a.constraints let variables a = List.map lhs a.fusions let dependencies a = a.dependencies let fusion_dag a = a.fusion_dag end module A = Amplitude(PT)(P)(M) (* Operator insertions can be fused only if they are external. *) let is_source wf = match M.propagator wf.A.flavor with | Only_Insertion -> P.rank wf.A.momentum = 1 | _ -> true (* [is_goldstone_of g v] is [true] if and only if [g] is the Goldstone boson corresponding to the gauge particle [v]. *) let is_goldstone_of g v = match M.goldstone v with | None -> false | Some (g', _) -> g = g' (* \begin{dubious} In the end, [PT.to_list] should become redudant! \end{dubious} *) let fuse_rhs rhs = M.fuse (PT.to_list rhs) (* \thocwmodulesubsection{Vertices} *) (* Compute the set of all vertices in the model from the allowed fusions and the set of all flavors: \begin{dubious} One could think of using [M.vertices] instead of [M.fuse2], [M.fuse3] and [M.fuse] \ldots \end{dubious} *) module VSet = Map.Make(struct type t = A.flavor let compare = compare end) let add_vertices f rhs m = VSet.add f (try rhs :: VSet.find f m with Not_found -> [rhs]) m let collect_vertices rhs = List.fold_right (fun (f1, c) -> add_vertices (M.conjugate f1) (c, rhs)) (fuse_rhs rhs) (* The set of all vertices with common left fields factored. *) (* I used to think that constant initializers are a good idea to allow compile time optimizations. The down side turned out to be that the constant initializers will be evaluated \emph{every time} the functor is applied. \emph{Relying on the fact that the functor will be called only once is not a good idea!} *) type vertices = (A.flavor * (constant Coupling.t * A.flavor PT.t) list) list let vertices_nocache max_degree flavors : vertices = VSet.fold (fun f rhs v -> (f, rhs) :: v) (PT.power_fold collect_vertices flavors VSet.empty) [] (* Performance hack: *) type vertex_table = ((A.flavor * A.flavor * A.flavor) * constant Coupling.vertex3 * constant) list * ((A.flavor * A.flavor * A.flavor * A.flavor) * constant Coupling.vertex4 * constant) list * (A.flavor list * constant Coupling.vertexn * constant) list module VCache = Cache.Make (struct type t = vertex_table end) (struct type t = vertices end) let vertices_cache = ref None let hash () = VCache.hash (M.vertices ()) (* \begin{dubious} Can we do better than the executable name provided by [Config.cache_prefix]??? We need a better way to avoid collisions among the caches for different models in the same program. \end{dubious} *) let cache_name = ref (Config.cache_prefix ^ "." ^ Config.cache_suffix) let set_cache_name name = cache_name := name let initialize_cache dir = Printf.eprintf " >>> Initializing vertex table %s. This may take some time ... " !cache_name; flush stderr; VCache.write_dir (hash ()) dir !cache_name (vertices_nocache (M.max_degree ()) (M.flavors())); Printf.eprintf "done. <<< \n" let vertices max_degree flavors : vertices = match !vertices_cache with | None -> begin match !cache_option with | Cache_Use -> begin match VCache.maybe_read (hash ()) !cache_name with | VCache.Hit result -> result | VCache.Miss -> Printf.eprintf " >>> Initializing vertex table %s. This may take some time ... " !cache_name; flush stderr; let result = vertices_nocache max_degree flavors in VCache.write (hash ()) !cache_name (result); vertices_cache := Some result; Printf.eprintf "done. <<< \n"; flush stderr; result | VCache.Stale file -> Printf.eprintf " >>> Re-initializing stale vertex table %s in file %s. " !cache_name file; Printf.eprintf "This may take some time ... "; flush stderr; let result = vertices_nocache max_degree flavors in VCache.write (hash ()) !cache_name (result); vertices_cache := Some result; Printf.eprintf "done. <<< \n"; flush stderr; result end | Cache_Overwrite -> Printf.eprintf " >>> Overwriting vertex table %s. This may take some time ... " !cache_name; flush stderr; let result = vertices_nocache max_degree flavors in VCache.write (hash ()) !cache_name (result); vertices_cache := Some result; Printf.eprintf "done. <<< \n"; flush stderr; result | Cache_Ignore -> let result = vertices_nocache max_degree flavors in vertices_cache := Some result; result end | Some result -> result (* Note that we must perform any filtering of the vertices \emph{after} caching, because the restrictions \emph{must not} influence the cache (unless we tag the cache with model and restrictions). *) (*i let unpack_constant = function | Coupling.V3 (_, _, cs) -> cs | Coupling.V4 (_, _, cs) -> cs | Coupling.Vn (_, _, cs) -> cs let coupling_and_flavors_to_string (c, fs) = M.constant_symbol (unpack_constant c) ^ "[" ^ String.concat ", " (List.map M.flavor_to_string (PT.to_list fs)) ^ "]" let fusions_to_string (f, cfs) = M.flavor_to_string f ^ " <- { " ^ String.concat " | " (List.map coupling_and_flavors_to_string cfs) ^ " }" let vertices_to_string vertices = String.concat "; " (List.map fusions_to_string vertices) i*) let filter_vertices select_vtx vertices = List.fold_left (fun acc (f, cfs) -> let f' = M.conjugate f in let cfs = List.filter (fun (c, fs) -> select_vtx c f' (PT.to_list fs)) cfs in match cfs with | [] -> acc | cfs -> (f, cfs) :: acc) [] vertices (* \thocwmodulesubsection{Partitions} *) (* Vertices that are not crossing invariant need special treatment so that they're only generated for the correct combinations of momenta. NB: the [crossing] checks here are a bit redundant, because [CM.fuse] below will bring the killed vertices back to life and will have to filter once more. Nevertheless, we keep them here, for the unlikely case that anybody ever wants to use uncolored amplitudes directly. NB: the analogous problem does not occur for [select_wf], because this applies to momenta instead of vertices. *) (* \begin{dubious} This approach worked before the colorize, but has become \emph{futile}, because [CM.fuse] will bring the killed vertices back to life. We need to implement the same checks there again!!! \end{dubious} *) (* \begin{dubious} Using [PT.Mismatched_arity] is not really good style \ldots Tho's approach doesn't work since he does not catch charge conjugated processes or crossed processes. Another very strange thing is that O'Mega seems always to run in the q2 q3 timelike case, but not in the other two. (Property of how the DAG is built?). For the $ZZZZ$ vertex I add the same vertex again, but interchange 1 and 3 in the [crossing] vertex \end{dubious} *) let kmatrix_cuts c momenta = match c with | V4 (Vector4_K_Matrix_tho (disc, _), fusion, _) | V4 (Vector4_K_Matrix_jr (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F431|F342|F432) | 1, false, true, false, (F134|F143|F234|F243) | 1, false, false, true, (F314|F413|F324|F423) -> true | 2, true, false, false, (F123|F213|F124|F214) | 2, false, true, false, (F312|F321|F412|F421) | 2, false, false, true, (F132|F231|F142|F241) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | _ -> false end | V4 (Vector4_K_Matrix_cf_t0 (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F431|F342|F432) | 1, false, true, false, (F134|F143|F234|F243) | 1, false, false, true, (F314|F413|F324|F423) -> true | 2, true, false, false, (F123|F213|F124|F214) | 2, false, true, false, (F312|F321|F412|F421) | 2, false, false, true, (F132|F231|F142|F241) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | _ -> false end | V4 (Vector4_K_Matrix_cf_t1 (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F431|F342|F432) | 1, false, true, false, (F134|F143|F234|F243) | 1, false, false, true, (F314|F413|F324|F423) -> true | 2, true, false, false, (F123|F213|F124|F214) | 2, false, true, false, (F312|F321|F412|F421) | 2, false, false, true, (F132|F231|F142|F241) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | _ -> false end | V4 (Vector4_K_Matrix_cf_t2 (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F431|F342|F432) | 1, false, true, false, (F134|F143|F234|F243) | 1, false, false, true, (F314|F413|F324|F423) -> true | 2, true, false, false, (F123|F213|F124|F214) | 2, false, true, false, (F312|F321|F412|F421) | 2, false, false, true, (F132|F231|F142|F241) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | _ -> false end | V4 (Vector4_K_Matrix_cf_t_rsi (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F431|F342|F432) | 1, false, true, false, (F134|F143|F234|F243) | 1, false, false, true, (F314|F413|F324|F423) -> true | 2, true, false, false, (F123|F213|F124|F214) | 2, false, true, false, (F312|F321|F412|F421) | 2, false, false, true, (F132|F231|F142|F241) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | _ -> false end | V4 (Vector4_K_Matrix_cf_m0 (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F431|F342|F432) | 1, false, true, false, (F134|F143|F234|F243) | 1, false, false, true, (F314|F413|F324|F423) -> true | 2, true, false, false, (F123|F213|F124|F214) | 2, false, true, false, (F312|F321|F412|F421) | 2, false, false, true, (F132|F231|F142|F241) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | _ -> false end | V4 (Vector4_K_Matrix_cf_m1 (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F431|F342|F432) | 1, false, true, false, (F134|F143|F234|F243) | 1, false, false, true, (F314|F413|F324|F423) -> true | 2, true, false, false, (F123|F213|F124|F214) | 2, false, true, false, (F312|F321|F412|F421) | 2, false, false, true, (F132|F231|F142|F241) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | _ -> false end | V4 (Vector4_K_Matrix_cf_m7 (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F431|F342|F432) | 1, false, true, false, (F134|F143|F234|F243) | 1, false, false, true, (F314|F413|F324|F423) -> true | 2, true, false, false, (F123|F213|F124|F214) | 2, false, true, false, (F312|F321|F412|F421) | 2, false, false, true, (F132|F231|F142|F241) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | _ -> false end | V4 (DScalar2_Vector2_K_Matrix_ms (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F432|F123|F214) | 1, false, true, false, (F134|F243|F312|F421) | 1, false, false, true, (F314|F423|F132|F241) -> true | 2, true, false, false, (F431|F342|F213|F124) | 2, false, true, false, (F143|F234|F321|F412) | 2, false, false, true, (F413|F324|F231|F142) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | 4, true, false, false, (F142|F413|F231|F324) | 4, false, true, false, (F214|F341|F123|F432) | 4, false, false, true, (F124|F431|F213|F342) -> true | 5, true, false, false, (F143|F412|F321|F234) | 5, false, true, false, (F314|F241|F132|F423) | 5, false, false, true, (F134|F421|F312|F243) -> true | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> true | 7, true, false, false, (F134|F312|F421|F243) | 7, false, true, false, (F413|F231|F142|F324) | 7, false, false, true, (F143|F321|F412|F432) -> true | 8, true, false, false, (F132|F314|F241|F423) | 8, false, true, false, (F213|F431|F124|F342) | 8, false, false, true, (F123|F341|F214|F234) -> true | _ -> false end | V4 (DScalar2_Vector2_m_0_K_Matrix_cf (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F432|F123|F214) | 1, false, true, false, (F134|F243|F312|F421) | 1, false, false, true, (F314|F423|F132|F241) -> true | 2, true, false, false, (F431|F342|F213|F124) | 2, false, true, false, (F143|F234|F321|F412) | 2, false, false, true, (F413|F324|F231|F142) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | 4, true, false, false, (F142|F413|F231|F324) | 4, false, true, false, (F214|F341|F123|F432) | 4, false, false, true, (F124|F431|F213|F342) -> true | 5, true, false, false, (F143|F412|F321|F234) | 5, false, true, false, (F314|F241|F132|F423) | 5, false, false, true, (F134|F421|F312|F243) -> true | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> true | 7, true, false, false, (F134|F312|F421|F243) | 7, false, true, false, (F413|F231|F142|F324) | 7, false, false, true, (F143|F321|F412|F432) -> true | 8, true, false, false, (F132|F314|F241|F423) | 8, false, true, false, (F213|F431|F124|F342) | 8, false, false, true, (F123|F341|F214|F234) -> true | _ -> false end | V4 (DScalar2_Vector2_m_1_K_Matrix_cf (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F432|F123|F214) | 1, false, true, false, (F134|F243|F312|F421) | 1, false, false, true, (F314|F423|F132|F241) -> true | 2, true, false, false, (F431|F342|F213|F124) | 2, false, true, false, (F143|F234|F321|F412) | 2, false, false, true, (F413|F324|F231|F142) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | 4, true, false, false, (F142|F413|F231|F324) | 4, false, true, false, (F214|F341|F123|F432) | 4, false, false, true, (F124|F431|F213|F342) -> true | 5, true, false, false, (F143|F412|F321|F234) | 5, false, true, false, (F314|F241|F132|F423) | 5, false, false, true, (F134|F421|F312|F243) -> true | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> true | 7, true, false, false, (F134|F312|F421|F243) | 7, false, true, false, (F413|F231|F142|F324) | 7, false, false, true, (F143|F321|F412|F432) -> true | 8, true, false, false, (F132|F314|F241|F423) | 8, false, true, false, (F213|F431|F124|F342) | 8, false, false, true, (F123|F341|F214|F234) -> true | _ -> false end | V4 (DScalar2_Vector2_m_7_K_Matrix_cf (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 1, true, false, false, (F341|F432|F123|F214) | 1, false, true, false, (F134|F243|F312|F421) | 1, false, false, true, (F314|F423|F132|F241) -> true | 2, true, false, false, (F431|F342|F213|F124) | 2, false, true, false, (F143|F234|F321|F412) | 2, false, false, true, (F413|F324|F231|F142) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | 4, true, false, false, (F142|F413|F231|F324) | 4, false, true, false, (F214|F341|F123|F432) | 4, false, false, true, (F124|F431|F213|F342) -> true | 5, true, false, false, (F143|F412|F321|F234) | 5, false, true, false, (F314|F241|F132|F423) | 5, false, false, true, (F134|F421|F312|F243) -> true | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> true | 7, true, false, false, (F134|F312|F421|F243) | 7, false, true, false, (F413|F231|F142|F324) | 7, false, false, true, (F143|F321|F412|F432) -> true | 8, true, false, false, (F132|F314|F241|F423) | 8, false, true, false, (F213|F431|F124|F342) | 8, false, false, true, (F123|F341|F214|F234) -> true | _ -> false end | V4 (DScalar4_K_Matrix_ms (disc, _), fusion, _) -> let s12, s23, s13 = begin match PT.to_list momenta with | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), P.Scattering.timelike (P.add q2 q3), P.Scattering.timelike (P.add q1 q3)) | _ -> raise PT.Mismatched_arity end in begin match disc, s12, s23, s13, fusion with | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> true | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> true | 4, true, false, false, (F142|F413|F231|F324) | 4, false, true, false, (F214|F341|F123|F432) | 4, false, false, true, (F124|F431|F213|F342) -> true | 5, true, false, false, (F143|F412|F321|F234) | 5, false, true, false, (F314|F241|F132|F423) | 5, false, false, true, (F134|F421|F312|F243) -> true | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> true | 7, true, false, false, (F134|F312|F421|F243) | 7, false, true, false, (F413|F231|F142|F324) | 7, false, false, true, (F143|F321|F412|F432) -> true | 8, true, false, false, (F132|F314|F241|F423) | 8, false, true, false, (F213|F431|F124|F342) | 8, false, false, true, (F123|F341|F214|F234) -> true | _ -> false end | _ -> true (* Counting QCD and EW orders. *) let qcd_ew_check orders = if fst (orders) <= fst (int_orders) && snd (orders) <= snd (int_orders) then true else false (* Match a set of flavors to a set of momenta. Form the direct product for the lists of momenta two and three with the list of couplings and flavors two and three. *) let flavor_keystone select_p dim (f1, f23) (p1, p23) = ({ A.flavor = f1; A.momentum = P.of_ints dim p1; A.wf_tag = A.Tags.null_wf }, Product.fold2 (fun (c, f) p acc -> try let p' = PT.map (P.of_ints dim) p in if select_p (P.of_ints dim p1) (PT.to_list p') && kmatrix_cuts c p' then (c, PT.map2 (fun f'' p'' -> { A.flavor = f''; A.momentum = p''; A.wf_tag = A.Tags.null_wf }) f p') :: acc else acc with | PT.Mismatched_arity -> acc) f23 p23 []) (*i let cnt = ref 0 let gc_stat () = let minor, promoted, major = Gc.counters () in Printf.sprintf "(%12.0f, %12.0f, %12.0f)" minor promoted major let flavor_keystone select_p n (f1, f23) (p1, p23) = incr cnt; Gc.set { (Gc.get()) with Gc.space_overhead = 20 }; Printf.eprintf "%6d@%8.1f: %s\n" !cnt (Sys.time ()) (gc_stat ()); flush stderr; flavor_keystone select_p n (f1, f23) (p1, p23) i*) (* Produce all possible combinations of vertices (flavor keystones) and momenta by forming the direct product. The semantically equivalent [Product.list2 (flavor_keystone select_wf n) vertices keystones] with \emph{subsequent} filtering would be a \emph{very bad} idea, because a potentially huge intermediate list is built for large models. E.\,g.~for the MSSM this would lead to non-termination by thrashing for $2\to4$ processes on most PCs. *) let flavor_keystones filter select_p dim vertices keystones = Product.fold2 (fun v k acc -> filter (flavor_keystone select_p dim v k) acc) vertices keystones [] (* Flatten the nested lists of vertices into a list of attached lines. *) let flatten_keystones t = ThoList.flatmap (fun (p1, p23) -> p1 :: (ThoList.flatmap (fun (_, rhs) -> PT.to_list rhs) p23)) t (* \thocwmodulesubsection{Subtrees} *) (* Fuse a tuple of wavefunctions, keeping track of Fermi statistics. Record only the the sign \emph{relative} to the children. (The type annotation is only for documentation.) *) let fuse select_wf select_vtx wfss : (A.wf * stat * A.rhs) list = if PT.for_all (fun (wf, _) -> is_source wf) wfss then try let wfs, ss = PT.split wfss in let flavors = PT.map A.flavor wfs and momenta = PT.map A.momentum wfs and wf_tags = PT.map A.wf_tag_raw wfs in let p = PT.fold_left_internal P.add momenta in (*i let wft = PT.fold_left Tags.fuse wf_tags in i*) List.fold_left (fun acc (f, c) -> if select_wf f p (PT.to_list momenta) && select_vtx c f (PT.to_list flavors) && kmatrix_cuts c momenta then - let s = stat_fuse ss f in + (* [let _ = + Printf.eprintf + "Fusion.fuse: %s <- %s\n" + (M.flavor_to_string f) + (ThoList.to_string M.flavor_to_string (PT.to_list flavors)) in] *) + let s = S.stat_fuse (fermion_lines c) (PT.to_list ss) f in let flip = PT.fold_left (fun acc s' -> acc * stat_sign s') (stat_sign s) ss in ({ A.flavor = f; A.momentum = p; A.wf_tag = A.Tags.null_wf }, s, ({ Tagged_Coupling.sign = flip; Tagged_Coupling.coupling = c; Tagged_Coupling.coupling_tag = A.Tags.null_coupling }, wfs)) :: acc else acc) [] (fuse_rhs flavors) with | P.Duplicate _ | S.Impossible -> [] else [] (* \begin{dubious} Eventually, the pairs of [tower] and [dag] in [fusion_tower'] below could and should be replaced by a graded [DAG]. This will look like, but currently [tower] containts statistics information that is missing from [dag]: \begin{quote} \verb+Type node = flavor * p is not compatible with type wf * stat+ \end{quote} This should be easy to fix. However, replacing [type t = wf] with [type t = wf * stat] is \emph{not} a good idea because the variable [stat] makes it impossible to test for the existance of a particular [wf] in a [DAG]. \end{dubious} \begin{dubious} In summary, it seems that [(wf * stat) list array * A.D.t] should be replaced by [(wf -> stat) * A.D.t]. \end{dubious} *) module GF = struct module Nodes = struct type t = A.wf module G = struct type t = int let compare = compare end let compare = A.order_wf let rank wf = P.rank wf.A.momentum end module Edges = struct type t = A.coupling let compare = compare end module F = DAG.Forest(PT)(Nodes)(Edges) type node = Nodes.t type edge = F.edge type children = F.children type t = F.t let compare = F.compare let for_all = F.for_all let fold = F.fold end module D' = DAG.Graded(GF) let tower_of_dag dag = let _, max_rank = D'.min_max_rank dag in Array.init max_rank (fun n -> D'.ranked n dag) (* The function [fusion_tower'] recursively builds the tower of all fusions from bottom up to a chosen level. The argument [tower] is an array of lists, where the $i$-th sublist (counting from 0) represents all off shell wave functions depending on $i+1$~momenta and their Fermistatistics. \begin{equation} \begin{aligned} \Bigl\lbrack & \{ \phi_1(p_1), \phi_2(p_2), \phi_3(p_3), \ldots \}, \\ & \{ \phi_{12}(p_1+p_2), \phi'_{12}(p_1+p_2), \ldots, \phi_{13}(p_1+p_3), \ldots, \phi_{23}(p_2+p_3), \ldots \}, \\ & \ldots \\ & \{ \phi_{1\cdots n}(p_1+\cdots+p_n), \phi'_{1\cdots n}(p_1+\cdots+p_n), \ldots \} \Bigr\rbrack \end{aligned} \end{equation} The argument [dag] is a DAG representing all the fusions calculated so far. NB: The outer array in [tower] is always very short, so we could also have accessed a list with [List.nth]. Appending of new members at the end brings no loss of performance. NB: the array is supposed to be immutable. *) (* The towers must be sorted so that the combinatorical functions can make consistent selections. \begin{dubious} Intuitively, this seems to be correct. However, one could have expected that no element appears twice and that this ordering is not necessary \ldots \end{dubious} *) let grow select_wf select_vtx tower = let rank = succ (Array.length tower) in List.sort Pervasives.compare (PT.graded_sym_power_fold rank (fun wfs acc -> fuse select_wf select_vtx wfs @ acc) tower []) let add_offspring dag (wf, _, rhs) = A.D.add_offspring wf rhs dag let filter_offspring fusions = List.map (fun (wf, s, _) -> (wf, s)) fusions let rec fusion_tower' n_max select_wf select_vtx tower dag : (A.wf * stat) list array * A.D.t = if Array.length tower >= n_max then (tower, dag) else let tower' = grow select_wf select_vtx tower in fusion_tower' n_max select_wf select_vtx (Array.append tower [|filter_offspring tower'|]) (List.fold_left add_offspring dag tower') (* Discard the tower and return a map from wave functions to Fermistatistics together with the DAG. *) let make_external_dag wfs = List.fold_left (fun m (wf, _) -> A.D.add_node wf m) A.D.empty wfs let mixed_fold_left f acc lists = Array.fold_left (List.fold_left f) acc lists module Stat_Map = Map.Make (struct type t = A.wf let compare = A.order_wf end) let fusion_tower height select_wf select_vtx wfs : (A.wf -> stat) * A.D.t = let tower, dag = fusion_tower' height select_wf select_vtx [|wfs|] (make_external_dag wfs) in let stats = mixed_fold_left (fun m (wf, s) -> Stat_Map.add wf s m) Stat_Map.empty tower in ((fun wf -> Stat_Map.find wf stats), dag) (* Calculate the minimal tower of fusions that suffices for calculating the amplitude. *) let minimal_fusion_tower n select_wf select_vtx wfs : (A.wf -> stat) * A.D.t = fusion_tower (T.max_subtree n) select_wf select_vtx wfs (* Calculate the complete tower of fusions. It is much larger than required, but it allows a complete set of gauge checks. *) let complete_fusion_tower select_wf select_vtx wfs : (A.wf -> stat) * A.D.t = fusion_tower (List.length wfs - 1) select_wf select_vtx wfs (* \begin{dubious} There is a natural product of two DAGs using [fuse]. Can this be used in a replacement for [fusion_tower]? The hard part is to avoid double counting, of course. A straight forward solution could do a diagonal sum (in order to reject flipped offspring representing the same fusion) and rely on the uniqueness in [DAG] otherwise. However, this will (probably) slow down the procedure significanty, because most fusions (including Fermi signs!) will be calculated before being rejected by [DAG().add_offspring]. \end{dubious} *) (* Add to [dag] all Goldstone bosons defined in [tower] that correspond to gauge bosons in [dag]. This is only required for checking Slavnov-Taylor identities in unitarity gauge. Currently, it is not used, because we use the complete tower for gauge checking. *) let harvest_goldstones tower dag = A.D.fold_nodes (fun wf dag' -> match M.goldstone wf.A.flavor with | Some (g, _) -> let wf' = { wf with A.flavor = g } in if A.D.is_node wf' tower then begin A.D.harvest tower wf' dag' end else begin dag' end | None -> dag') dag dag (* Calculate the sign from Fermi statistics that is not already included - in the children. - \begin{dubious} - The use of [PT.of2_kludge] is the largest skeleton on the cupboard of - unified fusions. Currently, it is just another name for [PT.of2], - but the existence of the latter requires binary fusions. Of course, this - is just a symptom for not fully supporting four fermion vertices \ldots - \end{dubious} *) - let stat_keystone stats wf1 wfs = + in the children. *) + + let strip_fermion_lines = function + | (Coupling.V3 _ | Coupling.V4 _ as v) -> v + | Coupling.Vn (Coupling.UFO (c, l, s, fl, col), f, x) -> + Coupling.Vn (Coupling.UFO (c, l, s, [], col), f, x) + + let num_fermion_lines = function + | Coupling.V3 _ | Coupling.V4 _ -> 0 + | Coupling.Vn (Coupling.UFO (c, l, s, fl, col), f, x) -> List.length fl + + let stat_keystone v stats wf1 wfs = let wf1' = stats wf1 and wfs' = PT.map stats wfs in - stat_sign - (stat_fuse - (PT.of2_kludge wf1' (stat_fuse wfs' (M.conjugate (A.flavor wf1)))) - (A.flavor wf1)) + let f = A.flavor wf1 in + let slist = PT.to_list wfs' @ [wf1'] in + let stat = S.stat_keystone (fermion_lines v) slist f in + if num_fermion_lines v < 2 then + begin + let legacy = S.stat_keystone None slist f in + if not (S.equal stat legacy) then + failwith + (Printf.sprintf + "Fusion.stat_keystone: %s <> %s!" + (S.stat_to_string legacy) + (S.stat_to_string stat)); + if not (S.complete legacy) then + failwith + (Printf.sprintf + "Fusion.stat_keystone: legacy incomplete: %s!" + (S.stat_to_string legacy)) + end; + if not (S.complete stat) then + failwith + (Printf.sprintf + "Fusion.stat_keystone: incomplete: %s!" + (S.stat_to_string stat)); + stat_sign stat * PT.fold_left (fun acc wf -> acc * stat_sign wf) (stat_sign wf1') wfs' + let stat_keystone_logging v stats wf1 wfs = + let sign = stat_keystone v stats wf1 wfs in + Printf.eprintf + "Fusion.stat_keystone: %s * %s -> %d\n" + (M.flavor_to_string (A.flavor wf1)) + (ThoList.to_string + (fun wf -> M.flavor_to_string (A.flavor wf)) + (PT.to_list wfs)) + sign; + sign + (* Test all members of a list of wave functions are defined by the DAG simultaneously: *) let test_rhs dag (_, wfs) = PT.for_all (fun wf -> is_source wf && A.D.is_node wf dag) wfs (* Add the keystone [(wf1,pairs)] to [acc] only if it is present in [dag] and calculate the statistical factor depending on [stats] \emph{en passant}: *) let filter_keystone stats dag (wf1, pairs) acc = if is_source wf1 && A.D.is_node wf1 dag then match List.filter (test_rhs dag) pairs with | [] -> acc | pairs' -> (wf1, List.map (fun (c, wfs) -> - ({ Tagged_Coupling.sign = stat_keystone stats wf1 wfs; + ({ Tagged_Coupling.sign = stat_keystone c stats wf1 wfs; Tagged_Coupling.coupling = c; Tagged_Coupling.coupling_tag = A.Tags.null_coupling }, wfs)) pairs') :: acc else acc (* \begin{figure} \begin{center} \thocwincludegraphics{width=\textwidth}{bhabha0}\\ \hfil\\ \thocwincludegraphics{width=\textwidth}{bhabha} \end{center} \caption{\label{fig:bhabha} The DAGs for Bhabha scattering before and after weeding out unused nodes. The blatant asymmetry of these DAGs is caused by our prescription for removing doubling counting for an even number of external lines.} \end{figure} \begin{figure} \begin{center} \thocwincludegraphics{width=\textwidth}{epemudbarmunumubar0}\\ \hfil\\ \thocwincludegraphics{width=\textwidth}{epemudbarmunumubar} \end{center} \caption{\label{fig:epemudbarmunumubar} The DAGs for $e^+e^-\to u\bar d \mu^-\bar\nu_\mu$ before and after weeding out unused nodes.} \end{figure} \begin{figure} \begin{center} \thocwincludegraphics{width=\textwidth}{epemudbardubar0}\\ \hfil\\ \thocwincludegraphics{width=\textwidth}{epemudbardubar} \end{center} \caption{\label{fig:epemudbardubar} The DAGs for $e^+e^-\to u\bar d d\bar u$ before and after weeding out unused nodes.} \end{figure} *) (* \thocwmodulesubsection{Amplitudes} *) module C = Cascade.Make(M)(P) type selectors = C.selectors let external_wfs n particles = List.map (fun (f, p) -> ({ A.flavor = f; A.momentum = P.singleton n p; A.wf_tag = A.Tags.null_wf }, stat f p)) particles (* \thocwmodulesubsection{Main Function} *) module WFMap = Map.Make (struct type t = A.wf let compare = compare end) (* [map_amplitude_wfs f a] applies the function [f : wf -> wf] to all wavefunctions appearing in the amplitude [a]. *) let map_amplitude_wfs f a = let map_rhs (c, wfs) = (c, PT.map f wfs) in let map_braket (wf, rhs) = (f wf, List.map map_rhs rhs) and map_fusion (lhs, rhs) = (f lhs, List.map map_rhs rhs) in let map_dag = A.D.map f (fun node rhs -> map_rhs rhs) in let tower = map_dag a.A.fusion_tower and dag = map_dag a.A.fusion_dag in let dependencies_map = A.D.fold (fun wf _ -> WFMap.add wf (A.D.dependencies dag wf)) dag WFMap.empty in { A.fusions = List.map map_fusion a.A.fusions; A.brakets = List.map map_braket a.A.brakets; A.on_shell = a.A.on_shell; A.is_gauss = a.A.is_gauss; A.constraints = a.A.constraints; A.incoming = a.A.incoming; A.outgoing = a.A.outgoing; A.externals = List.map f a.A.externals; A.symmetry = a.A.symmetry; A.dependencies = (fun wf -> WFMap.find wf dependencies_map); A.fusion_tower = tower; A.fusion_dag = dag } (*i (* \begin{dubious} Just a silly little test: \end{dubious} *) let hack_amplitude = map_amplitude_wfs (fun wf -> { wf with momentum = P.split 2 16 wf.momentum }) i*) (* This is the main function that constructs the amplitude for sets of incoming and outgoing particles and returns the results in conveniently packaged pieces. *) let amplitude goldstones selectors fin fout = (* Set up external lines and match flavors with numbered momenta. *) let f = fin @ List.map M.conjugate fout in let nin, nout = List.length fin, List.length fout in let n = nin + nout in let externals = List.combine f (ThoList.range 1 n) in let wfs = external_wfs n externals in let select_p = C.select_p selectors in let select_wf = match fin with | [_] -> C.select_wf selectors P.Decay.timelike | _ -> C.select_wf selectors P.Scattering.timelike in let select_vtx = C.select_vtx selectors in (* Build the full fusion tower (including nodes that are never needed in the amplitude). *) let stats, tower = if goldstones then complete_fusion_tower select_wf select_vtx wfs else minimal_fusion_tower n select_wf select_vtx wfs in (* Find all vertices for which \emph{all} off shell wavefunctions are defined by the tower. *) let brakets = flavor_keystones (filter_keystone stats tower) select_p n (filter_vertices select_vtx (vertices (M.max_degree ()) (M.flavors ()))) (T.keystones (ThoList.range 1 n)) in (* Remove the part of the DAG that is never needed in the amplitude. *) let dag = if goldstones then tower else A.D.harvest_list tower (A.wavefunctions brakets) in (* Remove the leaf nodes of the DAG, corresponding to external lines. *) let fusions = List.filter (function (_, []) -> false | _ -> true) (A.D.lists dag) in (* Calculate the symmetry factor for identical particles in the final state. *) let symmetry = Combinatorics.symmetry fout in let dependencies_map = A.D.fold (fun wf _ -> WFMap.add wf (A.D.dependencies dag wf)) dag WFMap.empty in (* Finally: package the results: *) { A.fusions = fusions; A.brakets = brakets; A.on_shell = (fun wf -> C.on_shell selectors (A.flavor wf) wf.A.momentum); A.is_gauss = (fun wf -> C.is_gauss selectors (A.flavor wf) wf.A.momentum); A.constraints = C.description selectors; A.incoming = fin; A.outgoing = fout; A.externals = List.map fst wfs; A.symmetry = symmetry; A.dependencies = (fun wf -> WFMap.find wf dependencies_map); A.fusion_tower = tower; A.fusion_dag = dag } (* \thocwmodulesubsection{Color} *) module CM = Colorize.It(M) module CA = Amplitude(PT)(P)(CM) let colorize_wf flavor wf = { CA.flavor = flavor; CA.momentum = wf.A.momentum; CA.wf_tag = wf.A.wf_tag } let uncolorize_wf wf = { A.flavor = CM.flavor_sans_color wf.CA.flavor; A.momentum = wf.CA.momentum; A.wf_tag = wf.CA.wf_tag } (* \begin{dubious} At the end of the day, I shall want to have some sort of \textit{fibered DAG} as abstract data type, with a projection of colored nodes to their uncolored counterparts. \end{dubious} *) module CWFBundle = Bundle.Make (struct type elt = CA.wf let compare_elt = compare type base = A.wf let compare_base = compare let pi wf = { A.flavor = CM.flavor_sans_color wf.CA.flavor; A.momentum = wf.CA.momentum; A.wf_tag = wf.CA.wf_tag } end) (* \begin{dubious} For now, we can live with simple aggregation: \end{dubious} *) type fibered_dag = { dag : CA.D.t; bundle : CWFBundle.t } (* Not yet(?) needed: [module CS = Stat (CM)] *) let colorize_sterile_nodes dag f wf fibered_dag = if A.D.is_sterile wf dag then let wf', wf_bundle' = f wf fibered_dag in { dag = CA.D.add_node wf' fibered_dag.dag; bundle = wf_bundle' } else fibered_dag let colorize_nodes f wf rhs fibered_dag = let wf_rhs_list', wf_bundle' = f wf rhs fibered_dag in let dag' = List.fold_right (fun (wf', rhs') -> CA.D.add_offspring wf' rhs') wf_rhs_list' fibered_dag.dag in { dag = dag'; bundle = wf_bundle' } (* O'Caml (correctly) infers the type [val colorize_dag : (D.node -> D.edge * D.children -> fibered_dag -> (CA.D.node * (CA.D.edge * CA.D.children)) list * CWFBundle.t) -> (D.node -> fibered_dag -> CA.D.node * CWFBundle.t) -> D.t -> CWFBundle.t -> fibered_dag]. *) let colorize_dag f_node f_ext dag wf_bundle = A.D.fold (colorize_nodes f_node) dag (A.D.fold_nodes (colorize_sterile_nodes dag f_ext) dag { dag = CA.D.empty; bundle = wf_bundle }) let colorize_external wf fibered_dag = match CWFBundle.inv_pi wf fibered_dag.bundle with | [c_wf] -> (c_wf, fibered_dag.bundle) | [] -> failwith "colorize_external: not found" | _ -> failwith "colorize_external: not unique" let fuse_c_wf rhs = let momenta = PT.map (fun wf -> wf.CA.momentum) rhs in List.filter (fun (_, c) -> kmatrix_cuts c momenta) (CM.fuse (List.map (fun wf -> wf.CA.flavor) (PT.to_list rhs))) let colorize_coupling c coupling = { coupling with Tagged_Coupling.coupling = c } let colorize_fusion wf (coupling, children) fibered_dag = let match_flavor (f, _) = (CM.flavor_sans_color f = A.flavor wf) and find_colored wf' = CWFBundle.inv_pi wf' fibered_dag.bundle in let fusions = ThoList.flatmap (fun c_children -> List.map (fun (f, c) -> (colorize_wf f wf, (colorize_coupling c coupling, c_children))) (List.filter match_flavor (fuse_c_wf c_children))) (PT.product (PT.map find_colored children)) in let bundle = List.fold_right (fun (c_wf, _) -> CWFBundle.add c_wf) fusions fibered_dag.bundle in (fusions, bundle) let colorize_braket1 (wf, (coupling, children)) fibered_dag = let find_colored wf' = CWFBundle.inv_pi wf' fibered_dag.bundle in Product.fold2 (fun bra ket acc -> List.fold_left (fun brakets (f, c) -> if CM.conjugate bra.CA.flavor = f then (bra, (colorize_coupling c coupling, ket)) :: brakets else brakets) acc (fuse_c_wf ket)) (find_colored wf) (PT.product (PT.map find_colored children)) [] module CWFMap = Map.Make (struct type t = CA.wf let compare = CA.order_wf end) module CKetSet = Set.Make (struct type t = CA.rhs let compare = compare end) (* Find a set of kets in [map] that belong to [bra]. Return the empty set, if nothing is found. *) let lookup_ketset bra map = try CWFMap.find bra map with Not_found -> CKetSet.empty (* Return the set of kets belonging to [bra] in [map], augmented by [ket]. *) let addto_ketset bra ket map = CKetSet.add ket (lookup_ketset bra map) (* Augment or update [map] with a new [(bra, ket)] relation. *) let addto_ketset_map map (bra, ket) = CWFMap.add bra (addto_ketset bra ket map) map (* Take a list of [(bra, ket)] pairs and group the [ket]s according to [bra]. This is very similar to [ThoList.factorize] on page~\pageref{ThoList.factorize}, but the latter keeps duplicate copies, while we keep only one, with equality determined by [CA.order_wf]. *) (* \begin{dubious} Isn't [Bundle]~\ref{Bundle} the correct framework for this? \end{dubious} *) let factorize_brakets brakets = CWFMap.fold (fun bra ket acc -> (bra, CKetSet.elements ket) :: acc) (List.fold_left addto_ketset_map CWFMap.empty brakets) [] let colorize_braket (wf, rhs_list) fibered_dag = factorize_brakets (ThoList.flatmap (fun rhs -> (colorize_braket1 (wf, rhs) fibered_dag)) rhs_list) let colorize_amplitude a fin fout = let f = fin @ List.map CM.conjugate fout in let nin, nout = List.length fin, List.length fout in let n = nin + nout in let externals = List.combine f (ThoList.range 1 n) in let external_wfs = CA.external_wfs n externals in let wf_bundle = CWFBundle.of_list external_wfs in let fibered_dag = colorize_dag colorize_fusion colorize_external a.A.fusion_dag wf_bundle in let brakets = ThoList.flatmap (fun braket -> colorize_braket braket fibered_dag) a.A.brakets in let dag = CA.D.harvest_list fibered_dag.dag (CA.wavefunctions brakets) in let fusions = List.filter (function (_, []) -> false | _ -> true) (CA.D.lists dag) in let dependencies_map = CA.D.fold (fun wf _ -> CWFMap.add wf (CA.D.dependencies dag wf)) dag CWFMap.empty in { CA.fusions = fusions; CA.brakets = brakets; CA.constraints = a.A.constraints; CA.incoming = fin; CA.outgoing = fout; CA.externals = external_wfs; CA.fusion_dag = dag; CA.fusion_tower = dag; CA.symmetry = a.A.symmetry; CA.on_shell = (fun wf -> a.A.on_shell (uncolorize_wf wf)); CA.is_gauss = (fun wf -> a.A.is_gauss (uncolorize_wf wf)); CA.dependencies = (fun wf -> CWFMap.find wf dependencies_map) } let allowed amplitude = match amplitude.CA.brakets with | [] -> false | _ -> true let colorize_amplitudes a = List.fold_left (fun amps (fin, fout) -> let amp = colorize_amplitude a fin fout in if allowed amp then amp :: amps else amps) [] (CM.amplitude a.A.incoming a.A.outgoing) let amplitudes goldstones exclusions selectors fin fout = colorize_amplitudes (amplitude goldstones selectors fin fout) let amplitude_sans_color goldstones exclusions selectors fin fout = amplitude goldstones selectors fin fout type flavor = CA.flavor type flavor_sans_color = A.flavor type p = A.p type wf = CA.wf let conjugate = CA.conjugate let flavor = CA.flavor let flavor_sans_color wf = CM.flavor_sans_color (CA.flavor wf) let momentum = CA.momentum let momentum_list = CA.momentum_list let wf_tag = CA.wf_tag type coupling = CA.coupling let sign = CA.sign let coupling = CA.coupling let coupling_tag = CA.coupling_tag type exclusions = CA.exclusions let no_exclusions = CA.no_exclusions type 'a children = 'a CA.children type rhs = CA.rhs let children = CA.children type fusion = CA.fusion let lhs = CA.lhs let rhs = CA.rhs type braket = CA.braket let bra = CA.bra let ket = CA.ket type amplitude = CA.amplitude type amplitude_sans_color = A.amplitude let incoming = CA.incoming let outgoing = CA.outgoing let externals = CA.externals let fusions = CA.fusions let brakets = CA.brakets let symmetry = CA.symmetry let on_shell = CA.on_shell let is_gauss = CA.is_gauss let constraints = CA.constraints let variables a = List.map lhs (fusions a) let dependencies = CA.dependencies (* \thocwmodulesubsection{Checking Conservation Laws} *) let check_charges () = let vlist3, vlist4, vlistn = M.vertices () in List.filter (fun flist -> not (M.Ch.is_null (M.Ch.sum (List.map M.charges flist)))) (List.map (fun ((f1, f2, f3), _, _) -> [f1; f2; f3]) vlist3 @ List.map (fun ((f1, f2, f3, f4), _, _) -> [f1; f2; f3; f4]) vlist4 @ List.map (fun (flist, _, _) -> flist) vlistn) (* \thocwmodulesubsection{Diagnostics} *) let count_propagators a = List.length a.CA.fusions let count_fusions a = List.fold_left (fun n (_, a) -> n + List.length a) 0 a.CA.fusions + List.fold_left (fun n (_, t) -> n + List.length t) 0 a.CA.brakets + List.length a.CA.brakets (* \begin{dubious} This brute force approach blows up for more than ten particles. Find a smarter algorithm. \end{dubious} *) let count_diagrams a = List.fold_left (fun n (wf1, wf23) -> n + CA.D.count_trees wf1 a.CA.fusion_dag * (List.fold_left (fun n' (_, wfs) -> n' + PT.fold_left (fun n'' wf -> n'' * CA.D.count_trees wf a.CA.fusion_dag) 1 wfs) 0 wf23)) 0 a.CA.brakets exception Impossible let forest' a = let below wf = CA.D.forest_memoized wf a.CA.fusion_dag in ThoList.flatmap (fun (bra, ket) -> (Product.list2 (fun bra' ket' -> bra' :: ket') (below bra) (ThoList.flatmap (fun (_, wfs) -> Product.list (fun w -> w) (PT.to_list (PT.map below wfs))) ket))) a.CA.brakets let cross wf = { CA.flavor = CM.conjugate wf.CA.flavor; CA.momentum = P.neg wf.CA.momentum; CA.wf_tag = wf.CA.wf_tag } let fuse_trees wf ts = Tree.fuse (fun (wf', e) -> (cross wf', e)) wf (fun t -> List.mem wf (Tree.leafs t)) ts let forest wf a = List.map (fuse_trees wf) (forest' a) (*i (* \begin{dubious} The following duplication should be replaced by polymorphism or a functor. \end{dubious} *) let forest_uncolored' a = let below wf = A.D.forest_memoized wf a.A.fusion_dag in ThoList.flatmap (fun (bra, ket) -> (Product.list2 (fun bra' ket' -> bra' :: ket') (below bra) (ThoList.flatmap (fun (_, wfs) -> Product.list (fun w -> w) (PT.to_list (PT.map below wfs))) ket))) a.A.brakets let cross_uncolored wf = { A.flavor = M.conjugate wf.A.flavor; A.momentum = P.neg wf.A.momentum; A.wf_tag = wf.A.wf_tag } let fuse_trees_uncolored wf ts = Tree.fuse (fun (wf', e) -> (cross_uncolored wf', e)) wf (fun t -> List.mem wf (Tree.leafs t)) ts let forest_sans_color wf a = List.map (fuse_trees_uncolored wf) (forest_uncolored' a) i*) let poles_beneath wf dag = CA.D.eval_memoized (fun wf' -> [[]]) (fun wf' _ p -> List.map (fun p' -> wf' :: p') p) (fun wf1 wf2 -> Product.fold2 (fun wf' wfs' wfs'' -> (wf' @ wfs') :: wfs'') wf1 wf2 []) (@) [[]] [[]] wf dag let poles a = ThoList.flatmap (fun (wf1, wf23) -> let poles_wf1 = poles_beneath wf1 a.CA.fusion_dag in (ThoList.flatmap (fun (_, wfs) -> Product.list List.flatten (PT.to_list (PT.map (fun wf -> poles_wf1 @ poles_beneath wf a.CA.fusion_dag) wfs))) wf23)) a.CA.brakets module WFSet = Set.Make (struct type t = CA.wf let compare = CA.order_wf end) let s_channel a = WFSet.elements (ThoList.fold_right2 (fun wf wfs -> if P.Scattering.timelike wf.CA.momentum then WFSet.add wf wfs else wfs) (poles a) WFSet.empty) (* \begin{dubious} This should be much faster! Is it correct? Is it faster indeed? \end{dubious} *) let poles' a = List.map CA.lhs a.CA.fusions let s_channel a = WFSet.elements (List.fold_right (fun wf wfs -> if P.Scattering.timelike wf.CA.momentum then WFSet.add wf wfs else wfs) (poles' a) WFSet.empty) (* \thocwmodulesubsection{Pictures} *) (* Export the DAG in the \texttt{dot(1)} file format so that we can draw pretty pictures to impress audiences \ldots *) let p2s p = if p >= 0 && p <= 9 then string_of_int p else if p <= 36 then String.make 1 (Char.chr (Char.code 'A' + p - 10)) else "_" let variable wf = CM.flavor_symbol wf.CA.flavor ^ String.concat "" (List.map p2s (P.to_ints wf.CA.momentum)) module Int = Map.Make (struct type t = int let compare = compare end) let add_to_list i n m = Int.add i (n :: try Int.find i m with Not_found -> []) m let classify_nodes dag = Int.fold (fun i n acc -> (i, n) :: acc) (CA.D.fold_nodes (fun wf -> add_to_list (P.rank wf.CA.momentum) wf) dag Int.empty) [] let dag_to_dot ch brakets dag = Printf.fprintf ch "digraph OMEGA {\n"; CA.D.iter_nodes (fun wf -> Printf.fprintf ch " \"%s\" [ label = \"%s\" ];\n" (variable wf) (variable wf)) dag; List.iter (fun (_, wfs) -> Printf.fprintf ch " { rank = same;"; List.iter (fun n -> Printf.fprintf ch " \"%s\";" (variable n)) wfs; Printf.fprintf ch " };\n") (classify_nodes dag); List.iter (fun n -> Printf.fprintf ch " \"*\" -> \"%s\";\n" (variable n)) (flatten_keystones brakets); CA.D.iter (fun n (_, ns) -> let p = variable n in PT.iter (fun n' -> Printf.fprintf ch " \"%s\" -> \"%s\";\n" p (variable n')) ns) dag; Printf.fprintf ch "}\n" let tower_to_dot ch a = dag_to_dot ch a.CA.brakets a.CA.fusion_tower let amplitude_to_dot ch a = dag_to_dot ch a.CA.brakets a.CA.fusion_dag (* \thocwmodulesubsection{Phasespace} *) let variable wf = M.flavor_to_string wf.A.flavor ^ "[" ^ String.concat "/" (List.map p2s (P.to_ints wf.A.momentum)) ^ "]" let below_to_channel transform ch dag wf = let n2s wf = variable (transform wf) and e2s c = "" in Tree2.to_channel ch n2s e2s (A.D.dependencies dag wf) let bra_to_channel transform ch dag wf = let tree = A.D.dependencies dag wf in if Tree2.is_singleton tree then let n2s wf = variable (transform wf) and e2s c = "" in Tree2.to_channel ch n2s e2s tree else failwith "Fusion.phase_space_channels: wrong topology!" let ket_to_channel transform ch dag ket = Printf.fprintf ch "("; begin match A.children ket with | [] -> () | [child] -> below_to_channel transform ch dag child | child :: children -> below_to_channel transform ch dag child; List.iter (fun child -> Printf.fprintf ch ","; below_to_channel transform ch dag child) children end; Printf.fprintf ch ")" let phase_space_braket transform ch (bra, ket) dag = bra_to_channel transform ch dag bra; Printf.fprintf ch ": {"; begin match ket with | [] -> () | [ket1] -> Printf.fprintf ch " "; ket_to_channel transform ch dag ket1 | ket1 :: kets -> Printf.fprintf ch " "; ket_to_channel transform ch dag ket1; List.iter (fun k -> Printf.fprintf ch " \\\n | "; ket_to_channel transform ch dag k) kets end; Printf.fprintf ch " }\n" (*i Food for thought: let braket_to_tree2 dag (bra, ket) = let bra' = A.D.dependencies dag bra in if Tree2.is_singleton bra' then Tree2.cons [(fst ket, bra, List.map (A.D.dependencies dag) (A.children ket))] else failwith "Fusion.phase_space_channels: wrong topology!" let phase_space_braket transform ch (bra, ket) dag = let n2s wf = variable (transform wf) and e2s c = "" in Printf.fprintf ch "%s\n" (Tree2.to_string n2s e2s (braket_to_tree2 dag (bra, ket))) i*) let phase_space_channels_transformed transform ch a = List.iter (fun braket -> phase_space_braket transform ch braket a.A.fusion_dag) a.A.brakets let phase_space_channels ch a = phase_space_channels_transformed (fun wf -> wf) ch a let exchange_momenta_list p1 p2 p = List.map (fun pi -> if pi = p1 then p2 else if pi = p2 then p1 else pi) p let exchange_momenta p1 p2 p = P.of_ints (P.dim p) (exchange_momenta_list p1 p2 (P.to_ints p)) let flip_momenta wf = { wf with A.momentum = exchange_momenta 1 2 wf.A.momentum } let phase_space_channels_flipped ch a = phase_space_channels_transformed flip_momenta ch a end module Make = Tagged(No_Tags) module Binary = Make(Tuple.Binary)(Stat_Dirac)(Topology.Binary) module Tagged_Binary (T : Tagger) = Tagged(T)(Tuple.Binary)(Stat_Dirac)(Topology.Binary) (* \thocwmodulesection{Fusions with Majorana Fermions} *) module Stat_Majorana (M : Model.T) : (Stat with type flavor = M.flavor) = struct type flavor = M.flavor type stat = | Fermion of int * int list | AntiFermion of int * int list | Boson of int list | Majorana of int * int list + let lines_to_string lines = + ThoList.to_string string_of_int lines + + let stat_to_string = function + | Boson lines -> Printf.sprintf "Boson %s" (lines_to_string lines) + | Fermion (p, lines) -> + Printf.sprintf "Fermion (%d, %s)" p (lines_to_string lines) + | AntiFermion (p, lines) -> + Printf.sprintf "AntiFermion (%d, %s)" p (lines_to_string lines) + | Majorana (p, lines) -> + Printf.sprintf "Fermion (%d, %s)" p (lines_to_string lines) + + let equal s1 s2 = + match s1, s2 with + | Boson l1, Boson l2 -> l1 = l2 + | Majorana (p1, l1), Majorana (p2, l2) + | Fermion (p1, l1), Fermion (p2, l2) + | AntiFermion (p1, l1), AntiFermion (p2, l2) -> p1 = p2 && l1 = l2 + | _ -> false + + let complete = function + | Boson _ -> true + | _ -> false + let stat f p = - let s = M.fermion f in - if s = 0 then - Boson [] - else if s < 0 then - AntiFermion (p, []) - else if s = 1 then (* [if s = 1 then] *) - Fermion (p, []) - else (* [if s > 1 then] *) - Majorana (p, []) + match M.fermion f with + | 0 -> Boson [] + | 1 -> Fermion (p, []) + | -1 -> AntiFermion (p, []) + | 2 -> Majorana (p, []) + | _ -> invalid_arg "Fusion.Stat_Majorana: invalid fermion number" (* \begin{JR} In the formalism of~\cite{Denner:Majorana}, it does not matter to distinguish spinors and conjugate spinors, it is only important to know in which direction a fermion line is calculated. So the sign is made by the calculation together with an aditional one due to the permuation of the pairs of endpoints of fermion lines in the direction they are calculated. We propose a ``canonical'' direction from the right to the left child at a fusion point so we only have to keep in mind which external particle hangs at each side. Therefore we need not to have a list of pairs of conjugate spinors and spinors but just a list in which the pairs are right-left-right-left and so on. Unfortunately it is unavoidable to have couplings with clashing arrows in supersymmetric theories so we need transmutations from fermions in antifermions and vice versa as well. \end{JR} *) exception Impossible (*i let stat_fuse s1 s2 f = match s1, s2, M.lorentz f with | Boson l1, Boson l2, _ -> Boson (l1 @ l2) | Boson l1, Fermion (p, l2), Coupling.Majorana -> Majorana (p, l1 @ l2) | Boson l1, Fermion (p, l2), _ -> Fermion (p, l1 @ l2) | Boson l1, AntiFermion (p, l2), Coupling.Majorana -> Majorana (p, l1 @ l2) | Boson l1, AntiFermion (p, l2), _ -> AntiFermion (p, l1 @ l2) | Fermion (p, l1), Boson l2, Coupling.Majorana -> Majorana (p, l1 @ l2) | Fermion (p, l1), Boson l2, _ -> Fermion (p, l1 @ l2) | AntiFermion (p, l1), Boson l2, Coupling.Majorana -> Majorana (p, l1 @ l2) | AntiFermion (p, l1), Boson l2, _ -> AntiFermion (p, l1 @ l2) | Majorana (p, l1), Boson l2, Coupling.Spinor -> Fermion (p, l1 @ l2) | Majorana (p, l1), Boson l2, Coupling.ConjSpinor -> AntiFermion (p, l1 @ l2) | Majorana (p, l1), Boson l2, _ -> Majorana (p, l1 @ l2) | Boson l1, Majorana (p, l2), Coupling.Spinor -> Fermion (p, l1 @ l2) | Boson l1, Majorana (p, l2), Coupling.ConjSpinor -> AntiFermion (p, l1 @ l2) | Boson l1, Majorana (p, l2), _ -> Majorana (p, l1 @ l2) | AntiFermion (pbar, l1), Fermion (p, l2), _ -> Boson ([p; pbar] @ l1 @ l2) | Fermion (p, l1), AntiFermion (pbar, l2), _ -> Boson ([pbar; p] @ l1 @ l2) | Fermion (pf, l1), Majorana (pm, l2), _ -> Boson ([pm; pf] @ l1 @ l2) | Majorana (pm, l1), Fermion (pf, l2), _ -> Boson ([pf; pm] @ l1 @ l2) | AntiFermion (pa, l1), Majorana (pm, l2), _ -> Boson ([pm; pa] @ l1 @ l2) | Majorana (pm, l1), AntiFermion (pa, l2), _ -> Boson ([pa; pm] @ l1 @ l2) | Majorana (p1, l1), Majorana (p2, l2), _ -> Boson ([p2; p1] @ l1 @ l2) | Fermion _, Fermion _, _ | AntiFermion _, AntiFermion _, _ -> raise Impossible i*) - let stat_fuse s1 s2 f = + let stat_fuse_pair_legacy f s1 s2 = match s1, s2, M.lorentz f with | Boson l1, Fermion (p, l2), Coupling.Majorana | Boson l1, AntiFermion (p, l2), Coupling.Majorana | Fermion (p, l1), Boson l2, Coupling.Majorana | AntiFermion (p, l1), Boson l2, Coupling.Majorana | Majorana (p, l1), Boson l2, Coupling.Majorana | Boson l1, Majorana (p, l2), Coupling.Majorana -> Majorana (p, l1 @ l2) | Boson l1, Fermion (p, l2), Coupling.Spinor | Boson l1, AntiFermion (p, l2), Coupling.Spinor | Fermion (p, l1), Boson l2, Coupling.Spinor | AntiFermion (p, l1), Boson l2, Coupling.Spinor | Majorana (p, l1), Boson l2, Coupling.Spinor | Boson l1, Majorana (p, l2), Coupling.Spinor -> Fermion (p, l1 @ l2) | Boson l1, Fermion (p, l2), Coupling.ConjSpinor | Boson l1, AntiFermion (p, l2), Coupling.ConjSpinor | Fermion (p, l1), Boson l2, Coupling.ConjSpinor | AntiFermion (p, l1), Boson l2, Coupling.ConjSpinor | Majorana (p, l1), Boson l2, Coupling.ConjSpinor | Boson l1, Majorana (p, l2), Coupling.ConjSpinor -> AntiFermion (p, l1 @ l2) | Boson l1, Fermion (p, l2), Coupling.Vectorspinor | Boson l1, AntiFermion (p, l2), Coupling.Vectorspinor | Fermion (p, l1), Boson l2, Coupling.Vectorspinor | AntiFermion (p, l1), Boson l2, Coupling.Vectorspinor | Majorana (p, l1), Boson l2, Coupling.Vectorspinor | Boson l1, Majorana (p, l2), Coupling.Vectorspinor -> Majorana (p, l1 @ l2) | Boson l1, Boson l2, _ -> Boson (l1 @ l2) | AntiFermion (p1, l1), Fermion (p2, l2), _ | Fermion (p1, l1), AntiFermion (p2, l2), _ | Fermion (p1, l1), Fermion (p2, l2), _ | AntiFermion (p1, l1), AntiFermion (p2, l2), _ | Fermion (p1, l1), Majorana (p2, l2), _ | Majorana (p1, l1), Fermion (p2, l2), _ | AntiFermion (p1, l1), Majorana (p2, l2), _ | Majorana (p1, l1), AntiFermion (p2, l2), _ | Majorana (p1, l1), Majorana (p2, l2), _ -> Boson ([p2; p1] @ l1 @ l2) | Boson l1, Majorana (p, l2), _ -> Majorana (p, l1 @ l2) | Boson l1, Fermion (p, l2), _ -> Fermion (p, l1 @ l2) | Boson l1, AntiFermion (p, l2), _ -> AntiFermion (p, l1 @ l2) | Fermion (p, l1), Boson l2, _ -> Fermion (p, l1 @ l2) | AntiFermion (p, l1), Boson l2, _ -> AntiFermion (p, l1 @ l2) | Majorana (p, l1), Boson l2, _ -> Majorana (p, l1 @ l2) + let stat_fuse_pair_legacy_logging f s1 s2 = + let stat = stat_fuse_pair_legacy f s1 s2 in + Printf.eprintf + "Fusion.Stat_Majorana.stat_fuse_pair_legacy: %s <- %s -> %s\n" + (M.flavor_to_string f) + (ThoList.to_string stat_to_string [s1; s2]) + (stat_to_string stat); + stat + + let stat_fuse_legacy s1 s23__n f = + List.fold_left (stat_fuse_pair_legacy f) s1 s23__n + + let stat_fuse_legacy_logging s1 s23__n f = + let stat = stat_fuse_legacy s1 s23__n f in + Printf.eprintf + "Fusion.Stat_Majorana.stat_fuse_legacy: %s <- %s -> %s\n" + (M.flavor_to_string f) + (ThoList.to_string stat_to_string (s1 :: s23__n)) + (stat_to_string stat); + stat + + module IMap = Map.Make (struct type t = int let compare = compare end) + + type partial = + { stat : stat; + majoranas : int IMap.t; + n : int } + + let partial_to_string p = + Printf.sprintf + "n = %d, majoranas = %s, stat = %s" + p.n + (ThoList.to_string + (fun (i, f) -> Printf.sprintf "%d@%d" f i) + (IMap.bindings p.majoranas)) + (stat_to_string p.stat) + + let add_lines l = function + | Boson l' -> Boson (l @ l') + | Fermion (n, l') -> Fermion (n, l @ l') + | AntiFermion (n, l') -> AntiFermion (n, l @ l') + | Majorana (n, l') -> Majorana (n, l @ l') + + let partial_of_slist slist = + List.fold_left + (fun acc s -> + let n = succ acc.n in + match s with + | Boson l -> + { acc with + stat = add_lines l acc.stat; + n } + | Fermion (p, l) -> + invalid_arg + "Fusion.Stat_Majorana.partial_of_slist: unexpected Fermion" + | AntiFermion (p, l) -> + invalid_arg + "Fusion.Stat_Majorana.partial_of_slist: unexpected AntiFermion" + | Majorana (p, l) -> + { majoranas = IMap.add n p acc.majoranas; + stat = add_lines l acc.stat; + n } ) + { stat = Boson []; + majoranas = IMap.empty; + n = 0 } + slist + + let find_opt p map = + try Some (IMap.find p map) with Not_found -> None + + let match_fermion_line p (i, j) = + if i <= p.n && j <= p.n then + match find_opt i p.majoranas, find_opt j p.majoranas with + | Some f1, Some f2 -> + { p with + stat = add_lines [f2; f1] p.stat; + majoranas = IMap.remove i (IMap.remove j p.majoranas) } + | _ -> + invalid_arg "match_fermion_line: mismatch" + else if i <= p.n then + match find_opt i p.majoranas, p.stat with + | Some f, Boson l -> + { p with + stat = Majorana (f, l); + majoranas = IMap.remove i p.majoranas } + | _ -> + invalid_arg "match_fermion_line: mismatch" + else if j <= p.n then + match find_opt j p.majoranas, p.stat with + | Some f, Boson l -> + { p with + stat = Majorana (f, l); + majoranas = IMap.remove j p.majoranas } + | _ -> + invalid_arg "match_fermion_line: mismatch" + else + failwith "match_fermion_line: impossible" + + let match_fermion_line_logging p (i, j) = + Printf.eprintf + "Fusion.match_fermion_line <<< %s (%d, %d)\n" + (partial_to_string p) i j; + let p' = match_fermion_line p (i, j) in + Printf.eprintf + "Fusion.match_fermion_line >>> %s\n" + (partial_to_string p'); + p' + + let match_fermion_lines flines s1 s23__n = + let p = partial_of_slist (s1 :: s23__n) in + List.fold_left match_fermion_line p flines + + let stat_fuse_new flines s1 s23__n f = + (match_fermion_lines flines s1 s23__n).stat + + let stat_fuse_new_checking flines s1 s23__n f = + let stat = stat_fuse_new flines s1 s23__n f in + if List.length flines < 2 then + begin + let legacy = stat_fuse_legacy s1 s23__n f in + if not (equal stat legacy) then + failwith + (Printf.sprintf + "Fusion.Stat_Majorana.stat_fuse_new: %s <> %s!" + (stat_to_string stat) + (stat_to_string legacy)) + end; + stat + + let stat_fuse_new_logging flines s1 s23__n f = + Printf.eprintf + "Fusion.Stat_Majorana.stat_fuse_new: \ + connecting fermion lines %s in %s <- %s\n" + (UFO_Lorentz.fermion_lines_to_string flines) + (M.flavor_to_string f) + (ThoList.to_string stat_to_string (s1 :: s23__n)); + stat_fuse_new_checking flines s1 s23__n f + + let stat_fuse flines_opt slist f = + match slist with + | [] -> invalid_arg "Fusion.Stat_Majorana.stat_fuse: empty" + | s1 :: s23__n -> + begin match flines_opt with + | Some flines -> stat_fuse_new flines s1 s23__n f + | None -> stat_fuse_legacy s1 s23__n f + end + + let stat_fuse_logging flines_opt slist f = + Printf.eprintf + "Fusion.Stat_Majorana.stat_fuse: %s <- %s\n" + (M.flavor_to_string f) + (ThoList.to_string stat_to_string slist); + stat_fuse flines_opt slist f + + (* JRR's alogrithm depends on the ordering! *) + let stat_keystone_legacy s1 s23__n f = + let s2 = List.hd s23__n + and s34__n = List.tl s23__n in + stat_fuse_legacy (stat_fuse_legacy s2 s34__n (M.conjugate f)) [s1] f + + let stat_keystone_legacy_logging s1 s23__n f = + let s = stat_keystone_legacy s1 s23__n f in + Printf.eprintf + "Fusion.Stat_Majorana.stat_keystone_legacy: %s (%s) %s -> %s\n" + (stat_to_string s1) + (M.flavor_to_string f) + (ThoList.to_string stat_to_string s23__n) + (stat_to_string s); + s + + let stat_keystone flines_opt slist f = + match slist with + | [] -> invalid_arg "Fusion.Stat_Majorana.stat_keystone: empty" + | s1 :: s23__n -> + begin match flines_opt with + | None -> stat_keystone_legacy s1 s23__n f + | Some flines -> + let stat = stat_fuse_new flines s1 s23__n f in + if complete stat then + stat + else + failwith + (Printf.sprintf + "Fusion.Stat_Majorana.stat_keystone: incomplete %s!" + (stat_to_string stat)) + end + (*i These are the old Impossible raising rules. We keep them to ask Ohl what the generalized topologies do and if our stat_fuse does the right for 4-vertices with | Boson l1, AntiFermion (p, l2), _ | Fermion (p, l1), Boson l2, _ | AntiFermion (p, l1), Boson l2, _ | Majorana (p, l1), Boson l2, _ | Boson l1, Majorana (p, l2), _ -> raise Impossible i*) let permutation lines = fst (Combinatorics.sort_signed lines) let stat_sign = function | Boson lines -> permutation lines | Fermion (p, lines) -> permutation (p :: lines) | AntiFermion (pbar, lines) -> permutation (pbar :: lines) | Majorana (pm, lines) -> permutation (pm :: lines) + let stat_sign_logging stat = + let sign = stat_sign stat in + Printf.eprintf + "Fusion.Stat_Majorana.stat_sign: %s -> %d\n" + (stat_to_string stat) sign; + sign + end module Binary_Majorana = Make(Tuple.Binary)(Stat_Majorana)(Topology.Binary) module Nary (B: Tuple.Bound) = Make(Tuple.Nary(B))(Stat_Dirac)(Topology.Nary(B)) module Nary_Majorana (B: Tuple.Bound) = Make(Tuple.Nary(B))(Stat_Majorana)(Topology.Nary(B)) module Mixed23 = Make(Tuple.Mixed23)(Stat_Dirac)(Topology.Mixed23) module Mixed23_Majorana = Make(Tuple.Mixed23)(Stat_Majorana)(Topology.Mixed23) module Helac (B: Tuple.Bound) = Make(Tuple.Nary(B))(Stat_Dirac)(Topology.Helac(B)) module Helac_Majorana (B: Tuple.Bound) = Make(Tuple.Nary(B))(Stat_Majorana)(Topology.Helac(B)) (* \thocwmodulesection{Multiple Amplitudes} *) module type Multi = sig exception Mismatch val options : Options.t type flavor type process = flavor list * flavor list type amplitude type fusion type wf type exclusions val no_exclusions : exclusions type selectors type amplitudes val amplitudes : bool -> int option -> exclusions -> selectors -> process list -> amplitudes val empty : amplitudes val initialize_cache : string -> unit val set_cache_name : string -> unit val flavors : amplitudes -> process list val vanishing_flavors : amplitudes -> process list val color_flows : amplitudes -> Color.Flow.t list val helicities : amplitudes -> (int list * int list) list val processes : amplitudes -> amplitude list val process_table : amplitudes -> amplitude option array array val fusions : amplitudes -> (fusion * amplitude) list val multiplicity : amplitudes -> wf -> int val dictionary : amplitudes -> amplitude -> wf -> int val color_factors : amplitudes -> Color.Flow.factor array array val constraints : amplitudes -> string option end module type Multi_Maker = functor (Fusion_Maker : Maker) -> functor (P : Momentum.T) -> functor (M : Model.T) -> Multi with type flavor = M.flavor and type amplitude = Fusion_Maker(P)(M).amplitude and type fusion = Fusion_Maker(P)(M).fusion and type wf = Fusion_Maker(P)(M).wf and type selectors = Fusion_Maker(P)(M).selectors module Multi (Fusion_Maker : Maker) (P : Momentum.T) (M : Model.T) = struct exception Mismatch type progress_mode = | Quiet | Channel of out_channel | File of string let progress_option = ref Quiet module CM = Colorize.It(M) module F = Fusion_Maker(P)(M) module C = Cascade.Make(M)(P) (* \begin{dubious} A kludge, at best \ldots \end{dubious} *) let options = Options.extend F.options [ "progress", Arg.Unit (fun () -> progress_option := Channel stderr), "report progress to the standard error stream"; "progress_file", Arg.String (fun s -> progress_option := File s), "report progress to a file" ] type flavor = M.flavor type p = F.p type process = flavor list * flavor list type amplitude = F.amplitude type fusion = F.fusion type wf = F.wf type exclusions = F.exclusions let no_exclusions = F.no_exclusions type selectors = F.selectors type flavors = flavor list array type helicities = int list array type colors = Color.Flow.t array type amplitudes' = amplitude array array array type amplitudes = { flavors : process list; vanishing_flavors : process list; color_flows : Color.Flow.t list; helicities : (int list * int list) list; processes : amplitude list; process_table : amplitude option array array; fusions : (fusion * amplitude) list; multiplicity : (wf -> int); dictionary : (amplitude -> wf -> int); color_factors : Color.Flow.factor array array; constraints : string option } let flavors a = a.flavors let vanishing_flavors a = a.vanishing_flavors let color_flows a = a.color_flows let helicities a = a.helicities let processes a = a.processes let process_table a = a.process_table let fusions a = a.fusions let multiplicity a = a.multiplicity let dictionary a = a.dictionary let color_factors a = a.color_factors let constraints a = a.constraints let sans_colors f = List.map CM.flavor_sans_color f let colors (fin, fout) = List.map M.color (fin @ fout) let process_sans_color a = (sans_colors (F.incoming a), sans_colors (F.outgoing a)) let color_flow a = CM.flow (F.incoming a) (F.outgoing a) let process_to_string fin fout = String.concat " " (List.map M.flavor_to_string fin) ^ " -> " ^ String.concat " " (List.map M.flavor_to_string fout) let count_processes colored_processes = List.length colored_processes module FMap = Map.Make (struct type t = process let compare = compare end) module CMap = Map.Make (struct type t = Color.Flow.t let compare = compare end) (* Recently [Product.list] began to guarantee lexicographic order for sorted arguments. Anyway, we still force a lexicographic order. *) let rec order_spin_table1 s1 s2 = match s1, s2 with | h1 :: t1, h2 :: t2 -> let c = compare h1 h2 in if c <> 0 then c else order_spin_table1 t1 t2 | [], [] -> 0 | _ -> invalid_arg "order_spin_table: inconsistent lengths" let order_spin_table (s1_in, s1_out) (s2_in, s2_out) = let c = compare s1_in s2_in in if c <> 0 then c else order_spin_table1 s1_out s2_out let sort_spin_table table = List.sort order_spin_table table let id x = x let pair x y = (x, y) (* \begin{dubious} Improve support for on shell Ward identities: [Coupling.Vector -> [4]] for one and only one external vector. \end{dubious} *) let rec hs_of_lorentz = function | Coupling.Scalar -> [0] | Coupling.Spinor | Coupling.ConjSpinor | Coupling.Majorana | Coupling.Maj_Ghost -> [-1; 1] | Coupling.Vector -> [-1; 1] | Coupling.Massive_Vector -> [-1; 0; 1] | Coupling.Tensor_1 -> [-1; 0; 1] | Coupling.Vectorspinor -> [-2; -1; 1; 2] | Coupling.Tensor_2 -> [-2; -1; 0; 1; 2] | Coupling.BRS f -> hs_of_lorentz f let hs_of_flavor f = hs_of_lorentz (M.lorentz f) let hs_of_flavors (fin, fout) = (List.map hs_of_flavor fin, List.map hs_of_flavor fout) let rec unphysical_of_lorentz = function | Coupling.Vector -> [4] | Coupling.Massive_Vector -> [4] | _ -> invalid_arg "unphysical_of_lorentz: not a vector particle" let unphysical_of_flavor f = unphysical_of_lorentz (M.lorentz f) let unphysical_of_flavors1 n f_list = ThoList.mapi (fun i f -> if i = n then unphysical_of_flavor f else hs_of_flavor f) 1 f_list let unphysical_of_flavors n (fin, fout) = (unphysical_of_flavors1 n fin, unphysical_of_flavors1 (n - List.length fin) fout) let helicity_table unphysical flavors = let hs = begin match unphysical with | None -> List.map hs_of_flavors flavors | Some n -> List.map (unphysical_of_flavors n) flavors end in if not (ThoList.homogeneous hs) then invalid_arg "Fusion.helicity_table: not all flavors have the same helicity states!" else match hs with | [] -> [] | (hs_in, hs_out) :: _ -> sort_spin_table (Product.list2 pair (Product.list id hs_in) (Product.list id hs_out)) module Proc = Process.Make(M) module WFMap = Map.Make (struct type t = F.wf let compare = compare end) module WFSet2 = Set.Make (struct type t = F.wf * (F.wf, F.coupling) Tree2.t let compare = compare end) module WFMap2 = Map.Make (struct type t = F.wf * (F.wf, F.coupling) Tree2.t let compare = compare end) module WFTSet = Set.Make (struct type t = (F.wf, F.coupling) Tree2.t let compare = compare end) (* All wavefunctions are unique per amplitude. So we can use per-amplitude dependency trees without additional \emph{internal} tags to identify identical wave functions. *) (* \textbf{NB:} we miss potential optimizations, because we assume all coupling to be different, while in fact we have horizontal/family symmetries and non abelian gauge couplings are universal anyway. *) let disambiguate_fusions amplitudes = let fusions = ThoList.flatmap (fun amplitude -> List.map (fun fusion -> (fusion, F.dependencies amplitude (F.lhs fusion))) (F.fusions amplitude)) amplitudes in let duplicates = List.fold_left (fun map (fusion, dependencies) -> let wf = F.lhs fusion in let set = try WFMap.find wf map with Not_found -> WFTSet.empty in WFMap.add wf (WFTSet.add dependencies set) map) WFMap.empty fusions in let multiplicity_map = WFMap.fold (fun wf dependencies acc -> let cardinal = WFTSet.cardinal dependencies in if cardinal <= 1 then acc else WFMap.add wf cardinal acc) duplicates WFMap.empty and dictionary_map = WFMap.fold (fun wf dependencies acc -> let cardinal = WFTSet.cardinal dependencies in if cardinal <= 1 then acc else snd (WFTSet.fold (fun dependency (i', acc') -> (succ i', WFMap2.add (wf, dependency) i' acc')) dependencies (1, acc))) duplicates WFMap2.empty in let multiplicity wf = WFMap.find wf multiplicity_map and dictionary amplitude wf = WFMap2.find (wf, F.dependencies amplitude wf) dictionary_map in (multiplicity, dictionary) let eliminate_common_fusions1 seen_wfs amplitude = List.fold_left (fun (seen, acc) f -> let wf = F.lhs f in let dependencies = F.dependencies amplitude wf in if WFSet2.mem (wf, dependencies) seen then (seen, acc) else (WFSet2.add (wf, dependencies) seen, (f, amplitude) :: acc)) seen_wfs (F.fusions amplitude) let eliminate_common_fusions processes = let _, rev_fusions = List.fold_left eliminate_common_fusions1 (WFSet2.empty, []) processes in List.rev rev_fusions (*i let eliminate_common_fusions processes = ThoList.flatmap (fun amplitude -> (List.map (fun f -> (f, amplitude)) (F.fusions amplitude))) processes i*) (* \thocwmodulesubsection{Calculate All The Amplitudes} *) let amplitudes goldstones unphysical exclusions select_wf processes = (* \begin{dubious} Eventually, we might want to support inhomogeneous helicities. However, this makes little physics sense for external particles on the mass shell, unless we have a model with degenerate massive fermions and bosons. \end{dubious} *) if not (ThoList.homogeneous (List.map hs_of_flavors processes)) then invalid_arg "Fusion.Multi.amplitudes: incompatible helicities"; let unique_uncolored_processes = Proc.remove_duplicate_final_states (C.partition select_wf) processes in let progress = match !progress_option with | Quiet -> Progress.dummy | Channel oc -> Progress.channel oc (count_processes unique_uncolored_processes) | File name -> Progress.file name (count_processes unique_uncolored_processes) in let allowed = ThoList.flatmap (fun (fi, fo) -> Progress.begin_step progress (process_to_string fi fo); let amps = F.amplitudes goldstones exclusions select_wf fi fo in begin match amps with | [] -> Progress.end_step progress "forbidden" | _ -> Progress.end_step progress "allowed" end; amps) unique_uncolored_processes in Progress.summary progress "all processes done"; let color_flows = ThoList.uniq (List.sort compare (List.map color_flow allowed)) and flavors = ThoList.uniq (List.sort compare (List.map process_sans_color allowed)) in let vanishing_flavors = Proc.diff processes flavors in let helicities = helicity_table unphysical flavors in let f_index = fst (List.fold_left (fun (m, i) f -> (FMap.add f i m, succ i)) (FMap.empty, 0) flavors) and c_index = fst (List.fold_left (fun (m, i) c -> (CMap.add c i m, succ i)) (CMap.empty, 0) color_flows) in let table = Array.make_matrix (List.length flavors) (List.length color_flows) None in List.iter (fun a -> let f = FMap.find (process_sans_color a) f_index and c = CMap.find (color_flow a) c_index in table.(f).(c) <- Some (a)) allowed; let cf_array = Array.of_list color_flows in let ncf = Array.length cf_array in let color_factor_table = Array.make_matrix ncf ncf Color.Flow.zero in for i = 0 to pred ncf do for j = 0 to i do color_factor_table.(i).(j) <- Color.Flow.factor cf_array.(i) cf_array.(j); color_factor_table.(j).(i) <- color_factor_table.(i).(j) done done; let fusions = eliminate_common_fusions allowed and multiplicity, dictionary = disambiguate_fusions allowed in { flavors = flavors; vanishing_flavors = vanishing_flavors; color_flows = color_flows; helicities = helicities; processes = allowed; process_table = table; fusions = fusions; multiplicity = multiplicity; dictionary = dictionary; color_factors = color_factor_table; constraints = C.description select_wf } let initialize_cache = F.initialize_cache let set_cache_name = F.set_cache_name let empty = { flavors = []; vanishing_flavors = []; color_flows = []; helicities = []; processes = []; process_table = Array.make_matrix 0 0 None; fusions = []; multiplicity = (fun _ -> 1); dictionary = (fun _ _ -> 1); color_factors = Array.make_matrix 0 0 Color.Flow.zero; constraints = None } end Index: trunk/omega/src/UFO_lexer.mll =================================================================== --- trunk/omega/src/UFO_lexer.mll (revision 8274) +++ trunk/omega/src/UFO_lexer.mll (revision 8275) @@ -1,88 +1,97 @@ (* vertex_lexer.mll -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) { open Lexing open UFO_parser let string_of_char c = String.make 1 c let int_of_char c = int_of_string (string_of_char c) let init_position fname lexbuf = let curr_p = lexbuf.lex_curr_p in lexbuf.lex_curr_p <- { curr_p with pos_fname = fname; pos_lnum = 1; pos_bol = curr_p.pos_cnum }; lexbuf } let digit = ['0'-'9'] let upper = ['A'-'Z'] let lower = ['a'-'z'] let char = upper | lower let word = char | digit | '_' let white = [' ' '\t'] +let esc = ['\'' '"' '\\'] rule token = parse white { token lexbuf } (* skip blanks *) | '#' [^'\n']* { token lexbuf } (* skip comments *) | '\n' { new_line lexbuf; token lexbuf } | "from" [^'\n']* { token lexbuf } (* skip imports *) | "import" [^'\n']* { token lexbuf } (* skip imports (for now) *) | "try:" [^'\n']* { token lexbuf } (* skip imports (for now) *) | "except" [^'\n']* { token lexbuf } (* skip imports (for now) *) | "pass" { token lexbuf } (* skip imports (for now) *) | '(' { LPAREN } | ')' { RPAREN } | '{' { LBRACE } | '}' { RBRACE } | '[' { LBRACKET } | ']' { RBRACKET } | '=' { EQUAL } | '+' { PLUS } | '-' { MINUS } | '/' { DIV } | '.' { DOT } | ',' { COMMA } | ':' { COLON } | '-'? ( digit+ '.' digit* | digit* '.' digit+ ) ( ['E''e'] '-'? digit+ )? as x { FLOAT (float_of_string x) } | '-'? digit+ as i { INT (int_of_string i) } | char word* as s { ID s } - | '\'' ([^'\'']+ ( '\\' '\'' [^'\'']+ )* as s) '\'' - { STRING s } - | '"' ([^'"']+ ( '\\' '"' [^'"']+ )* as s) '"' - { STRING s } + | '\'' { let sbuf = Buffer.create 20 in + STRING (string1 sbuf lexbuf) } + | '"' { let sbuf = Buffer.create 20 in + STRING (string2 sbuf lexbuf) } | _ as c { failwith ("invalid character at `" ^ - string_of_char c ^ "'") } + string_of_char c ^ "'") } | eof { END } - - +and string1 sbuf = parse + '\'' { Buffer.contents sbuf } + | '\\' (esc as c) { Buffer.add_char sbuf c; string1 sbuf lexbuf } + | eof { raise End_of_file } + | _ as c { Buffer.add_char sbuf c; string1 sbuf lexbuf } +and string2 sbuf = parse + '"' { Buffer.contents sbuf } + | '\\' (esc as c) { Buffer.add_char sbuf c; string2 sbuf lexbuf } + | eof { raise End_of_file } + | _ as c { Buffer.add_char sbuf c; string2 sbuf lexbuf } Index: trunk/omega/src/omega_GravTest.ml =================================================================== --- trunk/omega/src/omega_GravTest.ml (revision 8274) +++ trunk/omega/src/omega_GravTest.ml (revision 8275) @@ -1,35 +1,35 @@ (* omega_GravTest.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23_Majorana)(Targets.Fortran_Majorana) +module O = Omega.Make(Fusion_vintage.Mixed23_Majorana)(Targets.Fortran_Majorana) (Modellib_BSM.GravTest(Modellib_BSM.BSM_bsm)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/model.mli =================================================================== --- trunk/omega/src/model.mli (revision 8274) +++ trunk/omega/src/model.mli (revision 8275) @@ -1,283 +1,283 @@ (* model.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{General Quantum Field Theories} *) module type T = sig (* [flavor] abstractly encodes all quantum numbers. *) type flavor (* [Color.t] encodes the ($\textrm{SU}(N)$) color representation. *) val color : flavor -> Color.t + val nc : unit -> int (* The set of conserved charges. *) module Ch : Charges.T val charges : flavor -> Ch.t (* The PDG particle code for interfacing with Monte Carlos. *) val pdg : flavor -> int (* The Lorentz representation of the particle. *) val lorentz : flavor -> Coupling.lorentz (* The propagator for the particle, which \emph{can} depend on a gauge parameter. *) type gauge val propagator : flavor -> gauge Coupling.propagator (* \emph{Not} the symbol for the numerical value, but the scheme or strategy. *) val width : flavor -> Coupling.width (* Charge conjugation, with and without color. *) val conjugate : flavor -> flavor (* Returns $1$ for fermions, $-1$ for anti-fermions, $2$ for Majoranas and $0$ otherwise. *) val fermion : flavor -> int (* The Feynman rules. [vertices] and [(fuse2, fuse3, fusen)] are redundant, of course. However, [vertices] is required for building functors for models and [vertices] can be recovered from [(fuse2, fuse3, fusen)] only at great cost. *) (* \begin{dubious} Nevertheless: [vertices] is a candidate for removal, b/c we can build a smarter [Colorize] functor acting on [(fuse2, fuse3, fusen)]. It can support an arbitrary numer of color lines. But we have to test whether it is efficient enough. And we have to make sure that this wouldn't break the UFO interface. \end{dubious} *) type constant (* Later: [type orders] to count orders of couplings *) val max_degree : unit -> int val vertices : unit -> ((((flavor * flavor * flavor) * constant Coupling.vertex3 * constant) list) * (((flavor * flavor * flavor * flavor) * constant Coupling.vertex4 * constant) list) * (((flavor list) * constant Coupling.vertexn * constant) list)) val fuse2 : flavor -> flavor -> (flavor * constant Coupling.t) list val fuse3 : flavor -> flavor -> flavor -> (flavor * constant Coupling.t) list val fuse : flavor list -> (flavor * constant Coupling.t) list (* Later: [val orders : constant -> orders] counting orders of couplings *) (* The list of all known flavors. *) val flavors : unit -> flavor list (* The flavors that can appear in incoming or outgoing states, grouped in a way that is useful for user interfaces. *) val external_flavors : unit -> (string * flavor list) list (* The Goldstone bosons corresponding to a gauge field, if any. *) val goldstone : flavor -> (flavor * constant Coupling.expr) option (* The dependent parameters. *) val parameters : unit -> constant Coupling.parameters (* Translate from and to convenient textual representations of flavors. *) val flavor_of_string : string -> flavor val flavor_to_string : flavor -> string (* \TeX{} and \LaTeX{} *) val flavor_to_TeX : flavor -> string (* The following must return unique symbols that are acceptable as symbols in all programming languages under consideration as targets. Strings of alphanumeric characters (starting with a letter) should be safe. Underscores are also usable, but would violate strict Fortran77. *) val flavor_symbol : flavor -> string val gauge_symbol : gauge -> string val mass_symbol : flavor -> string val width_symbol : flavor -> string val constant_symbol : constant -> string (* Model specific options. *) val options : Options.t end (* In addition to hardcoded models, we can have models that are initialized at run time. *) (* \thocwmodulesection{Mutable Quantum Field Theories} *) module type Mutable = sig include T val init : unit -> unit (* Export only one big initialization function to discourage partial initializations. Labels make this usable. *) val setup : color:(flavor -> Color.t) -> + nc:(unit -> int) -> pdg:(flavor -> int) -> lorentz:(flavor -> Coupling.lorentz) -> propagator:(flavor -> gauge Coupling.propagator) -> width:(flavor -> Coupling.width) -> goldstone:(flavor -> (flavor * constant Coupling.expr) option) -> conjugate:(flavor -> flavor) -> fermion:(flavor -> int) -> vertices: (unit -> ((((flavor * flavor * flavor) * constant Coupling.vertex3 * constant) list) * (((flavor * flavor * flavor * flavor) * constant Coupling.vertex4 * constant) list) * (((flavor list) * constant Coupling.vertexn * constant) list))) -> flavors:((string * flavor list) list) -> parameters:(unit -> constant Coupling.parameters) -> flavor_of_string:(string -> flavor) -> flavor_to_string:(flavor -> string) -> flavor_to_TeX:(flavor -> string) -> flavor_symbol:(flavor -> string) -> gauge_symbol:(gauge -> string) -> mass_symbol:(flavor -> string) -> width_symbol:(flavor -> string) -> constant_symbol:(constant -> string) -> unit end (* \thocwmodulesection{Gauge Field Theories} *) (* The following signatures are used only for model building. The diagrammatics and numerics is supposed to be completely ignorant about the detail of the models and expected to rely on the interface [T] exclusively. \begin{dubious} In the end, we might have functors [(M : T) -> Gauge], but we will need to add the quantum numbers to [T]. \end{dubious} *) module type Gauge = sig include T (* Matter field carry conserved quantum numbers and can be replicated in generations without changing the gauge sector. *) type matter_field (* Gauge bosons proper. *) type gauge_boson (* Higgses, Goldstones and all the rest: *) type other (* We can query the kind of field *) type field = | Matter of matter_field | Gauge of gauge_boson | Other of other val field : flavor -> field (* and we can build new fields of a given kind: *) val matter_field : matter_field -> flavor val gauge_boson : gauge_boson -> flavor val other : other -> flavor end (* \thocwmodulesection{Gauge Field Theories with Broken Gauge Symmetries} *) (* Both are carefully crafted as subtypes of [Gauge] so that they can be used in place of [Gauge] and [T] everywhere: *) module type Broken_Gauge = sig include Gauge type massless type massive type goldstone type kind = | Massless of massless | Massive of massive | Goldstone of goldstone val kind : gauge_boson -> kind val massless : massive -> gauge_boson val massive : massive -> gauge_boson val goldstone : goldstone -> gauge_boson end module type Unitarity_Gauge = sig include Gauge type massless type massive type kind = | Massless of massless | Massive of massive val kind : gauge_boson -> kind val massless : massive -> gauge_boson val massive : massive -> gauge_boson end module type Colorized = sig include T type flavor_sans_color val flavor_sans_color : flavor -> flavor_sans_color val conjugate_sans_color : flavor_sans_color -> flavor_sans_color - val nc : unit -> int val amplitude : flavor_sans_color list -> flavor_sans_color list -> (flavor list * flavor list) list val flow : flavor list -> flavor list -> Color.Flow.t end module type Colorized_Gauge = sig include Gauge type flavor_sans_color val flavor_sans_color : flavor -> flavor_sans_color val conjugate_sans_color : flavor_sans_color -> flavor_sans_color - val nc : unit -> int val amplitude : flavor_sans_color list -> flavor_sans_color list -> (flavor list * flavor list) list val flow : flavor list -> flavor list -> Color.Flow.t end (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/fusion.mli =================================================================== --- trunk/omega/src/fusion.mli (revision 8274) +++ trunk/omega/src/fusion.mli (revision 8275) @@ -1,376 +1,378 @@ (* fusion.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) module type T = sig val options : Options.t (* Wavefunctions are an abstract data type, containing a momentum~[p] and additional quantum numbers, collected in~[flavor]. *) type wf val conjugate : wf -> wf (* Obviously, [flavor] is not restricted to the physical notion of flavor, but can carry spin, color, etc. *) type flavor val flavor : wf -> flavor type flavor_sans_color val flavor_sans_color : wf -> flavor_sans_color (* Momenta are represented by an abstract datatype (defined in~[Momentum]) that is optimized for performance. They can be accessed either abstractly or as lists of indices of the external momenta. These indices are assigned sequentially by [amplitude] below. *) type p val momentum : wf -> p val momentum_list : wf -> int list (* At tree level, the wave functions are uniquely specified by [flavor] and momentum. If loops are included, we need to distinguish among orders. Also, if we build a result from an incomplete sum of diagrams, we need to add a distinguishing mark. At the moment, we assume that a [string] that can be attached to the symbol suffices. *) val wf_tag : wf -> string option (* Coupling constants *) type constant (* and right hand sides of assignments. The latter are formed from a sign from Fermi statistics, a coupling (constand and Lorentz structure) and wave functions. *) type coupling type rhs type 'a children val sign : rhs -> int val coupling : rhs -> constant Coupling.t val coupling_tag : rhs -> string option type exclusions val no_exclusions : exclusions (* In renormalized perturbation theory, couplings come in different orders of the loop expansion. Be prepared: [val order : rhs -> int] *) (* \begin{dubious} This is here only for the benefit of [Target] and shall become [val children : rhs -> wf children] later \ldots \end{dubious} *) val children : rhs -> wf list (* Fusions come in two types: fusions of wave functions to off-shell wave functions: \begin{equation*} \phi(p+q) = \phi(p)\phi(q) \end{equation*} *) type fusion val lhs : fusion -> wf val rhs : fusion -> rhs list (* and products at the keystones: \begin{equation*} \phi(-p-q)\cdot\phi(p)\phi(q) \end{equation*} *) type braket val bra : braket -> wf val ket : braket -> rhs list (* [amplitude goldstones incoming outgoing] calculates the amplitude for scattering of [incoming] to [outgoing]. If [goldstones] is true, also non-propagating off-shell Goldstone amplitudes are included to allow the checking of Slavnov-Taylor identities. *) type amplitude type amplitude_sans_color type selectors val amplitudes : bool -> exclusions -> selectors -> flavor_sans_color list -> flavor_sans_color list -> amplitude list val amplitude_sans_color : bool -> exclusions -> selectors -> flavor_sans_color list -> flavor_sans_color list -> amplitude_sans_color val dependencies : amplitude -> wf -> (wf, coupling) Tree2.t (* We should be precise regarding the semantics of the following functions, since modules implementating [Target] must not make any mistakes interpreting the return values. Instead of calculating the amplitude \begin{subequations} \begin{equation} \label{eq:physical-amplitude} \Braket{f_3,p_3,f_4,p_4,\ldots|T|f_1,p_1,f_2,p_2} \end{equation} directly, O'Mega calculates the---equivalent, but more symmetrical---crossed amplitude \begin{equation} \Braket{\bar f_1,-p_1,\bar f_2,-p_2,f_3,p_3,f_4,p_4,\ldots|T|0} \end{equation} Internally, all flavors are represented by their charge conjugates \begin{equation} \label{eq:internal-amplitude} A(f_1,-p_1,f_2,-p_2,\bar f_3,p_3,\bar f_4,p_4,\ldots) \end{equation} \end{subequations} The correspondence of vertex and term in the lagrangian \begin{equation} \parbox{26\unitlength}{% \fmfframe(5,3)(5,3){% \begin{fmfgraph*}(15,20) \fmfleft{v} \fmfright{p,A,e} \fmflabel{$\mathrm{e}^-$}{e} \fmflabel{$\mathrm{e}^+$}{p} \fmflabel{$\mathrm{A}$}{A} \fmf{fermion}{p,v,e} \fmf{photon}{A,v} \fmfdot{v} \end{fmfgraph*}}}: \bar\psi\fmslash{A}\psi \end{equation} suggests to denote the \emph{outgoing} particle by the flavor of the \emph{anti}particle and the \emph{outgoing} \emph{anti}particle by the flavor of the particle, since this choice allows to represent the vertex by a triple \begin{equation} \bar\psi\fmslash{A}\psi: (\mathrm{e}^+,A,\mathrm{e}^-) \end{equation} which is more intuitive than the alternative $(\mathrm{e}^-,A,\mathrm{e}^+)$. Also, when thinking in terms of building wavefunctions from the outside in, the outgoing \emph{antiparticle} is represented by a \emph{particle} propagator and vice versa\footnote{Even if this choice will appear slightly counter-intuitive on the [Target] side, one must keep in mind that much more people are expected to prepare [Model]s.}. [incoming] and [outgoing] are the physical flavors as in~(\ref{eq:physical-amplitude}) *) val incoming : amplitude -> flavor list val outgoing : amplitude -> flavor list (* [externals] are flavors and momenta as in~(\ref{eq:internal-amplitude}) *) val externals : amplitude -> wf list val variables : amplitude -> wf list val fusions : amplitude -> fusion list val brakets : amplitude -> braket list val on_shell : amplitude -> (wf -> bool) val is_gauss : amplitude -> (wf -> bool) val constraints : amplitude -> string option val symmetry : amplitude -> int val allowed : amplitude -> bool (* \thocwmodulesubsection{Performance Hacks} *) val initialize_cache : string -> unit val set_cache_name : string -> unit (* \thocwmodulesubsection{Diagnostics} *) val check_charges : unit -> flavor_sans_color list list val count_fusions : amplitude -> int val count_propagators : amplitude -> int val count_diagrams : amplitude -> int val forest : wf -> amplitude -> ((wf * coupling option, wf) Tree.t) list val poles : amplitude -> wf list list val s_channel : amplitude -> wf list val tower_to_dot : out_channel -> amplitude -> unit val amplitude_to_dot : out_channel -> amplitude -> unit (* \thocwmodulesubsection{WHIZARD} *) val phase_space_channels : out_channel -> amplitude_sans_color -> unit val phase_space_channels_flipped : out_channel -> amplitude_sans_color -> unit end (* There is more than one way to make fusions. *) module type Maker = functor (P : Momentum.T) -> functor (M : Model.T) -> T with type p = P.t and type flavor = Colorize.It(M).flavor and type flavor_sans_color = M.flavor and type constant = M.constant and type selectors = Cascade.Make(M)(P).selectors (*i If we want or need to expose [Make], here's how to do it: module type Stat = sig type flavor type stat exception Impossible val stat : flavor -> int -> stat val stat_fuse : stat -> stat -> flavor -> stat val stat_sign : stat -> int end module type Stat_Maker = functor (M : Model.T) -> Stat with type flavor = M.flavor module Make : functor (PT : Tuple.Poly) (Stat : Stat_Maker) (T : Topology.T with type 'a children = 'a PT.t) -> Maker i*) (* Straightforward Dirac fermions vs. slightly more complicated Majorana fermions: *) +exception Majorana + module Binary : Maker -module Binary_Majorana : Maker +(* [module Binary_Majorana : Maker] *) module Mixed23 : Maker -module Mixed23_Majorana : Maker +(* [module Mixed23_Majorana : Maker] *) module Nary : functor (B : Tuple.Bound) -> Maker module Nary_Majorana : functor (B : Tuple.Bound) -> Maker (* We can also proceed \'a la~\cite{HELAC:2000}. Empirically, this will use slightly~($O(10\%)$) fewer fusions than the symmetric factorization. Our implementation uses significantly~($O(50\%)$) fewer fusions than reported by~\cite{HELAC:2000}. Our pruning of the DAG might be responsible for this. *) module Helac : functor (B : Tuple.Bound) -> Maker -module Helac_Majorana : functor (B : Tuple.Bound) -> Maker +(* [module Helac_Majorana : functor (B : Tuple.Bound) -> Maker] *) (* \thocwmodulesection{Multiple Amplitudes} *) module type Multi = sig exception Mismatch val options : Options.t type flavor type process = flavor list * flavor list type amplitude type fusion type wf type exclusions val no_exclusions : exclusions type selectors type amplitudes (* Construct all possible color flow amplitudes for a given process. *) val amplitudes : bool -> int option -> exclusions -> selectors -> process list -> amplitudes val empty : amplitudes (* Precompute the vertex table cache. *) val initialize_cache : string -> unit val set_cache_name : string -> unit (* The list of all combinations of incoming and outgoing particles with a nonvanishing scattering amplitude. *) val flavors : amplitudes -> process list (* The list of all combinations of incoming and outgoing particles that don't lead to any color flow with non vanishing scattering amplitude. *) val vanishing_flavors : amplitudes -> process list (* The list of all color flows with a nonvanishing scattering amplitude. *) val color_flows : amplitudes -> Color.Flow.t list (* The list of all valid helicity combinations. *) val helicities : amplitudes -> (int list * int list) list (* The list of all amplitudes. *) val processes : amplitudes -> amplitude list (* [(process_table a).(f).(c)] returns the amplitude for the [f]th allowed flavor combination and the [c]th allowed color flow as an [amplitude option]. *) val process_table : amplitudes -> amplitude option array array (* The list of all non redundant fusions together with the amplitudes they came from. *) val fusions : amplitudes -> (fusion * amplitude) list (* If there's more than external flavor state, the wavefunctions are \emph{not} uniquely specified by [flavor] and [Momentum.t]. This function can be used to determine how many variables must be allocated. *) val multiplicity : amplitudes -> wf -> int (* This function can be used to disambiguate wavefunctions with the same combination of [flavor] and [Momentum.t]. *) val dictionary : amplitudes -> amplitude -> wf -> int (* [(color_factors a).(c1).(c2)] power of~$N_C$ for the given product of color flows. *) val color_factors : amplitudes -> Color.Flow.factor array array (* A description of optional diagram selectors. *) val constraints : amplitudes -> string option end module type Multi_Maker = functor (Fusion_Maker : Maker) -> functor (P : Momentum.T) -> functor (M : Model.T) -> Multi with type flavor = M.flavor and type amplitude = Fusion_Maker(P)(M).amplitude and type fusion = Fusion_Maker(P)(M).fusion and type wf = Fusion_Maker(P)(M).wf and type selectors = Fusion_Maker(P)(M).selectors module Multi : Multi_Maker (* \thocwmodulesection{Tags} *) (* It appears that there are useful applications for tagging couplings and wave functions, e.\,g.~skeleton expansion and diagram selections. We can abstract this in a [Tags] signature: *) module type Tags = sig type wf type coupling type 'a children val null_wf : wf val null_coupling : coupling val fuse : coupling -> wf children -> wf val wf_to_string : wf -> string option val coupling_to_string : coupling -> string option end module type Tagger = functor (PT : Tuple.Poly) -> Tags with type 'a children = 'a PT.t module type Tagged_Maker = functor (Tagger : Tagger) -> functor (P : Momentum.T) -> functor (M : Model.T) -> T with type p = P.t and type flavor = Colorize.It(M).flavor and type flavor_sans_color = M.flavor and type constant = M.constant module Tagged_Binary : Tagged_Maker (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/fusion_vintage.ml =================================================================== --- trunk/omega/src/fusion_vintage.ml (revision 0) +++ trunk/omega/src/fusion_vintage.ml (revision 8275) @@ -0,0 +1,2881 @@ +(* fusion.ml -- + + Copyright (C) 1999-2019 by + + Wolfgang Kilian + Thorsten Ohl + Juergen Reuter + with contributions from + Christian Speckner + Marco Sekulla + + WHIZARD is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + WHIZARD is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) + +module type T = + sig + val options : Options.t + type wf + val conjugate : wf -> wf + type flavor + type flavor_sans_color + val flavor : wf -> flavor + val flavor_sans_color : wf -> flavor_sans_color + type p + val momentum : wf -> p + val momentum_list : wf -> int list + val wf_tag : wf -> string option + type constant + type coupling + type rhs + type 'a children + val sign : rhs -> int + val coupling : rhs -> constant Coupling.t + val coupling_tag : rhs -> string option + type exclusions + val no_exclusions : exclusions + val children : rhs -> wf list + type fusion + val lhs : fusion -> wf + val rhs : fusion -> rhs list + type braket + val bra : braket -> wf + val ket : braket -> rhs list + type amplitude + type amplitude_sans_color + type selectors + val amplitudes : bool -> exclusions -> selectors -> + flavor_sans_color list -> flavor_sans_color list -> amplitude list + val amplitude_sans_color : bool -> exclusions -> selectors -> + flavor_sans_color list -> flavor_sans_color list -> amplitude_sans_color + val dependencies : amplitude -> wf -> (wf, coupling) Tree2.t + val incoming : amplitude -> flavor list + val outgoing : amplitude -> flavor list + val externals : amplitude -> wf list + val variables : amplitude -> wf list + val fusions : amplitude -> fusion list + val brakets : amplitude -> braket list + val on_shell : amplitude -> (wf -> bool) + val is_gauss : amplitude -> (wf -> bool) + val constraints : amplitude -> string option + val symmetry : amplitude -> int + val allowed : amplitude -> bool + val initialize_cache : string -> unit + val set_cache_name : string -> unit + val check_charges : unit -> flavor_sans_color list list + val count_fusions : amplitude -> int + val count_propagators : amplitude -> int + val count_diagrams : amplitude -> int + val forest : wf -> amplitude -> ((wf * coupling option, wf) Tree.t) list + val poles : amplitude -> wf list list + val s_channel : amplitude -> wf list + val tower_to_dot : out_channel -> amplitude -> unit + val amplitude_to_dot : out_channel -> amplitude -> unit + val phase_space_channels : out_channel -> amplitude_sans_color -> unit + val phase_space_channels_flipped : out_channel -> amplitude_sans_color -> unit + end + +module type Maker = + functor (P : Momentum.T) -> functor (M : Model.T) -> + T with type p = P.t + and type flavor = Colorize.It(M).flavor + and type flavor_sans_color = M.flavor + and type constant = M.constant + and type selectors = Cascade.Make(M)(P).selectors + +(* \thocwmodulesection{Fermi Statistics} *) + +module type Stat = + sig + type flavor + type stat + exception Impossible + val stat : flavor -> int -> stat + val stat_fuse : stat -> stat -> flavor -> stat + val stat_sign : stat -> int + val stat_to_string : stat -> string + end + +module type Stat_Maker = functor (M : Model.T) -> + Stat with type flavor = M.flavor + +(* \thocwmodulesection{Dirac Fermions} *) + +module Stat_Dirac (M : Model.T) : (Stat with type flavor = M.flavor) = + struct + type flavor = M.flavor + +(* \begin{equation} + \gamma_\mu\psi(1)\,G^{\mu\nu}\,\bar\psi(2)\gamma_\nu\psi(3) + - \gamma_\mu\psi(3)\,G^{\mu\nu}\,\bar\psi(2)\gamma_\nu\psi(1) + \end{equation} *) + + type stat = + | Fermion of int * (int option * int option) list + | AntiFermion of int * (int option * int option) list + | Boson of (int option * int option) list + + let stat f p = + let s = M.fermion f in + if s = 0 then + Boson [] + else if s < 0 then + AntiFermion (p, []) + else (* [if s > 0 then] *) + Fermion (p, []) + + let lines_to_string lines = + ThoList.to_string + (function + | Some i, Some j -> Printf.sprintf "%d>%d" i j + | Some i, None -> Printf.sprintf "%d>*" i + | None, Some j -> Printf.sprintf "*>%d" j + | None, None -> "*>*") + lines + + let stat_to_string = function + | Boson lines -> Printf.sprintf "Boson %s" (lines_to_string lines) + | Fermion (p, lines) -> + Printf.sprintf "Fermion (%d, %s)" p (lines_to_string lines) + | AntiFermion (p, lines) -> + Printf.sprintf "AntiFermion (%d, %s)" p (lines_to_string lines) + + exception Impossible + + let stat_fuse s1 s2 f = + match s1, s2 with + | Boson l1, Boson l2 -> Boson (l1 @ l2) + | Boson l1, Fermion (p, l2) -> Fermion (p, l1 @ l2) + | Boson l1, AntiFermion (p, l2) -> AntiFermion (p, l1 @ l2) + | Fermion (p, l1), Boson l2 -> Fermion (p, l1 @ l2) + | AntiFermion (p, l1), Boson l2 -> AntiFermion (p, l1 @ l2) + | AntiFermion (pbar, l1), Fermion (p, l2) -> + Boson ((Some pbar, Some p) :: l1 @ l2) + | Fermion (p, l1), AntiFermion (pbar, l2) -> + Boson ((Some pbar, Some p) :: l1 @ l2) + | Fermion _, Fermion _ | AntiFermion _, AntiFermion _ -> + raise Impossible + +(* \begin{figure} + \begin{displaymath} + \parbox{26\unitlength}{% + \begin{fmfgraph*}(25,15) + \fmfstraight + \fmfleft{f} + \fmfright{f1,f2,f3} + \fmflabel{$\psi(1)$}{f1} + \fmflabel{$\bar\psi(2)$}{f2} + \fmflabel{$\psi(3)$}{f3} + \fmflabel{$0$}{f} + \fmf{fermion}{f1,v1,f} + \fmffreeze + \fmf{fermion,tension=0.5}{f3,v2,f2} + \fmf{photon}{v1,v2} + \fmfdot{v1,v2} + \end{fmfgraph*}} + \qquad\qquad-\qquad + \parbox{26\unitlength}{% + \begin{fmfgraph*}(25,15) + \fmfstraight + \fmfleft{f} + \fmfright{f1,f2,f3} + \fmflabel{$\psi(1)$}{f1} + \fmflabel{$\bar\psi(2)$}{f2} + \fmflabel{$\psi(3)$}{f3} + \fmflabel{$0$}{f} + \fmf{fermion}{f3,v1,f} + \fmffreeze + \fmf{fermion,tension=0.5}{f1,v2,f2} + \fmf{photon}{v1,v2} + \fmfdot{v1,v2} + \end{fmfgraph*}} + \end{displaymath} + \caption{\label{fig:stat_fuse} Relative sign from Fermi statistics.} + \end{figure} *) + +(* \begin{equation} + \epsilon \left(\left\{ (0,1), (2,3) \right\}\right) + = - \epsilon \left(\left\{ (0,3), (2,1) \right\}\right) + \end{equation} *) + + let permutation lines = + let fout, fin = List.split lines in + let eps_in, _ = Combinatorics.sort_signed fin + and eps_out, _ = Combinatorics.sort_signed fout in + (eps_in * eps_out) + +(* \begin{dubious} + This comparing of permutations of fermion lines is a bit tedious + and takes a macroscopic fraction of time. However, it's less than + 20\,\%, so we don't focus on improving on it yet. + \end{dubious} *) + + let stat_sign = function + | Boson lines -> permutation lines + | Fermion (p, lines) -> permutation ((None, Some p) :: lines) + | AntiFermion (pbar, lines) -> permutation ((Some pbar, None) :: lines) + + end + +(* \thocwmodulesection{Tags} *) + +module type Tags = + sig + type wf + type coupling + type 'a children + val null_wf : wf + val null_coupling : coupling + val fuse : coupling -> wf children -> wf + val wf_to_string : wf -> string option + val coupling_to_string : coupling -> string option + end + +module type Tagger = + functor (PT : Tuple.Poly) -> Tags with type 'a children = 'a PT.t + +module type Tagged_Maker = + functor (Tagger : Tagger) -> + functor (P : Momentum.T) -> functor (M : Model.T) -> + T with type p = P.t + and type flavor = Colorize.It(M).flavor + and type flavor_sans_color = M.flavor + and type constant = M.constant + +(* No tags is one option for good tags \ldots *) + +module No_Tags (PT : Tuple.Poly) = + struct + type wf = unit + type coupling = unit + type 'a children = 'a PT.t + let null_wf = () + let null_coupling = () + let fuse () _ = () + let wf_to_string () = None + let coupling_to_string () = None + end + +(* \begin{dubious} + Here's a simple additive tag that can grow into something useful + for loop calculations. + \end{dubious} *) + +module Loop_Tags (PT : Tuple.Poly) = + struct + type wf = int + type coupling = int + type 'a children = 'a PT.t + let null_wf = 0 + let null_coupling = 0 + let fuse c wfs = PT.fold_left (+) c wfs + let wf_to_string n = Some (string_of_int n) + let coupling_to_string n = Some (string_of_int n) + end + +module Order_Tags (PT : Tuple.Poly) = + struct + type wf = int + type coupling = int + type 'a children = 'a PT.t + let null_wf = 0 + let null_coupling = 0 + let fuse c wfs = PT.fold_left (+) c wfs + let wf_to_string n = Some (string_of_int n) + let coupling_to_string n = Some (string_of_int n) + end + +(* \thocwmodulesection{[Tagged], the [Fusion.Make] Functor} *) + +module Tagged (Tagger : Tagger) (PT : Tuple.Poly) + (Stat : Stat_Maker) (T : Topology.T with type 'a children = 'a PT.t) + (P : Momentum.T) (M : Model.T) = + struct + + type cache_mode = Cache_Use | Cache_Ignore | Cache_Overwrite + let cache_option = ref Cache_Ignore + type qcd_order = + | QCD_order of int + type ew_order = + | EW_order of int + let qcd_order = ref (QCD_order 99) + let ew_order = ref (EW_order 99) + + let options = Options.create + [ "ignore-cache", Arg.Unit (fun () -> cache_option := Cache_Ignore), + " ignore cached model tables (default)"; + "use-cache", Arg.Unit (fun () -> cache_option := Cache_Use), + " use cached model tables"; + "overwrite-cache", Arg.Unit (fun () -> cache_option := Cache_Overwrite), + " overwrite cached model tables"; + "qcd", Arg.Int (fun n -> qcd_order := QCD_order n), + " set QCD order n [>= 0, default = 99] (ignored)"; + "ew", Arg.Int (fun n -> ew_order := EW_order n), + " set QCD order n [>=0, default = 99] (ignored)"] + + exception Negative_QCD_order + exception Negative_EW_order + exception Vanishing_couplings + exception Negative_QCD_EW_orders + + let int_orders = + match !qcd_order, !ew_order with + | QCD_order n, EW_order n' when n < 0 && n' >= 0 -> + raise Negative_QCD_order + | QCD_order n, EW_order n' when n >= 0 && n' < 0 -> + raise Negative_EW_order + | QCD_order n, EW_order n' when n < 0 && n' < 0 -> + raise Negative_QCD_EW_orders + | QCD_order n, EW_order n' -> (n, n') + + open Coupling + + module S = Stat(M) + + type stat = S.stat + let stat = S.stat + let stat_sign = S.stat_sign + +(* \begin{dubious} + This will do \emph{something} for 4-, 6-, \ldots fermion vertices, + but not necessarily the right thing \ldots + \end{dubious} *) + + let stat_fuse s f = + PT.fold_right_internal (fun s' acc -> S.stat_fuse s' acc f) s + + type constant = M.constant + +(* \thocwmodulesubsection{Wave Functions} *) + +(* \begin{dubious} + The code below is not yet functional. Too often, we assign to + [Tags.null_wf] instead of calling [Tags.fuse]. + \end{dubious} *) + +(* We will need two types of amplitudes: with color and without color. Since + we can build them using the same types with only [flavor] replaced, it pays + to use a functor to set up the scaffolding. *) + + module Tags = Tagger(PT) + +(* In the future, we might want to have [Coupling] among the functor + arguments. However, for the moment, [Coupling] is assumed to be + comprehensive. *) + + module type Tagged_Coupling = + sig + type sign = int + type t = + { sign : sign; + coupling : constant Coupling.t; + coupling_tag : Tags.coupling } + val sign : t -> sign + val coupling : t -> constant Coupling.t + val coupling_tag : t -> string option + end + + module Tagged_Coupling : Tagged_Coupling = + struct + type sign = int + type t = + { sign : sign; + coupling : constant Coupling.t; + coupling_tag : Tags.coupling } + let sign c = c.sign + let coupling c = c.coupling + let coupling_tag_raw c = c.coupling_tag + let coupling_tag rhs = Tags.coupling_to_string (coupling_tag_raw rhs) + end + +(* \thocwmodulesubsection{Amplitudes: Monochrome and Colored} *) + + module type Amplitude = + sig + + module Tags : Tags + + type flavor + type p + + type wf = + { flavor : flavor; + momentum : p; + wf_tag : Tags.wf } + + val flavor : wf -> flavor + val conjugate : wf -> wf + val momentum : wf -> p + val momentum_list : wf -> int list + val wf_tag : wf -> string option + val wf_tag_raw : wf -> Tags.wf + val order_wf : wf -> wf -> int + val external_wfs : int -> (flavor * int) list -> wf list + + type 'a children + type coupling = Tagged_Coupling.t + type rhs = coupling * wf children + val sign : rhs -> int + val coupling : rhs -> constant Coupling.t + val coupling_tag : rhs -> string option + type exclusions + val no_exclusions : exclusions + + val children : rhs -> wf list + + type fusion = wf * rhs list + val lhs : fusion -> wf + val rhs : fusion -> rhs list + + type braket = wf * rhs list + val bra : braket -> wf + val ket : braket -> rhs list + + module D : + DAG.T with type node = wf and type edge = coupling and type children = wf children + + val wavefunctions : braket list -> wf list + + type amplitude = + { fusions : fusion list; + brakets : braket list; + on_shell : (wf -> bool); + is_gauss : (wf -> bool); + constraints : string option; + incoming : flavor list; + outgoing : flavor list; + externals : wf list; + symmetry : int; + dependencies : (wf -> (wf, coupling) Tree2.t); + fusion_tower : D.t; + fusion_dag : D.t } + + val incoming : amplitude -> flavor list + val outgoing : amplitude -> flavor list + val externals : amplitude -> wf list + val variables : amplitude -> wf list + val fusions : amplitude -> fusion list + val brakets : amplitude -> braket list + val on_shell : amplitude -> (wf -> bool) + val is_gauss : amplitude -> (wf -> bool) + val constraints : amplitude -> string option + val symmetry : amplitude -> int + val dependencies : amplitude -> wf -> (wf, coupling) Tree2.t + val fusion_dag : amplitude -> D.t + + end + + module Amplitude (PT : Tuple.Poly) (P : Momentum.T) (M : Model.T) : + Amplitude + with type p = P.t + and type flavor = M.flavor + and type 'a children = 'a PT.t + and module Tags = Tags = + struct + + type flavor = M.flavor + type p = P.t + + module Tags = Tags + + type wf = + { flavor : flavor; + momentum : p; + wf_tag : Tags.wf } + + let flavor wf = wf.flavor + let conjugate wf = { wf with flavor = M.conjugate wf.flavor } + let momentum wf = wf.momentum + let momentum_list wf = P.to_ints wf.momentum + let wf_tag wf = Tags.wf_to_string wf.wf_tag + let wf_tag_raw wf = wf.wf_tag + + let external_wfs rank particles = + List.map + (fun (f, p) -> + { flavor = f; + momentum = P.singleton rank p; + wf_tag = Tags.null_wf }) + particles + +(* Order wavefunctions so that the external come first, then the pairs, etc. + Also put possible Goldstone bosons \emph{before} their gauge bosons. *) + + let lorentz_ordering f = + match M.lorentz f with + | Coupling.Scalar -> 0 + | Coupling.Spinor -> 1 + | Coupling.ConjSpinor -> 2 + | Coupling.Majorana -> 3 + | Coupling.Vector -> 4 + | Coupling.Massive_Vector -> 5 + | Coupling.Tensor_2 -> 6 + | Coupling.Tensor_1 -> 7 + | Coupling.Vectorspinor -> 8 + | Coupling.BRS Coupling.Scalar -> 9 + | Coupling.BRS Coupling.Spinor -> 10 + | Coupling.BRS Coupling.ConjSpinor -> 11 + | Coupling.BRS Coupling.Majorana -> 12 + | Coupling.BRS Coupling.Vector -> 13 + | Coupling.BRS Coupling.Massive_Vector -> 14 + | Coupling.BRS Coupling.Tensor_2 -> 15 + | Coupling.BRS Coupling.Tensor_1 -> 16 + | Coupling.BRS Coupling.Vectorspinor -> 17 + | Coupling.BRS _ -> invalid_arg "Fusion.lorentz_ordering: not needed" + | Coupling.Maj_Ghost -> 18 + (*i | Coupling.Ward_Vector -> 19 i*) + + let order_flavor f1 f2 = + let c = compare (lorentz_ordering f1) (lorentz_ordering f2) in + if c <> 0 then + c + else + compare f1 f2 + +(* Note that [Momentum().compare] guarantees that wavefunctions will be + ordered according to \emph{increasing} [Momentum().rank] of their + momenta. *) + + let order_wf wf1 wf2 = + let c = P.compare wf1.momentum wf2.momentum in + if c <> 0 then + c + else + let c = order_flavor wf1.flavor wf2.flavor in + if c <> 0 then + c + else + compare wf1.wf_tag wf2.wf_tag + +(* This \emph{must} be a pair matching the [edge * node children] pairs of + [DAG.Forest]! *) + + type coupling = Tagged_Coupling.t + type 'a children = 'a PT.t + type rhs = coupling * wf children + let sign (c, _) = Tagged_Coupling.sign c + let coupling (c, _) = Tagged_Coupling.coupling c + let coupling_tag (c, _) = Tagged_Coupling.coupling_tag c + type exclusions = + { x_flavors : flavor list; + x_couplings : coupling list } + let no_exclusions = { x_flavors = []; x_couplings = [] } + let children (_, wfs) = PT.to_list wfs + + type fusion = wf * rhs list + let lhs (l, _) = l + let rhs (_, r) = r + + type braket = wf * rhs list + let bra (b, _) = b + let ket (_, k) = k + + module D = DAG.Make + (DAG.Forest(PT) + (struct type t = wf let compare = order_wf end) + (struct type t = coupling let compare = compare end)) + + module WFSet = + Set.Make (struct type t = wf let compare = order_wf end) + + let wavefunctions brakets = + WFSet.elements (List.fold_left (fun set (wf1, wf23) -> + WFSet.add wf1 (List.fold_left (fun set' (_, wfs) -> + PT.fold_right WFSet.add wfs set') set wf23)) WFSet.empty brakets) + + type amplitude = + { fusions : fusion list; + brakets : braket list; + on_shell : (wf -> bool); + is_gauss : (wf -> bool); + constraints : string option; + incoming : flavor list; + outgoing : flavor list; + externals : wf list; + symmetry : int; + dependencies : (wf -> (wf, coupling) Tree2.t); + fusion_tower : D.t; + fusion_dag : D.t } + + let incoming a = a.incoming + let outgoing a = a.outgoing + let externals a = a.externals + let fusions a = a.fusions + let brakets a = a.brakets + let symmetry a = a.symmetry + let on_shell a = a.on_shell + let is_gauss a = a.is_gauss + let constraints a = a.constraints + let variables a = List.map lhs a.fusions + let dependencies a = a.dependencies + let fusion_dag a = a.fusion_dag + + end + + module A = Amplitude(PT)(P)(M) + +(* Operator insertions can be fused only if they are external. *) + let is_source wf = + match M.propagator wf.A.flavor with + | Only_Insertion -> P.rank wf.A.momentum = 1 + | _ -> true + +(* [is_goldstone_of g v] is [true] if and only if [g] is the Goldstone boson + corresponding to the gauge particle [v]. *) + let is_goldstone_of g v = + match M.goldstone v with + | None -> false + | Some (g', _) -> g = g' + +(* \begin{dubious} + In the end, [PT.to_list] should become redudant! + \end{dubious} *) + let fuse_rhs rhs = M.fuse (PT.to_list rhs) + +(* \thocwmodulesubsection{Vertices} *) + +(* Compute the set of all vertices in the model from the allowed + fusions and the set of all flavors: + \begin{dubious} + One could think of using [M.vertices] instead of [M.fuse2], + [M.fuse3] and [M.fuse] \ldots + \end{dubious} *) + + module VSet = Map.Make(struct type t = A.flavor let compare = compare end) + + let add_vertices f rhs m = + VSet.add f (try rhs :: VSet.find f m with Not_found -> [rhs]) m + + let collect_vertices rhs = + List.fold_right (fun (f1, c) -> add_vertices (M.conjugate f1) (c, rhs)) + (fuse_rhs rhs) + +(* The set of all vertices with common left fields factored. *) + +(* I used to think that constant initializers are a good idea to allow + compile time optimizations. The down side turned out to be that the + constant initializers will be evaluated \emph{every time} the functor + is applied. \emph{Relying on the fact that the functor will be + called only once is not a good idea!} *) + + type vertices = (A.flavor * (constant Coupling.t * A.flavor PT.t) list) list + + let vertices_nocache max_degree flavors : vertices = + VSet.fold (fun f rhs v -> (f, rhs) :: v) + (PT.power_fold collect_vertices flavors VSet.empty) [] + +(* Performance hack: *) + + type vertex_table = + ((A.flavor * A.flavor * A.flavor) * constant Coupling.vertex3 * constant) list + * ((A.flavor * A.flavor * A.flavor * A.flavor) + * constant Coupling.vertex4 * constant) list + * (A.flavor list * constant Coupling.vertexn * constant) list + + module VCache = + Cache.Make (struct type t = vertex_table end) (struct type t = vertices end) + + let vertices_cache = ref None + let hash () = VCache.hash (M.vertices ()) + +(* \begin{dubious} + Can we do better than the executable name provided by [Config.cache_prefix]??? + We need a better way to avoid collisions among the caches for different models + in the same program. + \end{dubious} *) + + let cache_name = + ref (Config.cache_prefix ^ "." ^ Config.cache_suffix) + + let set_cache_name name = + cache_name := name + + let initialize_cache dir = + Printf.eprintf + " >>> Initializing vertex table %s. This may take some time ... " + !cache_name; + flush stderr; + VCache.write_dir (hash ()) dir !cache_name + (vertices_nocache (M.max_degree ()) (M.flavors())); + Printf.eprintf "done. <<< \n" + + let vertices max_degree flavors : vertices = + match !vertices_cache with + | None -> + begin match !cache_option with + | Cache_Use -> + begin match VCache.maybe_read (hash ()) !cache_name with + | VCache.Hit result -> result + | VCache.Miss -> + Printf.eprintf + " >>> Initializing vertex table %s. This may take some time ... " + !cache_name; + flush stderr; + let result = vertices_nocache max_degree flavors in + VCache.write (hash ()) !cache_name (result); + vertices_cache := Some result; + Printf.eprintf "done. <<< \n"; + flush stderr; + result + | VCache.Stale file -> + Printf.eprintf + " >>> Re-initializing stale vertex table %s in file %s. " + !cache_name file; + Printf.eprintf "This may take some time ... "; + flush stderr; + let result = vertices_nocache max_degree flavors in + VCache.write (hash ()) !cache_name (result); + vertices_cache := Some result; + Printf.eprintf "done. <<< \n"; + flush stderr; + result + end + | Cache_Overwrite -> + Printf.eprintf + " >>> Overwriting vertex table %s. This may take some time ... " + !cache_name; + flush stderr; + let result = vertices_nocache max_degree flavors in + VCache.write (hash ()) !cache_name (result); + vertices_cache := Some result; + Printf.eprintf "done. <<< \n"; + flush stderr; + result + | Cache_Ignore -> + let result = vertices_nocache max_degree flavors in + vertices_cache := Some result; + result + end + | Some result -> result + +(* Note that we must perform any filtering of the vertices \emph{after} + caching, because the restrictions \emph{must not} influence the + cache (unless we tag the cache with model and restrictions). *) + +(*i + let unpack_constant = function + | Coupling.V3 (_, _, cs) -> cs + | Coupling.V4 (_, _, cs) -> cs + | Coupling.Vn (_, _, cs) -> cs + + let coupling_and_flavors_to_string (c, fs) = + M.constant_symbol (unpack_constant c) ^ "[" ^ + String.concat ", " (List.map M.flavor_to_string (PT.to_list fs)) ^ "]" + + let fusions_to_string (f, cfs) = + M.flavor_to_string f ^ " <- { " ^ + String.concat " | " (List.map coupling_and_flavors_to_string cfs) ^ + " }" + + let vertices_to_string vertices = + String.concat "; " (List.map fusions_to_string vertices) + i*) + + let filter_vertices select_vtx vertices = + List.fold_left + (fun acc (f, cfs) -> + let f' = M.conjugate f in + let cfs = + List.filter + (fun (c, fs) -> select_vtx c f' (PT.to_list fs)) + cfs + in + match cfs with + | [] -> acc + | cfs -> (f, cfs) :: acc) + [] vertices + +(* \thocwmodulesubsection{Partitions} *) + +(* Vertices that are not crossing invariant need special treatment so + that they're only generated for the correct combinations of momenta. + + NB: the [crossing] checks here are a bit redundant, because [CM.fuse] below + will bring the killed vertices back to life and will have to filter once more. + Nevertheless, we keep them here, for the unlikely case that anybody ever wants + to use uncolored amplitudes directly. + + NB: the analogous problem does not occur for [select_wf], because this applies + to momenta instead of vertices. *) + +(* \begin{dubious} + This approach worked before the colorize, but has become \emph{futile}, + because [CM.fuse] will bring the killed vertices back to life. We need + to implement the same checks there again!!! + \end{dubious} *) + +(* \begin{dubious} + Using [PT.Mismatched_arity] is not really good style \ldots + + Tho's approach doesn't work since he does not catch charge conjugated processes or + crossed processes. Another very strange thing is that O'Mega seems always to run in the + q2 q3 timelike case, but not in the other two. (Property of how the DAG is built?). + For the $ZZZZ$ vertex I add the same vertex again, but interchange 1 and 3 in the + [crossing] vertex + + \end{dubious} *) + + let kmatrix_cuts c momenta = + match c with + | V4 (Vector4_K_Matrix_tho (disc, _), fusion, _) + | V4 (Vector4_K_Matrix_jr (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F431|F342|F432) + | 1, false, true, false, (F134|F143|F234|F243) + | 1, false, false, true, (F314|F413|F324|F423) -> + true + | 2, true, false, false, (F123|F213|F124|F214) + | 2, false, true, false, (F312|F321|F412|F421) + | 2, false, false, true, (F132|F231|F142|F241) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | _ -> false + end + | V4 (Vector4_K_Matrix_cf_t0 (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F431|F342|F432) + | 1, false, true, false, (F134|F143|F234|F243) + | 1, false, false, true, (F314|F413|F324|F423) -> + true + | 2, true, false, false, (F123|F213|F124|F214) + | 2, false, true, false, (F312|F321|F412|F421) + | 2, false, false, true, (F132|F231|F142|F241) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | _ -> false + end + | V4 (Vector4_K_Matrix_cf_t1 (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F431|F342|F432) + | 1, false, true, false, (F134|F143|F234|F243) + | 1, false, false, true, (F314|F413|F324|F423) -> + true + | 2, true, false, false, (F123|F213|F124|F214) + | 2, false, true, false, (F312|F321|F412|F421) + | 2, false, false, true, (F132|F231|F142|F241) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | _ -> false + end + | V4 (Vector4_K_Matrix_cf_t2 (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F431|F342|F432) + | 1, false, true, false, (F134|F143|F234|F243) + | 1, false, false, true, (F314|F413|F324|F423) -> + true + | 2, true, false, false, (F123|F213|F124|F214) + | 2, false, true, false, (F312|F321|F412|F421) + | 2, false, false, true, (F132|F231|F142|F241) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | _ -> false + end + | V4 (Vector4_K_Matrix_cf_t_rsi (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F431|F342|F432) + | 1, false, true, false, (F134|F143|F234|F243) + | 1, false, false, true, (F314|F413|F324|F423) -> + true + | 2, true, false, false, (F123|F213|F124|F214) + | 2, false, true, false, (F312|F321|F412|F421) + | 2, false, false, true, (F132|F231|F142|F241) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | _ -> false + end + | V4 (Vector4_K_Matrix_cf_m0 (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F431|F342|F432) + | 1, false, true, false, (F134|F143|F234|F243) + | 1, false, false, true, (F314|F413|F324|F423) -> + true + | 2, true, false, false, (F123|F213|F124|F214) + | 2, false, true, false, (F312|F321|F412|F421) + | 2, false, false, true, (F132|F231|F142|F241) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | _ -> false + end + | V4 (Vector4_K_Matrix_cf_m1 (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F431|F342|F432) + | 1, false, true, false, (F134|F143|F234|F243) + | 1, false, false, true, (F314|F413|F324|F423) -> + true + | 2, true, false, false, (F123|F213|F124|F214) + | 2, false, true, false, (F312|F321|F412|F421) + | 2, false, false, true, (F132|F231|F142|F241) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | _ -> false + end + | V4 (Vector4_K_Matrix_cf_m7 (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F431|F342|F432) + | 1, false, true, false, (F134|F143|F234|F243) + | 1, false, false, true, (F314|F413|F324|F423) -> + true + | 2, true, false, false, (F123|F213|F124|F214) + | 2, false, true, false, (F312|F321|F412|F421) + | 2, false, false, true, (F132|F231|F142|F241) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | _ -> false + end + | V4 (DScalar2_Vector2_K_Matrix_ms (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F432|F123|F214) + | 1, false, true, false, (F134|F243|F312|F421) + | 1, false, false, true, (F314|F423|F132|F241) -> + true + | 2, true, false, false, (F431|F342|F213|F124) + | 2, false, true, false, (F143|F234|F321|F412) + | 2, false, false, true, (F413|F324|F231|F142) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | 4, true, false, false, (F142|F413|F231|F324) + | 4, false, true, false, (F214|F341|F123|F432) + | 4, false, false, true, (F124|F431|F213|F342) -> + true + | 5, true, false, false, (F143|F412|F321|F234) + | 5, false, true, false, (F314|F241|F132|F423) + | 5, false, false, true, (F134|F421|F312|F243) -> + true + | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) + | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) + | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> + true + | 7, true, false, false, (F134|F312|F421|F243) + | 7, false, true, false, (F413|F231|F142|F324) + | 7, false, false, true, (F143|F321|F412|F432) -> + true + | 8, true, false, false, (F132|F314|F241|F423) + | 8, false, true, false, (F213|F431|F124|F342) + | 8, false, false, true, (F123|F341|F214|F234) -> + true + | _ -> false + end + | V4 (DScalar2_Vector2_m_0_K_Matrix_cf (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F432|F123|F214) + | 1, false, true, false, (F134|F243|F312|F421) + | 1, false, false, true, (F314|F423|F132|F241) -> + true + | 2, true, false, false, (F431|F342|F213|F124) + | 2, false, true, false, (F143|F234|F321|F412) + | 2, false, false, true, (F413|F324|F231|F142) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | 4, true, false, false, (F142|F413|F231|F324) + | 4, false, true, false, (F214|F341|F123|F432) + | 4, false, false, true, (F124|F431|F213|F342) -> + true + | 5, true, false, false, (F143|F412|F321|F234) + | 5, false, true, false, (F314|F241|F132|F423) + | 5, false, false, true, (F134|F421|F312|F243) -> + true + | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) + | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) + | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> + true + | 7, true, false, false, (F134|F312|F421|F243) + | 7, false, true, false, (F413|F231|F142|F324) + | 7, false, false, true, (F143|F321|F412|F432) -> + true + | 8, true, false, false, (F132|F314|F241|F423) + | 8, false, true, false, (F213|F431|F124|F342) + | 8, false, false, true, (F123|F341|F214|F234) -> + true + | _ -> false + end + | V4 (DScalar2_Vector2_m_1_K_Matrix_cf (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F432|F123|F214) + | 1, false, true, false, (F134|F243|F312|F421) + | 1, false, false, true, (F314|F423|F132|F241) -> + true + | 2, true, false, false, (F431|F342|F213|F124) + | 2, false, true, false, (F143|F234|F321|F412) + | 2, false, false, true, (F413|F324|F231|F142) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | 4, true, false, false, (F142|F413|F231|F324) + | 4, false, true, false, (F214|F341|F123|F432) + | 4, false, false, true, (F124|F431|F213|F342) -> + true + | 5, true, false, false, (F143|F412|F321|F234) + | 5, false, true, false, (F314|F241|F132|F423) + | 5, false, false, true, (F134|F421|F312|F243) -> + true + | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) + | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) + | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> + true + | 7, true, false, false, (F134|F312|F421|F243) + | 7, false, true, false, (F413|F231|F142|F324) + | 7, false, false, true, (F143|F321|F412|F432) -> + true + | 8, true, false, false, (F132|F314|F241|F423) + | 8, false, true, false, (F213|F431|F124|F342) + | 8, false, false, true, (F123|F341|F214|F234) -> + true + | _ -> false + end + | V4 (DScalar2_Vector2_m_7_K_Matrix_cf (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 1, true, false, false, (F341|F432|F123|F214) + | 1, false, true, false, (F134|F243|F312|F421) + | 1, false, false, true, (F314|F423|F132|F241) -> + true + | 2, true, false, false, (F431|F342|F213|F124) + | 2, false, true, false, (F143|F234|F321|F412) + | 2, false, false, true, (F413|F324|F231|F142) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | 4, true, false, false, (F142|F413|F231|F324) + | 4, false, true, false, (F214|F341|F123|F432) + | 4, false, false, true, (F124|F431|F213|F342) -> + true + | 5, true, false, false, (F143|F412|F321|F234) + | 5, false, true, false, (F314|F241|F132|F423) + | 5, false, false, true, (F134|F421|F312|F243) -> + true + | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) + | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) + | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> + true + | 7, true, false, false, (F134|F312|F421|F243) + | 7, false, true, false, (F413|F231|F142|F324) + | 7, false, false, true, (F143|F321|F412|F432) -> + true + | 8, true, false, false, (F132|F314|F241|F423) + | 8, false, true, false, (F213|F431|F124|F342) + | 8, false, false, true, (F123|F341|F214|F234) -> + true + | _ -> false + end + | V4 (DScalar4_K_Matrix_ms (disc, _), fusion, _) -> + let s12, s23, s13 = + begin match PT.to_list momenta with + | [q1; q2; q3] -> (P.Scattering.timelike (P.add q1 q2), + P.Scattering.timelike (P.add q2 q3), + P.Scattering.timelike (P.add q1 q3)) + | _ -> raise PT.Mismatched_arity + end in + begin match disc, s12, s23, s13, fusion with + | 0, true, false, false, (F341|F431|F342|F432|F123|F213|F124|F214) + | 0, false, true, false, (F134|F143|F234|F243|F312|F321|F412|F421) + | 0, false, false, true, (F314|F413|F324|F423|F132|F231|F142|F241) -> + true + | 3, true, false, false, (F143|F413|F142|F412|F321|F231|F324|F234) + | 3, false, true, false, (F314|F341|F214|F241|F132|F123|F432|F423) + | 3, false, false, true, (F134|F431|F124|F421|F312|F213|F342|F243) -> + true + | 4, true, false, false, (F142|F413|F231|F324) + | 4, false, true, false, (F214|F341|F123|F432) + | 4, false, false, true, (F124|F431|F213|F342) -> + true + | 5, true, false, false, (F143|F412|F321|F234) + | 5, false, true, false, (F314|F241|F132|F423) + | 5, false, false, true, (F134|F421|F312|F243) -> + true + | 6, true, false, false, (F134|F132|F314|F312|F241|F243|F421|F423) + | 6, false, true, false, (F213|F413|F231|F431|F124|F324|F142|F342) + | 6, false, false, true, (F143|F123|F341|F321|F412|F214|F432|F234) -> + true + | 7, true, false, false, (F134|F312|F421|F243) + | 7, false, true, false, (F413|F231|F142|F324) + | 7, false, false, true, (F143|F321|F412|F432) -> + true + | 8, true, false, false, (F132|F314|F241|F423) + | 8, false, true, false, (F213|F431|F124|F342) + | 8, false, false, true, (F123|F341|F214|F234) -> + true + | _ -> false + end + | _ -> true + + +(* Counting QCD and EW orders. *) + + let qcd_ew_check orders = + if fst (orders) <= fst (int_orders) && + snd (orders) <= snd (int_orders) then + true + else + false + + +(* Match a set of flavors to a set of momenta. Form the direct product for + the lists of momenta two and three with the list of couplings and flavors + two and three. *) + + let flavor_keystone select_p dim (f1, f23) (p1, p23) = + ({ A.flavor = f1; + A.momentum = P.of_ints dim p1; + A.wf_tag = A.Tags.null_wf }, + Product.fold2 (fun (c, f) p acc -> + try + let p' = PT.map (P.of_ints dim) p in + if select_p (P.of_ints dim p1) (PT.to_list p') && kmatrix_cuts c p' then + (c, PT.map2 (fun f'' p'' -> { A.flavor = f''; + A.momentum = p''; + A.wf_tag = A.Tags.null_wf }) f p') :: acc + else + acc + with + | PT.Mismatched_arity -> acc) f23 p23 []) + +(*i + let cnt = ref 0 + + let gc_stat () = + let minor, promoted, major = Gc.counters () in + Printf.sprintf "(%12.0f, %12.0f, %12.0f)" minor promoted major + + let flavor_keystone select_p n (f1, f23) (p1, p23) = + incr cnt; + Gc.set { (Gc.get()) with Gc.space_overhead = 20 }; + Printf.eprintf "%6d@%8.1f: %s\n" !cnt (Sys.time ()) (gc_stat ()); + flush stderr; + flavor_keystone select_p n (f1, f23) (p1, p23) +i*) + +(* Produce all possible combinations of vertices (flavor keystones) + and momenta by forming the direct product. The semantically equivalent + [Product.list2 (flavor_keystone select_wf n) vertices keystones] with + \emph{subsequent} filtering would be a \emph{very bad} idea, because + a potentially huge intermediate list is built for large models. + E.\,g.~for the MSSM this would lead to non-termination by thrashing + for $2\to4$ processes on most PCs. *) + + let flavor_keystones filter select_p dim vertices keystones = + Product.fold2 (fun v k acc -> + filter (flavor_keystone select_p dim v k) acc) vertices keystones [] + +(* Flatten the nested lists of vertices into a list of attached lines. *) + + let flatten_keystones t = + ThoList.flatmap (fun (p1, p23) -> + p1 :: (ThoList.flatmap (fun (_, rhs) -> PT.to_list rhs) p23)) t + +(* \thocwmodulesubsection{Subtrees} *) + +(* Fuse a tuple of wavefunctions, keeping track of Fermi statistics. + Record only the the sign \emph{relative} to the children. + (The type annotation is only for documentation.) *) + + let fuse select_wf select_vtx wfss : (A.wf * stat * A.rhs) list = + if PT.for_all (fun (wf, _) -> is_source wf) wfss then + try + let wfs, ss = PT.split wfss in + let flavors = PT.map A.flavor wfs + and momenta = PT.map A.momentum wfs + and wf_tags = PT.map A.wf_tag_raw wfs in + let p = PT.fold_left_internal P.add momenta in +(*i let wft = PT.fold_left Tags.fuse wf_tags in i*) + List.fold_left + (fun acc (f, c) -> + if select_wf f p (PT.to_list momenta) + && select_vtx c f (PT.to_list flavors) + && kmatrix_cuts c momenta then + let s = stat_fuse ss f in + let flip = + PT.fold_left (fun acc s' -> acc * stat_sign s') (stat_sign s) ss in + ({ A.flavor = f; + A.momentum = p; + A.wf_tag = A.Tags.null_wf }, s, + ({ Tagged_Coupling.sign = flip; + Tagged_Coupling.coupling = c; + Tagged_Coupling.coupling_tag = A.Tags.null_coupling }, wfs)) :: acc + else + acc) + [] (fuse_rhs flavors) + with + | P.Duplicate _ | S.Impossible -> [] + else + [] + +(* \begin{dubious} + Eventually, the pairs of [tower] and [dag] in [fusion_tower'] + below could and should be replaced by a graded [DAG]. This will + look like, but currently [tower] containts statistics information + that is missing from [dag]: + \begin{quote} + \verb+Type node = flavor * p is not compatible with type wf * stat+ + \end{quote} + This should be easy to fix. However, replacing [type t = wf] + with [type t = wf * stat] is \emph{not} a good idea because the variable + [stat] makes it impossible to test for the existance of a particular + [wf] in a [DAG]. + \end{dubious} + \begin{dubious} + In summary, it seems that [(wf * stat) list array * A.D.t] should be + replaced by [(wf -> stat) * A.D.t]. + \end{dubious} *) + module GF = + struct + module Nodes = + struct + type t = A.wf + module G = struct type t = int let compare = compare end + let compare = A.order_wf + let rank wf = P.rank wf.A.momentum + end + module Edges = struct type t = A.coupling let compare = compare end + module F = DAG.Forest(PT)(Nodes)(Edges) + type node = Nodes.t + type edge = F.edge + type children = F.children + type t = F.t + let compare = F.compare + let for_all = F.for_all + let fold = F.fold + end + + module D' = DAG.Graded(GF) + + let tower_of_dag dag = + let _, max_rank = D'.min_max_rank dag in + Array.init max_rank (fun n -> D'.ranked n dag) + +(* The function [fusion_tower'] + recursively builds the tower of all fusions from bottom up to a chosen + level. The argument [tower] is an array of lists, where the $i$-th sublist + (counting from 0) represents all off shell wave functions depending on + $i+1$~momenta and their Fermistatistics. + \begin{equation} + \begin{aligned} + \Bigl\lbrack + & \{ \phi_1(p_1), \phi_2(p_2), \phi_3(p_3), \ldots \}, \\ + & \{ \phi_{12}(p_1+p_2), \phi'_{12}(p_1+p_2), \ldots, + \phi_{13}(p_1+p_3), \ldots, \phi_{23}(p_2+p_3), \ldots \}, \\ + & \ldots \\ + & \{ \phi_{1\cdots n}(p_1+\cdots+p_n), + \phi'_{1\cdots n}(p_1+\cdots+p_n), \ldots \} \Bigr\rbrack + \end{aligned} + \end{equation} + The argument [dag] is a DAG representing all the fusions calculated so far. + NB: The outer array in [tower] is always very short, so we could also + have accessed a list with [List.nth]. Appending of new members at the + end brings no loss of performance. NB: the array is supposed to be + immutable. *) + +(* The towers must be sorted so that the combinatorical functions can + make consistent selections. + \begin{dubious} + Intuitively, this seems to be correct. However, one could have + expected that no element appears twice and that this ordering is + not necessary \ldots + \end{dubious} *) + let grow select_wf select_vtx tower = + let rank = succ (Array.length tower) in + List.sort Pervasives.compare + (PT.graded_sym_power_fold rank + (fun wfs acc -> fuse select_wf select_vtx wfs @ acc) tower []) + + let add_offspring dag (wf, _, rhs) = + A.D.add_offspring wf rhs dag + + let filter_offspring fusions = + List.map (fun (wf, s, _) -> (wf, s)) fusions + + let rec fusion_tower' n_max select_wf select_vtx tower dag : (A.wf * stat) list array * A.D.t = + if Array.length tower >= n_max then + (tower, dag) + else + let tower' = grow select_wf select_vtx tower in + fusion_tower' n_max select_wf select_vtx + (Array.append tower [|filter_offspring tower'|]) + (List.fold_left add_offspring dag tower') + +(* Discard the tower and return a map from wave functions to Fermistatistics + together with the DAG. *) + + let make_external_dag wfs = + List.fold_left (fun m (wf, _) -> A.D.add_node wf m) A.D.empty wfs + + let mixed_fold_left f acc lists = + Array.fold_left (List.fold_left f) acc lists + + module Stat_Map = + Map.Make (struct type t = A.wf let compare = A.order_wf end) + + let fusion_tower height select_wf select_vtx wfs : (A.wf -> stat) * A.D.t = + let tower, dag = + fusion_tower' height select_wf select_vtx [|wfs|] (make_external_dag wfs) in + let stats = mixed_fold_left + (fun m (wf, s) -> Stat_Map.add wf s m) Stat_Map.empty tower in + ((fun wf -> Stat_Map.find wf stats), dag) + +(* Calculate the minimal tower of fusions that suffices for calculating + the amplitude. *) + + let minimal_fusion_tower n select_wf select_vtx wfs : (A.wf -> stat) * A.D.t = + fusion_tower (T.max_subtree n) select_wf select_vtx wfs + +(* Calculate the complete tower of fusions. It is much larger than required, + but it allows a complete set of gauge checks. *) + let complete_fusion_tower select_wf select_vtx wfs : (A.wf -> stat) * A.D.t = + fusion_tower (List.length wfs - 1) select_wf select_vtx wfs + +(* \begin{dubious} + There is a natural product of two DAGs using [fuse]. Can this be + used in a replacement for [fusion_tower]? The hard part is to avoid + double counting, of course. A straight forward solution + could do a diagonal sum (in order to reject flipped offspring representing + the same fusion) and rely on the uniqueness in [DAG] otherwise. + However, this will (probably) slow down the procedure significanty, + because most fusions (including Fermi signs!) will be calculated before + being rejected by [DAG().add_offspring]. + \end{dubious} *) + +(* Add to [dag] all Goldstone bosons defined in [tower] that correspond + to gauge bosons in [dag]. This is only required for checking + Slavnov-Taylor identities in unitarity gauge. Currently, it is not used, + because we use the complete tower for gauge checking. *) + let harvest_goldstones tower dag = + A.D.fold_nodes (fun wf dag' -> + match M.goldstone wf.A.flavor with + | Some (g, _) -> + let wf' = { wf with A.flavor = g } in + if A.D.is_node wf' tower then begin + A.D.harvest tower wf' dag' + end else begin + dag' + end + | None -> dag') dag dag + +(* Calculate the sign from Fermi statistics that is not already included + in the children. + \begin{dubious} + The use of [PT.of2_kludge] is the largest skeleton on the cupboard of + unified fusions. Currently, it is just another name for [PT.of2], + but the existence of the latter requires binary fusions. Of course, this + is just a symptom for not fully supporting four fermion vertices \ldots + \end{dubious} *) + let stat_keystone stats wf1 wfs = + let wf1' = stats wf1 + and wfs' = PT.map stats wfs in + let stat = + stat_fuse + (PT.of2_kludge wf1' (stat_fuse wfs' (M.conjugate (A.flavor wf1)))) + (A.flavor wf1) in + Printf.eprintf "Fusion.stat_keystone: %s\n" (S.stat_to_string stat); + stat_sign stat + * PT.fold_left (fun acc wf -> acc * stat_sign wf) (stat_sign wf1') wfs' + +(* Test all members of a list of wave functions are defined by the DAG + simultaneously: *) + let test_rhs dag (_, wfs) = + PT.for_all (fun wf -> is_source wf && A.D.is_node wf dag) wfs + +(* Add the keystone [(wf1,pairs)] to [acc] only if it is present in [dag] + and calculate the statistical factor depending on [stats] + \emph{en passant}: *) + let filter_keystone stats dag (wf1, pairs) acc = + if is_source wf1 && A.D.is_node wf1 dag then + match List.filter (test_rhs dag) pairs with + | [] -> acc + | pairs' -> (wf1, List.map (fun (c, wfs) -> + ({ Tagged_Coupling.sign = stat_keystone stats wf1 wfs; + Tagged_Coupling.coupling = c; + Tagged_Coupling.coupling_tag = A.Tags.null_coupling }, + wfs)) pairs') :: acc + else + acc + +(* \begin{figure} + \begin{center} + \thocwincludegraphics{width=\textwidth}{bhabha0}\\ + \hfil\\ + \thocwincludegraphics{width=\textwidth}{bhabha} + \end{center} + \caption{\label{fig:bhabha} + The DAGs for Bhabha scattering before and after weeding out unused + nodes. The blatant asymmetry of these DAGs is caused by our + prescription for removing doubling counting for an even number + of external lines.} + \end{figure} + \begin{figure} + \begin{center} + \thocwincludegraphics{width=\textwidth}{epemudbarmunumubar0}\\ + \hfil\\ + \thocwincludegraphics{width=\textwidth}{epemudbarmunumubar} + \end{center} + \caption{\label{fig:epemudbarmunumubar} + The DAGs for $e^+e^-\to u\bar d \mu^-\bar\nu_\mu$ before and after + weeding out unused nodes.} + \end{figure} + \begin{figure} + \begin{center} + \thocwincludegraphics{width=\textwidth}{epemudbardubar0}\\ + \hfil\\ + \thocwincludegraphics{width=\textwidth}{epemudbardubar} + \end{center} + \caption{\label{fig:epemudbardubar} + The DAGs for $e^+e^-\to u\bar d d\bar u$ before and after weeding + out unused nodes.} + \end{figure} *) + +(* \thocwmodulesubsection{Amplitudes} *) + + module C = Cascade.Make(M)(P) + type selectors = C.selectors + + let external_wfs n particles = + List.map (fun (f, p) -> + ({ A.flavor = f; + A.momentum = P.singleton n p; + A.wf_tag = A.Tags.null_wf }, + stat f p)) particles + +(* \thocwmodulesubsection{Main Function} *) + + module WFMap = Map.Make (struct type t = A.wf let compare = compare end) + +(* [map_amplitude_wfs f a] applies the function [f : wf -> wf] to all + wavefunctions appearing in the amplitude [a]. *) + let map_amplitude_wfs f a = + let map_rhs (c, wfs) = (c, PT.map f wfs) in + let map_braket (wf, rhs) = (f wf, List.map map_rhs rhs) + and map_fusion (lhs, rhs) = (f lhs, List.map map_rhs rhs) in + let map_dag = A.D.map f (fun node rhs -> map_rhs rhs) in + let tower = map_dag a.A.fusion_tower + and dag = map_dag a.A.fusion_dag in + let dependencies_map = + A.D.fold (fun wf _ -> WFMap.add wf (A.D.dependencies dag wf)) dag WFMap.empty in + { A.fusions = List.map map_fusion a.A.fusions; + A.brakets = List.map map_braket a.A.brakets; + A.on_shell = a.A.on_shell; + A.is_gauss = a.A.is_gauss; + A.constraints = a.A.constraints; + A.incoming = a.A.incoming; + A.outgoing = a.A.outgoing; + A.externals = List.map f a.A.externals; + A.symmetry = a.A.symmetry; + A.dependencies = (fun wf -> WFMap.find wf dependencies_map); + A.fusion_tower = tower; + A.fusion_dag = dag } + +(*i +(* \begin{dubious} + Just a silly little test: + \end{dubious} *) + + let hack_amplitude = + map_amplitude_wfs (fun wf -> { wf with momentum = P.split 2 16 wf.momentum }) +i*) + +(* This is the main function that constructs the amplitude for sets + of incoming and outgoing particles and returns the results in + conveniently packaged pieces. *) + + let amplitude goldstones selectors fin fout = + + (* Set up external lines and match flavors with numbered momenta. *) + let f = fin @ List.map M.conjugate fout in + let nin, nout = List.length fin, List.length fout in + let n = nin + nout in + let externals = List.combine f (ThoList.range 1 n) in + let wfs = external_wfs n externals in + let select_p = C.select_p selectors in + let select_wf = + match fin with + | [_] -> C.select_wf selectors P.Decay.timelike + | _ -> C.select_wf selectors P.Scattering.timelike in + let select_vtx = C.select_vtx selectors in + + (* Build the full fusion tower (including nodes that are never + needed in the amplitude). *) + let stats, tower = + + if goldstones then + complete_fusion_tower select_wf select_vtx wfs + else + minimal_fusion_tower n select_wf select_vtx wfs in + + (* Find all vertices for which \emph{all} off shell wavefunctions + are defined by the tower. *) + + let brakets = + flavor_keystones (filter_keystone stats tower) select_p n + (filter_vertices select_vtx + (vertices (M.max_degree ()) (M.flavors ()))) + (T.keystones (ThoList.range 1 n)) in + + (* Remove the part of the DAG that is never needed in the amplitude. *) + let dag = + if goldstones then + tower + else + A.D.harvest_list tower (A.wavefunctions brakets) in + + (* Remove the leaf nodes of the DAG, corresponding to external lines. *) + let fusions = + List.filter (function (_, []) -> false | _ -> true) (A.D.lists dag) in + + (* Calculate the symmetry factor for identical particles in the + final state. *) + let symmetry = + Combinatorics.symmetry fout in + + let dependencies_map = + A.D.fold (fun wf _ -> WFMap.add wf (A.D.dependencies dag wf)) dag WFMap.empty in + + (* Finally: package the results: *) + { A.fusions = fusions; + A.brakets = brakets; + A.on_shell = (fun wf -> C.on_shell selectors (A.flavor wf) wf.A.momentum); + A.is_gauss = (fun wf -> C.is_gauss selectors (A.flavor wf) wf.A.momentum); + A.constraints = C.description selectors; + A.incoming = fin; + A.outgoing = fout; + A.externals = List.map fst wfs; + A.symmetry = symmetry; + A.dependencies = (fun wf -> WFMap.find wf dependencies_map); + A.fusion_tower = tower; + A.fusion_dag = dag } + +(* \thocwmodulesubsection{Color} *) + + module CM = Colorize.It(M) + module CA = Amplitude(PT)(P)(CM) + + let colorize_wf flavor wf = + { CA.flavor = flavor; + CA.momentum = wf.A.momentum; + CA.wf_tag = wf.A.wf_tag } + + let uncolorize_wf wf = + { A.flavor = CM.flavor_sans_color wf.CA.flavor; + A.momentum = wf.CA.momentum; + A.wf_tag = wf.CA.wf_tag } + +(* \begin{dubious} + At the end of the day, I shall want to have some sort of + \textit{fibered DAG} as abstract data type, with a projection + of colored nodes to their uncolored counterparts. + \end{dubious} *) + + module CWFBundle = Bundle.Make + (struct + type elt = CA.wf + let compare_elt = compare + type base = A.wf + let compare_base = compare + let pi wf = + { A.flavor = CM.flavor_sans_color wf.CA.flavor; + A.momentum = wf.CA.momentum; + A.wf_tag = wf.CA.wf_tag } + end) + +(* \begin{dubious} + For now, we can live with simple aggregation: + \end{dubious} *) + + type fibered_dag = { dag : CA.D.t; bundle : CWFBundle.t } + +(* Not yet(?) needed: [module CS = Stat (CM)] *) + + let colorize_sterile_nodes dag f wf fibered_dag = + if A.D.is_sterile wf dag then + let wf', wf_bundle' = f wf fibered_dag in + { dag = CA.D.add_node wf' fibered_dag.dag; + bundle = wf_bundle' } + else + fibered_dag + + let colorize_nodes f wf rhs fibered_dag = + let wf_rhs_list', wf_bundle' = f wf rhs fibered_dag in + let dag' = + List.fold_right + (fun (wf', rhs') -> CA.D.add_offspring wf' rhs') + wf_rhs_list' fibered_dag.dag in + { dag = dag'; + bundle = wf_bundle' } + +(* O'Caml (correctly) infers the type + [val colorize_dag : (D.node -> D.edge * D.children -> fibered_dag -> + (CA.D.node * (CA.D.edge * CA.D.children)) list * CWFBundle.t) -> + (D.node -> fibered_dag -> CA.D.node * CWFBundle.t) -> + D.t -> CWFBundle.t -> fibered_dag]. *) + + let colorize_dag f_node f_ext dag wf_bundle = + A.D.fold (colorize_nodes f_node) dag + (A.D.fold_nodes (colorize_sterile_nodes dag f_ext) dag + { dag = CA.D.empty; bundle = wf_bundle }) + + let colorize_external wf fibered_dag = + match CWFBundle.inv_pi wf fibered_dag.bundle with + | [c_wf] -> (c_wf, fibered_dag.bundle) + | [] -> failwith "colorize_external: not found" + | _ -> failwith "colorize_external: not unique" + + let fuse_c_wf rhs = + let momenta = PT.map (fun wf -> wf.CA.momentum) rhs in + List.filter + (fun (_, c) -> kmatrix_cuts c momenta) + (CM.fuse (List.map (fun wf -> wf.CA.flavor) (PT.to_list rhs))) + + let colorize_coupling c coupling = + { coupling with Tagged_Coupling.coupling = c } + + let colorize_fusion wf (coupling, children) fibered_dag = + let match_flavor (f, _) = (CM.flavor_sans_color f = A.flavor wf) + and find_colored wf' = CWFBundle.inv_pi wf' fibered_dag.bundle in + let fusions = + ThoList.flatmap + (fun c_children -> + List.map + (fun (f, c) -> + (colorize_wf f wf, (colorize_coupling c coupling, c_children))) + (List.filter match_flavor (fuse_c_wf c_children))) + (PT.product (PT.map find_colored children)) in + let bundle = + List.fold_right + (fun (c_wf, _) -> CWFBundle.add c_wf) + fusions fibered_dag.bundle in + (fusions, bundle) + + let colorize_braket1 (wf, (coupling, children)) fibered_dag = + let find_colored wf' = CWFBundle.inv_pi wf' fibered_dag.bundle in + Product.fold2 + (fun bra ket acc -> + List.fold_left + (fun brakets (f, c) -> + if CM.conjugate bra.CA.flavor = f then + (bra, (colorize_coupling c coupling, ket)) :: brakets + else + brakets) + acc (fuse_c_wf ket)) + (find_colored wf) (PT.product (PT.map find_colored children)) [] + + module CWFMap = + Map.Make (struct type t = CA.wf let compare = CA.order_wf end) + + module CKetSet = + Set.Make (struct type t = CA.rhs let compare = compare end) + + (* Find a set of kets in [map] that belong to [bra]. + Return the empty set, if nothing is found. *) + + let lookup_ketset bra map = + try CWFMap.find bra map with Not_found -> CKetSet.empty + + (* Return the set of kets belonging to [bra] in [map], + augmented by [ket]. *) + + let addto_ketset bra ket map = + CKetSet.add ket (lookup_ketset bra map) + + (* Augment or update [map] with a new [(bra, ket)] relation. *) + + let addto_ketset_map map (bra, ket) = + CWFMap.add bra (addto_ketset bra ket map) map + + (* Take a list of [(bra, ket)] pairs and group the [ket]s + according to [bra]. This is very similar to + [ThoList.factorize] on page~\pageref{ThoList.factorize}, + but the latter keeps duplicate copies, while we keep + only one, with equality determined by [CA.order_wf]. *) + + (* \begin{dubious} + Isn't [Bundle]~\ref{Bundle} the correct framework for this? + \end{dubious} *) + + let factorize_brakets brakets = + CWFMap.fold + (fun bra ket acc -> (bra, CKetSet.elements ket) :: acc) + (List.fold_left addto_ketset_map CWFMap.empty brakets) + [] + + let colorize_braket (wf, rhs_list) fibered_dag = + factorize_brakets + (ThoList.flatmap + (fun rhs -> (colorize_braket1 (wf, rhs) fibered_dag)) + rhs_list) + + let colorize_amplitude a fin fout = + let f = fin @ List.map CM.conjugate fout in + let nin, nout = List.length fin, List.length fout in + let n = nin + nout in + let externals = List.combine f (ThoList.range 1 n) in + let external_wfs = CA.external_wfs n externals in + let wf_bundle = CWFBundle.of_list external_wfs in + + let fibered_dag = + colorize_dag + colorize_fusion colorize_external a.A.fusion_dag wf_bundle in + + let brakets = + ThoList.flatmap + (fun braket -> colorize_braket braket fibered_dag) + a.A.brakets in + + let dag = CA.D.harvest_list fibered_dag.dag (CA.wavefunctions brakets) in + + let fusions = + List.filter (function (_, []) -> false | _ -> true) (CA.D.lists dag) in + + let dependencies_map = + CA.D.fold + (fun wf _ -> CWFMap.add wf (CA.D.dependencies dag wf)) + dag CWFMap.empty in + + { CA.fusions = fusions; + CA.brakets = brakets; + CA.constraints = a.A.constraints; + CA.incoming = fin; + CA.outgoing = fout; + CA.externals = external_wfs; + CA.fusion_dag = dag; + CA.fusion_tower = dag; + CA.symmetry = a.A.symmetry; + CA.on_shell = (fun wf -> a.A.on_shell (uncolorize_wf wf)); + CA.is_gauss = (fun wf -> a.A.is_gauss (uncolorize_wf wf)); + CA.dependencies = (fun wf -> CWFMap.find wf dependencies_map) } + + let allowed amplitude = + match amplitude.CA.brakets with + | [] -> false + | _ -> true + + let colorize_amplitudes a = + List.fold_left + (fun amps (fin, fout) -> + let amp = colorize_amplitude a fin fout in + if allowed amp then + amp :: amps + else + amps) + [] (CM.amplitude a.A.incoming a.A.outgoing) + + let amplitudes goldstones exclusions selectors fin fout = + colorize_amplitudes (amplitude goldstones selectors fin fout) + + let amplitude_sans_color goldstones exclusions selectors fin fout = + amplitude goldstones selectors fin fout + + type flavor = CA.flavor + type flavor_sans_color = A.flavor + type p = A.p + type wf = CA.wf + let conjugate = CA.conjugate + let flavor = CA.flavor + let flavor_sans_color wf = CM.flavor_sans_color (CA.flavor wf) + let momentum = CA.momentum + let momentum_list = CA.momentum_list + let wf_tag = CA.wf_tag + + type coupling = CA.coupling + + let sign = CA.sign + let coupling = CA.coupling + let coupling_tag = CA.coupling_tag + type exclusions = CA.exclusions + let no_exclusions = CA.no_exclusions + + type 'a children = 'a CA.children + type rhs = CA.rhs + let children = CA.children + + type fusion = CA.fusion + let lhs = CA.lhs + let rhs = CA.rhs + + type braket = CA.braket + let bra = CA.bra + let ket = CA.ket + + type amplitude = CA.amplitude + type amplitude_sans_color = A.amplitude + let incoming = CA.incoming + let outgoing = CA.outgoing + let externals = CA.externals + let fusions = CA.fusions + let brakets = CA.brakets + let symmetry = CA.symmetry + let on_shell = CA.on_shell + let is_gauss = CA.is_gauss + let constraints = CA.constraints + let variables a = List.map lhs (fusions a) + let dependencies = CA.dependencies + +(* \thocwmodulesubsection{Checking Conservation Laws} *) + + let check_charges () = + let vlist3, vlist4, vlistn = M.vertices () in + List.filter + (fun flist -> not (M.Ch.is_null (M.Ch.sum (List.map M.charges flist)))) + (List.map (fun ((f1, f2, f3), _, _) -> [f1; f2; f3]) vlist3 + @ List.map (fun ((f1, f2, f3, f4), _, _) -> [f1; f2; f3; f4]) vlist4 + @ List.map (fun (flist, _, _) -> flist) vlistn) + +(* \thocwmodulesubsection{Diagnostics} *) + + let count_propagators a = + List.length a.CA.fusions + + let count_fusions a = + List.fold_left (fun n (_, a) -> n + List.length a) 0 a.CA.fusions + + List.fold_left (fun n (_, t) -> n + List.length t) 0 a.CA.brakets + + List.length a.CA.brakets + +(* \begin{dubious} + This brute force approach blows up for more than ten particles. + Find a smarter algorithm. + \end{dubious} *) + + let count_diagrams a = + List.fold_left (fun n (wf1, wf23) -> + n + CA.D.count_trees wf1 a.CA.fusion_dag * + (List.fold_left (fun n' (_, wfs) -> + n' + PT.fold_left (fun n'' wf -> + n'' * CA.D.count_trees wf a.CA.fusion_dag) 1 wfs) 0 wf23)) + 0 a.CA.brakets + + exception Impossible + + let forest' a = + let below wf = CA.D.forest_memoized wf a.CA.fusion_dag in + ThoList.flatmap + (fun (bra, ket) -> + (Product.list2 (fun bra' ket' -> bra' :: ket') + (below bra) + (ThoList.flatmap + (fun (_, wfs) -> + Product.list (fun w -> w) (PT.to_list (PT.map below wfs))) + ket))) + a.CA.brakets + + let cross wf = + { CA.flavor = CM.conjugate wf.CA.flavor; + CA.momentum = P.neg wf.CA.momentum; + CA.wf_tag = wf.CA.wf_tag } + + let fuse_trees wf ts = + Tree.fuse (fun (wf', e) -> (cross wf', e)) + wf (fun t -> List.mem wf (Tree.leafs t)) ts + + let forest wf a = + List.map (fuse_trees wf) (forest' a) + +(*i +(* \begin{dubious} + The following duplication should be replaced by polymorphism + or a functor. + \end{dubious} *) + + let forest_uncolored' a = + let below wf = A.D.forest_memoized wf a.A.fusion_dag in + ThoList.flatmap + (fun (bra, ket) -> + (Product.list2 (fun bra' ket' -> bra' :: ket') + (below bra) + (ThoList.flatmap + (fun (_, wfs) -> + Product.list (fun w -> w) (PT.to_list (PT.map below wfs))) + ket))) + a.A.brakets + + let cross_uncolored wf = + { A.flavor = M.conjugate wf.A.flavor; + A.momentum = P.neg wf.A.momentum; + A.wf_tag = wf.A.wf_tag } + + let fuse_trees_uncolored wf ts = + Tree.fuse (fun (wf', e) -> (cross_uncolored wf', e)) + wf (fun t -> List.mem wf (Tree.leafs t)) ts + + let forest_sans_color wf a = + List.map (fuse_trees_uncolored wf) (forest_uncolored' a) +i*) + + let poles_beneath wf dag = + CA.D.eval_memoized (fun wf' -> [[]]) + (fun wf' _ p -> List.map (fun p' -> wf' :: p') p) + (fun wf1 wf2 -> + Product.fold2 (fun wf' wfs' wfs'' -> (wf' @ wfs') :: wfs'') wf1 wf2 []) + (@) [[]] [[]] wf dag + + let poles a = + ThoList.flatmap (fun (wf1, wf23) -> + let poles_wf1 = poles_beneath wf1 a.CA.fusion_dag in + (ThoList.flatmap (fun (_, wfs) -> + Product.list List.flatten + (PT.to_list (PT.map (fun wf -> + poles_wf1 @ poles_beneath wf a.CA.fusion_dag) wfs))) + wf23)) + a.CA.brakets + + module WFSet = + Set.Make (struct type t = CA.wf let compare = CA.order_wf end) + + let s_channel a = + WFSet.elements + (ThoList.fold_right2 + (fun wf wfs -> + if P.Scattering.timelike wf.CA.momentum then + WFSet.add wf wfs + else + wfs) (poles a) WFSet.empty) + +(* \begin{dubious} + This should be much faster! Is it correct? Is it faster indeed? + \end{dubious} *) + + let poles' a = + List.map CA.lhs a.CA.fusions + + let s_channel a = + WFSet.elements + (List.fold_right + (fun wf wfs -> + if P.Scattering.timelike wf.CA.momentum then + WFSet.add wf wfs + else + wfs) (poles' a) WFSet.empty) + +(* \thocwmodulesubsection{Pictures} *) + +(* Export the DAG in the \texttt{dot(1)} file format so that we can + draw pretty pictures to impress audiences \ldots *) + + let p2s p = + if p >= 0 && p <= 9 then + string_of_int p + else if p <= 36 then + String.make 1 (Char.chr (Char.code 'A' + p - 10)) + else + "_" + + let variable wf = + CM.flavor_symbol wf.CA.flavor ^ + String.concat "" (List.map p2s (P.to_ints wf.CA.momentum)) + + module Int = Map.Make (struct type t = int let compare = compare end) + + let add_to_list i n m = + Int.add i (n :: try Int.find i m with Not_found -> []) m + + let classify_nodes dag = + Int.fold (fun i n acc -> (i, n) :: acc) + (CA.D.fold_nodes (fun wf -> add_to_list (P.rank wf.CA.momentum) wf) + dag Int.empty) [] + + let dag_to_dot ch brakets dag = + Printf.fprintf ch "digraph OMEGA {\n"; + CA.D.iter_nodes (fun wf -> + Printf.fprintf ch " \"%s\" [ label = \"%s\" ];\n" + (variable wf) (variable wf)) dag; + List.iter (fun (_, wfs) -> + Printf.fprintf ch " { rank = same;"; + List.iter (fun n -> + Printf.fprintf ch " \"%s\";" (variable n)) wfs; + Printf.fprintf ch " };\n") (classify_nodes dag); + List.iter (fun n -> + Printf.fprintf ch " \"*\" -> \"%s\";\n" (variable n)) + (flatten_keystones brakets); + CA.D.iter (fun n (_, ns) -> + let p = variable n in + PT.iter (fun n' -> + Printf.fprintf ch " \"%s\" -> \"%s\";\n" p (variable n')) ns) dag; + Printf.fprintf ch "}\n" + + let tower_to_dot ch a = + dag_to_dot ch a.CA.brakets a.CA.fusion_tower + + let amplitude_to_dot ch a = + dag_to_dot ch a.CA.brakets a.CA.fusion_dag + +(* \thocwmodulesubsection{Phasespace} *) + + + let variable wf = + M.flavor_to_string wf.A.flavor ^ + "[" ^ String.concat "/" (List.map p2s (P.to_ints wf.A.momentum)) ^ "]" + + let below_to_channel transform ch dag wf = + let n2s wf = variable (transform wf) + and e2s c = "" in + Tree2.to_channel ch n2s e2s (A.D.dependencies dag wf) + + let bra_to_channel transform ch dag wf = + let tree = A.D.dependencies dag wf in + if Tree2.is_singleton tree then + let n2s wf = variable (transform wf) + and e2s c = "" in + Tree2.to_channel ch n2s e2s tree + else + failwith "Fusion.phase_space_channels: wrong topology!" + + let ket_to_channel transform ch dag ket = + Printf.fprintf ch "("; + begin match A.children ket with + | [] -> () + | [child] -> below_to_channel transform ch dag child + | child :: children -> + below_to_channel transform ch dag child; + List.iter + (fun child -> + Printf.fprintf ch ","; + below_to_channel transform ch dag child) + children + end; + Printf.fprintf ch ")" + + let phase_space_braket transform ch (bra, ket) dag = + bra_to_channel transform ch dag bra; + Printf.fprintf ch ": {"; + begin match ket with + | [] -> () + | [ket1] -> + Printf.fprintf ch " "; + ket_to_channel transform ch dag ket1 + | ket1 :: kets -> + Printf.fprintf ch " "; + ket_to_channel transform ch dag ket1; + List.iter + (fun k -> + Printf.fprintf ch " \\\n | "; + ket_to_channel transform ch dag k) + kets + end; + Printf.fprintf ch " }\n" + +(*i Food for thought: + + let braket_to_tree2 dag (bra, ket) = + let bra' = A.D.dependencies dag bra in + if Tree2.is_singleton bra' then + Tree2.cons + [(fst ket, bra, List.map (A.D.dependencies dag) (A.children ket))] + else + failwith "Fusion.phase_space_channels: wrong topology!" + + let phase_space_braket transform ch (bra, ket) dag = + let n2s wf = variable (transform wf) + and e2s c = "" in + Printf.fprintf + ch "%s\n" (Tree2.to_string n2s e2s (braket_to_tree2 dag (bra, ket))) +i*) + + let phase_space_channels_transformed transform ch a = + List.iter + (fun braket -> phase_space_braket transform ch braket a.A.fusion_dag) + a.A.brakets + + let phase_space_channels ch a = + phase_space_channels_transformed (fun wf -> wf) ch a + + let exchange_momenta_list p1 p2 p = + List.map + (fun pi -> + if pi = p1 then + p2 + else if pi = p2 then + p1 + else + pi) + p + + let exchange_momenta p1 p2 p = + P.of_ints (P.dim p) (exchange_momenta_list p1 p2 (P.to_ints p)) + + let flip_momenta wf = + { wf with A.momentum = exchange_momenta 1 2 wf.A.momentum } + + let phase_space_channels_flipped ch a = + phase_space_channels_transformed flip_momenta ch a + + end + +module Make = Tagged(No_Tags) + +module Binary = Make(Tuple.Binary)(Stat_Dirac)(Topology.Binary) +module Tagged_Binary (T : Tagger) = + Tagged(T)(Tuple.Binary)(Stat_Dirac)(Topology.Binary) + +(* \thocwmodulesection{Fusions with Majorana Fermions} *) + +module Stat_Majorana (M : Model.T) : (Stat with type flavor = M.flavor) = + struct + + type flavor = M.flavor + + type stat = + | Fermion of int * int list + | AntiFermion of int * int list + | Boson of int list + | Majorana of int * int list + + let stat f p = + let s = M.fermion f in + if s = 0 then + Boson [] + else if s < 0 then + AntiFermion (p, []) + else if s = 1 then (* [if s = 1 then] *) + Fermion (p, []) + else (* [if s > 1 then] *) + Majorana (p, []) + + let lines_to_string lines = + ThoList.to_string string_of_int lines + + let stat_to_string = function + | Boson lines -> Printf.sprintf "Boson %s" (lines_to_string lines) + | Fermion (p, lines) -> + Printf.sprintf "Fermion (%d, %s)" p (lines_to_string lines) + | AntiFermion (p, lines) -> + Printf.sprintf "AntiFermion (%d, %s)" p (lines_to_string lines) + | Majorana (p, lines) -> + Printf.sprintf "Majorana (%d, %s)" p (lines_to_string lines) + +(* \begin{JR} + In the formalism of~\cite{Denner:Majorana}, it does not matter to distinguish + spinors and conjugate spinors, it is only important to know in which direction + a fermion line is calculated. So the sign is made by the calculation together + with an aditional one due to the permuation of the pairs of endpoints of + fermion lines in the direction they are calculated. We propose a + ``canonical'' direction from the right to the left child at a fusion point + so we only have to keep in mind which external particle hangs at each side. + Therefore we need not to have a list of pairs of conjugate spinors and + spinors but just a list in which the pairs are right-left-right-left + and so on. Unfortunately it is unavoidable to have couplings with clashing + arrows in supersymmetric theories so we need transmutations from fermions + in antifermions and vice versa as well. + \end{JR} *) + + exception Impossible + +(*i + let stat_fuse s1 s2 f = + match s1, s2, M.lorentz f with + | Boson l1, Boson l2, _ -> Boson (l1 @ l2) + | Boson l1, Fermion (p, l2), Coupling.Majorana -> + Majorana (p, l1 @ l2) + | Boson l1, Fermion (p, l2), _ -> Fermion (p, l1 @ l2) + | Boson l1, AntiFermion (p, l2), Coupling.Majorana -> + Majorana (p, l1 @ l2) + | Boson l1, AntiFermion (p, l2), _ -> AntiFermion (p, l1 @ l2) + | Fermion (p, l1), Boson l2, Coupling.Majorana -> + Majorana (p, l1 @ l2) + | Fermion (p, l1), Boson l2, _ -> Fermion (p, l1 @ l2) + | AntiFermion (p, l1), Boson l2, Coupling.Majorana -> + Majorana (p, l1 @ l2) + | AntiFermion (p, l1), Boson l2, _ -> + AntiFermion (p, l1 @ l2) + | Majorana (p, l1), Boson l2, Coupling.Spinor -> + Fermion (p, l1 @ l2) + | Majorana (p, l1), Boson l2, Coupling.ConjSpinor -> + AntiFermion (p, l1 @ l2) + | Majorana (p, l1), Boson l2, _ -> + Majorana (p, l1 @ l2) + | Boson l1, Majorana (p, l2), Coupling.Spinor -> + Fermion (p, l1 @ l2) + | Boson l1, Majorana (p, l2), Coupling.ConjSpinor -> + AntiFermion (p, l1 @ l2) + | Boson l1, Majorana (p, l2), _ -> + Majorana (p, l1 @ l2) + | AntiFermion (pbar, l1), Fermion (p, l2), _ -> + Boson ([p; pbar] @ l1 @ l2) + | Fermion (p, l1), AntiFermion (pbar, l2), _ -> + Boson ([pbar; p] @ l1 @ l2) + | Fermion (pf, l1), Majorana (pm, l2), _ -> + Boson ([pm; pf] @ l1 @ l2) + | Majorana (pm, l1), Fermion (pf, l2), _ -> + Boson ([pf; pm] @ l1 @ l2) + | AntiFermion (pa, l1), Majorana (pm, l2), _ -> + Boson ([pm; pa] @ l1 @ l2) + | Majorana (pm, l1), AntiFermion (pa, l2), _ -> + Boson ([pa; pm] @ l1 @ l2) + | Majorana (p1, l1), Majorana (p2, l2), _ -> + Boson ([p2; p1] @ l1 @ l2) + | Fermion _, Fermion _, _ | AntiFermion _, + AntiFermion _, _ -> raise Impossible +i*) + + let stat_fuse s1 s2 f = + match s1, s2, M.lorentz f with + | Boson l1, Fermion (p, l2), Coupling.Majorana + | Boson l1, AntiFermion (p, l2), Coupling.Majorana + | Fermion (p, l1), Boson l2, Coupling.Majorana + | AntiFermion (p, l1), Boson l2, Coupling.Majorana + | Majorana (p, l1), Boson l2, Coupling.Majorana + | Boson l1, Majorana (p, l2), Coupling.Majorana -> + Majorana (p, l1 @ l2) + | Boson l1, Fermion (p, l2), Coupling.Spinor + | Boson l1, AntiFermion (p, l2), Coupling.Spinor + | Fermion (p, l1), Boson l2, Coupling.Spinor + | AntiFermion (p, l1), Boson l2, Coupling.Spinor + | Majorana (p, l1), Boson l2, Coupling.Spinor + | Boson l1, Majorana (p, l2), Coupling.Spinor -> + Fermion (p, l1 @ l2) + | Boson l1, Fermion (p, l2), Coupling.ConjSpinor + | Boson l1, AntiFermion (p, l2), Coupling.ConjSpinor + | Fermion (p, l1), Boson l2, Coupling.ConjSpinor + | AntiFermion (p, l1), Boson l2, Coupling.ConjSpinor + | Majorana (p, l1), Boson l2, Coupling.ConjSpinor + | Boson l1, Majorana (p, l2), Coupling.ConjSpinor -> + AntiFermion (p, l1 @ l2) + | Boson l1, Fermion (p, l2), Coupling.Vectorspinor + | Boson l1, AntiFermion (p, l2), Coupling.Vectorspinor + | Fermion (p, l1), Boson l2, Coupling.Vectorspinor + | AntiFermion (p, l1), Boson l2, Coupling.Vectorspinor + | Majorana (p, l1), Boson l2, Coupling.Vectorspinor + | Boson l1, Majorana (p, l2), Coupling.Vectorspinor -> + Majorana (p, l1 @ l2) + | Boson l1, Boson l2, _ -> Boson (l1 @ l2) + | AntiFermion (p1, l1), Fermion (p2, l2), _ + | Fermion (p1, l1), AntiFermion (p2, l2), _ + | Fermion (p1, l1), Fermion (p2, l2), _ + | AntiFermion (p1, l1), AntiFermion (p2, l2), _ + | Fermion (p1, l1), Majorana (p2, l2), _ + | Majorana (p1, l1), Fermion (p2, l2), _ + | AntiFermion (p1, l1), Majorana (p2, l2), _ + | Majorana (p1, l1), AntiFermion (p2, l2), _ + | Majorana (p1, l1), Majorana (p2, l2), _ -> + Boson ([p2; p1] @ l1 @ l2) + | Boson l1, Majorana (p, l2), _ -> Majorana (p, l1 @ l2) + | Boson l1, Fermion (p, l2), _ -> Fermion (p, l1 @ l2) + | Boson l1, AntiFermion (p, l2), _ -> AntiFermion (p, l1 @ l2) + | Fermion (p, l1), Boson l2, _ -> Fermion (p, l1 @ l2) + | AntiFermion (p, l1), Boson l2, _ -> AntiFermion (p, l1 @ l2) + | Majorana (p, l1), Boson l2, _ -> Majorana (p, l1 @ l2) + + let stat_fuse s1 s2 f = + let stat = stat_fuse s1 s2 f in + Printf.eprintf + "Fusion.Stat_Majorana.stat_fuse_legacy: %s <- %s -> %s\n" + (M.flavor_to_string f) + (ThoList.to_string stat_to_string [s1; s2]) + (stat_to_string stat); + stat + +(*i These are the old Impossible raising rules. We keep them to ask Ohl + what the generalized topologies do and if our stat_fuse does the right + for 4-vertices with + + | Boson l1, AntiFermion (p, l2), _ + | Fermion (p, l1), Boson l2, _ + | AntiFermion (p, l1), Boson l2, _ + | Majorana (p, l1), Boson l2, _ + | Boson l1, Majorana (p, l2), _ -> + raise Impossible +i*) + + let permutation lines = fst (Combinatorics.sort_signed lines) + + let stat_sign = function + | Boson lines -> permutation lines + | Fermion (p, lines) -> permutation (p :: lines) + | AntiFermion (pbar, lines) -> permutation (pbar :: lines) + | Majorana (pm, lines) -> permutation (pm :: lines) + + end + +module Binary_Majorana = + Make(Tuple.Binary)(Stat_Majorana)(Topology.Binary) + +module Nary (B: Tuple.Bound) = + Make(Tuple.Nary(B))(Stat_Dirac)(Topology.Nary(B)) +module Nary_Majorana (B: Tuple.Bound) = + Make(Tuple.Nary(B))(Stat_Majorana)(Topology.Nary(B)) + +module Mixed23 = + Make(Tuple.Mixed23)(Stat_Dirac)(Topology.Mixed23) +module Mixed23_Majorana = + Make(Tuple.Mixed23)(Stat_Majorana)(Topology.Mixed23) + +module Helac (B: Tuple.Bound) = + Make(Tuple.Nary(B))(Stat_Dirac)(Topology.Helac(B)) +module Helac_Majorana (B: Tuple.Bound) = + Make(Tuple.Nary(B))(Stat_Majorana)(Topology.Helac(B)) + +(* \thocwmodulesection{Multiple Amplitudes} *) + +module type Multi = + sig + exception Mismatch + val options : Options.t + type flavor + type process = flavor list * flavor list + type amplitude + type fusion + type wf + type exclusions + val no_exclusions : exclusions + type selectors + type amplitudes + val amplitudes : bool -> int option -> + exclusions -> selectors -> process list -> amplitudes + val empty : amplitudes + val initialize_cache : string -> unit + val set_cache_name : string -> unit + val flavors : amplitudes -> process list + val vanishing_flavors : amplitudes -> process list + val color_flows : amplitudes -> Color.Flow.t list + val helicities : amplitudes -> (int list * int list) list + val processes : amplitudes -> amplitude list + val process_table : amplitudes -> amplitude option array array + val fusions : amplitudes -> (fusion * amplitude) list + val multiplicity : amplitudes -> wf -> int + val dictionary : amplitudes -> amplitude -> wf -> int + val color_factors : amplitudes -> Color.Flow.factor array array + val constraints : amplitudes -> string option + end + +module type Multi_Maker = functor (Fusion_Maker : Maker) -> + functor (P : Momentum.T) -> + functor (M : Model.T) -> + Multi with type flavor = M.flavor + and type amplitude = Fusion_Maker(P)(M).amplitude + and type fusion = Fusion_Maker(P)(M).fusion + and type wf = Fusion_Maker(P)(M).wf + and type selectors = Fusion_Maker(P)(M).selectors + +module Multi (Fusion_Maker : Maker) (P : Momentum.T) (M : Model.T) = + struct + + exception Mismatch + + type progress_mode = + | Quiet + | Channel of out_channel + | File of string + + let progress_option = ref Quiet + + module CM = Colorize.It(M) + module F = Fusion_Maker(P)(M) + module C = Cascade.Make(M)(P) + +(* \begin{dubious} + A kludge, at best \ldots + \end{dubious} *) + + let options = Options.extend F.options + [ "progress", Arg.Unit (fun () -> progress_option := Channel stderr), + "report progress to the standard error stream"; + "progress_file", Arg.String (fun s -> progress_option := File s), + "report progress to a file" ] + + type flavor = M.flavor + type p = F.p + type process = flavor list * flavor list + type amplitude = F.amplitude + type fusion = F.fusion + type wf = F.wf + type exclusions = F.exclusions + let no_exclusions = F.no_exclusions + type selectors = F.selectors + + type flavors = flavor list array + type helicities = int list array + type colors = Color.Flow.t array + + type amplitudes' = amplitude array array array + + type amplitudes = + { flavors : process list; + vanishing_flavors : process list; + color_flows : Color.Flow.t list; + helicities : (int list * int list) list; + processes : amplitude list; + process_table : amplitude option array array; + fusions : (fusion * amplitude) list; + multiplicity : (wf -> int); + dictionary : (amplitude -> wf -> int); + color_factors : Color.Flow.factor array array; + constraints : string option } + + let flavors a = a.flavors + let vanishing_flavors a = a.vanishing_flavors + let color_flows a = a.color_flows + let helicities a = a.helicities + let processes a = a.processes + let process_table a = a.process_table + let fusions a = a.fusions + let multiplicity a = a.multiplicity + let dictionary a = a.dictionary + let color_factors a = a.color_factors + let constraints a = a.constraints + + let sans_colors f = + List.map CM.flavor_sans_color f + + let colors (fin, fout) = + List.map M.color (fin @ fout) + + let process_sans_color a = + (sans_colors (F.incoming a), sans_colors (F.outgoing a)) + + let color_flow a = + CM.flow (F.incoming a) (F.outgoing a) + + let process_to_string fin fout = + String.concat " " (List.map M.flavor_to_string fin) + ^ " -> " ^ String.concat " " (List.map M.flavor_to_string fout) + + let count_processes colored_processes = + List.length colored_processes + + module FMap = + Map.Make (struct type t = process let compare = compare end) + + module CMap = + Map.Make (struct type t = Color.Flow.t let compare = compare end) + +(* Recently [Product.list] began to guarantee lexicographic order for sorted + arguments. Anyway, we still force a lexicographic order. *) + + let rec order_spin_table1 s1 s2 = + match s1, s2 with + | h1 :: t1, h2 :: t2 -> + let c = compare h1 h2 in + if c <> 0 then + c + else + order_spin_table1 t1 t2 + | [], [] -> 0 + | _ -> invalid_arg "order_spin_table: inconsistent lengths" + + let order_spin_table (s1_in, s1_out) (s2_in, s2_out) = + let c = compare s1_in s2_in in + if c <> 0 then + c + else + order_spin_table1 s1_out s2_out + + let sort_spin_table table = + List.sort order_spin_table table + + let id x = x + + let pair x y = (x, y) + +(* \begin{dubious} + Improve support for on shell Ward identities: [Coupling.Vector -> [4]] for one + and only one external vector. + \end{dubious} *) + + let rec hs_of_lorentz = function + | Coupling.Scalar -> [0] + | Coupling.Spinor | Coupling.ConjSpinor + | Coupling.Majorana | Coupling.Maj_Ghost -> [-1; 1] + | Coupling.Vector -> [-1; 1] + | Coupling.Massive_Vector -> [-1; 0; 1] + | Coupling.Tensor_1 -> [-1; 0; 1] + | Coupling.Vectorspinor -> [-2; -1; 1; 2] + | Coupling.Tensor_2 -> [-2; -1; 0; 1; 2] + | Coupling.BRS f -> hs_of_lorentz f + + let hs_of_flavor f = + hs_of_lorentz (M.lorentz f) + + let hs_of_flavors (fin, fout) = + (List.map hs_of_flavor fin, List.map hs_of_flavor fout) + + let rec unphysical_of_lorentz = function + | Coupling.Vector -> [4] + | Coupling.Massive_Vector -> [4] + | _ -> invalid_arg "unphysical_of_lorentz: not a vector particle" + + let unphysical_of_flavor f = + unphysical_of_lorentz (M.lorentz f) + + let unphysical_of_flavors1 n f_list = + ThoList.mapi + (fun i f -> if i = n then unphysical_of_flavor f else hs_of_flavor f) + 1 f_list + + let unphysical_of_flavors n (fin, fout) = + (unphysical_of_flavors1 n fin, unphysical_of_flavors1 (n - List.length fin) fout) + + let helicity_table unphysical flavors = + let hs = + begin match unphysical with + | None -> List.map hs_of_flavors flavors + | Some n -> List.map (unphysical_of_flavors n) flavors + end in + if not (ThoList.homogeneous hs) then + invalid_arg "Fusion.helicity_table: not all flavors have the same helicity states!" + else + match hs with + | [] -> [] + | (hs_in, hs_out) :: _ -> + sort_spin_table (Product.list2 pair (Product.list id hs_in) (Product.list id hs_out)) + + module Proc = Process.Make(M) + + module WFMap = Map.Make (struct type t = F.wf let compare = compare end) + module WFSet2 = + Set.Make (struct type t = F.wf * (F.wf, F.coupling) Tree2.t let compare = compare end) + module WFMap2 = + Map.Make (struct type t = F.wf * (F.wf, F.coupling) Tree2.t let compare = compare end) + module WFTSet = + Set.Make (struct type t = (F.wf, F.coupling) Tree2.t let compare = compare end) + +(* All wavefunctions are unique per amplitude. So we can use per-amplitude + dependency trees without additional \emph{internal} tags to identify identical + wave functions. *) + +(* \textbf{NB:} we miss potential optimizations, because we assume all coupling to + be different, while in fact we have horizontal/family symmetries and non abelian + gauge couplings are universal anyway. *) + + let disambiguate_fusions amplitudes = + let fusions = + ThoList.flatmap (fun amplitude -> + List.map + (fun fusion -> (fusion, F.dependencies amplitude (F.lhs fusion))) + (F.fusions amplitude)) + amplitudes in + let duplicates = + List.fold_left + (fun map (fusion, dependencies) -> + let wf = F.lhs fusion in + let set = try WFMap.find wf map with Not_found -> WFTSet.empty in + WFMap.add wf (WFTSet.add dependencies set) map) + WFMap.empty fusions in + let multiplicity_map = + WFMap.fold (fun wf dependencies acc -> + let cardinal = WFTSet.cardinal dependencies in + if cardinal <= 1 then + acc + else + WFMap.add wf cardinal acc) + duplicates WFMap.empty + and dictionary_map = + WFMap.fold (fun wf dependencies acc -> + let cardinal = WFTSet.cardinal dependencies in + if cardinal <= 1 then + acc + else + snd (WFTSet.fold + (fun dependency (i', acc') -> + (succ i', WFMap2.add (wf, dependency) i' acc')) + dependencies (1, acc))) + duplicates WFMap2.empty in + let multiplicity wf = + WFMap.find wf multiplicity_map + and dictionary amplitude wf = + WFMap2.find (wf, F.dependencies amplitude wf) dictionary_map in + (multiplicity, dictionary) + + let eliminate_common_fusions1 seen_wfs amplitude = + List.fold_left + (fun (seen, acc) f -> + let wf = F.lhs f in + let dependencies = F.dependencies amplitude wf in + if WFSet2.mem (wf, dependencies) seen then + (seen, acc) + else + (WFSet2.add (wf, dependencies) seen, (f, amplitude) :: acc)) + seen_wfs (F.fusions amplitude) + + let eliminate_common_fusions processes = + let _, rev_fusions = + List.fold_left + eliminate_common_fusions1 + (WFSet2.empty, []) processes in + List.rev rev_fusions + +(*i + let eliminate_common_fusions processes = + ThoList.flatmap + (fun amplitude -> + (List.map (fun f -> (f, amplitude)) (F.fusions amplitude))) + processes +i*) + +(* \thocwmodulesubsection{Calculate All The Amplitudes} *) + + let amplitudes goldstones unphysical exclusions select_wf processes = + +(* \begin{dubious} + Eventually, we might want to support inhomogeneous helicities. However, + this makes little physics sense for external particles on the mass shell, + unless we have a model with degenerate massive fermions and bosons. + \end{dubious} *) + + if not (ThoList.homogeneous (List.map hs_of_flavors processes)) then + invalid_arg "Fusion.Multi.amplitudes: incompatible helicities"; + + let unique_uncolored_processes = + Proc.remove_duplicate_final_states (C.partition select_wf) processes in + + let progress = + match !progress_option with + | Quiet -> Progress.dummy + | Channel oc -> Progress.channel oc (count_processes unique_uncolored_processes) + | File name -> Progress.file name (count_processes unique_uncolored_processes) in + + let allowed = + ThoList.flatmap + (fun (fi, fo) -> + Progress.begin_step progress (process_to_string fi fo); + let amps = F.amplitudes goldstones exclusions select_wf fi fo in + begin match amps with + | [] -> Progress.end_step progress "forbidden" + | _ -> Progress.end_step progress "allowed" + end; + amps) unique_uncolored_processes in + + Progress.summary progress "all processes done"; + + let color_flows = + ThoList.uniq (List.sort compare (List.map color_flow allowed)) + and flavors = + ThoList.uniq (List.sort compare (List.map process_sans_color allowed)) in + + let vanishing_flavors = + Proc.diff processes flavors in + + let helicities = + helicity_table unphysical flavors in + + let f_index = + fst (List.fold_left + (fun (m, i) f -> (FMap.add f i m, succ i)) + (FMap.empty, 0) flavors) + and c_index = + fst (List.fold_left + (fun (m, i) c -> (CMap.add c i m, succ i)) + (CMap.empty, 0) color_flows) in + + let table = + Array.make_matrix (List.length flavors) (List.length color_flows) None in + List.iter + (fun a -> + let f = FMap.find (process_sans_color a) f_index + and c = CMap.find (color_flow a) c_index in + table.(f).(c) <- Some (a)) + allowed; + + let cf_array = Array.of_list color_flows in + let ncf = Array.length cf_array in + let color_factor_table = Array.make_matrix ncf ncf Color.Flow.zero in + + for i = 0 to pred ncf do + for j = 0 to i do + color_factor_table.(i).(j) <- + Color.Flow.factor cf_array.(i) cf_array.(j); + color_factor_table.(j).(i) <- + color_factor_table.(i).(j) + done + done; + + let fusions = eliminate_common_fusions allowed + and multiplicity, dictionary = disambiguate_fusions allowed in + + { flavors = flavors; + vanishing_flavors = vanishing_flavors; + color_flows = color_flows; + helicities = helicities; + processes = allowed; + process_table = table; + fusions = fusions; + multiplicity = multiplicity; + dictionary = dictionary; + color_factors = color_factor_table; + constraints = C.description select_wf } + + let initialize_cache = F.initialize_cache + let set_cache_name = F.set_cache_name + + let empty = + { flavors = []; + vanishing_flavors = []; + color_flows = []; + helicities = []; + processes = []; + process_table = Array.make_matrix 0 0 None; + fusions = []; + multiplicity = (fun _ -> 1); + dictionary = (fun _ _ -> 1); + color_factors = Array.make_matrix 0 0 Color.Flow.zero; + constraints = None } + + end Index: trunk/omega/src/vertex_parser.mly =================================================================== --- trunk/omega/src/vertex_parser.mly (revision 8274) +++ trunk/omega/src/vertex_parser.mly (revision 8275) @@ -1,340 +1,341 @@ /* vertex_parser.mly -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Right recursion is more convenient for constructing the value. Since the lists will always be short, there is no performace or stack size reason for prefering left recursion. */ %{ module T = Vertex_syntax.Token module E = Vertex_syntax.Expr module P = Vertex_syntax.Particle module V = Vertex_syntax.Parameter module I = Vertex_syntax.Index module X = Vertex_syntax.Tensor module F = Vertex_syntax.File_Tree let parse_error msg = raise (Vertex_syntax.Syntax_Error (msg, symbol_start_pos (), symbol_end_pos ())) let invalid_parameter_attr () = parse_error "invalid parameter attribute" %} %token < int > DIGIT %token < string > CHAR %token < string > PREFIX TOKEN %token SUPER SUB PRIME LBRACE RBRACE LBRACKET RBRACKET %token LPAREN RPAREN %token COMMA %token PLUS MINUS TIMES DIV EQUAL %token < string > INCLUDE %token END %token NEUTRAL CHARGED %token ANTI ALIAS TEX FORTRAN SPIN COLOR CHARGE MASS WIDTH %token PARAMETER DERIVED %token TENSOR INDEX FLAVOR LORENTZ %token VERTEX %left PLUS MINUS %nonassoc NEG UPLUS %left TIMES DIV %start file %type < Vertex_syntax.File_Tree.t > file %% file: | declarations END { $1 } ; declarations: | { [] } | declaration declarations { $1 :: $2 } ; declaration: | particle { F.Particle $1 } | parameter { F.Parameter $1 } | index { F.Index $1 } | tensor { F.Tensor $1 } | vertex { let e, t = $1 in F.Vertex (e, t) } | INCLUDE { F.Include $1 } ; particle: | NEUTRAL token_arg particle_attributes { { P.name = P.Neutral $2; P.attr = $3 } } | CHARGED token_arg_pair particle_attributes { let p, ap = $2 in { P.name = P.Charged (p, ap); P.attr = $3 } } ; expr_arg: | LBRACKET expr RBRACKET { $2 } | LBRACKET expr RBRACE { parse_error "expected `]', found `}'" } | LBRACKET expr END { parse_error "missing `]'" } ; token_arg: | LBRACE scripted_token RBRACE { $2 } | LBRACE scripted_token END { parse_error "missing `}'" } ; token_arg_pair: | token_arg token_arg { ($1, $2) } ; token_list_arg: | LBRACE token_list RBRACE { $2 } | LBRACE token_list END { parse_error "missing `}'" } /* This results in a reduce/reduce conflict:\hfil\goodbreak \verb+ | LBRACE token_list RBRACKET { parse_error "expected `}', found `]'" }+ */ ; token_list_opt_arg: | LBRACKET token_list RBRACKET { $2 } | LBRACKET token_list END { parse_error "missing `}'" } ; particle_attributes: | { [ ] } | particle_attribute particle_attributes { $1 :: $2 } ; particle_attribute: | ALIAS token_list_arg { P.Alias $2 } | ANTI ALIAS token_list_arg { P.Alias $3 } | TEX token_list_arg { P.TeX $2 } | ANTI TEX token_list_arg { P.TeX_Anti $3 } | FORTRAN token_list_arg { P.Fortran $2 } | ANTI FORTRAN token_list_arg { P.Fortran_Anti $3 } | SPIN arg { P.Spin $2 } | COLOR token_list_arg { P.Color ([], $2) } | COLOR token_list_opt_arg token_list_arg { P.Color ($2, $3) } | CHARGE arg { P.Charge $2 } | MASS token_list_arg { P.Mass $2 } | WIDTH token_list_arg { P.Width $2 } ; parameter: | PARAMETER token_arg arg parameter_attributes { V.Parameter { V.name = $2; V.value = $3; V.attr = $4 } } | DERIVED token_arg arg parameter_attributes { V.Derived { V.name = $2; V.value = $3; V.attr = $4 } } ; parameter_attributes: | { [ ] } | parameter_attribute parameter_attributes { $1 :: $2 } ; parameter_attribute: | ALIAS token_list_arg { V.Alias $2 } | TEX token_list_arg { V.TeX $2 } | FORTRAN token_list_arg { V.Fortran $2 } | ANTI { invalid_parameter_attr () } | SPIN { invalid_parameter_attr () } | COLOR { invalid_parameter_attr () } | CHARGE { invalid_parameter_attr () } | MASS { invalid_parameter_attr () } | WIDTH { invalid_parameter_attr () } ; index: | INDEX token_arg index_attributes { { I.name = $2; I.attr = $3 } } ; index_attributes: | { [ ] } | index_attribute index_attributes { $1 :: $2 } ; index_attribute: | COLOR token_list_arg { I.Color ([], $2) } | COLOR token_list_opt_arg token_list_arg { I.Color ($2, $3) } | FLAVOR token_list_arg { I.Flavor ([], $2) } | FLAVOR token_list_opt_arg token_list_arg { I.Flavor ($2, $3) } | LORENTZ token_list_arg { I.Lorentz $2 } ; tensor: | TENSOR token_arg tensor_attributes { { X.name = $2; X.attr = $3 } } ; tensor_attributes: | { [ ] } | tensor_attribute tensor_attributes { $1 :: $2 } ; tensor_attribute: | COLOR token_list_arg { X.Color ([], $2) } | COLOR token_list_opt_arg token_list_arg { X.Color ($2, $3) } | FLAVOR token_list_arg { X.Flavor ([], $2) } | FLAVOR token_list_opt_arg token_list_arg { X.Flavor ($2, $3) } | LORENTZ token_list_arg { X.Lorentz $2 } ; vertex: | VERTEX token_list_arg { (E.integer 1, T.list $2) } | VERTEX expr_arg token_list_arg { ($2, T.list $3) } | VERTEX expr_arg LBRACE RBRACE { ($2, T.list []) } | VERTEX expr_arg LBRACE END { parse_error "missing `}'" } | VERTEX not_arg_or_token_list { parse_error "expected `[' or `{'" } /* This results in a shift/reduce conflict:\hfil\goodbreak \verb+ | VERTEX expr_arg LBRACE RBRACKET { parse_error "expected `}', found `]'" }+ */ ; expr: | integer { E.integer $1 } | LPAREN expr RPAREN { $2 } | LPAREN expr RBRACKET { parse_error "expected `)', found `]'" } | LPAREN expr RBRACE { parse_error "expected `)', found `}'" } | LPAREN expr END { parse_error "missing `)'" } | expr PLUS expr { E.add $1 $3 } | expr MINUS expr { E.sub $1 $3 } | expr TIMES expr { E.mult $1 $3 } | expr DIV expr { E.div $1 $3 } | bare_scripted_token arg_list { E.apply $1 $2 } /* Making `\verb+*+' optional introduces \emph{many} shift/reduce and reduce/reduce conflicts:\hfil\goodbreak \verb+ | expr expr { E.mult $1 $2 }+ */ ; arg_list: | { [] } | arg arg_list { $1 :: $2 } ; arg: | LBRACE expr RBRACE { $2 } | LBRACE expr RBRACKET { parse_error "expected `}', found `]'" } | LBRACE expr END { parse_error "missing `}'" } ; integer: | DIGIT { $1 } | integer DIGIT { 10 * $1 + $2 } ; token: | bare_token { $1 } | LBRACE scripted_token RBRACE { $2 } | LBRACE scripted_token END { parse_error "missing `}'" } | LBRACE scripted_token token_list RBRACE { T.list ($2 :: $3) } | LBRACE scripted_token token_list END { parse_error "missing `}'" } /* This results in a shift/reduce conflict because RBRACKET is a bare token:\hfil\goodbreak \verb+ | LBRACE scripted_token RBRACKET { parse_error "expected `}', found `]'" }+ */ ; token_list: | scripted_token { [$1] } | scripted_token token_list { $1 :: $2 } ; scripted_token: | prefixes token optional_scripts { T.scripted $1 $2 $3 } ; bare_scripted_token: | prefixes name optional_scripts { T.scripted $1 $2 $3 } ; optional_scripts: | { (None, None) } | super { ($1, None) } | sub { (None, $1) } | super sub { ($1, $2) } | sub super { ($2, $1) } | primes { ($1, None) } | primes sub { ($1, $2) } | sub primes { ($2, $1) } ; super: | SUPER token { Some $2 } | SUPER RBRACE { parse_error "superscript can't start with `}'" } /* This results in many reduce/reduce conflicts:\hfil\goodbreak \verb+ | SUPER RBRACKET { parse_error "superscript can't start with `]'" }+ */ ; sub: | SUB token { Some $2 } | SUB RBRACE { parse_error "subscript can't start with `}'" } /* This results in many reduce/reduce conflicts:\hfil\goodbreak \verb+ | SUB RBRACKET { parse_error "subscript can't start with `]'" }+ */ ; prefixes: | { [] } | PREFIX prefixes { $1 :: $2 } ; primes: | prime_list { Some (T.list $1) } ; prime_list: | PRIME { [T.token "\\prime"] } | PRIME prime_list { T.token "\\prime" :: $2 } ; name: | CHAR { T.token $1 } | TOKEN { T.token $1 } ; bare_token: | DIGIT { T.digit $1 } | CHAR { T.token $1 } | TOKEN { T.token $1 } | PLUS { T.token "+" } | MINUS { T.token "-" } | TIMES { T.token "*" } | DIV { T.token "/" } | COMMA { T.token "," } | LPAREN { T.token "(" } | RPAREN { T.token ")" } +; not_arg_or_token_list: | DIGIT { () } | CHAR { () } | TOKEN { () } | PLUS { () } | MINUS { () } | TIMES { () } | DIV { () } | COMMA { () } | RPAREN { () } | RBRACKET { () } | RBRACE { () } ; Index: trunk/omega/src/colorize.ml =================================================================== --- trunk/omega/src/colorize.ml (revision 8274) +++ trunk/omega/src/colorize.ml (revision 8275) @@ -1,2263 +1,1836 @@ (* colorize.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner Marco Sekulla So Young Shim WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -(* \thocwmodulesection{Colorizing a Monochrome Model} *) - -module It (M : Model.T) = - struct +(* \thocwmodulesection{Auxiliary functions} *) - open Coupling - - module C = Color +(* \thocwmodulesubsection{Exceptions} *) - let incomplete s = - failwith ("Colorize.It()." ^ s ^ " not done yet!") +let incomplete s = + failwith ("Colorize." ^ s ^ " not done yet!") - let invalid s = - invalid_arg ("Colorize.It()." ^ s ^ " must not be evaluated!") +let invalid s = + invalid_arg ("Colorize." ^ s ^ " must not be evaluated!") + +let impossible s = + invalid_arg ("Colorize." ^ s ^ " can't happen! (but just did ...)") + +let mismatch s = + invalid_arg ("Colorize." ^ s ^ " mismatch of representations!") + +let su0 s = + invalid_arg ("Colorize." ^ s ^ ": found SU(0)!") + +let colored_vertex s = + invalid_arg ("Colorize." ^ s ^ ": colored vertex!") + +let baryonic_vertex s = + invalid_arg ("Colorize." ^ s ^ + ": baryonic (i.e. eps_ijk) vertices not supported yet!") + +let color_flow_ambiguous s = + invalid_arg ("Colorize." ^ s ^ ": ambiguous color flow!") + +let color_flow_of_string s = + let c = int_of_string s in + if c < 1 then + invalid_arg ("Colorize." ^ s ^ ": color flow # < 1!") + else + c + +(* \thocwmodulesubsection{Multiplying Vertices by a Constant Factor} *) + +module Q = Algebra.Q +module QC = Algebra.QC + +let of_int n = + QC.make (Q.make n 1) Q.null + +let integer z = + if Q.is_null (QC.imag z) then + let x = QC.real z in + try + Some (Q.to_integer x) + with + | _ -> None + else + None + +let mult_vertex3 x v = + let open Coupling in + match v with + | FBF (c, fb, coup, f) -> + FBF ((x * c), fb, coup, f) + | PBP (c, fb, coup, f) -> + PBP ((x * c), fb, coup, f) + | BBB (c, fb, coup, f) -> + BBB ((x * c), fb, coup, f) + | GBG (c, fb, coup, f) -> + GBG ((x * c), fb, coup, f) + | Gauge_Gauge_Gauge c -> + Gauge_Gauge_Gauge (x * c) + | I_Gauge_Gauge_Gauge c -> + I_Gauge_Gauge_Gauge (x * c) + | Aux_Gauge_Gauge c -> + Aux_Gauge_Gauge (x * c) + | Scalar_Vector_Vector c -> + Scalar_Vector_Vector (x * c) + | Aux_Vector_Vector c -> + Aux_Vector_Vector (x * c) + | Aux_Scalar_Vector c -> + Aux_Scalar_Vector (x * c) + | Scalar_Scalar_Scalar c -> + Scalar_Scalar_Scalar (x * c) + | Aux_Scalar_Scalar c -> + Aux_Scalar_Scalar (x * c) + | Vector_Scalar_Scalar c -> + Vector_Scalar_Scalar (x * c) + | Graviton_Scalar_Scalar c -> + Graviton_Scalar_Scalar (x * c) + | Graviton_Vector_Vector c -> + Graviton_Vector_Vector (x * c) + | Graviton_Spinor_Spinor c -> + Graviton_Spinor_Spinor (x * c) + | Dim4_Vector_Vector_Vector_T c -> + Dim4_Vector_Vector_Vector_T (x * c) + | Dim4_Vector_Vector_Vector_L c -> + Dim4_Vector_Vector_Vector_L (x * c) + | Dim4_Vector_Vector_Vector_T5 c -> + Dim4_Vector_Vector_Vector_T5 (x * c) + | Dim4_Vector_Vector_Vector_L5 c -> + Dim4_Vector_Vector_Vector_L5 (x * c) + | Dim6_Gauge_Gauge_Gauge c -> + Dim6_Gauge_Gauge_Gauge (x * c) + | Dim6_Gauge_Gauge_Gauge_5 c -> + Dim6_Gauge_Gauge_Gauge_5 (x * c) + | Aux_DScalar_DScalar c -> + Aux_DScalar_DScalar (x * c) + | Aux_Vector_DScalar c -> + Aux_Vector_DScalar (x * c) + | Dim5_Scalar_Gauge2 c -> + Dim5_Scalar_Gauge2 (x * c) + | Dim5_Scalar_Gauge2_Skew c -> + Dim5_Scalar_Gauge2_Skew (x * c) + | Dim5_Scalar_Vector_Vector_T c -> + Dim5_Scalar_Vector_Vector_T (x * c) + | Dim5_Scalar_Vector_Vector_U c -> + Dim5_Scalar_Vector_Vector_U (x * c) + | Dim5_Scalar_Vector_Vector_TU c -> + Dim5_Scalar_Vector_Vector_TU (x * c) + | Dim5_Scalar_Scalar2 c -> + Dim5_Scalar_Scalar2 (x * c) + | Scalar_Vector_Vector_t c -> + Scalar_Vector_Vector_t (x * c) + | Dim6_Vector_Vector_Vector_T c -> + Dim6_Vector_Vector_Vector_T (x * c) + | Tensor_2_Vector_Vector c -> + Tensor_2_Vector_Vector (x * c) + | Tensor_2_Vector_Vector_cf c -> + Tensor_2_Vector_Vector_cf (x * c) + | Tensor_2_Scalar_Scalar c -> + Tensor_2_Scalar_Scalar (x * c) + | Tensor_2_Scalar_Scalar_cf c -> + Tensor_2_Scalar_Scalar_cf (x * c) + | Tensor_2_Vector_Vector_1 c -> + Tensor_2_Vector_Vector_1 (x * c) + | Tensor_2_Vector_Vector_t c -> + Tensor_2_Vector_Vector_t (x * c) + | Dim5_Tensor_2_Vector_Vector_1 c -> + Dim5_Tensor_2_Vector_Vector_1 (x * c) + | Dim5_Tensor_2_Vector_Vector_2 c -> + Dim5_Tensor_2_Vector_Vector_2 (x * c) + | TensorVector_Vector_Vector c -> + TensorVector_Vector_Vector (x * c) + | TensorVector_Vector_Vector_cf c -> + TensorVector_Vector_Vector_cf (x * c) + | TensorVector_Scalar_Scalar c -> + TensorVector_Scalar_Scalar (x * c) + | TensorVector_Scalar_Scalar_cf c -> + TensorVector_Scalar_Scalar_cf (x * c) + | TensorScalar_Vector_Vector c -> + TensorScalar_Vector_Vector (x * c) + | TensorScalar_Vector_Vector_cf c -> + TensorScalar_Vector_Vector_cf (x * c) + | TensorScalar_Scalar_Scalar c -> + TensorScalar_Scalar_Scalar (x * c) + | TensorScalar_Scalar_Scalar_cf c -> + TensorScalar_Scalar_Scalar_cf (x * c) + | Dim7_Tensor_2_Vector_Vector_T c -> + Dim7_Tensor_2_Vector_Vector_T (x * c) + | Dim6_Scalar_Vector_Vector_D c -> + Dim6_Scalar_Vector_Vector_D (x * c) + | Dim6_Scalar_Vector_Vector_DP c -> + Dim6_Scalar_Vector_Vector_DP (x * c) + | Dim6_HAZ_D c -> + Dim6_HAZ_D (x * c) + | Dim6_HAZ_DP c -> + Dim6_HAZ_DP (x * c) + | Gauge_Gauge_Gauge_i c -> + Gauge_Gauge_Gauge_i (x * c) + | Dim6_GGG c -> + Dim6_GGG (x * c) + | Dim6_AWW_DP c -> + Dim6_AWW_DP (x *c) + | Dim6_AWW_DW c -> + Dim6_AWW_DW (x * c) + | Dim6_Gauge_Gauge_Gauge_i c -> + Dim6_Gauge_Gauge_Gauge_i (x * c) + | Dim6_HHH c -> + Dim6_HHH (x * c) + | Dim6_WWZ_DPWDW c -> + Dim6_WWZ_DPWDW (x * c) + | Dim6_WWZ_DW c -> + Dim6_WWZ_DW (x * c) + | Dim6_WWZ_D c -> + Dim6_WWZ_D (x * c) + +let cmult_vertex3 z v = + match integer z with + | None -> invalid_arg "cmult_vertex3" + | Some x -> mult_vertex3 x v + +let mult_vertex4 x v = + let open Coupling in + match v with + | Scalar4 c -> + Scalar4 (x * c) + | Scalar2_Vector2 c -> + Scalar2_Vector2 (x * c) + | Vector4 ic4_list -> + Vector4 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) + | DScalar4 ic4_list -> + DScalar4 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) + | DScalar2_Vector2 ic4_list -> + DScalar2_Vector2 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) + | GBBG (c, fb, b2, f) -> + GBBG ((x * c), fb, b2, f) + | Vector4_K_Matrix_tho (c, ic4_list) -> + Vector4_K_Matrix_tho ((x * c), ic4_list) + | Vector4_K_Matrix_jr (c, ch2_list) -> + Vector4_K_Matrix_jr ((x * c), ch2_list) + | Vector4_K_Matrix_cf_t0 (c, ch2_list) -> + Vector4_K_Matrix_cf_t0 ((x * c), ch2_list) + | Vector4_K_Matrix_cf_t1 (c, ch2_list) -> + Vector4_K_Matrix_cf_t1 ((x * c), ch2_list) + | Vector4_K_Matrix_cf_t2 (c, ch2_list) -> + Vector4_K_Matrix_cf_t2 ((x * c), ch2_list) + | Vector4_K_Matrix_cf_t_rsi (c, ch2_list) -> + Vector4_K_Matrix_cf_t_rsi ((x * c), ch2_list) + | Vector4_K_Matrix_cf_m0 (c, ch2_list) -> + Vector4_K_Matrix_cf_m0 ((x * c), ch2_list) + | Vector4_K_Matrix_cf_m1 (c, ch2_list) -> + Vector4_K_Matrix_cf_m1 ((x * c), ch2_list) + | Vector4_K_Matrix_cf_m7 (c, ch2_list) -> + Vector4_K_Matrix_cf_m7 ((x * c), ch2_list) + | DScalar2_Vector2_K_Matrix_ms (c, ch2_list) -> + DScalar2_Vector2_K_Matrix_ms ((x * c), ch2_list) + | DScalar2_Vector2_m_0_K_Matrix_cf (c, ch2_list) -> + DScalar2_Vector2_m_0_K_Matrix_cf ((x * c), ch2_list) + | DScalar2_Vector2_m_1_K_Matrix_cf (c, ch2_list) -> + DScalar2_Vector2_m_1_K_Matrix_cf ((x * c), ch2_list) + | DScalar2_Vector2_m_7_K_Matrix_cf (c, ch2_list) -> + DScalar2_Vector2_m_7_K_Matrix_cf ((x * c), ch2_list) + | DScalar4_K_Matrix_ms (c, ch2_list) -> + DScalar4_K_Matrix_ms ((x * c), ch2_list) + | Dim8_Scalar2_Vector2_1 c -> + Dim8_Scalar2_Vector2_1 (x * c) + | Dim8_Scalar2_Vector2_2 c -> + Dim8_Scalar2_Vector2_1 (x * c) + | Dim8_Scalar2_Vector2_m_0 c -> + Dim8_Scalar2_Vector2_m_0 (x * c) + | Dim8_Scalar2_Vector2_m_1 c -> + Dim8_Scalar2_Vector2_m_1 (x * c) + | Dim8_Scalar2_Vector2_m_7 c -> + Dim8_Scalar2_Vector2_m_7 (x * c) + | Dim8_Scalar4 c -> + Dim8_Scalar4 (x * c) + | Dim8_Vector4_t_0 ic4_list -> + Dim8_Vector4_t_0 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) + | Dim8_Vector4_t_1 ic4_list -> + Dim8_Vector4_t_1 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) + | Dim8_Vector4_t_2 ic4_list -> + Dim8_Vector4_t_2 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) + | Dim8_Vector4_m_0 ic4_list -> + Dim8_Vector4_m_0 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) + | Dim8_Vector4_m_1 ic4_list -> + Dim8_Vector4_m_1 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) + | Dim8_Vector4_m_7 ic4_list -> + Dim8_Vector4_m_7 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) + | Dim6_H4_P2 c -> + Dim6_H4_P2 (x * c) + | Dim6_AHWW_DPB c -> + Dim6_AHWW_DPB (x * c) + | Dim6_AHWW_DPW c -> + Dim6_AHWW_DPW (x * c) + | Dim6_AHWW_DW c -> + Dim6_AHWW_DW (x * c) + | Dim6_Vector4_DW c -> + Dim6_Vector4_DW (x * c) + | Dim6_Vector4_W c -> + Dim6_Vector4_W (x * c) + | Dim6_Scalar2_Vector2_PB c -> + Dim6_Scalar2_Vector2_PB (x * c) + | Dim6_Scalar2_Vector2_D c -> + Dim6_Scalar2_Vector2_D (x * c) + | Dim6_Scalar2_Vector2_DP c -> + Dim6_Scalar2_Vector2_DP (x * c) + | Dim6_HHZZ_T c -> + Dim6_HHZZ_T (x * c) + | Dim6_HWWZ_DW c -> + Dim6_HWWZ_DW (x * c) + | Dim6_HWWZ_DPB c -> + Dim6_HWWZ_DPB (x * c) + | Dim6_HWWZ_DDPW c -> + Dim6_HWWZ_DDPW (x * c) + | Dim6_HWWZ_DPW c -> + Dim6_HWWZ_DPW (x * c) + | Dim6_AHHZ_D c -> + Dim6_AHHZ_D (x * c) + | Dim6_AHHZ_DP c -> + Dim6_AHHZ_DP (x * c) + | Dim6_AHHZ_PB c -> + Dim6_AHHZ_PB (x * c) + +let cmult_vertex4 z v = + match integer z with + | None -> invalid_arg "cmult_vertex4" + | Some x -> mult_vertex4 x v + +let mult_vertexn x = function + | _ -> incomplete "mult_vertexn" + +let cmult_vertexn z v = + let open Coupling in + match v with + | UFO (c, v, s, fl, col) -> + UFO (QC.mul z c, v, s, fl, col) + +let mult_vertex x v = + let open Coupling in + match v with + | V3 (v, fuse, c) -> V3 (mult_vertex3 x v, fuse, c) + | V4 (v, fuse, c) -> V4 (mult_vertex4 x v, fuse, c) + | Vn (v, fuse, c) -> Vn (mult_vertexn x v, fuse, c) + +let cmult_vertex z v = + let open Coupling in + match v with + | V3 (v, fuse, c) -> V3 (cmult_vertex3 z v, fuse, c) + | V4 (v, fuse, c) -> V4 (cmult_vertex4 z v, fuse, c) + | Vn (v, fuse, c) -> Vn (cmult_vertexn z v, fuse, c) - let impossible s = - invalid_arg ("Colorize.It()." ^ s ^ " can't happen! (but just did ...)") +(* \thocwmodulesection{Flavors Adorned with Colorflows} *) - let mismatch s = - invalid_arg ("Colorize.It()." ^ s ^ " mismatch of representations!") - - let su0 s = - invalid_arg ("Colorize.It()." ^ s ^ ": found SU(0)!") - - let colored_vertex s = - invalid_arg ("Colorize.It()." ^ s ^ ": colored vertex!") - - let baryonic_vertex s = - invalid_arg ("Colorize.It()." ^ s ^ - ": baryonic (i.e. eps_ijk) vertices not supported yet!") - - let color_flow_ambiguous s = - invalid_arg ("Colorize.It()." ^ s ^ ": ambiguous color flow!") +module Flavor (M : Model.T) = + struct - let color_flow_of_string s = - let c = int_of_string s in - if c < 1 then - invalid_arg ("Colorize.It()." ^ s ^ ": color flow # < 1!") - else - c - type cf_in = int type cf_out = int - type flavor = + type t = | White of M.flavor | CF_in of M.flavor * cf_in | CF_out of M.flavor * cf_out | CF_io of M.flavor * cf_in * cf_out | CF_aux of M.flavor - type flavor_sans_color = M.flavor - let flavor_sans_color = function | White f -> f | CF_in (f, _) -> f | CF_out (f, _) -> f | CF_io (f, _, _) -> f | CF_aux f -> f let pullback f arg1 = f (flavor_sans_color arg1) - type gauge = M.gauge - type constant = M.constant - let options = M.options - - let color = pullback M.color - let pdg = pullback M.pdg - let lorentz = pullback M.lorentz - - module Ch = M.Ch - let charges = pullback M.charges - -(* For the propagator we cannot use pullback because we have to add the case - of the color singlet propagator by hand. *) - - let cf_aux_propagator = function - | Prop_Scalar -> Prop_Col_Scalar (* Spin 0 octets. *) - | Prop_Majorana -> Prop_Col_Majorana (* Spin 1/2 octets. *) - | Prop_Feynman -> Prop_Col_Feynman (* Spin 1 states, massless. *) - | Prop_Unitarity -> Prop_Col_Unitarity (* Spin 1 states, massive. *) - | Aux_Scalar -> Aux_Col_Scalar (* constant colored scalar propagator *) - | Aux_Vector -> Aux_Col_Vector (* constant colored vector propagator *) - | Aux_Tensor_1 -> Aux_Col_Tensor_1 (* constant colored tensor propagator *) - | Prop_Col_Scalar | Prop_Col_Feynman - | Prop_Col_Majorana | Prop_Col_Unitarity - | Aux_Col_Scalar | Aux_Col_Vector | Aux_Col_Tensor_1 - -> failwith ("Colorize.It().colorize_propagator: already colored particle!") - | _ -> failwith ("Colorize.It().colorize_propagator: impossible!") - - let propagator = function - | CF_aux f -> cf_aux_propagator (M.propagator f) - | White f -> M.propagator f - | CF_in (f, _) -> M.propagator f - | CF_out (f, _) -> M.propagator f - | CF_io (f, _, _) -> M.propagator f - - let width = pullback M.width - - let goldstone = function - | White f -> - begin match M.goldstone f with - | None -> None - | Some (f', g) -> Some (White f', g) - end - | CF_in (f, c) -> - begin match M.goldstone f with - | None -> None - | Some (f', g) -> Some (CF_in (f', c), g) - end - | CF_out (f, c) -> - begin match M.goldstone f with - | None -> None - | Some (f', g) -> Some (CF_out (f', c), g) - end - | CF_io (f, c1, c2) -> - begin match M.goldstone f with - | None -> None - | Some (f', g) -> Some (CF_io (f', c1, c2), g) - end - | CF_aux f -> - begin match M.goldstone f with - | None -> None - | Some (f', g) -> Some (CF_aux f', g) - end - - let conjugate = function - | White f -> White (M.conjugate f) - | CF_in (f, c) -> CF_out (M.conjugate f, c) - | CF_out (f, c) -> CF_in (M.conjugate f, c) - | CF_io (f, c1, c2) -> CF_io (M.conjugate f, c2, c1) - | CF_aux f -> CF_aux (M.conjugate f) - - let conjugate_sans_color = M.conjugate - - let fermion = pullback M.fermion - - let max_degree = M.max_degree - - let flavors () = - invalid "flavors" - - let external_flavors () = - invalid "external_flavors" - - let parameters = M.parameters - - (* We MUST NOT compute [nc] only once because [M.flavors] - might change in a mutable [Model.Mutable] after loading - a new model file! *) - - let nc () = - let nc_set = - List.fold_left - (fun nc_set f -> - match M.color f with - | C.Singlet -> nc_set - | C.SUN nc -> Sets.Int.add (abs nc) nc_set - | C.AdjSUN nc -> Sets.Int.add (abs nc) nc_set) - Sets.Int.empty (M.flavors ()) in - match Sets.Int.elements nc_set with - | [] -> 0 - | [n] -> n - | nc_list -> - invalid_arg - ("Colorize.It(): more than one value of N_C: " ^ - String.concat ", " (List.map string_of_int nc_list)) - - let split_color_string s = - try - let i1 = String.index s '/' in - let i2 = String.index_from s (succ i1) '/' in - let sf = String.sub s 0 i1 - and sc1 = String.sub s (succ i1) (i2 - i1 - 1) - and sc2 = String.sub s (succ i2) (String.length s - i2 - 1) in - (sf, sc1, sc2) - with - | Not_found -> (s, "", "") - - let flavor_of_string s = - try - let sf, sc1, sc2 = split_color_string s in - let f = M.flavor_of_string sf in - match M.color f with - | C.Singlet -> White f - | C.SUN nc -> - if nc > 0 then - CF_in (f, color_flow_of_string sc1) - else - CF_out (f, color_flow_of_string sc2) - | C.AdjSUN _ -> - begin match sc1, sc2 with - | "", "" -> CF_aux f - | _, _ -> CF_io (f, color_flow_of_string sc1, color_flow_of_string sc2) - end - with - | Failure "int_of_string" -> - invalid_arg "Colorize().flavor_of_string: expecting integer" + end - let flavor_to_string = function - | White f -> - M.flavor_to_string f - | CF_in (f, c) -> - M.flavor_to_string f ^ "/" ^ string_of_int c ^ "/" - | CF_out (f, c) -> - M.flavor_to_string f ^ "//" ^ string_of_int c - | CF_io (f, c1, c2) -> - M.flavor_to_string f ^ "/" ^ string_of_int c1 ^ "/" ^ string_of_int c2 - | CF_aux f -> - M.flavor_to_string f ^ "//" +(* \thocwmodulesection{The Legacy Implementation} *) - let flavor_to_TeX = function - | White f -> - M.flavor_to_TeX f - | CF_in (f, c) -> - "{" ^ M.flavor_to_TeX f ^ "}_{\\mathstrut " ^ string_of_int c ^ "}" - | CF_out (f, c) -> - "{" ^ M.flavor_to_TeX f ^ "}_{\\mathstrut\\overline{" ^ - string_of_int c ^ "}}" - | CF_io (f, c1, c2) -> - "{" ^ M.flavor_to_TeX f ^ "}_{\\mathstrut " ^ - string_of_int c1 ^ "\\overline{" ^ string_of_int c2 ^ "}}" - | CF_aux f -> - "{" ^ M.flavor_to_TeX f ^ "}_{\\mathstrut 0}" +module Legacy_Implementation (M : Model.T) = + struct - let flavor_symbol = function - | White f -> - M.flavor_symbol f - | CF_in (f, c) -> - M.flavor_symbol f ^ "_" ^ string_of_int c ^ "_" - | CF_out (f, c) -> - M.flavor_symbol f ^ "__" ^ string_of_int c - | CF_io (f, c1, c2) -> - M.flavor_symbol f ^ "_" ^ string_of_int c1 ^ "_" ^ string_of_int c2 - | CF_aux f -> - M.flavor_symbol f ^ "__" + module C = Color - let gauge_symbol = M.gauge_symbol + module Colored_Flavor = Flavor(M) + open Colored_Flavor -(* Masses and widths must not depend on the colors anyway! *) - let mass_symbol = pullback M.mass_symbol - let width_symbol = pullback M.width_symbol - - let constant_symbol = M.constant_symbol + open Coupling -(* \thocwmodulesubsection{Vertices} *) + let nc = M.nc (* \thocwmodulesubsection{Auxiliary functions} *) - module Q = Algebra.Q - module QC = Algebra.QC - - let of_int n = - QC.make (Q.make n 1) Q.null - - let integer z = - if Q.is_null (QC.imag z) then - let x = QC.real z in - try - Some (Q.to_integer x) - with - | _ -> None - else - None - - let mult_vertex3 x = function - | UFO3 (c, v, s, col) -> - UFO3 (QC.mul (of_int x) c, v, s, col) - | FBF (c, fb, coup, f) -> - FBF ((x * c), fb, coup, f) - | PBP (c, fb, coup, f) -> - PBP ((x * c), fb, coup, f) - | BBB (c, fb, coup, f) -> - BBB ((x * c), fb, coup, f) - | GBG (c, fb, coup, f) -> - GBG ((x * c), fb, coup, f) - | Gauge_Gauge_Gauge c -> - Gauge_Gauge_Gauge (x * c) - | I_Gauge_Gauge_Gauge c -> - I_Gauge_Gauge_Gauge (x * c) - | Aux_Gauge_Gauge c -> - Aux_Gauge_Gauge (x * c) - | Scalar_Vector_Vector c -> - Scalar_Vector_Vector (x * c) - | Aux_Vector_Vector c -> - Aux_Vector_Vector (x * c) - | Aux_Scalar_Vector c -> - Aux_Scalar_Vector (x * c) - | Scalar_Scalar_Scalar c -> - Scalar_Scalar_Scalar (x * c) - | Aux_Scalar_Scalar c -> - Aux_Scalar_Scalar (x * c) - | Vector_Scalar_Scalar c -> - Vector_Scalar_Scalar (x * c) - | Graviton_Scalar_Scalar c -> - Graviton_Scalar_Scalar (x * c) - | Graviton_Vector_Vector c -> - Graviton_Vector_Vector (x * c) - | Graviton_Spinor_Spinor c -> - Graviton_Spinor_Spinor (x * c) - | Dim4_Vector_Vector_Vector_T c -> - Dim4_Vector_Vector_Vector_T (x * c) - | Dim4_Vector_Vector_Vector_L c -> - Dim4_Vector_Vector_Vector_L (x * c) - | Dim4_Vector_Vector_Vector_T5 c -> - Dim4_Vector_Vector_Vector_T5 (x * c) - | Dim4_Vector_Vector_Vector_L5 c -> - Dim4_Vector_Vector_Vector_L5 (x * c) - | Dim6_Gauge_Gauge_Gauge c -> - Dim6_Gauge_Gauge_Gauge (x * c) - | Dim6_Gauge_Gauge_Gauge_5 c -> - Dim6_Gauge_Gauge_Gauge_5 (x * c) - | Aux_DScalar_DScalar c -> - Aux_DScalar_DScalar (x * c) - | Aux_Vector_DScalar c -> - Aux_Vector_DScalar (x * c) - | Dim5_Scalar_Gauge2 c -> - Dim5_Scalar_Gauge2 (x * c) - | Dim5_Scalar_Gauge2_Skew c -> - Dim5_Scalar_Gauge2_Skew (x * c) - | Dim5_Scalar_Vector_Vector_T c -> - Dim5_Scalar_Vector_Vector_T (x * c) - | Dim5_Scalar_Vector_Vector_U c -> - Dim5_Scalar_Vector_Vector_U (x * c) - | Dim5_Scalar_Vector_Vector_TU c -> - Dim5_Scalar_Vector_Vector_TU (x * c) - | Dim5_Scalar_Scalar2 c -> - Dim5_Scalar_Scalar2 (x * c) - | Scalar_Vector_Vector_t c -> - Scalar_Vector_Vector_t (x * c) - | Dim6_Vector_Vector_Vector_T c -> - Dim6_Vector_Vector_Vector_T (x * c) - | Tensor_2_Vector_Vector c -> - Tensor_2_Vector_Vector (x * c) - | Tensor_2_Vector_Vector_cf c -> - Tensor_2_Vector_Vector_cf (x * c) - | Tensor_2_Scalar_Scalar c -> - Tensor_2_Scalar_Scalar (x * c) - | Tensor_2_Scalar_Scalar_cf c -> - Tensor_2_Scalar_Scalar_cf (x * c) - | Tensor_2_Vector_Vector_1 c -> - Tensor_2_Vector_Vector_1 (x * c) - | Tensor_2_Vector_Vector_t c -> - Tensor_2_Vector_Vector_t (x * c) - | Dim5_Tensor_2_Vector_Vector_1 c -> - Dim5_Tensor_2_Vector_Vector_1 (x * c) - | Dim5_Tensor_2_Vector_Vector_2 c -> - Dim5_Tensor_2_Vector_Vector_2 (x * c) - | TensorVector_Vector_Vector c -> - TensorVector_Vector_Vector (x * c) - | TensorVector_Vector_Vector_cf c -> - TensorVector_Vector_Vector_cf (x * c) - | TensorVector_Scalar_Scalar c -> - TensorVector_Scalar_Scalar (x * c) - | TensorVector_Scalar_Scalar_cf c -> - TensorVector_Scalar_Scalar_cf (x * c) - | TensorScalar_Vector_Vector c -> - TensorScalar_Vector_Vector (x * c) - | TensorScalar_Vector_Vector_cf c -> - TensorScalar_Vector_Vector_cf (x * c) - | TensorScalar_Scalar_Scalar c -> - TensorScalar_Scalar_Scalar (x * c) - | TensorScalar_Scalar_Scalar_cf c -> - TensorScalar_Scalar_Scalar_cf (x * c) - | Dim7_Tensor_2_Vector_Vector_T c -> - Dim7_Tensor_2_Vector_Vector_T (x * c) - | Dim6_Scalar_Vector_Vector_D c -> - Dim6_Scalar_Vector_Vector_D (x * c) - | Dim6_Scalar_Vector_Vector_DP c -> - Dim6_Scalar_Vector_Vector_DP (x * c) - | Dim6_HAZ_D c -> - Dim6_HAZ_D (x * c) - | Dim6_HAZ_DP c -> - Dim6_HAZ_DP (x * c) - | Gauge_Gauge_Gauge_i c -> - Gauge_Gauge_Gauge_i (x * c) - | Dim6_GGG c -> - Dim6_GGG (x * c) - | Dim6_AWW_DP c -> - Dim6_AWW_DP (x *c) - | Dim6_AWW_DW c -> - Dim6_AWW_DW (x * c) - | Dim6_Gauge_Gauge_Gauge_i c -> - Dim6_Gauge_Gauge_Gauge_i (x * c) - | Dim6_HHH c -> - Dim6_HHH (x * c) - | Dim6_WWZ_DPWDW c -> - Dim6_WWZ_DPWDW (x * c) - | Dim6_WWZ_DW c -> - Dim6_WWZ_DW (x * c) - | Dim6_WWZ_D c -> - Dim6_WWZ_D (x * c) - - let cmult_vertex3 z = function - | UFO3 (c, v, s, col) -> - UFO3 (QC.mul z c, v, s, col) - | v -> - begin match integer z with - | None -> invalid_arg "cmult_vertex3" - | Some x -> mult_vertex3 x v - end - - let mult_vertex4 x = function - | UFO4 (c, v, s, col) -> - UFO4 (QC.mul (of_int x) c, v, s, col) - | Scalar4 c -> - Scalar4 (x * c) - | Scalar2_Vector2 c -> - Scalar2_Vector2 (x * c) - | Vector4 ic4_list -> - Vector4 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) - | DScalar4 ic4_list -> - DScalar4 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) - | DScalar2_Vector2 ic4_list -> - DScalar2_Vector2 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) - | GBBG (c, fb, b2, f) -> - GBBG ((x * c), fb, b2, f) - | Vector4_K_Matrix_tho (c, ic4_list) -> - Vector4_K_Matrix_tho ((x * c), ic4_list) - | Vector4_K_Matrix_jr (c, ch2_list) -> - Vector4_K_Matrix_jr ((x * c), ch2_list) - | Vector4_K_Matrix_cf_t0 (c, ch2_list) -> - Vector4_K_Matrix_cf_t0 ((x * c), ch2_list) - | Vector4_K_Matrix_cf_t1 (c, ch2_list) -> - Vector4_K_Matrix_cf_t1 ((x * c), ch2_list) - | Vector4_K_Matrix_cf_t2 (c, ch2_list) -> - Vector4_K_Matrix_cf_t2 ((x * c), ch2_list) - | Vector4_K_Matrix_cf_t_rsi (c, ch2_list) -> - Vector4_K_Matrix_cf_t_rsi ((x * c), ch2_list) - | Vector4_K_Matrix_cf_m0 (c, ch2_list) -> - Vector4_K_Matrix_cf_m0 ((x * c), ch2_list) - | Vector4_K_Matrix_cf_m1 (c, ch2_list) -> - Vector4_K_Matrix_cf_m1 ((x * c), ch2_list) - | Vector4_K_Matrix_cf_m7 (c, ch2_list) -> - Vector4_K_Matrix_cf_m7 ((x * c), ch2_list) - | DScalar2_Vector2_K_Matrix_ms (c, ch2_list) -> - DScalar2_Vector2_K_Matrix_ms ((x * c), ch2_list) - | DScalar2_Vector2_m_0_K_Matrix_cf (c, ch2_list) -> - DScalar2_Vector2_m_0_K_Matrix_cf ((x * c), ch2_list) - | DScalar2_Vector2_m_1_K_Matrix_cf (c, ch2_list) -> - DScalar2_Vector2_m_1_K_Matrix_cf ((x * c), ch2_list) - | DScalar2_Vector2_m_7_K_Matrix_cf (c, ch2_list) -> - DScalar2_Vector2_m_7_K_Matrix_cf ((x * c), ch2_list) - | DScalar4_K_Matrix_ms (c, ch2_list) -> - DScalar4_K_Matrix_ms ((x * c), ch2_list) - | Dim8_Scalar2_Vector2_1 c -> - Dim8_Scalar2_Vector2_1 (x * c) - | Dim8_Scalar2_Vector2_2 c -> - Dim8_Scalar2_Vector2_1 (x * c) - | Dim8_Scalar2_Vector2_m_0 c -> - Dim8_Scalar2_Vector2_m_0 (x * c) - | Dim8_Scalar2_Vector2_m_1 c -> - Dim8_Scalar2_Vector2_m_1 (x * c) - | Dim8_Scalar2_Vector2_m_7 c -> - Dim8_Scalar2_Vector2_m_7 (x * c) - | Dim8_Scalar4 c -> - Dim8_Scalar4 (x * c) - | Dim8_Vector4_t_0 ic4_list -> - Dim8_Vector4_t_0 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) - | Dim8_Vector4_t_1 ic4_list -> - Dim8_Vector4_t_1 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) - | Dim8_Vector4_t_2 ic4_list -> - Dim8_Vector4_t_2 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) - | Dim8_Vector4_m_0 ic4_list -> - Dim8_Vector4_m_0 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) - | Dim8_Vector4_m_1 ic4_list -> - Dim8_Vector4_m_1 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) - | Dim8_Vector4_m_7 ic4_list -> - Dim8_Vector4_m_7 (List.map (fun (c, icl) -> (x * c, icl)) ic4_list) - | Dim6_H4_P2 c -> - Dim6_H4_P2 (x * c) - | Dim6_AHWW_DPB c -> - Dim6_AHWW_DPB (x * c) - | Dim6_AHWW_DPW c -> - Dim6_AHWW_DPW (x * c) - | Dim6_AHWW_DW c -> - Dim6_AHWW_DW (x * c) - | Dim6_Vector4_DW c -> - Dim6_Vector4_DW (x * c) - | Dim6_Vector4_W c -> - Dim6_Vector4_W (x * c) - | Dim6_Scalar2_Vector2_PB c -> - Dim6_Scalar2_Vector2_PB (x * c) - | Dim6_Scalar2_Vector2_D c -> - Dim6_Scalar2_Vector2_D (x * c) - | Dim6_Scalar2_Vector2_DP c -> - Dim6_Scalar2_Vector2_DP (x * c) - | Dim6_HHZZ_T c -> - Dim6_HHZZ_T (x * c) - | Dim6_HWWZ_DW c -> - Dim6_HWWZ_DW (x * c) - | Dim6_HWWZ_DPB c -> - Dim6_HWWZ_DPB (x * c) - | Dim6_HWWZ_DDPW c -> - Dim6_HWWZ_DDPW (x * c) - | Dim6_HWWZ_DPW c -> - Dim6_HWWZ_DPW (x * c) - | Dim6_AHHZ_D c -> - Dim6_AHHZ_D (x * c) - | Dim6_AHHZ_DP c -> - Dim6_AHHZ_DP (x * c) - | Dim6_AHHZ_PB c -> - Dim6_AHHZ_PB (x * c) - - let cmult_vertex4 z = function - | UFO4 (c, v, s, col) -> - UFO4 (QC.mul z c, v, s, col) - | v -> - begin match integer z with - | None -> invalid_arg "cmult_vertex4" - | Some x -> mult_vertex4 x v - end - - let mult_vertexn x = function - | foo -> ignore (incomplete "mult_vertexn"); foo - - let cmult_vertexn z = function - | foo -> ignore (incomplete "cmult_vertexn"); foo - - let mult_vertex x = function - | V3 (v, fuse, c) -> V3 (mult_vertex3 x v, fuse, c) - | V4 (v, fuse, c) -> V4 (mult_vertex4 x v, fuse, c) - | Vn (v, fuse, c) -> Vn (mult_vertexn x v, fuse, c) - - let cmult_vertex z = function - | V3 (v, fuse, c) -> V3 (cmult_vertex3 z v, fuse, c) - | V4 (v, fuse, c) -> V4 (cmult_vertex4 z v, fuse, c) - | Vn (v, fuse, c) -> Vn (cmult_vertexn z v, fuse, c) - (* Below, we will need to permute Lorentz structures. The following permutes the three possible contractions of four vectors. We permute the first three indices, as they correspond to the particles entering the fusion. *) type permutation4 = | P123 | P231 | P312 | P213 | P321 | P132 let permute_contract4 = function | P123 -> begin function | C_12_34 -> C_12_34 | C_13_42 -> C_13_42 | C_14_23 -> C_14_23 end | P231 -> begin function | C_12_34 -> C_14_23 | C_13_42 -> C_12_34 | C_14_23 -> C_13_42 end | P312 -> begin function | C_12_34 -> C_13_42 | C_13_42 -> C_14_23 | C_14_23 -> C_12_34 end | P213 -> begin function | C_12_34 -> C_12_34 | C_13_42 -> C_14_23 | C_14_23 -> C_13_42 end | P321 -> begin function | C_12_34 -> C_14_23 | C_13_42 -> C_13_42 | C_14_23 -> C_12_34 end | P132 -> begin function | C_12_34 -> C_13_42 | C_13_42 -> C_12_34 | C_14_23 -> C_14_23 end let permute_contract4_list perm ic4_list = List.map (fun (i, c4) -> (i, permute_contract4 perm c4)) ic4_list let permute_vertex4' perm = function - | UFO4 (c, v, s, Color.Trivial4) -> - UFO4 (c, v, s, Color.Trivial4) - | UFO4 (c, v, s, _) -> - failwith "Colorize.permute_vertex4': incomplete" | Scalar4 c -> Scalar4 c | Vector4 ic4_list -> Vector4 (permute_contract4_list perm ic4_list) | Vector4_K_Matrix_jr (c, ic4_list) -> Vector4_K_Matrix_jr (c, permute_contract4_list perm ic4_list) | Vector4_K_Matrix_cf_t0 (c, ic4_list) -> Vector4_K_Matrix_cf_t0 (c, permute_contract4_list perm ic4_list) | Vector4_K_Matrix_cf_t1 (c, ic4_list) -> Vector4_K_Matrix_cf_t1 (c, permute_contract4_list perm ic4_list) | Vector4_K_Matrix_cf_t2 (c, ic4_list) -> Vector4_K_Matrix_cf_t2 (c, permute_contract4_list perm ic4_list) | Vector4_K_Matrix_cf_t_rsi (c, ic4_list) -> Vector4_K_Matrix_cf_t_rsi (c, permute_contract4_list perm ic4_list) | Vector4_K_Matrix_cf_m0 (c, ic4_list) -> Vector4_K_Matrix_cf_m0 (c, permute_contract4_list perm ic4_list) | Vector4_K_Matrix_cf_m1 (c, ic4_list) -> Vector4_K_Matrix_cf_m1 (c, permute_contract4_list perm ic4_list) | Vector4_K_Matrix_cf_m7 (c, ic4_list) -> Vector4_K_Matrix_cf_m7 (c, permute_contract4_list perm ic4_list) | DScalar2_Vector2_K_Matrix_ms (c, ic4_list) -> DScalar2_Vector2_K_Matrix_ms (c, permute_contract4_list perm ic4_list) | DScalar2_Vector2_m_0_K_Matrix_cf (c, ic4_list) -> DScalar2_Vector2_m_0_K_Matrix_cf (c, permute_contract4_list perm ic4_list) | DScalar2_Vector2_m_1_K_Matrix_cf (c, ic4_list) -> DScalar2_Vector2_m_1_K_Matrix_cf (c, permute_contract4_list perm ic4_list) | DScalar2_Vector2_m_7_K_Matrix_cf (c, ic4_list) -> DScalar2_Vector2_m_7_K_Matrix_cf (c, permute_contract4_list perm ic4_list) | DScalar4_K_Matrix_ms (c, ic4_list) -> DScalar4_K_Matrix_ms (c, permute_contract4_list perm ic4_list) | Scalar2_Vector2 c -> incomplete "permute_vertex4' Scalar2_Vector2" | DScalar4 ic4_list -> incomplete "permute_vertex4' DScalar4" | DScalar2_Vector2 ic4_list -> incomplete "permute_vertex4' DScalar2_Vector2" | GBBG (c, fb, b2, f) -> incomplete "permute_vertex4' GBBG" | Vector4_K_Matrix_tho (c, ch2_list) -> incomplete "permute_vertex4' Vector4_K_Matrix_tho" | Dim8_Scalar2_Vector2_1 ic4_list -> incomplete "permute_vertex4' Dim8_Scalar2_Vector2_1" | Dim8_Scalar2_Vector2_2 ic4_list -> incomplete "permute_vertex4' Dim8_Scalar2_Vector2_2" | Dim8_Scalar2_Vector2_m_0 ic4_list -> incomplete "permute_vertex4' Dim8_Scalar2_Vector2_m_0" | Dim8_Scalar2_Vector2_m_1 ic4_list -> incomplete "permute_vertex4' Dim8_Scalar2_Vector2_m_1" | Dim8_Scalar2_Vector2_m_7 ic4_list -> incomplete "permute_vertex4' Dim8_Scalar2_Vector2_m_7" | Dim8_Scalar4 ic4_list -> incomplete "permute_vertex4' Dim8_Scalar4" | Dim8_Vector4_t_0 ic4_list -> incomplete "permute_vertex4' Dim8_Vector4_t_0" | Dim8_Vector4_t_1 ic4_list -> incomplete "permute_vertex4' Dim8_Vector4_t_1" | Dim8_Vector4_t_2 ic4_list -> incomplete "permute_vertex4' Dim8_Vector4_t_2" | Dim8_Vector4_m_0 ic4_list -> incomplete "permute_vertex4' Dim8_Vector4_m_0" | Dim8_Vector4_m_1 ic4_list -> incomplete "permute_vertex4' Dim8_Vector4_m_1" | Dim8_Vector4_m_7 ic4_list -> incomplete "permute_vertex4' Dim8_Vector4_m_7" | Dim6_H4_P2 ic4_list -> incomplete "permute_vertex4' Dim6_H4_P2" | Dim6_AHWW_DPB ic4_list -> incomplete "permute_vertex4' Dim6_AHWW_DPB" | Dim6_AHWW_DPW ic4_list -> incomplete "permute_vertex4' Dim6_AHWW_DPW" | Dim6_AHWW_DW ic4_list -> incomplete "permute_vertex4' Dim6_AHWW_DW" | Dim6_Vector4_DW ic4_list -> incomplete "permute_vertex4' Dim6_Vector4_DW" | Dim6_Vector4_W ic4_list -> incomplete "permute_vertex4' Dim6_Vector4_W" | Dim6_Scalar2_Vector2_D ic4_list -> incomplete "permute_vertex4' Dim6_Scalar2_Vector2_D" | Dim6_Scalar2_Vector2_DP ic4_list -> incomplete "permute_vertex4' Dim6_Scalar2_Vector2_DP" | Dim6_Scalar2_Vector2_PB ic4_list -> incomplete "permute_vertex4' Dim6_Scalar2_Vector2_PB" | Dim6_HHZZ_T ic4_list -> incomplete "permute_vertex4' Dim6_HHZZ_T" | Dim6_HWWZ_DW ic4_list -> incomplete "permute_vertex4' Dim6_HWWZ_DW" | Dim6_HWWZ_DPB ic4_list -> incomplete "permute_vertex4' Dim6_HWWZ_DPB" | Dim6_HWWZ_DDPW ic4_list -> incomplete "permute_vertex4' Dim6_HWWZ_DDPW" | Dim6_HWWZ_DPW ic4_list -> incomplete "permute_vertex4' Dim6_HWWZ_DPW" | Dim6_AHHZ_D ic4_list -> incomplete "permute_vertex4' Dim6_AHHZ_D" | Dim6_AHHZ_DP ic4_list -> incomplete "permute_vertex4' Dim6_AHHZ_DP" | Dim6_AHHZ_PB ic4_list -> incomplete "permute_vertex4' Dim6_AHHZ_PB" let permute_vertex4 perm = function | V3 (v, fuse, c) -> V3 (v, fuse, c) | V4 (v, fuse, c) -> V4 (permute_vertex4' perm v, fuse, c) | Vn (v, fuse, c) -> Vn (v, fuse, c) -(* [vertices] are \emph{only} used by functor applications and - for indexing a cache of precomputed fusion rules, which is not - used for colorized models. *) - - let vertices () = - invalid "vertices" - (* \thocwmodulesubsection{Cubic Vertices} *) (* \begin{dubious} The following pattern matches could eventually become quite long. The O'Caml compiler will (hopefully) optimize them aggressively (\url{http://pauillac.inria.fr/~maranget/papers/opat/}). \end{dubious} *) - let colorize_fusion2_legacy f1 f2 (f, v) = + let colorize_fusion2 f1 f2 (f, v) = match M.color f with | C.Singlet -> begin match f1, f2 with | White _, White _ -> [White f, v] | CF_in (_, c1), CF_out (_, c2') | CF_out (_, c1), CF_in (_, c2') -> if c1 = c2' then [White f, v] else [] | CF_io (f1, c1, c1'), CF_io (f2, c2, c2') -> if c1 = c2' && c2 = c1' then [White f, v] else [] | CF_aux f1, CF_aux f2 -> [White f, mult_vertex (- (nc ())) v] | CF_aux _, CF_io _ | CF_io _, CF_aux _ -> [] | (CF_in _ | CF_out _ | CF_io _ | CF_aux _), White _ | White _, (CF_in _ | CF_out _ | CF_io _ | CF_aux _) | (CF_io _ | CF_aux _), (CF_in _ | CF_out _) | (CF_in _ | CF_out _), (CF_io _ | CF_aux _) | CF_in _, CF_in _ | CF_out _, CF_out _ -> colored_vertex "colorize_fusion2" end | C.SUN nc1 -> begin match f1, f2 with | CF_in (_, c1), (White _ | CF_aux _) | (White _ | CF_aux _), CF_in (_, c1) -> if nc1 > 0 then [CF_in (f, c1), v] else colored_vertex "colorize_fusion2" | CF_out (_, c1'), (White _ | CF_aux _) | (White _ | CF_aux _), CF_out (_, c1') -> if nc1 < 0 then [CF_out (f, c1'), v] else colored_vertex "colorize_fusion2" | CF_in (_, c1), CF_io (_, c2, c2') | CF_io (_, c2, c2'), CF_in (_, c1) -> if nc1 > 0 then begin if c1 = c2' then [CF_in (f, c2), v] else [] end else colored_vertex "colorize_fusion2" | CF_out (_, c1'), CF_io (_, c2, c2') | CF_io (_, c2, c2'), CF_out (_, c1') -> if nc1 < 0 then begin if c1' = c2 then [CF_out (f, c2'), v] else [] end else colored_vertex "colorize_fusion2" | CF_in _, CF_in _ -> if nc1 > 0 then baryonic_vertex "colorize_fusion2" else colored_vertex "colorize_fusion2" | CF_out _, CF_out _ -> if nc1 < 0 then baryonic_vertex "colorize_fusion2" else colored_vertex "colorize_fusion2" | CF_in _, CF_out _ | CF_out _, CF_in _ | (White _ | CF_io _ | CF_aux _), (White _ | CF_io _ | CF_aux _) -> colored_vertex "colorize_fusion2" end | C.AdjSUN _ -> begin match f1, f2 with | White _, CF_io (_, c1, c2') | CF_io (_, c1, c2'), White _ -> [CF_io (f, c1, c2'), v] | White _, CF_aux _ | CF_aux _, White _ -> [CF_aux f, mult_vertex (- (nc ())) v] | CF_in (_, c1), CF_out (_, c2') | CF_out (_, c2'), CF_in (_, c1) -> if c1 <> c2' then [CF_io (f, c1, c2'), v] else [CF_aux f, v] (* In the adjoint representation \begin{subequations} \begin{equation} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,24) \fmfsurround{d1,e1,d2,e2,d3,e3} \fmf{gluon}{v,e1} \fmf{gluon}{v,e2} \fmf{gluon}{v,e3} \fmflabel{1}{e1} \fmflabel{2}{e2} \fmflabel{3}{e3} \fmfdot{v} \fmffreeze \fmf{warrow_right}{v,e1} \fmf{warrow_right}{v,e2} \fmf{warrow_right}{v,e3} \end{fmfgraph*}}} \,= %begin{split} g f_{a_1a_2a_3} C^{\mu_1\mu_2\mu_3} (k_1,k_2,k_3) %end{split} \end{equation} with \begin{multline} \label{eq:C123} C^{\mu_1\mu_2\mu_3}(k_1,k_2,k_3) = \\ ( g^{\mu_1\mu_2} (k_1^{\mu_3}-k_2^{\mu_3}) + g^{\mu_2\mu_3} (k_2^{\mu_1}-k_3^{\mu_1}) + g^{\mu_3\mu_1} (k_3^{\mu_2}-k_1^{\mu_2}) ) \end{multline} \end{subequations} while in the color flow basis find from \begin{equation} \label{eq:f=tr(TTT)} \ii f_{a_1a_2a_3} = \tr\left(T_{a_1}\left\lbrack T_{a_2},T_{a_3}\right\rbrack\right) = \tr\left(T_{a_1}T_{a_2}T_{a_3}\right) - \tr\left(T_{a_1}T_{a_3}T_{a_2}\right) \end{equation} the decomposition \begin{equation} \label{eq:fTTT} \ii f_{a_1a_2a_3} T_{a_1}^{i_1j_1}T_{a_2}^{i_2j_2}T_{a_3}^{i_3j_3} = \delta^{i_1j_2}\delta^{i_2j_3}\delta^{i_3j_1} - \delta^{i_1j_3}\delta^{i_3j_2}\delta^{i_2j_1}\,. \end{equation} The resulting Feynman rule is \begin{equation} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,24) \fmfsurround{d1,e1,d2,e2,d3,e3} \fmf{phantom}{v,e1} \fmf{phantom}{v,e2} \fmf{phantom}{v,e3} \fmflabel{1}{e1} \fmflabel{2}{e2} \fmflabel{3}{e3} \fmffreeze \fmfi{phantom_arrow}{(reverse vpath (__e1, __v) sideways -thick)} \fmfi{phantom_arrow}{( vpath (__e2, __v) sideways -thick)} \fmfi{phantom_arrow}{(reverse vpath (__e2, __v) sideways -thick)} \fmfi{phantom_arrow}{( vpath (__e3, __v) sideways -thick)} \fmfi{phantom_arrow}{(reverse vpath (__e3, __v) sideways -thick)} \fmfi{phantom_arrow}{( vpath (__e1, __v) sideways -thick)} \fmfi{plain}{% (reverse vpath (__e1, __v) sideways -thick) join ( vpath (__e2, __v) sideways -thick)} \fmfi{plain}{% (reverse vpath (__e2, __v) sideways -thick) join ( vpath (__e3, __v) sideways -thick)} \fmfi{plain}{% (reverse vpath (__e3, __v) sideways -thick) join ( vpath (__e1, __v) sideways -thick)} \end{fmfgraph*}}} \,= \ii g \left( \delta^{i_1j_3}\delta^{i_2j_1}\delta^{i_3j_2} - \delta^{i_1j_2}\delta^{i_2j_3}\delta^{i_3j_1} \right) C^{\mu_1\mu_2\mu_3} (k_1,k_2,k_3) \end{equation} *) (* \begin{dubious} We have to generalize this for cases of three particles in the adjoint that are not all gluons (gluinos, scalar octets): \begin{itemize} \item scalar-scalar-scalar \item scalar-scalar-vector \item scalar-vector-vector \item scalar-fermion-fermion \item vector-fermion-fermion \end{itemize} \end{dubious} *) (* \begin{dubious} We could use a better understanding of the signs for the gaugino-gaugino-gaugeboson couplings!!! \end{dubious} *) | CF_io (f1, c1, c1'), CF_io (f2, c2, c2') -> let phase = begin match v with | V3 (Gauge_Gauge_Gauge _, _, _) | V3 (I_Gauge_Gauge_Gauge _, _, _) | V3 (Aux_Gauge_Gauge _, _, _) -> of_int 1 | V3 (FBF (_, _, _, _), fuse2, _) -> begin match fuse2 with | F12 -> of_int 1 (* works, needs underpinning *) | F21 -> of_int (-1) (* dto. *) | F31 -> of_int 1 (* dto. *) | F32 -> of_int (-1) (* transposition of [F12] *) | F23 -> of_int 1 (* transposition of [F21] *) | F13 -> of_int (-1) (* transposition of [F12] *) end - | V3 (UFO3 (_, _, _, Color.Legacy3), fuse2, _) -> - begin match fuse2 with - | F12 | F23 | F31 -> QC.make Q.null Q.unit - | F21 | F32 | F13 -> QC.make Q.null (Q.neg Q.unit) - end | V3 _ -> incomplete "colorize_fusion2 (V3 _)" | V4 _ -> impossible "colorize_fusion2 (V4 _)" | Vn _ -> impossible "colorize_fusion2 (Vn _)" end in if c1' = c2 then [CF_io (f, c1, c2'), cmult_vertex (QC.neg phase) v] else if c2' = c1 then [CF_io (f, c2, c1'), cmult_vertex ( phase) v] else [] | CF_aux _ , CF_io _ | CF_io _ , CF_aux _ | CF_aux _ , CF_aux _ -> [] | White _, White _ | (White _ | CF_io _ | CF_aux _), (CF_in _ | CF_out _) | (CF_in _ | CF_out _), (White _ | CF_io _ | CF_aux _) | CF_in _, CF_in _ | CF_out _, CF_out _ -> colored_vertex "colorize_fusion2" end -(* \thocwmodulesubsection{Cubic Vertices, UFO Version} *) - -(* In order to match the \emph{correct} positions of the fields - in the vertices, we have to undo the permutation effected by - the fusion according to [Coupling.fuse2]. *) - -(* Eventually, the type [Coupling.fuse2] will be retired in - favor of [int * int * int] or even [int list]. This is why we - have code that is more general than required here. *) - - module PosMap = - Partial.Make (struct type t = int let compare = compare end) - - (* Note that we obtain the inverse of the ``permutation'' [l'] - here, e.\,g., [Permutation.Default.list [2;0;1]] - applied to [[1;2;3]] gives [[2;3;1]], - i.\,e.~the ``inverse'' of [[3;1;2]]. *) - let partial_map_undoing_permutation l l' = - let module P = Permutation.Default in - let p = P.of_list (List.map pred l') in - PosMap.of_lists l (P.list p l) - - let fuse2_to_list = function - | F12 -> [3;1;2] - | F21 -> [3;2;1] - | F23 -> [1;2;3] - | F32 -> [1;3;2] - | F31 -> [2;3;1] - | F13 -> [2;1;3] - - let partial_map_undoing_fuse2 fuse2 = - partial_map_undoing_permutation [1;2;3] (fuse2_to_list fuse2) - - (* Compute the partial maps once, not everytime anew! *) - let undo_F12 = partial_map_undoing_fuse2 F12 - let undo_F21 = partial_map_undoing_fuse2 F21 - let undo_F23 = partial_map_undoing_fuse2 F23 - let undo_F32 = partial_map_undoing_fuse2 F32 - let undo_F31 = partial_map_undoing_fuse2 F31 - let undo_F13 = partial_map_undoing_fuse2 F13 - - let undo_permutation_of_fuse2 fuse2 = - let fail _ = invalid_arg "permutation_of_fuse2" in - match fuse2 with - | F12 -> PosMap.apply_with_fallback fail undo_F12 - | F21 -> PosMap.apply_with_fallback fail undo_F21 - | F23 -> PosMap.apply_with_fallback fail undo_F23 - | F32 -> PosMap.apply_with_fallback fail undo_F32 - | F31 -> PosMap.apply_with_fallback fail undo_F31 - | F13 -> PosMap.apply_with_fallback fail undo_F13 - - (* The same can be expressed more concisely. *) - let undo_permutation_of_fuse2' fuse2 = - let fail () = invalid_arg "permutation_of_fuse2" in - match fuse2 with - | F12 -> (function 1 -> 2 | 2 -> 3 | 3 -> 1 | _ -> fail ()) - | F21 -> (function 1 -> 3 | 2 -> 2 | 3 -> 1 | _ -> fail ()) - | F23 -> (function 1 -> 1 | 2 -> 2 | 3 -> 3 | _ -> fail ()) - | F32 -> (function 1 -> 1 | 2 -> 3 | 3 -> 2 | _ -> fail ()) - | F31 -> (function 1 -> 3 | 2 -> 1 | 3 -> 2 | _ -> fail ()) - | F13 -> (function 1 -> 2 | 2 -> 1 | 3 -> 3 | _ -> fail ()) - - let pair3_to_ints = function - | C.P3_12 -> (1, 2) - | C.P3_23 -> (2, 3) - | C.P3_31 -> (3, 1) - | C.P3_21 -> (2, 1) - | C.P3_32 -> (3, 2) - | C.P3_13 -> (1, 3) - - let apply_fuse2 fuse2 pair3 = - let p = undo_permutation_of_fuse2 fuse2 - and i, j = pair3_to_ints pair3 in - (p i, p j) - - let colorize_fusion2_ufo f1 f2 f c v spins color fuse xtra = - let open Color in - let v = V3 (UFO3 (c, v, spins, Trivial3), fuse, xtra) in - match color with - | Trivial3 -> - begin match f1, f2 with - | White _, White _ -> [White f, v] - | _ -> mismatch "colorize_fusion2 Color.Trivial3" - end - | Delta3 perm -> - let i, j = apply_fuse2 fuse perm in - begin match i, j, f1, f2 with - | 1, 3, White _, CF_out (_, cf) - | 1, 2, CF_out (_, cf), White _ -> - [CF_out (f, cf), v] - | 3, 1, White _, CF_in (_, cf) - | 2, 1, CF_in (_, cf), White _ -> - [CF_in (f, cf), v] - | 2, 3, CF_in (_, cf2), CF_out (_, cf1) - | 3, 2, CF_out (_, cf1), CF_in (_, cf2) -> - if cf1 = cf2 then - [White f, v] - else - [] - | _ -> mismatch "colorize_fusion2 Color.Delta3" - end - - | F -> - begin match f1, f2 with - | CF_io (f1, c1, c1'), CF_io (f2, c2, c2') -> - let i = QC.make Q.null Q.unit in - if c1' = c2 then - [CF_io (f, c1, c2'), cmult_vertex (QC.neg i) v] - else if c2' = c1 then - [CF_io (f, c2, c1'), cmult_vertex ( i) v] - else - [] - | (CF_io _ | CF_aux _), (CF_io _ | CF_aux _) -> [] - | _ -> mismatch "colorize_fusion2 Color.F" - end - - | _ -> - incomplete "Colorize.colorize_fusion2_ufo" - - let colorize_fusion2 f1 f2 (f, v) = - match v with - | V3 (UFO3 (_, _, _, C.Legacy3), _, _) -> - colorize_fusion2_legacy f1 f2 (f, v) - | V3 (UFO3 (c, v, spins, color), fuse, xtra) -> - colorize_fusion2_ufo f1 f2 f c v spins color fuse xtra - | V3 _ -> colorize_fusion2_legacy f1 f2 (f, v) - | _ -> invalid_arg "Colorize.colorize_fusion2" - (* \thocwmodulesubsection{Quartic Vertices} *) - let colorize_fusion3_legacy f1 f2 f3 (f, v) = + let colorize_fusion3 f1 f2 f3 (f, v) = match M.color f with | C.Singlet -> begin match f1, f2, f3 with | White _, White _, White _ -> [White f, v] | (White _ | CF_aux _), CF_in (_, c1), CF_out (_, c2') | (White _ | CF_aux _), CF_out (_, c1), CF_in (_, c2') | CF_in (_, c1), (White _ | CF_aux _), CF_out (_, c2') | CF_out (_, c1), (White _ | CF_aux _), CF_in (_, c2') | CF_in (_, c1), CF_out (_, c2'), (White _ | CF_aux _) | CF_out (_, c1), CF_in (_, c2'), (White _ | CF_aux _) -> if c1 = c2' then [White f, v] else [] | White _, CF_io (_, c1, c1'), CF_io (_, c2, c2') | CF_io (_, c1, c1'), White _, CF_io (_, c2, c2') | CF_io (_, c1, c1'), CF_io (_, c2, c2'), White _ -> if c1 = c2' && c2 = c1' then [White f, v] else [] | White _, CF_aux _, CF_aux _ | CF_aux _, White _, CF_aux _ | CF_aux _, CF_aux _, White _ -> [White f, mult_vertex (- (nc ())) v] | White _, CF_io _, CF_aux _ | White _, CF_aux _, CF_io _ | CF_io _, White _, CF_aux _ | CF_aux _, White _, CF_io _ | CF_io _, CF_aux _, White _ | CF_aux _, CF_io _, White _ -> [] | CF_io (_, c1, c1'), CF_in (_, c2), CF_out (_, c3') | CF_io (_, c1, c1'), CF_out (_, c3'), CF_in (_, c2) | CF_in (_, c2), CF_io (_, c1, c1'), CF_out (_, c3') | CF_out (_, c3'), CF_io (_, c1, c1'), CF_in (_, c2) | CF_in (_, c2), CF_out (_, c3'), CF_io (_, c1, c1') | CF_out (_, c3'), CF_in (_, c2), CF_io (_, c1, c1') -> if c1 = c3' && c1' = c2 then [White f, v] else [] | CF_io (_, c1, c1'), CF_io (_, c2, c2'), CF_io (_, c3, c3') -> if c1' = c2 && c2' = c3 && c3' = c1 then [White f, mult_vertex (-1) v] else if c1' = c3 && c2' = c1 && c3' = c2 then [White f, mult_vertex ( 1) v] else [] | CF_io _, CF_io _, CF_aux _ | CF_io _, CF_aux _, CF_io _ | CF_aux _, CF_io _, CF_io _ | CF_io _, CF_aux _, CF_aux _ | CF_aux _, CF_io _, CF_aux _ | CF_aux _, CF_aux _, CF_io _ | CF_aux _, CF_aux _, CF_aux _ -> [] | CF_in _, CF_in _, CF_in _ | CF_out _, CF_out _, CF_out _ -> baryonic_vertex "colorize_fusion3" | CF_in _, CF_in _, CF_out _ | CF_in _, CF_out _, CF_in _ | CF_out _, CF_in _, CF_in _ | CF_in _, CF_out _, CF_out _ | CF_out _, CF_in _, CF_out _ | CF_out _, CF_out _, CF_in _ | White _, White _, (CF_io _ | CF_aux _) | White _, (CF_io _ | CF_aux _), White _ | (CF_io _ | CF_aux _), White _, White _ | (White _ | CF_io _ | CF_aux _), CF_in _, CF_in _ | CF_in _, (White _ | CF_io _ | CF_aux _), CF_in _ | CF_in _, CF_in _, (White _ | CF_io _ | CF_aux _) | (White _ | CF_io _ | CF_aux _), CF_out _, CF_out _ | CF_out _, (White _ | CF_io _ | CF_aux _), CF_out _ | CF_out _, CF_out _, (White _ | CF_io _ | CF_aux _) | (CF_in _ | CF_out _), (White _ | CF_io _ | CF_aux _), (White _ | CF_io _ | CF_aux _) | (White _ | CF_io _ | CF_aux _), (CF_in _ | CF_out _), (White _ | CF_io _ | CF_aux _) | (White _ | CF_io _ | CF_aux _), (White _ | CF_io _ | CF_aux _), (CF_in _ | CF_out _) -> colored_vertex "colorize_fusion3" end | C.SUN nc1 -> begin match f1, f2, f3 with | CF_in (_, c1), CF_io (_, c2, c2'), CF_io (_, c3, c3') | CF_io (_, c2, c2'), CF_in (_, c1), CF_io (_, c3, c3') | CF_io (_, c2, c2'), CF_io (_, c3, c3'), CF_in (_, c1) -> if nc1 > 0 then if c1 = c2' && c2 = c3' then [CF_in (f, c3), v] else if c1 = c3' && c3 = c2' then [CF_in (f, c2), v] else [] else colored_vertex "colorize_fusion3" | CF_out (_, c1'), CF_io (_, c2, c2'), CF_io (_, c3, c3') | CF_io (_, c2, c2'), CF_out (_, c1'), CF_io (_, c3, c3') | CF_io (_, c2, c2'), CF_io (_, c3, c3'), CF_out (_, c1') -> if nc1 < 0 then if c1' = c2 && c2' = c3 then [CF_out (f, c3'), v] else if c1' = c3 && c3' = c2 then [CF_out (f, c2'), v] else [] else colored_vertex "colorize_fusion3" | CF_aux _, CF_in (_, c1), CF_io (_, c2, c2') | CF_aux _, CF_io (_, c2, c2'), CF_in (_, c1) | CF_in (_, c1), CF_aux _, CF_io (_, c2, c2') | CF_io (_, c2, c2'), CF_aux _, CF_in (_, c1) | CF_in (_, c1), CF_io (_, c2, c2'), CF_aux _ | CF_io (_, c2, c2'), CF_in (_, c1), CF_aux _ -> if nc1 > 0 then if c1 = c2' then [CF_in (f, c2), mult_vertex ( 2) v] else [] else colored_vertex "colorize_fusion3" | CF_aux _, CF_out (_, c1'), CF_io (_, c2, c2') | CF_aux _, CF_io (_, c2, c2'), CF_out (_, c1') | CF_out (_, c1'), CF_aux _, CF_io (_, c2, c2') | CF_io (_, c2, c2'), CF_aux _, CF_out (_, c1') | CF_out (_, c1'), CF_io (_, c2, c2'), CF_aux _ | CF_io (_, c2, c2'), CF_out (_, c1'), CF_aux _ -> if nc1 < 0 then if c1' = c2 then [CF_out (f, c2'), mult_vertex ( 2) v] else [] else colored_vertex "colorize_fusion3" | White _, CF_in (_, c1), CF_io (_, c2, c2') | White _, CF_io (_, c2, c2'), CF_in (_, c1) | CF_in (_, c1), White _, CF_io (_, c2, c2') | CF_io (_, c2, c2'), White _, CF_in (_, c1) | CF_in (_, c1), CF_io (_, c2, c2'), White _ | CF_io (_, c2, c2'), CF_in (_, c1), White _ -> if nc1 > 0 then if c1 = c2' then [CF_in (f, c2), v] else [] else colored_vertex "colorize_fusion3" | White _, CF_out (_, c1'), CF_io (_, c2, c2') | White _, CF_io (_, c2, c2'), CF_out (_, c1') | CF_out (_, c1'), White _, CF_io (_, c2, c2') | CF_io (_, c2, c2'), White _, CF_out (_, c1') | CF_out (_, c1'), CF_io (_, c2, c2'), White _ | CF_io (_, c2, c2'), CF_out (_, c1'), White _ -> if nc1 < 0 then if c2 = c1' then [CF_out (f, c2'), v] else [] else colored_vertex "colorize_fusion3" | CF_in (_, c1), CF_aux _, CF_aux _ | CF_aux _, CF_in (_, c1), CF_aux _ | CF_aux _, CF_aux _, CF_in (_, c1) -> if nc1 > 0 then [CF_in (f, c1), mult_vertex ( 2) v] else colored_vertex "colorize_fusion3" | CF_in (_, c1), CF_aux _, White _ | CF_in (_, c1), White _, CF_aux _ | CF_in (_, c1), White _, White _ | CF_aux _, CF_in (_, c1), White _ | White _, CF_in (_, c1), CF_aux _ | White _, CF_in (_, c1), White _ | CF_aux _, White _, CF_in (_, c1) | White _, CF_aux _, CF_in (_, c1) | White _, White _, CF_in (_, c1) -> if nc1 > 0 then [CF_in (f, c1), v] else colored_vertex "colorize_fusion3" | CF_out (_, c1'), CF_aux _, CF_aux _ | CF_aux _, CF_out (_, c1'), CF_aux _ | CF_aux _, CF_aux _, CF_out (_, c1') -> if nc1 < 0 then [CF_out (f, c1'), mult_vertex ( 2) v] else colored_vertex "colorize_fusion3" | CF_out (_, c1'), CF_aux _, White _ | CF_out (_, c1'), White _, CF_aux _ | CF_out (_, c1'), White _, White _ | CF_aux _, CF_out (_, c1'), White _ | White _, CF_out (_, c1'), CF_aux _ | White _, CF_out (_, c1'), White _ | CF_aux _, White _, CF_out (_, c1') | White _, CF_aux _, CF_out (_, c1') | White _, White _, CF_out (_, c1') -> if nc1 < 0 then [CF_out (f, c1'), v] else colored_vertex "colorize_fusion3" | CF_in _, CF_in _, CF_out _ | CF_in _, CF_out _, CF_in _ | CF_out _, CF_in _, CF_in _ -> if nc1 > 0 then color_flow_ambiguous "colorize_fusion3" else colored_vertex "colorize_fusion3" | CF_in _, CF_out _, CF_out _ | CF_out _, CF_in _, CF_out _ | CF_out _, CF_out _, CF_in _ -> if nc1 < 0 then color_flow_ambiguous "colorize_fusion3" else colored_vertex "colorize_fusion3" | CF_in _, CF_in _, CF_in _ | CF_out _, CF_out _, CF_out _ | (White _ | CF_io _ | CF_aux _), (White _ | CF_io _ | CF_aux _), (White _ | CF_io _ | CF_aux _) | (CF_in _ | CF_out _), (CF_in _ | CF_out _), (White _ | CF_io _ | CF_aux _) | (CF_in _ | CF_out _), (White _ | CF_io _ | CF_aux _), (CF_in _ | CF_out _) | (White _ | CF_io _ | CF_aux _), (CF_in _ | CF_out _), (CF_in _ | CF_out _) -> colored_vertex "colorize_fusion3" end | C.AdjSUN nc -> begin match f1, f2, f3 with | CF_in (_, c1), CF_out (_, c1'), White _ | CF_out (_, c1'), CF_in (_, c1), White _ | CF_in (_, c1), White _, CF_out (_, c1') | CF_out (_, c1'), White _, CF_in (_, c1) | White _, CF_in (_, c1), CF_out (_, c1') | White _, CF_out (_, c1'), CF_in (_, c1) -> if c1 <> c1' then [CF_io (f, c1, c1'), v] else [CF_aux f, v] | CF_in (_, c1), CF_out (_, c1'), CF_aux _ | CF_out (_, c1'), CF_in (_, c1), CF_aux _ | CF_in (_, c1), CF_aux _, CF_out (_, c1') | CF_out (_, c1'), CF_aux _, CF_in (_, c1) | CF_aux _, CF_in (_, c1), CF_out (_, c1') | CF_aux _, CF_out (_, c1'), CF_in (_, c1) -> if c1 <> c1' then [CF_io (f, c1, c1'), mult_vertex ( 2) v] else [CF_aux f, mult_vertex ( 2) v] | CF_in (_, c1), CF_out (_, c1'), CF_io (_, c2, c2') | CF_out (_, c1'), CF_in (_, c1), CF_io (_, c2, c2') | CF_in (_, c1), CF_io (_, c2, c2'), CF_out (_, c1') | CF_out (_, c1'), CF_io (_, c2, c2'), CF_in (_, c1) | CF_io (_, c2, c2'), CF_in (_, c1), CF_out (_, c1') | CF_io (_, c2, c2'), CF_out (_, c1'), CF_in (_, c1) -> if c1 = c2' && c2 = c1' then [CF_aux f, mult_vertex ( 2) v] else if c1 = c2' then [CF_io (f, c2, c1'), v] else if c2 = c1' then [CF_io (f, c1, c2'), v] else [] (* \begin{equation} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,24) \fmfsurround{d1,e1,d2,e2,d3,e3,d4,e4} \fmf{gluon}{v,e1} \fmf{gluon}{v,e2} \fmf{gluon}{v,e3} \fmf{gluon}{v,e4} \fmflabel{1}{e1} \fmflabel{2}{e2} \fmflabel{3}{e3} \fmflabel{4}{e4} \fmfdot{v} \fmffreeze \fmf{warrow_right}{v,e1} \fmf{warrow_right}{v,e2} \fmf{warrow_right}{v,e3} \fmf{warrow_right}{v,e4} \end{fmfgraph*}}} \,= \begin{split} \mbox{} - & \ii g^2 f_{a_1a_2b}f_{a_3a_4b} (g_{\mu_1\mu_3} g_{\mu_4\mu_2} - g_{\mu_1\mu_4} g_{\mu_2\mu_3}) \\ \mbox{} - & \ii g^2 f_{a_1a_3b}f_{a_4a_2b} (g_{\mu_1\mu_4} g_{\mu_2\mu_3} - g_{\mu_1\mu_2} g_{\mu_3\mu_4}) \\ \mbox{} - & \ii g^2 f_{a_1a_4b}f_{a_2a_3b} (g_{\mu_1\mu_2} g_{\mu_3\mu_4} - g_{\mu_1\mu_3} g_{\mu_4\mu_2}) \end{split} \end{equation} *) (* Using \begin{equation} \label{eq:P4} \mathcal{P}_4 = \left\{\{1,2,3,4\},\{1,3,4,2\},\{1,4,2,3\}, \{1,2,4,3\},\{1,4,3,2\},\{1,3,2,4\}\right\} \end{equation} as the set of permutations of~$\{1,2,3,4\}$ with the cyclic permutations factored out, we have: \begin{equation} \label{eq:4GV} \parbox{28mm}{\fmfframe(2,2)(2,1){\begin{fmfgraph*}(24,24) \fmfsurround{d1,e1,d2,e2,d3,e3,d4,e4} \fmf{phantom}{v,e1} \fmf{phantom}{v,e2} \fmf{phantom}{v,e3} \fmf{phantom}{v,e4} \fmflabel{1}{e1} \fmflabel{2}{e2} \fmflabel{3}{e3} \fmflabel{4}{e4} \fmffreeze \fmfi{phantom_arrow}{(reverse vpath (__e1, __v) sideways -thick)} \fmfi{phantom_arrow}{( vpath (__e2, __v) sideways -thick)} \fmfi{phantom_arrow}{(reverse vpath (__e2, __v) sideways -thick)} \fmfi{phantom_arrow}{( vpath (__e3, __v) sideways -thick)} \fmfi{phantom_arrow}{(reverse vpath (__e3, __v) sideways -thick)} \fmfi{phantom_arrow}{( vpath (__e4, __v) sideways -thick)} \fmfi{phantom_arrow}{(reverse vpath (__e4, __v) sideways -thick)} \fmfi{phantom_arrow}{( vpath (__e1, __v) sideways -thick)} \fmfi{plain}{% (reverse vpath (__e1, __v) sideways -thick) join ( vpath (__e2, __v) sideways -thick)} \fmfi{plain}{% (reverse vpath (__e2, __v) sideways -thick) join ( vpath (__e3, __v) sideways -thick)} \fmfi{plain}{% (reverse vpath (__e3, __v) sideways -thick) join ( vpath (__e4, __v) sideways -thick)} \fmfi{plain}{% (reverse vpath (__e4, __v) sideways -thick) join ( vpath (__e1, __v) sideways -thick)} \end{fmfgraph*}}} \,= \begin{aligned} \ii g^2 \sum_{\{\alpha_k\}_{k=1,2,3,4}\in\mathcal{P}_4} \delta^{i_{\alpha_1}j_{\alpha_2}}\delta^{i_{\alpha_2}j_{\alpha_3}} \delta^{i_{\alpha_3}j_{\alpha_4}}\delta^{i_{\alpha_4}j_{\alpha_1}}\qquad\qquad\\ \left( 2g_{\mu_{\alpha_1}\mu_{\alpha_3}} g_{\mu_{\alpha_4}\mu_{\alpha_2}} - g_{\mu_{\alpha_1}\mu_{\alpha_4}} g_{\mu_{\alpha_2}\mu_{\alpha_3}} - g_{\mu_{\alpha_1}\mu_{\alpha_2}} g_{\mu_{\alpha_3}\mu_{\alpha_4}}\right) \end{aligned} \end{equation} *) (* The different color connections correspond to permutations of the particles entering the fusion and have to be matched by a corresponding permutation of the Lorentz structure: *) (* \begin{dubious} We have to generalize this for cases of four particles in the adjoint that are not all gluons: \begin{itemize} \item scalar-scalar-scalar-scalar \item scalar-scalar-vector-vector \end{itemize} and even ones including fermions (gluinos) if higher dimensional operators are involved. \end{dubious} *) | CF_io (_, c1, c1'), CF_io (_, c2, c2'), CF_io (_, c3, c3') -> if c1' = c2 && c2' = c3 then [CF_io (f, c1, c3'), permute_vertex4 P123 v] else if c1' = c3 && c3' = c2 then [CF_io (f, c1, c2'), permute_vertex4 P132 v] else if c2' = c3 && c3' = c1 then [CF_io (f, c2, c1'), permute_vertex4 P231 v] else if c2' = c1 && c1' = c3 then [CF_io (f, c2, c3'), permute_vertex4 P213 v] else if c3' = c1 && c1' = c2 then [CF_io (f, c3, c2'), permute_vertex4 P312 v] else if c3' = c2 && c2' = c1 then [CF_io (f, c3, c1'), permute_vertex4 P321 v] else [] | CF_io _, CF_io _, CF_aux _ | CF_io _, CF_aux _, CF_io _ | CF_aux _, CF_io _, CF_io _ | CF_io _, CF_aux _, CF_aux _ | CF_aux _, CF_aux _, CF_io _ | CF_aux _, CF_io _, CF_aux _ | CF_aux _, CF_aux _, CF_aux _ -> [] | CF_io (_, c1, c1'), CF_io (_, c2, c2'), White _ | CF_io (_, c1, c1'), White _, CF_io (_, c2, c2') | White _, CF_io (_, c1, c1'), CF_io (_, c2, c2') -> if c1' = c2 then [CF_io (f, c1, c2'), mult_vertex (-1) v] else if c2' = c1 then [CF_io (f, c2, c1'), mult_vertex ( 1) v] else [] | CF_io (_, c1, c1'), CF_aux _, White _ | CF_aux _, CF_io (_, c1, c1'), White _ | CF_io (_, c1, c1'), White _, CF_aux _ | CF_aux _, White _, CF_io (_, c1, c1') | White _, CF_io (_, c1, c1'), CF_aux _ | White _, CF_aux _, CF_io (_, c1, c1') -> [] | CF_aux _, CF_aux _, White _ | CF_aux _, White _, CF_aux _ | White _, CF_aux _, CF_aux _ -> [] | White _, White _, CF_io (_, c1, c1') | White _, CF_io (_, c1, c1'), White _ | CF_io (_, c1, c1'), White _, White _ -> [CF_io (f, c1, c1'), v] | White _, White _, CF_aux _ | White _, CF_aux _, White _ | CF_aux _, White _, White _ -> [] | White _, White _, White _ | (White _ | CF_io _ | CF_aux _), (White _ | CF_io _ | CF_aux _), (CF_in _ | CF_out _) | (White _ | CF_io _ | CF_aux _), (CF_in _ | CF_out _), (White _ | CF_io _ | CF_aux _) | (CF_in _ | CF_out _), (White _ | CF_io _ | CF_aux _), (White _ | CF_io _ | CF_aux _) | CF_in _, CF_in _, (White _ | CF_io _ | CF_aux _) | CF_in _, (White _ | CF_io _ | CF_aux _), CF_in _ | (White _ | CF_io _ | CF_aux _), CF_in _, CF_in _ | CF_out _, CF_out _, (White _ | CF_io _ | CF_aux _) | CF_out _, (White _ | CF_io _ | CF_aux _), CF_out _ | (White _ | CF_io _ | CF_aux _), CF_out _, CF_out _ | (CF_in _ | CF_out _), (CF_in _ | CF_out _), (CF_in _ | CF_out _) -> colored_vertex "colorize_fusion3" end -(* \thocwmodulesubsection{Quartic Vertices, UFO Version} *) - -(* Using again the normalization~$\tr(T_{a}T_{b}) = \delta_{ab}$ - with~\eqref{eq:f=tr(TTT)} and~\eqref{fTTT}, - we find the decomposition - \begin{equation} - \ii f_{a_1a_2a_3} T_{a_1}^{i_1j_1}T_{a_2}^{i_2j_2}T_{a_3}^{i_3j_3} - = \delta^{i_1j_2}\delta^{i_2j_3}\delta^{i_3j_1} - - \delta^{i_1j_3}\delta^{i_3j_2}\delta^{i_2j_1} - \end{equation} - and from this - \begin{multline} - f_{a_1a_2a} T_{a_1}^{i_1j_1}T_{a_2}^{i_2j_2} - f_{a_3a_4a} T_{a_3}^{i_3j_3}T_{a_4}^{i_4j_4} - = f_{a_1a_2a} T_{a_1}^{i_1j_1}T_{a_2}^{i_2j_2}T_{a}^{ij} - f_{a_3a_4b} T_{a_3}^{i_3j_3}T_{a_4}^{i_4j_4}T_{b}^{ji} \\ - = - \left( \delta^{i_1j_2}\delta^{i_2j}\delta^{ij_1} - - \delta^{i_1j}\delta^{ij_2}\delta^{i_2j_1}\right) - \left( \delta^{i_3j_4}\delta^{i_4i}\delta^{jj_3} - - \delta^{i_3i}\delta^{jj_4}\delta^{i_4j_3}\right) -%%% \\ -%%% = - \delta^{i_1j_2}\delta^{i_2j}\delta^{ij_1} -%%% \delta^{i_3j_4}\delta^{i_4i}\delta^{jj_3} -%%% + \delta^{i_1j_2}\delta^{i_2j}\delta^{ij_1} -%%% \delta^{i_3i}\delta^{jj_4}\delta^{i_4j_3} \qquad\qquad\\\qquad\qquad -%%% + \delta^{i_1j}\delta^{ij_2}\delta^{i_2j_1} -%%% \delta^{i_3j_4}\delta^{i_4i}\delta^{jj_3} -%%% - \delta^{i_1j}\delta^{ij_2}\delta^{i_2j_1} -%%% \delta^{i_3i}\delta^{jj_4}\delta^{i_4j_3} \\ - = \\ - - \delta^{i_1j_2}\delta^{i_2j_3}\delta^{i_3j_4}\delta^{i_4j_1} - + \delta^{i_1j_2}\delta^{i_2j_4}\delta^{i_3j_1}\delta^{i_4j_3} - + \delta^{i_1j_3}\delta^{i_2j_1}\delta^{i_3j_4}\delta^{i_4j_2} - - \delta^{i_1j_4}\delta^{i_2j_1}\delta^{i_3j_2}\delta^{i_4j_3} -%%% \\ -%%% = - \delta^{i_1j_2}\delta^{i_2j_3}\delta^{i_3j_4}\delta^{i_4j_1} -%%% + \delta^{i_1j_2}\delta^{i_2j_4}\delta^{i_4j_3}\delta^{i_3j_1} -%%% + \delta^{i_1j_3}\delta^{i_3j_4}\delta^{i_4j_2}\delta^{i_2j_1} -%%% - \delta^{i_1j_4}\delta^{i_4j_3}\delta^{i_3j_2}\delta^{i_2j_1} \\ -%%% = - \delta^{i_1j_2} \left( \delta^{i_2j_3}\delta^{i_3j_4}\delta^{i_4j_1} -%%% - \delta^{i_2j_4}\delta^{i_4j_3}\delta^{i_3j_1} \right) -%%% + \delta^{i_2j_1} \left( \delta^{i_1j_3}\delta^{i_3j_4}\delta^{i_4j_2} -%%% - \delta^{i_1j_4}\delta^{i_4j_3}\delta^{i_3j_2} \right)\\ -%%% = - \left( \delta^{i_4j_1}\delta^{i_1j_2}\delta^{i_2j_3} -%%% - \delta^{i_4j_2}\delta^{i_2j_1}\delta^{i_1j_3} \right)\delta^{i_3j_4} -%%% + \left( \delta^{i_3j_1}\delta^{i_1j_2}\delta^{i_2j_4} -%%% - \delta^{i_3j_2}\delta^{i_2j_1}\delta^{i_1j_4} \right)\delta^{i_4j_3} - \end{multline} *) - -(* -\fmfset{arrow_ang}{10} -\fmfcmd{% - numeric joindiameter; - joindiameter := 7thick;} -\fmfcmd{% - vardef sideways_at (expr d, p, frac) = - save len; len = length p; - (point frac*len of p) shifted ((d,0) rotated (90 + angle direction frac*len of p)) - enddef; - secondarydef p sideways d = - for frac = 0 step 0.01 until 0.99: - sideways_at (d, p, frac) .. - endfor - sideways_at (d, p, 1) - enddef; - secondarydef p choptail d = - subpath (ypart (fullcircle scaled d shifted (point 0 of p) intersectiontimes p), infinity) of p - enddef; - secondarydef p choptip d = - reverse ((reverse p) choptail d) - enddef; - secondarydef pa join pb = - pa choptip joindiameter .. pb choptail joindiameter - enddef;} -\begin{multline} -\parbox{20\unitlength}{% - \fmfframe(0,4)(0,4){% - \begin{fmfgraph*}(20,20) - \fmfleft{g1,g2} - \fmfright{g3,g4} - \fmfv{label=$1$}{g1} - \fmfv{label=$2$}{g2} - \fmfv{label=$3$}{g3} - \fmfv{label=$4$}{g4} - \fmf{gluon}{g1,v} - \fmf{gluon}{g2,v} - \fmf{gluon}{g3,v} - \fmf{gluon}{g4,v} - \fmfv{label=$g^2 f_{a_1a_2b}f_{a_3a_4b}$,label.d=10thick}{v} - \fmfdot{v} - \end{fmfgraph*}}} -\qquad\qquad\qquad\Longleftrightarrow\\ -\parbox{20\unitlength}{% - \fmfframe(0,4)(0,4){% - \begin{fmfgraph*}(20,20) - \fmfleft{g1,g2} - \fmfright{g4,g3} - \fmfv{label=$1$}{g1} - \fmfv{label=$2$}{g2} - \fmfv{label=$3$}{g3} - \fmfv{label=$4$}{g4} - \fmf{phantom}{g1,v} - \fmf{phantom}{g2,v} - \fmf{phantom}{g3,v} - \fmf{phantom}{g4,v} - \fmffreeze - \fmfi{plain}{(vpath(__g1,__v) join (reverse vpath(__g2,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g2,__v) join (reverse vpath(__g3,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g3,__v) join (reverse vpath(__g4,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g4,__v) join (reverse vpath(__g1,__v))) - sideways thick} - \fmfi{phantom_arrow}{vpath (__g1, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g2, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g3, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g4, __v) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g1, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g2, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g3, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g4, __v)) sideways thick} - \fmfv{label=$-\frac{g^2}{2} - \delta^{i_1j_2}\delta^{i_2j_3}\delta^{i_3j_4}\delta^{i_4j_1}$, - label.d=10thick}{v} - \end{fmfgraph*}}} -\qquad\qquad\qquad\qquad\qquad -\parbox{20\unitlength}{% - \fmfframe(0,4)(0,4){% - \begin{fmfgraph*}(20,20) - \fmfleft{g1,g2} - \fmfright{g4,g3} - \fmfv{label=$1$}{g1} - \fmfv{label=$2$}{g2} - \fmfv{label=$3$}{g3} - \fmfv{label=$4$}{g4} - \fmf{phantom}{g1,v} - \fmf{phantom}{g2,v} - \fmf{phantom}{g3,v} - \fmf{phantom}{g4,v} - \fmffreeze - \fmfi{plain}{(vpath(__g1,__v) join (reverse vpath(__g4,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g2,__v) join (reverse vpath(__g1,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g3,__v) join (reverse vpath(__g2,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g4,__v) join (reverse vpath(__g3,__v))) - sideways thick} - \fmfi{phantom_arrow}{vpath (__g1, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g2, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g3, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g4, __v) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g1, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g2, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g3, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g4, __v)) sideways thick} - \fmfv{label=$-\frac{g^2}{2} - \delta^{i_1j_4}\delta^{i_4j_3}\delta^{i_3j_2}\delta^{i_2j_1}$, - label.d=10thick}{v} - \end{fmfgraph*}}}\\ -\parbox{20\unitlength}{% - \fmfframe(0,4)(0,4){% - \begin{fmfgraph*}(20,20) - \fmfleft{g1,g2} - \fmfright{g4,g3} - \fmfv{label=$1$}{g1} - \fmfv{label=$2$}{g2} - \fmfv{label=$3$}{g3} - \fmfv{label=$4$}{g4} - \fmf{phantom}{g1,v} - \fmf{phantom}{g2,v} - \fmf{phantom}{g3,v} - \fmf{phantom}{g4,v} - \fmffreeze - \fmfi{plain}{(vpath(__g1,__v) join (reverse vpath(__g2,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g2,__v) join (reverse vpath(__g4,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g3,__v) join (reverse vpath(__g1,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g4,__v) join (reverse vpath(__g3,__v))) - sideways thick} - \fmfi{phantom_arrow}{vpath (__g1, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g2, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g3, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g4, __v) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g1, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g2, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g3, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g4, __v)) sideways thick} - \fmfv{label=$\frac{g^2}{2} - \delta^{i_1j_2}\delta^{i_2j_4}\delta^{i_4j_3}\delta^{i_3j_1}$, - label.d=10thick}{v} - \end{fmfgraph*}}} -\qquad\qquad\qquad\qquad\qquad -\parbox{20\unitlength}{% - \fmfframe(0,4)(0,4){% - \begin{fmfgraph*}(20,20) - \fmfleft{g1,g2} - \fmfright{g4,g3} - \fmfv{label=$1$}{g1} - \fmfv{label=$2$}{g2} - \fmfv{label=$3$}{g3} - \fmfv{label=$4$}{g4} - \fmf{phantom}{g1,v} - \fmf{phantom}{g2,v} - \fmf{phantom}{g3,v} - \fmf{phantom}{g4,v} - \fmffreeze - \fmfi{plain}{(vpath(__g1,__v) join (reverse vpath(__g3,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g2,__v) join (reverse vpath(__g1,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g3,__v) join (reverse vpath(__g4,__v))) - sideways thick} - \fmfi{plain}{(vpath(__g4,__v) join (reverse vpath(__g2,__v))) - sideways thick} - \fmfi{phantom_arrow}{vpath (__g1, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g2, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g3, __v) sideways thick} - \fmfi{phantom_arrow}{vpath (__g4, __v) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g1, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g2, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g3, __v)) sideways thick} - \fmfi{phantom_arrow}{(reverse vpath (__g4, __v)) sideways thick} - \fmfv{label=$\frac{g^2}{2} - \delta^{i_1j_3}\delta^{i_3j_4}\delta^{i_4j_2}\delta^{i_2j_1}$, - label.d=10thick}{v} - \end{fmfgraph*}}}\\ -\end{multline} *) - - (* Summing over the the permutations of~$\{2,3,4\}$, - i.\,e.~$\mathcal{P}_4$ in~\eqref{eq:P4}, we recover~\eqref{eq:4GV}. - However, there is no need to do that and things are - actually simpler, because the Lorentz structure remains - the same and there is no need for us to touch it. *) - - (* \begin{dubious} - FIXME: think deeper! - We're probably fooling ourselves here regarding - ignoring [fuse], since our testcase is the fully - symmetric 4-gluon-vertex. - \end{dubious} *) - -(* Eventually, the type [Coupling.fuse3] will be retired in - favor of [int * int * int * int] or even [int list]. This is why we - have code that is more general than required here. *) - - let fuse3_to_list = function - | F123 -> [4;1;2;3] - | F231 -> [4;2;3;1] - | F312 -> [4;3;1;2] - | F132 -> [4;1;3;2] - | F321 -> [4;3;2;1] - | F213 -> [4;2;1;3] - | F124 -> [3;1;2;4] - | F241 -> [3;2;4;1] - | F412 -> [3;4;1;2] - | F142 -> [3;1;4;2] - | F421 -> [3;4;2;1] - | F214 -> [3;2;1;4] - | F134 -> [2;1;3;4] - | F341 -> [2;3;4;1] - | F413 -> [2;4;1;3] - | F143 -> [2;1;4;3] - | F431 -> [2;4;3;1] - | F314 -> [2;3;1;4] - | F234 -> [1;2;3;4] - | F342 -> [1;3;4;2] - | F423 -> [1;4;2;3] - | F243 -> [1;2;4;3] - | F432 -> [1;4;3;2] - | F324 -> [1;3;2;4] - - let partial_map_undoing_fuse3 fuse3 = - partial_map_undoing_permutation [1;2;3;4] (fuse3_to_list fuse3) - - (* Compute the partial maps once, not everytime anew! *) - let undo_F123 = partial_map_undoing_fuse3 F123 - let undo_F231 = partial_map_undoing_fuse3 F231 - let undo_F312 = partial_map_undoing_fuse3 F312 - let undo_F132 = partial_map_undoing_fuse3 F132 - let undo_F321 = partial_map_undoing_fuse3 F321 - let undo_F213 = partial_map_undoing_fuse3 F213 - let undo_F124 = partial_map_undoing_fuse3 F124 - let undo_F241 = partial_map_undoing_fuse3 F241 - let undo_F412 = partial_map_undoing_fuse3 F412 - let undo_F142 = partial_map_undoing_fuse3 F142 - let undo_F421 = partial_map_undoing_fuse3 F421 - let undo_F214 = partial_map_undoing_fuse3 F214 - let undo_F134 = partial_map_undoing_fuse3 F134 - let undo_F341 = partial_map_undoing_fuse3 F341 - let undo_F413 = partial_map_undoing_fuse3 F413 - let undo_F143 = partial_map_undoing_fuse3 F143 - let undo_F431 = partial_map_undoing_fuse3 F431 - let undo_F314 = partial_map_undoing_fuse3 F314 - let undo_F234 = partial_map_undoing_fuse3 F234 - let undo_F342 = partial_map_undoing_fuse3 F342 - let undo_F423 = partial_map_undoing_fuse3 F423 - let undo_F243 = partial_map_undoing_fuse3 F243 - let undo_F432 = partial_map_undoing_fuse3 F432 - let undo_F324 = partial_map_undoing_fuse3 F324 - - let undo_permutation_of_fuse3 fuse3 = - let fail _ = invalid_arg "permutation_of_fuse3" in - match fuse3 with - | F123 -> PosMap.apply_with_fallback fail undo_F123 - | F231 -> PosMap.apply_with_fallback fail undo_F231 - | F312 -> PosMap.apply_with_fallback fail undo_F312 - | F132 -> PosMap.apply_with_fallback fail undo_F132 - | F321 -> PosMap.apply_with_fallback fail undo_F321 - | F213 -> PosMap.apply_with_fallback fail undo_F213 - | F124 -> PosMap.apply_with_fallback fail undo_F124 - | F241 -> PosMap.apply_with_fallback fail undo_F241 - | F412 -> PosMap.apply_with_fallback fail undo_F412 - | F142 -> PosMap.apply_with_fallback fail undo_F142 - | F421 -> PosMap.apply_with_fallback fail undo_F421 - | F214 -> PosMap.apply_with_fallback fail undo_F214 - | F134 -> PosMap.apply_with_fallback fail undo_F134 - | F341 -> PosMap.apply_with_fallback fail undo_F341 - | F413 -> PosMap.apply_with_fallback fail undo_F413 - | F143 -> PosMap.apply_with_fallback fail undo_F143 - | F431 -> PosMap.apply_with_fallback fail undo_F431 - | F314 -> PosMap.apply_with_fallback fail undo_F314 - | F234 -> PosMap.apply_with_fallback fail undo_F234 - | F342 -> PosMap.apply_with_fallback fail undo_F342 - | F423 -> PosMap.apply_with_fallback fail undo_F423 - | F243 -> PosMap.apply_with_fallback fail undo_F243 - | F432 -> PosMap.apply_with_fallback fail undo_F432 - | F324 -> PosMap.apply_with_fallback fail undo_F324 - - let apply_fuse3 fuse3 (a1, a2, a3, a4) = - let p = undo_permutation_of_fuse3 fuse3 in - (p a1, p a2, p a3, p a4) - - let colorize_fusion3_ufo f1 f2 f3 f c v spins color fuse xtra = - let open Color in - match color with - | Trivial4 -> - let v = V4 (UFO4 (c, v, spins, color), fuse, xtra) in - colorize_fusion3_legacy f1 f2 f3 (f, v) - | FF ((a1, a2), (a3, a4)) -> - let v eps = - let c' = if eps < 0 then QC.neg c else c in - V4 (UFO4 (c', v, spins, Trivial4), fuse, xtra) in - let eps, ((a1, a2), (a3, a4)) - = canonicalize_ff ((a1, a2), (a3, a4)) in - begin match a1, a2, a3, a4, f1, f2, f3 with - | 1, 2, 3, 4, CF_io (_, i1, j1), CF_io (_, i2, j2), CF_io (_, i3, j3) - | 1, 3, 2, 4, CF_io (_, i2, j2), CF_io (_, i3, j3), CF_io (_, i1, j1) - | 1, 4, 2, 3, CF_io (_, i3, j3), CF_io (_, i1, j1), CF_io (_, i2, j2) -> - - (* FIXME: hack alert! Better canonicalize to cyclic [a2], [a3], - [a4]!!! *) - let eps = if a2 = 3 then -eps else eps in - - if j1 = i2 && j2 = i3 then (* $-\delta^{i_4j_1}\delta^{i_1j_2}\delta^{i_2j_3}\delta^{i_3j_4}$ *) - [CF_io (f, i1, j3), v (-eps)] - else if j2 = i1 && j1 = i3 then (* $+\delta^{i_4j_2}\delta^{i_2j_1}\delta^{i_1j_3}\delta^{i_3j_4}$ *) - [CF_io (f, i2, j3), v ( eps)] - else if j3 = i1 && j1 = i2 then (* $+\delta^{i_4j_3}\delta^{i_3j_1}\delta^{i_1j_2}\delta^{i_2j_4}$ *) - [CF_io (f, i3, j2), v ( eps)] - else if j3 = i2 && j2 = i1 then (* $-\delta^{i_4j_3}\delta^{i_3j_2}\delta^{i_2j_1}\delta^{i_1j_4}$ *) - [CF_io (f, i3, j1), v (-eps)] - else - [] - - | _, _, _, _, CF_io _, CF_io _, CF_io _ -> - Printf.eprintf "(%d, %d), (%d, %d) %d\n" a1 a2 a3 a4 eps; - failwith "Colorize.colorize_fusion3_ufo: incomplete" - - | _, _, _, _, - (CF_io _ | CF_aux _), - (CF_io _ | CF_aux _), - (CF_io _ | CF_aux _) -> - [] - - | _ -> - impossible "f_{abe}*f_{cde} for non-adjoints" - - end - | _ -> failwith "Colorize.colorize_fusion3_ufo: incomplete" - - - let colorize_fusion3 f1 f2 f3 (f, v) = - match v with - | V4 (UFO4 (_, _, _, C.Legacy4), _, _) -> - colorize_fusion3_legacy f1 f2 f3 (f, v) - | V4 (UFO4 (c, v, spins, color), fuse, xtra) -> - colorize_fusion3_ufo f1 f2 f3 f c v spins color fuse xtra - | V4 _ -> colorize_fusion3_legacy f1 f2 f3 (f, v) - | _ -> invalid_arg "Colorize.colorize_fusion3" - - (* \thocwmodulesubsection{Quintic and Higher Vertices} *) let is_white = function | White _ -> true | _ -> false let colorize_fusionn flist (f, v) = let incomplete_match () = incomplete ("colorize_fusionn { " ^ - String.concat ", " (List.map flavor_to_string flist) ^ + String.concat ", " (List.map (pullback M.flavor_to_string) flist) ^ " } -> " ^ M.flavor_to_string f) in match M.color f with | C.Singlet -> if List.for_all is_white flist then [White f, v] else incomplete_match () | C.SUN _ -> if List.for_all is_white flist then colored_vertex "colorize_fusionn" else incomplete_match () | C.AdjSUN _ -> if List.for_all is_white flist then colored_vertex "colorize_fusionn" else incomplete_match () - let fuse2 f1 f2 = - ThoList.flatmap - (colorize_fusion2 f1 f2) - (M.fuse2 (flavor_sans_color f1) (flavor_sans_color f2)) + end - let fuse3 f1 f2 f3 = - ThoList.flatmap - (colorize_fusion3 f1 f2 f3) - (M.fuse3 (flavor_sans_color f1) (flavor_sans_color f2) (flavor_sans_color f3)) +(* \thocwmodulesection{Colorizing a Monochrome Model} *) + +module It (M : Model.T) = + struct + + open Coupling + + module C = Color + + module Colored_Flavor = Flavor(M) + + type flavor = Colored_Flavor.t + type flavor_sans_color = M.flavor + let flavor_sans_color = Colored_Flavor.flavor_sans_color + + type gauge = M.gauge + type constant = M.constant + let options = M.options + + open Colored_Flavor + + let color = pullback M.color + let nc = M.nc + let pdg = pullback M.pdg + let lorentz = pullback M.lorentz + + module Ch = M.Ch + let charges = pullback M.charges + +(* For the propagator we cannot use pullback because we have to add the case + of the color singlet propagator by hand. *) + + let cf_aux_propagator = function + | Prop_Scalar -> Prop_Col_Scalar (* Spin 0 octets. *) + | Prop_Majorana -> Prop_Col_Majorana (* Spin 1/2 octets. *) + | Prop_Feynman -> Prop_Col_Feynman (* Spin 1 states, massless. *) + | Prop_Unitarity -> Prop_Col_Unitarity (* Spin 1 states, massive. *) + | Aux_Scalar -> Aux_Col_Scalar (* constant colored scalar propagator *) + | Aux_Vector -> Aux_Col_Vector (* constant colored vector propagator *) + | Aux_Tensor_1 -> Aux_Col_Tensor_1 (* constant colored tensor propagator *) + | Prop_Col_Scalar | Prop_Col_Feynman + | Prop_Col_Majorana | Prop_Col_Unitarity + | Aux_Col_Scalar | Aux_Col_Vector | Aux_Col_Tensor_1 + -> failwith ("Colorize.It().colorize_propagator: already colored particle!") + | _ -> failwith ("Colorize.It().colorize_propagator: impossible!") + + let propagator = function + | CF_aux f -> cf_aux_propagator (M.propagator f) + | White f -> M.propagator f + | CF_in (f, _) -> M.propagator f + | CF_out (f, _) -> M.propagator f + | CF_io (f, _, _) -> M.propagator f + + let width = pullback M.width + + let goldstone = function + | White f -> + begin match M.goldstone f with + | None -> None + | Some (f', g) -> Some (White f', g) + end + | CF_in (f, c) -> + begin match M.goldstone f with + | None -> None + | Some (f', g) -> Some (CF_in (f', c), g) + end + | CF_out (f, c) -> + begin match M.goldstone f with + | None -> None + | Some (f', g) -> Some (CF_out (f', c), g) + end + | CF_io (f, c1, c2) -> + begin match M.goldstone f with + | None -> None + | Some (f', g) -> Some (CF_io (f', c1, c2), g) + end + | CF_aux f -> + begin match M.goldstone f with + | None -> None + | Some (f', g) -> Some (CF_aux f', g) + end + + let conjugate = function + | White f -> White (M.conjugate f) + | CF_in (f, c) -> CF_out (M.conjugate f, c) + | CF_out (f, c) -> CF_in (M.conjugate f, c) + | CF_io (f, c1, c2) -> CF_io (M.conjugate f, c2, c1) + | CF_aux f -> CF_aux (M.conjugate f) + + let conjugate_sans_color = M.conjugate + + let fermion = pullback M.fermion + + let max_degree = M.max_degree + + let flavors () = + invalid "flavors" + + let external_flavors () = + invalid "external_flavors" + + let parameters = M.parameters + + let split_color_string s = + try + let i1 = String.index s '/' in + let i2 = String.index_from s (succ i1) '/' in + let sf = String.sub s 0 i1 + and sc1 = String.sub s (succ i1) (i2 - i1 - 1) + and sc2 = String.sub s (succ i2) (String.length s - i2 - 1) in + (sf, sc1, sc2) + with + | Not_found -> (s, "", "") + + let flavor_of_string s = + try + let sf, sc1, sc2 = split_color_string s in + let f = M.flavor_of_string sf in + match M.color f with + | C.Singlet -> White f + | C.SUN nc -> + if nc > 0 then + CF_in (f, color_flow_of_string sc1) + else + CF_out (f, color_flow_of_string sc2) + | C.AdjSUN _ -> + begin match sc1, sc2 with + | "", "" -> CF_aux f + | _, _ -> CF_io (f, color_flow_of_string sc1, color_flow_of_string sc2) + end + with + | Failure "int_of_string" -> + invalid_arg "Colorize().flavor_of_string: expecting integer" + + let flavor_to_string = function + | White f -> + M.flavor_to_string f + | CF_in (f, c) -> + M.flavor_to_string f ^ "/" ^ string_of_int c ^ "/" + | CF_out (f, c) -> + M.flavor_to_string f ^ "//" ^ string_of_int c + | CF_io (f, c1, c2) -> + M.flavor_to_string f ^ "/" ^ string_of_int c1 ^ "/" ^ string_of_int c2 + | CF_aux f -> + M.flavor_to_string f ^ "//" + + let flavor_to_TeX = function + | White f -> + M.flavor_to_TeX f + | CF_in (f, c) -> + "{" ^ M.flavor_to_TeX f ^ "}_{\\mathstrut " ^ string_of_int c ^ "}" + | CF_out (f, c) -> + "{" ^ M.flavor_to_TeX f ^ "}_{\\mathstrut\\overline{" ^ + string_of_int c ^ "}}" + | CF_io (f, c1, c2) -> + "{" ^ M.flavor_to_TeX f ^ "}_{\\mathstrut " ^ + string_of_int c1 ^ "\\overline{" ^ string_of_int c2 ^ "}}" + | CF_aux f -> + "{" ^ M.flavor_to_TeX f ^ "}_{\\mathstrut 0}" + + let flavor_symbol = function + | White f -> + M.flavor_symbol f + | CF_in (f, c) -> + M.flavor_symbol f ^ "_" ^ string_of_int c ^ "_" + | CF_out (f, c) -> + M.flavor_symbol f ^ "__" ^ string_of_int c + | CF_io (f, c1, c2) -> + M.flavor_symbol f ^ "_" ^ string_of_int c1 ^ "_" ^ string_of_int c2 + | CF_aux f -> + M.flavor_symbol f ^ "__" + + let gauge_symbol = M.gauge_symbol + +(* Masses and widths must not depend on the colors anyway! *) + let mass_symbol = pullback M.mass_symbol + let width_symbol = pullback M.width_symbol + + let constant_symbol = M.constant_symbol + +(* \thocwmodulesubsection{Vertices} *) + +(* [vertices] are \emph{only} used by functor applications and + for indexing a cache of precomputed fusion rules, which is not + used for colorized models. *) + + let vertices () = + invalid "vertices" + + module Legacy = Legacy_Implementation (M) + + let colorize_fusion2 f1 f2 (f, v) = + match v with + | V3 _ -> Legacy.colorize_fusion2 f1 f2 (f, v) + | _ -> [] + + let colorize_fusion3 f1 f2 f3 (f, v) = + match v with + | V4 _ -> Legacy.colorize_fusion3 f1 f2 f3 (f, v) + | _ -> [] + +(* In order to match the \emph{correct} positions of the fields + in the vertices, we have to undo the permutation effected by + the fusion according to [Coupling.fusen]. *) + + module PosMap = + Partial.Make (struct type t = int let compare = compare end) + + (* Note that due to the [inverse], the list [l'] can be + interpreted here as a map reshuffling the indices. + E.\,g., [inverse (Permutation.Default.list [2;0;1])] + applied to [[1;2;3]] gives [[3;1;2]]. *) + let partial_map_redoing_permutation l l' = + let module P = Permutation.Default in + let p = P.inverse (P.of_list (List.map pred l')) in + PosMap.of_lists l (P.list p l) + + (* Note that, the list [l'] can not be + interpreted as a map reshuffling the indices, + but gives the new order of the argument. + E.\,g., [Permutation.Default.list [2;0;1]] + applied to [[1;2;3]] gives [[2;3;1]]. *) + let partial_map_undoing_permutation l l' = + let module P = Permutation.Default in + let p = P.of_list (List.map pred l') in + PosMap.of_lists l (P.list p l) + + module CA = Color.Arrow + module CV = Color.Vertex + module CP = Color.Propagator + + let color_sans_flavor = function + | White _ -> CP.W + | CF_in (_, cfi) -> CP.I cfi + | CF_out (_, cfo) -> CP.O cfo + | CF_io (_, cfi, cfo) -> CP.IO (cfi, cfo) + | CF_aux _ -> CP.G + + let color_with_flavor f = function + | CP.W -> White f + | CP.I cfi -> CF_in (f, cfi) + | CP.O cfo -> CF_out (f, cfo) + | CP.IO (cfi, cfo) -> CF_io (f, cfi, cfo) + | CP.G -> CF_aux f + + let colorize vertex_list flavors f v = + List.map + (fun (coef, cf) -> (color_with_flavor f cf, cmult_vertex coef v)) + (CV.fuse (nc ()) vertex_list (List.map color_sans_flavor flavors)) + + let partial_map_undoing_fusen fusen = + partial_map_undoing_permutation + (ThoList.range 1 (List.length fusen)) + fusen + + let undo_permutation_of_fusen fusen = + PosMap.apply_with_fallback + (fun _ -> invalid_arg "permutation_of_fusen") + (partial_map_undoing_fusen fusen) + + let colorize_fusionn_ufo flist f c v spins flines color fuse xtra = + let v = Vn (UFO (c, v, spins, flines, Color.Vertex.unit), fuse, xtra) in + let p = undo_permutation_of_fusen fuse in + colorize (CV.map p color) flist f v + + let colorize_fusionn flist (f, v) = + match v with + | Vn (UFO (c, v, spins, flines, color), fuse, xtra) -> + colorize_fusionn_ufo flist f c v spins flines color fuse xtra + | _ -> [] let fuse_list flist = ThoList.flatmap (colorize_fusionn flist) (M.fuse (List.map flavor_sans_color flist)) + let fuse2 f1 f2 = + List.rev_append + (fuse_list [f1; f2]) + (ThoList.flatmap + (colorize_fusion2 f1 f2) + (M.fuse2 + (flavor_sans_color f1) + (flavor_sans_color f2))) + + let fuse3 f1 f2 f3 = + List.rev_append + (fuse_list [f1; f2; f3]) + (ThoList.flatmap + (colorize_fusion3 f1 f2 f3) + (M.fuse3 + (flavor_sans_color f1) + (flavor_sans_color f2) + (flavor_sans_color f3))) + let fuse = function | [] | [_] -> invalid_arg "Colorize.It().fuse" | [f1; f2] -> fuse2 f1 f2 | [f1; f2; f3] -> fuse3 f1 f2 f3 | flist -> fuse_list flist let max_degree = M.max_degree (* \thocwmodulesubsection{Adding Color to External Particles} *) let count_color_strings f_list = let rec count_color_strings' n_in n_out n_glue = function | f :: rest -> begin match M.color f with | C.Singlet -> count_color_strings' n_in n_out n_glue rest | C.SUN nc -> if nc > 0 then count_color_strings' (succ n_in) n_out n_glue rest else if nc < 0 then count_color_strings' n_in (succ n_out) n_glue rest else su0 "count_color_strings" | C.AdjSUN _ -> count_color_strings' (succ n_in) (succ n_out) (succ n_glue) rest end | [] -> (n_in, n_out, n_glue) in count_color_strings' 0 0 0 f_list let external_color_flows f_list = let n_in, n_out, n_glue = count_color_strings f_list in if n_in <> n_out then [] else let color_strings = ThoList.range 1 n_in in List.rev_map (fun permutation -> (color_strings, permutation)) (Combinatorics.permute color_strings) (* If there are only adjoints \emph{and} there are no couplings of adjoints to singlets, we can ignore the $\mathrm{U}(1)$-ghosts. *) let pure_adjoints f_list = List.for_all (fun f -> match M.color f with C.AdjSUN _ -> true | _ -> false) f_list let two_adjoints_couple_to_singlets () = let vertices3, vertices4, verticesn = M.vertices () in List.exists (fun ((f1, f2, f3), _, _) -> match M.color f1, M.color f2, M.color f3 with | C.AdjSUN _, C.AdjSUN _, C.Singlet | C.AdjSUN _, C.Singlet, C.AdjSUN _ | C.Singlet, C.AdjSUN _, C.AdjSUN _ -> true | _ -> false) vertices3 || List.exists (fun ((f1, f2, f3, f4), _, _) -> match M.color f1, M.color f2, M.color f3, M.color f4 with | C.AdjSUN _, C.AdjSUN _, C.Singlet, C.Singlet | C.AdjSUN _, C.Singlet, C.AdjSUN _, C.Singlet | C.Singlet, C.AdjSUN _, C.AdjSUN _, C.Singlet | C.AdjSUN _, C.Singlet, C.Singlet, C.AdjSUN _ | C.Singlet, C.AdjSUN _, C.Singlet, C.AdjSUN _ | C.Singlet, C.Singlet, C.AdjSUN _, C.AdjSUN _ -> true | _ -> false) vertices4 || List.exists (fun (flist, _, g) -> true) verticesn let external_ghosts f_list = if pure_adjoints f_list then two_adjoints_couple_to_singlets () else true (* We use [List.hd] and [List.tl] instead of pattern matching, because we consume [ecf_in] and [ecf_out] at a different pace. *) let tail_opt = function | [] -> [] | _ :: tail -> tail let head_req = function | [] -> invalid_arg "Colorize.It().colorize_crossed_amplitude1: insufficient flows" | x :: _ -> x let rec colorize_crossed_amplitude1 ghosts acc f_list (ecf_in, ecf_out) = match f_list, ecf_in, ecf_out with | [], [], [] -> [List.rev acc] | [], _, _ -> invalid_arg "Colorize.It().colorize_crossed_amplitude1: leftover flows" | f :: rest, _, _ -> begin match M.color f with | C.Singlet -> colorize_crossed_amplitude1 ghosts (White f :: acc) rest (ecf_in, ecf_out) | C.SUN nc -> if nc > 0 then colorize_crossed_amplitude1 ghosts (CF_in (f, head_req ecf_in) :: acc) rest (tail_opt ecf_in, ecf_out) else if nc < 0 then colorize_crossed_amplitude1 ghosts (CF_out (f, head_req ecf_out) :: acc) rest (ecf_in, tail_opt ecf_out) else su0 "colorize_flavor" | C.AdjSUN _ -> let ecf_in' = head_req ecf_in and ecf_out' = head_req ecf_out in if ecf_in' = ecf_out' then begin if ghosts then colorize_crossed_amplitude1 ghosts (CF_aux f :: acc) rest (tail_opt ecf_in, tail_opt ecf_out) else [] end else colorize_crossed_amplitude1 ghosts (CF_io (f, ecf_in', ecf_out') :: acc) rest (tail_opt ecf_in, tail_opt ecf_out) end let colorize_crossed_amplitude1 ghosts f_list (ecf_in, ecf_out) = colorize_crossed_amplitude1 ghosts [] f_list (ecf_in, ecf_out) let colorize_crossed_amplitude f_list = ThoList.rev_flatmap (colorize_crossed_amplitude1 (external_ghosts f_list) f_list) (external_color_flows f_list) let cross_uncolored p_in p_out = (List.map M.conjugate p_in) @ p_out let uncross_colored n_in p_lists_colorized = let p_in_out_colorized = List.map (ThoList.splitn n_in) p_lists_colorized in List.map (fun (p_in_colored, p_out_colored) -> (List.map conjugate p_in_colored, p_out_colored)) p_in_out_colorized let amplitude p_in p_out = uncross_colored (List.length p_in) (colorize_crossed_amplitude (cross_uncolored p_in p_out)) (* The $-$-sign in the second component is redundant, but a Whizard convention. *) let indices = function | White _ -> Color.Flow.of_list [0; 0] | CF_in (_, c) -> Color.Flow.of_list [c; 0] | CF_out (_, c) -> Color.Flow.of_list [0; -c] | CF_io (_, c1, c2) -> Color.Flow.of_list [c1; -c2] | CF_aux f -> Color.Flow.ghost () let flow p_in p_out = (List.map indices p_in, List.map indices p_out) end (* \thocwmodulesection{Colorizing a Monochrome Gauge Model} *) module Gauge (M : Model.Gauge) = struct module CM = It(M) type flavor = CM.flavor type flavor_sans_color = CM.flavor_sans_color type gauge = CM.gauge type constant = CM.constant module Ch = CM.Ch let charges = CM.charges let flavor_sans_color = CM.flavor_sans_color let color = CM.color let pdg = CM.pdg let lorentz = CM.lorentz let propagator = CM.propagator let width = CM.width let conjugate = CM.conjugate let conjugate_sans_color = CM.conjugate_sans_color let fermion = CM.fermion let max_degree = CM.max_degree let vertices = CM.vertices let fuse2 = CM.fuse2 let fuse3 = CM.fuse3 let fuse = CM.fuse let flavors = CM.flavors let nc = CM.nc let external_flavors = CM.external_flavors let goldstone = CM.goldstone let parameters = CM.parameters let flavor_of_string = CM.flavor_of_string let flavor_to_string = CM.flavor_to_string let flavor_to_TeX = CM.flavor_to_TeX let flavor_symbol = CM.flavor_symbol let gauge_symbol = CM.gauge_symbol let mass_symbol = CM.mass_symbol let width_symbol = CM.width_symbol let constant_symbol = CM.constant_symbol let options = CM.options let incomplete s = failwith ("Colorize.Gauge()." ^ s ^ " not done yet!") type matter_field = M.matter_field type gauge_boson = M.gauge_boson type other = M.other type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field f = incomplete "field" let matter_field f = incomplete "matter_field" let gauge_boson f = incomplete "gauge_boson" let other f = incomplete "other" let amplitude = CM.amplitude let flow = CM.flow end Index: trunk/omega/src/omega.ml =================================================================== --- trunk/omega/src/omega.ml (revision 8274) +++ trunk/omega/src/omega.ml (revision 8275) @@ -1,695 +1,700 @@ (* omega.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) let (<<) f g x = f (g x) let (>>) f g x = g (f x) module P = Momentum.Default module P_Whizard = Momentum.DefaultW module type T = sig val main : unit -> unit type flavor val diagrams : flavor -> flavor -> flavor list -> ((flavor * Momentum.Default.t) * (flavor * Momentum.Default.t, flavor * Momentum.Default.t) Tree.t) list end module Make (Fusion_Maker : Fusion.Maker) (Target_Maker : Target.Maker) (M : Model.T) = struct module CM = Colorize.It(M) type flavor = M.flavor module Proc = Process.Make(M) (* \begin{dubious} We must have initialized the vertices \emph{before} applying [Fusion_Maker], at least if we want to continue using the vertex cache! \end{dubious} *) (* \begin{dubious} NB: this causes the constant initializers in [Fusion_Maker] more than once. Such side effects must be avoided if the initializers involve expensive computations. \emph{Relying on the fact that the functor will be called only once is not a good idea!} \end{dubious} *) module F = Fusion_Maker(P)(M) module CF = Fusion.Multi(Fusion_Maker)(P)(M) module T = Target_Maker(Fusion_Maker)(P)(M) module W = Whizard.Make(Fusion_Maker)(P)(P_Whizard)(M) module C = Cascade.Make(M)(P) module VSet = Set.Make (struct type t = F.constant Coupling.t let compare = compare end) (* FIXME: can be retired starting from O'Caml 4.02.0! *) let vset_of_list list = List.fold_right VSet.add list VSet.empty; (* For the phase space, we need asymmetric DAGs. HACK: since we will not use this to compute amplitudes, there's no need to supply the proper statistics module and we may assume Dirac fermions. HACK: for the phase space, we should be able to work on the uncolored model. *) module PHS = Fusion.Helac(struct let max_arity () = pred (M.max_degree ()) end)(P)(M) (* Form a ['a list] from a ['a option array], containing the elements that are not [None] in order. *) let opt_array_to_list a = let rec opt_array_to_list' acc i a = if i < 0 then acc else begin match a.(i) with | None -> opt_array_to_list' acc (pred i) a | Some x -> opt_array_to_list' (x :: acc) (pred i) a end in opt_array_to_list' [] (Array.length a - 1) a (* Return a list of [CF.amplitude list]s, corresponig to the diagrams for a specific color flow for each flavor combination. *) let amplitudes_by_flavor amplitudes = List.map opt_array_to_list (Array.to_list (CF.process_table amplitudes)) (* \begin{dubious} If we plan to distiguish different couplings later on, we can no long map all instances of [coupling option] in the tree to [None]. In this case, we will need to normalize different fusion orders [Coupling.fuse2], [Coupling.fuse3] or [Coupling.fusen], because they would otherwise lead to inequivalent diagrams. Unfortunately, this stuff packaged deep in [Fusion.Tagged_Coupling]. \end{dubious} *) (*i let strip_fuse' = function | Coupling.V3 (v, f, c) -> Coupling.V3 (v, Coupling.F12, c) | Coupling.V4 (v, f, c) -> Coupling.V4 (v, Coupling.F123, c) | Coupling.Vn (v, f, c) -> Coupling.Vn (v, [], c) let strip_fuse = function | Some c -> Some (strip_fuse' c) | None -> None i*) (* \begin{dubious} The [Tree.canonicalize] below should be necessary to remove topologically equivalent duplicates. \end{dubious} *) (* Take a [CF.amplitude list] assumed to correspond to the same external states after stripping the color and return a pair of the list of external particles and the corresponding Feynman diagrams without color. *) let wf1 amplitude = match F.externals amplitude with | wf :: _ -> wf | [] -> failwith "Omega.forest_sans_color: no external particles" let uniq l = ThoList.uniq (List.sort compare l) let forest_sans_color = function | amplitude :: _ as amplitudes -> let externals = F.externals amplitude in let prune_color wf = (F.flavor_sans_color wf, F.momentum_list wf) in let prune_color_and_couplings (wf, c) = (prune_color wf, None) in (List.map prune_color externals, uniq (List.map (fun t -> Tree.canonicalize (Tree.map prune_color_and_couplings prune_color t)) (ThoList.flatmap (fun a -> F.forest (wf1 a) a) amplitudes))) | [] -> ([], []) let dag_sans_color = function | amplitude :: _ as amplitudes -> let prune_color wf = (F.flavor_sans_color wf, F.momentum_list wf) in let prune_color_and_couplings (wf, c) = (prune_color wf, None) in let prune a = a in List.map prune amplitudes | [] -> [] let p2s p = if p >= 0 && p <= 9 then string_of_int p else if p <= 36 then String.make 1 (Char.chr (Char.code 'A' + p - 10)) else "_" let format_p wf = String.concat "" (List.map p2s (F.momentum_list wf)) let variable wf = M.flavor_to_string (F.flavor_sans_color wf) ^ "[" ^ format_p wf ^ "]" let variable' wf = CM.flavor_to_TeX (F.flavor wf) ^ "(" ^ format_p wf ^ ")" let feynmf_style propagator color = { Tree.style = begin match propagator with | Coupling.Prop_Feynman | Coupling.Prop_Gauge _ -> begin match color with | Color.AdjSUN _ -> Some ("gluon", "") | _ -> Some ("boson", "") end | Coupling.Prop_Col_Feynman -> Some ("gluon", "") | Coupling.Prop_Unitarity | Coupling.Prop_Rxi _ -> Some ("dbl_wiggly", "") | Coupling.Prop_Spinor | Coupling.Prop_ConjSpinor -> Some ("fermion", "") | _ -> None end; Tree.rev = begin match propagator with | Coupling.Prop_Spinor -> true | Coupling.Prop_ConjSpinor -> false | _ -> false end; Tree.label = None; Tree.tension = None } let header incoming outgoing = "$ " ^ String.concat " " (List.map (CM.flavor_to_TeX << F.flavor) incoming) ^ " \\to " ^ String.concat " " (List.map (CM.flavor_to_TeX << CM.conjugate << F.flavor) outgoing) ^ " $" let header_sans_color incoming outgoing = "$ " ^ String.concat " " (List.map (M.flavor_to_TeX << fst) incoming) ^ " \\to " ^ String.concat " " (List.map (M.flavor_to_TeX << M.conjugate << fst) outgoing) ^ " $" let diagram incoming tree = let fmf wf = let f = F.flavor wf in feynmf_style (CM.propagator f) (CM.color f) in Tree.map (fun (n, _) -> let n' = fmf n in if List.mem n incoming then { n' with Tree.rev = not n'.Tree.rev } else n') (fun l -> if List.mem l incoming then l else F.conjugate l) tree let diagram_sans_color incoming (tree) = let fmf (f, p) = feynmf_style (M.propagator f) (M.color f) in Tree.map (fun (n, c) -> let n' = fmf n in if List.mem n incoming then { n' with Tree.rev = not n'.Tree.rev } else n') (fun (f, p) -> if List.mem (f, p) incoming then (f, p) else (M.conjugate f, p)) tree let feynmf_set amplitude = match F.externals amplitude with | wf1 :: wf2 :: wfs -> let incoming = [wf1; wf2] in { Tree.header = header incoming wfs; Tree.incoming = incoming; Tree.diagrams = List.map (diagram incoming) (F.forest wf1 amplitude) } | _ -> failwith "less than two external particles" let feynmf_set_sans_color (externals, trees) = match externals with | wf1 :: wf2 :: wfs -> let incoming = [wf1; wf2] in { Tree.header = header_sans_color incoming wfs; Tree.incoming = incoming; Tree.diagrams = List.map (diagram_sans_color incoming) trees } | _ -> failwith "less than two external particles" let feynmf_set_sans_color_empty (externals, trees) = match externals with | wf1 :: wf2 :: wfs -> let incoming = [wf1; wf2] in { Tree.header = header_sans_color incoming wfs; Tree.incoming = incoming; Tree.diagrams = [] } | _ -> failwith "less than two external particles" let uncolored_colored amplitudes = { Tree.outer = feynmf_set_sans_color (forest_sans_color amplitudes); Tree.inner = List.map feynmf_set amplitudes } let uncolored_only amplitudes = { Tree.outer = feynmf_set_sans_color (forest_sans_color amplitudes); Tree.inner = [] } let colored_only amplitudes = { Tree.outer = feynmf_set_sans_color_empty (forest_sans_color amplitudes); Tree.inner = List.map feynmf_set amplitudes } let momentum_to_TeX (_, p) = String.concat "" (List.map p2s p) let wf_to_TeX (f, _ as wf) = M.flavor_to_TeX f ^ "(" ^ momentum_to_TeX wf ^ ")" let amplitudes_to_feynmf latex name amplitudes = Tree.feynmf_sets_wrapped latex name wf_to_TeX momentum_to_TeX variable' format_p (List.map uncolored_colored (amplitudes_by_flavor amplitudes)) let amplitudes_to_feynmf_sans_color latex name amplitudes = Tree.feynmf_sets_wrapped latex name wf_to_TeX momentum_to_TeX variable' format_p (List.map uncolored_only (amplitudes_by_flavor amplitudes)) let amplitudes_to_feynmf_color_only latex name amplitudes = Tree.feynmf_sets_wrapped latex name wf_to_TeX momentum_to_TeX variable' format_p (List.map colored_only (amplitudes_by_flavor amplitudes)) let debug (str, descr, opt, var) = [ "-warning:" ^ str, Arg.Unit (fun () -> var := (opt, false):: !var), " check " ^ descr ^ " and print warning on error"; "-error:" ^ str, Arg.Unit (fun () -> var := (opt, true):: !var), " check " ^ descr ^ " and terminate on error" ] let rec include_goldstones = function | [] -> false | (T.Gauge, _) :: _ -> true | _ :: rest -> include_goldstones rest let read_lines_rev file = let ic = open_in file in let rev_lines = ref [] in let rec slurp () = rev_lines := input_line ic :: !rev_lines; slurp () in try slurp () with | End_of_file -> close_in ic; !rev_lines let read_lines file = List.rev (read_lines_rev file) type cache_mode = | Cache_Default | Cache_Initialize of string let cache_option = ref Cache_Default let unphysical_polarization = ref None (* \thocwmodulesection{Main Program} *) let main () = (* Delay evaluation of [M.external_flavors ()]! *) let usage () = "usage: " ^ Sys.argv.(0) ^ " [options] [" ^ String.concat "|" (List.map M.flavor_to_string (ThoList.flatmap snd (M.external_flavors ()))) ^ "]" and rev_scatterings = ref [] and rev_decays = ref [] and cascades = ref [] and checks = ref [] and output_file = ref None and print_forest = ref false and template = ref false and diagrams_all = ref None and diagrams_sans_color = ref None and diagrams_color_only = ref None and diagrams_LaTeX = ref false and quiet = ref false and write = ref true and params = ref false and poles = ref false and dag_out = ref None and dag0_out = ref None and phase_space_out = ref None in Options.parse (Options.cmdline "-target:" T.options @ Options.cmdline "-model:" M.options @ Options.cmdline "-fusion:" CF.options @ ThoList.flatmap debug ["a", "arguments", T.All, checks; "n", "# of input arguments", T.Arguments, checks; "m", "input momenta", T.Momenta, checks; "g", "internal Ward identities", T.Gauge, checks] @ [("-o", Arg.String (fun s -> output_file := Some s), "file write to given file instead of /dev/stdout"); ("-scatter", Arg.String (fun s -> rev_scatterings := s :: !rev_scatterings), "expr in1 in2 -> out1 out2 ..."); ("-scatter_file", Arg.String (fun s -> rev_scatterings := read_lines_rev s @ !rev_scatterings), "name each line: in1 in2 -> out1 out2 ..."); ("-decay", Arg.String (fun s -> rev_decays := s :: !rev_decays), "expr in -> out1 out2 ..."); ("-decay_file", Arg.String (fun s -> rev_decays := read_lines_rev s @ !rev_decays), "name each line: in -> out1 out2 ..."); ("-cascade", Arg.String (fun s -> cascades := s :: !cascades), "expr select diagrams"); ("-initialize", Arg.String (fun s -> cache_option := Cache_Initialize s), "dir precompute lookup tables and store them in directory"); ("-unphysical", Arg.Int (fun i -> unphysical_polarization := Some i), "n use unphysical polarization for n-th particle / test WIs"); ("-template", Arg.Set template, " write a template for handwritten amplitudes"); ("-forest", Arg.Set print_forest, " Diagrammatic expansion"); ("-diagrams", Arg.String (fun s -> diagrams_sans_color := Some s), "file produce FeynMP output for Feynman diagrams"); ("-diagrams:c", Arg.String (fun s -> diagrams_color_only := Some s), "file produce FeynMP output for color flow diagrams"); ("-diagrams:C", Arg.String (fun s -> diagrams_all := Some s), "file produce FeynMP output for Feynman and color flow diagrams"); ("-diagrams_LaTeX", Arg.Set diagrams_LaTeX, " enclose FeynMP output in LaTeX wrapper"); ("-quiet", Arg.Set quiet, " don't print a summary"); ("-summary", Arg.Clear write, " print only a summary"); ("-params", Arg.Set params, " print the model parameters"); ("-poles", Arg.Set poles, " print the Monte Carlo poles"); ("-dag", Arg.String (fun s -> dag_out := Some s), " print minimal DAG"); ("-full_dag", Arg.String (fun s -> dag0_out := Some s), " print complete DAG"); ("-phase_space", Arg.String (fun s -> phase_space_out := Some s), " print minimal DAG for phase space")]) (*i ("-T", Arg.Int Topology.Binary.debug_triplet, ""); ("-P", Arg.Int Topology.Binary.debug_partition, "")]) i*) (fun _ -> prerr_endline (usage ()); exit 1) usage; let cmdline = String.concat " " (List.map ThoString.quote (Array.to_list Sys.argv)) in let output_channel = match !output_file with | None -> stdout | Some name -> open_out name in let processes = try ThoList.uniq (List.sort compare (match List.rev !rev_scatterings, List.rev !rev_decays with | [], [] -> [] | scatterings, [] -> Proc.expand_scatterings (List.map Proc.parse_scattering scatterings) | [], decays -> Proc.expand_decays (List.map Proc.parse_decay decays) | scatterings, decays -> invalid_arg "mixed scattering and decay!")) with | Invalid_argument s -> begin Printf.eprintf "O'Mega: invalid process specification: %s!\n" s; flush stderr; [] end in (* \begin{dubious} This is still crude. Eventually, we want to catch \emph{all} exceptions and write an empty (but compilable) amplitude unless one of the special options is selected. \end{dubious} *) begin match processes, !cache_option, !params with | [], Cache_Initialize dir, false -> F.initialize_cache dir; exit 0 | _, _, true -> if !write then T.parameters_to_channel output_channel; exit 0 | [], _, false -> if !write then T.amplitudes_to_channel cmdline output_channel !checks CF.empty; exit 0 | _, _, false -> let selectors = let fin, fout = List.hd processes in C.to_selectors (C.of_string_list (List.length fin + List.length fout) !cascades) in let amplitudes = try begin match F.check_charges () with | [] -> () | violators -> let violator_strings = String.concat ", " (List.map (fun flist -> "(" ^ String.concat "," (List.map M.flavor_to_string flist) ^ ")") violators) in failwith ("charge violating vertices: " ^ violator_strings) end; CF.amplitudes (include_goldstones !checks) !unphysical_polarization CF.no_exclusions selectors processes with + | Fusion.Majorana -> + begin + Printf.eprintf + "O'Mega: found Majorana fermions: use a supporting binary!\n"; + flush stderr; + CF.empty; + end | exc -> begin Printf.eprintf "O'Mega: exception %s in amplitude construction!\n" (Printexc.to_string exc); flush stderr; CF.empty; end in if !write then T.amplitudes_to_channel cmdline output_channel !checks amplitudes; if not !quiet then begin List.iter (fun amplitude -> Printf.eprintf "SUMMARY: %d fusions, %d propagators" (F.count_fusions amplitude) (F.count_propagators amplitude); flush stderr; Printf.eprintf ", %d diagrams" (F.count_diagrams amplitude); Printf.eprintf "\n") (CF.processes amplitudes); let couplings = List.fold_left (fun acc p -> let fusions = ThoList.flatmap F.rhs (F.fusions p) and brakets = ThoList.flatmap F.ket (F.brakets p) in let couplings = vset_of_list (List.map F.coupling (fusions @ brakets)) in VSet.union acc couplings) VSet.empty (CF.processes amplitudes) in Printf.eprintf "SUMMARY: %d vertices\n" (VSet.cardinal couplings); let ufo_couplings = VSet.fold (fun v acc -> match v with - | Coupling.V3 (Coupling.UFO3 (_, v, _, _), _, _) - | Coupling.V4 (Coupling.UFO4 (_, v, _, _), _, _) - | Coupling.Vn (Coupling.UFOn (_, v, _, _), _, _) -> + | Coupling.Vn (Coupling.UFO (_, v, _, _, _), _, _) -> Sets.String.add v acc | _ -> acc) couplings Sets.String.empty in if not (Sets.String.is_empty ufo_couplings) then Printf.eprintf "SUMMARY: %d UFO vertices: %s\n" (Sets.String.cardinal ufo_couplings) (String.concat ", " (Sets.String.elements ufo_couplings)) end; if !poles then begin List.iter (fun amplitude -> W.write output_channel "omega" (W.merge (W.trees amplitude))) (CF.processes amplitudes) end; begin match !dag0_out with | Some name -> let ch = open_out name in List.iter (F.tower_to_dot ch) (CF.processes amplitudes); close_out ch | None -> () end; begin match !dag_out with | Some name -> let ch = open_out name in List.iter (F.amplitude_to_dot ch) (CF.processes amplitudes); close_out ch | None -> () end; begin match !phase_space_out with | Some name -> let ch = open_out name in begin try List.iter (fun (fin, fout) -> Printf.fprintf ch "%s -> %s ::\n" (String.concat " " (List.map M.flavor_to_string fin)) (String.concat " " (List.map M.flavor_to_string fout)); match fin with | [] -> failwith "Omega(): phase space: no incoming particles" | [f] -> PHS.phase_space_channels ch (PHS.amplitude_sans_color false PHS.no_exclusions selectors fin fout) | [f1; f2] -> PHS.phase_space_channels ch (PHS.amplitude_sans_color false PHS.no_exclusions selectors fin fout); PHS.phase_space_channels_flipped ch (PHS.amplitude_sans_color false PHS.no_exclusions selectors [f2; f1] fout) | _ -> failwith "Omega(): phase space: 3 or more incoming particles") processes; close_out ch with | exc -> begin close_out ch; Printf.eprintf "O'Mega: exception %s in phase space construction!\n" (Printexc.to_string exc); flush stderr end end | None -> () end; if !print_forest then List.iter (fun amplitude -> List.iter (fun t -> Printf.eprintf "%s\n" (Tree.to_string (Tree.map (fun (wf, _) -> variable wf) (fun _ -> "") t))) (F.forest (List.hd (F.externals amplitude)) amplitude)) (CF.processes amplitudes); begin match !diagrams_all with | Some name -> amplitudes_to_feynmf !diagrams_LaTeX name amplitudes | None -> () end; begin match !diagrams_sans_color with | Some name -> amplitudes_to_feynmf_sans_color !diagrams_LaTeX name amplitudes | None -> () end; begin match !diagrams_color_only with | Some name -> amplitudes_to_feynmf_color_only !diagrams_LaTeX name amplitudes | None -> () end; begin match !output_file with | None -> () | Some name -> close_out output_channel end; exit 0 end (* \begin{dubious} This was only intended for debugging O'Giga \ldots \end{dubious} *) let decode wf = (F.flavor wf, (F.momentum wf : Momentum.Default.t)) let diagrams in1 in2 out = match F.amplitudes false F.no_exclusions C.no_cascades [in1; in2] out with | a :: _ -> let wf1 = List.hd (F.externals a) and wf2 = List.hd (List.tl (F.externals a)) in let wf2 = decode wf2 in List.map (fun t -> (wf2, Tree.map (fun (wf, _) -> decode wf) decode t)) (F.forest wf1 a) | [] -> [] let diagrams in1 in2 out = failwith "Omega().diagrams: disabled" end Index: trunk/omega/src/UFOx.mli =================================================================== --- trunk/omega/src/UFOx.mli (revision 8274) +++ trunk/omega/src/UFOx.mli (revision 8275) @@ -1,168 +1,173 @@ (* vertex.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) module Expr : sig type t val of_string : string -> t val of_strings : string list -> t val substitute : string -> t -> t -> t + val rename : (string * string) list -> t -> t val half : string -> t end module type Index = sig (* Indices are represented by a pair [int * 'r], where ['r] denotes the representation the index belongs to. *) (* [free indices] returns all free indices in the list [indices], i.\,e.~all positive indices. *) val free : (int * 'r) list -> (int * 'r) list (* [summation indices] returns all summation indices in the list [indices], i.\,e.~all negative indices. *) val summation : (int * 'r) list -> (int * 'r) list val classes_to_string : ('r -> string) -> (int * 'r) list -> string end module Index : Index module type Tensor = sig type atom (* A tensor is linear combination of products of [atom]s with rational coefficients. *) type t = (atom list * Algebra.Q.t) list (* We might need to replace atoms if the syntax is not context free. *) val map_atoms : (atom -> atom) -> t -> t (* We need to rename indices to implement permutations. *) val map_indices : (int -> int) -> t -> t (* Parsing and unparsing. Lists of [string]s are interpreted as sums. *) val of_expr : UFOx_syntax.expr -> t val of_string : string -> t val of_strings : string list -> t val to_string : t -> string (* The supported representations. *) type r val classify_indices : t -> (int * r) list val rep_to_string : r -> string - val rep_of_int : int -> r + val rep_to_string_whizard : r -> string + val rep_of_int : bool -> int -> r val rep_conjugate : r -> r val rep_trivial : r -> bool (* There is not a 1-to-1 mapping between the representations in the model files and the representations used by O'Mega, e.\,g.~in [Coupling.lorentz]. We might need to use heuristics. *) type r_omega val omega : r -> r_omega end module type Atom = sig type t val map_indices : (int -> int) -> t -> t val of_expr : string -> UFOx_syntax.expr list -> t val to_string : t -> string type r val classify_indices : t list -> (int * r) list val rep_to_string : r -> string - val rep_of_int : int -> r + val rep_to_string_whizard : r -> string + val rep_of_int : bool -> int -> r val rep_conjugate : r -> r val rep_trivial : r -> bool type r_omega val omega : r -> r_omega end module type Lorentz_Atom = sig type dirac = private | C of int * int | Gamma of int * int * int | Gamma5 of int * int | Identity of int * int | ProjP of int * int | ProjM of int * int | Sigma of int * int * int * int type vector = (* private *) | Epsilon of int * int * int * int | Metric of int * int | P of int * int type t = private | Dirac of dirac | Vector of vector + val map_indices_vector : (int -> int) -> vector -> vector + end module Lorentz_Atom : Lorentz_Atom module Lorentz : Tensor with type atom = Lorentz_Atom.t and type r_omega = Coupling.lorentz module type Color_Atom = sig type t = (* private *) | Identity of int * int | Identity8 of int * int | T of int * int * int | F of int * int * int | D of int * int * int | Epsilon of int * int * int | EpsilonBar of int * int * int | T6 of int * int * int | K6 of int * int * int | K6Bar of int * int * int end module Color_Atom : Color_Atom module Color : Tensor with type atom = Color_Atom.t and type r_omega = Color.t module Value : sig type t val of_expr : Expr.t -> t val to_string : t -> string val to_coupling : (string -> 'b) -> t -> 'b Coupling.expr end module type Test = sig val example : unit -> unit val suite : OUnit.test end Index: trunk/omega/src/UFO_targets.mli =================================================================== --- trunk/omega/src/UFO_targets.mli (revision 8274) +++ trunk/omega/src/UFO_targets.mli (revision 8275) @@ -1,93 +1,47 @@ -(* uFO_targets.mli -- +(* UFO_targets.mli -- Copyright (C) 1999-2017 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Generating Code for UFO Lorentz Structures} *) module type T = sig (* NB: The [spins : int list] argument is \emph{not} sufficient to determine the domain and codomain of the function. We will need to inspect the flavors, where the Lorentz structure is referenced. *) val lorentz : Format_Fortran.formatter -> string -> Coupling.lorentz array -> - UFOx.Lorentz.t -> unit + UFO_Lorentz.t -> unit - val fusion2 : - Algebra.QC.t -> string -> Coupling.lorentz3 -> - string -> string -> string -> string -> string -> Coupling.fuse2 -> unit - val fusion3 : - Algebra.QC.t -> string -> Coupling.lorentz4 -> - string -> string -> string -> string -> string -> - string -> string -> Coupling.fuse3 -> unit - val fusionn : + val fuse : Algebra.QC.t -> string -> Coupling.lorentzn -> string -> string list -> string list -> Coupling.fusen -> unit val eps4_g4_g44_decl : Format_Fortran.formatter -> unit -> unit val eps4_g4_g44_init : Format_Fortran.formatter -> unit -> unit end module Fortran : T - -(* only for debugging: *) -module Lorentz_Fusion : sig - type t - val parse : Coupling.lorentz list -> UFOx.Lorentz.t -> t - val to_string : t -> string -end - -module type Dirac = - sig - type qc = Algebra.QC.t - type t = qc array array - val zero : qc - val one : qc - val minus_one : qc - val i : qc - val minus_i : qc - val unit : t - val null : t - val gamma0 : t - val gamma1 : t - val gamma2 : t - val gamma3 : t - val gamma5 : t - val gamma : t array - val cc : t - val neg : t -> t - val add : t -> t -> t - val sub : t -> t -> t - val mul : t -> t -> t - val times : qc -> t -> t - val transpose : t -> t - val adjoint : t -> t - val conj : t -> t - val product : t list -> t - val test_suite : OUnit.test - end - -module Dirac : Dirac Index: trunk/omega/src/algebra.ml =================================================================== --- trunk/omega/src/algebra.ml (revision 8274) +++ trunk/omega/src/algebra.ml (revision 8275) @@ -1,477 +1,704 @@ (* algebra.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) +module type Test = + sig + val suite : OUnit.test + end + (* The terms will be small and there's no need to be fancy and/or efficient. It's more important to have a unique representation. *) module PM = Pmap.List (* \thocwmodulesection{Coefficients} *) (* For our algebra, we need coefficient rings. *) module type CRing = sig type t val null : t val unit : t val mul : t -> t -> t val add : t -> t -> t val sub : t -> t -> t val neg : t -> t val to_string : t -> string end (* And rational numbers provide a particularly important example: *) module type Rational = sig include CRing val is_null : t -> bool val is_unit : t -> bool val is_positive : t -> bool val is_negative : t -> bool val is_integer : t -> bool val make : int -> int -> t val abs : t -> t val inv : t -> t val div : t -> t -> t val pow : t -> int -> t val sum : t list -> t val to_ratio : t -> int * int val to_float : t -> float val to_integer : t -> int end (* \thocwmodulesection{Naive Rational Arithmetic} *) (* \begin{dubious} This \emph{is} dangerous and will overflow even for simple applications. The production code will have to be linked to a library for large integer arithmetic. \end{dubious} *) (* Anyway, here's Euclid's algorithm: *) let rec gcd i1 i2 = if i2 = 0 then abs i1 else gcd i2 (i1 mod i2) let lcm i1 i2 = (i1 / gcd i1 i2) * i2 module Small_Rational : Rational = struct type t = int * int let is_null (n, _) = (n = 0) let is_unit (n, d) = (n <> 0) && (n = d) let is_positive (n, d) = n * d > 0 let is_negative (n, d) = n * d < 0 let is_integer (n, d) = (gcd n d = d) let null = (0, 1) let unit = (1, 1) let make n d = let c = gcd n d in (n / c, d / c) let abs (n, d) = (abs n, abs d) let inv (n, d) = (d, n) let mul (n1, d1) (n2, d2) = make (n1 * n2) (d1 * d2) let div q1 q2 = mul q1 (inv q2) let add (n1, d1) (n2, d2) = make (n1 * d2 + n2 * d1) (d1 * d2) let sub (n1, d1) (n2, d2) = make (n1 * d2 - n2 * d1) (d1 * d2) let neg (n, d) = (- n, d) let rec pow q p = if p = 0 then unit else if p < 0 then pow (inv q) (-p) else mul q (pow q (pred p)) let sum qs = List.fold_right add qs null let to_ratio (n, d) = if d < 0 then (-n, -d) else (n, d) let to_float (n, d) = float n /. float d let to_string (n, d) = if d = 1 then Printf.sprintf "%d" n else let n, d = to_ratio (n, d) in Printf.sprintf "(%d/%d)" n d let to_integer (n, d) = if is_integer (n, d) then n else invalid_arg "Algebra.Small_Rational.to_integer" end module Q = Small_Rational (* \thocwmodulesection{Rational Complex Numbers} *) module type QComplex = sig type q type t val make : q -> q -> t val null : t val one : t val real : t -> q val imag : t -> q val conj : t -> t val neg : t -> t val add : t -> t -> t val sub : t -> t -> t val mul : t -> t -> t + val inv : t -> t end module QComplex (Q : Rational) : QComplex with type q = Q.t = struct type q = Q.t type t = { re : q; im : q } let make re im = { re; im } let null = { re = Q.null; im = Q.null } let one = { re = Q.unit; im = Q.null } let real z = z.re let imag z = z.im let conj z = { re = z.re; im = Q.neg z.im } let neg z = { re = Q.neg z.re; im = Q.neg z.im } let add z1 z2 = { re = Q.add z1.re z2.re; im = Q.add z1.im z2.im } let sub z1 z2 = { re = Q.sub z1.re z2.re; im = Q.sub z1.im z2.im } (* Save one multiplication with respect to the standard formula \begin{equation} (x+iy)(u+iv) = \lbrack xu-yv\rbrack + i\lbrack(x+u)(y+v)-xu-yv\rbrack\, \end{equation} at the expense of one addition and two subtractions. *) let mul z1 z2 = let re12 = Q.mul z1.re z2.re and im12 = Q.mul z1.im z2.im in { re = Q.sub re12 im12; im = Q.sub (Q.sub (Q.mul (Q.add z1.re z1.im) (Q.add z2.re z2.im)) re12) im12 } + let inv z = + let modulus = Q.add (Q.mul z.re z.re) (Q.mul z.im z.im) in + { re = Q.div z.re modulus; + im = Q.div (Q.neg z.im) modulus } + end module QC = QComplex(Q) +(* \thocwmodulesection{Laurent Polynomials} *) + +module type Laurent = + sig + type c + type t + val null : t + val unit : t + val is_null : t -> bool + val atom : c -> int -> t + val const : c -> t + val scale : c -> t -> t + val add : t -> t -> t + val diff : t -> t -> t + val sum : t list -> t + val mul : t -> t -> t + val product : t list -> t + val pow : int -> t -> t + val eval : c -> t -> c + val to_string : string -> t -> string + val compare : t -> t -> int + val pp : Format.formatter -> t -> unit + module Test : Test + end + +module Laurent : Laurent with type c = QC.t = + struct + + module IMap = + Map.Make + (struct + type t = int + let compare i1 i2 = + Pervasives.compare i2 i1 + end) + + type c = QC.t + + let qc_minus_one = + QC.neg QC.one + + type t = c IMap.t + + let null = IMap.empty + let is_null l = IMap.is_empty l + + let atom qc n = + if qc = QC.null then + null + else + IMap.singleton n qc + + let const z = atom z 0 + let unit = const QC.one + + let add1 n qc l = + try + let qc' = QC.add qc (IMap.find n l) in + if qc' = QC.null then + IMap.remove n l + else + IMap.add n qc' l + with + | Not_found -> IMap.add n qc l + + let add l1 l2 = + IMap.fold add1 l1 l2 + + let sum = function + | [] -> null + | [l] -> l + | l :: l_list -> + List.fold_left add l l_list + + let scale qc l = + IMap.map (QC.mul qc) l + + let diff l1 l2 = + add l1 (scale qc_minus_one l2) + + (* cf.~[Product.fold2_rev] *) + let fold2 f l1 l2 acc = + IMap.fold + (fun n1 qc1 acc1 -> + IMap.fold + (fun n2 qc2 acc2 -> f n1 qc1 n2 qc2 acc2) + l2 acc1) + l1 acc + + let mul l1 l2 = + fold2 + (fun n1 qc1 n2 qc2 acc -> + add1 (n1 + n2) (QC.mul qc1 qc2) acc) + l1 l2 null + + let product = function + | [] -> unit + | [l] -> l + | l :: l_list -> + List.fold_left mul l l_list + + let poly_pow multiply one inverse n x = + let rec pow' i x' acc = + if i < 1 then + acc + else + pow' (pred i) x' (multiply x' acc) in + if n < 0 then + let x' = inverse x in + pow' (pred (-n)) x' x' + else if n = 0 then + one + else + pow' (pred n) x x + + let qc_pow n z = + poly_pow QC.mul QC.one QC.inv n z + + let pow n l = + poly_pow mul unit (fun _ -> invalid_arg "Algebra.Laurent.pow") n l + + let q_to_string q = + (if Q.is_positive q then "+" else "-") ^ Q.to_string (Q.abs q) + + let qc_to_string z = + let r = QC.real z + and i = QC.imag z in + if Q.is_null i then + q_to_string r + else if Q.is_null r then + if Q.is_unit i then + "+I" + else if Q.is_unit (Q.neg i) then + "-I" + else + q_to_string i ^ "*I" + else + Printf.sprintf "(%s%s*I)" (Q.to_string r) (q_to_string i) + + let to_string1 name (n, qc) = + if n = 0 then + qc_to_string qc + else if n = 1 then + if qc = QC.one then + name + else if qc = qc_minus_one then + "-" ^ name + else + Printf.sprintf "%s*%s" (qc_to_string qc) name + else if n = -1 then + Printf.sprintf "%s/%s" (qc_to_string qc) name + else if n > 1 then + if qc = QC.one then + Printf.sprintf "%s^%d" name n + else if qc = qc_minus_one then + Printf.sprintf "-%s^%d" name n + else + Printf.sprintf "%s*%s^%d" (qc_to_string qc) name n + else + Printf.sprintf "%s/%s^%d" (qc_to_string qc) name (-n) + + let to_string name l = + match IMap.bindings l with + | [] -> "0" + | l -> String.concat "" (List.map (to_string1 name) l) + + let pp fmt l = + Format.fprintf fmt "%s" (to_string "N" l) + + let eval v l = + IMap.fold + (fun n qc acc -> QC.add (QC.mul qc (qc_pow n v)) acc) + l QC.null + + let compare l1 l2 = + Pervasives.compare + (List.sort Pervasives.compare (IMap.bindings l1)) + (List.sort Pervasives.compare (IMap.bindings l2)) + + let compare l1 l2 = + IMap.compare Pervasives.compare l1 l2 + + module Test = + struct + open OUnit + + let equal l1 l2 = + compare l1 l2 = 0 + + let assert_equal_laurent l1 l2 = + assert_equal ~printer:(to_string "N") ~cmp:equal l1 l2 + + let suite_mul = + "mul" >::: + + [ "(1+N)(1-N)=1-N^2" >:: + (fun () -> + assert_equal_laurent + (sum [unit; atom (QC.neg QC.one) 2]) + (product [sum [unit; atom QC.one 1]; + sum [unit; atom (QC.neg QC.one) 1]])); + + "(1+N)(1-1/N)=N-1/N" >:: + (fun () -> + assert_equal_laurent + (sum [atom QC.one 1; atom (QC.neg QC.one) (-1)]) + (product [sum [unit; atom QC.one 1]; + sum [unit; atom (QC.neg QC.one) (-1)]])); ] + + let suite = + "Algebra.Laurent" >::: + [suite_mul] + end + + end + (* \thocwmodulesection{Expressions: Terms, Rings and Linear Combinations} *) (* The tensor algebra will be spanned by an abelian monoid: *) module type Term = sig type 'a t val unit : unit -> 'a t val is_unit : 'a t -> bool val atom : 'a -> 'a t val power : int -> 'a t -> 'a t val mul : 'a t -> 'a t -> 'a t val map : ('a -> 'b) -> 'a t -> 'b t val to_string : ('a -> string) -> 'a t -> string val derive : ('a -> 'b option) -> 'a t -> ('b * int * 'a t) list val product : 'a t list -> 'a t val atoms : 'a t -> 'a list end module type Ring = sig module C : Rational type 'a t val null : unit -> 'a t val unit : unit -> 'a t val is_null : 'a t -> bool val is_unit : 'a t -> bool val atom : 'a -> 'a t val scale : C.t -> 'a t -> 'a t val add : 'a t -> 'a t -> 'a t val sub : 'a t -> 'a t -> 'a t val mul : 'a t -> 'a t -> 'a t val neg : 'a t -> 'a t val derive_inner : ('a -> 'a t) -> 'a t -> 'a t (* this? *) val derive_inner' : ('a -> 'a t option) -> 'a t -> 'a t (* or that? *) val derive_outer : ('a -> 'b option) -> 'a t -> ('b * 'a t) list val sum : 'a t list -> 'a t val product : 'a t list -> 'a t val atoms : 'a t -> 'a list val to_string : ('a -> string) -> 'a t -> string end module type Linear = sig module C : Ring type ('a, 'c) t val null : unit -> ('a, 'c) t val atom : 'a -> ('a, 'c) t val singleton : 'c C.t -> 'a -> ('a, 'c) t val scale : 'c C.t -> ('a, 'c) t -> ('a, 'c) t val add : ('a, 'c) t -> ('a, 'c) t -> ('a, 'c) t val sub : ('a, 'c) t -> ('a, 'c) t -> ('a, 'c) t val partial : ('c -> ('a, 'c) t) -> 'c C.t -> ('a, 'c) t val linear : (('a, 'c) t * 'c C.t) list -> ('a, 'c) t val map : ('a -> 'c C.t -> ('b, 'd) t) -> ('a, 'c) t -> ('b, 'd) t val sum : ('a, 'c) t list -> ('a, 'c) t val atoms : ('a, 'c) t -> 'a list * 'c list val to_string : ('a -> string) -> ('c -> string) -> ('a, 'c) t -> string end module Term : Term = struct module M = PM type 'a t = ('a, int) M.t let unit () = M.empty let is_unit = M.is_empty let atom f = M.singleton f 1 let power p x = M.map (( * ) p) x let insert1 binop f p term = let p' = binop (try M.find compare f term with Not_found -> 0) p in if p' = 0 then M.remove compare f term else M.add compare f p' term let mul1 f p term = insert1 (+) f p term let mul x y = M.fold mul1 x y let map f term = M.fold (fun t -> mul1 (f t)) term M.empty let to_string fmt term = String.concat "*" (M.fold (fun f p acc -> (if p = 0 then "1" else if p = 1 then fmt f else "[" ^ fmt f ^ "]^" ^ string_of_int p) :: acc) term []) let derive derive1 x = M.fold (fun f p dx -> if p <> 0 then match derive1 f with | Some df -> (df, p, mul1 f (pred p) (M.remove compare f x)) :: dx | None -> dx else dx) x [] let product factors = List.fold_left mul (unit ()) factors let atoms t = List.map fst (PM.elements t) end module Make_Ring (C : Rational) (T : Term) : Ring = struct module C = C let one = C.unit module M = PM type 'a t = ('a T.t, C.t) M.t let null () = M.empty let is_null = M.is_empty let power t p = M.singleton t p let unit () = power (T.unit ()) one let is_unit t = unit () = t (* \begin{dubious} The following should be correct too, but produces to many false positives instead! What's going on? \end{dubious} *) let broken__is_unit t = match M.elements t with | [(t, p)] -> T.is_unit t || C.is_null p | _ -> false let atom t = power (T.atom t) one let scale c x = M.map (C.mul c) x let insert1 binop t c sum = let c' = binop (try M.find compare t sum with Not_found -> C.null) c in if C.is_null c' then M.remove compare t sum else M.add compare t c' sum let add x y = M.fold (insert1 C.add) x y let sub x y = M.fold (insert1 C.sub) y x (* One might be tempted to use [Product.outer_self M.fold] instead, but this would require us to combine~[tx] and~[cx] to~[(tx, cx)]. *) let fold2 f x y = M.fold (fun tx cx -> M.fold (f tx cx) y) x let mul x y = fold2 (fun tx cx ty cy -> insert1 C.add (T.mul tx ty) (C.mul cx cy)) x y (null ()) let neg x = sub (null ()) x let neg x = scale (C.neg C.unit) x (* Multiply the [derivatives] by [c] and add the result to [dx]. *) let add_derivatives derivatives c dx = List.fold_left (fun acc (df, dt_c, dt_t) -> add (mul df (power dt_t (C.mul c (C.make dt_c 1)))) acc) dx derivatives let derive_inner derive1 x = M.fold (fun t -> add_derivatives (T.derive (fun f -> Some (derive1 f)) t)) x (null ()) let derive_inner' derive1 x = M.fold (fun t -> add_derivatives (T.derive derive1 t)) x (null ()) let collect_derivatives derivatives c dx = List.fold_left (fun acc (df, dt_c, dt_t) -> (df, power dt_t (C.mul c (C.make dt_c 1))) :: acc) dx derivatives let derive_outer derive1 x = M.fold (fun t -> collect_derivatives (T.derive derive1 t)) x [] let sum terms = List.fold_left add (null ()) terms let product factors = List.fold_left mul (unit ()) factors let atoms t = ThoList.uniq (List.sort compare (ThoList.flatmap (fun (t, _) -> T.atoms t) (PM.elements t))) let to_string fmt sum = "(" ^ String.concat " + " (M.fold (fun t c acc -> if C.is_null c then acc else if C.is_unit c then T.to_string fmt t :: acc else if C.is_unit (C.neg c) then ("(-" ^ T.to_string fmt t ^ ")") :: acc else (C.to_string c ^ "*[" ^ T.to_string fmt t ^ "]") :: acc) sum []) ^ ")" end module Make_Linear (C : Ring) : Linear with module C = C = struct module C = C module M = PM type ('a, 'c) t = ('a, 'c C.t) M.t let null () = M.empty let is_null = M.is_empty let atom a = M.singleton a (C.unit ()) let singleton c a = M.singleton a c let scale c x = M.map (C.mul c) x let insert1 binop t c sum = let c' = binop (try M.find compare t sum with Not_found -> C.null ()) c in if C.is_null c' then M.remove compare t sum else M.add compare t c' sum let add x y = M.fold (insert1 C.add) x y let sub x y = M.fold (insert1 C.sub) y x let map f t = M.fold (fun a c -> add (f a c)) t M.empty let sum terms = List.fold_left add (null ()) terms let linear terms = List.fold_left (fun acc (a, c) -> add (scale c a) acc) (null ()) terms let partial derive t = let d t' = let dt' = derive t' in if is_null dt' then None else Some dt' in linear (C.derive_outer d t) let atoms t = let a, c = List.split (PM.elements t) in (a, ThoList.uniq (List.sort compare (ThoList.flatmap C.atoms c))) let to_string fmt cfmt sum = "(" ^ String.concat " + " (M.fold (fun t c acc -> if C.is_null c then acc else if C.is_unit c then fmt t :: acc else if C.is_unit (C.neg c) then ("(-" ^ fmt t ^ ")") :: acc else (C.to_string cfmt c ^ "*" ^ fmt t) :: acc) sum []) ^ ")" end (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/modellib_WZW.ml =================================================================== --- trunk/omega/src/modellib_WZW.ml (revision 8274) +++ trunk/omega/src/modellib_WZW.ml (revision 8275) @@ -1,626 +1,628 @@ (* modellib_WZW.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{SM with WZW-type pseudoscalars} *) module type SM_flags = sig val include_anomalous : bool val k_matrix : bool end module SM_no_anomalous : SM_flags = struct let include_anomalous = false let k_matrix = false end module WZW (Flags : SM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"; "cms_width", Arg.Unit (fun () -> default_width := Complex_Mass), "use complex mass scheme"] (* We do not introduce the Goldstones for the heavy vectors here. *) type matter_field = L of int | N of int | U of int | D of int type gauge_boson = Ga | Wp | Wm | Z | Gl type other = Phip | Phim | Phi0 | H | Psi0 | Eta type flavor = M of matter_field | G of gauge_boson | O of other let matter_field f = M f let gauge_boson f = G f let other f = O f type field = | Matter of matter_field | Gauge of gauge_boson | Other of other let field = function | M f -> Matter f | G f -> Gauge f | O f -> Other f type gauge = unit let gauge_symbol () = failwith "Models.WZW.gauge_symbol: internal error" let family n = List.map matter_field [ L n; N n; U n; D n ] let external_flavors () = [ "1st Generation", ThoList.flatmap family [1; -1]; "2nd Generation", ThoList.flatmap family [2; -2]; "3rd Generation", ThoList.flatmap family [3; -3]; "Gauge Bosons", List.map gauge_boson [Ga; Z; Wp; Wm; Gl]; "Higgs", [O H; O Psi0; O Eta]; "Goldstone Bosons", List.map other [Phip; Phim; Phi0] ] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n = if n >= 0 then Spinor else ConjSpinor let lorentz = function | M f -> begin match f with | L n -> spinor n | N n -> spinor n | U n -> spinor n | D n -> spinor n end | G f -> begin match f with | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector end | O f -> Scalar let color = function | M (U n) -> Color.SUN (if n > 0 then 3 else -3) | M (D n) -> Color.SUN (if n > 0 then 3 else -3) | G Gl -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n = if n >= 0 then Prop_Spinor else Prop_ConjSpinor let propagator = function | M f -> begin match f with | L n -> prop_spinor n | N n -> prop_spinor n | U n -> prop_spinor n | D n -> prop_spinor n end | G f -> begin match f with | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity end | O f -> begin match f with | Phip | Phim | Phi0 -> Only_Insertion | H | Psi0 | Eta -> Prop_Scalar end (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | G Wp | G Wm | M (U 3) | M (U (-3)) | _ -> !default_width else !default_width let goldstone = function | G f -> begin match f with - | Wp -> Some (O Phip, Coupling.Const 1) - | Wm -> Some (O Phim, Coupling.Const 1) - | Z -> Some (O Phi0, Coupling.Const 1) + | Wp -> Some (O Phip, Coupling.Integer 1) + | Wm -> Some (O Phim, Coupling.Integer 1) + | Z -> Some (O Phi0, Coupling.Integer 1) | _ -> None end | _ -> None let conjugate = function | M f -> M (begin match f with | L n -> L (-n) | N n -> N (-n) | U n -> U (-n) | D n -> D (-n) end) | G f -> G (begin match f with | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp end) | O f -> O (begin match f with | Phip -> Phim | Phim -> Phip | Phi0 -> Phi0 | H -> H | Psi0 -> Psi0 | Eta -> Eta end) let fermion = function | M f -> begin match f with | L n -> if n > 0 then 1 else -1 | N n -> if n > 0 then 1 else -1 | U n -> if n > 0 then 1 else -1 | D n -> if n > 0 then 1 else -1 end | G f -> begin match f with | Gl | Ga | Z | Wp | Wm -> 0 end | O _ -> 0 (* Electrical charge, lepton number, baryon number. We could avoid the rationals altogether by multiplying the first and last by 3 \ldots *) module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("WZW.generation': " ^ string_of_int n) let generation f = match f with | M (L n | N n | U n | D n) -> generation' n | G _ | O _ -> [0//1; 0//1; 0//1] let charge = function | M f -> begin match f with | L n -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 end | G f -> begin match f with | Gl | Ga | Z -> 0//1 | Wp -> 1//1 | Wm -> -1//1 end | O f -> begin match f with | H | Phi0 | Psi0 | Eta -> 0//1 | Phip -> 1//1 | Phim -> -1//1 end let lepton = function | M f -> begin match f with | L n | N n -> if n > 0 then 1//1 else -1//1 | U _ | D _ -> 0//1 end | G _ | O _ -> 0//1 let baryon = function | M f -> begin match f with | L _ | N _ -> 0//1 | U n | D n -> if n > 0 then 1//1 else -1//1 end | G _ | O _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f type constant = | Unit | Pi | Alpha_QED | Sin2thw | Sinthw | Costhw | E | G_weak | Vev | Q_lepton | Q_up | Q_down | G_CC | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | G_NC_h_neutrino | G_NC_h_lepton | G_NC_h_up | G_NC_h_down | I_Q_W | I_G_ZWW | I_G_WWW | G_WWWW | G_ZZWW | G_AZWW | G_AAWW | G_HWW | G_HHWW | G_HZZ | G_HHZZ | G_EtaGG | G_EtaWW | G_PsiWW | G_PsiZZ | G_PsiAA | G_PsiAZ | G_PsiGG | G_EtaZZ | G_EtaAZ | G_EtaAA | G_Htt | G_Hbb | G_Hcc | G_Htautau | G_H3 | G_H4 | Gs | I_Gs | G2 | Mass of flavor | Width of flavor (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) let input_parameters = [] let derived_parameters = [] let g_over_2_costh = - Quot (Neg (Atom G_weak), Prod [Const 2; Atom Costhw]) + Quot (Neg (Atom G_weak), Prod [Integer 2; Atom Costhw]) let nc_coupling c t3 q = (Real_Array c, - [Prod [g_over_2_costh; Diff (t3, Prod [Const 2; q; Atom Sin2thw])]; + [Prod [g_over_2_costh; Diff (t3, Prod [Integer 2; q; Atom Sin2thw])]; Prod [g_over_2_costh; t3]]) - let half = Quot (Const 1, Const 2) + let half = Quot (Integer 1, Integer 2) let derived_parameter_arrays = - [ nc_coupling G_NC_neutrino half (Const 0); - nc_coupling G_NC_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_down (Neg half) (Quot (Const (-1), Const 3)); - nc_coupling G_NC_h_neutrino half (Const 0); - nc_coupling G_NC_h_lepton (Neg half) (Const (-1)); - nc_coupling G_NC_h_up half (Quot (Const 2, Const 3)); - nc_coupling G_NC_h_down (Neg half) (Quot (Const (-1), Const 3)) ] + [ nc_coupling G_NC_neutrino half (Integer 0); + nc_coupling G_NC_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_down (Neg half) (Quot (Integer (-1), Integer 3)); + nc_coupling G_NC_h_neutrino half (Integer 0); + nc_coupling G_NC_h_lepton (Neg half) (Integer (-1)); + nc_coupling G_NC_h_up half (Quot (Integer 2, Integer 3)); + nc_coupling G_NC_h_down (Neg half) (Quot (Integer (-1), Integer 3)) ] let parameters () = { input = input_parameters; derived = derived_parameters; derived_arrays = derived_parameter_arrays } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* \begin{equation} \mathcal{L}_{\textrm{EM}} = - e \sum_i q_i \bar\psi_i\fmslash{A}\psi_i \end{equation} *) let mgm ((m1, g, m2), fbf, c) = ((M m1, G g, M m2), fbf, c) let mom ((m1, o, m2), fbf, c) = ((M m1, O o, M m2), fbf, c) let electromagnetic_currents n = List.map mgm [ ((L (-n), Ga, L n), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-n), Ga, U n), FBF (1, Psibar, V, Psi), Q_up); ((D (-n), Ga, D n), FBF (1, Psibar, V, Psi), Q_down) ] let color_currents n = List.map mgm [ ((U (-n), Gl, U n), FBF (1, Psibar, V, Psi), Gs); ((D (-n), Gl, D n), FBF (1, Psibar, V, Psi), Gs) ] (* \begin{equation} \mathcal{L}_{\textrm{NC}} = - \frac{g}{2\cos\theta_W} \sum_i \bar\psi_i\fmslash{Z}(g_V^i-g_A^i\gamma_5)\psi_i \end{equation} *) let neutral_currents n = List.map mgm [ ((L (-n), Z, L n), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-n), Z, N n), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-n), Z, U n), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-n), Z, D n), FBF (1, Psibar, VA, Psi), G_NC_down) ] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = - \frac{g}{2\sqrt2} \sum_i \bar\psi_i (T^+\fmslash{W}^+ + T^-\fmslash{W}^-)(1-\gamma_5)\psi_i \end{equation} *) let charged_currents n = List.map mgm [ ((L (-n), Wm, N n), FBF (1, Psibar, VL, Psi), G_CC); ((N (-n), Wp, L n), FBF (1, Psibar, VL, Psi), G_CC); ((D (-n), Wm, U n), FBF (1, Psibar, VL, Psi), G_CC); ((U (-n), Wp, D n), FBF (1, Psibar, VL, Psi), G_CC) ] let yukawa = [ ((M (U (-3)), O H, M (U 3)), FBF (1, Psibar, S, Psi), G_Htt); ((M (D (-3)), O H, M (D 3)), FBF (1, Psibar, S, Psi), G_Hbb); ((M (U (-2)), O H, M (U 2)), FBF (1, Psibar, S, Psi), G_Hcc); ((M (L (-3)), O H, M (L 3)), FBF (1, Psibar, S, Psi), G_Htautau) ] (* \begin{equation} \mathcal{L}_{\textrm{TGC}} = - e \partial_\mu A_\nu W_+^\mu W_-^\nu + \ldots - e \cot\theta_w \partial_\mu Z_\nu W_+^\mu W_-^\nu + \ldots \end{equation} *) let tgc ((g1, g2, g3), t, c) = ((G g1, G g2, G g3), t, c) let triple_gauge = List.map tgc [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_Gs)] let qgc ((g1, g2, g3, g4), t, c) = ((G g1, G g2, G g3, G g4), t, c) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let quartic_gauge = List.map qgc [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_AZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_AAWW; (Gl, Gl, Gl, Gl), gauge4, G2 ] let gauge_higgs = [ ((O H, G Wp, G Wm), Scalar_Vector_Vector 1, G_HWW); ((O H, G Z, G Z), Scalar_Vector_Vector 1, G_HZZ); ((O Psi0, G Wp, G Wm), Dim5_Scalar_Gauge2_Skew 1, G_PsiWW); ((O Psi0, G Z, G Z), Dim5_Scalar_Gauge2_Skew 1, G_PsiZZ); ((O Psi0, G Ga, G Ga), Dim5_Scalar_Gauge2_Skew 1, G_PsiAA); ((O Psi0, G Z, G Ga), Dim5_Scalar_Gauge2_Skew 1, G_PsiAZ); ((O Psi0, G Gl, G Gl), Dim5_Scalar_Gauge2_Skew 1, G_PsiGG); ((O Eta, G Gl, G Gl), Dim5_Scalar_Gauge2_Skew 1, G_EtaGG); ((O Eta, G Wp, G Wm), Dim5_Scalar_Gauge2_Skew 1, G_EtaWW); ((O Eta, G Z, G Z), Dim5_Scalar_Gauge2_Skew 1, G_EtaZZ); ((O Eta, G Z, G Ga), Dim5_Scalar_Gauge2_Skew 1, G_EtaAZ); ((O Eta, G Ga, G Ga), Dim5_Scalar_Gauge2_Skew 1, G_EtaAA)] let gauge_higgs4 = [ (O H, O H, G Wp, G Wm), Scalar2_Vector2 1, G_HHWW; (O H, O H, G Z, G Z), Scalar2_Vector2 1, G_HHZZ ] let higgs = [ (O H, O H, O H), Scalar_Scalar_Scalar 1, G_H3 ] let higgs4 = [ (O H, O H, O H, O H), Scalar4 1, G_H4 ] let goldstone_vertices = [ ((O Phi0, G Wm, G Wp), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phip, G Ga, G Wm), Scalar_Vector_Vector 1, I_Q_W); ((O Phip, G Z, G Wm), Scalar_Vector_Vector 1, I_G_ZWW); ((O Phim, G Wp, G Ga), Scalar_Vector_Vector 1, I_Q_W); ((O Phim, G Wp, G Z), Scalar_Vector_Vector 1, I_G_ZWW) ] let vertices3 = (ThoList.flatmap electromagnetic_currents [1;2;3] @ ThoList.flatmap color_currents [1;2;3] @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ yukawa @ triple_gauge @ gauge_higgs @ higgs @ goldstone_vertices) let vertices4 = quartic_gauge @ gauge_higgs4 @ higgs4 let vertices () = (vertices3, vertices4, []) (* For efficiency, make sure that [F.of_vertices vertices] is evaluated only once. *) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 let flavor_of_string = function | "e-" -> M (L 1) | "e+" -> M (L (-1)) | "mu-" -> M (L 2) | "mu+" -> M (L (-2)) | "tau-" -> M (L 3) | "tau+" -> M (L (-3)) | "nue" -> M (N 1) | "nuebar" -> M (N (-1)) | "numu" -> M (N 2) | "numubar" -> M (N (-2)) | "nutau" -> M (N 3) | "nutaubar" -> M (N (-3)) | "u" -> M (U 1) | "ubar" -> M (U (-1)) | "c" -> M (U 2) | "cbar" -> M (U (-2)) | "t" -> M (U 3) | "tbar" -> M (U (-3)) | "d" -> M (D 1) | "dbar" -> M (D (-1)) | "s" -> M (D 2) | "sbar" -> M (D (-2)) | "b" -> M (D 3) | "bbar" -> M (D (-3)) | "g" | "gl" -> G Gl | "A" -> G Ga | "Z" | "Z0" -> G Z | "W+" -> G Wp | "W-" -> G Wm | "Psi" -> O Psi0 | "Eta" -> O Eta | "H" -> O H | _ -> invalid_arg "Models.WZW.flavor_of_string" let flavor_to_string = function | M f -> begin match f with | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | L _ -> invalid_arg "Models.WZW.flavor_to_string: invalid lepton" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | N _ -> invalid_arg "Models.WZW.flavor_to_string: invalid neutrino" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Models.WZW.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Models.WZW.flavor_to_string: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Psi0 -> "psi" | Eta -> "eta" end let flavor_to_TeX = function | M f -> begin match f with | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | L _ -> invalid_arg "Models.WZW.flavor_to_TeX: invalid lepton" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | N _ -> invalid_arg "Models.WZW.flavor_to_TeX: invalid neutrino" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | U _ -> invalid_arg "Models.WZW.flavor_to_TeX: invalid up type quark" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | D _ -> invalid_arg "Models.WZW.flavor_to_TeX: invalid down type quark" end | G f -> begin match f with | Gl -> "g" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" end | O f -> begin match f with | Phip -> "phi+" | Phim -> "phi-" | Phi0 -> "phi0" | H -> "H" | Psi0 -> "\\Psi" | Eta -> "\\eta" end let flavor_symbol = function | M f -> begin match f with | L n when n > 0 -> "l" ^ string_of_int n | L n -> "l" ^ string_of_int (abs n) ^ "b" | N n when n > 0 -> "n" ^ string_of_int n | N n -> "n" ^ string_of_int (abs n) ^ "b" | U n when n > 0 -> "u" ^ string_of_int n | U n -> "u" ^ string_of_int (abs n) ^ "b" | D n when n > 0 -> "d" ^ string_of_int n | D n -> "d" ^ string_of_int (abs n) ^ "b" end | G f -> begin match f with | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" end | O f -> begin match f with | Phip -> "pp" | Phim -> "pm" | Phi0 -> "p0" | H -> "h" | Psi0 -> "psi" | Eta -> "eta" end (* There are PDG numbers for Z', Z'', W', 32-34, respectively. We just introduce a number 38 for Y0 as a Z'''. As well, there is the number 8 for a t'. *) let pdg = function | M f -> begin match f with | L n when n > 0 -> 9 + 2*n | L n -> - 9 + 2*n | N n when n > 0 -> 10 + 2*n | N n -> - 10 + 2*n | U n when n > 0 -> 2*n | U n -> 2*n | D n when n > 0 -> - 1 + 2*n | D n -> 1 + 2*n end | G f -> begin match f with | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) end | O f -> begin match f with | Phip | Phim -> 27 | Phi0 -> 26 | H -> 25 | Psi0 -> 28 | Eta -> 29 end let mass_symbol f = "mass(" ^ string_of_int (abs (pdg f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg f)) ^ ")" let constant_symbol = function | Unit -> "unit" | Pi -> "PI" | Alpha_QED -> "alpha" | E -> "e" | G_weak -> "g" | Vev -> "vev" | Sin2thw -> "sin2thw" | Sinthw -> "sinthw" | Costhw -> "costhw" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | G_NC_h_lepton -> "gnchlep" | G_NC_h_neutrino -> "gnchneu" | G_NC_h_up -> "gnchup" | G_NC_h_down -> "gnchdwn" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | I_G_WWW -> "igwww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_AZWW -> "gazww" | G_AAWW -> "gaaww" | G_HWW -> "ghww" | G_HZZ -> "ghzz" | G_HHWW -> "ghhww" | G_HHZZ -> "ghhzz" | G_PsiWW -> "gpsiww" | G_PsiZZ -> "gpsizz" | G_PsiAA -> "gpsiaa" | G_PsiAZ -> "gpsiaz" | G_PsiGG -> "gpsigg" | G_EtaGG -> "getagg" | G_EtaZZ -> "getazz" | G_EtaAA -> "getaaa" | G_EtaAZ -> "getaaz" | G_EtaWW -> "getaww" | G_Htt -> "ghtt" | G_Hbb -> "ghbb" | G_Htautau -> "ghtautau" | G_Hcc -> "ghcc" | G_H3 -> "gh3" | G_H4 -> "gh4" | Gs -> "gs" | I_Gs -> "igs" | G2 -> "gs**2" | Mass f -> "mass" ^ flavor_symbol f | Width f -> "width" ^ flavor_symbol f end Index: trunk/omega/src/UFO.mli =================================================================== --- trunk/omega/src/UFO.mli (revision 8274) +++ trunk/omega/src/UFO.mli (revision 8275) @@ -1,89 +1,83 @@ (* vertex.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) val parse_string : string -> UFO_syntax.t val parse_file : string -> UFO_syntax.t (* These are the contents of the Python files after lexical analysis as context-free variable declarations, before any semantic interpretation. *) module type Files = sig type t = private { particles : UFO_syntax.t; couplings : UFO_syntax.t; coupling_orders : UFO_syntax.t; vertices : UFO_syntax.t; lorentz : UFO_syntax.t; parameters : UFO_syntax.t; propagators : UFO_syntax.t; decays : UFO_syntax.t } val parse_directory : string -> t end type t exception Unhandled of string module Model : Model.T val parse_directory : string -> t module type Fortran_Target = sig - val fusion2 : - Algebra.QC.t -> string -> Coupling.lorentz3 -> - string -> string -> string -> string -> string -> Coupling.fuse2 -> unit - val fusion3 : - Algebra.QC.t -> string -> Coupling.lorentz4 -> - string -> string -> string -> string -> string -> - string -> string -> Coupling.fuse3 -> unit - val fusionn : + val fuse : Algebra.QC.t -> string -> Coupling.lorentzn -> string -> string list -> string list -> Coupling.fusen -> unit val lorentz : ?only:Sets.String.t -> Format_Fortran.formatter -> unit -> unit val lorentz_module : - ?only:Sets.String.t -> ?name:string -> + ?only:Sets.String.t -> ?name:string -> ?fortran_module:string -> Format_Fortran.formatter -> unit -> unit end module Targets : sig module Fortran : Fortran_Target end module type Test = sig - val example : unit -> unit val suite : OUnit.test end + +module Test : Test Index: trunk/omega/src/omegatop =================================================================== --- trunk/omega/src/omegatop (revision 0) +++ trunk/omega/src/omegatop (revision 8275) @@ -0,0 +1,15 @@ +#! /bin/sh +######################################################################## +# This script is for developers only and needs not to be portable. +# This script takes TO's directory structure for granted. +######################################################################## +# tl;dr : don't try this at home, kids ;) +######################################################################## + +build_root=/home/ohl/physics/whizard/_build-4.07.1/ +build_root=/home/ohl/physics/whizard/_build/ +build_dir=$build_root/omega/src +init_file=omega.ocamlinit + +( cd $build_dir; make omega_core.cma ) || exit 1 +exec utop -init $init_file -I $build_dir omega_core.cma "$@" Property changes on: trunk/omega/src/omegatop ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/omega/src/modellib_NMSSM.ml =================================================================== --- trunk/omega/src/modellib_NMSSM.ml (revision 8274) +++ trunk/omega/src/modellib_NMSSM.ml (revision 8275) @@ -1,1589 +1,1591 @@ (* modellib_NMSSM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner Felix Braam (this file only) WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Next-to-Minimal Supersymmetric Standard Model} *) (* This is based on the NMSSM implementation by Felix Braam. Note that for the Higgs sector vertices the conventions of the Franke/Fraas paper have been used. *) module type NMSSM_flags = sig val ckm_present : bool val higgs_triangle : bool end module NMSSM : NMSSM_flags = struct let ckm_present = false let higgs_triangle = false end module NMSSM_CKM : NMSSM_flags = struct let ckm_present = true let higgs_triangle = false end module NMSSM_Hgg : NMSSM_flags = struct let ckm_present = false let higgs_triangle = true end module NMSSM_func (Flags : NMSSM_flags) = struct open Coupling let default_width = ref Timelike let use_fudged_width = ref false let options = Options.create [ "constant_width", Arg.Unit (fun () -> default_width := Constant), "use constant width (also in t-channel)"; "fudged_width", Arg.Set use_fudged_width, "use fudge factor for charge particle width"; "custom_width", Arg.String (fun f -> default_width := Custom f), "use custom width"; "cancel_widths", Arg.Unit (fun () -> default_width := Vanishing), "use vanishing width"] (* Yields a list of tuples consistig of the off-diag combinations of the elements in "set". *) let choose2 set = List.map (function [x;y] -> (x,y) | _ -> failwith "choose2") (Combinatorics.choose 2 set) (* [pairs] appends the diagonal combinations to [choose2]. *) let rec diag = function | [] -> [] | x1 :: rest -> (x1, x1) :: diag rest let pairs l = choose2 l @ diag l let rec cloop set i j k = if i > ((List.length set)-1) then [] else if j > i then cloop set (succ i) (j-i-1) (j-i-1) else if k > j then cloop set i (succ j) (k-j-1) else (List.nth set i, List.nth set j, List.nth set k) :: cloop set i j (succ k) let triples set = cloop set 0 0 0 let rec two_and_one' l1 z n = if n < 0 then [] else ((fst (List.nth (pairs l1) n)),(snd (List.nth (pairs l1) n)), z):: two_and_one' l1 z (pred n) let two_and_one l1 l2 = let f z = two_and_one' l1 z ((List.length (pairs l1))-1) in List.flatten ( List.map f l2 ) type gen = | G of int | GG of gen*gen let rec string_of_gen = function | G n when n > 0 -> string_of_int n | G n -> string_of_int (abs n) ^ "c" | GG (g1,g2) -> string_of_gen g1 ^ "_" ^ string_of_gen g2 (* With this we distinguish the flavour. *) type sff = | SL | SN | SU | SD let string_of_sff = function | SL -> "sl" | SN -> "sn" | SU -> "su" | SD -> "sd" (* With this we distinguish the mass eigenstates. At the moment we have to cheat a little bit for the sneutrinos. Because we are dealing with massless neutrinos there is only one sort of sneutrino. *) type sfm = | M1 | M2 let string_of_sfm = function | M1 -> "1" | M2 -> "2" (* We also introduce special types for the charginos and neutralinos. *) type char = | C1 | C2 | C1c | C2c type neu = | N1 | N2 | N3 | N4 | N5 let int_of_char = function | C1 -> 1 | C2 -> 2 | C1c -> -1 | C2c -> -2 let string_of_char = function | C1 -> "1" | C2 -> "2" | C1c -> "-1" | C2c -> "-2" let conj_char = function | C1 -> C1c | C2 -> C2c | C1c -> C1 | C2c -> C2 let string_of_neu = function | N1 -> "1" | N2 -> "2" | N3 -> "3" | N4 -> "4" | N5 -> "5" (* For the Higgs bosons, we follow the conventions of Franke/Fraas. *) type shiggs = | S1 | S2 | S3 type phiggs = | P1 | P2 let string_of_shiggs = function | S1 -> "1" | S2 -> "2" | S3 -> "3" let string_of_phiggs = function | P1 -> "1" | P2 -> "2" type flavor = | L of int | N of int | U of int | D of int | Sup of sfm*int | Sdown of sfm*int | Ga | Wp | Wm | Z | Gl | Slepton of sfm*int | Sneutrino of int | Neutralino of neu | Chargino of char | Gluino | SHiggs of shiggs | Hp | Hm | PHiggs of phiggs let string_of_fermion_type = function | L _ -> "l" | U _ -> "u" | D _ -> "d" | N _ -> "n" | _ -> failwith "Modellib_NMSSM.NMSSM.string_of_fermion_type: invalid fermion type" let string_of_fermion_gen = function | L g | U g | D g | N g -> string_of_int (abs (g)) | _ -> failwith "Modellib_NMSSM.NMSSM.string_of_fermion_gen: invalid fermion type" type gauge = unit let gauge_symbol () = failwith "Modellib_NMSSM.NMSSM.gauge_symbol: internal error" (* At this point we will forget graviton and -ino. *) let family g = [ L g; N g; Slepton (M1,g); Slepton (M2,g); Sneutrino g; U g; D g; Sup (M1,g); Sup (M2,g); Sdown (M1,g); Sdown (M2,g)] let external_flavors () = [ "1st Generation matter", ThoList.flatmap family [1; -1]; "2nd Generation matter", ThoList.flatmap family [2; -2]; "3rd Generation matter", ThoList.flatmap family [3; -3]; "Gauge Bosons", [Ga; Z; Wp; Wm; Gl]; "Charginos", [Chargino C1; Chargino C2; Chargino C1c; Chargino C2c]; "Neutralinos", [Neutralino N1; Neutralino N2; Neutralino N3; Neutralino N4; Neutralino N5]; "Higgs Bosons", [SHiggs S1; SHiggs S2; SHiggs S3; Hp; Hm; PHiggs P1; PHiggs P2]; "Gluino", [Gluino]] let flavors () = ThoList.flatmap snd (external_flavors ()) let spinor n m = if n >= 0 && m >= 0 then Spinor else if n <= 0 && m <=0 then ConjSpinor else invalid_arg "Modellib_NMSSM.NMSSM.spinor: internal error" let lorentz = function | L g -> spinor g 0 | N g -> spinor g 0 | U g -> spinor g 0 | D g -> spinor g 0 | Chargino c -> spinor (int_of_char c) 0 | Ga | Gl -> Vector | Wp | Wm | Z -> Massive_Vector | SHiggs _ | PHiggs _ | Hp | Hm | Sup _ | Sdown _ | Slepton _ | Sneutrino _ -> Scalar | Neutralino _ | Gluino -> Majorana let color = function | U g -> Color.SUN (if g > 0 then 3 else -3) | Sup (m,g) -> Color.SUN (if g > 0 then 3 else -3) | D g -> Color.SUN (if g > 0 then 3 else -3) | Sdown (m,g) -> Color.SUN (if g > 0 then 3 else -3) | Gl | Gluino -> Color.AdjSUN 3 | _ -> Color.Singlet + let nc () = 3 + let prop_spinor n m = if n >= 0 && m >=0 then Prop_Spinor else if n <=0 && m <=0 then Prop_ConjSpinor else invalid_arg "Modellib_NMSSM.NMSSM.prop_spinor: internal error" let propagator = function | L g -> prop_spinor g 0 | N g -> prop_spinor g 0 | U g -> prop_spinor g 0 | D g -> prop_spinor g 0 | Chargino c -> prop_spinor (int_of_char c) 0 | Ga | Gl -> Prop_Feynman | Wp | Wm | Z -> Prop_Unitarity | SHiggs _ | PHiggs _ -> Prop_Scalar | Hp | Hm -> Prop_Scalar | Sup _ | Sdown _ | Slepton _ | Sneutrino _ -> Prop_Scalar | Gluino -> Prop_Majorana | Neutralino _ -> Prop_Majorana (* Optionally, ask for the fudge factor treatment for the widths of charged particles. Currently, this only applies to $W^\pm$ and top. *) let width f = if !use_fudged_width then match f with | Wp | Wm | U 3 | U (-3) -> Fudged | _ -> !default_width else !default_width let goldstone _ = None let conjugate = function | L g -> L (-g) | N g -> N (-g) | U g -> U (-g) | D g -> D (-g) | Sup (m,g) -> Sup (m,-g) | Sdown (m,g) -> Sdown (m,-g) | Slepton (m,g) -> Slepton (m,-g) | Sneutrino g -> Sneutrino (-g) | Gl -> Gl | Ga -> Ga | Z -> Z | Wp -> Wm | Wm -> Wp | SHiggs s -> SHiggs s | PHiggs p -> PHiggs p | Hp -> Hm | Hm -> Hp | Gluino -> Gluino | Neutralino n -> Neutralino n | Chargino c -> Chargino (conj_char c) let fermion = function | L g -> if g > 0 then 1 else -1 | N g -> if g > 0 then 1 else -1 | U g -> if g > 0 then 1 else -1 | D g -> if g > 0 then 1 else -1 | Gl | Ga | Z | Wp | Wm -> 0 | SHiggs _ | Hp | Hm | PHiggs _ -> 0 | Neutralino _ -> 2 | Chargino c -> if (int_of_char c) > 0 then 1 else -1 | Sup _ -> 0 | Sdown _ -> 0 | Slepton _ -> 0 | Sneutrino _ -> 0 | Gluino -> 2 module Ch = Charges.QQ let ( // ) = Algebra.Small_Rational.make let generation' = function | 1 -> [ 1//1; 0//1; 0//1] | 2 -> [ 0//1; 1//1; 0//1] | 3 -> [ 0//1; 0//1; 1//1] | -1 -> [-1//1; 0//1; 0//1] | -2 -> [ 0//1; -1//1; 0//1] | -3 -> [ 0//1; 0//1; -1//1] | n -> invalid_arg ("NMSSM.generation': " ^ string_of_int n) let generation f = if Flags.ckm_present then [] else match f with | L n | N n | U n | D n | Sup (_,n) | Sdown (_,n) | Slepton (_,n) | Sneutrino n -> generation' n | _ -> [0//1; 0//1; 0//1] let charge = function | L n -> if n > 0 then -1//1 else 1//1 | Slepton (_,n) -> if n > 0 then -1//1 else 1//1 | N n -> 0//1 | Sneutrino n -> 0//1 | U n -> if n > 0 then 2//3 else -2//3 | Sup (_,n) -> if n > 0 then 2//3 else -2//3 | D n -> if n > 0 then -1//3 else 1//3 | Sdown (_,n) -> if n > 0 then -1//3 else 1//3 | Gl | Ga | Z | Neutralino _ | Gluino -> 0//1 | Wp -> 1//1 | Wm -> -1//1 | SHiggs _ | PHiggs _ -> 0//1 | Hp -> 1//1 | Hm -> -1//1 | Chargino (C1 | C2) -> 1//1 | Chargino (C1c | C2c) -> -1//1 let lepton = function | L n | N n -> if n > 0 then 1//1 else -1//1 | Slepton (_,n) | Sneutrino n -> if n > 0 then 1//1 else -1//1 | _ -> 0//1 let baryon = function | U n | D n -> if n > 0 then 1//1 else -1//1 | Sup (_,n) | Sdown (_,n) -> if n > 0 then 1//1 else -1//1 | _ -> 0//1 let charges f = [ charge f; lepton f; baryon f] @ generation f (* We introduce a Boolean type vc as a pseudonym for Vertex Conjugator to distinguish between vertices containing complex mixing matrices like the CKM--matrix or the sfermion or neutralino/chargino--mixing matrices, which have to become complex conjugated. The true--option stands for the conjugated vertex, the false--option for the unconjugated vertex. *) type vc = bool type constant = | E | G | Mu (*lambda**) | Lambda | Q_lepton | Q_up | Q_down | Q_charg | G_Z | G_CC | G_CCQ of vc*int*int | G_NC_neutrino | G_NC_lepton | G_NC_up | G_NC_down | I_Q_W | I_G_ZWW | G_WWWW | G_ZZWW | G_PZWW | G_PPWW | G_SS | I_G_S | Gs | G_NZN of neu*neu | G_CZC of char*char | G_YUK_FFS of flavor*flavor*shiggs | G_YUK_FFP of flavor*flavor*phiggs | G_YUK_LCN of int | G_YUK_UCD of int*int | G_YUK_DCU of int*int | G_NHC of vc*neu*char | G_YUK_C of vc*flavor*char*sff*sfm | G_YUK_Q of vc*int*flavor*char*sff*sfm | G_YUK_N of vc*flavor*neu*sff*sfm | G_YUK_G of vc*flavor*sff*sfm | G_NWC of neu*char | G_CWN of char*neu | G_CSC of char*char*shiggs | G_CPC of char*char*phiggs | G_WSQ of vc*int*int*sfm*sfm | G_SLSNW of vc*int*sfm | G_ZSF of sff*int*sfm*sfm | G_CICIS of neu*neu*shiggs | G_CICIP of neu*neu*phiggs | G_GH_WPC of phiggs | G_GH_WSC of shiggs | G_GH_ZSP of shiggs*phiggs | G_GH_WWS of shiggs | G_GH_ZZS of shiggs | G_GH_ZCC | G_GH_GaCC | G_GH4_ZZPP of phiggs*phiggs | G_GH4_ZZSS of shiggs*shiggs | G_GH4_ZZCC | G_GH4_GaGaCC | G_GH4_ZGaCC | G_GH4_WWCC | G_GH4_WWPP of phiggs*phiggs | G_GH4_WWSS of shiggs*shiggs | G_GH4_ZWSC of shiggs | G_GH4_GaWSC of shiggs | G_GH4_ZWPC of phiggs | G_GH4_GaWPC of phiggs | G_WWSFSF of sff*int*sfm*sfm | G_WPSLSN of vc*int*sfm | G_H3_SCC of shiggs | G_H3_SSS of shiggs*shiggs*shiggs | G_H3_SPP of shiggs*phiggs*phiggs | G_SFSFS of shiggs*sff*int*sfm*sfm | G_SFSFP of phiggs*sff*int*sfm*sfm | G_HSNSL of vc*int*sfm | G_HSUSD of vc*sfm*sfm*int*int | G_WPSUSD of vc*sfm*sfm*int*int | G_WZSUSD of vc*sfm*sfm*int*int | G_WZSLSN of vc*int*sfm | G_GlGlSQSQ | G_PPSFSF of sff | G_ZZSFSF of sff*int*sfm*sfm | G_ZPSFSF of sff*int*sfm*sfm | G_GlZSFSF of sff*int*sfm*sfm | G_GlPSQSQ | G_GlWSUSD of vc*sfm*sfm*int*int | G_GLUGLUA0 of phiggs | G_GLUGLUH0 of shiggs (* Two integer counters for the QCD and EW order of the couplings. *) type orders = int * int let orders = function | _ -> (0,0) (* \begin{subequations} \begin{align} \alpha_{\text{QED}} &= \frac{1}{137.0359895} \\ \sin^2\theta_w &= 0.23124 \end{align} \end{subequations} Here we must perhaps allow for complex input parameters. So split them into their modulus and their phase. At first, we leave them real; the generalization to complex parameters is obvious. *) let parameters () = { input = []; derived = []; derived_arrays = [] } module F = Modeltools.Fusions (struct type f = flavor type c = constant let compare = compare let conjugate = conjugate end) (* For the couplings there are generally two possibilities concerning the sign of the covariant derivative. \begin{equation} {\rm CD}^\pm = \partial_\mu \pm \ii g T^a A^a_\mu \end{equation} The particle data group defines the signs consistently to be positive. Since the convention for that signs also influence the phase definitions of the gaugino/higgsino fields via the off-diagonal entries in their mass matrices it would be the best to adopt that convention. *) (*** REVISED: Compatible with CD+. FB ***) let electromagnetic_currents_3 g = [ ((L (-g), Ga, L g), FBF (1, Psibar, V, Psi), Q_lepton); ((U (-g), Ga, U g), FBF (1, Psibar, V, Psi), Q_up); ((D (-g), Ga, D g), FBF (1, Psibar, V, Psi), Q_down)] (*** REVISED: Compatible with CD+. FB***) let electromagnetic_sfermion_currents g m = [ ((Ga, Slepton (m,-g), Slepton (m,g)), Vector_Scalar_Scalar 1, Q_lepton); ((Ga, Sup (m,-g), Sup (m,g)), Vector_Scalar_Scalar 1, Q_up); ((Ga, Sdown (m,-g), Sdown (m,g)), Vector_Scalar_Scalar 1, Q_down)] (*** REVISED: Compatible with CD+. FB***) let electromagnetic_currents_2 c = let cc = conj_char c in [ ((Chargino cc, Ga, Chargino c), FBF (1, Psibar, V, Psi), Q_charg) ] (*** REVISED: Compatible with CD+. FB***) let neutral_currents g = [ ((L (-g), Z, L g), FBF (1, Psibar, VA, Psi), G_NC_lepton); ((N (-g), Z, N g), FBF (1, Psibar, VA, Psi), G_NC_neutrino); ((U (-g), Z, U g), FBF (1, Psibar, VA, Psi), G_NC_up); ((D (-g), Z, D g), FBF (1, Psibar, VA, Psi), G_NC_down)] (* \begin{equation} \mathcal{L}_{\textrm{CC}} = \mp \frac{g}{2\sqrt2} \sum_i \bar\psi_i \gamma^\mu (1-\gamma_5)(T^+W^+_\mu+T^-W^-_\mu)\psi_i , \end{equation} where the sign corresponds to $\text{CD}_\pm$, respectively. *) (*** REVISED: Compatible with CD+. ***) (* Remark: The definition with the other sign compared to the SM files comes from the fact that $g_{cc} = 1/(2\sqrt{2})$ is used overwhelmingly often in the SUSY Feynman rules, so that JR decided to use a different definiton for [g_cc] in SM and MSSM. *) (** FB **) let charged_currents g = [ ((L (-g), Wm, N g), FBF ((-1), Psibar, VL, Psi), G_CC); ((N (-g), Wp, L g), FBF ((-1), Psibar, VL, Psi), G_CC) ] (* The quark with the inverted generation (the antiparticle) is the outgoing one, the other the incoming. The vertex attached to the outgoing up-quark contains the CKM matrix element {\em not} complex conjugated, while the vertex with the outgoing down-quark has the conjugated CKM matrix element. *) (*** REVISED: Compatible with CD+. FB ***) let charged_quark_currents g h = [ ((D (-g), Wm, U h), FBF ((-1), Psibar, VL, Psi), G_CCQ (true,g,h)); ((U (-g), Wp, D h), FBF ((-1), Psibar, VL, Psi), G_CCQ (false,h,g))] (*** REVISED: Compatible with CD+.FB ***) let charged_chargino_currents n c = let cc = conj_char c in [ ((Chargino cc, Wp, Neutralino n), FBF (1, Psibar, VLR, Chi), G_CWN (c,n)); ((Neutralino n, Wm, Chargino c), FBF (1, Chibar, VLR, Psi), G_NWC (n,c)) ] (*** REVISED: Compatible with CD+. FB***) let charged_slepton_currents g m = [ ((Wm, Slepton (m,-g), Sneutrino g), Vector_Scalar_Scalar (-1), G_SLSNW (true,g,m)); ((Wp, Slepton (m,g), Sneutrino (-g)), Vector_Scalar_Scalar 1, G_SLSNW (false,g,m)) ] (*** REVISED: Compatible with CD+. FB***) let charged_squark_currents' g h m1 m2 = [ ((Wm, Sup (m1,g), Sdown (m2,-h)), Vector_Scalar_Scalar (-1), G_WSQ (true,g,h,m1,m2)); ((Wp, Sup (m1,-g), Sdown (m2,h)), Vector_Scalar_Scalar 1, G_WSQ (false,g,h,m1,m2)) ] let charged_squark_currents g h = List.flatten (Product.list2 (charged_squark_currents' g h) [M1;M2] [M1;M2] ) (*** REVISED: Compatible with CD+. FB ***) let neutral_sfermion_currents' g m1 m2 = [ ((Z, Slepton (m1,-g), Slepton (m2,g)), Vector_Scalar_Scalar (-1), G_ZSF (SL,g,m1,m2)); ((Z, Sup (m1,-g), Sup (m2,g)), Vector_Scalar_Scalar (-1), G_ZSF(SU,g,m1,m2)); ((Z, Sdown (m1,-g), Sdown (m2,g)), Vector_Scalar_Scalar (-1), G_ZSF (SD,g,m1,m2))] let neutral_sfermion_currents g = List.flatten (Product.list2 (neutral_sfermion_currents' g) [M1;M2] [M1;M2]) @ [ ((Z, Sneutrino (-g), Sneutrino g), Vector_Scalar_Scalar (-1), G_ZSF (SN,g,M1,M1)) ] (*** REVISED: Compatible with CD+. FB***) let neutral_Z (n,m) = [ ((Neutralino n, Z, Neutralino m), FBF (1, Chibar, VLR, Chi), (G_NZN (n,m))) ] (*** REVISED: Compatible with CD+. FB***) let charged_Z c1 c2 = let cc1 = conj_char c1 in ((Chargino cc1, Z, Chargino c2), FBF ((-1), Psibar, VA , Psi), G_CZC (c1,c2)) (*** REVISED: Compatible with CD+. Remark: This is pure octet. FB***) let yukawa_v = [ (Gluino, Gl, Gluino), FBF (1, Chibar, V, Chi), Gs] (*** REVISED: Independent of the sign of CD. ***) (*** REVISED: Felix Braam: Compact version using new COMBOS + FF-Couplings *) let yukawa_higgs_FFS f s = [((conjugate f, SHiggs s, f ), FBF (1, Psibar, S, Psi), G_YUK_FFS (conjugate f, f, s))] let yukawa_higgs_FFP f p = [((conjugate f, PHiggs p, f), FBF (1, Psibar, P, Psi), G_YUK_FFP (conjugate f ,f , p))] let yukawa_higgs_NLC g = [ ((N (-g), Hp, L g), FBF (1, Psibar, Coupling.SR, Psi), G_YUK_LCN g); ((L (-g), Hm, N g), FBF (1, Psibar, Coupling.SL, Psi), G_YUK_LCN g)] let yukawa_higgs g = yukawa_higgs_NLC g @ List.flatten ( Product.list2 yukawa_higgs_FFS [L g; U g; D g] [S1; S2; S3]) @ List.flatten ( Product.list2 yukawa_higgs_FFP [L g; U g; D g] [P1; P2]) (*** REVISED: Independent of the sign of CD. FB***) let yukawa_higgs_quark (g,h) = [ ((U (-g), Hp, D h), FBF (1, Psibar, SLR, Psi), G_YUK_UCD (g, h)); ((D (-h), Hm, U g), FBF (1, Psibar, SLR, Psi), G_YUK_DCU (g, h)) ] (*** REVISED: Compatible with CD+. ***) (*** REVISED: Felix Braam: Compact version using new COMBOS*) let yukawa_shiggs_2 c1 c2 s = let cc1 = conj_char c1 in ((Chargino cc1, SHiggs s, Chargino c2), FBF (1, Psibar, SLR, Psi), G_CSC (c1,c2,s)) let yukawa_phiggs_2 c1 c2 p = let cc1 = conj_char c1 in ((Chargino cc1, PHiggs p, Chargino c2), FBF (1, Psibar, SLR, Psi), G_CPC (c1,c2,p)) let yukawa_higgs_2 = Product.list3 yukawa_shiggs_2 [C1;C2] [C1;C2] [S1;S2;S3] @ Product.list3 yukawa_phiggs_2 [C1;C2] [C1;C2] [P1;P2] (*** REVISED: Compatible with CD+.FB ***) let higgs_charg_neutr n c = let cc = conj_char c in [ ((Neutralino n, Hm, Chargino c), FBF (-1, Chibar, SLR, Psi), G_NHC (false,n,c)); ((Chargino cc, Hp, Neutralino n), FBF (-1, Psibar, SLR, Chi), G_NHC (true,n,c)) ] (*** REVISED: Compatible with CD+. ***) (*** REVISED: Felix Braam: Compact version using new COMBOS*) let shiggs_neutr (n,m,s) = ((Neutralino n, SHiggs s, Neutralino m), FBF (1, Chibar, SLR, Chi), G_CICIS (n,m,s)) let phiggs_neutr (n,m,p) = ((Neutralino n, PHiggs p, Neutralino m), FBF (1, Chibar, SLR, Chi), G_CICIP (n,m,p)) let higgs_neutr = List.map shiggs_neutr (two_and_one [N1;N2;N3;N4;N5] [S1;S2;S3]) @ List.map phiggs_neutr (two_and_one [N1;N2;N3;N4;N5] [P1;P2]) (*** REVISED: Compatible with CD+. FB***) let yukawa_n_2 n m g = [ ((Neutralino n, Slepton (m,-g), L g), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,L g,n,SL,m)); ((L (-g), Slepton (m,g), Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,L g,n,SL,m)); ((Neutralino n, Sup (m,-g), U g), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,U g,n,SU,m)); ((U (-g), Sup (m,g), Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,U g,n,SU,m)); ((Neutralino n, Sdown (m,-g), D g), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,D g,n,SD,m)); ((D (-g), Sdown (m,g), Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,D g,n,SD,m)) ] let yukawa_n_3 n g = [ ((Neutralino n, Sneutrino (-g), N g), FBF (1, Chibar, SLR, Psi), G_YUK_N (true,N g,n,SN,M1)); ((N (-g), Sneutrino g, Neutralino n), FBF (1, Psibar, SLR, Chi), G_YUK_N (false,N g, n,SN,M1)) ] let yukawa_n_5 g m = [ ((U (-g), Sup (m,g), Gluino), FBF (1, Psibar, SLR, Chi), G_YUK_G (false,U g,SU,m)); ((D (-g), Sdown (m,g), Gluino), FBF (1, Psibar, SLR, Chi), G_YUK_G (false,D g,SD,m)); ((Gluino, Sup (m,-g), U g), FBF (1, Chibar, SLR, Psi), G_YUK_G (true,U g,SU,m)); ((Gluino, Sdown (m,-g), D g), FBF (1, Chibar, SLR, Psi), G_YUK_G (true,D g,SD,m))] let yukawa_n = List.flatten (Product.list3 yukawa_n_2 [N1;N2;N3;N4;N5] [M1;M2] [1;2;3]) @ List.flatten (Product.list2 yukawa_n_3 [N1;N2;N3;N4;N5] [1;2;3]) @ List.flatten (Product.list2 yukawa_n_5 [1;2;3] [M1;M2]) (*** REVISED: Compatible with CD+.FB ***) let yukawa_c_2 c g = let cc = conj_char c in [ ((L (-g), Sneutrino g, Chargino cc), BBB (1, Psibar, SLR, Psibar), G_YUK_C (true,L g,c,SN,M1)); ((Chargino c, Sneutrino (-g), L g), PBP (1, Psi, SLR, Psi), G_YUK_C (false,L g,c,SN,M1)) ] let yukawa_c_3 c m g = let cc = conj_char c in [ ((N (-g), Slepton (m,g), Chargino c), FBF (1, Psibar, SLR, Psi), G_YUK_C (true,N g,c,SL,m)); ((Chargino cc, Slepton (m,-g), N g), FBF (1, Psibar, SLR, Psi), G_YUK_C (false,N g,c,SL,m)) ] let yukawa_c c = ThoList.flatmap (yukawa_c_2 c) [1;2;3] @ List.flatten (Product.list2 (yukawa_c_3 c) [M1;M2] [1;2;3]) (*** REVISED: Compatible with CD+. FB***) let yukawa_cq' c (g,h) m = let cc = conj_char c in [ ((Chargino c, Sup (m,-g), D h), PBP (1, Psi, SLR, Psi), G_YUK_Q (false,g,D h,c,SU,m)); ((D (-h), Sup (m,g), Chargino cc), BBB (1, Psibar, SLR, Psibar), G_YUK_Q (true,g,D h,c,SU,m)); ((Chargino cc, Sdown (m,-g), U h), FBF (1, Psibar, SLR, Psi), G_YUK_Q (true,g,U h,c,SD,m)); ((U (-h), Sdown (m,g), Chargino c), FBF (1, Psibar, SLR, Psi), G_YUK_Q (false,g,U h,c,SD,m)) ] let yukawa_cq c = if Flags.ckm_present then List.flatten (Product.list2 (yukawa_cq' c) [(1,1);(1,2);(2,1);(2,2);(1,3);(2,3);(3,3);(3,2);(3,1)] [M1;M2]) else List.flatten (Product.list2 (yukawa_cq' c) [(1,1);(2,2);(3,3)] [M1;M2]) (*** REVISED: Compatible with CD+. Remark: Singlet and octet gluon exchange. The coupling is divided by sqrt(2) to account for the correct normalization of the Lie algebra generators. **FB*) let col_currents g = [ ((D (-g), Gl, D g), FBF ((-1), Psibar, V, Psi), Gs); ((U (-g), Gl, U g), FBF ((-1), Psibar, V, Psi), Gs)] (*** REVISED: Compatible with CD+. Remark: Singlet and octet gluon exchange. The coupling is divided by sqrt(2) to account for the correct normalization of the Lie algebra generators. **FB*) let chg = function | M1 -> M2 | M2 -> M1 let col_sfermion_currents g m = [ ((Gl, Sup (m,-g), Sup (m,g)), Vector_Scalar_Scalar (-1), Gs); ((Gl, Sdown (m,-g), Sdown (m,g)), Vector_Scalar_Scalar (-1), Gs)] (*** REVISED: Compatible with CD+. **FB*) let triple_gauge = [ ((Ga, Wm, Wp), Gauge_Gauge_Gauge 1, I_Q_W); ((Z, Wm, Wp), Gauge_Gauge_Gauge 1, I_G_ZWW); ((Gl, Gl, Gl), Gauge_Gauge_Gauge 1, I_G_S)] (*** REVISED: Independent of the sign of CD. **FB*) let gauge4 = Vector4 [(2, C_13_42); (-1, C_12_34); (-1, C_14_23)] let minus_gauge4 = Vector4 [(-2, C_13_42); (1, C_12_34); (1, C_14_23)] let quartic_gauge = [ (Wm, Wp, Wm, Wp), gauge4, G_WWWW; (Wm, Z, Wp, Z), minus_gauge4, G_ZZWW; (Wm, Z, Wp, Ga), minus_gauge4, G_PZWW; (Wm, Ga, Wp, Ga), minus_gauge4, G_PPWW; (Gl, Gl, Gl, Gl), gauge4, G_SS] (* The [Scalar_Vector_Vector] couplings do not depend on the choice of the sign of the covariant derivative since they are quadratic in the gauge couplings. *) (** Effective Higgs-Gluon-Gluon coupling. **) let gauge_higgs_GlGlS s= ((SHiggs s, Gl, Gl), Dim5_Scalar_Gauge2 1, G_GLUGLUH0 s) let gauge_higgs_GlGlP p= ((PHiggs p, Gl, Gl), Dim5_Scalar_Gauge2_Skew 1, G_GLUGLUA0 p) (*** REVISED: Compatible with CD+. FB***) (*** Revision: 2005-03-10: first two vertices corrected. ***) (*** REVISED: Compact version using new COMBOS*) (*** REVISED: Couplings adjusted to FF-convention*) let gauge_higgs_WPC p= [ ((Wm, Hp, PHiggs p), Vector_Scalar_Scalar 1, G_GH_WPC p); ((Wp, Hm, PHiggs p), Vector_Scalar_Scalar 1, G_GH_WPC p)] let gauge_higgs_WSC s= [((Wm, Hp, SHiggs s),Vector_Scalar_Scalar 1, G_GH_WSC s); ((Wp, Hm, SHiggs s),Vector_Scalar_Scalar (-1), G_GH_WSC s)] let gauge_higgs_ZSP s p = [((Z, SHiggs s, PHiggs p),Vector_Scalar_Scalar 1, G_GH_ZSP (s,p))] let gauge_higgs_WWS s= ((SHiggs s, Wp, Wm),Scalar_Vector_Vector 1, G_GH_WWS s) let gauge_higgs_ZZS s= ((SHiggs s, Z, Z), Scalar_Vector_Vector 1, G_GH_ZZS s) let gauge_higgs_ZCC = ((Z, Hp, Hm),Vector_Scalar_Scalar 1, G_GH_ZCC ) let gauge_higgs_GaCC = ((Ga, Hp, Hm),Vector_Scalar_Scalar 1, G_GH_GaCC ) let gauge_higgs = ThoList.flatmap gauge_higgs_WPC [P1;P2] @ ThoList.flatmap gauge_higgs_WSC [S1;S2;S3] @ List.flatten (Product.list2 gauge_higgs_ZSP [S1;S2;S3] [P1;P2]) @ List.map gauge_higgs_WWS [S1;S2;S3] @ List.map gauge_higgs_ZZS [S1;S2;S3] @ [gauge_higgs_ZCC] @ [gauge_higgs_GaCC] @ (if Flags.higgs_triangle then List.map gauge_higgs_GlGlS [S1;S2;S3] @ List.map gauge_higgs_GlGlP [P1;P2] else []) (*** REVISED: Compact version using new COMBOS*) (*** REVISED: Couplings adjusted to FF-convention*) let gauge_higgs4_ZZPP (p1,p2) = ((PHiggs p1, PHiggs p2, Z, Z), Scalar2_Vector2 1, G_GH4_ZZPP (p1,p2)) let gauge_higgs4_ZZSS (s1,s2) = ((SHiggs s1, SHiggs s2 , Z, Z), Scalar2_Vector2 1, G_GH4_ZZSS (s1,s2)) let gauge_higgs4_ZZCC = ((Hp, Hm, Z, Z), Scalar2_Vector2 1, G_GH4_ZZCC) let gauge_higgs4_GaGaCC = ((Hp, Hm, Ga, Ga), Scalar2_Vector2 1, G_GH4_GaGaCC) let gauge_higgs4_ZGaCC = ((Hp, Hm, Ga, Z), Scalar2_Vector2 1, G_GH4_ZGaCC ) let gauge_higgs4_WWCC = ((Hp, Hm, Wp, Wm), Scalar2_Vector2 1, G_GH4_WWCC ) let gauge_higgs4_WWPP (p1,p2) = ((PHiggs p1, PHiggs p2, Wp, Wm), Scalar2_Vector2 1, G_GH4_WWPP (p1,p2)) let gauge_higgs4_WWSS (s1,s2) = ((SHiggs s1, SHiggs s2, Wp, Wm), Scalar2_Vector2 1, G_GH4_WWSS (s1,s2)) let gauge_higgs4_ZWSC s = [ ((Hp, SHiggs s, Wm, Z), Scalar2_Vector2 1, G_GH4_ZWSC s); ((Hm, SHiggs s, Wp, Z), Scalar2_Vector2 1, G_GH4_ZWSC s)] let gauge_higgs4_GaWSC s = [ ((Hp, SHiggs s, Wm, Ga), Scalar2_Vector2 1, G_GH4_GaWSC s); ((Hm, SHiggs s, Wp, Ga), Scalar2_Vector2 1, G_GH4_GaWSC s) ] let gauge_higgs4_ZWPC p = [ ((Hp, PHiggs p, Wm, Z), Scalar2_Vector2 1, G_GH4_ZWPC p); ((Hm, PHiggs p, Wp, Z), Scalar2_Vector2 (-1), G_GH4_ZWPC p)] let gauge_higgs4_GaWPC p = [ ((Hp, PHiggs p, Wm, Ga), Scalar2_Vector2 1, G_GH4_GaWPC p); ((Hm, PHiggs p, Wp, Ga), Scalar2_Vector2 (-1), G_GH4_GaWPC p) ] let gauge_higgs4 = List.map gauge_higgs4_ZZPP (pairs [P1;P2]) @ List.map gauge_higgs4_ZZSS (pairs [S1;S2;S3]) @ [gauge_higgs4_ZZCC] @ [gauge_higgs4_GaGaCC] @ [gauge_higgs4_ZGaCC] @ [gauge_higgs4_WWCC] @ List.map gauge_higgs4_WWPP (pairs [P1;P2]) @ List.map gauge_higgs4_WWSS (pairs [S1;S2;S3]) @ ThoList.flatmap gauge_higgs4_ZWSC [S1;S2;S3] @ ThoList.flatmap gauge_higgs4_GaWSC [S1;S2;S3] @ ThoList.flatmap gauge_higgs4_ZWPC [P1;P2] @ ThoList.flatmap gauge_higgs4_GaWPC [P1;P2] (**********************************************FB****) let gauge_sfermion4' g m1 m2 = [ ((Wp, Wm, Slepton (m1,g), Slepton (m2,-g)), Scalar2_Vector2 1, G_WWSFSF (SL,g,m1,m2)); ((Z, Ga, Slepton (m1,g), Slepton (m2,-g)), Scalar2_Vector2 1, G_ZPSFSF (SL,g,m1,m2)); ((Z, Z, Slepton (m1,g), Slepton (m2,-g)), Scalar2_Vector2 1, G_ZZSFSF(SL,g,m1,m2)); ((Wp, Wm, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 1, G_WWSFSF (SU,g,m1,m2)); ((Wp, Wm, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 1, G_WWSFSF(SD,g,m1,m2)); ((Z, Z, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 1, G_ZZSFSF (SU,g,m1,m2)); ((Z, Z, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 1, G_ZZSFSF (SD,g,m1,m2)); ((Z, Ga, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 1, G_ZPSFSF (SU,g,m1,m2)); ((Z, Ga, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 1, G_ZPSFSF (SD,g,m1,m2)) ] let gauge_sfermion4'' g m = [ ((Wp, Ga, Slepton (m,g), Sneutrino (-g)), Scalar2_Vector2 1, G_WPSLSN (false,g,m)); ((Wm, Ga, Slepton (m,-g), Sneutrino g), Scalar2_Vector2 1, G_WPSLSN (true,g,m)); ((Wp, Z, Slepton (m,g), Sneutrino (-g)), Scalar2_Vector2 1, G_WZSLSN(false,g,m)); ((Wm, Z, Slepton (m,-g), Sneutrino g), Scalar2_Vector2 1, G_WZSLSN (true,g,m)); ((Ga, Ga, Slepton (m,g), Slepton (m,-g)), Scalar2_Vector2 1, G_PPSFSF SL); ((Ga, Ga, Sup (m,g), Sup (m,-g)), Scalar2_Vector2 1, G_PPSFSF SU); ((Ga, Ga, Sdown (m,g), Sdown (m,-g)), Scalar2_Vector2 1, G_PPSFSF SD)] let gauge_sfermion4 g = List.flatten (Product.list2 (gauge_sfermion4' g) [M1;M2] [M1;M2]) @ ThoList.flatmap (gauge_sfermion4'' g) [M1;M2] @ [ ((Wp, Wm, Sneutrino g, Sneutrino (-g)), Scalar2_Vector2 1, G_WWSFSF (SN,g,M1,M1)); ((Z, Z, Sneutrino g, Sneutrino (-g)), Scalar2_Vector2 1, G_ZZSFSF (SN,g,M1,M1)) ] (*** Added by Felix Braam. ***) let gauge_squark4'' g h m1 m2 = [ ((Wp, Ga, Sup (m1,-g), Sdown (m2,h)), Scalar2_Vector2 1, G_WPSUSD (false,m1,m2,g,h)); ((Wm, Ga, Sup (m1,g), Sdown (m2,-h)), Scalar2_Vector2 1, G_WPSUSD (true,m1,m2,g,h)); ((Wp, Z, Sup (m1,-g), Sdown (m2,h)), Scalar2_Vector2 1, G_WZSUSD (false,m1,m2,g,h)); ((Wm, Z, Sup (m1,g), Sdown (m2,-h)), Scalar2_Vector2 1, G_WZSUSD (true,m1,m2,g,h)) ] let gauge_squark4' g h = List.flatten (Product.list2 (gauge_squark4'' g h) [M1;M2] [M1;M2]) let gauge_squark4 = if Flags.ckm_present then List.flatten (Product.list2 gauge_squark4' [1;2;3] [1;2;3]) else ThoList.flatmap (fun g -> gauge_squark4' g g) [1;2;3] (**********************************FB*********************) let gluon_w_squark'' g h m1 m2 = [ ((Gl, Wp, Sup (m1,-g), Sdown (m2,h)), Scalar2_Vector2 1, G_GlWSUSD (false,m1,m2,g,h)); ((Gl, Wm, Sup (m1,g), Sdown (m2,-h)), Scalar2_Vector2 1, G_GlWSUSD (true,m1,m2,g,h)) ] let gluon_w_squark' g h = List.flatten (Product.list2 (gluon_w_squark'' g h) [M1;M2] [M1;M2]) let gluon_w_squark = if Flags.ckm_present then List.flatten (Product.list2 gluon_w_squark' [1;2;3] [1;2;3]) else ThoList.flatmap (fun g -> gluon_w_squark' g g) [1;2;3] (***********************************FB********************) let gluon_gauge_squark' g m1 m2 = [ ((Gl, Z, Sup (m1,g), Sup (m2,-g)), Scalar2_Vector2 2, G_GlZSFSF (SU,g,m1,m2)); ((Gl, Z, Sdown (m1,g), Sdown (m2,-g)), Scalar2_Vector2 2, G_GlZSFSF (SD,g,m1,m2)) ] let gluon_gauge_squark'' g m = [ ((Gl, Ga, Sup (m,g), Sup (m,-g)), Scalar2_Vector2 2, G_GlPSQSQ); ((Gl, Ga, Sdown (m,g), Sdown (m,-g)), Scalar2_Vector2 (-1), G_GlPSQSQ) ] let gluon_gauge_squark g = List.flatten (Product.list2 (gluon_gauge_squark' g) [M1;M2] [M1;M2]) @ ThoList.flatmap (gluon_gauge_squark'' g) [M1;M2] (*************************************FB******************) let gluon2_squark2' g m = [ ((Gl, Gl, Sup (m,g), Sup (m,-g)), Scalar2_Vector2 2, G_GlGlSQSQ); ((Gl, Gl, Sdown (m,g), Sdown (m,-g)), Scalar2_Vector2 2, G_GlGlSQSQ) ] let gluon2_squark2 g = ThoList.flatmap (gluon2_squark2' g) [M1;M2] (*** REVISED: Independent of the sign of CD. *FB**) (*** REVISED: Compact version using new COMBOS*) (*** REVISED: Couplings adjusted to FF-convention*) let higgs_SCC s = ((Hp, Hm, SHiggs s), Scalar_Scalar_Scalar 1, G_H3_SCC s ) let higgs_SSS (s1,s2,s3)= ((SHiggs s1, SHiggs s2, SHiggs s3), Scalar_Scalar_Scalar 1, G_H3_SSS (s1,s2,s3)) let higgs_SPP (p1,p2,s) = ((SHiggs s, PHiggs p1, PHiggs p2), Scalar_Scalar_Scalar 1, G_H3_SPP (s,p1,p2)) let higgs = List.map higgs_SCC [S1;S2;S3]@ List.map higgs_SSS (triples [S1;S2;S3])@ List.map higgs_SPP (two_and_one [P1;P2] [S1;S2;S3]) let higgs4 = [] (* The vertices of the type Higgs - Sfermion - Sfermion are independent of the choice of the CD sign since they are quadratic in the gauge coupling. *) (*** REVISED: Independent of the sign of CD. ***) let higgs_sneutrino' s g = ((SHiggs s, Sneutrino g, Sneutrino (-g)), Scalar_Scalar_Scalar 1, G_SFSFS (s,SN,g,M1,M1)) let higgs_sneutrino'' g m = [((Hp, Sneutrino (-g), Slepton (m,g)), Scalar_Scalar_Scalar 1, G_HSNSL (false,g,m)); ((Hm, Sneutrino g, Slepton (m,-g)), Scalar_Scalar_Scalar 1, G_HSNSL (true,g,m))] let higgs_sneutrino = Product.list2 higgs_sneutrino' [S1;S2;S3] [1;2;3] @ List.flatten ( Product.list2 higgs_sneutrino'' [1;2;3] [M1;M2] ) (* Under the assumption that there is no mixing between the left- and right-handed sfermions for the first two generations there is only a coupling of the form Higgs - sfermion1 - sfermion2 for the third generation. All the others are suppressed by $m_f/M_W$. *) (*** REVISED: Independent of the sign of CD. ***) let higgs_sfermion_S s g m1 m2 = [ ((SHiggs s, Slepton (m1,g), Slepton (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFS (s,SL,g,m1,m2)); ((SHiggs s, Sup (m1,g), Sup (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFS (s,SU,g,m1,m2)); ((SHiggs s, Sdown (m1,g), Sdown (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFS (s,SD,g,m1,m2))] let higgs_sfermion' g m1 m2 = (higgs_sfermion_S S1 g m1 m2) @ (higgs_sfermion_S S2 g m1 m2) @ (higgs_sfermion_S S3 g m1 m2) let higgs_sfermion_P p g m1 m2 = [ ((PHiggs p, Slepton (m1,g), Slepton (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFP (p,SL,g,m1,m2)); ((PHiggs p, Sup (m1,g), Sup (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFP (p,SU,g,m1,m2)); ((PHiggs p, Sdown (m1,g), Sdown (m2,-g)), Scalar_Scalar_Scalar 1, G_SFSFP (p,SD,g,m1,m2)) ] let higgs_sfermion'' g m1 m2 = (higgs_sfermion_P P1 g m1 m2) @ (higgs_sfermion_P P2 g m1 m2) let higgs_sfermion = List.flatten (Product.list3 higgs_sfermion' [1;2;3] [M1;M2] [M1;M2]) @ List.flatten (Product.list3 higgs_sfermion'' [1;2;3] [M1;M2] [M1;M2]) (*** REVISED: Independent of the sign of CD. ***) let higgs_squark' g h m1 m2 = [ ((Hp, Sup (m1,-g), Sdown (m2,h)), Scalar_Scalar_Scalar 1, G_HSUSD (false,m1,m2,g,h)); ((Hm, Sup (m1,g), Sdown (m2,-h)), Scalar_Scalar_Scalar 1, G_HSUSD (true,m1,m2,g,h)) ] let higgs_squark_a g h = higgs_squark' g h M1 M1 let higgs_squark_b (g,h) = List.flatten (Product.list2 (higgs_squark' g h) [M1;M2] [M1;M2]) let higgs_squark = if Flags.ckm_present then List.flatten (Product.list2 higgs_squark_a [1;2] [1;2]) @ ThoList.flatmap higgs_squark_b [(1,3);(2,3);(3,3);(3,1);(3,2)] else higgs_squark_a 1 1 @ higgs_squark_a 2 2 @ higgs_squark_b (3,3) let vertices3 = (ThoList.flatmap electromagnetic_currents_3 [1;2;3] @ ThoList.flatmap electromagnetic_currents_2 [C1;C2] @ List.flatten (Product.list2 electromagnetic_sfermion_currents [1;2;3] [M1;M2]) @ ThoList.flatmap neutral_currents [1;2;3] @ ThoList.flatmap neutral_sfermion_currents [1;2;3] @ ThoList.flatmap charged_currents [1;2;3] @ List.flatten (Product.list2 charged_slepton_currents [1;2;3] [M1;M2]) @ (if Flags.ckm_present then List.flatten (Product.list2 charged_quark_currents [1;2;3] [1;2;3]) @ List.flatten (Product.list2 charged_squark_currents [1;2;3] [1;2;3]) @ ThoList.flatmap yukawa_higgs_quark [(1,3);(2,3);(3,3);(3,1);(3,2)] else charged_quark_currents 1 1 @ charged_quark_currents 2 2 @ charged_quark_currents 3 3 @ charged_squark_currents 1 1 @ charged_squark_currents 2 2 @ charged_squark_currents 3 3 @ ThoList.flatmap yukawa_higgs_quark [(3,3)]) @ (*i ThoList.flatmap yukawa_higgs [1;2;3] @ i*) yukawa_higgs 3 @ yukawa_n @ ThoList.flatmap yukawa_c [C1;C2] @ ThoList.flatmap yukawa_cq [C1;C2] @ List.flatten (Product.list2 charged_chargino_currents [N1;N2;N3;N4;N5] [C1;C2]) @ triple_gauge @ ThoList.flatmap neutral_Z (pairs [N1;N2;N3;N4;N5]) @ Product.list2 charged_Z [C1;C2] [C1;C2] @ gauge_higgs @ higgs @ yukawa_higgs_2 @ (*i List.flatten (Product.list2 yukawa_higgs_quark [1;2;3] [1;2;3]) @ i*) List.flatten (Product.list2 higgs_charg_neutr [N1;N2;N3;N4;N5] [C1;C2]) @ higgs_neutr @ higgs_sneutrino @ higgs_sfermion @ higgs_squark @ yukawa_v @ ThoList.flatmap col_currents [1;2;3] @ List.flatten (Product.list2 col_sfermion_currents [1;2;3] [M1;M2])) let vertices4 = (quartic_gauge @ higgs4 @ gauge_higgs4 @ ThoList.flatmap gauge_sfermion4 [1;2;3] @ gauge_squark4 @ gluon_w_squark @ ThoList.flatmap gluon2_squark2 [1;2;3] @ ThoList.flatmap gluon_gauge_squark [1;2;3]) let vertices () = (vertices3, vertices4, []) let table = F.of_vertices (vertices ()) let fuse2 = F.fuse2 table let fuse3 = F.fuse3 table let fuse = F.fuse table let max_degree () = 4 (* SLHA2-Nomenclature for neutral Higgses *) let flavor_of_string s = match s with | "e-" -> L 1 | "e+" -> L (-1) | "mu-" -> L 2 | "mu+" -> L (-2) | "tau-" -> L 3 | "tau+" -> L (-3) | "nue" -> N 1 | "nuebar" -> N (-1) | "numu" -> N 2 | "numubar" -> N (-2) | "nutau" -> N 3 | "nutaubar" -> N (-3) | "se1-" -> Slepton (M1,1) | "se1+" -> Slepton (M1,-1) | "smu1-" -> Slepton (M1,2) | "smu1+" -> Slepton (M1,-2) | "stau1-" -> Slepton (M1,3) | "stau1+" -> Slepton (M1,-3) | "se2-" -> Slepton (M2,1) | "se2+" -> Slepton (M2,-1) | "smu2-" -> Slepton (M2,2) | "smu2+" -> Slepton (M2,-2) | "stau2-" -> Slepton (M2,3) | "stau2+" -> Slepton (M2,-3) | "snue" -> Sneutrino 1 | "snue*" -> Sneutrino (-1) | "snumu" -> Sneutrino 2 | "snumu*" -> Sneutrino (-2) | "snutau" -> Sneutrino 3 | "snutau*" -> Sneutrino (-3) | "u" -> U 1 | "ubar" -> U (-1) | "c" -> U 2 | "cbar" -> U (-2) | "t" -> U 3 | "tbar" -> U (-3) | "d" -> D 1 | "dbar" -> D (-1) | "s" -> D 2 | "sbar" -> D (-2) | "b" -> D 3 | "bbar" -> D (-3) | "A" -> Ga | "Z" | "Z0" -> Z | "W+" -> Wp | "W-" -> Wm | "gl" | "g" -> Gl | "h01" -> SHiggs S1 | "h02" -> SHiggs S2 | "h03" -> SHiggs S3 | "A01" -> PHiggs P1 | "A02" -> PHiggs P2 | "H+" -> Hp | "H-" -> Hm | "su1" -> Sup (M1,1) | "su1c" -> Sup (M1,-1) | "sc1" -> Sup (M1,2) | "sc1c" -> Sup (M1,-2) | "st1" -> Sup (M1,3) | "st1c" -> Sup (M1,-3) | "su2" -> Sup (M2,1) | "su2c" -> Sup (M2,-1) | "sc2" -> Sup (M2,2) | "sc2c" -> Sup (M2,-2) | "st2" -> Sup (M2,3) | "st2c" -> Sup (M2,-3) | "sgl" | "sg" -> Gluino | "sd1" -> Sdown (M1,1) | "sd1c" -> Sdown (M1,-1) | "ss1" -> Sdown (M1,2) | "ss1c" -> Sdown (M1,-2) | "sb1" -> Sdown (M1,3) | "sb1c" -> Sdown (M1,-3) | "sd2" -> Sdown (M2,1) | "sd2c" -> Sdown (M2,-1) | "ss2" -> Sdown (M2,2) | "ss2c" -> Sdown (M2,-2) | "sb2" -> Sdown (M2,3) | "sb2c" -> Sdown (M2,-3) | "neu1" -> Neutralino N1 | "neu2" -> Neutralino N2 | "neu3" -> Neutralino N3 | "neu4" -> Neutralino N4 | "neu5" -> Neutralino N5 | "ch1+" -> Chargino C1 | "ch2+" -> Chargino C2 | "ch1-" -> Chargino C1c | "ch2-" -> Chargino C2c | s -> invalid_arg ("Fatal error: %s Modellib_NMSSM.NMSSM.flavor_of_string:" ^ s) let flavor_to_string = function | L 1 -> "e-" | L (-1) -> "e+" | L 2 -> "mu-" | L (-2) -> "mu+" | L 3 -> "tau-" | L (-3) -> "tau+" | N 1 -> "nue" | N (-1) -> "nuebar" | N 2 -> "numu" | N (-2) -> "numubar" | N 3 -> "nutau" | N (-3) -> "nutaubar" | U 1 -> "u" | U (-1) -> "ubar" | U 2 -> "c" | U (-2) -> "cbar" | U 3 -> "t" | U (-3) -> "tbar" | U _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_string: invalid up type quark" | D 1 -> "d" | D (-1) -> "dbar" | D 2 -> "s" | D (-2) -> "sbar" | D 3 -> "b" | D (-3) -> "bbar" | D _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_string: invalid down type quark" | Gl -> "gl" | Gluino -> "sgl" | Ga -> "A" | Z -> "Z" | Wp -> "W+" | Wm -> "W-" | SHiggs S1 -> "h01" | SHiggs S2 -> "h02" | SHiggs S3 -> "h03" | PHiggs P1 -> "A01" | PHiggs P2 -> "A02" | Hp -> "H+" | Hm -> "H-" | Slepton (M1,1) -> "se1-" | Slepton (M1,-1) -> "se1+" | Slepton (M1,2) -> "smu1-" | Slepton (M1,-2) -> "smu1+" | Slepton (M1,3) -> "stau1-" | Slepton (M1,-3) -> "stau1+" | Slepton (M2,1) -> "se2-" | Slepton (M2,-1) -> "se2+" | Slepton (M2,2) -> "smu2-" | Slepton (M2,-2) -> "smu2+" | Slepton (M2,3) -> "stau2-" | Slepton (M2,-3) -> "stau2+" | Sneutrino 1 -> "snue" | Sneutrino (-1) -> "snue*" | Sneutrino 2 -> "snumu" | Sneutrino (-2) -> "snumu*" | Sneutrino 3 -> "snutau" | Sneutrino (-3) -> "snutau*" | Sup (M1,1) -> "su1" | Sup (M1,-1) -> "su1c" | Sup (M1,2) -> "sc1" | Sup (M1,-2) -> "sc1c" | Sup (M1,3) -> "st1" | Sup (M1,-3) -> "st1c" | Sup (M2,1) -> "su2" | Sup (M2,-1) -> "su2c" | Sup (M2,2) -> "sc2" | Sup (M2,-2) -> "sc2c" | Sup (M2,3) -> "st2" | Sup (M2,-3) -> "st2c" | Sdown (M1,1) -> "sd1" | Sdown (M1,-1) -> "sd1c" | Sdown (M1,2) -> "ss1" | Sdown (M1,-2) -> "ss1c" | Sdown (M1,3) -> "sb1" | Sdown (M1,-3) -> "sb1c" | Sdown (M2,1) -> "sd2" | Sdown (M2,-1) -> "sd2c" | Sdown (M2,2) -> "ss2" | Sdown (M2,-2) -> "ss2c" | Sdown (M2,3) -> "sb2" | Sdown (M2,-3) -> "sb2c" | Neutralino N1 -> "neu1" | Neutralino N2 -> "neu2" | Neutralino N3 -> "neu3" | Neutralino N4 -> "neu4" | Neutralino N5 -> "neu5" | Chargino C1 -> "ch1+" | Chargino C1c -> "ch1-" | Chargino C2 -> "ch2+" | Chargino C2c -> "ch2-" | _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_string" let flavor_to_TeX = function | L 1 -> "e^-" | L (-1) -> "e^+" | L 2 -> "\\mu^-" | L (-2) -> "\\mu^+" | L 3 -> "\\tau^-" | L (-3) -> "\\tau^+" | N 1 -> "\\nu_e" | N (-1) -> "\\bar{\\nu}_e" | N 2 -> "\\nu_\\mu" | N (-2) -> "\\bar{\\nu}_\\mu" | N 3 -> "\\nu_\\tau" | N (-3) -> "\\bar{\\nu}_\\tau" | U 1 -> "u" | U (-1) -> "\\bar{u}" | U 2 -> "c" | U (-2) -> "\\bar{c}" | U 3 -> "t" | U (-3) -> "\\bar{t}" | D 1 -> "d" | D (-1) -> "\\bar{d}" | D 2 -> "s" | D (-2) -> "\\bar{s}" | D 3 -> "b" | D (-3) -> "\\bar{b}" | L _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_TeX: invalid lepton" | N _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_TeX: invalid neutrino" | U _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_TeX: invalid up type quark" | D _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_TeX: invalid down type quark" | Gl -> "g" | Gluino -> "\\widetilde{g}" | Ga -> "\\gamma" | Z -> "Z" | Wp -> "W^+" | Wm -> "W^-" | SHiggs S1 -> "S_1" | SHiggs S2 -> "S_2" | SHiggs S3 -> "S_3" | PHiggs P1 -> "P_1" | PHiggs P2 -> "P_2" | Hp -> "H^+" | Hm -> "H^-" | Slepton (M1,1) -> "\\widetilde{e}_1^-" | Slepton (M1,-1) -> "\\widetilde{e}_1^+" | Slepton (M1,2) -> "\\widetilde{\\mu}_1^-" | Slepton (M1,-2) -> "\\widetilde{\\mu}_1^+" | Slepton (M1,3) -> "\\widetilde{\\tau}_1^-" | Slepton (M1,-3) -> "\\widetilde{\\tau}_1^+" | Slepton (M2,1) -> "\\widetilde{e}_2^-" | Slepton (M2,-1) -> "\\widetilde{e}_2^+" | Slepton (M2,2) -> "\\widetilde{\\mu}_2^-" | Slepton (M2,-2) -> "\\widetilde{\\mu}_2^+" | Slepton (M2,3) -> "\\widetilde{\\tau}_2^-" | Slepton (M2,-3) -> "\\widetilde{\\tau}_2^+" | Sneutrino 1 -> "\\widetilde{\\nu}_e" | Sneutrino (-1) -> "\\widetilde{\\nu}_e^*" | Sneutrino 2 -> "\\widetilde{\\nu}_\\mu" | Sneutrino (-2) -> "\\widetilde{\\nu}_\\mu^*" | Sneutrino 3 -> "\\widetilde{\\nu}_\\tau" | Sneutrino (-3) -> "\\widetilde{\\nu}_\\tau^*" | Sup (M1,1) -> "\\widetilde{u}_1" | Sup (M1,-1) -> "\\widetilde{u}_1^*" | Sup (M1,2) -> "\\widetilde{c}_1" | Sup (M1,-2) -> "\\widetilde{c}_1^*" | Sup (M1,3) -> "\\widetilde{t}_1" | Sup (M1,-3) -> "\\widetilde{t}_1^*" | Sup (M2,1) -> "\\widetilde{u}_2" | Sup (M2,-1) -> "\\widetilde{u}_2^*" | Sup (M2,2) -> "\\widetilde{c}_2" | Sup (M2,-2) -> "\\widetilde{c}_2^*" | Sup (M2,3) -> "\\widetilde{t}_2" | Sup (M2,-3) -> "\\widetilde{t}_2^*" | Sdown (M1,1) -> "\\widetilde{d}_1" | Sdown (M1,-1) -> "\\widetilde{d}_1^*" | Sdown (M1,2) -> "\\widetilde{s}_1" | Sdown (M1,-2) -> "\\widetilde{s}_1^*" | Sdown (M1,3) -> "\\widetilde{b}_1" | Sdown (M1,-3) -> "\\widetilde{b}_1^*" | Sdown (M2,1) -> "\\widetilde{d}_2" | Sdown (M2,-1) -> "\\widetilde{d}_2^*" | Sdown (M2,2) -> "\\widetilde{s}_2" | Sdown (M2,-2) -> "\\widetilde{s}_2^*" | Sdown (M2,3) -> "\\widetilde{b}_2" | Sdown (M2,-3) -> "\\widetilde{b}_2^*" | Neutralino N1 -> "\\widetilde{\\chi}^0_1" | Neutralino N2 -> "\\widetilde{\\chi}^0_2" | Neutralino N3 -> "\\widetilde{\\chi}^0_3" | Neutralino N4 -> "\\widetilde{\\chi}^0_4" | Neutralino N5 -> "\\widetilde{\\chi}^0_5" | Slepton _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_TeX: invalid slepton" | Sneutrino _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_TeX: invalid sneutrino" | Sup _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_TeX: invalid up type squark" | Sdown _ -> invalid_arg "Modellib_NMSSM.NMSSM.flavor_to_TeX: invalid down type squark" | Chargino C1 -> "\\widetilde{\\chi}_1^+" | Chargino C1c -> "\\widetilde{\\chi}_1^-" | Chargino C2 -> "\\widetilde{\\chi}_2^+" | Chargino C2c -> "\\widetilde{\\chi}_2^-" let flavor_symbol = function | L g when g > 0 -> "l" ^ string_of_int g | L g -> "l" ^ string_of_int (abs g) ^ "b" | N g when g > 0 -> "n" ^ string_of_int g | N g -> "n" ^ string_of_int (abs g) ^ "b" | U g when g > 0 -> "u" ^ string_of_int g | U g -> "u" ^ string_of_int (abs g) ^ "b" | D g when g > 0 -> "d" ^ string_of_int g | D g -> "d" ^ string_of_int (abs g) ^ "b" | Gl -> "gl" | Ga -> "a" | Z -> "z" | Wp -> "wp" | Wm -> "wm" | Slepton (M1,g) when g > 0 -> "sl1" ^ string_of_int g | Slepton (M1,g) -> "sl1c" ^ string_of_int (abs g) | Slepton (M2,g) when g > 0 -> "sl2" ^ string_of_int g | Slepton (M2,g) -> "sl2c" ^ string_of_int (abs g) | Sneutrino g when g > 0 -> "sn" ^ string_of_int g | Sneutrino g -> "snc" ^ string_of_int (abs g) | Sup (M1,g) when g > 0 -> "su1" ^ string_of_int g | Sup (M1,g) -> "su1c" ^ string_of_int (abs g) | Sup (M2,g) when g > 0 -> "su2" ^ string_of_int g | Sup (M2,g) -> "su2c" ^ string_of_int (abs g) | Sdown (M1,g) when g > 0 -> "sd1" ^ string_of_int g | Sdown (M1,g) -> "sd1c" ^ string_of_int (abs g) | Sdown (M2,g) when g > 0 -> "sd2" ^ string_of_int g | Sdown (M2,g) -> "sd2c" ^ string_of_int (abs g) | Neutralino n -> "neu" ^ (string_of_neu n) | Chargino c when (int_of_char c) > 0 -> "cp" ^ string_of_char c | Chargino c -> "cm" ^ string_of_int (abs (int_of_char c)) | Gluino -> "sgl" | SHiggs s -> "h0" ^ (string_of_shiggs s) | PHiggs p -> "A0" ^ (string_of_phiggs p) | Hp -> "hp" | Hm -> "hm" let pdg = function | L g when g > 0 -> 9 + 2*g | L g -> - 9 + 2*g | N g when g > 0 -> 10 + 2*g | N g -> - 10 + 2*g | U g when g > 0 -> 2*g | U g -> 2*g | D g when g > 0 -> - 1 + 2*g | D g -> 1 + 2*g | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | SHiggs S1 -> 25 | SHiggs S2 -> 35 | SHiggs S3 -> 45 | PHiggs P1 -> 36 | PHiggs P2 -> 46 | Hp -> 37 | Hm -> (-37) | Slepton (M1,g) when g > 0 -> 1000009 + 2*g | Slepton (M1,g) -> - 1000009 + 2*g | Slepton (M2,g) when g > 0 -> 2000009 + 2*g | Slepton (M2,g) -> - 2000009 + 2*g | Sneutrino g when g > 0 -> 1000010 + 2*g | Sneutrino g -> - 1000010 + 2*g | Sup (M1,g) when g > 0 -> 1000000 + 2*g | Sup (M1,g) -> - 1000000 + 2*g | Sup (M2,g) when g > 0 -> 2000000 + 2*g | Sup (M2,g) -> - 2000000 + 2*g | Sdown (M1,g) when g > 0 -> 999999 + 2*g | Sdown (M1,g) -> - 999999 + 2*g | Sdown (M2,g) when g > 0 -> 1999999 + 2*g | Sdown (M2,g) -> - 1999999 + 2*g | Gluino -> 1000021 | Chargino C1 -> 1000024 | Chargino C1c -> (-1000024) | Chargino C2 -> 1000037 | Chargino C2c -> (-1000037) | Neutralino N1 -> 1000022 | Neutralino N2 -> 1000023 | Neutralino N3 -> 1000025 | Neutralino N4 -> 1000035 | Neutralino N5 -> 1000045 (* We must take care of the pdg numbers for the two different kinds of sfermions in the MSSM. The particle data group in its Monte Carlo particle numbering scheme takes only into account mixtures of the third generation squarks and the stau. For the other sfermions we will use the number of the lefthanded field for the lighter mixed state and the one for the righthanded for the heavier. Below are the official pdg numbers from the Particle Data Group. In order not to produce arrays with some million entries in the Fortran code for the masses and the widths we introduce our private pdg numbering scheme which only extends not too far beyond 42. Our private scheme then has the following pdf numbers (for the sparticles the subscripts $L/R$ and $1/2$ are taken synonymously): \begin{center} \renewcommand{\arraystretch}{1.2} \begin{tabular}{|r|l|l|}\hline $d$ & down-quark & 1 \\\hline $u$ & up-quark & 2 \\\hline $s$ & strange-quark & 3 \\\hline $c$ & charm-quark & 4 \\\hline $b$ & bottom-quark & 5 \\\hline $t$ & top-quark & 6 \\\hline\hline $e^-$ & electron & 11 \\\hline $\nu_e$ & electron-neutrino & 12 \\\hline $\mu^-$ & muon & 13 \\\hline $\nu_\mu$ & muon-neutrino & 14 \\\hline $\tau^-$ & tau & 15 \\\hline $\nu_\tau$ & tau-neutrino & 16 \\\hline\hline $g$ & gluon & (9) 21 \\\hline $\gamma$ & photon & 22 \\\hline $Z^0$ & Z-boson & 23 \\\hline $W^+$ & W-boson & 24 \\\hline\hline $h^0$ & light Higgs boson & 25 \\\hline $H^0$ & heavy Higgs boson & 35 \\\hline $A^0$ & pseudoscalar Higgs & 36 \\\hline $H^+$ & charged Higgs & 37 \\\hline\hline $\tilde{d}_L$ & down-squark 1 & 41 \\\hline $\tilde{u}_L$ & up-squark 1 & 42 \\\hline $\tilde{s}_L$ & strange-squark 1 & 43 \\\hline $\tilde{c}_L$ & charm-squark 1 & 44 \\\hline $\tilde{b}_L$ & bottom-squark 1 & 45 \\\hline $\tilde{t}_L$ & top-squark 1 & 46 \\\hline $\tilde{d}_R$ & down-squark 2 & 47 \\\hline $\tilde{u}_R$ & up-squark 2 & 48 \\\hline $\tilde{s}_R$ & strange-squark 2 & 49 \\\hline $\tilde{c}_R$ & charm-squark 2 & 50 \\\hline $\tilde{b}_R$ & bottom-squark 2 & 51 \\\hline $\tilde{t}_R$ & top-squark 2 & 52 \\\hline\hline $\tilde{e}_L$ & selectron 1 & 53 \\\hline $\tilde{\nu}_{e,L}$ & electron-sneutrino & 54 \\\hline $\tilde{\mu}_L$ & smuon 1 & 55 \\\hline $\tilde{\nu}_{\mu,L}$ & muon-sneutrino & 56 \\\hline $\tilde{\tau}_L$ & stau 1 & 57 \\\hline $\tilde{\nu}_{\tau,L}$ & tau-sneutrino & 58 \\\hline $\tilde{e}_R$ & selectron 2 & 59 \\\hline $\tilde{\mu}_R$ & smuon 2 & 61 \\\hline $\tilde{\tau}_R$ & stau 2 & 63 \\\hline\hline $\tilde{g}$ & gluino & 64 \\\hline $\tilde{\chi}^0_1$ & neutralino 1 & 65 \\\hline $\tilde{\chi}^0_2$ & neutralino 2 & 66 \\\hline $\tilde{\chi}^0_3$ & neutralino 3 & 67 \\\hline $\tilde{\chi}^0_4$ & neutralino 4 & 68 \\\hline $\tilde{\chi}^0_5$ & neutralino 5 & 69 \\\hline $\tilde{\chi4}^+_1$ & chargino 1 & 70 \\\hline $\tilde{\chi}^+_2$ & chargino 2 & 71 \\\hline\hline $a$ & pseudoscalar & 72 \\\hline $s$ & scalar singlet & 73 \\\hline $\tilde{G}$ & gravitino & -- \\\hline\hline \end{tabular} \end{center} *) let pdg_mw = function | L g when g > 0 -> 9 + 2*g | L g -> - 9 + 2*g | N g when g > 0 -> 10 + 2*g | N g -> - 10 + 2*g | U g when g > 0 -> 2*g | U g -> 2*g | D g when g > 0 -> - 1 + 2*g | D g -> 1 + 2*g | Gl -> 21 | Ga -> 22 | Z -> 23 | Wp -> 24 | Wm -> (-24) | SHiggs S1 -> 25 | SHiggs S2 -> 35 | PHiggs P1 -> 36 | Hp -> 37 | Hm -> (-37) | Sup (M1,g) when g > 0 -> 40 + 2*g | Sup (M1,g) -> - 40 + 2*g | Sup (M2,g) when g > 0 -> 46 + 2*g | Sup (M2,g) -> - 46 + 2*g | Sdown (M1,g) when g > 0 -> 39 + 2*g | Sdown (M1,g) -> - 39 + 2*g | Sdown (M2,g) when g > 0 -> 45 + 2*g | Sdown (M2,g) -> - 45 + 2*g | Slepton (M1,g) when g > 0 -> 51 + 2*g | Slepton (M1,g) -> - 51 + 2*g | Slepton (M2,g) when g > 0 -> 57 + 2*g | Slepton (M2,g) -> - 57 + 2*g | Sneutrino g when g > 0 -> 52 + 2*g | Sneutrino g -> - 52 + 2*g | Gluino -> 64 | Chargino C1 -> 70 | Chargino C1c -> (-70) | Chargino C2 -> 71 | Chargino C2c -> (-71) | Neutralino N1 -> 65 | Neutralino N2 -> 66 | Neutralino N3 -> 67 | Neutralino N4 -> 68 | Neutralino N5 -> 69 | PHiggs P2 -> 72 | SHiggs S3 -> 73 let mass_symbol f = "mass(" ^ string_of_int (abs (pdg_mw f)) ^ ")" let width_symbol f = "width(" ^ string_of_int (abs (pdg_mw f)) ^ ")" let conj_symbol = function | false, str -> str | true, str -> str ^ "_c" let constant_symbol = function | E -> "e" | G -> "g" | Mu -> "mu" | Lambda -> "lambda" | G_Z -> "gz" | Q_lepton -> "qlep" | Q_up -> "qup" | Q_down -> "qdwn" | Q_charg -> "qchar" | G_NC_lepton -> "gnclep" | G_NC_neutrino -> "gncneu" | G_NC_up -> "gncup" | G_NC_down -> "gncdwn" | G_CC -> "gcc" | G_CCQ (vc,g1,g2) -> conj_symbol (vc, "g_ccq" ) ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ ")" | I_Q_W -> "iqw" | I_G_ZWW -> "igzww" | G_WWWW -> "gw4" | G_ZZWW -> "gzzww" | G_PZWW -> "gpzww" | G_PPWW -> "gppww" | G_GH4_ZZPP (p1,p2) -> "g_ZZA0A0(" ^ string_of_phiggs p1 ^ "," ^ string_of_phiggs p2 ^ ")" | G_GH4_ZZSS (s1,s2) -> "g_ZZh0h0(" ^ string_of_shiggs s1 ^ "," ^ string_of_shiggs s2 ^ ")" | G_GH4_ZZCC -> "g_zzhphm" | G_GH4_GaGaCC -> "g_AAhphm" | G_GH4_ZGaCC -> "g_zAhphm" | G_GH4_WWCC -> "g_wwhphm" | G_GH4_WWPP (p1,p2) -> "g_WWA0A0(" ^ string_of_phiggs p1 ^ "," ^ string_of_phiggs p2 ^ ")" | G_GH4_WWSS (s1,s2) -> "g_WWh0h0(" ^ string_of_shiggs s1 ^ "," ^ string_of_shiggs s2 ^ ")" | G_GH4_ZWSC s -> "g_ZWhph0(" ^ string_of_shiggs s ^")" | G_GH4_GaWSC s -> "g_AWhph0(" ^ string_of_shiggs s ^")" | G_GH4_ZWPC p -> "g_ZWhpA0(" ^ string_of_phiggs p ^")" | G_GH4_GaWPC p -> "g_AWhpA0(" ^ string_of_phiggs p ^")" | G_CICIS (n1,n2,s) -> "g_neuneuh0(" ^ string_of_neu n1 ^ "," ^ string_of_neu n2 ^ "," ^ string_of_shiggs s ^ ")" | G_CICIP (n1,n2,p) -> "g_neuneuA0(" ^ string_of_neu n1 ^ "," ^ string_of_neu n2 ^ "," ^ string_of_phiggs p ^ ")" | G_H3_SCC s -> "g_h0hphm(" ^ string_of_shiggs s ^ ")" | G_H3_SPP (s,p1,p2) -> "g_h0A0A0(" ^ string_of_shiggs s ^ "," ^ string_of_phiggs p1 ^ "," ^ string_of_phiggs p2 ^ ")" | G_H3_SSS (s1,s2,s3) -> "g_h0h0h0(" ^ string_of_shiggs s1 ^ "," ^ string_of_shiggs s2 ^ "," ^ string_of_shiggs s3 ^ ")" | G_CSC (c1,c2,s) -> "g_chchh0(" ^ string_of_char c1 ^ "," ^ string_of_char c2 ^ "," ^ string_of_shiggs s ^")" | G_CPC (c1,c2,p) -> "g_chchA0(" ^ string_of_char c1 ^ "," ^ string_of_char c2 ^ "," ^ string_of_phiggs p ^")" | G_YUK_FFS (f1,f2,s) -> "g_yuk_h0_" ^ string_of_fermion_type f1 ^ string_of_fermion_type f2 ^ "(" ^ string_of_shiggs s ^ "," ^ string_of_fermion_gen f1 ^ ")" | G_YUK_FFP (f1,f2,p) -> "g_yuk_A0_" ^ string_of_fermion_type f1 ^ string_of_fermion_type f2 ^ "(" ^ string_of_phiggs p ^ "," ^ string_of_fermion_gen f1 ^ ")" | G_YUK_LCN g -> "g_yuk_hp_ln(" ^ string_of_int g ^ ")" | G_NWC (n,c) -> "g_nwc(" ^ string_of_char c ^ "," ^ string_of_neu n ^ ")" | G_CWN (c,n) -> "g_cwn(" ^ string_of_char c ^ "," ^ string_of_neu n ^ ")" | G_SLSNW (vc,g,m) -> conj_symbol (vc, "g_wslsn") ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m ^ ")" | G_NZN (n1,n2) -> "g_zneuneu(" ^ string_of_neu n1 ^ "," ^ string_of_neu n2 ^ ")" | G_CZC (c1,c2) -> "g_zchch(" ^ string_of_char c1 ^ "," ^ string_of_char c2 ^ ")" | Gs -> "gs" | G_YUK_UCD (n,m) -> "g_yuk_hp_ud(" ^ string_of_int n ^ "," ^ string_of_int m ^ ")" | G_YUK_DCU (n,m) -> "g_yuk_hm_du(" ^ string_of_int n ^ "," ^ string_of_int m ^ ")" | G_YUK_N (vc,f,n,sf,m) -> conj_symbol (vc, "g_yuk_neu_" ^ string_of_fermion_type f ^ string_of_sff sf) ^ "(" ^ string_of_fermion_gen f ^ "," ^ string_of_neu n ^ "," ^ string_of_sfm m ^ ")" | G_YUK_G (vc,f,sf,m) -> conj_symbol (vc, "g_yuk_gluino_" ^ string_of_fermion_type f ^ string_of_sff sf) ^ "(" ^ string_of_fermion_gen f ^ "," ^ string_of_sfm m ^ ")" | G_YUK_C (vc,f,c,sf,m) -> conj_symbol (vc, "g_yuk_char_" ^ string_of_fermion_type f ^ string_of_sff sf) ^ "(" ^ string_of_fermion_gen f ^ "," ^ string_of_char c ^ "," ^ string_of_sfm m ^ ")" | G_YUK_Q (vc,g1,f,c,sf,m) -> conj_symbol (vc, "g_yuk_char_" ^ string_of_fermion_type f ^ string_of_sff sf) ^ "(" ^ string_of_int g1 ^ "," ^ string_of_fermion_gen f ^ "," ^ string_of_char c ^ "," ^ string_of_sfm m ^ ")" | G_WPSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "g_wA_susd") ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_WZSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "g_wz_susd") ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_GH_ZSP (s,p) -> "g_zh0a0(" ^ string_of_shiggs s ^ "," ^ string_of_phiggs p ^ ")" | G_GH_WSC s -> "g_Whph0(" ^ string_of_shiggs s ^ ")" | G_GH_WPC p -> "g_WhpA0(" ^ string_of_phiggs p ^ ")" | G_GH_ZZS s -> "g_ZZh0(" ^ string_of_shiggs s ^ ")" | G_GH_WWS s -> "g_WWh0(" ^ string_of_shiggs s ^ ")" | G_GLUGLUH0 s -> "g_glugluh0(" ^ string_of_shiggs s ^ ")" | G_GLUGLUA0 p -> "g_gluglua0(" ^ string_of_phiggs p ^ ")" | G_GH_ZCC -> "g_Zhmhp" | G_GH_GaCC -> "g_Ahmhp" | G_ZSF (f,g,m1,m2) -> "g_z" ^ string_of_sff f ^ string_of_sff f ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_HSNSL (vc,g,m) -> conj_symbol (vc, "g_hp_sl" ^ string_of_sfm m ^ "sn1") ^ "(" ^ string_of_int g ^ ")" | G_GlGlSQSQ -> "g_gg_sqsq" | G_PPSFSF f -> "g_AA_" ^ string_of_sff f ^ string_of_sff f | G_ZZSFSF (f,g,m1,m2) -> "g_zz_" ^ string_of_sff f ^ string_of_sff f ^ "(" ^ string_of_int g ^","^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_ZPSFSF (f,g,m1,m2) -> "g_zA_" ^ string_of_sff f ^ string_of_sff f ^ "(" ^ string_of_int g ^","^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_GlPSQSQ -> "g_gA_sqsq" | G_GlZSFSF (f,g,m1,m2) -> "g_gz_" ^ string_of_sff f ^ string_of_sff f ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_GlWSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "g_gw_susd") ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_SS -> "gs**2" | I_G_S -> "igs" | G_NHC (vc,n,c) -> conj_symbol(vc,"g_neuhmchar") ^ "(" ^ string_of_neu n ^ "," ^ string_of_char c ^")" | G_WWSFSF (f,g,m1,m2) -> "g_ww_" ^ string_of_sff f ^ string_of_sff f ^"(" ^ string_of_int g ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" | G_WPSLSN (vc,g,m) -> conj_symbol (vc, "g_wA_slsn") ^ "(" ^ string_of_int g ^ "," ^ string_of_sfm m ^ ")" | G_WZSLSN (vc,g,m) -> conj_symbol (vc, "g_wz_slsn") ^"("^ string_of_int g ^ "," ^ string_of_sfm m ^ ")" | G_SFSFS (s,f,g,m1,m2) -> "g_h0_"^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "(" ^ string_of_shiggs s ^ "," ^ string_of_int g ^ ")" | G_SFSFP (p,f,g,m1,m2) -> "g_A0_"^ string_of_sff f ^ string_of_sfm m1 ^ string_of_sff f ^ string_of_sfm m2 ^ "(" ^ string_of_phiggs p ^ "," ^ string_of_int g ^ ")" | G_HSUSD (vc,m1,m2,g1,g2) -> conj_symbol (vc, "g_hp_su" ^ string_of_sfm m1 ^ "sd" ^ string_of_sfm m2 )^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^")" | G_WSQ (vc,g1,g2,m1,m2) -> conj_symbol (vc, "g_wsusd") ^ "(" ^ string_of_int g1 ^ "," ^ string_of_int g2 ^ "," ^ string_of_sfm m1 ^ "," ^ string_of_sfm m2 ^ ")" end Index: trunk/omega/src/UFO_targets.ml =================================================================== --- trunk/omega/src/UFO_targets.ml (revision 8274) +++ trunk/omega/src/UFO_targets.ml (revision 8275) @@ -1,1657 +1,913 @@ -(* uFO_targets.ml -- +(* UFO_targets.ml -- Copyright (C) 1999-2017 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) let (@@) f g x = f (g x) -(* \thocwmodulesection{Dirac $\gamma$-matrices} *) - -module type Dirac = - sig - - (* Matrices with complex rational entries. *) - type qc = Algebra.QC.t - type t = qc array array - - (* Complex rational constants. *) - val zero : qc - val one : qc - val minus_one : qc - val i : qc - val minus_i : qc - - (* Basic $\gamma$-matrices. *) - val unit : t - val null : t - val gamma0 : t - val gamma1 : t - val gamma2 : t - val gamma3 : t - val gamma5 : t - - (* $(\gamma_0,\gamma_1,\gamma_2,\gamma_3)$ *) - val gamma : t array - - (* Charge conjugation *) - val cc : t - - (* Algebraic operations on $\gamma$-matrices *) - val neg : t -> t - val add : t -> t -> t - val sub : t -> t -> t - val mul : t -> t -> t - val times : qc -> t -> t - val transpose : t -> t - val adjoint : t -> t - val conj : t -> t - val product : t list -> t - - (* Unit tests *) - val test_suite : OUnit.test - end - -(* Chiral representation *) -module Dirac : Dirac = - struct - - module Q = Algebra.Q - module QC = Algebra.QC - - type qc = QC.t - type t = qc array array - - let zero = QC.null - let one = QC.one - let minus_one = QC.neg one - let i = QC.make Q.null Q.unit - let minus_i = QC.conj i - - let null = - [| [| zero; zero; zero; zero |]; - [| zero; zero; zero; zero |]; - [| zero; zero; zero; zero |]; - [| zero; zero; zero; zero |] |] - - let unit = - [| [| one; zero; zero; zero |]; - [| zero; one; zero; zero |]; - [| zero; zero; one; zero |]; - [| zero; zero; zero; one |] |] - - let gamma0 = - [| [| zero; zero; one; zero |]; - [| zero; zero; zero; one |]; - [| one; zero; zero; zero |]; - [| zero; one; zero; zero |] |] - - let gamma1 = - [| [| zero; zero; zero; one |]; - [| zero; zero; one; zero |]; - [| zero; minus_one; zero; zero |]; - [| minus_one; zero; zero; zero |] |] - - let gamma2 = - [| [| zero; zero; zero; minus_i |]; - [| zero; zero; i; zero |]; - [| zero; i; zero; zero |]; - [| minus_i; zero; zero; zero |] |] - - let gamma3 = - [| [| zero; zero; one; zero |]; - [| zero; zero; zero; minus_one |]; - [| minus_one; zero; zero; zero |]; - [| zero; one; zero; zero |] |] - - let gamma5 = - [| [| minus_one; zero; zero; zero |]; - [| zero; minus_one; zero; zero |]; - [| zero; zero; one; zero |]; - [| zero; zero; zero; one |] |] - - let gamma = - [| gamma0; gamma1; gamma2; gamma3 |] - - let cc = - [| [| zero; minus_one; zero; zero |]; - [| one; zero; zero; zero |]; - [| zero; zero; zero; one |]; - [| zero; zero; minus_one; zero |] |] - - let neg g = - let g' = Array.make_matrix 4 4 zero in - for i = 0 to 3 do - for j = 0 to 3 do - g'.(i).(j) <- QC.neg g.(i).(j) - done - done; - g' - - let add g1 g2 = - let g12 = Array.make_matrix 4 4 zero in - for i = 0 to 3 do - for j = 0 to 3 do - g12.(i).(j) <- QC.add g1.(i).(j) g2.(i).(j) - done - done; - g12 - - let sub g1 g2 = - let g12 = Array.make_matrix 4 4 zero in - for i = 0 to 3 do - for j = 0 to 3 do - g12.(i).(j) <- QC.sub g1.(i).(j) g2.(i).(j) - done - done; - g12 - - let mul g1 g2 = - let g12 = Array.make_matrix 4 4 zero in - for i = 0 to 3 do - for k = 0 to 3 do - for j = 0 to 3 do - g12.(i).(k) <- QC.add g12.(i).(k) (QC.mul g1.(i).(j) g2.(j).(k)) - done - done - done; - g12 - - let times q g = - let g' = Array.make_matrix 4 4 zero in - for i = 0 to 3 do - for j = 0 to 3 do - g'.(i).(j) <- QC.mul q g.(i).(j) - done - done; - g' - - let transpose g = - let g' = Array.make_matrix 4 4 zero in - for i = 0 to 3 do - for j = 0 to 3 do - g'.(i).(j) <- g.(j).(i) - done - done; - g' - - let adjoint g = - let g' = Array.make_matrix 4 4 zero in - for i = 0 to 3 do - for j = 0 to 3 do - g'.(i).(j) <- QC.conj g.(j).(i) - done - done; - g' - - let conj g = - let g' = Array.make_matrix 4 4 zero in - for i = 0 to 3 do - for j = 0 to 3 do - g'.(i).(j) <- QC.conj g.(i).(j) - done - done; - g' - - let product glist = - List.fold_right mul glist unit - - open OUnit - - let two = QC.make (Q.make 2 1) Q.null - let half = QC.make (Q.make 1 2) Q.null - let two_unit = times two unit - - let ac_lhs mu nu = - add (mul gamma.(mu) gamma.(nu)) (mul gamma.(nu) gamma.(mu)) - - let ac_rhs mu nu = - if mu = nu then - if mu = 0 then - two_unit - else - neg two_unit - else - null - - let test_ac mu nu = - (ac_lhs mu nu) = (ac_rhs mu nu) - - let ac_lhs_all = - let lhs = Array.make_matrix 4 4 null in - for mu = 0 to 3 do - for nu = 0 to 3 do - lhs.(mu).(nu) <- ac_lhs mu nu - done - done; - lhs - - let ac_rhs_all = - let rhs = Array.make_matrix 4 4 null in - for mu = 0 to 3 do - for nu = 0 to 3 do - rhs.(mu).(nu) <- ac_rhs mu nu - done - done; - rhs - - let dump2 lhs rhs = - for i = 0 to 3 do - for j = 0 to 3 do - Printf.printf - " i = %d, j =%d: %s + %s*I | %s + %s*I\n" - i j - (Q.to_string (QC.real lhs.(i).(j))) - (Q.to_string (QC.imag lhs.(i).(j))) - (Q.to_string (QC.real rhs.(i).(j))) - (Q.to_string (QC.imag rhs.(i).(j))) - done - done - - let dump2_all lhs rhs = - for mu = 0 to 3 do - for nu = 0 to 3 do - Printf.printf "mu = %d, nu =%d: \n" mu nu; - dump2 lhs.(mu).(nu) rhs.(mu).(nu) - done - done - - let anticommute = - "anticommutation relations" >:: - (fun () -> - assert_bool - "" - (if ac_lhs_all = ac_rhs_all then - true - else - begin - dump2_all ac_lhs_all ac_rhs_all; - false - end)) - - let equal_or_dump2 lhs rhs = - if lhs = rhs then - true - else - begin - dump2 lhs rhs; - false - end - - let gamma5_def = - "gamma5" >:: - (fun () -> - assert_bool - "definition" - (equal_or_dump2 - gamma5 - (times i (product [gamma0; gamma1; gamma2; gamma3])))) - - let self_adjoint = - "(anti)selfadjointness" >::: - [ "gamma0" >:: - (fun () -> - assert_bool "self" (equal_or_dump2 gamma0 (adjoint gamma0))); - "gamma1" >:: - (fun () -> - assert_bool "anti" (equal_or_dump2 gamma1 (neg (adjoint gamma1)))); - "gamma2" >:: - (fun () -> - assert_bool "anti" (equal_or_dump2 gamma2 (neg (adjoint gamma2)))); - "gamma3" >:: - (fun () -> - assert_bool "anti" (equal_or_dump2 gamma3 (neg (adjoint gamma3)))); - "gamma5" >:: - (fun () -> - assert_bool "self" (equal_or_dump2 gamma5 (adjoint gamma5))) ] - - let cc_inv = neg cc - - let cc_gamma g = - equal_or_dump2 (neg (transpose g)) (product [cc; g; cc_inv]) - - let charge_conjugation = - "charge conjugation" >::: - [ "inverse" >:: - (fun () -> - assert_bool "" (equal_or_dump2 (mul cc cc_inv) unit)); - "gamma0" >:: (fun () -> assert_bool "" (cc_gamma gamma0)); - "gamma1" >:: (fun () -> assert_bool "" (cc_gamma gamma1)); - "gamma2" >:: (fun () -> assert_bool "" (cc_gamma gamma2)); - "gamma3" >:: (fun () -> assert_bool "" (cc_gamma gamma3)); - "gamma5" >:: - (fun () -> - assert_bool "" (equal_or_dump2 (transpose gamma5) - (product [cc; gamma5; cc_inv]))) - ] - - let test_suite = - "Dirac Matrices" >::: - [anticommute; - gamma5_def; - self_adjoint; - charge_conjugation] - - end - (* \thocwmodulesection{Generating Code for UFO Lorentz Structures} *) (* O'Caml before 4.02 had a module typing bug that forces us to put this definition outside [Lorentz_Fusion]. *) module Q = Algebra.Q module QC = Algebra.QC -module A = UFOx.Lorentz_Atom -module D = Dirac - -module type Lorentz_Fusion = - sig - - (* Just like [UFOx.Lorentz_Atom.dirac], but without the Dirac matrix indices. *) - type dirac = private - | Gamma5 - | ProjM - | ProjP - | Gamma of int - | Sigma of int * int - | C - - (* A sandwich of a string of $\gamma$-matrices. [bra] and [ket] are - positions of fields in the vertex, \emph{not} spinor indices. *) - type dirac_string = private - { bra : int; - ket : int; - gammas : dirac list } - - (* The Lorentz indices appearing in a term are either negative - internal summation indices or positive external polarization - indices. Note that the external - indices are not really indices, but denote the position - of the particle in the vertex. *) - type 'a term = (* private *) - { indices : int list; - atom : 'a } - - (* Split the list of indices into summation and polarization indices. *) - val classify_indices : int list -> int list * int list - - (* Replace the atom keeping the associated indices. *) - val map_atom : ('a -> 'b) -> 'a term -> 'b term - - (* A contraction consists of a (possibly empty) product of - Dirac strings and a (possibly empty) product of Lorentz - tensors with a rational coefficient. The summation - indices could be recovered by scanning the [term]s, but - we maintain a list for efficiency. *) - type contraction = private - { coeff : Q.t; - dirac : dirac_string term list; - vector : UFOx.Lorentz_Atom.vector term list } - - (* A sum. *) - type t = contraction list - - (* [parse spins lorentz] uses the [spins] to parse the - UFO [lorentz] structure as a list of [contraction]s. *) - val parse : Coupling.lorentz list -> UFOx.Lorentz.t -> t - - (* Create a readable representation for debugging and - documenting generated code. *) - val to_string : t -> string - - (* Punting \ldots *) - val dummy : t - - (* More debugging and documenting. *) - val dirac_string_to_string : dirac_string -> string - - (* [dirac_string_to_matrix substitute ds] take a string - of $\gamma$-matrices [ds], applies [substitute] to - the indices and returns the product as a matrix. *) - val dirac_string_to_matrix : (int -> int) -> dirac_string -> D.t - - end - -module Lorentz_Fusion : Lorentz_Fusion = - struct - - (* Take a [A.t list] and return the corresponding pair - [A.dirac list * A.vector list], without preserving the - order (currently, the order is reversed). *) - let split_atoms atoms = - List.fold_left - (fun (d, v) -> function - | A.Vector v' -> (d, v' :: v) - | A.Dirac d' -> (d' :: d, v)) - ([], []) atoms - - (* Just like [UFOx.Lorentz_Atom.dirac], but without the Dirac matrix indices. *) - type dirac = - | Gamma5 - | ProjM - | ProjP - | Gamma of int - | Sigma of int * int - | C - - (* A sandwich of a string of $\gamma$-matrices. [bra] and [ket] are - positions of fields in the vertex. *) - type dirac_string = - { bra : int; - ket : int; - gammas : dirac list } - - (* [dirac_string bind ds] applies the mapping [bind] to the indices - of $\gamma_\mu$ and~$\sigma_{\mu\nu}$ and multiplies the resulting - matrices in order using complex rational arithmetic. *) - module type To_Matrix = - sig - val dirac_string : (int -> int) -> dirac_string -> D.t - end - - module To_Matrix : To_Matrix = - struct - - let half = QC.make (Q.make 1 2) Q.null - let half_i = QC.make Q.null (Q.make 1 2) - - let gamma_L = D.times half (D.sub D.unit D.gamma5) - let gamma_R = D.times half (D.add D.unit D.gamma5) - - let sigma = Array.make_matrix 4 4 D.null - let () = - for mu = 0 to 3 do - for nu = 0 to 3 do - sigma.(mu).(nu) <- - D.times - half_i - (D.sub - (D.mul D.gamma.(mu) D.gamma.(nu)) - (D.mul D.gamma.(nu) D.gamma.(mu))) - done - done - - let dirac bind_indices = function - | Gamma5 -> D.gamma5 - | ProjM -> gamma_L - | ProjP -> gamma_R - | Gamma (mu) -> D.gamma.(bind_indices mu) - | Sigma (mu, nu) -> sigma.(bind_indices mu).(bind_indices nu) - | C -> D.cc - - let dirac_string bind_indices ds = - D.product (List.map (dirac bind_indices) ds.gammas) - - end - - let dirac_string_to_matrix = To_Matrix.dirac_string - - (* The Lorentz indices appearing in a term are either negative - internal summation indices or positive external polarization - indices. Note that the external - indices are not really indices, but denote the position - of the particle in the vertex. *) - type 'a term = - { indices : int list; - atom : 'a } - - let map_atom f term = - { term with atom = f term.atom } - - (* Return a pair of lists: first the (negative) summation indices, - second the (positive) external indices. *) - let classify_indices ilist = - List.partition - (fun i -> - if i < 0 then - true - else if i > 0 then - false - else - invalid_arg "classify_indices") - ilist - - (* A contraction consists of a (possibly empty) product of - Dirac strings and a (possibly empty) product of Lorentz - tensors with a rational coefficient. The summation - indices could be recovered by scanning the [term]s, but - we maintain a list for efficiency. *) - type contraction = - { coeff : Q.t; - dirac : dirac_string term list; - vector : A.vector term list } - - type t = contraction list - - let dirac_of_atom = function - | A.Identity (_, _) -> [] - | A.C (_, _) -> [C] - | A.Gamma5 (_, _) -> [Gamma5] - | A.ProjP (_, _) -> [ProjP] - | A.ProjM (_, _) -> [ProjM] - | A.Gamma (mu, _, _) -> [Gamma mu] - | A.Sigma (mu, nu, _, _) -> [Sigma (mu, nu)] - - let dirac_indices = function - | A.Identity (i, j) | A.C (i, j) - | A.Gamma5 (i, j) | A.ProjP (i, j) | A.ProjM (i, j) - | A.Gamma (_, i, j) | A.Sigma (_, _, i, j) -> (i, j) - - let rec scan_for_dirac_string stack = function - - | [] -> - (* We're done with this pass. There must be - no leftover atoms on the [stack] of spinor atoms, - but we'll check this in the calling function. *) - (None, List.rev stack) - - | atom :: atoms -> - let i, j = dirac_indices atom in - if i > 0 then - if j > 0 then - (* That's an atomic Dirac string. Collect - all atoms for further processing. *) - (Some { bra = i; ket = j; gammas = dirac_of_atom atom}, - List.rev_append stack atoms) - else - (* That's the start of a new Dirac string. Search - for the remaining elements, not forgetting matrices - that we might pushed on the [stack] earlier. *) - collect_dirac_string - i j (dirac_of_atom atom) [] (List.rev_append stack atoms) - else - (* The interior of a Dirac string. Push it on the - stack until we find the start. *) - scan_for_dirac_string (atom :: stack) atoms - - (* Complete the string starting with [i] and the current summation - index [j]. *) - and collect_dirac_string i j rev_ds stack = function - - | [] -> - (* We have consumed all atoms without finding - the end of the string. *) - invalid_arg "collect_dirac_string: open string" - - | atom :: atoms -> - let i', j' = dirac_indices atom in - if i' = j then - if j' > 0 then - (* Found the conclusion. Collect - all atoms on the [stack] for further processing. *) - (Some { bra = i; ket = j'; - gammas = List.rev_append rev_ds (dirac_of_atom atom)}, - List.rev_append stack atoms) - else - (* Found the continuation. Pop the stack of open indices, - since we're looking for a new one. *) - collect_dirac_string - i j' (dirac_of_atom atom @ rev_ds) [] (List.rev_append stack atoms) - else - (* Either the start of another Dirac string or a - non-matching continuation. Push it on the - stack until we're done with the current one. *) - collect_dirac_string i j rev_ds (atom :: stack) atoms - - let dirac_string_of_dirac_atoms atoms = - scan_for_dirac_string [] atoms - - let rec dirac_strings_of_dirac_atoms' rev_ds atoms = - match dirac_string_of_dirac_atoms atoms with - | (None, []) -> List.rev rev_ds - | (None, _) -> invalid_arg "dirac_string_of_dirac_atoms: leftover atoms" - | (Some ds, atoms) -> dirac_strings_of_dirac_atoms' (ds :: rev_ds) atoms - - let dirac_strings_of_dirac_atoms atoms = - dirac_strings_of_dirac_atoms' [] atoms - - let indices_of_vector = function - | A.Epsilon (mu1, mu2, mu3, mu4) -> [mu1; mu2; mu3; mu4] - | A.Metric (mu1, mu2) -> [mu1; mu2] - | A.P (mu, n) -> - if n > 0 then - [mu] - else - invalid_arg "indices_of_vector: invalid momentum" - - let classify_vector atom = - { indices = indices_of_vector atom; - atom } - - let indices_of_dirac = function - | Gamma5 | ProjM | ProjP | C -> [] - | Gamma (mu) -> [mu] - | Sigma (mu, nu) -> [mu; nu] - - let indices_of_dirac_string ds = - ThoList.flatmap indices_of_dirac ds.gammas - - let classify_dirac atom = - { indices = indices_of_dirac_string atom; - atom } - - let contraction_of_lorentz_atoms (atoms, coeff) = - let dirac_atoms, vector_atoms = split_atoms atoms in - let dirac = - List.map classify_dirac (dirac_strings_of_dirac_atoms dirac_atoms) - and vector = - List.map classify_vector vector_atoms in - { coeff; dirac; vector } - - type redundancy = - | Trace of int - | Replace of int * int - - let rec redundant_metric' rev_atoms = function - | [] -> (None, List.rev rev_atoms) - | { atom = A.Metric (mu, nu) } as atom :: atoms -> - if mu < 1 then - if nu = mu then - (Some (Trace mu), List.rev_append rev_atoms atoms) - else - (Some (Replace (mu, nu)), List.rev_append rev_atoms atoms) - else if nu < 0 then - (Some (Replace (nu, mu)), List.rev_append rev_atoms atoms) - else - redundant_metric' (atom :: rev_atoms) atoms - | { atom = (A.Epsilon (_, _, _, _ ) | A.P (_, _) ) } as atom :: atoms -> - redundant_metric' (atom :: rev_atoms) atoms - - let redundant_metric atoms = - redundant_metric' [] atoms - - (* Substitude any occurance of the index [mu] by the index [nu]: *) - let substitute_index_vector1 mu nu = function - | A.Epsilon (mu1, mu2, mu3, mu4) as eps -> - if mu = mu1 then - A.Epsilon (nu, mu2, mu3, mu4) - else if mu = mu2 then - A.Epsilon (mu1, nu, mu3, mu4) - else if mu = mu3 then - A.Epsilon (mu1, mu2, nu, mu4) - else if mu = mu4 then - A.Epsilon (mu1, mu2, mu3, nu) - else - eps - | A.Metric (mu1, mu2) as g -> - if mu = mu1 then - A.Metric (nu, mu2) - else if mu = mu2 then - A.Metric (mu1, nu) - else - g - | A.P (mu1, n) as p -> - if mu = mu1 then - A.P (nu, n) - else - p - - let remove a alist = - List.filter ((<>) a) alist - - let substitute_index1 mu nu mu1 = - if mu = mu1 then - nu - else - mu1 - - let substitute_index mu nu indices = - List.map (substitute_index1 mu nu) indices - - (* This assumes that [mu] is a summation index and - [nu] is a polarization index. *) - let substitute_index_vector mu nu vectors = - List.map - (fun v -> - { indices = substitute_index mu nu v.indices; - atom = substitute_index_vector1 mu nu v.atom }) - vectors - - (* Substitude any occurance of the index [mu] by the index [nu]: *) - let substitute_index_dirac1 mu nu = function - | (Gamma5 | ProjM | ProjP | C) as g -> g - | Gamma (mu1) as g -> - if mu = mu1 then - Gamma (nu) - else - g - | Sigma (mu1, mu2) as g -> - if mu = mu1 then - Sigma (nu, mu2) - else if mu = mu2 then - Sigma (mu1, nu) - else - g - - (* This assumes that [mu] is a summation index and - [nu] is a polarization index. *) - let substitute_index_dirac mu nu dirac_strings = - List.map - (fun ds -> - { indices = substitute_index mu nu ds.indices; - atom = { ds.atom with - gammas = - List.map - (substitute_index_dirac1 mu nu) - ds.atom.gammas } } ) - dirac_strings - - let trace_metric = Q.make 4 1 - - (* FIXME: can this be made typesafe by mapping to a - type that \emph{only} contains [P] and [Epsilon]? *) - let rec compress_metrics c = - match redundant_metric c.vector with - | None, _ -> c - | Some (Trace mu), vector' -> - compress_metrics - { coeff = Q.mul trace_metric c.coeff; - dirac = c.dirac; - vector = vector' } - | Some (Replace (mu, nu)), vector' -> - compress_metrics - { coeff = c.coeff; - dirac = substitute_index_dirac mu nu c.dirac; - vector = substitute_index_vector mu nu vector' } - - - let dummy = [] - - let parse1 spins atom = - compress_metrics (contraction_of_lorentz_atoms atom) - - let parse spins l = - List.map (parse1 spins) l - - let vector_to_string = function - | A.Epsilon (mu, nu, ka, la) -> - Printf.sprintf "Epsilon(%d,%d,%d,%d)" mu nu ka la - | A.Metric (mu, nu) -> - Printf.sprintf "Metric(%d,%d)" mu nu - | A.P (mu, n) -> - Printf.sprintf "P(%d,%d)" mu n - - let dirac_to_string = function - | Gamma5 -> "g5" - | ProjM -> "(1-g5)/2" - | ProjP -> "(1+g5)/2" - | Gamma (mu) -> Printf.sprintf "g(%d)" mu - | Sigma (mu, nu) -> Printf.sprintf "s(%d,%d)" mu nu - | C -> "C" - - let dirac_string_to_string ds = - match ds.gammas with - | [] -> Printf.sprintf "<%d|%d>" ds.bra ds.ket - | gammas -> - Printf.sprintf - "<%d|%s|%d>" - ds.bra (String.concat "*" (List.map dirac_to_string gammas)) ds.ket - - let contraction_to_string c = - Q.to_string c.coeff ^ " * " ^ - String.concat - " * " (List.map (fun ds -> dirac_string_to_string ds.atom) c.dirac) ^ - " * " ^ - String.concat - " * " (List.map (fun v -> vector_to_string v.atom) c.vector) - - let to_string contractions = - String.concat " + " (List.map contraction_to_string contractions) - - end module type T = sig (* [lorentz formatter name spins v] writes a representation of the Lorentz structure [v] of particles with the Lorentz representations [spins] as a (Fortran) function [name] to [formatter]. *) val lorentz : Format_Fortran.formatter -> string -> Coupling.lorentz array -> - UFOx.Lorentz.t -> unit + UFO_Lorentz.t -> unit - val fusion2 : - Algebra.QC.t -> string -> Coupling.lorentz3 -> - string -> string -> string -> string -> string -> Coupling.fuse2 -> unit - val fusion3 : - Algebra.QC.t -> string -> Coupling.lorentz4 -> - string -> string -> string -> string -> string -> - string -> string -> Coupling.fuse3 -> unit - val fusionn : + val fuse : Algebra.QC.t -> string -> Coupling.lorentzn -> string -> string list -> string list -> Coupling.fusen -> unit val eps4_g4_g44_decl : Format_Fortran.formatter -> unit -> unit val eps4_g4_g44_init : Format_Fortran.formatter -> unit -> unit end module Fortran : T = struct open Format_Fortran let pp_divide ?(indent=0) ff () = fprintf ff "%*s! %s" indent "" (String.make (70 - indent) '-'); pp_newline ff () let conjugate = function | Coupling.Spinor -> Coupling.ConjSpinor | Coupling.ConjSpinor -> Coupling.Spinor | r -> r let spin_mnemonic = function | Coupling.Scalar -> "phi" | Coupling.Spinor -> "psi" | Coupling.ConjSpinor -> "psibar" | Coupling.Majorana -> "chi" | Coupling.Maj_Ghost -> "???" | Coupling.Vector -> "a" | Coupling.Massive_Vector -> "v" | Coupling.Vectorspinor -> "???" | Coupling.Tensor_1 -> "???" | Coupling.Tensor_2 -> "???" | Coupling.BRS l -> "???" let fortran_type = function | Coupling.Scalar -> "complex(kind=default)" | Coupling.Spinor -> "type(spinor)" | Coupling.ConjSpinor -> "type(conjspinor)" | Coupling.Majorana -> "type(bispinor)" | Coupling.Maj_Ghost -> "???" | Coupling.Vector -> "type(vector)" | Coupling.Massive_Vector -> "type(vector)" | Coupling.Vectorspinor -> "???" | Coupling.Tensor_1 -> "???" | Coupling.Tensor_2 -> "???" | Coupling.BRS l -> "???" (* The \texttt{omegalib} separates time from space. Maybe not a good idea after all. Mend it locally \ldots *) type wf = { pos : int; spin : Coupling.lorentz; name : string; local_array : string option; momentum : string; momentum_array : string; fortran_type : string } let wf_table spins = Array.mapi (fun i s -> let spin = if i = 0 then conjugate s else s in let pos = succ i in let i = string_of_int pos in let name = spin_mnemonic s ^ i in let local_array = begin match spin with | Coupling.Vector -> Some (name ^ "a") | _ -> None end in { pos; spin; name; local_array; momentum = "k" ^ i; momentum_array = "p" ^ i; fortran_type = fortran_type spin } ) spins - module F = Lorentz_Fusion + module L = UFO_Lorentz let unparse_rational q = match Q.to_ratio q with | 0, _ -> printf "0" | 1, 1 -> printf "1" | -1, 1 -> printf "-1" | n, 1 -> printf "%d" n | 1, d -> printf "(1/%d.0_default)" d | -1, d -> printf "(-1/%d.0_default)" d | n, d -> printf "(%d.0_default/%d)" n d let unparse_error msg = printf " [[ERROR: %s]] " msg let unparse_list e o unparse_term = function | [] -> printf "%s" e | [t] -> unparse_term t; | t :: tl -> printf "("; unparse_term t; List.iter (fun t -> printf "%s" o; unparse_term t) tl; printf ")" let unparse_product unparse_term l = unparse_list "1" "*" unparse_term l let unparse_sum unparse_term l = unparse_list "0" "+" unparse_term l let unparse fusion = - Lorentz_Fusion.to_string fusion + L.to_string fusion (* Format rational ([Q.t]) and complex rational ([QC.t]) numbers as fortran values. *) let format_rational q = if Q.is_integer q then string_of_int (Q.to_integer q) else let n, d = Q.to_ratio q in Printf.sprintf "%d.0_default/%d" n d let format_complex_rational cq = let real = QC.real cq and imag = QC.imag cq in if Q.is_null imag then begin if Q.is_negative real then "(" ^ format_rational real ^ ")" else format_rational real end else if Q.is_integer real && Q.is_integer imag then - Printf.sprintf "(%d, %d)" (Q.to_integer real) (Q.to_integer imag) + Printf.sprintf "(%d,%d)" (Q.to_integer real) (Q.to_integer imag) else Printf.sprintf - "cmplx (%s, %s, kind=default)" + "cmplx(%s,%s,kind=default)" (format_rational real) (format_rational imag) (* Optimize the representation if used as a prefactor of a summand in a sum. *) let format_rational_factor q = if Q.is_unit q then "+" else if Q.is_unit (Q.neg q) then "-" else if Q.is_negative q then - "- " ^ format_rational (Q.neg q) ^ " *" + "-" ^ format_rational (Q.neg q) ^ "*" else - "+ " ^ format_rational q ^ " *" + "+" ^ format_rational q ^ "*" let format_complex_rational_factor cq = let real = QC.real cq and imag = QC.imag cq in if Q.is_null imag then begin if Q.is_unit real then "+" else if Q.is_unit (Q.neg real) then "-" else if Q.is_negative real then - "- " ^ format_rational (Q.neg real) ^ " *" + "-" ^ format_rational (Q.neg real) ^ "*" else - "+ " ^ format_rational real ^ " *" + "+" ^ format_rational real ^ "*" end else if Q.is_integer real && Q.is_integer imag then - Printf.sprintf "+ (%d,%d) *" (Q.to_integer real) (Q.to_integer imag) + Printf.sprintf "+(%d,%d)*" (Q.to_integer real) (Q.to_integer imag) else Printf.sprintf - "+ cmplx (%s, %s, kind=default) *" + "+cmplx(%s,%s,kind=default)*" (format_rational real) (format_rational imag) (* Append a formatted list of indices to [name]. *) let append_indices name = function | [] -> name | indices -> name ^ "(" ^ String.concat "," (List.map string_of_int indices) ^ ")" (* Dirac string variables and their names. *) type dsv = | Ket of int | Bra of int | Braket of int let dsv_name = function | Ket n -> Printf.sprintf "ket%02d" n | Bra n -> Printf.sprintf "bra%02d" n | Braket n -> Printf.sprintf "bkt%02d" n let dirac_dimension dsv indices = let tail ilist = String.concat "," (List.map (fun _ -> "0:3") ilist) ^ ")" in match dsv, indices with | Braket _, [] -> "" | (Ket _ | Bra _), [] -> ", dimension(1:4)" | Braket _, indices -> ", dimension(" ^ tail indices | (Ket _ | Bra _), indices -> ", dimension(1:4," ^ tail indices (* Write Fortran code to [decl] and [eval]: apply the Dirac matrix [gamma] with complex rational entries to the spinor [ket] from the left. [ket] must be the name of a scalar variable and cannot be an array element. The result is stored in [dsv_name (Ket n)] which can have additional [indices]. Return [Ket n] for further processing. *) let dirac_ket_to_fortran_decl ff n indices = let printf fmt = fprintf ff fmt and nl = pp_newline ff in let dsv = Ket n in printf " @[<2>complex(kind=default)%s ::@ %s@]" (dirac_dimension dsv indices) (dsv_name dsv); nl () let dirac_ket_to_fortran_eval ff n indices gamma ket = let printf fmt = fprintf ff fmt and nl = pp_newline ff in let dsv = Ket n in for i = 0 to 3 do let name = append_indices (dsv_name dsv) (succ i :: indices) in printf " @[<%d>%s = 0" (String.length name + 5) name; for j = 0 to 3 do if gamma.(i).(j) <> QC.null then printf - "@ %s %s%%a(%d)" + "@,%s%s%%a(%d)" (format_complex_rational_factor gamma.(i).(j)) ket.name (succ j) done; printf "@]"; nl () done; dsv (* The same as [dirac_bra_to_fortran], but apply the Dirac matrix [gamma] to [bra] from the right and return [Bra n]. *) let dirac_bra_to_fortran_decl ff n indices = let printf fmt = fprintf ff fmt and nl = pp_newline ff in let dsv = Bra n in printf " @[<2>complex(kind=default)%s ::@ %s@]" (dirac_dimension dsv indices) (dsv_name dsv); nl () let dirac_bra_to_fortran_eval ff n indices bra gamma = let printf fmt = fprintf ff fmt and nl = pp_newline ff in let dsv = Bra n in for j = 0 to 3 do let name = append_indices (dsv_name dsv) (succ j :: indices) in printf " @[<%d>%s = 0" (String.length name + 5) name; for i = 0 to 3 do if gamma.(i).(j) <> QC.null then printf - "@ %s %s%%a(%d)" + "@,%s%s%%a(%d)" (format_complex_rational_factor gamma.(i).(j)) bra.name (succ i) done; printf "@]"; nl () done; dsv (* More of the same, but evaluating a spinor sandwich and returning [Braket n]. *) let dirac_braket_to_fortran_decl ff n indices = let printf fmt = fprintf ff fmt and nl = pp_newline ff in let dsv = Braket n in printf " @[<2>complex(kind=default)%s ::@ %s@]" (dirac_dimension dsv indices) (dsv_name dsv); nl () let dirac_braket_to_fortran_eval ff n indices bra gamma ket = let printf fmt = fprintf ff fmt and nl = pp_newline ff in let dsv = Braket n in let name = append_indices (dsv_name dsv) indices in printf " @[<%d>%s = 0" (String.length name + 5) name; for i = 0 to 3 do for j = 0 to 3 do if gamma.(i).(j) <> QC.null then printf - "@ %s %s%%a(%d)*%s%%a(%d)" + "@,%s%s%%a(%d)*%s%%a(%d)" (format_complex_rational_factor gamma.(i).(j)) bra.name (succ i) ket.name (succ j) done done; printf "@]"; nl (); dsv (* Choose among the previous functions according to the position of [bra] and [ket] among the wavefunctions. If any is in the first position evaluate the spinor expression with the corresponding spinor removed, otherwise evaluate the spinir sandwich. *) let dirac_bra_or_ket_to_fortran_decl ff n indices bra ket = if bra = 1 then dirac_ket_to_fortran_decl ff n indices else if ket = 1 then dirac_bra_to_fortran_decl ff n indices else dirac_braket_to_fortran_decl ff n indices let dirac_bra_or_ket_to_fortran_eval ff n indices wfs bra gamma ket = if bra = 1 then dirac_ket_to_fortran_eval ff n indices gamma wfs.(pred ket) else if ket = 1 then dirac_bra_to_fortran_eval ff n indices wfs.(pred bra) gamma else dirac_braket_to_fortran_eval ff n indices wfs.(pred bra) gamma wfs.(pred ket) (* UFO summation indices are negative integers. Derive a valid Fortran variable name. *) let prefix_summation = "mu" let prefix_polarization = "nu" let index_spinor = "alpha" let index_variable mu = if mu < 0 then Printf.sprintf "%s%d" prefix_summation (- mu) else if mu == 0 then prefix_polarization else Printf.sprintf "%s%d" prefix_polarization mu let format_indices indices = String.concat "," (List.map index_variable indices) module IntPM = Partial.Make (struct type t = int let compare = compare end) type tensor = | DS of dsv | V of string | T of UFOx.Lorentz_Atom.vector (* Write the [i]th Dirac string [ds] as Fortran code to [eval], including a shorthand representation as a comment. Return [ds] with - [ds.F.atom] replaced by the dirac string variable, + [ds.L.atom] replaced by the dirac string variable, i,\,e.~[DS dsv] annotated with the internal and external indices. In addition write the declaration to [decl]. *) let dirac_string_to_fortran ~decl ~eval i wfs ds = let printf fmt = fprintf eval fmt and nl = pp_newline eval in - let bra = ds.F.atom.F.bra - and ket = ds.F.atom.F.ket in + let bra = ds.L.atom.L.bra + and ket = ds.L.atom.L.ket in pp_divide ~indent:4 eval (); - begin match ds.F.indices with + begin match ds.L.indices with | [] -> - printf " ! %s" (F.dirac_string_to_string ds.F.atom); nl (); - let gamma = F.dirac_string_to_matrix (fun _ -> 0) ds.F.atom in + printf " ! %s" (L.dirac_string_to_string ds.L.atom); nl (); + let gamma = L.dirac_string_to_matrix (fun _ -> 0) ds.L.atom in dirac_bra_or_ket_to_fortran_decl decl i [] bra ket; let dsv = dirac_bra_or_ket_to_fortran_eval eval i [] wfs bra gamma ket in - F.map_atom (fun _ -> DS dsv) ds + L.map_atom (fun _ -> DS dsv) ds | indices -> printf " ! %s" - (F.dirac_string_to_string ds.F.atom); nl (); + (L.dirac_string_to_string ds.L.atom); nl (); dirac_bra_or_ket_to_fortran_decl decl i indices bra ket; let combinations = Product.power (List.length indices) [0; 1; 2; 3] in let dsv = List.map (fun combination -> let substitution = IntPM.of_lists indices combination in let substitute = IntPM.apply substitution in let indices = List.map substitute indices in let gamma = - F.dirac_string_to_matrix substitute ds.F.atom in + L.dirac_string_to_matrix substitute ds.L.atom in dirac_bra_or_ket_to_fortran_eval eval i indices wfs bra gamma ket) combinations in begin match ThoList.uniq (List.sort compare dsv) with - | [dsv] -> F.map_atom (fun _ -> DS dsv) ds + | [dsv] -> L.map_atom (fun _ -> DS dsv) ds | _ -> failwith "dirac_string_to_fortran: impossible" end end (* Write the Dirac strings in the list [ds_list] as Fortran code to [eval], including shorthand representations as comments. Return the list of variables and corresponding indices to be contracted. *) let dirac_strings_to_fortran ~decl ~eval wfs last ds_list = List.fold_left (fun (i, acc) ds -> let i = succ i in (i, dirac_string_to_fortran ~decl ~eval i wfs ds :: acc)) (last, []) ds_list (* Perform a nested sum of terms, as printed by [print_term] (which takes the number of spaces to indent as only argument) of the cartesian product of [indices] running from 0 to 3. *) let nested_sums ~decl ~eval initial_indent indices print_term = let rec nested_sums' indent = function | [] -> print_term indent | index :: indices -> let var = index_variable index in fprintf eval "%*s@[<2>do %s = 0, 3@]" indent "" var; pp_newline eval (); nested_sums' (indent + 2) indices; pp_newline eval (); fprintf eval "%*s@[<2>end do@]" indent "" in nested_sums' (initial_indent + 2) indices (* Polarization indices also need to be summed over, but they appear only once. *) let indices_of_contractions contractions = let index_pairs, polarizations = - F.classify_indices - (ThoList.flatmap (fun ds -> ds.F.indices) contractions) in + L.classify_indices + (ThoList.flatmap (fun ds -> ds.L.indices) contractions) in try ThoList.pairs index_pairs @ ThoList.uniq (List.sort compare polarizations) with | Invalid_argument s -> invalid_arg ("indices_of_contractions: " ^ ThoList.to_string string_of_int index_pairs) let format_dsv dsv indices = match dsv, indices with | Braket _, [] -> dsv_name dsv | Braket _, ilist -> Printf.sprintf "%s(%s)" (dsv_name dsv) (format_indices indices) | (Bra _ | Ket _), [] -> Printf.sprintf "%s(%s)" (dsv_name dsv) index_spinor | (Bra _ | Ket _), ilist -> Printf.sprintf "%s(%s,%s)" (dsv_name dsv) index_spinor (format_indices indices) let format_tensor t = - let indices = t.F.indices in - match t.F.atom with + let indices = t.L.indices in + match t.L.atom with | DS dsv -> format_dsv dsv indices | V vector -> Printf.sprintf "%s(%s)" vector (format_indices indices) | T UFOx.Lorentz_Atom.P (mu, n) -> Printf.sprintf "p%d(%s)" n (index_variable mu) | T UFOx.Lorentz_Atom.Epsilon (mu1, mu2, mu3, mu4) -> Printf.sprintf "eps4_(%s)" (format_indices [mu1; mu2; mu3; mu4]) | T UFOx.Lorentz_Atom.Metric (mu1, mu2) -> if mu1 > 0 && mu2 > 0 then Printf.sprintf "g44_(%s)" (format_indices [mu1; mu2]) else failwith "format_tensor: compress_metrics has failed!" let rec multiply_tensors ~decl ~eval = function | [] -> fprintf eval "1"; | [t] -> fprintf eval "%s" (format_tensor t) | t :: tensors -> - fprintf eval "%s@ * " (format_tensor t); + fprintf eval "%s@,*" (format_tensor t); multiply_tensors ~decl ~eval tensors let contract_indices ~decl ~eval indent wf_index wfs (q, contractees) = let printf fmt = fprintf eval fmt and nl = pp_newline eval in let sum_var = begin match wf_index with | None -> wfs.(0).name | Some i -> begin match wfs.(0).local_array with | None -> Printf.sprintf "%s%%a(%s)" wfs.(0).name i | Some a -> Printf.sprintf "%s(%s)" a i end end in let indices = List.filter (fun i -> i <> 1) (indices_of_contractions contractees) in nested_sums ~decl ~eval indent indices (fun indent -> printf "%*s@[<2>%s = %s" indent "" sum_var sum_var; - printf "@ %s" (format_rational_factor q); - List.iter (fun i -> printf "@ g4_(%s) *" (index_variable i)) indices; - printf "@ ("; + printf "@,%s" (format_rational_factor q); + List.iter (fun i -> printf "@,g4_(%s)*" (index_variable i)) indices; + printf "@,("; multiply_tensors ~decl ~eval contractees; printf ")@]"); printf "@]"; nl () let external_wf_loop ~decl ~eval ~indent wfs contractees = pp_divide ~indent eval (); match wfs.(0).spin with | Coupling.Scalar -> contract_indices ~decl ~eval 2 None wfs contractees - | Coupling.Spinor | Coupling.ConjSpinor -> + | Coupling.Spinor | Coupling.ConjSpinor | Coupling.Majorana -> let idx = index_spinor in fprintf eval "%*s@[<2>do %s = 1, 4@]" indent "" idx; pp_newline eval (); contract_indices ~decl ~eval 4 (Some idx) wfs contractees; fprintf eval "%*send do@]" indent ""; pp_newline eval () | Coupling.Vector -> let idx = index_variable 1 in fprintf eval "%*s@[<2>do %s = 0, 3@]" indent "" idx; pp_newline eval (); contract_indices ~decl ~eval 4 (Some idx) wfs contractees; fprintf eval "%*send do@]" indent ""; pp_newline eval () | _ -> failwith "external_wf_loop: incomplete" let local_vector_copies ~decl ~eval wfs = begin match wfs.(0).local_array with | None -> () | Some a -> fprintf decl " @[<2>complex(kind=default),@ dimension(0:3) ::@ %s@]" a; pp_newline decl () end; let n = Array.length wfs in for i = 1 to n - 1 do match wfs.(i).local_array with | None -> () | Some a -> fprintf decl " @[<2>complex(kind=default),@ dimension(0:3) ::@ %s@]" a; pp_newline decl (); fprintf eval " @[<2>%s(0) = %s%%t@]" a wfs.(i).name; pp_newline eval (); fprintf eval " @[<2>%s(1:3) = %s%%x@]" a wfs.(i).name; pp_newline eval () done let return_vector ff wfs = let printf fmt = fprintf ff fmt and nl = pp_newline ff in match wfs.(0).local_array with | None -> () | Some a -> pp_divide ~indent:4 ff (); printf " @[<2>%s%%t = %s(0)@]" wfs.(0).name a; nl (); printf " @[<2>%s%%x = %s(1:3)@]" wfs.(0).name a; nl () let multiply_coupling_and_scalars ff g wfs = let printf fmt = fprintf ff fmt and nl = pp_newline ff in pp_divide ~indent:4 ff (); - printf " @[<2>%s = %s * %s" wfs.(0).name g wfs.(0).name; + printf " @[<2>%s = %s*%s" wfs.(0).name g wfs.(0).name; for i = 1 to Array.length wfs - 1 do match wfs.(i).spin with - | Coupling.Scalar -> printf "@ * %s" wfs.(i).name + | Coupling.Scalar -> printf "@,*%s" wfs.(i).name | _ -> () done; printf "@]"; nl () let local_momentum_copies ~decl ~eval wfs = let n = Array.length wfs in fprintf decl " @[<2>real(kind=default),@ dimension(0:3) ::@ %s" wfs.(0).momentum_array; for i = 1 to n - 1 do fprintf decl ",@ %s" wfs.(i).momentum_array; fprintf eval " @[<2>%s(0) = %s%%t@]" wfs.(i).momentum_array wfs.(i).momentum; pp_newline eval (); fprintf eval " @[<2>%s(1:3) = %s%%x@]" wfs.(i).momentum_array wfs.(i).momentum; pp_newline eval () done; fprintf eval " @[<2>%s =" wfs.(0).momentum_array; for i = 1 to n - 1 do fprintf eval "@ - %s" wfs.(i).momentum_array done; fprintf decl "@]"; pp_newline decl (); fprintf eval "@]"; pp_newline eval () (* FIXME: can be retired starting from O'Caml 4.02.0! *) let iset_of_list list = List.fold_right Sets.Int.add list Sets.Int.empty let contractees_of_fusion ~decl ~eval wfs (max_dsv, indices_seen, contractees) fusion = let max_dsv', dirac_strings = - dirac_strings_to_fortran ~decl ~eval wfs max_dsv fusion.F.dirac + dirac_strings_to_fortran ~decl ~eval wfs max_dsv fusion.L.dirac and vectors = List.fold_left (fun acc wf -> match wf.local_array with | None -> acc - | Some a -> { F.atom = V a; F.indices = [wf.pos] } :: acc) + | Some a -> { L.atom = V a; L.indices = [wf.pos] } :: acc) [] (List.tl (Array.to_list wfs)) and tensors = - List.map (F.map_atom (fun t -> T t)) fusion.F.vector in + List.map (L.map_atom (fun t -> T t)) fusion.L.vector in let contractees' = dirac_strings @ vectors @ tensors in let indices_seen' = iset_of_list (indices_of_contractions contractees') in (max_dsv', Sets.Int.union indices_seen indices_seen', - (fusion.F.coeff, contractees') :: contractees) + (fusion.L.coeff, contractees') :: contractees) - (* FIXME: add indices for vector wave functions and tensors. (???) *) let fusions_to_fortran ~decl ~eval wfs fusions = local_vector_copies ~decl ~eval wfs; local_momentum_copies ~decl ~eval wfs; let _, indices_used, contractions = List.fold_left (contractees_of_fusion ~decl ~eval wfs) (0, Sets.Int.empty, []) fusions in Sets.Int.iter (fun index -> fprintf decl " @[<2>integer ::@ %s@]" (index_variable index); pp_newline decl ()) indices_used; begin match wfs.(0).spin with - | Coupling.Spinor | Coupling.ConjSpinor -> + | Coupling.Spinor | Coupling.ConjSpinor | Coupling.Majorana -> fprintf decl " @[<2>integer ::@ %s@]" index_spinor; pp_newline decl () | _ -> () end; pp_divide ~indent:4 eval (); begin match wfs.(0).local_array with | Some a -> fprintf eval " %s = 0" a | None -> match wfs.(0).spin with - | Coupling.Spinor | Coupling.ConjSpinor -> + | Coupling.Spinor | Coupling.ConjSpinor | Coupling.Majorana -> fprintf eval " %s%%a = 0" wfs.(0).name | Coupling.Scalar -> fprintf eval " %s = 0" wfs.(0).name | _ -> failwith "fusions_to_fortran" end; pp_newline eval (); List.iter (external_wf_loop ~decl ~eval ~indent:4 wfs) contractions; return_vector eval wfs (* TODO: eventually, we should include the momentum among the arguments only if required. But this can wait for another day. *) let lorentz ff name spins lorentz = let printf fmt = fprintf ff fmt and nl = pp_newline ff in - let fusion = - try - Lorentz_Fusion.parse (Array.to_list spins) lorentz - with - | Failure msg -> - begin - prerr_endline msg; - Lorentz_Fusion.dummy - end in let wfs = wf_table spins in let n = Array.length wfs in printf " @[<4>pure function %s@ (g,@ " name; for i = 1 to n - 2 do printf "%s,@ %s,@ " wfs.(i).name wfs.(i).momentum done; printf "%s,@ %s" wfs.(n - 1).name wfs.(n - 1).momentum; printf ")@ result (%s)@]" wfs.(0).name; nl (); printf " @[<2>%s ::@ %s@]" wfs.(0).fortran_type wfs.(0).name; nl(); printf " @[<2>complex(kind=default),@ intent(in) ::@ g@]"; nl(); for i = 1 to n - 1 do printf " @[<2>%s, intent(in) :: %s@]" wfs.(i).fortran_type wfs.(i).name; nl(); done; printf " @[<2>type(momentum), intent(in) ::@ %s" wfs.(1).momentum; for i = 2 to n - 1 do printf ",@ %s" wfs.(i).momentum done; printf "@]"; nl (); let width = 80 in (* get this from the default formatter instead! *) let decl_buf = Buffer.create 1024 and eval_buf = Buffer.create 1024 in let decl = formatter_of_buffer ~width decl_buf and eval = formatter_of_buffer ~width eval_buf in - fusions_to_fortran ~decl ~eval wfs fusion; + fusions_to_fortran ~decl ~eval wfs lorentz; multiply_coupling_and_scalars eval "g" wfs; pp_flush decl (); pp_flush eval (); pp_divide ~indent:4 ff (); - printf " ! %s" (unparse fusion); nl (); + printf " ! %s" (unparse lorentz); nl (); pp_divide ~indent:4 ff (); printf "%s" (Buffer.contents decl_buf); pp_divide ~indent:4 ff (); printf "%s" (Buffer.contents eval_buf); printf " end function %s@]" name; nl (); Buffer.reset decl_buf; Buffer.reset eval_buf; () let scale_coupling c g = if c = 1 then g else if c = -1 then "-" ^ g else Printf.sprintf "%d*%s" c g let scale_coupling z g = format_complex_rational_factor z ^ g (* As a prototypical example consider the vertex \begin{equation} \bar\psi\fmslash{A}\psi = \tr\left(\psi\otimes\bar\psi\fmslash{A}\right) \end{equation} encoded as \texttt{FFV} in the SM UFO file. This example is useful, because all three fields have different type and we can use the Fortran compiler to check our implementation. In this case we need to generate the following function calls with the arguments in the following order \begin{center} \begin{tabular}{lcl} \texttt{F12}:&$\psi_1\bar\psi_2\to A$& \texttt{FFV\_p201(g,psi1,p1,psibar2,p2)} \\ \texttt{F21}:&$\bar\psi_1\psi_2\to A$& \texttt{FFV\_p201(g,psi2,p2,psibar1,p1)} \\ \texttt{F23}:&$\bar\psi_1 A_2 \to \bar\psi$& \texttt{FFV\_p012(g,psibar1,p1,A2,p2)} \\ \texttt{F32}:&$A_1\bar\psi_2 \to \bar\psi$& \texttt{FFV\_p012(g,psibar2,p2,A1,p1)} \\ \texttt{F31}:&$A_1\psi_2\to \psi$& \texttt{FFV\_p120(g,A1,p1,psi2,p2)} \\ \texttt{F13}:&$\psi_1A_2\to \psi$& \texttt{FFV\_p120(g,A2,p2,psi1,p1)} \end{tabular} \end{center} *) (* Fortunately, all Fermi signs have been taken care of by [Fusions] and we can concentrate on injecting the wave functions into the correct slots. *) - let fusion2 c v s g wf1 p1 wf2 p2 fuse2 = - let g = scale_coupling c g in - let open Coupling in - let perm = - begin match fuse2 with - | F12 | F21 -> "201" - | F23 | F32 -> "012" - | F31 | F13 -> "120" - end in - match fuse2 with - | F12 | F23 | F31 -> - printf "%s_p%s(%s,%s,%s,%s,%s)" v perm g wf1 p1 wf2 p2 - | F21 | F32 | F13 -> - printf "%s_p%s(%s,%s,%s,%s,%s)" v perm g wf2 p2 wf1 p1 - - let fusion3 c v s g wf1 p1 wf2 p2 wf3 p3 fuse3 = - let g = scale_coupling c g in - let open Coupling in - let perm = - begin match fuse3 with - | F234 | F243 | F432 | F342 | F324 | F423 -> "0123" - | F134 | F341 | F413 | F143 | F431 | F314 -> "1230" - | F124 | F241 | F412 | F142 | F421 | F214 -> "2301" - | F123 | F231 | F312 | F132 | F321 | F213 -> "3012" - end in - match fuse3 with - (* These are the obvious ones, b/c they're their own inverses. *) - | F234 | F341 | F412 | F123 -> - printf "%s_p%s(%s,%s,%s,%s,%s,%s,%s)" v perm g wf1 p1 wf2 p2 wf3 p3 - | F243 | F314 | F421 | F132 -> - printf "%s_p%s(%s,%s,%s,%s,%s,%s,%s)" v perm g wf1 p1 wf3 p3 wf2 p2 - | F324 | F431 | F142 | F213 -> - printf "%s_p%s(%s,%s,%s,%s,%s,%s,%s)" v perm g wf2 p2 wf1 p1 wf3 p3 - | F432 | F143 | F214 | F321 -> - printf "%s_p%s(%s,%s,%s,%s,%s,%s,%s)" v perm g wf3 p3 wf2 p2 wf1 p1 - (* TODO: Explain why we need the inverses here \ldots *) - | F342 | F413 | F124 | F231 -> - printf "%s_p%s(%s,%s,%s,%s,%s,%s,%s)" v perm g wf3 p3 wf1 p1 wf2 p2 - | F423 | F134 | F241 | F312 -> - printf "%s_p%s(%s,%s,%s,%s,%s,%s,%s)" v perm g wf2 p2 wf3 p3 wf1 p1 + (* \begin{dubious} + Eventually, we should use the reverted lists everywhere + to become a bit more efficient. + \end{dubious} *) + + module P = Permutation.Default + let factor_cyclic f12__n = + let f12__, fn = ThoList.split_last f12__n in + let cyclic = ThoList.cycle_until fn (List.sort compare f12__n) in + (P.of_list (List.map pred cyclic), + P.of_lists (List.tl cyclic) f12__) + + let fuse c v s g wfs ps fusion = + let g = scale_coupling c g + and cyclic, factor = factor_cyclic fusion in + let perm = P.to_string cyclic in + let wfs_ps = List.map2 (fun wf p -> (wf, p)) wfs ps in + let args = P.list (P.inverse factor) wfs_ps in + let args_string = + String.concat "," (List.map (fun (wf, p) -> wf ^ "," ^ p) args) in + printf "%s_p%s(%s,%s)" v perm g args_string (* \begin{dubious} - FIXME: Implement the correct permutations also for - higher order vertices! + The following is for reference only, to better understand what JRR + was doing\ldots \end{dubious} *) - let fusionn c v s g wfs ps fusion = - let g = scale_coupling c g in - printf - "%s_p_(%s,%s)" v g - (String.concat "," (List.map2 (fun wf p -> wf ^ "," ^ p) wfs ps)) + (* The vertex is (suppressing the Lorentz index of~$\phi_2$) + \begin{equation} + \bar\psi_1 \Gamma\phi_2 \psi_3 + = \Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \phi_2 \psi_{3,\beta} + \end{equation} *) + + (* This is the version implemented by [fuse] above. *) + + let tho_print_dirac_current f c wf1 wf2 fusion = + match fusion with + | [1; 3] -> printf "%s_ff(%s,%s,%s)" f c wf1 wf2 (* $\Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \psi_{3,\beta}$ *) + | [3; 1] -> printf "%s_ff(%s,%s,%s)" f c wf2 wf1 (* $\Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \psi_{3,\beta}$ *) + | [2; 3] -> printf "f_%sf(%s,%s,%s)" f c wf1 wf2 (* $\Gamma_{\alpha\beta} \phi_2 \psi_{3,\beta}$ *) + | [3; 2] -> printf "f_%sf(%s,%s,%s)" f c wf2 wf1 (* $\Gamma_{\alpha\beta} \phi_2 \psi_{3,\beta}$ *) + | [1; 2] -> printf "f_f%s(%s,%s,%s)" f c wf1 wf2 (* $\Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \phi_2$ *) + | [2; 1] -> printf "f_f%s(%s,%s,%s)" f c wf2 wf1 (* $\Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \phi_2$ *) + | _ -> () + + (* This is how JRR implemented the Dirac matrices + that don't change sign under $C\Gamma^T C^{-1} = \Gamma$, + i.\,e.~$\mathbf{1}$, $\gamma_5$ and~$\gamma_5\gamma_\mu$. *) + + (* In the case of two fermions, the second wave + function [wf2] is always put into the right slot, + as described in JRR's thesis. *) + + (* In the case of a boson and a fermion, there is no + need for both ["f_%sf"] and ["f_f%s"], since the + latter can be obtained by exchanging arguments. *) + + let jrr_print_majorana_current_S_P_A f c wf1 wf2 fusion = + match fusion with + | [1; 3] -> printf "%s_ff(%s,%s,%s)" f c wf1 wf2 (* + $\Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \psi_{3,\beta} \equiv + \Gamma $ *) + | [3; 1] -> printf "%s_ff(%s,%s,%s)" f c wf1 wf2 (* + $\Gamma_{\alpha\beta} \psi_{3,\alpha} \bar\psi_{1,\beta} \equiv + \Gamma = C\Gamma^T C^{-1} $ *) + | [2; 3] -> printf "f_%sf(%s,%s,%s)" f c wf1 wf2 (* + $\Gamma_{\alpha\beta} \phi_2 \psi_{3,\beta} \equiv + \Gamma $ *) + | [3; 2] -> printf "f_%sf(%s,%s,%s)" f c wf2 wf1 (* + $\Gamma_{\alpha\beta} \phi_2 \psi_{3,\beta} \equiv + \Gamma $ *) + | [1; 2] -> printf "f_%sf(%s,%s,%s)" f c wf2 wf1 (* + $\Gamma_{\alpha\beta} \phi_2 \bar\psi_{1,\beta} \equiv + \Gamma = C\Gamma^T C^{-1} $ *) + | [2; 1] -> printf "f_%sf(%s,%s,%s)" f c wf1 wf2 (* + $\Gamma_{\alpha\beta} \phi_2 \bar\psi_{1,\beta} \equiv + \Gamma = C\Gamma^T C^{-1} $ *) + | _ -> () + + (* This is how JRR implemented the Dirac matrices + that do change sign under $C\Gamma^T C^{-1} = - \Gamma$, + i.\,e.~$\gamma_\mu$ and~$\sigma_{\mu\nu}$ (NB: the + latter case never appears!). *) + + let jrr_print_majorana_current_V f c wf1 wf2 fusion = + match fusion with + | [1; 3] -> printf "%s_ff( %s,%s,%s)" f c wf1 wf2 (* + $ \Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \psi_{3,\beta} \equiv + \Gamma $ *) + | [3; 1] -> printf "%s_ff(-%s,%s,%s)" f c wf1 wf2 (* + $-\Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \psi_{3,\beta} \equiv + -\Gamma = C\Gamma^T C^{-1} $ *) + | [2; 3] -> printf "f_%sf( %s,%s,%s)" f c wf1 wf2 (* + $ \Gamma_{\alpha\beta} \phi_2 \psi_{3,\beta} \equiv + \Gamma $ *) + | [3; 2] -> printf "f_%sf( %s,%s,%s)" f c wf2 wf1 (* + $ \Gamma_{\alpha\beta} \phi_2 \psi_{3,\beta} \equiv + \Gamma $ *) + | [1; 2] -> printf "f_%sf(-%s,%s,%s)" f c wf2 wf1 (* + $-\Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \phi_2 \equiv + -\Gamma = C\Gamma^T C^{-1} $ *) + | [2; 1] -> printf "f_%sf(-%s,%s,%s)" f c wf1 wf2 (* + $-\Gamma_{\alpha\beta} \bar\psi_{1,\alpha} \phi_2 \equiv + -\Gamma = C\Gamma^T C^{-1} $ *) + | _ -> () + + (* \begin{dubious} + Still need a way to reliably select the Majorana + version in the [Target] module! + \end{dubious} *) let eps4_g4_g44_decl ff () = let printf fmt = fprintf ff fmt and nl = pp_newline ff in printf " @[<2>integer,@ dimension(0:3)"; printf ",@ save,@ private ::@ g4_@]"; nl (); printf " @[<2>integer,@ dimension(0:3,0:3)"; printf ",@ save,@ private ::@ g44_@]"; nl (); printf " @[<2>integer,@ dimension(0:3,0:3,0:3,0:3)"; printf ",@ save,@ private ::@ eps4_@]"; nl () let eps4_g4_g44_init ff () = let printf fmt = fprintf ff fmt and nl = pp_newline ff in printf " @[<2>data g4_@ /@ 1, -1, -1, -1 /@]"; nl (); printf " @[<2>data g44_(0,:)@ /@ 1, 0, 0, 0 /@]"; nl (); printf " @[<2>data g44_(1,:)@ /@ 0, -1, 0, 0 /@]"; nl (); printf " @[<2>data g44_(2,:)@ /@ 0, 0, -1, 0 /@]"; nl (); printf " @[<2>data g44_(3,:)@ /@ 0, 0, 0, -1 /@]"; nl (); for mu1 = 0 to 3 do for mu2 = 0 to 3 do for mu3 = 0 to 3 do printf " @[<2>data eps4_(%d,%d,%d,:)@ /@ " mu1 mu2 mu3; for mu4 = 0 to 3 do if mu4 <> 0 then printf ",@ "; let mus = [mu1; mu2; mu3; mu4] in if List.sort compare mus = [0; 1; 2; 3] then printf "%2d" (Combinatorics.sign mus) else printf "%2d" 0; done; printf " /@]"; nl () done done done end Index: trunk/omega/src/cascade.ml =================================================================== --- trunk/omega/src/cascade.ml (revision 8274) +++ trunk/omega/src/cascade.ml (revision 8275) @@ -1,531 +1,531 @@ (* cascade.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) module type T = sig type constant type flavor type p type t val of_string_list : int -> string list -> t val to_string : t -> string type selectors val to_selectors : t -> selectors val no_cascades : selectors val select_wf : selectors -> (p -> bool) -> flavor -> p -> p list -> bool val select_p : selectors -> p -> p list -> bool val on_shell : selectors -> flavor -> p -> bool val is_gauss : selectors -> flavor -> p -> bool val select_vtx : selectors -> constant Coupling.t -> flavor -> flavor list -> bool val partition : selectors -> int list list val description : selectors -> string option end module Make (M : Model.T) (P : Momentum.T) : (T with type flavor = M.flavor and type constant = M.constant and type p = P.t) = struct module CS = Cascade_syntax type constant = M.constant type flavor = M.flavor type p = P.t (* Since we have \begin{equation} p \le q \Longleftrightarrow (-q) \le (-p) \end{equation} also for $\le$ as set inclusion [lesseq], only four of the eight combinations are independent \begin{equation} \begin{aligned} p &\le q &&\Longleftrightarrow & (-q) &\le (-p) \\ q &\le p &&\Longleftrightarrow & (-p) &\le (-q) \\ p &\le (-q) &&\Longleftrightarrow & q &\le (-p) \\ (-q) &\le p &&\Longleftrightarrow & (-p) &\le q \end{aligned} \end{equation} *) let one_compatible p q = let neg_q = P.neg q in P.lesseq p q || P.lesseq q p || P.lesseq p neg_q || P.lesseq neg_q p (* 'tis wasteful \ldots (at least by a factor of two, because every momentum combination is generated, including the negative ones. *) let all_compatible p p_list q = let l = List.length p_list in if l <= 2 then one_compatible p q else let tuple_lengths = ThoList.range 2 (succ l / 2) in let tuples = ThoList.flatmap (fun n -> Combinatorics.choose n p_list) tuple_lengths in let momenta = List.map (List.fold_left P.add (P.zero (P.dim q))) tuples in List.for_all (one_compatible q) momenta (* The following assumes that the [flavor list] is always very short. Otherwise one should use an efficient set implementation. *) type wf = | True | False | On_shell of flavor list * P.t | On_shell_not of flavor list * P.t | Off_shell of flavor list * P.t | Off_shell_not of flavor list * P.t | Gauss of flavor list * P.t | Gauss_not of flavor list * P.t | Any_flavor of P.t | And of wf list module Constant = Modeltools.Constant (M) type vtx = { couplings : M.constant list; fields : flavor list } type t = { wf : wf; (* TODO: The following lists should be sets for efficiency. *) flavors : flavor list; vertices : vtx list } let default = { wf = True; flavors = []; vertices = [] } let of_string s = Cascade_parser.main Cascade_lexer.token (Lexing.from_string s) (* \begin{dubious} If we knew that we're dealing with a scattering, we could apply [P.flip_s_channel_in] to all momenta, so that $1+2$ accepts the particle and not the antiparticle. Right now, we don't have this information. \end{dubious} *) let only_wf wf = { default with wf = wf } let cons_and_wf c wfs = match c.wf, wfs with | True, wfs -> wfs | False, _ -> [False] | wf, [] -> [wf] | wf, wfs -> wf :: wfs let and_cascades_wf c = match List.fold_right cons_and_wf c [] with | [] -> True | [wf] -> wf | wfs -> And wfs let uniq l = ThoList.uniq (List.sort compare l) let import dim cascades = let rec import' = function | CS.True -> only_wf True | CS.False -> only_wf False | CS.On_shell (f, p) -> only_wf (On_shell (List.map M.flavor_of_string f, P.of_ints dim p)) | CS.On_shell_not (f, p) -> only_wf (On_shell_not (List.map M.flavor_of_string f, P.of_ints dim p)) | CS.Off_shell (fs, p) -> only_wf (Off_shell (List.map M.flavor_of_string fs, P.of_ints dim p)) | CS.Off_shell_not (fs, p) -> only_wf (Off_shell_not (List.map M.flavor_of_string fs, P.of_ints dim p)) | CS.Gauss (f, p) -> only_wf (Gauss (List.map M.flavor_of_string f, P.of_ints dim p)) | CS.Gauss_not (f, p) -> only_wf (Gauss (List.map M.flavor_of_string f, P.of_ints dim p)) | CS.Any_flavor p -> only_wf (Any_flavor (P.of_ints dim p)) | CS.And cs -> let cs = List.map import' cs in { wf = and_cascades_wf cs; flavors = uniq (List.concat (List.map (fun c -> c.flavors) cs)); vertices = uniq (List.concat (List.map (fun c -> c.vertices) cs)) } | CS.X_Flavor fs -> let fs = List.map M.flavor_of_string fs in { default with flavors = uniq (fs @ List.map M.conjugate fs) } | CS.X_Vertex (cs, fss) -> let cs = List.map Constant.of_string cs and fss = List.map (List.map M.flavor_of_string) fss in let expanded = List.map (fun fs -> { couplings = cs; fields = fs }) (match fss with | [] -> [[]] (* Subtle: \emph{not} an empty list! *) | fss -> Product.list (fun fs -> fs) fss) in { default with vertices = expanded } in import' cascades let of_string_list dim strings = match List.map of_string strings with | [] -> default | first :: next -> import dim (List.fold_right CS.mk_and next first) let flavors_to_string fs = (String.concat ":" (List.map M.flavor_to_string fs)) let momentum_to_string p = String.concat "+" (List.map string_of_int (P.to_ints p)) let rec wf_to_string = function | True -> "true" | False -> "false" | On_shell (fs, p) -> momentum_to_string p ^ " = " ^ flavors_to_string fs | On_shell_not (fs, p) -> momentum_to_string p ^ " = !" ^ flavors_to_string fs | Off_shell (fs, p) -> momentum_to_string p ^ " ~ " ^ flavors_to_string fs | Off_shell_not (fs, p) -> momentum_to_string p ^ " ~ !" ^ flavors_to_string fs | Gauss (fs, p) -> momentum_to_string p ^ " # " ^ flavors_to_string fs | Gauss_not (fs, p) -> momentum_to_string p ^ " # !" ^ flavors_to_string fs | Any_flavor p -> momentum_to_string p ^ " ~ ?" | And cs -> String.concat " && " (List.map (fun c -> "(" ^ wf_to_string c ^ ")") cs) let vertex_to_string v = "^" ^ String.concat ":" (List.map M.constant_symbol v.couplings) ^ "[" ^ String.concat "," (List.map M.flavor_to_string v.fields) ^ "]" let vertices_to_string vs = (String.concat " && " (List.map vertex_to_string vs)) let to_string = function | { wf = True; flavors = []; vertices = [] } -> "" | { wf = True; flavors = fs; vertices = [] } -> "!" ^ flavors_to_string fs | { wf = True; flavors = []; vertices = vs } -> vertices_to_string vs | { wf = True; flavors = fs; vertices = vs } -> "!" ^ flavors_to_string fs ^ " && " ^ vertices_to_string vs | { wf = wf; flavors = []; vertices = [] } -> wf_to_string wf | { wf = wf; flavors = []; vertices = vs } -> vertices_to_string vs ^ " && " ^ wf_to_string wf | { wf = wf; flavors = fs; vertices = [] } -> "!" ^ flavors_to_string fs ^ " && " ^ wf_to_string wf | { wf = wf; flavors = fs; vertices = vs } -> "!" ^ flavors_to_string fs ^ " && " ^ vertices_to_string vs ^ " && " ^ wf_to_string wf type selectors = { select_p : p -> p list -> bool; select_wf : (p -> bool) -> flavor -> p -> p list -> bool; on_shell : flavor -> p -> bool; is_gauss : flavor -> p -> bool; select_vtx : constant Coupling.t -> flavor -> flavor list -> bool; partition : int list list; description : string option } let no_cascades = { select_p = (fun _ _ -> true); select_wf = (fun _ _ _ _ -> true); on_shell = (fun _ _ -> false); is_gauss = (fun _ _ -> false); select_vtx = (fun _ _ _ -> true); partition = []; description = None } let select_p s = s.select_p let select_wf s = s.select_wf let on_shell s = s.on_shell let is_gauss s = s.is_gauss let select_vtx s = s.select_vtx let partition s = s.partition let description s = s.description let to_select_p cascades p p_in = let rec to_select_p' = function | True -> true | False -> false | On_shell (_, momentum) | On_shell_not (_, momentum) | Off_shell (_, momentum) | Off_shell_not (_, momentum) | Gauss (_, momentum) | Gauss_not (_, momentum) | Any_flavor momentum -> all_compatible p p_in momentum | And [] -> false | And cs -> List.for_all to_select_p' cs in to_select_p' cascades let to_select_wf cascades is_timelike f p p_in = let f' = M.conjugate f in let rec to_select_wf' = function | True -> true | False -> false | Off_shell (flavors, momentum) -> if p = momentum then List.mem f' flavors || (if is_timelike p then false else List.mem f flavors) else if p = P.neg momentum then List.mem f flavors || (if is_timelike p then false else List.mem f' flavors) else one_compatible p momentum && all_compatible p p_in momentum | On_shell (flavors, momentum) | Gauss (flavors, momentum) -> if is_timelike p then begin if p = momentum then List.mem f' flavors else if p = P.neg momentum then List.mem f flavors else one_compatible p momentum && all_compatible p p_in momentum end else false | Off_shell_not (flavors, momentum) -> if p = momentum then not (List.mem f' flavors || (if is_timelike p then false else List.mem f flavors)) else if p = P.neg momentum then not (List.mem f flavors || (if is_timelike p then false else List.mem f' flavors)) else one_compatible p momentum && all_compatible p p_in momentum | On_shell_not (flavors, momentum) | Gauss_not (flavors, momentum) -> if is_timelike p then begin if p = momentum then not (List.mem f' flavors) else if p = P.neg momentum then not (List.mem f flavors) else one_compatible p momentum && all_compatible p p_in momentum end else false | Any_flavor momentum -> one_compatible p momentum && all_compatible p p_in momentum | And [] -> false | And cs -> List.for_all to_select_wf' cs in not (List.mem f cascades.flavors) && to_select_wf' cascades.wf (* In case you're wondering: [to_on_shell f p] and [is_gauss f p] only search for on shell conditions and are to be used in a target, not in [Fusion]! *) let to_on_shell cascades f p = let f' = M.conjugate f in let rec to_on_shell' = function | True | False | Any_flavor _ | Off_shell (_, _) | Off_shell_not (_, _) | Gauss (_, _) | Gauss_not (_, _) -> false | On_shell (flavors, momentum) -> (p = momentum || p = P.neg momentum) && (List.mem f flavors || List.mem f' flavors) | On_shell_not (flavors, momentum) -> (p = momentum || p = P.neg momentum) && not (List.mem f flavors || List.mem f' flavors) | And [] -> false | And cs -> List.for_all to_on_shell' cs in to_on_shell' cascades let to_gauss cascades f p = let f' = M.conjugate f in let rec to_gauss' = function | True | False | Any_flavor _ | Off_shell (_, _) | Off_shell_not (_, _) | On_shell (_, _) | On_shell_not (_, _) -> false | Gauss (flavors, momentum) -> (p = momentum || p = P.neg momentum) && (List.mem f flavors || List.mem f' flavors) | Gauss_not (flavors, momentum) -> (p = momentum || p = P.neg momentum) && not (List.mem f flavors || List.mem f' flavors) | And [] -> false | And cs -> List.for_all to_gauss' cs in to_gauss' cascades module Fields = struct type f = M.flavor type c = M.constant list let compare = compare let conjugate = M.conjugate end module Fusions = Modeltools.Fusions (Fields) let dummy3 = Coupling.Scalar_Scalar_Scalar 1 let dummy4 = Coupling.Scalar4 1 - let dummyn = Coupling.UFOn (Algebra.QC.one, "dummy", [], Color.Trivial) + let dummyn = Coupling.UFO (Algebra.QC.one, "dummy", [], [], Color.Vertex.unit) (* Translate the vertices in a pair of lists: the first is the list of always rejected couplings and the second the remaining vertices suitable as input to [Fusions.of_vertices]. *) let translate_vertices vertices = List.fold_left (fun (cs, (v3, v4, vn) as acc) v -> match v.fields with | [] -> (v.couplings @ cs, (v3, v4, vn)) | [_] | [_;_] -> acc | [f1; f2; f3] -> (cs, (((f1, f2, f3), dummy3, v.couplings)::v3, v4, vn)) | [f1; f2; f3; f4] -> (cs, (v3, ((f1, f2, f3, f4), dummy4, v.couplings)::v4, vn)) | fs -> (cs, (v3, v4, (fs, dummyn, v.couplings)::vn))) ([], ([], [], [])) vertices (*i let fusion_to_string c f fs = M.flavor_to_string f ^ " <- " ^ M.constant_symbol c ^ "[" ^ String.concat " , " (List.map M.flavor_to_string fs) ^ "]" i*) let unpack_constant = function | Coupling.V3 (_, _, cs) -> cs | Coupling.V4 (_, _, cs) -> cs | Coupling.Vn (_, _, cs) -> cs (* Sometimes, the empty list is a wildcard and matches any coupling: *) let match_coupling c cs = List.mem c cs let match_coupling_wildcard c = function | [] -> true | cs -> match_coupling c cs let to_select_vtx cascades = match cascades.vertices with | [] -> (* No vertex constraints means that we always accept. *) (fun c f fs -> true) | vertices -> match translate_vertices vertices with | [], ([],[],[]) -> (* If [cascades.vertices] is not empty, we mustn't get here \ldots *) failwith "Cascade.to_select_vtx: unexpected" | couplings, ([],[],[]) -> (* No constraints on the fields. Just make sure that the coupling [c] doesn't appear in the vetoed [couplings]. *) (fun c f fs -> let c = unpack_constant c in not (match_coupling c couplings)) | couplings, vertices -> (* Make sure that [Fusions.of_vertices] is only evaluated once for efficiency. *) let fusions = Fusions.of_vertices vertices in (fun c f fs -> let c = unpack_constant c in (* Make sure that none of the vetoed [couplings] matches. Here an empty [couplings] list is \emph{not} a wildcard. *) if match_coupling c couplings then false else (* Also make sure that none of the vetoed [vertices] matches. Here an empty [couplings] list \emph{is} a wildcard. *) not (List.exists (fun (f', cs') -> let cs' = unpack_constant cs' in f = f' && match_coupling_wildcard c cs') (Fusions.fuse fusions fs))) (* \begin{dubious} Not a working implementation yet, but it isn't used either \ldots \end{dubious} *) module IPowSet = PowSet.Make (struct type t = int let compare = compare let to_string = string_of_int end) let rec coarsest_partition' = function | True | False -> IPowSet.empty | On_shell (_, momentum) | On_shell_not (_, momentum) | Off_shell (_, momentum) | Off_shell_not (_, momentum) | Gauss (_, momentum) | Gauss_not (_, momentum) | Any_flavor momentum -> IPowSet.of_lists [P.to_ints momentum] | And [] -> IPowSet.empty | And cs -> IPowSet.basis (IPowSet.union (List.map coarsest_partition' cs)) let coarsest_partition cascades = let p = coarsest_partition' cascades in if IPowSet.is_empty p then [] else IPowSet.to_lists p let part_to_string part = "{" ^ String.concat "," (List.map string_of_int part) ^ "}" let partition_to_string = function | [] -> "" | parts -> " grouping {" ^ String.concat "," (List.map part_to_string parts) ^ "}" let to_selectors = function | { wf = True; flavors = []; vertices = [] } -> no_cascades | c -> let partition = coarsest_partition c.wf in { select_p = to_select_p c.wf; select_wf = to_select_wf c; on_shell = to_on_shell c.wf; is_gauss = to_gauss c.wf; select_vtx = to_select_vtx c; partition = partition; description = Some (to_string c ^ partition_to_string partition) } (*i let to_selectors cascades = prerr_endline (">>> " ^ to_string cascades); to_selectors cascades i*) end (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/dirac.mli =================================================================== --- trunk/omega/src/dirac.mli (revision 0) +++ trunk/omega/src/dirac.mli (revision 8275) @@ -0,0 +1,71 @@ +(* dirac.mli -- + + Copyright (C) 1999-2017 by + + Wolfgang Kilian + Thorsten Ohl + Juergen Reuter + with contributions from + Christian Speckner + + WHIZARD is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + WHIZARD is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) + +(* \thocwmodulesection{Dirac $\gamma$-matrices} *) + +module type T = + sig + + (* Matrices with complex rational entries. *) + type qc = Algebra.QC.t + type t = qc array array + + (* Complex rational constants. *) + val zero : qc + val one : qc + val minus_one : qc + val i : qc + val minus_i : qc + + (* Basic $\gamma$-matrices. *) + val unit : t + val null : t + val gamma0 : t + val gamma1 : t + val gamma2 : t + val gamma3 : t + val gamma5 : t + + (* $(\gamma_0,\gamma_1,\gamma_2,\gamma_3)$ *) + val gamma : t array + + (* Charge conjugation *) + val cc : t + + (* Algebraic operations on $\gamma$-matrices *) + val neg : t -> t + val add : t -> t -> t + val sub : t -> t -> t + val mul : t -> t -> t + val times : qc -> t -> t + val transpose : t -> t + val adjoint : t -> t + val conj : t -> t + val product : t list -> t + + (* Unit tests *) + val test_suite : OUnit.test + end + +module Chiral : T Index: trunk/omega/src/tree.ml =================================================================== --- trunk/omega/src/tree.ml (revision 8274) +++ trunk/omega/src/tree.ml (revision 8275) @@ -1,760 +1,760 @@ (* tree.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* \thocwmodulesection{Abstract Data Type} *) type ('n, 'l) t = | Leaf of 'n * 'l | Node of 'n * ('n, 'l) t list let leaf n l = Leaf (n, l) let cons n children = Node (n, children) (* Presenting the leafs \textit{in order} comes naturally, but will be useful below. *) let rec leafs = function | Leaf (_, l) -> [l] | Node (_, ch) -> ThoList.flatmap leafs ch let node = function | Leaf (n, _) -> n | Node (n, _) -> n (* This guarantees that the root node can be stripped from the result by [List.tl]. *) let rec nodes = function | Leaf _ -> [] | Node (n, ch) -> n :: ThoList.flatmap nodes ch (* [first_match p list] returns [(x,list')], where [x] is the first element of [list] for which [p x = true] and [list'] is [list] sans [x]. *) let first_match p list = let rec first_match' no_match = function | [] -> invalid_arg "Tree.fuse: prospective root not found" | t :: rest when p t -> (t, List.rev_append no_match rest) | t :: rest -> first_match' (t :: no_match) rest in first_match' [] list (* One recursion step in [fuse'] rotates the topmost tree node, moving the prospective root up: \begin{equation} \label{eq:tree-rotation} \parbox{46\unitlength}{% \fmfframe(0,0)(0,4){% \begin{fmfgraph*}(45,30) \fmfstraight \fmftop{r} \fmfbottom{l11,l12,l1x,l1n,db1,l21,l22,l2x,l2n,db2,db3,db4,db5,db6,% lx1,lx2,lxx,lxn,db7,ln1,ln2,lnx,lnn} \fmf{plain,tension=4}{r,vr1} \fmf{plain,tension=4,lab=$p$,lab.side=left}{r,vr2} \fmf{dots,tension=4}{r,vrx} \fmf{plain,tension=4}{r,vrn} \fmf{plain}{vr1,l11}\fmf{plain}{vr1,l12} \fmf{dots}{vr1,l1x}\fmf{plain}{vr1,l1n} \fmf{plain}{vr2,l21}\fmf{plain}{vr2,l22} \fmf{dots}{vr2,l2x}\fmf{plain}{vr2,l2n} \fmf{dots}{vrx,lx1}\fmf{dots}{vrx,lx2} \fmf{dots}{vrx,lxx}\fmf{dots}{vrx,lxn} \fmf{plain}{vrn,ln1}\fmf{plain}{vrn,ln2} \fmf{dots}{vrn,lnx}\fmf{plain}{vrn,lnn} \fmfv{l=$r$,l.ang=-90}{l22} \fmfv{d.shape=circle,d.filled=empty,d.size=7thick,% back=.8white}{r,vr1,vrx,vrn} \fmfv{d.shape=circle,d.filled=empty,d.size=7thick,% lab=$R$,lab.dist=0}{vr2} \end{fmfgraph*}}} \to \parbox{61\unitlength}{% \fmfframe(0,0)(0,4){% \begin{fmfgraph*}(60,30) \fmfstraight \fmftop{r} \fmfbottom{l21,d1,d2,l22,d3,d4,l2x,d5,d6,l2n,d7,d8,db2,% l11,l12,l1x,l1n,db1,db2,db3,lx1,lx2,lxx,lxn,db4,% ln1,ln2,lnx,lnn} \fmf{plain}{r,vr1}\fmf{phantom}{vr1,l21} \fmf{plain}{r,vr2}\fmf{phantom}{vr2,l22} \fmf{dots}{r,vrx}\fmf{phantom}{vrx,l2x} \fmf{plain}{r,vr3}\fmf{phantom}{vr3,l2n} \fmf{plain,tension=12,lab=$-p$,lab.side=left}{r,vrn} \fmf{plain,tension=4}{vrn,vvr1} \fmf{dots,tension=4}{vrn,vvrx} \fmf{plain,tension=4}{vrn,vvrn} \fmf{plain}{vvr1,l11}\fmf{plain}{vvr1,l12} \fmf{dots}{vvr1,l1x}\fmf{plain}{vvr1,l1n} \fmf{dots}{vvrx,lx1}\fmf{dots}{vvrx,lx2} \fmf{dots}{vvrx,lxx}\fmf{dots}{vvrx,lxn} \fmf{plain}{vvrn,ln1}\fmf{plain}{vvrn,ln2} \fmf{dots}{vvrn,lnx}\fmf{plain}{vvrn,lnn} \fmfv{l=$r$,l.ang=-90}{vr2} \fmfv{d.shape=circle,d.filled=empty,d.size=7thick,% back=.8white}{vrn,vvr1,vvrx,vvrn} \fmfv{d.shape=circle,d.filled=empty,d.size=7thick,% lab=$R$,lab.dist=0}{r} \end{fmfgraph*}}} \end{equation} *) let fuse conjg root contains_root trees = let rec fuse' subtrees = match first_match contains_root subtrees with (* If the prospective root is contained in a leaf, we have either found the root---in which case we're done---or have failed catastrophically: *) | Leaf (n, l), children -> if l = root then Node (conjg n, children) else invalid_arg "Tree.fuse: root predicate inconsistent" (* Otherwise, we perform a rotation as in~(\ref{eq:tree-rotation}) and connect all nodes that do not contain the root to a new node. For efficiency, we append the new node at the end and prevent [first_match] from searching for the root in it in vain again. Since [root_children] is probably rather short, this should be a good strategy. *) | Node (n, root_children), other_children -> fuse' (root_children @ [Node (conjg n, other_children)]) in fuse' trees (* Sorting is also straightforward, we only have to keep track of the suprema of the subtrees: *) type ('a, 'b) with_supremum = { sup : 'a; data : 'b } -(* Since the lists are rather short, [Sort.list] could be replaced by +(* Since the lists are rather short, [List.sort] could be replaced by an optimized version, but we're not (yet) dealing with the most important speed bottleneck here: *) let rec sort' lesseq = function | Leaf (_, l) as e -> { sup = l; data = e } | Node (n, ch) -> - let ch' = Sort.list - (fun x y -> lesseq x.sup y.sup) (List.map (sort' lesseq) ch) in + let ch' = List.sort + (fun x y -> compare x.sup y.sup) (List.map (sort' lesseq) ch) in { sup = (List.hd (List.rev ch')).sup; data = Node (n, List.map (fun x -> x.data) ch') } (* finally, throw away the overall supremum: *) let sort lesseq t = (sort' lesseq t).data let rec canonicalize = function | Leaf (_, _) as l -> l | Node (n, ch) -> Node (n, List.sort compare (List.map canonicalize ch)) (* \thocwmodulesection{Homomorphisms} *) (* Isomophisms are simple: *) let rec map fn fl = function | Leaf (n, l) -> Leaf (fn n, fl l) | Node (n, ch) -> Node (fn n, List.map (map fn fl) ch) (* homomorphisms are not more complicated: *) let rec fold leaf node = function | Leaf (n, l) -> leaf n l | Node (n, ch) -> node n (List.map (fold leaf node) ch) (* and tensor products are fun: *) let rec fan leaf node = function | Leaf (n, l) -> leaf n l | Node (n, ch) -> Product.fold (fun ch' t -> node n ch' @ t) (List.map (fan leaf node) ch) [] (* \thocwmodulesection{Output} *) let leaf_to_string n l = if n = "" then l else if l = "" then n else n ^ "(" ^ l ^ ")" let node_to_string n ch = "(" ^ (if n = "" then "" else n ^ ":") ^ (String.concat "," ch) ^ ")" let to_string t = fold leaf_to_string node_to_string t (* \thocwmodulesubsection{Feynmf} Add a value that is greater than all suprema *) type 'a supremum_or_infinity = Infinity | Sup of 'a type ('a, 'b) with_supremum_or_infinity = { sup : 'a supremum_or_infinity; data : 'b } -let with_infinity lesseq x y = +let with_infinity cmp x y = match x.sup, y.sup with - | Infinity, _ -> false - | _, Infinity -> true - | Sup x', Sup y' -> lesseq x' y' + | Infinity, _ -> 1 + | _, Infinity -> -1 + | Sup x', Sup y' -> cmp x' y' (* Using this, we can sort the tree in another way that guarantees that a particular leaf ([i2]) is moved as far to the end as possible. We can then flip this leaf from outgoing to incoming without introducing a crossing: *) let rec sort_2i' lesseq i2 = function | Leaf (_, l) as e -> { sup = if l = i2 then Infinity else Sup l; data = e } | Node (n, ch) -> - let ch' = Sort.list (with_infinity lesseq) + let ch' = List.sort (with_infinity compare) (List.map (sort_2i' lesseq i2) ch) in { sup = (List.hd (List.rev ch')).sup; data = Node (n, List.map (fun x -> x.data) ch') } (* again, throw away the overall supremum: *) let sort_2i lesseq i2 t = (sort_2i' lesseq i2 t).data type feynmf = { style : (string * string) option; rev : bool; label : string option; tension : float option } open Printf let style prop = match prop.style with | None -> ("plain","") | Some s -> s let species prop = fst (style prop) let tex_lbl prop = snd (style prop) let leaf_label tex io leaf lab = function | None -> fprintf tex " \\fmflabel{${%s}$}{%s%s}\n" lab io leaf | Some s -> fprintf tex " \\fmflabel{${%s{}^{(%s)}}$}{%s%s}\n" s lab io leaf let leaf_label tex io leaf lab label = () (* We try to draw diagrams more symmetrically by reducing the tension on the outgoing external lines. \begin{dubious} \index{shortcomings!algorithmical} This is insufficient for asymmetrical cascade decays. \end{dubious} *) let rec leaf_node tex to_label i2 n prop leaf = let io, tension, rev = if leaf = i2 then ("i", "", not prop.rev) else ("o", ",tension=0.5", prop.rev) in leaf_label tex io (to_label leaf) (tex_lbl prop) prop.label ; fprintf tex " \\fmfdot{v%d}\n" n; if rev then fprintf tex " \\fmf{%s%s}{%s%s,v%d}\n" (species prop) tension io (to_label leaf) n else fprintf tex " \\fmf{%s%s}{v%d,%s%s}\n" (species prop) tension n io (to_label leaf) and int_node tex to_label i2 n n' prop t = if prop.rev then fprintf tex " \\fmf{%s,label=\\begin{scriptsize}${%s}$\\end{scriptsize}}{v%d,v%d}\n" (species prop) (tex_lbl prop) n' n else fprintf tex " \\fmf{%s,label=\\begin{scriptsize}${%s}$\\end{scriptsize}}{v%d,v%d}\n" (species prop) (tex_lbl prop) n n'; fprintf tex " \\fmfdot{v%d,v%d}\n" n n'; edges_feynmf' tex to_label i2 n' t and leaf_or_int_node tex to_label i2 n n' = function | Leaf (prop, l) -> leaf_node tex to_label i2 n prop l | Node (prop, _) as t -> int_node tex to_label i2 n n' prop t and edges_feynmf' tex to_label i2 n = function | Leaf (prop, l) -> leaf_node tex to_label i2 n prop l | Node (_, ch) -> ignore (List.fold_right (fun t' n' -> leaf_or_int_node tex to_label i2 n n' t'; succ n') ch (4*n)) let edges_feynmf tex to_label i1 i2 t = let n = 1 in begin match t with | Leaf _ -> () | Node (prop, _) -> leaf_label tex "i" "1" (tex_lbl prop) prop.label; if prop.rev then fprintf tex " \\fmf{%s}{v%d,i%s}\n" (species prop) n (to_label i1) else fprintf tex " \\fmf{%s}{i%s,v%d}\n" (species prop) (to_label i1) n end; fprintf tex " \\fmfdot{v%d}\n" n; edges_feynmf' tex to_label i2 n t let to_feynmf_channel tex to_TeX to_label incoming t = match incoming with | i1 :: i2 :: _ -> let t' = sort_2i (<=) i2 t in let out = List.filter (fun a -> i2 <> a) (leafs t') in fprintf tex "\\fmfframe(8,7)(8,6){%%\n"; fprintf tex " \\begin{fmfgraph*}(35,30)\n"; fprintf tex " \\fmfpen{thin}\n"; fprintf tex " \\fmfset{arrow_len}{2mm}\n"; fprintf tex " \\fmfleft{i%s,i%s}\n" (to_label i1) (to_label i2); fprintf tex " \\fmfright{o%s}\n" (String.concat ",o" (List.map to_label out)); List.iter (fun s -> fprintf tex " \\fmflabel{${%s}$}{i%s}\n" (to_TeX s) (to_label s)) [i1; i2]; List.iter (fun s -> fprintf tex " \\fmflabel{${%s}$}{o%s}\n" (to_TeX s) (to_label s)) out; edges_feynmf tex to_label i1 i2 t'; fprintf tex " \\end{fmfgraph*}}\\hfil\\allowbreak\n" | _ -> () (* \begin{figure} \fmfframe(3,5)(3,5){% \begin{fmfgraph*}(30,30) \fmfleft{i1,i2} \fmfright{o3,o4,o5,o6} \fmflabel{$1$}{i1} \fmflabel{$2$}{i2} \fmflabel{$3$}{o3} \fmflabel{$4$}{o4} \fmflabel{$5$}{o5} \fmflabel{$6$}{o6} \fmf{plain}{i1,v1} \fmf{plain}{v1,v3} \fmf{plain,tension=0.5}{v3,o3} \fmf{plain}{v3,v9} \fmf{plain,tension=0.5}{v9,o4} \fmf{plain}{v9,v27} \fmf{plain,tension=0.5}{v27,o5} \fmf{plain,tension=0.5}{v27,o6} \fmf{plain}{v1,i2} \end{fmfgraph*}} \fmfframe(3,5)(3,5){% \begin{fmfgraph*}(30,30) \fmfleft{i1,i2} \fmfright{o3,o4,o6,o5} \fmflabel{$1$}{i1} \fmflabel{$2$}{i2} \fmflabel{$3$}{o3} \fmflabel{$4$}{o4} \fmflabel{$6$}{o6} \fmflabel{$5$}{o5} \fmf{plain}{i1,v1} \fmf{plain}{v1,v3} \fmf{plain,tension=0.5}{v3,o3} \fmf{plain}{v3,v9} \fmf{plain}{v9,v27} \fmf{plain,tension=0.5}{v27,o4} \fmf{plain,tension=0.5}{v27,o6} \fmf{plain,tension=0.5}{v9,o5} \fmf{plain}{v1,i2} \end{fmfgraph*}} \fmfframe(3,5)(3,5){% \begin{fmfgraph*}(30,30) \fmfleft{i1,i2} \fmfright{o3,o4,o5,o6} \fmflabel{$1$}{i1} \fmflabel{$2$}{i2} \fmflabel{$3$}{o3} \fmflabel{$4$}{o4} \fmflabel{$5$}{o5} \fmflabel{$6$}{o6} \fmf{plain}{i1,v1} \fmf{plain}{v1,v3} \fmf{plain}{v3,v9} \fmf{plain,tension=0.5}{v9,o3} \fmf{plain,tension=0.5}{v9,o4} \fmf{plain}{v3,v10} \fmf{plain,tension=0.5}{v10,o5} \fmf{plain,tension=0.5}{v10,o6} \fmf{plain}{v1,i2} \end{fmfgraph*}} \caption{\label{fig:to_feynmf}% Note that this is subtly different \ldots} \end{figure} *) let vanilla = { style = None; rev = false; label = None; tension = None } let sty (s, r, l) = { vanilla with style = Some s; rev = r; label = Some l } type 'l feynmf_set = { header : string; incoming : 'l list; diagrams : (feynmf, 'l) t list } type ('l, 'm) feynmf_sets = { outer : 'l feynmf_set; inner : 'm feynmf_set list } type 'l feynmf_levels = { this : 'l feynmf_set; lower : 'l feynmf_levels list } let latex_section = function | level when level < 0 -> "part" | 0 -> "chapter" | 1 -> "section" | 2 -> "subsection" | 3 -> "subsubsection" | 4 -> "paragraph" | _ -> "subparagraph" let rec feynmf_set tex sections level to_TeX to_label set = fprintf tex "%s\\%s{%s}\n" (if sections then "" else "%%% ") (latex_section level) set.header; List.iter (to_feynmf_channel tex to_TeX to_label set.incoming) set.diagrams let feynmf_sets tex sections level to_TeX_outer to_label_outer to_TeX_inner to_label_inner set = feynmf_set tex sections level to_TeX_outer to_label_outer set.outer; List.iter (feynmf_set tex sections (succ level) to_TeX_inner to_label_inner) set.inner let feynmf_sets_plain sections level file to_TeX_outer to_label_outer to_TeX_inner to_label_inner sets = let tex = open_out (file ^ ".tex") in List.iter (feynmf_sets tex sections level to_TeX_outer to_label_outer to_TeX_inner to_label_inner) sets; close_out tex let feynmf_header tex file = fprintf tex "\\documentclass[10pt]{article}\n"; fprintf tex "\\usepackage{ifpdf}\n"; fprintf tex "\\usepackage[colorlinks]{hyperref}\n"; fprintf tex "\\usepackage[a4paper,margin=1cm]{geometry}\n"; fprintf tex "\\usepackage{feynmp}\n"; fprintf tex "\\ifpdf\n"; fprintf tex " \\DeclareGraphicsRule{*}{mps}{*}{}\n"; fprintf tex "\\else\n"; fprintf tex " \\DeclareGraphicsRule{*}{eps}{*}{}\n"; fprintf tex "\\fi\n"; fprintf tex "\\setlength{\\unitlength}{1mm}\n"; fprintf tex "\\setlength{\\parindent}{0pt}\n"; fprintf tex "\\renewcommand{\\mathstrut}{\\protect\\vphantom{\\hat{0123456789}}}\n"; fprintf tex "\\begin{document}\n"; fprintf tex "\\tableofcontents\n"; fprintf tex "\\begin{fmffile}{%s-fmf}\n\n" file let feynmf_footer tex = fprintf tex "\n"; fprintf tex "\\end{fmffile} \n"; fprintf tex "\\end{document} \n" let feynmf_sets_wrapped latex file to_TeX_outer to_label_outer to_TeX_inner to_label_inner sets = let tex = open_out (file ^ ".tex") in if latex then feynmf_header tex file; List.iter (feynmf_sets tex latex 1 to_TeX_outer to_label_outer to_TeX_inner to_label_inner) sets; if latex then feynmf_footer tex; close_out tex let rec feynmf_levels tex sections level to_TeX to_label set = fprintf tex "%s\\%s{%s}\n" (if sections then "" else "%%% ") (latex_section level) set.this.header; List.iter (to_feynmf_channel tex to_TeX to_label set.this.incoming) set.this.diagrams; List.iter (feynmf_levels tex sections (succ level) to_TeX to_label) set.lower let feynmf_levels_plain sections level file to_TeX to_label sets = let tex = open_out (file ^ ".tex") in List.iter (feynmf_levels tex sections level to_TeX to_label) sets; close_out tex let feynmf_levels_wrapped file to_TeX to_label sets = let tex = open_out (file ^ ".tex") in feynmf_header tex file; List.iter (feynmf_levels tex true 1 to_TeX to_label) sets; feynmf_footer tex; close_out tex (* \thocwmodulesection{Least Squares Layout} \begin{equation} L = \frac{1}{2} \sum_{i\not=i'} T_{ii'} \left(x_i-x_{i'}\right)^2 + \frac{1}{2} \sum_{i,j} T'_{ij} \left(x_i-e_j\right)^2 \end{equation} and thus \begin{equation} 0 = \frac{\partial L}{\partial x_i} = \sum_{i'\not=i} T_{ii'} \left(x_i-x_{i'}\right) + \sum_{j} T'_{ij} \left(x_i-e_j\right) \end{equation} or \begin{equation} \label{eq:layout} \left(\sum_{i'\not=i} T_{ii'} + \sum_{j} T'_{ij}\right) x_i - \sum_{i'\not=i} T_{ii'} x_{i'} = \sum_{j} T'_{ij} e_j \end{equation} where we can assume that \begin{subequations} \begin{align} T_{ii'} &= T_{i'i} \\ T_{ii} &= 0 \end{align} \end{subequations} *) type 'a node_with_tension = { node : 'a; tension : float } let unit_tension t = map (fun n -> { node = n; tension = 1.0 }) (fun l -> l) t let leafs_and_nodes i2 t = let t' = sort_2i (<=) i2 t in match nodes t' with | [] -> failwith "Tree.nodes_and_leafs: impossible" | i1 :: _ as n -> (i1, i2, List.filter (fun l -> l <> i2) (leafs t'), n) (* Not tail recursive, but they're unlikely to meet any deep trees: *) let rec internal_edges_from n = function | Leaf _ -> [] | Node (n', ch) -> (n', n) :: (ThoList.flatmap (internal_edges_from n') ch) (* The root node of the tree represents a vertex (node) and an external line (leaf) of the Feynman diagram simultaneously. Thus it requires special treatment: *) let internal_edges = function | Leaf _ -> [] | Node (n, ch) -> ThoList.flatmap (internal_edges_from n) ch let rec external_edges_from n = function | Leaf (n', _) -> [(n', n)] | Node (n', ch) -> ThoList.flatmap (external_edges_from n') ch let external_edges = function | Leaf (n, _) -> [(n, n)] | Node (n, ch) -> (n, n) :: ThoList.flatmap (external_edges_from n) ch type ('edge, 'node, 'ext) graph = { int_nodes : 'node array; ext_nodes : 'ext array; int_edges : ('edge * int * int) list; ext_edges : ('edge * int * int) list } module M = Pmap.Tree (* Invert an array, viewed as a map from non-negative integers into a set. The result is a map from the set to the integers: [val invert_array : 'a array -> ('a, int) M.t] *) let invert_array_unsafe a = fst (Array.fold_left (fun (m, i) a_i -> (M.add compare a_i i m, succ i)) (M.empty, 0) a) exception Not_invertible let add_unique key data map = if M.mem compare key map then raise Not_invertible else M.add compare key data map let invert_array a = fst (Array.fold_left (fun (m, i) a_i -> (add_unique a_i i m, succ i)) (M.empty, 0) a) let graph_of_tree nodes2edge conjugate i2 t = let i1, i2, out, vertices = leafs_and_nodes i2 t in let int_nodes = Array.of_list vertices and ext_nodes = Array.of_list (conjugate i1 :: i2 :: out) in let int_nodes_index_table = invert_array int_nodes and ext_nodes_index_table = invert_array ext_nodes in let int_nodes_index n = M.find compare n int_nodes_index_table and ext_nodes_index n = M.find compare n ext_nodes_index_table in { int_nodes = int_nodes; ext_nodes = ext_nodes; int_edges = List.map (fun (n1, n2) -> (nodes2edge n1 n2, int_nodes_index n1, int_nodes_index n2)) (internal_edges t); ext_edges = List.map (fun (e, n) -> let e' = if e = i1 then conjugate e else e in (nodes2edge e' n, ext_nodes_index e', int_nodes_index n)) (external_edges t) } let int_incidence f null g = let n = Array.length g.int_nodes in let incidence = Array.make_matrix n n null in List.iter (fun (edge, n1, n2) -> if n1 <> n2 then begin let edge' = f edge g.int_nodes.(n1) g.int_nodes.(n2) in incidence.(n1).(n2) <- edge'; incidence.(n2).(n1) <- edge' end) g.int_edges; incidence let ext_incidence f null g = let n_int = Array.length g.int_nodes and n_ext = Array.length g.ext_nodes in let incidence = Array.make_matrix n_int n_ext null in List.iter (fun (edge, e, n) -> incidence.(n).(e) <- f edge g.ext_nodes.(e) g.int_nodes.(n)) g.ext_edges; incidence let division n = if n < 0 then [] else if n = 1 then [0.5] else let n' = pred n in let d = 1.0 /. (float n') in let rec division' i acc = if i < 0 then acc else division' (pred i) (float i *. d :: acc) in division' n' [] type ('e, 'n, 'ext) ext_layout = ('e, 'n, 'ext * float * float) graph type ('e, 'n, 'ext) layout = ('e, 'n * float * float, 'ext) ext_layout let left_to_right num_in g = if num_in < 1 then invalid_arg "left_to_right" else let num_out = Array.length g.ext_nodes - num_in in if num_out < 1 then invalid_arg "left_to_right" else let incoming = List.map2 (fun e y -> (e, 0.0, y)) (Array.to_list (Array.sub g.ext_nodes 0 num_in)) (division num_in) and outgoing = List.map2 (fun e y -> (e, 1.0, y)) (Array.to_list (Array.sub g.ext_nodes num_in num_out)) (division num_out) in { g with ext_nodes = Array.of_list (incoming @ outgoing) } (* Reformulating~(\ref{eq:layout}) \begin{subequations} \begin{align} Ax &= b_x \\ Ay &= b_y \end{align} \end{subequations} with \begin{subequations} \begin{align} A_{ii'} &= \left( \sum_{i''\not=i} T_{ii''} + \sum_j T'_{ij} \right) \delta_{ii'} - T_{ii'} \\ (b_{x/y})_i &= \sum_j T'_{ij} (e_{x/y})_j \end{align} \end{subequations} *) let sum a = Array.fold_left (+.) 0.0 a let tension_to_equation t t' e = let xe, ye = List.split e in let bx = Linalg.matmulv t' (Array.of_list xe) and by = Linalg.matmulv t' (Array.of_list ye) and a = Array.init (Array.length t) (fun i -> let a_i = Array.map (~-.) t.(i) in a_i.(i) <- a_i.(i) +. sum t.(i) +. sum t'.(i); a_i) in (a, bx, by) let layout g = let ext_nodes = List.map (fun (_, x, y) -> (x, y)) (Array.to_list g.ext_nodes) in let a, bx, by = tension_to_equation (int_incidence (fun _ _ _ -> 1.0) 0.0 g) (ext_incidence (fun _ _ _ -> 1.0) 0.0 g) ext_nodes in match Linalg.solve_many a [bx; by] with | [x; y] -> { g with int_nodes = Array.mapi (fun i n -> (n, x.(i), y.(i))) g.int_nodes } | _ -> failwith "impossible" let iter_edges f g = List.iter (fun (edge, n1, n2) -> let _, x1, y1 = g.int_nodes.(n1) and _, x2, y2 = g.int_nodes.(n2) in f edge (x1, y1) (x2, y2)) g.int_edges; List.iter (fun (edge, e, n) -> let _, x1, y1 = g.ext_nodes.(e) and _, x2, y2 = g.int_nodes.(n) in f edge (x1, y1) (x2, y2)) g.ext_edges let iter_internal f g = Array.iter (fun (node, x, y) -> f (x, y)) g.int_nodes let iter_incoming f g = f g.ext_nodes.(0); f g.ext_nodes.(1) let iter_outgoing f g = for i = 2 to pred (Array.length g.ext_nodes) do f g.ext_nodes.(i) done let dump g = Array.iter (fun (_, x, y) -> Printf.eprintf "(%g,%g) " x y) g.ext_nodes; Printf.eprintf "\n => "; Array.iter (fun (_, x, y) -> Printf.eprintf "(%g,%g) " x y) g.int_nodes; Printf.eprintf "\n" (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/thoList.mli =================================================================== --- trunk/omega/src/thoList.mli (revision 8274) +++ trunk/omega/src/thoList.mli (revision 8275) @@ -1,173 +1,186 @@ (* thoList.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* [splitn n l = (hdn l, tln l)], but more efficient. *) val hdn : int -> 'a list -> 'a list val tln : int -> 'a list -> 'a list val splitn : int -> 'a list -> 'a list * 'a list +(* [split_last (l @ [a]) = (l, a)] *) +val split_last : 'a list -> 'a list * 'a + (* [chop n l] chops [l] into pieces of size [n] (except for the last one, which contains th remainder). *) val chopn : int -> 'a list -> 'a list list +(* [cycle_until a l] finds a member [a] in the list [l] and returns the + cyclically permuted list with [a] as head. Raises [Not_found] if + [a] is not in [l]. *) +val cycle_until : 'a -> 'a list -> 'a list + +(* [cycle n l] cyclically permute the list [l] by [n >= 0] + positions. Raises [Not_found] [List.length l > n]. + NB: [cycle n l = tln n l @ hdn n l], but more efficient. *) +val cycle : int -> 'a list -> 'a list + (* [of_subarray n m a] is $[\ocwlowerid{a.}(\ocwlowerid{n}); \ocwlowerid{a.}(\ocwlowerid{n}+1);\ldots; \ocwlowerid{a.}(\ocwlowerid{m})]$. Values of~[n] and~[m] out of bounds are silently shifted towards these bounds. *) val of_subarray : int -> int -> 'a array -> 'a list (* [range s n m] is $[\ocwlowerid{n}; \ocwlowerid{n}+\ocwlowerid{s}; \ocwlowerid{n}+2\ocwlowerid{s};\ldots; \ocwlowerid{m} - ((\ocwlowerid{m}-\ocwlowerid{n})\mod s)]$ *) val range : ?stride:int -> int -> int -> int list (* [enumerate s n [a1;a2;...] is [(n,a1); (n+s,a2); ...] *) val enumerate : ?stride:int -> int -> 'a list -> (int * 'a) list (* [alist_of_list ~predicate ~offset list] takes the elements of [list] that satisfy [predicate] and forms a list of pairs of an offset into the original [list] and the element with the offsets starting from [offset]. NB: the order of the returned alist is not specified! *) val alist_of_list : ?predicate:('a -> bool) -> ?offset:int -> 'a list -> (int * 'a) list (* Compress identical elements in a sorted list. Identity is determined using the polymorphic equality function [Pervasives.(=)]. *) val uniq : 'a list -> 'a list (* Test if all members of a list are structurally identical (actually [homogeneous l] and [List.length (uniq l) <= 1] are equivalent, but the former is more efficient if a mismatch comes early). *) val homogeneous : 'a list -> bool (* If all elements of the list [l] appear exactly twice, [pairs l] returns a sorted list with these elements appearing once. Otherwise [Invalid_argument] is raised. *) val pairs : 'a list -> 'a list (* [compare cmp l1 l2] compare two lists [l1] and [l2] according to [cmp]. [cmp] defaults to the polymorphic [Pervasives.compare]. *) val compare : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int (* Collect and count identical elements in a list. Identity is determined using the polymorphic equality function [Pervasives.(=)]. [classify] does not assume that the list is sorted. However, it is~$O(n)$ for sorted lists and~$O(n^2)$ in the worst case. *) val classify : 'a list -> (int * 'a) list (* Collect the second factors with a common first factor in lists. \label{ThoList.factorize} *) val factorize : ('a * 'b) list -> ('a * 'b list) list (* [flatmap f] is equivalent to $\ocwlowerid{flatten} \circ (\ocwlowerid{map}\;\ocwlowerid{f})$, but more efficient, because no intermediate lists are built. Unfortunately, it is not tail recursive. *) val flatmap : ('a -> 'b list) -> 'a list -> 'b list (* [rev_flatmap f] is equivalent to $\ocwlowerid{flatten} \circ (\ocwlowerid{rev\_map}\;(\ocwlowerid{rev}\circ\ocwlowerid{f})) = \ocwlowerid{rev}\circ(\ocwlowerid{flatmap}\;\ocwlowerid{f})$, but more efficient, because no intermediate lists are built. It is tail recursive. *) val rev_flatmap : ('a -> 'b list) -> 'a list -> 'b list val clone : int -> 'a -> 'a list val multiply : int -> 'a list -> 'a list (* \begin{dubious} Invent other names to avoid confusions with [List.fold_left2] and [List.fold_right2]. \end{dubious} *) val fold_right2 : ('a -> 'b -> 'b) -> 'a list list -> 'b -> 'b val fold_left2 : ('b -> 'a -> 'b) -> 'b -> 'a list list -> 'b (* [iteri f n [a;b;c]] evaluates [f n a], [f (n+1) b] and [f (n+2) c]. *) val iteri : (int -> 'a -> unit) -> int -> 'a list -> unit val mapi : (int -> 'a -> 'b) -> int -> 'a list -> 'b list (* [iteri2 f n m [[aa;ab];[ba;bb]]] evaluates [f n m aa], [f n (m+1) ab], [f (n+1) m ba] and [f (n+1) (m+1) bb]. NB: the nested lists need not be rectangular. *) val iteri2 : (int -> int -> 'a -> unit) -> int -> int -> 'a list list -> unit (* Transpose a \emph{rectangular} list of lists like a matrix. *) val transpose : 'a list list -> 'a list list (* [interleave f list] walks through [list] and inserts the result of [f] applied to the reversed list of elements before and the list of elements after. The empty lists at the beginning and end are included! *) val interleave : ('a list -> 'a list -> 'a list) -> 'a list -> 'a list (* [interleave_nearest f list] is like [interleave f list], but [f] looks only at the nearest neighbors. *) val interleave_nearest : ('a -> 'a -> 'a list) -> 'a list -> 'a list (* [partitioned_sort cmp index_sets list] sorts the sublists of [list] specified by the [index_sets] and the complement of their union. \textbf{NB:} the sorting follows to order in the lists in [index_sets]. \textbf{NB:} the indices are 0-based. *) val partitioned_sort : ('a -> 'a -> int) -> int list list -> 'a list -> 'a list exception Overlapping_indices exception Out_of_bounds (* [ariadne_sort cmp list] sorts [list] according to [cmp] (default [Pervasives.compare]) keeping track of the original order by a 0-based list of indices. *) val ariadne_sort : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list * int list (* [ariadne_unsort (ariadne_sort cmp list)] returns [list]. *) val ariadne_unsort : 'a list * int list -> 'a list (* [lexicographic cmp list1 list2] compares [list1] and [list2] lexicographically. *) val lexicographic : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int (* [common l1 l2] returns the elements common to the lists [l1] and [l2]. The lists are not required to be ordered and the result will also not be ordered. *) val common : 'a list -> 'a list -> 'a list (* [complement l1 l2] returns the list [l1] with elements of list [l2] removed. The lists are not required to be ordered. Raises [Invalid_argument "ThoList.complement"], if a member of [l1] is not in [l1]. *) val complement : 'a list -> 'a list -> 'a list val to_string : ('a -> string) -> 'a list -> string module Test : sig val suite : OUnit.test end (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/omega_NMSSM_CKM.ml =================================================================== --- trunk/omega/src/omega_NMSSM_CKM.ml (revision 8274) +++ trunk/omega/src/omega_NMSSM_CKM.ml (revision 8275) @@ -1,35 +1,35 @@ (* omega_NMSSM_CKM.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23_Majorana)(Targets.Fortran_Majorana) +module O = Omega.Make(Fusion_vintage.Mixed23_Majorana)(Targets.Fortran_Majorana) (Modellib_NMSSM.NMSSM_func(Modellib_NMSSM.NMSSM_CKM)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/tuple.mli =================================================================== --- trunk/omega/src/tuple.mli (revision 8274) +++ trunk/omega/src/tuple.mli (revision 8275) @@ -1,208 +1,209 @@ (* tuple.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) (* The [Tuple.Poly] interface abstracts the notion of tuples with variable arity. Simple cases are binary polytuples, which are simply pairs and indefinite polytuples, which are nothing but lists. Another example is the union of pairs and triples. The interface is very similar to [List] from the O'Caml standard library, but the [Tuple.Poly] signature allows a more fine grained control of arities. The latter provides typesafe linking of models, targets and topologies. *) module type Mono = sig type 'a t val arity : 'a t -> int val max_arity : unit -> int val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int val for_all : ('a -> bool) -> 'a t -> bool val map : ('a -> 'b) -> 'a t -> 'b t val iter : ('a -> unit) -> 'a t -> unit val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b (* We have applications, where no sensible intial value can be defined: *) val fold_left_internal : ('a -> 'a -> 'a) -> 'a t -> 'a val fold_right_internal : ('a -> 'a -> 'a) -> 'a t -> 'a val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t val split : ('a * 'b) t -> 'a t * 'b t (* The distributive tensor product expands a tuple of lists into list of tuples, e.\,g.~for binary tuples: \begin{equation} \ocwlowerid{product}\, (\lbrack x_1;x_2\rbrack,\lbrack y_1;y_2\rbrack) = \lbrack (x_1,y_1);(x_1,y_2);(x_2,y_1);(x_2,y_2)\rbrack \end{equation} NB: [product_fold] is usually much more memory efficient than the combination of [product] and [List.fold_right] for large sets. *) val product : 'a list t -> 'a t list val product_fold : ('a t -> 'b -> 'b) -> 'a list t -> 'b -> 'b (* For homogeneous tuples the [power] function could trivially be built from [product], e.\,g.: \begin{equation} \ocwlowerid{power}\,\lbrack x_1;x_2\rbrack = \ocwlowerid{product}\,(\lbrack x_1;x_2\rbrack,\lbrack x_1;x_2\rbrack) = \lbrack (x_1,x_1);(x_1,x_2);(x_2,x_1);(x_2,x_2)\rbrack \end{equation} but it is also well defined for polytuples, e.\,g.~for pairs and triples \begin{equation} \ocwlowerid{power}\,\lbrack x_1;x_2\rbrack = \ocwlowerid{product}\,(\lbrack x_1;x_2\rbrack,\lbrack x_1;x_2\rbrack) \cup \ocwlowerid{product}\, (\lbrack x_1;x_2\rbrack,\lbrack x_1;x_2\rbrack,\lbrack x_1;x_2\rbrack) \end{equation} For tuples and polytuples with bounded arity, the [power] and [power_fold] functions terminate. In polytuples with unbounded arity, the the [power] function always raises [No_termination]. [power_fold] also raises [No_termination], but could be changed to run until the argument function raises an exception. However, if we need this behaviour, we should implemente [power_iter] instead. *) val power : 'a list -> 'a t list val power_fold : ('a t -> 'b -> 'b) -> 'a list -> 'b -> 'b (* We can also identify all (poly)tuples with permuted elements and return only one representative, e.\,g.: \begin{equation} \ocwlowerid{sym\_power}\,\lbrack x_1;x_2\rbrack = \lbrack (x_1,x_1);(x_1,x_2);(x_2,x_2)\rbrack \end{equation} NB: this function has not yet been implemented, because O'Mega only needs the more efficient special case [graded_sym_power]. *) (* If a set $X$ is graded (i.\,e.~there is a map $\phi:X\to\mathbf{N}$, called [rank] below), the results of [power] or [sym_power] can canonically be filtered by requiring that the sum of the ranks in each (poly)tuple has one chosen value. Implementing such a function directly is much more efficient than constructing and subsequently disregarding many (poly)tuples. The elements of rank $n$ are at offset $(n-1)$ in the array. The array is assumed to be \emph{immutable}, even if O'Caml doesn't support immutable arrays. NB: [graded_power] has not yet been implemented, because O'Mega only needs [graded_sym_power]. *) type 'a graded = 'a list array val graded_sym_power : int -> 'a graded -> 'a t list val graded_sym_power_fold : int -> ('a t -> 'b -> 'b) -> 'a graded -> 'b -> 'b (* \begin{dubious} We hope to be able to avoid the next one in the long run, because it mildly breaks typesafety for arities. Unfortunately, we're still working on it \ldots \end{dubious} *) val to_list : 'a t -> 'a list (* \begin{dubious} - The next one is only used for Fermi statistics below, but can not + The next one is only used for Fermi statistics in the obsolescent + [Fusion_vintage] module below, but can not be implemented if there are no binary tuples. It must be retired as soon as possible. \end{dubious} *) val of2_kludge : 'a -> 'a -> 'a t end module type Poly = sig include Mono exception Mismatched_arity exception No_termination end module type Binary = sig include Poly (* should become [Mono]! *) val of2 : 'a -> 'a -> 'a t end module Binary : Binary module type Ternary = sig include Mono val of3 : 'a -> 'a -> 'a -> 'a t end module Ternary : Ternary type 'a pair_or_triple = T2 of 'a * 'a | T3 of 'a * 'a *'a module type Mixed23 = sig include Poly val of2 : 'a -> 'a -> 'a t val of3 : 'a -> 'a -> 'a -> 'a t end module Mixed23 : Mixed23 module type Nary = sig include Poly val of2 : 'a -> 'a -> 'a t val of3 : 'a -> 'a -> 'a -> 'a t val of_list : 'a list -> 'a t end module Unbounded_Nary : Nary module type Bound = sig val max_arity : unit -> int end module Nary (B: Bound) : Nary (* \begin{dubious} For compleneteness sake, we could add most of the [List] signature \begin{itemize} \item{} [val length : 'a t -> int] \item{} [val hd : 'a t -> 'a] \item{} [val nth : 'a t -> int -> 'a] \item{} [val rev : 'a t -> 'a t] \item{} [val rev_map : ('a -> 'b) -> 'a t -> 'b t] \item{} [val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit] \item{} [val rev_map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t] \item{} [val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b t -> 'c t -> 'a] \item{} [val fold_right2 : ('a -> 'b -> 'c -> 'c) -> 'a t -> 'b t -> 'c -> 'c] \item{} [val exists : ('a -> bool) -> 'a t -> bool] \item{} [val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool] \item{} [val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool] \item{} [val mem : 'a -> 'a t -> bool] \item{} [val memq : 'a -> 'a t -> bool] \item{} [val find : ('a -> bool) -> 'a t -> 'a] \item{} [val find_all : ('a -> bool) -> 'a t -> 'a list] \item{} [val assoc : 'a -> ('a * 'b) t -> 'b] \item{} [val assq : 'a -> ('a * 'b) t -> 'b] \item{} [val mem_assoc : 'a -> ('a * 'b) t -> bool] \item{} [val mem_assq : 'a -> ('a * 'b) t -> bool] \item{} [val combine : 'a t -> 'b t -> ('a * 'b) t] \item{} [val sort : ('a -> 'a -> int) -> 'a t -> 'a t] \item{} [val stable_sort : ('a -> 'a -> int) -> 'a t -> 'a t] \end{itemize} \end{dubious} but only if we ever have too much time on our hand \ldots *) (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/omega_MSSM_Grav.ml =================================================================== --- trunk/omega/src/omega_MSSM_Grav.ml (revision 8274) +++ trunk/omega/src/omega_MSSM_Grav.ml (revision 8275) @@ -1,35 +1,35 @@ (* omega_MSSM_Grav.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -module O = Omega.Make(Fusion.Mixed23_Majorana)(Targets.Fortran_Majorana) +module O = Omega.Make(Fusion_vintage.Mixed23_Majorana)(Targets.Fortran_Majorana) (Modellib_MSSM.MSSM(Modellib_MSSM.MSSM_Grav)) let _ = O.main () (*i * Local Variables: * mode:caml * indent-tabs-mode:nil * page-delimiter:"^(\\* .*\n" * End: i*) Index: trunk/omega/src/UFO_Lorentz.mli =================================================================== --- trunk/omega/src/UFO_Lorentz.mli (revision 0) +++ trunk/omega/src/UFO_Lorentz.mli (revision 8275) @@ -0,0 +1,96 @@ +(* UFO_Lorentz.mli -- + + Copyright (C) 1999-2017 by + + Wolfgang Kilian + Thorsten Ohl + Juergen Reuter + with contributions from + Christian Speckner + + WHIZARD is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + WHIZARD is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) + +(* \thocwmodulesection{Processed UFO Lorentz Structures} *) + +(* Just like [UFOx.Lorentz_Atom.dirac], but without the Dirac matrix indices. *) +type dirac = (* [private] *) + | Gamma5 + | ProjM + | ProjP + | Gamma of int + | Sigma of int * int + | C + +(* A sandwich of a string of $\gamma$-matrices. [bra] and [ket] are + positions of fields in the vertex, \emph{not} spinor indices. *) +type dirac_string = (* [private] *) + { bra : int; + ket : int; + gammas : dirac list } + +(* The Lorentz indices appearing in a term are either negative + internal summation indices or positive external polarization + indices. Note that the external + indices are not really indices, but denote the position + of the particle in the vertex. *) +type 'a term = (* [private] *) + { indices : int list; + atom : 'a } + +(* Split the list of indices into summation and polarization indices. *) +val classify_indices : int list -> int list * int list + +(* Replace the atom keeping the associated indices. *) +val map_atom : ('a -> 'b) -> 'a term -> 'b term + +(* A contraction consists of a (possibly empty) product of + Dirac strings and a (possibly empty) product of Lorentz + tensors with a rational coefficient. *) +type contraction = (* [private] *) + { coeff : Algebra.Q.t; + dirac : dirac_string term list; + vector : UFOx.Lorentz_Atom.vector term list } + +(* A sum of [contraction]s. *) +type t = contraction list + +(* Fermion line connections. *) +val fermion_lines : t -> Coupling.fermion_lines + +(* [parse spins lorentz] uses the [spins] to parse the + UFO [lorentz] structure as a list of [contraction]s. *) +val parse : Coupling.lorentz list -> UFOx.Lorentz.t -> t + +(* [map_indices f lorentz] applies the map [f] to the free + indices in [lorentz]. *) +val map_indices : (int -> int) -> t -> t +val map_fermion_lines : + (int -> int) -> Coupling.fermion_lines -> Coupling.fermion_lines + +(* Create a readable representation for debugging and + documenting generated code. *) +val to_string : t -> string +val fermion_lines_to_string : Coupling.fermion_lines -> string + +(* Punting \ldots *) +val dummy : t + +(* More debugging and documenting. *) +val dirac_string_to_string : dirac_string -> string + +(* [dirac_string_to_matrix substitute ds] take a string + of $\gamma$-matrices [ds], applies [substitute] to + the indices and returns the product as a matrix. *) +val dirac_string_to_matrix : (int -> int) -> dirac_string -> Dirac.Chiral.t Index: trunk/omega/src/permutation.mli =================================================================== --- trunk/omega/src/permutation.mli (revision 8274) +++ trunk/omega/src/permutation.mli (revision 8275) @@ -1,49 +1,75 @@ (* permutation.mli -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from cf. main AUTHORS file WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) module type T = sig + type t + + (* The argument list $\lbrack p_1;\ldots;p_n\rbrack$ must + contain every integer from~$0$ to~$n-1$ exactly once. *) val of_list : int list -> t val of_array : int array -> t + + (* [list (of_lists l l') l = l'] *) + val of_lists : 'a list -> 'a list -> t + val inverse : t -> t val compose : t -> t -> t + + (* [compose_inv p q = compose p (inverse q)], but more efficient. *) + val compose_inv : t -> t -> t + + (* If [p] is [of_list] $\lbrack p_1;\ldots;p_n\rbrack$, then + [list p] $\lbrack a_1;\ldots;a_n\rbrack$ reorders the list + $\lbrack a_1;\ldots;a_n\rbrack$ + in the sequence given by $\lbrack p_1;\ldots;p_n\rbrack$. + Thus the $\lbrack p_1;\ldots;p_n\rbrack$ are + \emph{not} used as a map of the indices reshuffling an array. + Instead they denote the new positions of the elements + of $\lbrack a_1;\ldots;a_n\rbrack$. + However [list (inverse p)] $\lbrack a_1;\ldots;a_n\rbrack$ + is $\lbrack a_{p_1};\ldots;a_{p_n}\rbrack$, by duality. *) + val list : t -> 'a list -> 'a list val array : t -> 'a array -> 'a array + val all : int -> t list val even : int -> t list val odd : int -> t list val cyclic : int -> t list val signed : int -> (int * t) list + (* Assuming fewer than 10 elements! *) val to_string : t -> string + end module Using_Lists : T module Using_Arrays : T module Default : T module Test : functor (P : T) -> sig val suite : OUnit.test val time : unit -> unit end Index: trunk/omega/src/UFOx.ml =================================================================== --- trunk/omega/src/UFOx.ml (revision 8274) +++ trunk/omega/src/UFOx.ml (revision 8275) @@ -1,869 +1,920 @@ (* vertex.ml -- Copyright (C) 1999-2019 by Wolfgang Kilian Thorsten Ohl Juergen Reuter with contributions from Christian Speckner WHIZARD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. WHIZARD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) let error_in_string text start_pos end_pos = let i = max 0 start_pos.Lexing.pos_cnum in let j = min (String.length text) (max (i + 1) end_pos.Lexing.pos_cnum) in String.sub text i (j - i) let error_in_file name start_pos end_pos = Printf.sprintf "%s:%d.%d-%d.%d" name start_pos.Lexing.pos_lnum (start_pos.Lexing.pos_cnum - start_pos.Lexing.pos_bol) end_pos.Lexing.pos_lnum (end_pos.Lexing.pos_cnum - end_pos.Lexing.pos_bol) module Expr = struct type t = UFOx_syntax.expr let of_string text = try UFOx_parser.input UFOx_lexer.token (UFOx_lexer.init_position "" (Lexing.from_string text)) with | UFOx_syntax.Syntax_Error (msg, start_pos, end_pos) -> invalid_arg (Printf.sprintf "syntax error (%s) at: `%s'" msg (error_in_string text start_pos end_pos)) | Parsing.Parse_error -> invalid_arg ("parse error: " ^ text) let of_strings = function | [] -> UFOx_syntax.integer 0 | string :: strings -> List.fold_right (fun s acc -> UFOx_syntax.add (of_string s) acc) strings (of_string string) open UFOx_syntax - let rec substitute name value = function + let rec map f = function | Integer _ | Float _ as e -> e | Variable s as e -> - if s = name then - value - else - e - | Sum (e1, e2) -> - Sum (substitute name value e1, substitute name value e2) - | Difference (e1, e2) -> - Difference (substitute name value e1, substitute name value e2) - | Product (e1, e2) -> - Product (substitute name value e1, substitute name value e2) - | Quotient (e1, e2) -> - Quotient (substitute name value e1, substitute name value e2) - | Power (e1, e2) -> - Power (substitute name value e1, substitute name value e2) - | Application (s, el) -> - Application (s, List.map (substitute name value) el) + begin match f s with + | Some value -> value + | None -> e + end + | Sum (e1, e2) -> Sum (map f e1, map f e2) + | Difference (e1, e2) -> Difference (map f e1, map f e2) + | Product (e1, e2) -> Product (map f e1, map f e2) + | Quotient (e1, e2) -> Quotient (map f e1, map f e2) + | Power (e1, e2) -> Power (map f e1, map f e2) + | Application (s, el) -> Application (s, List.map (map f) el) + + let substitute name value expr = + map (fun s -> if s = name then Some value else None) expr + + module SMap = Map.Make (struct type t = string let compare = compare end) + + let rename1 name_map name = + try Some (Variable (SMap.find name name_map)) with Not_found -> None + + let rename alist_names value = + let name_map = + List.fold_left + (fun acc (name, name') -> SMap.add name name' acc) + SMap.empty alist_names in + map (rename1 name_map) value let half name = Quotient (Variable name, Integer 2) end let positive integers = List.filter (fun (i, _) -> i > 0) integers let not_positive integers = List.filter (fun (i, _) -> i <= 0) integers let int_list_to_string is = "[" ^ String.concat ", " (List.map string_of_int is) ^ "]" module type Index = sig (* Indices are represented by a pair [int * 'r], where ['r] denotes the representation the index belongs to. *) (* [free indices] returns all free indices in the list [indices], i.\,e.~all positive indices. *) val free : (int * 'r) list -> (int * 'r) list (* [summation indices] returns all summation indices in the list [indices], i.\,e.~all negative indices. *) val summation : (int * 'r) list -> (int * 'r) list val classes_to_string : ('r -> string) -> (int * 'r) list -> string end module Index : Index = struct let free i = positive i let summation i = not_positive i let classes_to_string rep_to_string index_classes = let reps = ThoList.uniq (List.sort compare (List.map snd index_classes)) in "[" ^ String.concat ", " (List.map (fun r -> (rep_to_string r) ^ "=" ^ (int_list_to_string (List.map fst (List.filter (fun (_, r') -> r = r') index_classes)))) reps) ^ "]" end module type Atom = sig type t val map_indices : (int -> int) -> t -> t val of_expr : string -> UFOx_syntax.expr list -> t val to_string : t -> string type r val classify_indices : t list -> (int * r) list val rep_to_string : r -> string - val rep_of_int : int -> r + val rep_to_string_whizard : r -> string + val rep_of_int : bool -> int -> r val rep_conjugate : r -> r val rep_trivial : r -> bool type r_omega val omega : r -> r_omega end module type Tensor = sig type atom type t = (atom list * Algebra.Q.t) list val map_atoms : (atom -> atom) -> t -> t val map_indices : (int -> int) -> t -> t val of_expr : UFOx_syntax.expr -> t val of_string : string -> t val of_strings : string list -> t val to_string : t -> string type r val classify_indices : t -> (int * r) list val rep_to_string : r -> string - val rep_of_int : int -> r + val rep_to_string_whizard : r -> string + val rep_of_int : bool -> int -> r val rep_conjugate : r -> r val rep_trivial : r -> bool type r_omega val omega : r -> r_omega end module Tensor (A : Atom) : Tensor with type atom = A.t and type r = A.r and type r_omega = A.r_omega = struct module S = UFOx_syntax module Q = Algebra.Q type atom = A.t type t = (atom list * Q.t) list let map_atoms f t = List.map (fun (atoms, q) -> (List.map f atoms, q)) t let map_indices f t = map_atoms (A.map_indices f) t let multiply (t1, c1) (t2, c2) = (List.sort compare (t1 @ t2), Q.mul c1 c2) let compress terms = List.map (fun (t, cs) -> (t, Q.sum cs)) (ThoList.factorize terms) let rec of_expr e = compress (of_expr' e) and of_expr' = function | S.Integer i -> [([], Q.make i 1)] | S.Float _ -> invalid_arg "UFOx.Tensor.of_expr: unexpected float" | S.Variable name -> invalid_arg ("UFOx.Tensor.of_expr: unexpected variable '" ^ name ^ "'") | S.Application (name, args) -> [([A.of_expr name args], Q.unit)] | S.Sum (e1, e2) -> of_expr e1 @ of_expr e2 | S.Difference (e1, e2) -> of_expr e1 @ of_expr (S.Product (S.Integer (-1), e2)) | S.Product (e1, e2) -> Product.list2 multiply (of_expr e1) (of_expr e2) | S.Quotient (n, d) -> begin match of_expr d with | [([], q)] -> List.map (fun (t, c) -> (t, Q.div c q)) (of_expr n) | [] -> failwith "UFOx.Tensor.of_expr: zero denominator" | _ -> failwith "UFOx.Tensor.of_expr: only integer denominators allowed" end | S.Power (e, p) -> begin match of_expr e, of_expr p with | [([], q)], [([], p)] -> if Q.is_integer p then [([], Q.pow q (Q.to_integer p))] else failwith "UFOx.Tensor.of_expr: rational power" | [([], q)], _ -> failwith "UFOx.Tensor.of_expr: non-numeric power" | t, [([], p)] -> if Q.is_null (Q.sub p (Q.make 2 1)) then Product.list2 multiply t t else failwith "UFOx.Tensor.of_expr: only 2 as power of tensor allowed" | _ -> failwith "UFOx.Tensor.of_expr: power of tensor" end type r = A.r let rep_to_string = A.rep_to_string + let rep_to_string_whizard = A.rep_to_string_whizard let rep_of_int = A.rep_of_int let rep_conjugate = A.rep_conjugate let rep_trivial = A.rep_trivial let classify_indices' filter tensors = ThoList.uniq (List.sort compare (List.map (fun (t, c) -> filter (A.classify_indices t)) tensors)) (* NB: the number of summation indices is not guarateed to be the same! Therefore it was foolish to try to check for uniqueness \ldots *) let classify_indices tensors = match classify_indices' Index.free tensors with | [] -> (* There's always at least an empty list! *) failwith "UFOx.Tensor.classify_indices: can't happen!" | [f] -> f | _ -> invalid_arg "UFOx.Tensor.classify_indices: incompatible free indices!" let of_expr e = let t = of_expr e in - let free = classify_indices t in + ignore (classify_indices t); t let of_string s = of_expr (Expr.of_string s) let of_strings s = of_expr (Expr.of_strings s) let term_to_string (tensors, c) = if Q.is_null c then "" else (if Q.is_negative c then " - " else " + ") ^ (let c = Q.abs c in if Q.is_unit c && tensors = [] then "" else Q.to_string c) ^ (match tensors with | [] -> "" | tensors -> (if Q.is_unit (Q.abs c) then "" else "*") ^ String.concat "*" (List.map A.to_string tensors)) let term_to_string (tensors, c) = if Q.is_null c then "" else (if Q.is_negative c then " - " else " + ") ^ (let c = Q.abs c in match tensors with | [] -> Q.to_string c | tensors -> String.concat "*" ((if Q.is_unit c then [] else [Q.to_string c]) @ List.map A.to_string tensors)) let to_string terms = String.concat "" (List.map term_to_string terms) type r_omega = A.r_omega let omega = A.omega end module type Lorentz_Atom = sig type dirac = private | C of int * int | Gamma of int * int * int | Gamma5 of int * int | Identity of int * int | ProjP of int * int | ProjM of int * int | Sigma of int * int * int * int type vector = (* private *) | Epsilon of int * int * int * int | Metric of int * int | P of int * int type t = private | Dirac of dirac | Vector of vector + val map_indices_vector : (int -> int) -> vector -> vector + end module Lorentz_Atom = struct type dirac = | C of int * int | Gamma of int * int * int | Gamma5 of int * int | Identity of int * int | ProjP of int * int | ProjM of int * int | Sigma of int * int * int * int type vector = | Epsilon of int * int * int * int | Metric of int * int | P of int * int type t = | Dirac of dirac | Vector of vector + let map_indices_vector f = function + | Epsilon (mu, nu, ka, la) -> Epsilon (f mu, f nu, f ka, f la) + | Metric (mu, nu) -> Metric (f mu, f nu) + | P (mu, n) -> P (f mu, f n) + end module Lorentz_Atom' : Atom with type t = Lorentz_Atom.t and type r_omega = Coupling.lorentz = struct type t = Lorentz_Atom.t open Lorentz_Atom let map_indices_dirac f = function | C (i, j) -> C (f i, f j) | Gamma (mu, i, j) -> Gamma (f mu, f i, f j) | Gamma5 (i, j) -> Gamma5 (f i, f j) | Identity (i, j) -> Identity (f i, f j) | ProjP (i, j) -> ProjP (f i, f j) | ProjM (i, j) -> ProjM (f i, f j) | Sigma (mu, nu, i, j) -> Sigma (f mu, f nu, f i, f j) - let map_indices_vector f = function - | Epsilon (mu, nu, ka, la) -> Epsilon (f mu, f nu, f ka, f la) - | Metric (mu, nu) -> Metric (f mu, f nu) - | P (mu, n) -> P (f mu, f n) - let map_indices f = function | Dirac d -> Dirac (map_indices_dirac f d) | Vector v -> Vector (map_indices_vector f v) let dirac_to_string = function | C (i, j) -> Printf.sprintf "C(%d,%d)" i j | Gamma (mu, i, j) -> Printf.sprintf "Gamma(%d,%d,%d)" mu i j | Gamma5 (i, j) -> Printf.sprintf "Gamma5(%d,%d)" i j | Identity (i, j) -> Printf.sprintf "Identity(%d,%d)" i j | ProjP (i, j) -> Printf.sprintf "ProjP(%d,%d)" i j | ProjM (i, j) -> Printf.sprintf "ProjM(%d,%d)" i j | Sigma (mu, nu, i, j) -> Printf.sprintf "Sigma(%d,%d,%d,%d)" mu nu i j let vector_to_string = function | Epsilon (mu, nu, ka, la) -> Printf.sprintf "Epsilon(%d,%d,%d,%d)" mu nu ka la | Metric (mu, nu) -> Printf.sprintf "Metric(%d,%d)" mu nu | P (mu, n) -> Printf.sprintf "P(%d,%d)" mu n let to_string = function | Dirac d -> dirac_to_string d | Vector v -> vector_to_string v module S = UFOx_syntax let of_expr name args = match name, args with | "C", [S.Integer i; S.Integer j] -> Dirac (C (i, j)) | "C", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to C()" | "Epsilon", [S.Integer mu; S.Integer nu; S.Integer ka; S.Integer la] -> Vector (Epsilon (mu, nu, ka, la)) | "Epsilon", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to Epsilon()" | "Gamma", [S.Integer mu; S.Integer i; S.Integer j] -> Dirac (Gamma (mu, i, j)) | "Gamma", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to Gamma()" | "Gamma5", [S.Integer i; S.Integer j] -> Dirac (Gamma5 (i, j)) | "Gamma5", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to Gamma5()" | "Identity", [S.Integer i; S.Integer j] -> Dirac (Identity (i, j)) | "Identity", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to Identity()" | "Metric", [S.Integer mu; S.Integer nu] -> Vector (Metric (mu, nu)) | "Metric", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to Metric()" | "P", [S.Integer mu; S.Integer n] -> Vector (P (mu, n)) | "P", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to P()" | "ProjP", [S.Integer i; S.Integer j] -> Dirac (ProjP (i, j)) | "ProjP", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to ProjP()" | "ProjM", [S.Integer i; S.Integer j] -> Dirac (ProjM (i, j)) | "ProjM", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to ProjM()" | "Sigma", [S.Integer mu; S.Integer nu; S.Integer i; S.Integer j] -> if mu <> nu then Dirac (Sigma (mu, nu, i, j)) else invalid_arg "UFOx.Lorentz.of_expr: implausible arguments to Sigma()" | "Sigma", _ -> invalid_arg "UFOx.Lorentz.of_expr: invalid arguments to Sigma()" | name, _ -> invalid_arg ("UFOx.Lorentz.of_expr: invalid tensor '" ^ name ^ "'") - type r = S | V | Sp | CSp | Ghost + type r = S | V | Sp | CSp | Maj | Ghost let rep_trivial = function | S | Ghost -> true - | V | Sp | CSp-> false + | V | Sp | CSp | Maj -> false let rep_to_string = function | S -> "0" | V -> "1" | Sp -> "1/2" | CSp-> "1/2bar" + | Maj -> "1/2M" + | Ghost -> "Ghost" + + let rep_to_string_whizard = function + | S -> "0" + | V -> "1" + | Sp | CSp | Maj -> "1/2" | Ghost -> "Ghost" - let rep_of_int = function + let rep_of_int neutral = function | -1 -> Ghost | 1 -> S - | 2 -> Sp + | 2 -> if neutral then Maj else Sp + | -2 -> if neutral then Maj else CSp | 3 -> V | _ -> invalid_arg "UFOx.Lorentz: impossible representation!" let rep_conjugate = function | S -> S | V -> V | Sp -> CSp (* ??? *) | CSp -> Sp (* ??? *) + | Maj -> Maj | Ghost -> Ghost let classify_vector_indices1 = function | Epsilon (mu, nu, ka, la) -> [(mu, V); (nu, V); (ka, V); (la, V)] | Metric (mu, nu) -> [(mu, V); (nu, V)] | P (mu, n) -> [(mu, V)] let classify_dirac_indices1 = function | C (i, j) -> [(i, CSp); (j, Sp)] (* ??? *) | Gamma5 (i, j) | Identity (i, j) | ProjP (i, j) | ProjM (i, j) -> [(i, CSp); (j, Sp)] | Gamma (mu, i, j) -> [(mu, V); (i, CSp); (j, Sp)] | Sigma (mu, nu, i, j) -> [(mu, V); (nu, V); (i, CSp); (j, Sp)] let classify_indices1 = function | Dirac d -> classify_dirac_indices1 d | Vector v -> classify_vector_indices1 v let classify_indices tensors = List.sort compare (List.fold_right (fun v acc -> classify_indices1 v @ acc) tensors []) type r_omega = Coupling.lorentz let omega = function | S -> Coupling.Scalar | V -> Coupling.Vector | Sp -> Coupling.Spinor - | CSp-> Coupling.ConjSpinor + | CSp -> Coupling.ConjSpinor + | Maj -> Coupling.Majorana | Ghost -> Coupling.Scalar end module Lorentz = Tensor(Lorentz_Atom') module type Color_Atom = sig type t = (* private *) | Identity of int * int | Identity8 of int * int | T of int * int * int | F of int * int * int | D of int * int * int | Epsilon of int * int * int | EpsilonBar of int * int * int | T6 of int * int * int | K6 of int * int * int | K6Bar of int * int * int end module Color_Atom = struct type t = | Identity of int * int | Identity8 of int * int | T of int * int * int | F of int * int * int | D of int * int * int | Epsilon of int * int * int | EpsilonBar of int * int * int | T6 of int * int * int | K6 of int * int * int | K6Bar of int * int * int end module Color_Atom' : Atom with type t = Color_Atom.t and type r_omega = Color.t = struct type t = Color_Atom.t module S = UFOx_syntax open Color_Atom let map_indices f = function | Identity (i, j) -> Identity (f i, f j) | Identity8 (a, b) -> Identity8 (f a, f b) | T (a, i, j) -> T (f a, f i, f j) | F (a, i, j) -> F (f a, f i, f j) | D (a, i, j) -> D (f a, f i, f j) | Epsilon (i, j, k) -> Epsilon (f i, f j, f k) | EpsilonBar (i, j, k) -> EpsilonBar (f i, f j, f k) | T6 (a, i', j') -> T6 (f a, f i', f j') | K6 (i', j, k) -> K6 (f i', f j, f k) | K6Bar (i', j, k) -> K6Bar (f i', f j, f k) let of_expr name args = match name, args with | "Identity", [S.Integer i; S.Integer j] -> Identity (i, j) | "Identity", _ -> invalid_arg "UFOx.Color.of_expr: invalid arguments to Identity()" | "T", [S.Integer a; S.Integer i; S.Integer j] -> T (a, i, j) | "T", _ -> invalid_arg "UFOx.Color.of_expr: invalid arguments to T()" | "f", [S.Integer a; S.Integer b; S.Integer c] -> F (a, b, c) | "f", _ -> invalid_arg "UFOx.Color.of_expr: invalid arguments to f()" | "d", [S.Integer a; S.Integer b; S.Integer c] -> D (a, b, c) | "d", _ -> invalid_arg "UFOx.Color.of_expr: invalid arguments to d()" | "Epsilon", [S.Integer i; S.Integer j; S.Integer k] -> Epsilon (i, j, k) | "Epsilon", _ -> invalid_arg "UFOx.Color.of_expr: invalid arguments to Epsilon()" | "EpsilonBar", [S.Integer i; S.Integer j; S.Integer k] -> EpsilonBar (i, j, k) | "EpsilonBar", _ -> invalid_arg "UFOx.Color.of_expr: invalid arguments to EpsilonBar()" | "T6", [S.Integer a; S.Integer i'; S.Integer j'] -> T6 (a, i', j') | "T6", _ -> invalid_arg "UFOx.Color.of_expr: invalid arguments to T6()" | "K6", [S.Integer i'; S.Integer j; S.Integer k] -> K6 (i', j, k) | "K6", _ -> invalid_arg "UFOx.Color.of_expr: invalid arguments to K6()" | "K6Bar", [S.Integer i'; S.Integer j; S.Integer k] -> K6Bar (i', j, k) | "K6Bar", _ -> invalid_arg "UFOx.Color.of_expr: invalid arguments to K6Bar()" | name, _ -> invalid_arg ("UFOx.Color.of_expr: invalid tensor '" ^ name ^ "'") let to_string = function | Identity (i, j) -> Printf.sprintf "Identity(%d,%d)" i j | Identity8 (a, b) -> Printf.sprintf "Identity8(%d,%d)" a b | T (a, i, j) -> Printf.sprintf "T(%d,%d,%d)" a i j | F (a, b, c) -> Printf.sprintf "f(%d,%d,%d)" a b c | D (a, b, c) -> Printf.sprintf "d(%d,%d,%d)" a b c | Epsilon (i, j, k) -> Printf.sprintf "Epsilon(%d,%d,%d)" i j k | EpsilonBar (i, j, k) -> Printf.sprintf "EpsilonBar(%d,%d,%d)" i j k | T6 (a, i', j') -> Printf.sprintf "T6(%d,%d,%d)" a i' j' | K6 (i', j, k) -> Printf.sprintf "K6(%d,%d,%d)" i' j k | K6Bar (i', j, k) -> Printf.sprintf "K6Bar(%d,%d,%d)" i' j k type r = S | Sbar | F | C | A let rep_trivial = function | S | Sbar -> true | F | C | A-> false let rep_to_string = function | S -> "1" | Sbar -> "1bar" | F -> "3" | C -> "3bar" | A-> "8" - let rep_of_int = function + let rep_to_string_whizard = function + | S -> "1" + | Sbar -> "-1" + | F -> "3" + | C -> "-3" + | A-> "8" + + let rep_of_int neutral = function | 1 -> S | -1 -> Sbar (* UFO appears to use this for colorless antiparticles!. *) | 3 -> F | -3 -> C | 8 -> A | 6 | -6 -> failwith "UFOx.Color: sextets not supported yet!" | _ -> invalid_arg "UFOx.Color: impossible representation!" let rep_conjugate = function | Sbar -> S | S -> Sbar | C -> F | F -> C | A -> A let classify_indices1 = function | Identity (i, j) -> [(i, C); (j, F)] | Identity8 (a, b) -> [(a, A); (b, A)] | T (a, i, j) -> [(i, F); (j, C); (a, A)] | Color_Atom.F (a, b, c) | D (a, b, c) -> [(a, A); (b, A); (c, A)] | Epsilon (i, j, k) -> [(i, F); (j, F); (k, F)] | EpsilonBar (i, j, k) -> [(i, C); (j, C); (k, C)] | T6 (a, i', j') -> failwith "UFOx.Color: sextets not supported yet!" | K6 (i', j, k) -> failwith "UFOx.Color: sextets not supported yet!" | K6Bar (i', j, k) -> failwith "UFOx.Color: sextets not supported yet!" let classify_indices tensors = List.sort compare (List.fold_right (fun v acc -> classify_indices1 v @ acc) tensors []) type r_omega = Color.t + (* FIXME: $N_C=3$ should not be hardcoded! *) let omega = function | S | Sbar -> Color.Singlet | F -> Color.SUN (3) | C -> Color.SUN (-3) | A-> Color.AdjSUN (3) end module Color = Tensor(Color_Atom') module Value = struct module S = UFOx_syntax module Q = Algebra.Q type builtin = | Sqrt | Cos | Sin + | Tan | Exp + | Atan | Conj let builtin_to_string = function | Sqrt -> "sqrt" | Cos -> "cos" + | Tan -> "tan" | Sin -> "sin" | Exp -> "exp" + | Atan -> "atan" | Conj -> "conjg" let builtin_of_string = function | "cmath.sqrt" -> Sqrt | "cmath.cos" -> Cos | "cmath.sin" -> Sin + | "cmath.tan" -> Tan | "cmath.exp" -> Exp + | "cmath.atan" -> Atan | "complexconjugate" -> Conj | name -> failwith ("UFOx.Value: unsupported function: " ^ name) type t = | Integer of int | Rational of Q.t | Real of float | Complex of float * float | Variable of string | Sum of t list | Difference of t * t | Product of t list | Quotient of t * t | Power of t * t | Application of builtin * t list let rec to_string = function | Integer i -> string_of_int i | Rational q -> Q.to_string q | Real x -> string_of_float x | Complex (0.0, 1.0) -> "I" | Complex (0.0, -1.0) -> "-I" | Complex (0.0, i) -> string_of_float i ^ "*I" | Complex (r, 1.0) -> string_of_float r ^ "+I" | Complex (r, -1.0) -> string_of_float r ^ "-I" | Complex (r, i) -> string_of_float r ^ (if i < 0.0 then "-" else "+") ^ string_of_float (abs_float i) ^ "*I" | Variable s -> s | Sum [] -> "0" | Sum [e] -> to_string e | Sum es -> "(" ^ String.concat "+" (List.map maybe_parentheses es) ^ ")" | Difference (e1, e2) -> to_string e1 ^ "-" ^ maybe_parentheses e2 | Product [] -> "1" | Product ((Integer (-1) | Real (-1.)) :: es) -> "-" ^ maybe_parentheses (Product es) | Product es -> String.concat "*" (List.map maybe_parentheses es) | Quotient (e1, e2) -> to_string e1 ^ "/" ^ maybe_parentheses e2 | Power (e1, e2) -> maybe_parentheses e1 ^ "^" ^ maybe_parentheses e2 | Application (f, [Integer i]) -> to_string (Application (f, [Real (float i)])) | Application (f, es) -> builtin_to_string f ^ "(" ^ String.concat "," (List.map to_string es) ^ ")" and maybe_parentheses = function | Integer i as e -> if i < 0 then "(" ^ to_string e ^ ")" else to_string e | Real x as e -> if x < 0.0 then "(" ^ to_string e ^ ")" else to_string e | Complex (x, 0.0) -> to_string (Real x) | Complex (0.0, 1.0) -> "I" | Variable _ | Power (_, _) | Application (_, _) as e -> to_string e | Sum [e] -> to_string e | Product [e] -> maybe_parentheses e | e -> "(" ^ to_string e ^ ")" let rec to_coupling atom = function - | Integer i -> Coupling.Const i + | Integer i -> Coupling.Integer i | Rational q -> let n, d = Q.to_ratio q in - Coupling.Quot (Coupling.Const n, Coupling.Const d) - | Real x -> Coupling.Atom (atom (string_of_float x)) + Coupling.Quot (Coupling.Integer n, Coupling.Integer d) + | Real x -> Coupling.Float x | Product es -> Coupling.Prod (List.map (to_coupling atom) es) | Variable s -> Coupling.Atom (atom s) + | Complex (r, 0.0) -> Coupling.Float r + | Complex (0.0, 1.0) -> Coupling.I + | Complex (0.0, -1.0) -> Coupling.Prod [Coupling.I; Coupling.Integer (-1)] + | Complex (0.0, i) -> Coupling.Prod [Coupling.I; Coupling.Float i] + | Complex (r, 1.0) -> + Coupling.Sum [Coupling.Float r; Coupling.I] + | Complex (r, -1.0) -> + Coupling.Diff (Coupling.Float r, Coupling.I) | Complex (r, i) -> - Coupling.Sum [Coupling.Atom (atom (string_of_float r)); - Coupling.Prod [Coupling.I; - Coupling.Atom (atom (string_of_float i))]] + Coupling.Sum [Coupling.Float r; + Coupling.Prod [Coupling.I; Coupling.Float i]] | Sum es -> Coupling.Sum (List.map (to_coupling atom) es) | Difference (e1, e2) -> Coupling.Diff (to_coupling atom e1, to_coupling atom e2) | Quotient (e1, e2) -> Coupling.Quot (to_coupling atom e1, to_coupling atom e2) | Power (e1, Integer e2) -> Coupling.Pow (to_coupling atom e1, e2) | Power (e1, e2) -> Coupling.PowX (to_coupling atom e1, to_coupling atom e2) | Application (Sin, [e]) -> Coupling.Sin (to_coupling atom e) | Application (Cos, [e]) -> Coupling.Cos (to_coupling atom e) + | Application (Tan, [e]) -> Coupling.Tan (to_coupling atom e) | Application (Exp, [e]) -> Coupling.Exp (to_coupling atom e) + | Application (Atan, [e]) -> Coupling.Atan (to_coupling atom e) | Application (Sqrt, [e]) -> Coupling.Sqrt (to_coupling atom e) | Application (Conj, [e]) -> Coupling.Conj (to_coupling atom e) - | Application (_, []) -> - failwith "UFOx.Value.to_coupling: empty argument list" - | Application (_, _::_) -> - failwith "UFOx.Value.to_coupling: more than one argument list" + | Application (f, []) -> + failwith + ("UFOx.Value.to_coupling: " ^ builtin_to_string f ^ + ": empty argument list") + | Application (f, _::_) -> + failwith + ("UFOx.Value.to_coupling: " ^ builtin_to_string f ^ + ": more than one argument list") let compress terms = terms let rec of_expr e = compress (of_expr' e) and of_expr' = function | S.Integer i -> Integer i | S.Float x -> Real x | S.Variable "cmath.pi" -> Variable "pi" | S.Variable name -> Variable name | S.Sum (e1, e2) -> begin match of_expr e1, of_expr e2 with | (Integer 0 | Real 0.), e -> e | e, (Integer 0 | Real 0.) -> e | Sum e1, Sum e2 -> Sum (e1 @ e2) | e1, Sum e2 -> Sum (e1 :: e2) | Sum e1, e2 -> Sum (e2 :: e1) | e1, e2 -> Sum [e1; e2] end | S.Difference (e1, e2) -> begin match of_expr e1, of_expr e2 with | e1, (Integer 0 | Real 0.) -> e1 | e1, e2 -> Difference (e1, e2) end | S.Product (e1, e2) -> begin match of_expr e1, of_expr e2 with | (Integer 0 | Real 0.), _ -> Integer 0 | _, (Integer 0 | Real 0.) -> Integer 0 | (Integer 1 | Real 1.), e -> e | e, (Integer 1 | Real 1.) -> e | Product e1, Product e2 -> Product (e1 @ e2) | e1, Product e2 -> Product (e1 :: e2) | Product e1, e2 -> Product (e2 :: e1) | e1, e2 -> Product [e1; e2] end | S.Quotient (e1, e2) -> begin match of_expr e1, of_expr e2 with | e1, (Integer 0 | Real 0.) -> invalid_arg "UFOx.Value: divide by 0" | e1, (Integer 1 | Real 1.) -> e1 | e1, e2 -> Quotient (e1, e2) end | S.Power (e, p) -> begin match of_expr e, of_expr p with | (Integer 0 | Real 0.), (Integer 0 | Real 0.) -> invalid_arg "UFOx.Value: 0^0" | _, (Integer 0 | Real 0.) -> Integer 1 | e, (Integer 1 | Real 1.) -> e | e, p -> Power (e, p) end | S.Application ("complex", [r; i]) -> begin match of_expr r, of_expr i with | r, (Integer 0 | Real 0.0) -> r | Real r, Real i -> Complex (r, i) | Integer r, Real i -> Complex (float_of_int r, i) | Real r, Integer i -> Complex (r, float_of_int i) | Integer r, Integer i -> Complex (float_of_int r, float_of_int i) | _ -> invalid_arg "UFOx.Value: complex expects two numeric arguments" end | S.Application ("complex", _) -> invalid_arg "UFOx.Value: complex expects two arguments" | S.Application ("complexconjugate", [e]) -> Application (Conj, [of_expr e]) | S.Application ("complexconjugate", _) -> invalid_arg "UFOx.Value: complexconjugate expects single argument" | S.Application ("cmath.sqrt", [e]) -> Application (Sqrt, [of_expr e]) | S.Application ("cmath.sqrt", _) -> invalid_arg "UFOx.Value: sqrt expects single argument" | S.Application (name, args) -> Application (builtin_of_string name, List.map of_expr args) end module type Test = sig val example : unit -> unit val suite : OUnit.test end Index: trunk/omega/src/dirac.ml =================================================================== --- trunk/omega/src/dirac.ml (revision 0) +++ trunk/omega/src/dirac.ml (revision 8275) @@ -0,0 +1,339 @@ +(* Dirac.ml -- + + Copyright (C) 1999-2017 by + + Wolfgang Kilian + Thorsten Ohl + Juergen Reuter + with contributions from + Christian Speckner + + WHIZARD is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + WHIZARD is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) + +(* \thocwmodulesection{Dirac $\gamma$-matrices} *) + +module type T = + sig + type qc = Algebra.QC.t + type t = qc array array + val zero : qc + val one : qc + val minus_one : qc + val i : qc + val minus_i : qc + val unit : t + val null : t + val gamma0 : t + val gamma1 : t + val gamma2 : t + val gamma3 : t + val gamma5 : t + val gamma : t array + val cc : t + val neg : t -> t + val add : t -> t -> t + val sub : t -> t -> t + val mul : t -> t -> t + val times : qc -> t -> t + val transpose : t -> t + val adjoint : t -> t + val conj : t -> t + val product : t list -> t + val test_suite : OUnit.test + end + +(* \thocwmodulesubsection{Dirac $\gamma$-matrices} *) + +module Chiral : T = + struct + + module Q = Algebra.Q + module QC = Algebra.QC + + type qc = QC.t + type t = qc array array + + let zero = QC.null + let one = QC.one + let minus_one = QC.neg one + let i = QC.make Q.null Q.unit + let minus_i = QC.conj i + + let null = + [| [| zero; zero; zero; zero |]; + [| zero; zero; zero; zero |]; + [| zero; zero; zero; zero |]; + [| zero; zero; zero; zero |] |] + + let unit = + [| [| one; zero; zero; zero |]; + [| zero; one; zero; zero |]; + [| zero; zero; one; zero |]; + [| zero; zero; zero; one |] |] + + let gamma0 = + [| [| zero; zero; one; zero |]; + [| zero; zero; zero; one |]; + [| one; zero; zero; zero |]; + [| zero; one; zero; zero |] |] + + let gamma1 = + [| [| zero; zero; zero; one |]; + [| zero; zero; one; zero |]; + [| zero; minus_one; zero; zero |]; + [| minus_one; zero; zero; zero |] |] + + let gamma2 = + [| [| zero; zero; zero; minus_i |]; + [| zero; zero; i; zero |]; + [| zero; i; zero; zero |]; + [| minus_i; zero; zero; zero |] |] + + let gamma3 = + [| [| zero; zero; one; zero |]; + [| zero; zero; zero; minus_one |]; + [| minus_one; zero; zero; zero |]; + [| zero; one; zero; zero |] |] + + let gamma5 = + [| [| minus_one; zero; zero; zero |]; + [| zero; minus_one; zero; zero |]; + [| zero; zero; one; zero |]; + [| zero; zero; zero; one |] |] + + let gamma = + [| gamma0; gamma1; gamma2; gamma3 |] + + let cc = + [| [| zero; minus_one; zero; zero |]; + [| one; zero; zero; zero |]; + [| zero; zero; zero; one |]; + [| zero; zero; minus_one; zero |] |] + + let neg g = + let g' = Array.make_matrix 4 4 zero in + for i = 0 to 3 do + for j = 0 to 3 do + g'.(i).(j) <- QC.neg g.(i).(j) + done + done; + g' + + let add g1 g2 = + let g12 = Array.make_matrix 4 4 zero in + for i = 0 to 3 do + for j = 0 to 3 do + g12.(i).(j) <- QC.add g1.(i).(j) g2.(i).(j) + done + done; + g12 + + let sub g1 g2 = + let g12 = Array.make_matrix 4 4 zero in + for i = 0 to 3 do + for j = 0 to 3 do + g12.(i).(j) <- QC.sub g1.(i).(j) g2.(i).(j) + done + done; + g12 + + let mul g1 g2 = + let g12 = Array.make_matrix 4 4 zero in + for i = 0 to 3 do + for k = 0 to 3 do + for j = 0 to 3 do + g12.(i).(k) <- QC.add g12.(i).(k) (QC.mul g1.(i).(j) g2.(j).(k)) + done + done + done; + g12 + + let times q g = + let g' = Array.make_matrix 4 4 zero in + for i = 0 to 3 do + for j = 0 to 3 do + g'.(i).(j) <- QC.mul q g.(i).(j) + done + done; + g' + + let transpose g = + let g' = Array.make_matrix 4 4 zero in + for i = 0 to 3 do + for j = 0 to 3 do + g'.(i).(j) <- g.(j).(i) + done + done; + g' + + let adjoint g = + let g' = Array.make_matrix 4 4 zero in + for i = 0 to 3 do + for j = 0 to 3 do + g'.(i).(j) <- QC.conj g.(j).(i) + done + done; + g' + + let conj g = + let g' = Array.make_matrix 4 4 zero in + for i = 0 to 3 do + for j = 0 to 3 do + g'.(i).(j) <- QC.conj g.(i).(j) + done + done; + g' + + let product glist = + List.fold_right mul glist unit + + open OUnit + + let two = QC.make (Q.make 2 1) Q.null + let half = QC.make (Q.make 1 2) Q.null + let two_unit = times two unit + + let ac_lhs mu nu = + add (mul gamma.(mu) gamma.(nu)) (mul gamma.(nu) gamma.(mu)) + + let ac_rhs mu nu = + if mu = nu then + if mu = 0 then + two_unit + else + neg two_unit + else + null + + let test_ac mu nu = + (ac_lhs mu nu) = (ac_rhs mu nu) + + let ac_lhs_all = + let lhs = Array.make_matrix 4 4 null in + for mu = 0 to 3 do + for nu = 0 to 3 do + lhs.(mu).(nu) <- ac_lhs mu nu + done + done; + lhs + + let ac_rhs_all = + let rhs = Array.make_matrix 4 4 null in + for mu = 0 to 3 do + for nu = 0 to 3 do + rhs.(mu).(nu) <- ac_rhs mu nu + done + done; + rhs + + let dump2 lhs rhs = + for i = 0 to 3 do + for j = 0 to 3 do + Printf.printf + " i = %d, j =%d: %s + %s*I | %s + %s*I\n" + i j + (Q.to_string (QC.real lhs.(i).(j))) + (Q.to_string (QC.imag lhs.(i).(j))) + (Q.to_string (QC.real rhs.(i).(j))) + (Q.to_string (QC.imag rhs.(i).(j))) + done + done + + let dump2_all lhs rhs = + for mu = 0 to 3 do + for nu = 0 to 3 do + Printf.printf "mu = %d, nu =%d: \n" mu nu; + dump2 lhs.(mu).(nu) rhs.(mu).(nu) + done + done + + let anticommute = + "anticommutation relations" >:: + (fun () -> + assert_bool + "" + (if ac_lhs_all = ac_rhs_all then + true + else + begin + dump2_all ac_lhs_all ac_rhs_all; + false + end)) + + let equal_or_dump2 lhs rhs = + if lhs = rhs then + true + else + begin + dump2 lhs rhs; + false + end + + let gamma5_def = + "gamma5" >:: + (fun () -> + assert_bool + "definition" + (equal_or_dump2 + gamma5 + (times i (product [gamma0; gamma1; gamma2; gamma3])))) + + let self_adjoint = + "(anti)selfadjointness" >::: + [ "gamma0" >:: + (fun () -> + assert_bool "self" (equal_or_dump2 gamma0 (adjoint gamma0))); + "gamma1" >:: + (fun () -> + assert_bool "anti" (equal_or_dump2 gamma1 (neg (adjoint gamma1)))); + "gamma2" >:: + (fun () -> + assert_bool "anti" (equal_or_dump2 gamma2 (neg (adjoint gamma2)))); + "gamma3" >:: + (fun () -> + assert_bool "anti" (equal_or_dump2 gamma3 (neg (adjoint gamma3)))); + "gamma5" >:: + (fun () -> + assert_bool "self" (equal_or_dump2 gamma5 (adjoint gamma5))) ] + + let cc_inv = neg cc + + let cc_gamma g = + equal_or_dump2 (neg (transpose g)) (product [cc; g; cc_inv]) + + let charge_conjugation = + "charge conjugation" >::: + [ "inverse" >:: + (fun () -> + assert_bool "" (equal_or_dump2 (mul cc cc_inv) unit)); + "gamma0" >:: (fun () -> assert_bool "" (cc_gamma gamma0)); + "gamma1" >:: (fun () -> assert_bool "" (cc_gamma gamma1)); + "gamma2" >:: (fun () -> assert_bool "" (cc_gamma gamma2)); + "gamma3" >:: (fun () -> assert_bool "" (cc_gamma gamma3)); + "gamma5" >:: + (fun () -> + assert_bool "" (equal_or_dump2 (transpose gamma5) + (product [cc; gamma5; cc_inv]))) + ] + + let test_suite = + "Dirac Matrices" >::: + [anticommute; + gamma5_def; + self_adjoint; + charge_conjugation] + + end + Index: trunk/share/tests/unit_tests/ref-output/models_9.ref =================================================================== --- trunk/share/tests/unit_tests/ref-output/models_9.ref (revision 8274) +++ trunk/share/tests/unit_tests/ref-output/models_9.ref (revision 8275) @@ -1,242 +1,264 @@ * Test output: models_9 * Purpose: enable the UFO Standard Model (test version) * Generate and read UFO model model "SM" ! model derived from UFO source parameter aEWM1 = 1.279000000000E+02 parameter Gf = 1.166370000000E-05 parameter aS = 1.184000000000E-01 parameter ymdo = 5.040000000000E-03 parameter ymup = 2.550000000000E-03 parameter yms = 1.010000000000E-01 parameter ymc = 1.270000000000E+00 parameter ymb = 4.700000000000E+00 parameter ymt = 1.720000000000E+02 parameter yme = 5.110000000000E-04 parameter ymm = 1.056600000000E-01 parameter ymtau = 1.777000000000E+00 parameter MZ = 9.118760000000E+01 parameter Me = 5.110000000000E-04 parameter MMU = 1.056600000000E-01 parameter MTA = 1.777000000000E+00 parameter MU = 2.550000000000E-03 parameter MC = 1.270000000000E+00 parameter MT = 1.720000000000E+02 parameter MD = 5.040000000000E-03 parameter MS = 1.010000000000E-01 parameter MB = 4.700000000000E+00 parameter MH = 1.250000000000E+02 parameter WZ = 2.495200000000E+00 parameter WW = 2.085000000000E+00 parameter WT = 1.508340000000E+00 parameter WH = 4.070000000000E-03 derived aEW = 7.818608287725E-03 derived G = 8.625132696777E-01 derived MW = 7.982435974620E+01 derived ee = 3.134510000495E-01 derived sw2 = 2.336991334218E-01 derived cw = 8.753861242778E-01 derived sw = 4.834243823204E-01 derived g1 = 3.580717027107E-01 derived gw = 6.483971671950E-01 derived vev = 2.462205690735E+02 derived lam = 1.288668963082E-01 derived yb = 2.699532280412E-02 derived yc = 7.294480842816E-03 derived ydo = 2.894817594314E-05 derived ye = 2.935023394235E-06 derived ym = 6.068778313795E-04 derived ys = 5.801122560035E-04 derived yt = 9.879139409168E-01 derived ytau = 1.020652949424E-02 derived yup = 1.464639854266E-05 derived muH = 8.838834764832E+01 derived I1a11 = 2.894817594314E-05 derived I1a22 = 5.801122560035E-04 derived I1a33 = 2.699532280412E-02 derived I2a11 = 1.464639854266E-05 derived I2a22 = 7.294480842816E-03 derived I2a33 = 9.879139409168E-01 derived I3a11 = 1.464639854266E-05 derived I3a22 = 7.294480842816E-03 derived I3a33 = 9.879139409168E-01 derived I4a11 = 2.894817594314E-05 derived I4a22 = 5.801122560035E-04 derived I4a33 = 2.699532280412E-02 particle vt 16 name "vt" anti "vt~" tex_name "vt" tex_anti "vt~" spin 1/2 particle vm 14 name "vm" anti "vm~" tex_name "vm" tex_anti "vm~" spin 1/2 particle ve 12 name "ve" anti "ve~" tex_name "ve" tex_anti "ve~" spin 1/2 particle u 2 name "u" anti "u~" tex_name "u" tex_anti "u~" spin 1/2 charge 2/3 color 3 mass MU particle ta- 15 name "ta-" anti "ta+" tex_name "ta-" tex_anti "ta+" spin 1/2 charge -1 mass MTA particle t 6 name "t" anti "t~" tex_name "t" tex_anti "t~" spin 1/2 charge 2/3 color 3 mass MT width WT particle s 3 name "s" anti "s~" tex_name "s" tex_anti "s~" spin 1/2 charge -1/3 color 3 mass MS particle mu- 13 name "mu-" anti "mu+" tex_name "mu-" tex_anti "mu+" spin 1/2 charge -1 mass MMU particle g 21 name "g" tex_name "g" spin 1 color 8 particle e- 11 name "e-" anti "e+" tex_name "e-" tex_anti "e+" spin 1/2 charge -1 mass Me particle d 1 name "d" anti "d~" tex_name "d" tex_anti "d~" spin 1/2 charge -1/3 color 3 mass MD particle c 4 name "c" anti "c~" tex_name "c" tex_anti "c~" spin 1/2 charge 2/3 color 3 mass MC particle b 5 name "b" anti "b~" tex_name "b" tex_anti "b~" spin 1/2 charge -1/3 color 3 mass MB particle a 22 name "a" tex_name "a" spin 1 particle Z 23 name "Z" tex_name "Z" spin 1 mass MZ width WZ particle W+ 24 name "W+" anti "W-" tex_name "W+" tex_anti "W-" spin 1 charge 1 mass MW width WW particle H 25 name "H" tex_name "H" spin 0 mass MH width WH + particle PROTON 2212 + name "p" "p+" + anti "pbar" "p-" + spin 1/2 charge 1 + particle HADRON_REMNANT 90 + name "hr" + tex_name "had_r" + spin -1/2 + particle HADRON_REMNANT_SINGLET 91 + name "hr1" + tex_name "had_r^{(1)}" + spin -1/2 + particle HADRON_REMNANT_TRIPLET 92 + name "hr3" + anti "hr3bar" + tex_name "had_r^{(3)}" + tex_anti "had_r^{(\bar 3)}" + spin -1/2 color 3 + particle HADRON_REMNANT_OCTET 93 + name "hr8" + tex_name "had_r^{(8)}" + spin -1/2 color 8 vertex "Z" "Z" "H" vertex "Z" "Z" "H" "H" vertex "a" "W-" "W+" "Z" vertex "H" "H" "H" vertex "W-" "W-" "W+" "W+" vertex "W-" "W+" "Z" vertex "a" "a" "W-" "W+" vertex "W-" "W+" "H" vertex "W-" "W+" "H" "H" vertex "a" "W-" "W+" vertex "t~" "t" "H" vertex "c~" "c" "H" vertex "u~" "u" "H" vertex "H" "H" "H" "H" vertex "ta+" "ta-" "H" vertex "mu+" "mu-" "H" vertex "e+" "e-" "H" vertex "b~" "b" "H" vertex "s~" "s" "H" vertex "d~" "d" "H" vertex "g" "g" "g" "g" vertex "g" "g" "g" vertex "ta+" "ta-" "Z" vertex "mu+" "mu-" "Z" vertex "e+" "e-" "Z" vertex "vt~" "vt" "Z" vertex "vm~" "vm" "Z" vertex "ve~" "ve" "Z" vertex "b~" "b" "Z" vertex "s~" "s" "Z" vertex "d~" "d" "Z" vertex "t~" "t" "Z" vertex "c~" "c" "Z" vertex "u~" "u" "Z" vertex "vt~" "ta-" "W+" vertex "vm~" "mu-" "W+" vertex "ve~" "e-" "W+" vertex "ta+" "vt" "W-" vertex "mu+" "vm" "W-" vertex "e+" "ve" "W-" vertex "t~" "b" "W+" vertex "c~" "s" "W+" vertex "u~" "d" "W+" vertex "b~" "t" "W-" vertex "s~" "c" "W-" vertex "d~" "u" "W-" vertex "b~" "b" "g" vertex "s~" "s" "g" vertex "d~" "d" "g" vertex "t~" "t" "g" vertex "c~" "c" "g" vertex "u~" "u" "g" vertex "b~" "b" "a" vertex "s~" "s" "a" vertex "d~" "d" "a" vertex "t~" "t" "a" vertex "c~" "c" "a" vertex "u~" "u" "a" vertex "ta+" "ta-" "a" vertex "mu+" "mu-" "a" vertex "e+" "e-" "a" vertex "W-" "W+" "Z" "Z" * Cleanup * Test output end: models_9