Fermion Matrix Elements

Examples of simple  Mathematica calculations of gamma matrices, spinors, and matrix elements  in the text MouseOver, using the Pauli-Dirac and chiral representations. Caveat: there is no guarantee that the commands used are the most elegant or most efficient. More elaborate calculations involving traces, color factors, polarization vectors, etc, are more easily handled using the FeynCalc package, as illustrated in feyncalcexample.nb.

DateString[]
{$Version,$UserName}

Macros and definitions of gamma matrices and spinors

General

Projnn[ma_,mb_]:=(*Table[ma[[iv]]mb[[jv]]\[Conjugate],{iv,Dimensions[ma][[1]]},{jv,Dimensions[ma][[1]]}]*)
KroneckerProduct[ma,mb\[Conjugate]]
Innerprodnn[ma_,mb_]:=ma\[Conjugate].mb
(*Projnn and Innerprodnn assume that ma and mb are vectors of same dimension*)
Im4=IdentityMatrix[4];
metric[μ_]:=If[μ==0,1,If[μ≤3,-1,0]]

Pauli matrices and spinors

Pm[i_]:=If[i≥0&&i≤3,PauliMatrix[i],DiagonalMatrix[{0,0}]]
Pmbar[i_]:=If[i≥1&&i≤3,-Pm[i],Pm[i]]
Zm2=DiagonalMatrix[{0,0}]; Im2=IdentityMatrix[2];
zvec={0,0,0};
Chispin[Phispinor_]:=- I Pm[2].Phispinor\[Conjugate]
Phispinor[i_]:=If[i==1,{1,0},If[i==2,{0,1},{0,0}]]
Chispinor[i_]:=Chispin[Phispinor[i]]
Sigdotp[pvec_]:=Sum[pvec[[iv]]  Pm[iv],{iv,3}]
Evec[pvec_,m_]:=Sqrt[Sum[pvec[[iv]]^2,{iv,3}]+m^2]
Nvec[pvec_,m_]:=Sqrt[Evec[pvec,m]+m]
Sigproj[pvec_,m_]:=Sigdotp[pvec]/(Evec[pvec,m]+m)
Sigproj2[Eval_,pvec_,m_]:=Sigdotp[pvec]/(Eval+m)

Helicity spinors, Table 2.1 (1=+, 2=-)

Phihel[θ_,ϕ_,i_]:=If[i==1,{Cos[θ/2],Sin[θ/2]Exp[I ϕ]},If[i==2,{-Sin[θ/2]Exp[-I ϕ],Cos[θ/2]1},{0,0}]]
Chihel[θ_,ϕ_,i_]:=Chispin[Phihel[θ\[Conjugate],ϕ\[Conjugate],i]](*avoid conjugating angles*)
Phihelmin[θ_,ϕ_,i_]:=Phihel[Pi-θ,Pi+ϕ,i]//Simplify
Chihelmin[θ_,ϕ_,i_]:=Chihel[Pi-θ,Pi+ϕ,i]//Simplify

Dirac matrices and spinors in Pauli-Dirac representation

PDG[μ_]:=
If[μ==0,Join[Join[Im2,Zm2,2],Join[Zm2,-Im2,2]],
If[μ>0&&μ≤3,Join[Join[Zm2,Pm[μ],2],Join[-Pm[μ],Zm2,2]],
If[μ==5,Join[Join[Zm2,Im2,2],Join[Im2,Zm2,2]],
If[μ==6,Join[Join[Im2,Im2,2],Join[Im2,Im2,2]]/2,
If[μ==7,Join[Join[Im2,-Im2,2],Join[-Im2,Im2,2]]/2,
DiagonalMatrix[{0,0,0,0}]
]]]]](*6=(Subscript[P, R]),7=(Subscript[P, L])*)
PDSIG[μ_,ν_]:= If[μ≥0&& ν≥ 0&& μ<=3 && ν<=3,I( PDG[μ].PDG[ν]- PDG[ν].PDG[μ])/2,DiagonalMatrix[{0,0,0,0}]]

