(* Program to Calculate the traces of mu e -> mu e, Eq. (8.55) of QFT 

 Last Version: 06/12/2024
 Compatible with FeynCalc 10.1.0
 Author: Jorge C. Romao
 email: jorge.romao@tecnico.ulisboa.pt
*)




Remove["Global`*"]

(* Definitions *)

prop[p_,m_]:=GS[p]+m
PR=(1 + GA[5])/2
PL=(1 - GA[5])/2


(* Traces *)
gvae=gVe - gAe GA[5]
gvaf=gVf - gAf GA[5]

Line1:= GS[p2] . GA[mu] .  GS[p1] . GA[nu]  

Line2:= prop[q1,mf] . GA[mu] . prop[q2,-mf] . GA[nu]

Line3:= GS[p2] . GA[mu] . gvae . GS[p1] . GA[nu] . gvae

Line4:= prop[q1,mf] . GA[mu] . gvaf . prop[q2,-mf] . GA[nu] . gvaf

Line5:= GS[p2] . GA[mu] . gvae . GS[p1] . GA[nu]

Line6:= prop[q1,mf] . GA[mu] . gvaf . prop[q2,-mf] . GA[nu]



ans1= Simplify[Contract[TR[Line1] TR[Line2]]]

ans2= Simplify[Contract[TR[Line3] TR[Line4]]]

ans3= Simplify[Contract[TR[Line5] TR[Line6]]]


ans=1/4 (Qf2 ans1 + F2 ans2 + 2 ReF (-Qf)  ans3 ) //FCE


(* Kinematics and Simplifications *)
kin1={SP[p1,p1]->0,SP[p2,p2]->0,SP[q1,q1]->mf^2,SP[q2,q2]->mf^2}



res1 = ans /. kin1

kin2={SP[p1,p2]->s/2,SP[q1,q2]->(s-2 mf^2)/2,SP[p1,q1]->s/4(1-beta Cos[teta]),SP[p1,q2]->s/4(1+beta Cos[teta]),SP[p2,q1]->s/4(1+beta Cos[teta]),SP[p2,q2]->s/4(1-beta Cos[teta])}

res2=res1 /. kin2

c1=Simplify[Coefficient[res2,Qf2,1] /. mf^2-> s (1-beta^2)/4, Trig->False]
c2=Simplify[Coefficient[res2,F2,1] /. mf^2->  s (1-beta^2)/4, Trig->False]
c3=Simplify[Coefficient[res2,ReF,1] /. mf^2-> s (1-beta^2)/4, Trig->False]

res3= Qf2 c1/s^2 + F2 c2/s^2 + ReF c3/s^2


dsigdOmega= \[Alpha]^2 /4/s beta res3

Print["\*FractionBox[d\[Sigma], d\[CapitalOmega]] = ",dsigdOmega]


(********************* Fim do Programa **********************)
