Wrapping a Feynman diagram in an ellipse or a circle?

One option would be to use the fit library; to use an ellipse you will also need the shapes library:

\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows,fit}
\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={[xshift=-3pt]left:$e^{-}$}] (e1);
\coordinate[below right=of e1] (aux1);
\coordinate[above right=of aux1,label={[xshift=6pt]right:$e^{-}$}] (e2);
\coordinate[below=1.25cm of aux1] (aux2);
\coordinate[below left=of aux2,label={[xshift=-6pt]left:$e^{-}$}] (e3);
\coordinate[below right=of aux2,label={[xshift=3pt]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);
\node[draw,line width=3pt,circle,fit=(e1) (e4),inner sep=.5\pgflinewidth] {};
\end{tikzpicture}
\end{document}

enter image description here

Instead of ultra thick, you could use thick, or line width=<length> for finer control:

\node[draw,line width=3pt,circle,fit=(e1) (e4),inner sep=0pt] {};

A new request has been made in a comment:

... to "factorize" the internal gluon. In other words, I want to split the gluon line inside into two straight lines both touching the circle at the same point (could be in either left or right but something that looks nice).

In this case, the intersections library can be used to locate the point of intersection between the circle and a horizontal diameter and then use this new point to draw the additional lines:

\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,arrows,fit,intersections,decorations.pathmorphing,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={[xshift=-3pt]left:$e^{-}$}] (e1);
\coordinate[below right=of e1] (aux1);
\coordinate[above right=of aux1,label={[xshift=6pt]right:$e^{-}$}] (e2);
\coordinate[below=1.25cm of aux1] (aux2);
\coordinate[below left=of aux2,label={[xshift=-6pt]left:$e^{-}$}] (e3);
\coordinate[below right=of aux2,label={[xshift=3pt]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);
\node[draw,name path=circle,line width=3pt,circle,fit=(e1) (e4),inner sep=.5\pgflinewidth] {};
\path[name path=diameter] let \p1=(aux1), \p2=(aux2) 
  in (aux1|-0,0.5*\y2+0.5*\y1) -- ++(-3cm,0);% horizontal line from the center to the left
\path[name intersections={of=circle and diameter, by={aux3}}];% find the intersection
\draw[particle] (aux2) -- (aux3);
\draw[particle] (aux3) -- (aux1);
\node[label={[xshift=3pt]left:$m$}] at (aux3) {};
\end{tikzpicture}
\end{document}

enter image description here


This is easy to do 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}
\tikzfeynmanset{
  every fermion={blue},
  every anti fermion={blue},
}
\begin{document}
\begin{tikzpicture}
  \begin{feynman}
    \diagram [vertical=b to a]{
      i1 [particle=\(\textup{e}^{-}\)] -- [fermion] a,
      i2 [particle=\(\textup{e}^{-}\)] -- [anti fermion] a,
      a  -- [photon,edge label'=\(\gamma\)] b,
      b  -- [anti fermion] f1 [particle=\(\textup{e}^{-}\)],
      b  -- [fermion] f2 [particle=\(\textup{e}^{-}\)],
    };
    \draw[red,thick] ($(a)!0.5!(b)$) circle (1.85);
  \end{feynman}
\end{tikzpicture}
\end{document}

enter image description here