Uspinor[pvec_,m_,Phispinor_]:= Join[Phispinor,Sigproj[pvec,m].Phispinor]
Uspinor2[Eval_,pvec_,m_,Phispinor_]:=  Join[Phispinor,Sigproj2[Eval,pvec,m].Phispinor]
Vspinor[pvec_,m_,Chispinor_]:= Join[Sigproj[pvec,m].Chispinor,Chispinor]
Vspinor2[Eval_,pvec_,m_,Chispinor_]:=  Join[Sigproj2[Eval,pvec,m].Chispinor,Chispinor]
Spinorbar[Spinor_]:=Spinor\[Conjugate].PDG[0]
Spinordag[Spinor_]:=Spinor\[Conjugate]
(*Unnormalized- normalization has factor Sqrt[E+m] *)

Dirac matrices and spinors in chiral representation

ChG[μ_]:=If[μ≥ 0&&μ≤3,Join[Join[Zm2,Pm[μ],2],Join[Pmbar[μ],Zm2,2]],
If[μ==5,Join[Join[-Im2,Zm2,2],Join[Zm2,Im2,2]],
If[μ==6,Join[Join[Zm2,Zm2,2],Join[Zm2,Im2,2]],
If[μ==7,Join[Join[Im2,Zm2,2],Join[Zm2,Zm2,2]],
DiagonalMatrix[{0,0,0,0}]
]]]](*6=(Subscript[P, R]),7=(Subscript[P, L])*)
ChSIG[μ_,ν_]:= If[μ≥0&& ν≥ 0&& μ<=3 && ν<=3,I( ChG[μ].ChG[ν]- ChG[ν].ChG[μ])/2,DiagonalMatrix[{0,0,0,0}]]

lam[Eval_,pval_,m_,i_]:=If[i==1,1-pval/(Eval+m),
If[i==2,1+pval/(Eval+m),0]]
Uhel[Eval_,pval_,θ_,ϕ_,m_,i_]:=Join[lam[Eval,pval,m,i ]Phihel[θ,ϕ,i],lam[Eval,pval,m,Mod[i+1,2,1] ]Phihel[θ,ϕ,i]]
Vhel[Eval_,pval_,θ_,ϕ_,m_,i_]:=Join[lam[Eval,pval,m,Mod[i+1,2,1] ]Chihel[θ,ϕ,i],-lam[Eval,pval,m,i ]Chihel[θ,ϕ,i]]
Uhelmin[Eval_,pval_,θ_,ϕ_,m_,i_]:=Join[lam[Eval,pval,m,i ]Phihelmin[θ,ϕ,i],lam[Eval,pval,m,Mod[i+1,2,1] ]Phihelmin[θ,ϕ,i]]
Vhelmin[Eval_,pval_,θ_,ϕ_,m_,i_]:=Join[lam[Eval,pval,m,Mod[i+1,2,1] ]Chihelmin[θ,ϕ,i],-lam[Eval,pval,m,i ]Chihelmin[θ,ϕ,i]]
(*unnormalized-normalization has factor Sqrt[(E+m)/2] *)
Sphelbar[Spinor_]:=Spinor\[Conjugate].ChG[0]
Spheldag[Spinor_]:=Spinor\[Conjugate]

Tests and Examples

Spinors and properties

