<< "dirac/Tracer.m"

VectorDimension[4]

Spur[1]

electroncurrent = 
      G[le, p1 + me U]**G[le, {mu}]**G[le, p2 + me U]**G[le, {nu}]

ecurrent = electroncurrent /. le -> 1

pcurrent = 
      K1 (-S[{mu}, {nu}] + ((S[q, {mu}] S[q, {nu}])/q) . q) + 
        ((K2 (S[p, {mu}] + (1/2) S[q, {mu}]) 
            (S[p, {nu}] + (1/2) S[q, {nu}]))/(M^2))

msq1 = 
      Simplify[ContractEpsGamma[ecurrent pcurrent] /. {p . p -> (M^2), 
            p . q -> -q . (q/2)}]

msq2 = 
      Simplify[msq1 /. {p1 . q -> q . (q/2), 
            p2 . q -> -q . (q/2)}]

msq2a = Collect[msq2, {K1, K2}]

msq3a = 
      Simplify[msq2a[[1]] /. 
          q . q -> 2 (me^2) - 2 p1 . p2]

msq3b = 
      Simplify[msq2a[[2]] /. 
          p1 . p2 -> (me^2) - q . (q/2)]

msq3b1 = msq3b

msq3b1[[3, 1]] = 
      msq3b[[3, 1]] /. 
        p . p1 -> p . q + p . p2

msq3b2 = Simplify[msq3b1 /. p . q -> -q . (q/2)]

msq4 = msq3a + msq3b2

msqlab = 
      Collect[Simplify[
          msq4 /. {me -> 0, 
              p1 . p2 -> E1 E2 (1 - Cos[theta]), 
              p . p1 -> E1 M, p . p2 -> E2 M, 
              q . q -> -2 E1 E2 (1 - Cos[theta])}], {K1, K2, 
          E1, E2}]