Electrons annihilation to muons in QED
Code: "redberry3.groovy". Programming language: Groovy DMelt Version 1.8. Last modified: 04/22/2014. License: Pro
https://datamelt.org/code/cache/redberry3_3559.groovy
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.




import cc.redberry.groovy.Redberry

import static cc.redberry.core.indices.IndexType.*
import static cc.redberry.groovy.RedberryPhysics.*
import static cc.redberry.groovy.RedberryStatic.*

//****************************************************//
//******** Electrons annihilation in two muons *******//
//****************************************************//

use(Redberry) {
    //setting up matrix quantities
    defineMatrices 'G_a', 'V_i', Matrix1.matrix,
            'v[p_a]', 'u[p_a]', Matrix1.vector,
            'cv[p_a]', 'cu[p_a]', Matrix1.covector

    //photon propagator
    def G = 'G_mn[k_a] = -I*g_mn/(k_a*k^a)'.t
    //vertex
    def V = 'V_i = -I*e*G_i'.t
    //matrix element
    def M = 'cv[p2_a]*V_i*u[p1_a]*G^ij[p1_a + p2_a]*cu[k1_a]*V_j*v[k2_a]'.t

    //substitute vertex and propagator in matrix element
    M = (V & G) >> M

    //mandelstam and mass shell substitutions
    def mandelstam = setMandelstam(
            ['p1_m': 'me', 'p2_m': 'me', 'k1_m': 'mu', 'k2_m': 'mu'])

    //expand and apply substitutions
    M = (EliminateMetrics & ExpandDenominator & mandelstam) >> M

    //complex conjugation
    def MC = Conjugate >> M
    //exchange spinor momentums
    MC = 'u[p1_a]*cv[p2_a] = v[p2_a]*cu[p1_a]'.t >> MC
    MC = 'v[k2_a]*cu[k1_a] = u[k1_a]*cv[k2_a]'.t >> MC

    //squared matrix element
    def M2 = ExpandAll >> (M * MC / 4)

    //electron and muons polarizations
    M2 = 'u[p1_a]*cu[p1_a] =  me + p1_a*G^a'.t >> M2
    M2 = 'u[k1_a]*cu[k1_a] =  mu + k1_a*G^a'.t >> M2
    M2 = 'v[p2_a]*cv[p2_a] =  -me + p2_a*G^a'.t >> M2
    M2 = 'v[k2_a]*cv[k2_a] =  -mu + k2_a*G^a'.t >> M2

    //trace of gamma matrices
    M2 = DiracTrace['G_a'] >> M2

    //final simplifications
    M2 = (ExpandAndEliminate & mandelstam) >> M2
    M2 = 'u = 2*(mu**2 + me**2) - s - t'.t >> M2
    M2 = Factor >> M2

    println M2
}

You see the box below because you did not login.