pval={p1,p2,p3};
Sigdotp[pval]
Sigproj[pval,m]  //Simplify
Uspinor2[Eval,pval,m,{a,b}]
Vspinor2[Eval,pval,m,{a,b}]
pz={0,0,p}
Uspinor2[Eval,pz,m,Phispinor[1]]
Spinorbar[%]//Refine[#,{pz>=0,m≥0,Eval≥0}]&
Vspinor2[Eval,pz,m,Chispinor[2]]
Uspinor[pz,m,Phispinor[1]]/.m->0 //Refine[#,{p>0}]&
Vspinor[pz,m,Chispinor[2]]/.m->0 //Refine[#,{p>0}]&
Uhel[Eval1,pval1,θ,ϕ,m,1]
Vhelmin[Eval1,pval1,θ,ϕ,m,1]
Projnn[{a,b,c},{d,e,f}]
Innerprodnn[{a,b,c},{d,e,f}]
Projnn[Chispinor[1],Chispinor[1]]
Sum[Projnn[Chispinor[i],Chispinor[i]],{i,2}]
Innerprodnn[Chispinor[1],Chispinor[1]]
Chihel[θ,ϕ,2]
Innerprodnn[Phihel[θ,ϕ,1],Phihel[θ,ϕ,1]]//Refine[#,{θ∈Reals, ϕ∈Reals}]&//Simplify
Sum[Projnn[Phihel[θ,ϕ,i],Phihel[θ,ϕ,i]],{i,2}]//Refine[#,{θ∈Reals, ϕ∈Reals}]&//Simplify

Spinor inner products and projections, 2.172, 2.173

pval={p1,p2,p3};
kinval={Eval->Evec[pval,m],Nval->Nvec[pval,m]};
uspin[i_]:=Sqrt[Eval+m]  Uspinor2[Eval,pval,m,Phispinor[i]]
ubarspin[i_]:=Spinorbar[uspin[i]]
udagspin[i_]:=Spinordag[uspin[i]]
ubarspin[1].uspin[2]//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&
udagspin[1].uspin[2]  //Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&
ubarspin[1].uspin[1]/.kinval //Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&//Simplify
udagspin[1].uspin[1] /.kinval//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&//FullSimplify

vspin[i_]:=Sqrt[Eval+m]  Vspinor2[Eval,pval,m,Chispinor[i]]
vbarspin[i_]:=Spinorbar[vspin[i]]
vdagspin[i_]:=Spinordag[vspin[i]]
vbarspin[1].vspin[2]//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&
vdagspin[1].vspin[2]  //Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&
vbarspin[1].vspin[1]/.kinval //Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&//Simplify
vdagspin[1].vspin[1] /.kinval//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&//FullSimplify

vspinm[i_]:=Sqrt[Eval+m]  Vspinor2[Eval,-pval,m,Chispinor[i]]
uspinm[i_]:=Sqrt[Eval+m]  Uspinor2[Eval,-pval,m,Phispinor[i]]
ubarspin[1].vspin[1]//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&
ubarspin[1].vspin[2]//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&
udagspin[1].vspinm[1]//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&
udagspin[1].vspinm[2]//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&

Sum[KroneckerProduct[uspin[i],ubarspin[i]],{i,2}]//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&;
(%/.kinval)/.{p1->0,p2->0}
%/.{p3^2->Eval^2-m^2}//Refine[#,{Eval>0,m>0}]& //Simplify
Eval PDG[0]-p3 PDG[3]+m Im4 (*compare result with RHS*)

Sum[KroneckerProduct[uspin[i],ubarspin[i]],{i,2}]//Refine[#,{p1>0,p2>0,p3>0,Eval>0,m>0}]&//Simplify
%/.{p1^2+p2^2+p3^2->Eval^2-m^2}//Simplify
Eval  PDG[0]-p1 PDG[1]-p2 PDG[2]-p3 PDG[3]+m Im4 (*compare result with RHS*)

Physical Processes

(SuperMinus[e])(SuperPlus[e]) → f (OverBar[f]) from p 57

(*pev={0,0,pi};
pfv={pi Sin[θf],0,pi Cos[θf]};*)
coeff=-I e^2 (Subscript[Q, f])/16;(*normalizations, propagator, vertex factors*)

