Drawing a scattering Feynman diagram with TikZ

One possibility: instead of a tree, I just used some coordinates and decorated paths; I used the triangle 45 arrow tip from the arrows library, changed the gluon style to use decoration={coil,aspect=0}, and suppressed parts of the original code not relevant here:

\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}

\begin{document}

\tikzset{
particle/.style={thick,draw=blue, postaction={decorate},
    decoration={markings,mark=at position .5 with {\arrow[blue]{triangle 45}}}},
gluon/.style={decorate, draw=black,
    decoration={coil,aspect=0}}
 }

\begin{tikzpicture}[node distance=1cm and 1.5cm]
\coordinate[label=left:$e^{-}$] (e1);
\coordinate[below right=of e1] (aux1);
\coordinate[above right=of aux1,label=right:$e^{-}$] (e2);
\coordinate[below=1.25cm of aux1] (aux2);
\coordinate[below left=of aux2,label=left:$e^{-}$] (e3);
\coordinate[below right=of aux2,label=right:$e^{-}$] (e4);

\draw[particle] (e1) -- (aux1);
\draw[particle] (aux1) -- (e2);
\draw[particle] (e3) -- (aux2);
\draw[particle] (aux2) -- (e4);
\draw[gluon] (aux1) -- node[label=right:$\gamma$] {} (aux2);
\end{tikzpicture}
\end{document}

enter image description here

After an edit to the question, here's some new code with the required coil decoration:

\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}


\begin{document}
\tikzset{
particle/.style={thick,draw=blue, postaction={decorate},
    decoration={markings,mark=at position .5 with {\arrow[blue]{triangle 45}}}},
gluon/.style={decorate, draw=black,
    decoration={coil,aspect=0.3,segment length=3pt,amplitude=3pt}}
 }

\begin{tikzpicture}[node distance=1cm and 1.5cm]
\coordinate[label=left:$G$] (e1);
\coordinate[below right=of e1] (aux1);
\coordinate[above right=of aux1,label=right:$N$] (e2);
\coordinate[below=1.25cm of aux1] (aux2);
\coordinate[below left=of aux2,label=left:$N$] (e3);
\coordinate[below right=of aux2,label=right:$G$] (e4);

\draw[gluon] (e1) -- (aux1);
\draw[particle] (aux1) -- (e2);
\draw[particle] (e3) -- (aux2);
\draw[gluon] (aux2) -- (e4);
\draw[particle] (aux2) -- node[label=right:$N$] {} (aux1);
\end{tikzpicture}
\end{document}

enter image description here


You can also use the feynMP package to create Feynman diagrams. It uses metapost instead of tikz, but provides a nice interface for creating different types of Feynman diagrams. For example:

\documentclass{article}
\usepackage{feynmp}
\DeclareGraphicsRule{*}{mps}{*}{}

\begin{document}
\unitlength = 1mm
\begin{fmffile}{gluon}
\begin{fmfgraph*}(40,30) 
  \fmfleft{i1,i2} 
  \fmflabel{$e^{-}$}{i1}
  \fmflabel{$e^{-}$}{i2}
  \fmfright{o1,o2}
  \fmflabel{$e^{-}$}{o1}
  \fmflabel{$e^{-}$}{o2}
  \fmf{fermion, fore=blue}{i1,v1,o1} 
  \fmf{fermion, fore=blue}{i2,v2,o2}
  \fmf{photon,label=$\gamma$}{v1,v2} 
  \fmfdot{v1,v2}
\end{fmfgraph*}
\end{fmffile}
\write18{mpost gluon}
\end{document}

Run this twice with pdflatex --shell-escape filename, and you will get

enter image description here


These diagrams are very easy to produce with the new tikz-feynman package (see also the project page), based on this answer. The only requirement for using automatic positioning of the vertices is to compile the document with lualatex:

\documentclass[tikz]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\feynmandiagram [vertical=b to a] {
  i1 [particle=\(\textup{e}^{-}\)] -- [fermion] a -- [fermion] i2 [particle=\(\textup{e}^{-}\)],
  a -- [photon,edge label'=\(\gamma\)] b,
  f1 [particle=\(\textup{e}^{-}\)] -- [fermion] b -- [fermion] f2 [particle=\(\textup{e}^{-}\)],
};

\tikzfeynmanset{
  every fermion={draw=blue},
}
\feynmandiagram [vertical=b to a] {
  i1 [particle=\(N\)] -- [fermion] a,
  i2 [particle=\(G\)] -- [photon] a,
  a  -- [fermion,edge label'=\(N\)] b,
  b  -- [photon] f1 [particle=\(G\)],
  b  -- [fermion] f2 [particle=\(N\)],
};
\end{document}

enter image description here

enter image description here