# feynmp-auto line length and angle

I made this Feynman diagram of W' production showing the incoming and outgoing partons:

\begin{fmffile}{feynmanW_partons}
\begin{fmfgraph*}(150,100)
% External vertices on the left
\fmfleft{i1,i2}
% External vertices on the right
\fmfright{o1,o2,o3,o4}

% protons > blob
\fmf{fermion,tension=0}{i2,v3}
\fmf{fermion,tension=0}{i1,v1}
\fmffreeze

% quarks blob > VB > blob
\fmf{fermion,label=$q$,label.side=right, tension=0.5}{v3,v4}
\fmf{fermion,label=$\bar{q}$,label.side=right,tension=0.5}{v4,v1}

% tension between protons and blob
\fmf{phantom, tension=2}{i2,v3}
\fmf{phantom, tension=2}{i1,v1}

% tension between blob and extra quarks
\fmf{phantom, tension=1}{v1,o1}
\fmf{phantom, tension=1}{v3,o4}

% Labels on external vertices
\fmf{plain,straight}{i2,v3,o4}
\fmf{plain}{i2,v3,v4,v1,i1}

\fmf{plain}{o3,v2,o2}
\fmf{plain,straight}{i1,v1,o1}

\fmfblob{.12w}{v1}
\fmfblob{.12w}{v3}
\fmflabel{$$p$$}{i1}
\fmflabel{$$p$$}{i2}

% \fmflabel{$$o1$$}{o1}
\fmflabel{$\bar{\nu}_{\ell} / \nu_{\ell}$}{o2}
\fmflabel{$\ell^{-} / \ell^{+}$}{o3}
\fmf{boson,label=$\wpmin / \wpplu$}{v4,v2}
\fmffreeze

% bottom lhs vertex
\fmfi{plain}{vpath (__i1,__v1) shifted (thick*(-0.5,2))}
\fmfi{plain}{vpath (__i1,__v1) shifted (thick*(0.5,-2))}

% top lhs vertex
\fmfi{plain}{vpath (__i2,__v3) shifted (thick*(0.5,2))}
\fmfi{plain}{vpath (__i2,__v3) shifted (thick*(-0.5,-2))}

% top rhs vertex
\fmfi{plain}{vpath (__v3,__o4) shifted (thick*(-0.5,2))}
% bottom rhs vertex
\fmfi{plain}{vpath (__v1,__o1) shifted (thick*(0.5,2))}

\end{fmfgraph*}
\end{fmffile}


I messed around with this for a while hoping to shorten the lines for the outcoming partons, maybe adding arrows. I think I would also prefer to have just horizontal lines for the incoming particles as opposed to sloped lines. Does anyone know how I can achieve this? This is another solution:

\begin{fmfgraph*}(150,100)
% External vertices on the left
\fmfleft{i1,i3,i4,i2}
% External vertices on the right
\fmfright{o1,o2,o3,o4}
\fmf{phantom, tension=2}{i2,v3,o4}
\fmf{phantom, tension=2}{i1,v1,o1}

\fmffreeze
% protons > blob
\fmf{fermion,tension=0}{i2,v3}
\fmf{fermion,tension=0}{i1,v1}
\fmffreeze

% quarks blob > VB > blob
\fmf{fermion,label=$q$,label.side=right, tension=0.5}{v3,v4}
\fmf{fermion,label=$\bar{q}$,label.side=left,tension=0.5}{v1,v4}

% tension between protons and blob
\fmf{phantom, tension=2}{i2,v3}
\fmf{phantom, tension=2}{i1,v1}

% tension between blob and extra quarks
\fmf{phantom, tension=1}{v1,o1}
\fmf{phantom, tension=1}{v3,o4}

% Labels on external vertices
\fmf{plain,straight}{i2,v3,o4}
\fmf{plain}{i2,v3,v4,v1,i1}

\fmf{plain}{o3,v2,o2}
\fmf{plain,straight}{i1,v1,o1}