Me[iem_,iep_,μ_]:=Sphelbar[ Vhelmin[pi,pi,0,0,0,iep]].ChG[μ].Uhel[pi,pi,0,0,0,iem]
Mf[if_,ifb_,μ_]:=Sphelbar[ Uhel[pi,pi,θf,0,0,if]].ChG[μ].Vhelmin[pi,pi,θf,0,0,ifb]
Ampef[iem_,iep_,if_,ifb_]:= coeff Sum[metric[μ] Me[iem,iep,μ] Mf[if,ifb,μ] ,{μ,0,3}]

Ampef[1,2,1,2]//Refine[#,{pi>0,θf>0}]&//Simplify
Ampef[1,2,2,1]//Refine[#,{pi>0,θf>0}]&//Simplify
Ampef[1,1,1,1]//Refine[#,{pi>0,θf>0}]&//Simplify
(*agrees with 2.245*)

Bhabha scattering, p54

Coefb=I 4 Pi α;
Ampeb1[i1_,i2_,i3_,i4_]:=Sum[metric[μ]Sphelbar[ Uhel[pi,pi,θf,0,0,i3]].ChG[μ].Vhelmin[pi,pi,θf,0,0,i4]
Sphelbar[ Vhelmin[pi,pi,0,0,0,i2]].ChG[μ].Uhel[pi,pi,0,0,0,i1] ,{μ,0,3}]//Refine[#,{pi>0,θf>0}]&
Ampeb2[i1_,i2_,i3_,i4_]:=Sum[metric[μ]Sphelbar[ Uhel[pi,pi,θf,0,0,i3]].ChG[μ].Uhel[pi,pi,0,0,0,i1] 
Sphelbar[ Vhelmin[pi,pi,0,0,0,i2]].ChG[μ].Vhelmin[pi,pi,θf,0,0,i4],{μ,0,3}]//Refine[#,{pi>0,θf>0}]&
Ampeb[i1_,i2_,i3_,i4_]:=Coefb (s/16) (Ampeb1[i1,i2,i3,i4]/s-Ampeb2[i1,i2,i3,i4]/t)
dsdzf[i1_,i2_,i3_,i4_]:=Ampeb[i1,i2,i3,i4] Ampeb[i1,i2,i3,i4]\[Conjugate] /(32 Pi s)

Ampeb[1,2,2,1]//Simplify

dsdzf[1,1,1,1]//Simplify//Refine[#,{pi>0,θf>0,α>0,s>0,t>0}]&

dsbdz=Sum[dsdzf[i1,i2,i3,i4] ,{i1,2},{i2,2},{i3,2},{i4,2}]/4 //Simplify//Refine[#,{pi>0,θf>0,α>0,s>0,t>0}]&
dist1=% s/(Pi α^2) //Apart //Simplify
dist2=% /.{t->-s(1-Cos[θf])/2,u->-s(1+Cos[θf])/2}//Simplify
dist3=(t^2+u^2)/s^2+(s^2+u^2)/t^2+2 u^2/(s t)/.{t->-s(1-Cos[θf])/2,u->-s(1+Cos[θf])/2}//Simplify (*compare with 2.231*)
dist2-dist3//Simplify

Plot[dist2 Sin[θf],{θf,0.1,Pi}]

β decay, p271

Neglect proton and neutron momentum, and their mass difference (except in phase space). Work in PD for nucleons and chiral for leptons.

Lifetime

Mn[ip_,in_,μ_]:=Spinorbar[ Uspinor2[mn,zvec,mn,Phispinor[ip]]].PDG[μ].(Im4 -  λ PDG[5]).Uspinor2[mn,zvec,mn,Phispinor[in]]
Ml[Ee_,pe_,θe_,ϕe_,me_,ie_,pnu_,θnu_,ϕnu_,μ_]:=Sphelbar[Uhel[Ee,pe,θe,ϕe,me,ie]].ChG[μ].ChG[7].Vhel[pnu,pnu,θnu,ϕnu,0,1]

