% !TEX program = pdflatexmk
% !TEX parameter = -shell-escape
% Author: Izaak Neutelings (December 24)
% Instructions: To compile via command line, run the following twice
%   pdflatex -shell-escape extract/HNL$TAG.tex
\documentclass[11pt,border=4pt]{standalone}
\usepackage{feynmp-auto}
\usepackage{xcolor}
\definecolor{colHNL}{rgb}{.1,.5,.1} % HNL (green)
\usepackage{scalerel}
\newcommand{\mylbrace}[2]{\vspace{#2pt}\hspace{4pt}\scaleleftright[\dimexpr6pt+#1\dimexpr0.11pt]{\lbrace}{\rule[\dimexpr2pt-#1\dimexpr0.5pt]{-4pt}{#1pt}}{.}}
\newcommand{\myrbrace}[2]{\vspace{#2pt}\scaleleftright[\dimexpr6pt+#1\dimexpr0.11pt]{.}{\rule[\dimexpr2pt-#1\dimexpr0.5pt]{-4pt}{#1pt}}{\rbrace}\hspace{2pt}}
\definecolor{colvtx}{rgb}{.9,0,0} % vertex (red)
\begin{document}
\begin{fmffile}{feyngraph}
  \fmfframe(13,18)(34,20){ % padding (L,T)(R,B)
  \begin{fmfgraph*}(160,80) % canvas (W,H)
    % line style
    \fmfset{wiggly_len}{12} % boson wavelength
    \fmfset{wiggly_slope}{65} % boson slope of waves
    % external vertices
    \fmfstraight
    \fmftop{t1,t2,t3} % top vertices
    \fmfbottom{b1,b2,d,b3} % bottom vertices
    \fmfright{o2,o1,d,d}
    \fmfshift{10 right}{o1,o2}
    \fmfshift{6 right}{b2} % make quark line longer
    \fmfshift{3 right}{t2} % move outgoing (primary) lepton
    % skeleton
    \fmf{phantom,t=1.3}{v1,t1} % pull
    \fmf{phantom,t=1}{v1,b1} % pull
    \fmf{fermion,t=1.2,f=(.1,,.5,,.1),label=\color{colHNL} N$_\ell$,l.s=right,l.d=6}{v1,v2} % HNL s-channel
    \fmf{fermion,t=1.3}{v2,t3} % outgoing lepton
    \fmf{phantom,t=1}{v2,b3} % pull
    \fmffreeze
    % B decay
    \fmf{boson,t=1.5,label=W$^{\pm*}$,l.s=left,l.d=4}{d1,v1} % left W boson
    \fmf{fermion,t=2}{b2,d1,b1} % B meson top quark lines
    \fmf{phantom,t=0.6}{b1,d1} % pull left W decay vertex to left
    % B decay spectator quarks
    \fmffreeze % before using \fmfi
    \fmf{phantom,t=0}{d1,b2} % hack to reverse arrowhead
    \fmfi{fermion}{vpath (__b1,__d1) shifted (0,-13)} % incoming spectator quark
    \fmfi{fermion}{vpath (__d1,__b2) shifted (0,-13)} % outgoing spectator quark
    \fmfv{l=\parbox{6pt}{B}\mylbrace{21}{-12},l.d=8,l.a=180}{b1} % left brace
    \fmfv{l=\myrbrace{21}{-12}\parbox{2pt}{$X$},l.d=8,l.a=0}{b2} % right brace
    % HNL decay
    \fmf{fermion,t=1.1}{t2,v1} % outgoing (primary) lepton
    \fmf{boson,t=2,label=W$^{\pm*}$,l.s=left,l.d=4}{d2,v2}
    \fmf{fermion,t=2}{o1,d2,o2} % right W decay
    \fmf{phantom,t=1.4}{b2,d2} % pull right W decay vertex to left
    \fmf{phantom,t=1.4}{o2,d2} % pull right W decay vertex to right
    \fmfv{l=\myrbrace{34}{-26}\parbox{2pt}{$\pi^\pm$},l.d=8,l.a=0}{o1} % right brace
    % labels
    \fmfv{l.d=3,l.a=25,l=$\ell^\pm_\mathrm{P}$}{t2}
    \fmfv{l.d=4,l.a=60,l=$\ell^\mp$}{t3}
    %\fmfv{d.sh=circle,d.si=3,f=(.9,,0,,0),l.d=3,l.a=113,
    %      l=\normalsize\color{colvtx}$V_{\ell N}$}{v1} % neutrino
    %\fmfv{d.sh=circle,d.si=3,f=(.9,,0,,0),l.d=3,l.a=113,
    %      l=\normalsize\color{colvtx}$V_{\ell N}$}{v2} % neutrino
  \end{fmfgraph*}
  } % close \fmfframe
\end{fmffile}
\end{document}