Tikz-feynman: Searching for the perfect tadpole

tikz-feynmantikz-styles

I'm plotting automatically generated and laid-out (by tikz-feynman's default spring layout) QED feynman diagrams.

I'm looking to improve the look of the "tadpoles" i.e the vertices where both fermion arcs are attached to the same vertex.

This image shows the options I'm aware of/have considered (the last one a "work in progress"):
Tadpoles

Self-contained code to produce those is below (works with Debian 11's texlive's lualatex).

The first row shows use of loop. Which I'm not sure is actually part of tikz-feynman as its not mentioned in the documentation and I've just seen it used in other people's examples. That can look good when oriented opposite the photon arc, but so far as I know it needs the angles to be set manually… is there any way of automatically getting the loop to be opposite the incoming photon, bearing in mind I'm not controlling the positioning of anything explicitly and leaving it up to tikz-feynman's layout?

The second row shows simply setting the tadpole vertex to an empty circle. That'd actually be pretty good if I could make the circle a bit bigger and put an arrowhead on it somewhere.

The third row is the start of an attempt to do just that, by defining a tadpole style for a vertex.

Here's the code to produce the above plot. What I'm ideally looking for is what I should be filling out the \tikzfeynmanset{tadpole/.style={... with to get a white-filled black circle with no text label, a specified size and an arrowhead somewhere on it. However at this point I'm completely out of my depth with tikz and how this stuff interacts with tikz-feynman. Thanks for any help or pointers.

Code for above plot:

\documentclass[a4paper]{minimal}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning,decorations,backgrounds,calc,er,patterns}

\usepackage[compat=1.1.0]{tikz-feynman}

% First groping towards a custom "tadpole" style.
\tikzfeynmanset{
  tadpole/.style={
    /tikz/shape=circle,
    /tikz/minimum size=5mm,
    /tikz/draw=black,
    /tikz/fill=white,
    /tikz/decoration={name=none}
  }
}

% Tweak table appearance
\setlength{\tabcolsep}{1cm}
\renewcommand{\arraystretch}{2.0}

\begin{document}

\begin{center}
  \begin{tabular}{ccc}

    \parbox{3cm}{Using \texttt{loop}:\\Looks reasonable, but needs manual orientation.}

    &

    \parbox{3cm}{
      \resizebox{!}{3cm}{
        \begin{tikzpicture}
          \begin{feynman}
            \diagram[small,vertical=out to in]{
              in [desired at={(0,-1)}],
              in -- [fermion] a [dot],
              a [dot] -- [photon] b [dot],
              b [dot] -- [out=315,in=45,loop] b [dot],
              a [dot] -- [fermion] out,
              out [desired at={(0,1)}]
            };
          \end{feynman}
        \end{tikzpicture}
      }
    }
    
    &

    \parbox{3cm}{
      \resizebox{!}{3cm}{
        \begin{tikzpicture}
          \begin{feynman}
            \diagram[small,vertical'=out to in]{
              in [desired at={(0,-1)}],
              in -- [fermion] a [dot],
              a [dot] -- [photon] b [dot],
              b [dot] -- [out=315,in=45,loop] b [dot],
              a [dot] -- [fermion] out,
              out [desired at={(0,1)}]
            };
          \end{feynman}
        \end{tikzpicture}
      }
    }
    
    \\ & & \\

    \parbox{3cm}{Using \texttt{empty dot}:\\Would be better if bigger, and with an arrow.}
    
    &

    \parbox{3cm}{
      \resizebox{!}{3cm}{
        \begin{tikzpicture}
          \begin{feynman}
            \diagram[small,vertical=out to in]{
              in [desired at={(0,-1)}],
              in -- [fermion] a [dot],
              a [dot] -- [photon] b [empty dot],
              a [dot] -- [fermion] out,
              out [desired at={(0,1)}]
            };
          \end{feynman}
        \end{tikzpicture}
      }
    }
    
    &

    \parbox{3cm}{
      \resizebox{!}{3cm}{
        \begin{tikzpicture}
          \begin{feynman}
            \diagram[small,vertical'=out to in]{
              in [desired at={(0,-1)}],
              in -- [fermion] a [dot],
              a [dot] -- [photon] b [empty dot],
              a [dot] -- [fermion] out,
              out [desired at={(0,1)}]
            };
          \end{feynman}
        \end{tikzpicture}
      }
    }

    \\ & & \\

    \parbox{3cm}{Attempting to use a custom \texttt{tadpole} style:\\I've idea how to control the size and suppress label.}
    
    &

    \parbox{3cm}{
      \resizebox{!}{3cm}{
        \begin{tikzpicture}
          \begin{feynman}
            \diagram[small,vertical=out to in]{
              in [desired at={(0,-1)}],
              in -- [fermion] a [dot],
              a [dot] -- [photon] b [tadpole],
              a [dot] -- [fermion] out,
              out [desired at={(0,1)}]
            };
          \end{feynman}
        \end{tikzpicture}
      }
    }
    
    &

    \parbox{3cm}{
      \resizebox{!}{3cm}{
        \begin{tikzpicture}
          \begin{feynman}
            \diagram[small,vertical'=out to in]{
              in [desired at={(0,-1)}],
              in -- [fermion] a [dot],
              a [dot] -- [photon] b [tadpole],
              a [dot] -- [fermion] out,
              out [desired at={(0,1)}]
            };
          \end{feynman}
        \end{tikzpicture}
      }
    }

  \end{tabular}
\end{center}

\end{document}

Best Answer

\documentclass[tikz, border=1cm]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\usetikzlibrary{arrows.meta}

\newcommand{\tadradius}{3mm}
\newcommand{\tadangle}{90}
\tikzset{
tadpole/.style={
circle,
minimum size=2*\tadradius,
inner sep=0,
append after command={
\pgfextra
\draw[-{Stealth[length=4pt, sep=0pt -1]}] (\tikzlastnode) +(\tadangle:\tadradius) arc[start angle=\tadangle, end angle=\tadangle-360, radius=\tadradius];
\endpgfextra
}}}

\begin{document}

\begin{tikzpicture}
\begin{feynman}
\diagram[small,vertical=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b [tadpole],
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}

\begin{tikzpicture}
\begin{feynman}
\diagram[small,vertical'=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b [tadpole],
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}

\end{document}

Two feynman diagrams with circles with arrow

Edit:

If the loop is a fermion, you should change the arrow tip to Triangle to mimic tikz-feynman arrows. But why not use the packages own notation like this:

\documentclass[tikz, border=1cm]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}

\begin{tikzpicture}
\begin{feynman}
\diagram[small, vertical=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b  -- [half left] bm -- [fermion, half left] b,
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}
  
\end{document}

Feynman diagram with fermion loop

Edit: For completeness, here is the tadpole style without label:

\documentclass[tikz, border=1cm]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\usetikzlibrary{arrows.meta, bending}

\newcommand{\tadradius}{3mm}
\newcommand{\tadangle}{90}
\tikzset{
tadpole/.style={
particle={},
circle,
minimum size=2*\tadradius,
inner sep=0,
append after command={
\pgfextra
\draw[-{Triangle[width=3pt, length=4pt, sep=0pt -1]}] (\tikzlastnode) +(\tadangle+10:\tadradius) arc[start angle=\tadangle+10, end angle=\tadangle-360, radius=\tadradius];
\endpgfextra
}}}

\begin{document}

\begin{tikzpicture}
\begin{feynman}
\diagram[small,vertical=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b [tadpole],
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}

\end{document}

Feynman diagram with fermion loop

Related Question