Mn[2,1,0] (*test*)
Ml[Ee,pe,θe,ϕe,me,2,pnu,θnu,ϕnu,0]//Refine[#,{Ee>0,pe>0,θe>0,ϕe>0,me>0,pnu>0,θnu>0,ϕnu>0}]&
%/.{me ->0,Ee->pe}

Amp[ip_,in_,ie_]:= Sum[metric[μ] Mn[ip,in,μ] Ml[Ee,pe,θe,ϕe,me,ie,pnu,θnu,ϕnu,μ] ,{μ,0,3}];

Amp[1,1,2]//Refine[#,{Ee>0,pe>0,θe>0,ϕe>0,me>0,pnu>0,θnu>0,ϕnu>0}]&
%/.{me ->0,Ee->pe}

coef =(Subscript[G, F])^2 mn^2(Ee+me) pnu
Ampsq= Sum[Amp[ip,in,ie] Amp[ip,in,ie]\[Conjugate],{ip,2},{in,2},{ie,2}]//Refine[#,{Ee>0,pe>0,θe>0,ϕe>0,me>0,pnu>0,θnu>0,ϕnu>0,λ >0}]&//Simplify
Ampsq0=%/.{me ->0,Ee->pe}//Simplify//Apart
Integrate[Ampsq Sin[θnu],{θnu,0, Pi}]/2  (*average over Cos[θnu]*)
coef Integrate[% /.ϕe->0,{ϕnu,0, 2 Pi}]/(2 Pi) (*average over ϕnu*)
%/.pe^2->Ee^2-me^2//Simplify (*agrees with 6.123*)
Ampsq0=%/.{me ->0,Ee->pe}//Simplify

Electron Polarization (6.125)

Ampsq1= Sum[Amp[ip,in,1] Amp[ip,in,1]\[Conjugate],{ip,2},{in,2}]//Refine[#,{Ee>0,pe>0,θe>0,ϕe>0,me>0,pnu>0,θnu>0,ϕnu>0,λ >0}]&//Simplify
Ampsq1av=Integrate[Ampsq1 Sin[θnu]/.ϕe->0,{θnu,0, Pi},{ϕnu,0, 2 Pi}]/(4 Pi)  
Ampsq2= Sum[Amp[ip,in,2] Amp[ip,in,2]\[Conjugate],{ip,2},{in,2}]//Refine[#,{Ee>0,pe>0,θe>0,ϕe>0,me>0,pnu>0,θnu>0,ϕnu>0,λ >0}]&//Simplify
Ampsq2av=Integrate[Ampsq2 Sin[θnu]/.ϕe->0,{θnu,0, Pi},{ϕnu,0, 2 Pi}]/(4 Pi)  
polarization=(Ampsq1av-Ampsq2av)/(Ampsq1av+Ampsq2av)//Simplify
%/.pe^2->Ee^2-me^2//Simplify

Electron angular distribution for polarized neutron (6.124)

Ampsqen= Sum[Amp[ip,1,ie] Amp[ip,1,ie]\[Conjugate],{ip,2},{ie,2}]//Refine[#,{Ee>0,pe>0,θe>0,ϕe>0,me>0,pnu>0,θnu>0,ϕnu>0,λ >0}]&//Simplify
Ampsqenav=Integrate[Ampsqen Sin[θnu]/.ϕe->0,{θnu,0, Pi},{ϕnu,0, 2 Pi}]/(4 Pi)  
(% (Ee+me)/(8 Ee (3 λ^2+1)))/.{pe^2->Ee^2-me^2,pe->βe Ee}//Apart

e ν angular correlation

Can read off from Ampsq, taking e angles wrt  ν

enucorr=Ampsq/.{θnu->0,ϕnu->0,pe^2->Ee^2-me^2}//Simplify
enucorr (Ee+me)/(16 Ee (3 λ^2+1))/.pe->βe Ee//Apart