\fmfblob{.05w}{v1}
\fmfblob{.05w}{v3}
\fmfv{label=$p$,label.angle=200}{i1}
\fmfv{label=$p$,label.angle=160}{i2}

% \fmflabel{$$o1$$}{o1}
\fmflabel{$\bar{\nu}_{\ell} / \nu_{\ell}$}{o2}
\fmflabel{$\ell^{-} / \ell^{+}$}{o3}
\fmf{boson,label=$W^{\prime+} / W^{\prime-}$}{v4,v2}
\fmffreeze

% bottom lhs vertex
\fmfi{plain}{vpath (__i1,__v1) shifted (thick*(-0.5,2))}
\fmfi{plain}{vpath (__i1,__v1) shifted (thick*(0.5,-2))}

% top lhs vertex
\fmfi{plain}{vpath (__i2,__v3) shifted (thick*(0.5,2))}
\fmfi{plain}{vpath (__i2,__v3) shifted (thick*(-0.5,-2))}

% top rhs vertex
\fmfi{plain}{vpath (__v3,__o4) shifted (thick*(-0.5,2))}
% bottom rhs vertex
\fmfi{plain}{vpath (__v1,__o1) shifted (thick*(0.5,2))}

\end{fmfgraph*} If you know (or you are willing to learn) Metapost, there is another way of using the feynmp macros to produce your diagrams. You can just do input feynmp at the top, then lay out everything using Metapost directly instead of relying on the automatic layout engine in feynmp, and draw the symbols using the feynmp macros as shown below.

Here's a version of your diagram using that technique. This gives you more control over the precise layout when that is important.

prologues := 3;
outputtemplate := "%j%c.eps";

input feynmp;

beginfig(1);

% middle
z0 = origin;

u = 1cm;

y1 = y3 = y5 = -y2 = -y4 = -y6 = 2u;
x1 = x2 = -1u;
x3 = x4 = -3u;
x5 = x6 = +1u;

z7 = (2u,0);
z8 = (3u,+u);
z9 = (3u,-u);

draw fermion z3--z1 cutafter  fullcircle scaled 16 shifted z1;
draw fermion z1--z0 cutbefore fullcircle scaled 16 shifted z1;
draw (z3--z1) shifted 4 up;
draw (z3--z1) shifted 4 down;
draw (z1--z5) shifted 2 up;
draw (z1--z5) shifted 2 down;

draw fermion z4--z2 cutafter fullcircle scaled 16 shifted z2;
draw fermion z0--z2 cutafter fullcircle scaled 16 shifted z2;
draw (z4--z2) shifted 4 up;
draw (z4--z2) shifted 4 down;
draw (z2--z6) shifted 2 up;
draw (z2--z6) shifted 2 down;

make_blob(z1,16);
make_blob(z2,16);

draw photon z0 -- z7;
draw z7--z8;
draw z7--z9;

label.lft(btex $p$ etex, z3);
label.lft(btex $p$ etex, z4);

label.llft(btex $q$       etex, 1/2[z1,z0] shifted 2 left);
label.ulft(btex $\bar{q}$ etex, 1/2[z2,z0] shifted 2 left);

label.bot(btex $W'^-/W'^+$ etex, 1/2[z0,z7]);
label.rt (btex $\ell^{-} / \ell^{+}$           etex, z8);
label.rt (btex $\bar{\nu}_{\ell} / \nu_{\ell}$ etex, z9);

endfig;
end.


The only problem is that it's not very well documented -- I rely on reading the source code in ../texmf-dist/metapost/feynmf.

There are many useful macros defined in feynmp, but I've used only three of them here:

• fermion takes a primary path argument, draws an arrow along it's mid-point and then returns the same path

• photon takes a primary path argument, and returns a wiggly version of it.

• make_blob(z,d) draws a blob (as shown) scaled to diameter d and shifted to point z.

The rest is plain Metapost.