I am making a Feynman diagram for Compton scattering in LaTeX. There are two diagrams actually. First one is ok. The code is:
\begin{tikzpicture}
\begin{feynman}
\diagram[horizontal=a to b] {
i1 [particle=\(e^{-}\)] -- [fermion,momentum'=\(p_{i}\)] a -- [photon,reversed momentum'=\(k_{i}\)] f1 [particle=\(\gamma\)],
a -- [fermion] b,
i2 [particle=\(\gamma\)] -- [photon,reversed momentum'=\(k_{f}\)] b -- [fermion,momentum'=\(p_{f}\)] f2 [particle=\(e^{-}\)],
};
\end{feynman}
\end{tikzpicture}
It results in:
Now, the second diagram did not end up well.
Code is:
\begin{tikzpicture}
\begin{feynman}
\diagram[horizontal=a to b] {
i1 [particle=\(p_{i}\)]
-- [fermion,momentum'=\(p_{i}\)] a
-- [draw=none] f1 [particle=\(\gamma\)],
a -- [fermion, edge label'=\( \)] b,
f2 [particle=\(\gamma\)]
-- [draw=none] b
-- [fermion,momentum'=\(p_{f}\)] i2 [particle=\(p_{f}\)],
};
\diagram* {
(a) -- [photon,momentum'=\(k_{f}\)] (f2),
(f1) -- [photon,,momentum'=\(k_{i}\)] (b),
};
\end{feynman}
\end{tikzpicture}
It results in:
I want the photon momentum arrows to be above the photon lines, and shorter than they are now. I would also like them to be by the beginning of the photon line, not in the middle. This image shows approximately how I would want the diagram to look like. Red lines show where the arrows should be.
Any help is welcome! Thank you
% !TeX TS-program = lualatex
\documentclass{article}
\usepackage{tikz-feynman}
\begin{document}
\begin{tikzpicture}
\begin{feynman}
\diagram[horizontal=a to b] {
i1 [particle=\(p_{i}\)]
-- [fermion,momentum'=\(p_{i}\)] a
-- [draw=none] f1 [particle=\(\gamma\)],
a -- [fermion, edge label'=\( \)] b,
f2 [particle=\(\gamma\)]
-- [draw=none] b
-- [fermion,momentum'=\(p_{f}\)] i2 [particle=\(p_{f}\)],
};
\diagram* {
(a) -- [
photon,
momentum={[
arrow shorten=0.25,
xshift=4mm,
yshift=2mm
]$k_{f}$}
] (f2),
(f1) -- [
photon,
momentum={[
arrow shorten=0.25,
xshift=-4mm,
yshift=2mm
]$k_{i}$}
] (b),
};
\end{feynman}
\end{tikzpicture}
\end{document}