{TikZ-Feynman} Feynman diagrams with TikZ. by Joshua Ellis

Similar documents
CS 106 Winter 2016 Craig S. Kaplan. Module 01 Processing Recap. Topics

Preamble. Singly linked lists. Collaboration policy and academic integrity. Getting help

Figure 1: 2D arm. Figure 2: 2D arm with labelled angles

arxiv: v1 [cs.oh] 31 Jan 2018

Transient analysis of wave propagation in 3D soil by using the scaled boundary finite element method

Generalized Edge Coloring for Channel Assignment in Wireless Networks

State Indexed Policy Search by Dynamic Programming. Abstract. 1. Introduction. 2. System parameterization. Charles DuHadway

Coupling the User Interfaces of a Multiuser Program

Chapter 5 Proposed models for reconstituting/ adapting three stereoscopes

Bends, Jogs, And Wiggles for Railroad Tracks and Vehicle Guide Ways

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Generalized Edge Coloring for Channel Assignment in Wireless Networks

Classical Mechanics Examples (Lagrange Multipliers)

Module13:Interference-I Lecture 13: Interference-I

Lecture 1 September 4, 2013

Animated Surface Pasting

Shift-map Image Registration

Questions? Post on piazza, or Radhika (radhika at eecs.berkeley) or Sameer (sa at berkeley)!

CS269I: Incentives in Computer Science Lecture #8: Incentives in BGP Routing

Online Appendix to: Generalizing Database Forensics

Problem Paper Atoms Tree. atoms.pas. atoms.cpp. atoms.c. atoms.java. Time limit per test 1 second 1 second 2 seconds. Number of tests

Research Article Inviscid Uniform Shear Flow past a Smooth Concave Body

Politehnica University of Timisoara Mobile Computing, Sensors Network and Embedded Systems Laboratory. Testing Techniques

Lesson 11 Interference of Light

EFFICIENT STEREO MATCHING BASED ON A NEW CONFIDENCE METRIC. Won-Hee Lee, Yumi Kim, and Jong Beom Ra

Automation of Bird Front Half Deboning Procedure: Design and Analysis

Using Vector and Raster-Based Techniques in Categorical Map Generalization

Loop Scheduling and Partitions for Hiding Memory Latencies

SURVIVABLE IP OVER WDM: GUARANTEEEING MINIMUM NETWORK BANDWIDTH

Solutions to Tutorial 1 (Week 8)

Computer Organization

Comparison of Methods for Increasing the Performance of a DUA Computation

More Raster Line Issues. Bresenham Circles. Once More: 8-Pt Symmetry. Only 1 Octant Needed. Spring 2013 CS5600

Particle Swarm Optimization Based on Smoothing Approach for Solving a Class of Bi-Level Multiobjective Programming Problem

Lab work #8. Congestion control

Improving Spatial Reuse of IEEE Based Ad Hoc Networks

Computer Graphics Chapter 7 Three-Dimensional Viewing Viewing

Questions? Post on piazza, or Radhika (radhika at eecs.berkeley) or Sameer (sa at berkeley)!

PERFECT ONE-ERROR-CORRECTING CODES ON ITERATED COMPLETE GRAPHS: ENCODING AND DECODING FOR THE SF LABELING

Modifying ROC Curves to Incorporate Predicted Probabilities

Solution Representation for Job Shop Scheduling Problems in Ant Colony Optimisation

Classifying Facial Expression with Radial Basis Function Networks, using Gradient Descent and K-means

Intensive Hypercube Communication: Prearranged Communication in Link-Bound Machines 1 2

TEST-05(Solution) TOPIC: OPTICS COMPLETE

BIJECTIONS FOR PLANAR MAPS WITH BOUNDARIES

A Plane Tracker for AEC-automation Applications

Learning Subproblem Complexities in Distributed Branch and Bound

Cloud Search Service Product Introduction. Issue 01 Date HUAWEI TECHNOLOGIES CO., LTD.

Shift-map Image Registration

Variable Independence and Resolution Paths for Quantified Boolean Formulas

Digital fringe profilometry based on triangular fringe patterns and spatial shift estimation

Investigation into a new incremental forming process using an adjustable punch set for the manufacture of a doubly curved sheet metal

Kinematic Analysis of a Family of 3R Manipulators

1 Surprises in high dimensions

Offloading Cellular Traffic through Opportunistic Communications: Analysis and Optimization

1 Shortest Path Problems

WLAN Indoor Positioning Based on Euclidean Distances and Fuzzy Logic

CS350 - Exam 4 (100 Points)

Study of Network Optimization Method Based on ACL

arxiv: v1 [math.co] 15 Dec 2017

Welcome to Wayland. Martin Gra ßlin BlueSystems Akademy 2015

filtering LETTER An Improved Neighbor Selection Algorithm in Collaborative Taek-Hun KIM a), Student Member and Sung-Bong YANG b), Nonmember

Additional Divide and Conquer Algorithms. Skipping from chapter 4: Quicksort Binary Search Binary Tree Traversal Matrix Multiplication

A Versatile Model-Based Visibility Measure for Geometric Primitives

A multiple wavelength unwrapping algorithm for digital fringe profilometry based on spatial shift estimation

Architecture Design of Mobile Access Coordinated Wireless Sensor Networks

A Neural Network Model Based on Graph Matching and Annealing :Application to Hand-Written Digits Recognition

Non-homogeneous Generalization in Privacy Preserving Data Publishing

Design of Controller for Crawling to Sitting Behavior of Infants

Backpressure-based Packet-by-Packet Adaptive Routing in Communication Networks

Dual Arm Robot Research Report

Queueing Model and Optimization of Packet Dropping in Real-Time Wireless Sensor Networks

Fast Fractal Image Compression using PSO Based Optimization Techniques

CordEx. >> Operating instructions. English

An Algorithm for Building an Enterprise Network Topology Using Widespread Data Sources

Boxes, Inkwells, Speech and Formulas DRAFT

Learning convex bodies is hard

John Aycock. Department of Computer Science. 2 Model of a Compiler. the subject, such as [1] and [2].

A Convex Clustering-based Regularizer for Image Segmentation

Chalmers Publication Library

Coordinating Distributed Algorithms for Feature Extraction Offloading in Multi-Camera Visual Sensor Networks

Frequent Pattern Mining. Frequent Item Set Mining. Overview. Frequent Item Set Mining: Motivation. Frequent Pattern Mining comprises

Section 19. Thin Prisms

The Reconstruction of Graphs. Dhananjay P. Mehendale Sir Parashurambhau College, Tilak Road, Pune , India. Abstract

Section 20. Thin Prisms

Optimal Oblivious Path Selection on the Mesh

Skyline Community Search in Multi-valued Networks

Cluster Center Initialization Method for K-means Algorithm Over Data Sets with Two Clusters

Finite Automata Implementations Considering CPU Cache J. Holub

Recitation Caches and Blocking. 4 March 2019

Adjacency Matrix Based Full-Text Indexing Models

A shortest path algorithm in multimodal networks: a case study with time varying costs

Almost Disjunct Codes in Large Scale Multihop Wireless Network Media Access Control

A half-scan error reduction based algorithm for cone-beam CT

Verifying performance-based design objectives using assemblybased vulnerability

THE BAYESIAN RECEIVER OPERATING CHARACTERISTIC CURVE AN EFFECTIVE APPROACH TO EVALUATE THE IDS PERFORMANCE

Physics INTERFERENCE OF LIGHT

Handling missing values in kernel methods with application to microbiology data

Evolutionary Optimisation Methods for Template Based Image Registration

Enabling Rollback Support in IT Change Management Systems

Transcription:

{TikZ-Feynman} Feynman iagrams with TikZ Version 1.0.0 19th January 2016 by Joshua Ellis ARC Centre of Excellence for Particle Physics at the Terascale School of Physics, The University of Melbourne vic 3010, Australia k p 1 p 2 \feynmaniagram [large, vertical=e to f] { a -- [fermion] b -- [photon, momentum=\(k\)] c -- [fermion], b -- [fermion, momentum'=\(p_{1}\)] e -- [fermion, momentum'=\(p_{2}\)] c, e -- [gluon] f, h -- [fermion] f -- [fermion] i; Contents 1 Introuction 1 2 Tutorial 3 2.1 Loaing the Package.......... 3 2.2 A First Diagram............ 3 2.3 Aing Styles............. 4 2.4 When the Algorithm Isn t Enough.. 5 3 Documentation 8 3.1 Commans & Environments..... 8 3.2 Keys & Styles............. 9 4 Examples 22 Inex 28 i

Abstract TikZ-Feynman is a L A TEX package allowing Feynman iagrams to be easily generate within L A TEX with minimal user instructions an without the nee of external programs. It buils upon the TikZ package an leverages the graph placement algorithms from TikZ in orer to automate the placement of many vertices. TikZ-Feynman still allows fine-tune placement of vertices so that even complex iagrams can still be generate with ease. 1 Introuction TikZ-Feynman provies a new way to raw Feynman iagrams in L A TEX that oes not rely on external programs an uses a clear extensible syntax. Feynman iagrams provie a escription of interactions of subatomic particles in a form that is clearer an more succinct than the corresponing mathematical escription. They were introuce by Feynman an first appear in his paper Space-Time Approach to Quantum Electroynamics [1]. Since then, L A TEX has become wiely use to type-set scientific papers an currently, two leaing methos of rawing Feynman iagrams in L A TEX are feynmf/feynmp [2] an AxoDraw [3], with the latter also featuring a gui front-en calle JaxoDraw [4, 5]. Both feynmf/feynmp an AxoDraw have quite complicate syntax. As an example, the coe to generate an ll ll scattering Feynman iagram in each package is: AxoDraw feynmf/feynmp TikZ-Feynman \begin{picture} \ArrowLine(190,270)(160,300) \ArrowLine(160,240)(190,270) \ArrowLine(270,300)(240,270) \ArrowLine(240,270)(270,240) \Photon(190,270)(240,270){4}{4.5} \Vertex(190,270){1.5} \Vertex(240,270){1.5} \en{picture} \begin{fmfchar*}(40,30) \fmfpen{thick} \fmfleft{i1,i2} \fmfright{o1,o2} \fmf{fermion}{i1,v1,o1} \fmf{fermion}{i2,v2,o2} \fmf{photon,label=$q$}{v1,v2} \fmfot{v1,v2} \en{fmfchar*} \feynmaniagram [horizontal=a to b] { i1 -- [fermion] a -- [fermion] i2, a -- [photon] b, f1 -- [fermion] b -- [fermion] f2, The learning curves for both AxoDraw an feynmf/feynmp are quite steep, an although this is partly resolve by using JaxoDraw, this requires an external program. In aition, the creation of Feynman iagrams in feynmf/feynmp requires further processing outsie of L A TEX. TikZ-Feynman on the other han uses a clear syntax an elegates the positioning of vertices to algorithms originally evelope by Hu [6], an Peter an Kozo [7], both of which were implemente into TikZ by Pohlmann [8]. Since TikZ-Feynman is built on TikZ, users can harness the power an extensibilty of TikZ [9] making it easy to exten to accommoate iniviual nees. In orer to prouce more complicate iagrams, relative or absolute positioning of vertices can also be use in TikZ-Feynman so that any iagram can be generate with relative ease. TikZ-Feynman is mae available through the Comprehensive TEX Archive Network (ctan) 1 an can also be ownloae from the project page 2. The project is open source an contributions are welcome. The management of bugs an feature requests is one at Github 3. TikZ-Feynman s versioning will approximately follow semantic versioning. This means that changes in the thir number (1.0.0 to 1.0.1) will consist of bug fixes an very minor changes but they shoul not change the output otherwise 4. Changes in the secon number (1.0.0 to 1.1.0) will consist of new features but everything shoul 1 https://ctan.org/pkg/tikz-feynman 2 http://www.jpellis.me/projects/tikz-feynman 3 https://github.com/jp-ellis/tikz-feynman 4 That is, with the exception of the bug that they are fixing. 1

be backwars compatible. Finally, changes in the first number (1.0.0 to 2.0.0) inicates a major change in the package an coe written for 1.0.0 is not guarantee to work on 2.0.0. The intene version of this package to use shoul be inicate in the preamble with \tikzfeynmanset{compat=x.y.z} so the user may be informe of any iscrepancy. If neee, earlier versions may be ownloae from the project page 1. Licence This ocumentation may be reistribute an/or moifie uner the terms of the gnu General Public License as publishe by the Free Software Founation, either version 3 of the License, or (at your option) any later version. The coe of this package may be istribute an/or moifie uner the conitions of the L A TEX Project Public License, either version 1.3 of this license or (at your option) any later version. This work has the LPPL maintenance status maintaine. The Current Maintainer of this work is Joshua Ellis. This package is istribute in the hope that it will be useful, but without any warranty; without even the implie warranty of merchantability or fitness for a particular purpose. 1 http://www.jpellis.me/projects/tikz-feynman 2

2 Tutorial 2.1 Loaing the Package After installing the package, the TikZ-Feynman package can be loae with \usepackage{tikz-feynman} in the preamble. It is recommen that you also place \tikzfeynmanset{compat=1.0.0} in the preamble to ensure that a new versions of TikZ-Feynman o not prouce any unesirable changes without warning. 2.2 A First Diagram Feynman iagrams can be eclare with the \feynmaniagram comman. It is analogous to the \tikz comman from TikZ an requires a final semi-colon (;) to finish the environment. For example, a simple s-channel iagram is: \feynmaniagram [horizontal=a to b] { i1 -- [fermion] a -- [fermion] i2, a -- [photon] b, f1 -- [fermion] b -- [fermion] f2, Let s go through this example line by line: Line 1 \feynmaniagram introuces the Feynman iagram an allows for optional arguments to be given in the brackets [ options ]. In this instance, horizontal=a to b orients the algorithm outputs such that the line through vertices a an b is horizontal. Line 2 The left fermion line is rawn by eclaring three vertices (i1, a an i2) an connecting them with eges --. Just like the \feynmaniagram comman above, each ege also take optional arguments specifie in brackets [ options ]. In this instance, we want these eges to have arrows to inicate that they are fermion lines, so we a the fermion style to them. As you will see later on, optional arguments can also be given to the vertices in exactly the same way. Line 3 This ege connects vertices a an b with an ege style as a photon. Since there is alreay a vertex labelle a, the algorithm will connect it to a new vertex labele b. Line 4 This line is analogous to line 2 an introuces two new vertices, f1 an f2. It re-uses the previously labelle b vertex. Line 5 Finish the eclaration of the Feynman iagram. The final semi-colon (;) is important. The name given to each vertex in the graph oes not matter. So in this example, i1, i2 enote the initial particles; f1, f2 enotes the final particles; an a, b are the en points of the propagator. The only important aspect is that what we calle a in line 2 is also a in line 3 so that the unerlying algorithm treats them as the same vertex. The orer in which vertices are eclare oes not matter as the efault algorithm re-arranges everything 1. For example, one might prefer to raw the fermion lines all at once, as with the following example (note also that the way we name vertices is completely ifferent): 1 It is possible for the algorithm to get a litte confuse in some circumstances, but these cases shoul be rather rare. For some algorithms (such as the layere layout), the orer in which vertices are introuces oes matter. This is ocumente in section 3.2.2. 3

\feynmaniagram [horizontal=f2 to f3] { f1 -- [fermion] f2 -- [fermion] f3 -- [fermion] f4, f2 -- [photon] p1, f3 -- [photon] p2, 2.3 Aing Styles So far, the examples have only use the photon an fermion styles. The TikZ-Feynman package comes with quite a few extra styles for eges an vertices which are all ocumente over in section 3. As an example, it is possible to a momentum arrows with momentum= text, an in the case of en vertices, the particle can be labelle with particle= text. As an example, we take the generic s-channel iagram from section 2.2 an make it a e + e µ + µ iagram: e µ + γ k e + µ \feynmaniagram [horizontal=a to b] { i1 [particle=\(e^{-}\)] -- [fermion] a -- [fermion] i2 [particle=\(e^{+}\)], a -- [photon, ege label=\(\gamma\), momentum'=\(k\)] b, f1 [particle=\(\mu^{+}\)] -- [fermion] b -- [fermion] f2 [particle=\(\mu^{-}\)], In aition to the style keys ocumente below, style keys from TikZ can be use as well: e µ + γ k e + µ \feynmaniagram [horizontal=a to b] { i1 [particle=\(e^{-}\)] -- [fermion, very thick] a -- [fermion, opacity=0.2] i2 [particle=\(e^{+}\)], a -- [re, photon, ege label=\(\gamma\), momentum'={[arrow style=re]\(k\)}] b, f1 [particle=\(\mu^{+}\)] -- [fermion, opacity=0.2] b -- [fermion, very thick] f2 [particle=\(\mu^{-}\)], For a list of all the various styles that TikZ provies, have a look at the TikZ manual; it is extremely thorough an provies many usage examples. 4

2.4 When the Algorithm Isn t Enough By efault, the \feynmaniagram an \iagram commans use the spring layout algorithm to place all the eges 1. The spring layout algorithm attempts to sprea out the iagram as much as possible which for most simpler iagrams gives a satisfactory result; however in some cases, this oes not prouce the best iagram an this section will look at alternatives. There are three main alternatives: A invisible eges While still using the efault algorithm, it is possible to force certain vertices to be closer together by aing extra eges an making them invisible through raw=none. The algorithm will treat these extra eges in the same way, but they are simply not rawn at the en; Use a ifferent algorithm In some circumstances, other algorithms may be better suite. Some of the other graph layout algorithms are liste in section 3.2.2, an an exhaustive list of all algorithms an their parameters is given in the TikZ manual; Manual placement As a last resort, very complicate or unusual iagrams will require each vertex to be manually place. 2.4.1 Invisible Eges The unerlying algorithm treats all eges in exactly the same way when calculating where to place all the vertices, an the actual rawing of the iagram (after the placements have been calculate) is one separately. Consequently, it is possible to a eges to the algorithm, but prevent them from being rawn by aing raw=none to the ege style. This is particularly useful if you want to ensure that the initial or final states remain closer together than they woul have otherwise as illustrate in the following example (note that opacity=0.2 is use instea of raw=none to illustrate where exactly the ege is locate). π 0 γ % No invisible to keep the two photons together \feynmaniagram [small, horizontal=a to t1] { a [particle=\(\pi^{0}\)] -- [scalar] t1 -- t2 -- t3 -- t1, t2 -- [photon] p1 [particle=\(\gamma\)], t3 -- [photon] p2 [particle=\(\gamma\)], γ γ π 0 γ % Invisible ege ensures photons are parallel \feynmaniagram [small, horizontal=a to t1] { a [particle=\(\pi^{0}\)] -- [scalar] t1 -- t2 -- t3 -- t1, t2 -- [photon] p1 [particle=\(\gamma\)], t3 -- [photon] p2 [particle=\(\gamma\)], p1 -- [opacity=0.2] p2, 1 For more etails on this layout an any other graph layouts available, see section 3.2.2 5

2.4.2 Alternative Algorithms The graph rawing library from TikZ has several ifferent algorithms to position the vertices 1 By efault, \iagram an \feynmaniagram use the spring layout algorithm to place the vertices. The spring layout attempts to sprea everything out as much as possible which, in most cases, gives a nice iagram; however, there are certain cases where this oes not work. A goo example where the spring layout oesn t work are ecays where we have the ecaying particle on the left an all the aughter particles on the right. ν e W e µ ν µ % Using the efault spring layout \feynmaniagram [horizontal=a to b] { a [particle=\(\mu^{-}\)] -- [fermion] b -- [fermion] f1 [particle=\(\nu_{\mu}\)], b -- [boson, ege label=\(w^{-}\)] c, f2 [particle=\(\overline \nu_{e}\)] -- [fermion] c -- [fermion] f3 [particle=\(e^{-}\)], ν µ µ ν e W e % Using the layere layout \feynmaniagram [layere layout, horizontal=a to b] { a [particle=\(\mu^{-}\)] -- [fermion] b -- [fermion] f1 [particle=\(\nu_{\mu}\)], b -- [boson, ege label'=\(w^{-}\)] c, c -- [anti fermion] f2 [particle=\(\overline \nu_{e}\)], c -- [fermion] f3 [particle=\(e^{-}\)], You may notice that in aition to aing the layere layout style to \feynmaniagram, we also change the orer in which we specify the vertices. This is because the layere layout algorithm oes pay attention to the orer in which vertices are eclare (unlike the efault spring layout); as a result, c--f2, c--f3 has a ifferent meaning to f2--c--f3. In the former case, f2 an f3 are both on the layer below c as esire; whilst the latter case places f2 on the layer above c (that, the same layer as where the W originates). 1 See section 3.2.2 for some alternative algorithms. 6

2.4.3 Manual Placement In more complicate iagrams, it is quite likely that none of the algorithms work, no matter how many invisible eges are ae. In such cases, the vertices have to be place manually. TikZ-Feynman allows for vertices to be manually place by using the \vertex comman. The \vertex comman is available only within the feynman environment (which itself is only available insie a tikzpicture). The feynman environment loas all the relevant styles from TikZ-Feynman an eclares aitional TikZ-Feynman-specific commans such as \vertex an \iagram. This is inspire from PGFPlots an its use of the axis environment. The \vertex comman is very much analogous to the \noe comman from TikZ, with the notable exception that the vertex contents are optional; that is, you nee not have { text } at the en. In the case where {} is specifie, the vertex automatically is given the particle style, an otherwise it is a usual (zero-size) vertex. To specify where the vertices go, it is possible to give explicit coorinates though it is probably easiest to use the positioning library from TikZ which allows vertices to be place relative to existing vertices 1. By using relative placements, it is possible to easily tweak one part of the graph an everything will ajust accoringly the alternative being to manually ajust the coorinates of every affecte vertex. Finally, once all the vertices have been specifie, the \iagram* comman is use to specify all the eges. This works in much the same way as \iagram (an also \feynmaniagram), except that it uses an very basic algorithm to place new noes an allows existing (name) noes to be inclue. In orer to refer to an existing noe, the noe must be given in parentheses. This whole process of specifying the noes an then rawing the eges between them is shown below for the muon ecay: ν µ µ ν e W e \begin{tikzpicture} \begin{feynman} \vertex (a) {\(\mu^{-}\) \vertex [right=of a] (b); \vertex [above right=of b] (f1) {\(\nu_{\mu}\) \vertex [below right=of b] (c); \vertex [above right=of c] (f2) {\(\overline \nu_{e}\) \vertex [below right=of c] (f3) {\(e^{-}\) \iagram* { (a) -- [fermion] (b) -- [fermion] (f1), (b) -- [boson, ege label'=\(w^{-}\)] (c), (c) -- [anti fermion] (f2), (c) -- [fermion] (f3), \en{feynman} \en{tikzpicture} 1 The TikZ manual has some extensive ocumentation explaining how to use the positioning library. 7

3 Documentation 3.1 Commans & Environments \tikzfeynmanset{ options } This comman will process options using \pgfkeys with the efault path set to /tikzfeynman. Typically, options will be a comma-separate list of the form key = value, though the full power of the mechanism behin \pgfkeys can be use (see the TikZ manual for a complete escription). Typically, this is use in the preamble of the ocument to a or change certain keys for the whole ocument. \feynmaniagram[ TikZ options ][ iagram options ]{ iagram instructions } This commans creates a {tikzpicture} an {feynman} environment, an places a \iagram insie with the provie iagram instruction. Please refer to the ocumentation for \iagram for the iagram instruction syntax. The optional arguments specifie in tikz options are passe on to the {tikzpicture}, an the iagram options are passe on to \iagram. If only one optional argument is given, then the optional arguments are given to both. A single optional argument will usually suffice as most keys are recognize by both commans; however, in the event that a key is not recognize, both options are provie. \begin{feynman}[ options ] environment contents \en{feynman} The {feynman} environment is where all the rawing of Feynman iagrams takes place. It makes all the TikZ-Feynman styles available an efines commans such as \vertex an \iagram which are otherwise unavailable outsie of this environment. The {feynman} environment is only accessible within the {tikzpicture} environment. Options which are passe in options apply for the whole environment in the same way that the {scope} environment work in TikZ. \vertex[ options ] ( name ) at ( coorinate ) { contents Defines a new vertex with the provie name. If contents is not provie, the resulting vertex will have zero size. On the other han, if contents is provie, the particle= contents style is applie. Aitional styles can be applie to the vertex through options. The final semicolon (;) is vital for this comman since without it, the L A TEX engine will not know when the \vertex comman ens. Aitionally, this comman cannot be chaine like one can o with the inbuilt TikZ commans. This comman is only available with the {feynman} environment. \iagram[ options ]{ iagram instructions } Begins a new iagram using the spring layout. Keys passe through options can inclue general TikZ keys, graph-specific keys an any applicable TikZ-Feynman keys too. Other algorithms (such as tree layout) can be passe through options an that will overrie the spring layout. The syntax for the iagram instructions is thoroughly escribe in the TikZ manual, but in the context of this package, it will usually suffice to know the following: Vertices within the graph are specifie with no elimiters (i.e. no parenthesis, no brackets) an only require spaces aroun either sie. In orer to refer to a vertex efine outsie of the \iagram comman, its name must be given in parenthesis: ( name ). Note that in orer to refer to external 8

vertices, one must use \iagram* as most algorithms (incluing the efault spring layout) are incompatible with vertices efine outsie of the algorithm. When a vertex name is use multiple times, the unerlying algorithm will consier them to be the same vertex an introuces aitional eges. Options can be given to the vertex in brackets after the name: name [ options ]. For vertices efine outsie of the \iagram comman, these options shoul be specifie when the vertex is first eclare. The eges between each pair of vertices is specifie with --, an these can be chaine together: a -- b -- c. In orer to pass a style to the ege, it is specifie in brackets after the ashe: -- [ options ]. For example, to make on ege re, one woul use --[re]. A comma (,) or equivalently a semicolon (;) specifies the en of a sequence of eges an vertices an allows for another sequence to be starte. So a -- b, c -- will create two isconnecte eges. Subgroups (aking to scopes in TikZ) are specifie with braces: {[ options ] iagram instructions }. This can be quite useful when a lot of eges or noes share a common style. For example, one coul use {[eges={fermion}] a -- b -- c, x -- y -- z} an every ege will have the fermion style applie automatically. Another useful feature of subgroups is that an ege to a group will create an ege to each vertex in that subgroup as shown below. The example also shows how they can be neste which in some cases (such as with a layere layout) can be extremely useful. 1 b2 c2 a1 b3 b1 c1 \feynmaniagram [noes=circle, horizontal=a1 to b3] { a1 -- {b1, b2, b3 -- {c1, c2 -- 1}} \iagram*[ options ]{ iagram instructions } Same as \iagram, but instea of using the spring layout algorithm to place the vertices, this uses the most basic algorithm. This basic algorithm in most cases will not prouce a satisfactory iagram, but is intene to be use with vertices are eclare an positione outsie of the \iagram* comman. Essentially, \iagram* shoul be use only to connect existing vertices. 3.2 Keys & Styles The various styles an options that allow the Feynman iagrams to be customize are efine in what TikZ calls keys. The ocumentation inclues all keys which are efine within TikZ-Feynman which all begin with the prefix /tikzfeynman. In aition, a few of the keys from TikZ itself which are particularly useful to TikZ-Feynman are ocumente an these are prefixe with /tikz or /graph rawing. Please refer to the TikZ manual for a more in thorough ocumentation of the TikZ keys. 9

If you wish to moify the efault TikZ-Feynman styles, the best way to o this is to use key /.appen style={...}. For example, to make every iagram re except for small iagrams which remain black, one woul a to the preamble: \tikzfeynmanset{ every iagram/.appen style={re}, small/.appen style={black}, } If you are completely unhappy with a particular inbuilt style, you can efine your own style with with key /.style={...} as shown in the following example: \tikzfeynmanset{ myblob/.style={ shape=circle, raw=blue, fill=re} } All the every key keys ocumente here are initially empty, so it is up to you whether you use key /.appen style or key /.style. The preefine style keys (such as small, particle, fermion, etc.) shoul never by moifie with key /.style as that will overwrite the style entirely. Instea, moify the appropriate every key if available or use key /.appen style. All the keys efine here are mae available insie the {feynman} environment an insie \feynmaniagram; but if you wish to access them outsie of this (say, in a regular {tikzpicture} environment), you will nee to specify the full path with the leaing /tikzfeynman. 3.2.1 Feynman Keys /tikzfeynman/execute at begin feynman={ TEX coe } /tikzfeynman/execute at en feynman={ TEX coe } Allows for custom coe to be execute at the start or en of each {feynman} environment. /tikzfeynman/every feynman (style, no value) Set of styles which are applie to every {feynman} environments (an consequently, every apply insie all \feynmaniagram too). The style also applies to regular TikZ commans use insie the {feynman} environment. This is not re This is re \tikzfeynmanset{every feynman/.appen style={re}} \begin{tikzpicture} \noe at (0, 0.5) {This is not re \begin{feynman} \noe at (0, -0.5) {This is re \en{feynman} \en{tikzpicture} /tikzfeynman/inline= noe (style, no efault) A style use to isplay a Feynman iagram inline (typically in an equation), an aligning such that its vertical placement is at the noe specifie. The noe specification must enclose in parentheses. For noes which contain text (such as when the particle style is applie), it is possible to use the baseline of the text insie the 10

noe to line up with the baseline of the equation by using ( noe.base) as emonstrate in the following example. Note that this key applies aitional styles to make the iagram fit in an equation more nicely; if you o not wish to have these aitional styles, use the baseline key. γ = ig e γ µ \begin{equation} \feynmaniagram [inline=(.base), horizontal= to b] { a -- [fermion] b -- [fermion] c, b -- [boson] [particle=\(\gamma\)], = i g_{e} \gamma^{\mu} \en{equation} /tikz/baseline= noe Changes the vertical alignment of the Feynman iagram such that it iagram s baseline is at the noe specifie. This works in the same was as inline= noe, but it oes not apply any aitional styles (notice how the following example is larger than the one above). γ = ig e γ µ \begin{equation} \feynmaniagram [baseline=(.base), horizontal= to b] { a -- [fermion] b -- [fermion] c, b -- [boson] [particle=\(\gamma\)], = i g_{e} \gamma^{\mu} \en{equation} /graph rawing/horizontal= noe to noe /graph rawing/horizontal'= noe to noe /graph rawing/vertical= noe to noe /graph rawing/vertical'= noe to noe The unerlying algorithm will arrange all the noes relative to each other, but beyon that it has no iea how the overall graph shoul be oriente. By using one of the above keys, the final output of the algorithm is oriente an/or mirrore such that the two noes specifie are on the same horizontal (or vertical) line. The two noes nee not actually be connecte by an ege for this to work. The two noe specifications shoul not be enclose in parentheses, unlike the inline an baseline keys. The horizontal' an vertical' keys work in the same was as horizontal an vertical, but with a flip. 11

c c c c \feynmaniagram [inline=(b), horizontal=a to b, re] { a -- b -- {c [particle=\(c\)], [particle=\(\)]} \feynmaniagram [inline=(b), horizontal'=a to b, blue] { a -- b -- {c [particle=\(c\)], [particle=\(\)]} \feynmaniagram [inline=(b), vertical=a to b, green!40!black] { a -- b -- {c [particle=\(c\)], [particle=\(\)]} \feynmaniagram [inline=(b), vertical=b to a, black] { a -- b -- {c [particle=\(c\)], [particle=\(\)]} 3.2.2 Diagram Keys /tikzfeynman/every iagram (style, no value) Set of styles which are applie to every iagram; that is, to everything insie the \feynmaniagram, \iagram an \iagram* commans but not the general {feynman} environment (see section 3.2.1 for that). \tikzfeynmanset{every iagram/.appen style={re}} \feynmaniagram [small, horizontal= to b] { a -- [fermion] b -- [fermion] c, b -- [boson], /tikzfeynman/small /tikzfeynman/meium /tikzfeynman/large Changes the efault separation between the vertices an changes the size of arrows, blobs, an other shapes to fit ifferent context. The small size is best use with when the iagram is quite simple an oesn t have too many annotations (such as momentum arrows an particle labels). The meium size is the efault an is usually large enough that even iagrams with many labels an momentum arrows o not become too cluttere. Finally the large key is best for large illustrations as use on the title page of this ocument. 12

\feynmaniagram [baseline=(b), small, horizontal= to b, re] { a -- [fermion] b -- [fermion] c, b -- [boson], \feynmaniagram [baseline=(b), meium, horizontal= to b, green!40!black] { a -- [fermion] b -- [fermion] c, b -- [boson], \feynmaniagram [baseline=(b), large, horizontal= to b, blue] { a -- [fermion] b -- [fermion] c, b -- [boson], There are several algorithms which are available to place the vertices which are all provie within the graph rawing library from TikZ. Below are liste a few of these layouts which are more relevant for rawing Feynman iagrams. For a more complete escription of how these algorithm work, please refer to the TikZ manual. /graph rawing/spring layout= string Uses Hu s spring layout [6] as implemente by Pohlmann [8]. This moels each ege as springs an attempts to sprea everything out as much as possible. This is the efault layout. a c f \feynmaniagram [noes=circle, small, horizontal=c to ] { {a, b} -- c -- -- {e, f}, b e /graph rawing/spring electrical layout= string Uses Hu s spring electrical layout [6] as implemente by Pohlmann [8]. This moels each ege as springs an gives each vertex a charge. This algorithm allows for the charge of a particular vertex to be ajuste using the electric charge key (the efault is 1). a f c b e \feynmaniagram [noes=circle, small, horizontal=c to, spring electrical layout ] { {a, b [electric charge=2]} -- c -- -- {e, f [electric charge=0.1]}, /graph rawing/layere layout= string Uses the Sugiyama layout algorithm [7] as implemente by Pohlmann [8] in orer to place the noe. When an ege is specifie, the first vertex is always locate on the layer above the secon vertex. This creates a hierarchy of vertices which is particularly useful for ecays. Two vertices can be force to be on the same layer with the /graph rawing/same layer key. 13

a b c e \feynmaniagram [noes=circle, small, horizontal=a to b, layere layout] { a -- b -- {c, -- {e, f}}, f c1 c c2 1 a b 2 \feynmaniagram [noes=circle, small, horizontal=a to b, layere layout] { a -- b -- {c -- {c1, c2}, -- {1, 2}}, {[same layer] c1, }, /graph rawing/tree layout= string Uses the Reingol Tilform algorithm in orer to place the noe. This works in a similar way to the layere layout, but has quite a lot of aitional options to hanle missing chilren in the tree. Please refer to the TikZ manual for a thorough escription of these aitional features. When an ege is specifie, the first vertex is always locate on the layer above the secon vertex. This creates a hierarchy of vertices which is particularly useful for ecays. a b c e \feynmaniagram [noes=circle, small, horizontal=a to b, tree layout] { a -- b -- {c, -- {e, f}}, f 14

c c1 c2 \feynmaniagram [noes=circle, small, horizontal=a to b, tree layout] { a -- b -- {c -- {c1, c2}, -- {1, 2}}, a b 1 2 /tikz/graphs/eges= options /tikz/graphs/noes= options Just like it is possible to change the shape of every vertex or ege in the whole ocument, it is also possible to change the shape of every vertex or ege in a single iagram by moifying these keys an aing the esire styles. 3.2.3 Vertex Keys /tikzfeynman/vertex The efault, base style applie to every vertex initially. Other styles are subsequently ae. This sets the vertex shape to be a coorinate, that is, a null shape with no size or with. /tikzfeynman/every vertex shape (style, initially empty) The style of specific vertices can be moifie by changing the appropriate every vertex shape key. For example, in orer to change the style of every ot-style vertex, you can moify the every ot key, or to moify every vertex globally, the every vertex key can be moifie. γ, Z \tikzfeynmanset{ every vertex/.style={re, ot}, every particle/.style={blue}, every blob/.style={raw=green!40!black, pattern color=green!40!black}, } \feynmaniagram [horizontal=a to b] { a [particle={\(\gamma, Z\)}] -- [boson] b [blob], c -- [fermion] b -- [fermion], /tikzfeynman/ot Moifies the vertex so that it has a small fille circle. \feynmaniagram [small] { a -- b [ot] -- {c, } 15

/tikzfeynman/square ot Moifies the vertex so that it has a small fille square. \feynmaniagram [small] { a -- b [square ot] -- {c, } /tikzfeynman/empty ot Moifies the vertex so that it has a small empty circle. \feynmaniagram [small] { a -- b [empty ot] -- {c, } /tikzfeynman/crosse ot Moifies the vertex so that it has a small circle with a cross insie. \feynmaniagram [small] { a -- b [crosse ot] -- {c, } /tikzfeynman/blob Moifies the vertex so that it is a large blob, usually use to enote an effective operator. \feynmaniagram [small] { a -- b [blob] -- {c, } /tikzfeynman/particle= name Moifies the vertex so that it shows name. This is intene to label initial an final particles, but it shoul not be use on internal vertices as it will result in the lines at the vertex having a gap. For propagators (the ege label key is much more appropriate). Note that if name contains characters such as brackets ([]) or commas (,), the whole name has to be enclose in braces ({}); otherwise, the parser will interpret the comma as the en of the name an the start of the next key, or the closing bracket as the en of all optional arguments. 16

γ, Z \feynmaniagram [small, horizontal=a to b] { a [particle={\(\gamma, Z\)}] -- [boson] b -- {c, }, 3.2.4 Ege Keys Just like with the various vertex keys, each ege type has a corresponing every ege type ; however, ue to the existence of very similar keys such as scalar, charge scalar an anti charge scalar, more specific keys inherit styles from less specific ones. For example, styles in every charge scalar will apply to charge scalar an anti charge scalar but not scalar whilst styles in every scalar will apply to all three. /tikzfeynman/every ege A style to apply to every ege initially. (style, initially empty) /tikzfeynman/every ege style (style, initially empty) The style of specific eges can be moifie by changing the appropriate every ege style key. For example, in orer to make a global change to every boson, you can moify the every boson key. b a c \tikzfeynmanset{ every ege/.style={fermion}, every boson/.style={re}, every photon/.style={blue}, } \feynmaniagram [small] { a [particle=\(a\)] -- [boson] o -- [photon] b [particle=\(b\)], f1 [particle=\(c\)] -- o -- f2 [particle=\(\)], /tikzfeynman/boson Draws a sinusoial line to enote a boson. \feynmaniagram [horizontal=a to b] {a -- [boson] b /tikzfeynman/charge boson Draws a sinusoial line with an arrow to enote a charge boson. \feynmaniagram [horizontal=a to b] {a -- [charge boson] b /tikzfeynman/anti charge boson Draws a sinusoial line with an arrow pointing the other way to to enote a anti charge boson. \feynmaniagram [horizontal=a to b] {a -- [anti charge boson] b 17

/tikzfeynman/photon Draws a sinusoial line to enote a photon. \feynmaniagram [horizontal=a to b] {a -- [photon] b /tikzfeynman/scalar Draws a ashe line to enote a scalar. \feynmaniagram [horizontal=a to b] {a -- [scalar] b /tikzfeynman/charge scalar Draws a ashe line with an arrow to enote a charge scalar. \feynmaniagram [horizontal=a to b] {a -- [charge scalar] b /tikzfeynman/anti charge scalar Draws a ashe line with an arrow pointing the other way to enote a charge scalar antiparticle. \feynmaniagram [horizontal=a to b] {a -- [anti charge scalar] b /tikzfeynman/ghost Draws a otte line to enote a ghost. \feynmaniagram [horizontal=a to b] {a -- [ghost] b /tikzfeynman/fermion Draws a soli line with an arrow to enote a fermion. \feynmaniagram [horizontal=a to b] {a -- [fermion] b /tikzfeynman/anti fermion Draws a soli line with an arrow pointing the other way to enote an antifermion. \feynmaniagram [horizontal=a to b] {a -- [anti fermion] b /tikzfeynman/majorana Draws a soli line with two arrows pointing to the center to enote an Majorana particle. \feynmaniagram [horizontal=a to b] {a -- [majorana] b 18

/tikzfeynman/anti majorana Draws a soli line with two arrows pointing to the ens to enote a Majorana particle. \feynmaniagram [horizontal=a to b] {a -- [anti majorana] b /tikzfeynman/gluon Draws a coile line to enote a gluon. \feynmaniagram [horizontal=a to b] {a -- [gluon] b /tikz/ege label= text /tikz/ege label'= text Places a label halfway along the ege with the given text. The prime key switches which sie of the ege the label is place. /tikzfeynman/insertion=[ options ] istance Places an insertion (for mass or momentum insertion) along an ege. The istance specifies how far along the ege the insertion shoul be place such that 0 an 1 respectively correspon to the start an the en of the ege. Multiple insertions can be place along a single ege by repeating the style key. Through the options argument, the insertion size an style can be change. \feynmaniagram [horizontal=a to b] {a -- [insertion=0.33, insertion=0.67] b /tikzfeynman/insertion/size= istance (no efault, initially 3pt) Specifies how big the insertion shoul be. The length of each ege starting from the center will be 2 istance. \feynmaniagram [horizontal=a to b] {a -- [insertion={[size=10pt]0.4}] b /tikzfeynman/insertion/style= istance Specifies aitional styles to applying to the lines of the insertion. (no efault, initially empty) \feynmaniagram [horizontal=a to b] {a -- [insertion={[style=re]0.4}] b 3.2.5 Momentum Keys /tikzfeynman/momentum=[ options ] text /tikzfeynman/momentum'=[ options ] text /tikzfeynman/reverse momentum=[ options ] text /tikzfeynman/reverse momentum'=[ options ] text /tikzfeynman/rmomentum=[ options ] text 19

/tikzfeynman/rmomentum'=[ options ] text Places a momentum arrow on the specifie ege with label given by text. The prime (') version place the momentum arrow on the other sie of the ege; that is, if the momentum arrow was on the right, it will be place on the left of the ege. The reverse momentum an reverse momentum' keys are analogous to momentum an momentum' except that the momentum arrow points in the opposite irection. Finally, the rmomentum an rmomentum' are aliases of reverse momentum an reverse momentum'. Note that ue to the way the arrow is rawn, it oesn t inherit styles of the ege. As a result, they have to be re-specifie through options. p ab p c ab bc \feynmaniagram [layere layout, horizontal=a to b] { a -- [re, fermion, ege label'=\(ab\), momentum={[arrow style=re]\(p_{ab}\)}] b -- [blue, photon, ege label'=\(bc\)] c -- [green!40!black, scalar, momentum=\(p_{c}\)], p k p k p \feynmaniagram [layere layout, horizontal=b to c] { a -- [photon, momentum=\(p\)] b -- [fermion, half left, looseness=1.5, momentum=\(k\)] c -- [fermion, half left, looseness=1.5, momentum=\(k-p\)] b, c -- [photon, momentum=\(p\)], The options allows for the following options to customize the appearance of the momentum arrows. These can be either set globally with the usual \tikzfeynmanset, or can be set on a iniviual basis through the options argument of the momentum key. In the latter case, only the key in /tikzfeynman/momentum/ key is require. /tikzfeynman/momentum/label istance= istance (no efault, initially 0pt) Set the separation between the text an the arrow. Note that the text is still surroune by an inner sep=0.3333em by efault so the efault istance of 0pt will not result in the momentum label touching the arrow. /tikzfeynman/momentum/arrow istance= istance Set the separation between the ege an the arrow. (no efault, initially 3mm) /tikzfeynman/momentum/arrow shorten= istance (no efault, initially 0.15) Specify the fraction of the total ege length by which the momentum arrow is shortene at each en. /tikzfeynman/momentum/label style= style Define styles to apply to the momentum label noe. (no efault, initially empty) 20

/tikzfeynman/momentum/arrow style= style Define style to apply to the momentum arrow. (no efault, initially empty) 3.2.6 Moifier Keys Moifier keys serve only to slightly moify a small feature of the ege. /tikzfeynman/half left /tikzfeynman/half right /tikzfeynman/quarter left /tikzfeynman/quarter right Moifies the ege so that it bens left or right in such a way that it completes half a circle, or a quarter of a circle. \feynmaniagram [horizontal=a to b] { a -- [re, fermion, half left] b -- [blue, fermion, half left] a, \feynmaniagram [horizontal=a to c] { a -- [re!0!blue, fermion, quarter left] b -- [re!33!blue, fermion, quarter left] c -- [re!66!blue, fermion, quarter left] -- [re!100!blue, fermion, quarter left] a, /tikz/out= angle /tikz/in= angle Specifies the angle at which the ege leaves the first vertex in an ege an the angle at which it enters the secon vertex in an ege. /tikz/relative= true or false (efault true) If relative is set to false, the angle is relative to the paper whilst when relative is set to true, the angle is relative to the straight line joining the two vertices. /tikz/looseness= number (no efault, initially 1) As the name suggests, this specifies how loose or tight a curve is connecting two vertices. 21

4 Examples Below are a few iagrams which emonstrate how the package can be use in some more practical examples.. Vertex Rule Z p 1 p 3 f p 2 \feynmaniagram [horizontal=a to b] { a [particle=\(z\)] -- [photon, momentum=\(p_{1}\)] b, f1 [particle=\(\overline f\)] -- [fermion, rmomentum'=\(p_{3}\)] b -- [fermion, momentum=\(p_{2}\)] f2 [particle=\(f\)], f Tree Level Diagrams e µ γ e + µ + \feynmaniagram [horizontal=a to b] { i1 [particle=\(e^{-}\)] -- [fermion] a -- [fermion] i2 [particle=\(e^{+}\)], a -- [photon, ege label=\(\gamma\)] b, f1 [particle=\(\mu^{-}\)] -- [fermion] b -- [fermion] f2 [particle=\(\mu^{+}\)], e γ e \feynmaniagram [vertical'=a to b] { i1 [particle=\(e^{-}\)] -- [fermion] a -- [fermion] f1 [particle=\(e^{-}\)], a -- [photon, ege label=\(\gamma\)] b, i2 [particle=\(e^{+}\)] -- [anti fermion] b -- [anti fermion] f2 [particle=\(e^{+}\)], e + e + 22

e e + p e + e \begin{tikzpicture} \begin{feynman} \iagram [vertical'=a to b] { i1 [particle=\(e^{-}\)] -- [fermion] a -- [raw=none] f1 [particle=\(e^{+}\)], a -- [photon, ege label'=\(p\)] b, i2 [particle=\(e^{+}\)] -- [anti fermion] b -- [raw=none] f2 [particle=\(e^{-}\)], \iagram* { (a) -- [fermion] (f2), (b) -- [anti fermion] (f1), \en{feynman} \en{tikzpicture} Loops p k p k p \feynmaniagram [layere layout, horizontal=b to c] { a -- [photon, momentum=\(p\)] b -- [fermion, half left, momentum=\(k\)] c -- [fermion, half left, momentum=\(k-p\)] b, c -- [photon, momentum=\(p\)], \feynmaniagram [layere layout, horizontal=a to b] [eges=gluon] { {i1, i2} -- a -- [half left] b -- [half left] a, b -- {f1, f2}, 23

Box Diagrams W µ q ν µ s µ + W + \feynmaniagram [layere layout, horizontal=a to b] { % Draw the top an bottom lines i1 [particle=\(\)] -- [fermion] a -- [photon, ege label=\(w^{-}\)] b -- [fermion] f1 [particle=\(\mu^{-}\)], i2 [particle=\(\overline s\)] -- [anti fermion] c -- [photon, ege label'=\(w^{+}\)] -- [anti fermion] f2 [particle=\(\mu^{+}\)], % Draw the two internal fermion lines { [same layer] a -- [fermion, ege label'=\(q\)] c }, { [same layer] b -- [anti fermion, ege label=\(\nu_{\mu}\)] }, 24

Meson ecay an mixing W + u π + B 0 b u π \begin{tikzpicture} \begin{feynman} \vertex (a1) {\(\overline b\) \vertex[right=1.5cm of a1] (a2); \vertex[right=1cm of a2] (a3); \vertex[right=1.5cm of a3] (a4) {\(\overline u\) \vertex[below=2em of a1] (b1) {\(\) \vertex[below=2em of a4] (b2) {\(\) %% See section 13.5 of PGF/TikZ manual \vertex at ($(a2)!0.5!(a3)!0.5cm!90:(a3)$) (); %% Equivalent way to obtain (): % \vertex at ($(b2)!0.5!(b3) + (0, -0.5cm)$) (); \vertex[above=of a4] (c1) {\(u\) \vertex[above=2em of c1] (c3) {\(\overline \) \vertex at ($(c1)!0.5!(c3) - (1cm, 0)$) (c2); \iagram* { (a4) -- [fermion] (a3) -- [fermion] (a2) -- [fermion] (a1), (b1) -- [fermion] (b2), (c3) -- [fermion, out=180, in=45] (c2) -- [fermion, out=-45, in=180] (c1), (a2) -- [boson, quarter left] () -- [boson, quarter left] (a3), () -- [boson, ben left, ege label=\(w^{+}\)] (c2), \raw [ecoration={brace}, ecorate] (b1.south west) -- (a1.north west) noe [pos=0.5, left] {\(B^{0}\) \raw [ecoration={brace}, ecorate] (c3.north east) -- (c1.south east) noe [pos=0.5, right] {\(\pi^{+}\) \raw [ecoration={brace}, ecorate] (a4.north east) -- (b2.south east) noe [pos=0.5, right] {\(\pi^{-}\) \en{feynman} \en{tikzpicture} 25

W u π B 0 b W b u W π + \begin{tikzpicture} \begin{feynman} \vertex (a1) {\(\overline b\) \vertex[right=1cm of a1] (a2); \vertex[right=1cm of a2] (a3); \vertex[right=1cm of a3] (a4) {\(b\) \vertex[right=1cm of a4] (a5); \vertex[right=2cm of a5] (a6) {\(u\) \vertex[below=2em of a1] (b1) {\(\) \vertex[right=1cm of b1] (b2); \vertex[right=1cm of b2] (b3); \vertex[right=1cm of b3] (b4) {\(\overline \) \vertex[below=2em of a6] (b5) {\(\overline \) \vertex[above=of a6] (c1) {\(\overline u\) \vertex[above=2em of c1] (c3) {\(\) \vertex at ($(c1)!0.5!(c3) - (1cm, 0)$) (c2); \iagram* { {[eges=fermion] (b1) -- (b2) -- (a2) -- (a1), (b5) -- (b4) -- (b3) -- (a3) -- (a4) -- (a5) -- (a6), }, (a2) -- [boson, ege label=\(w\)] (a3), (b2) -- [boson, ege label'=\(w\)] (b3), (c1) -- [fermion, out=180, in=-45] (c2) -- [fermion, out=45, in=180] (c3), (a5) -- [boson, ben left, ege label=\(w^{-}\)] (c2), \raw [ecoration={brace}, ecorate] (b1.south west) -- (a1.north west) noe [pos=0.5, left] {\(B^{0}\) \raw [ecoration={brace}, ecorate] (c3.north east) -- (c1.south east) noe [pos=0.5, right] {\(\pi^{-}\) \raw [ecoration={brace}, ecorate] (a6.north east) -- (b5.south east) noe [pos=0.5, right] {\(\pi^{+}\) \en{feynman} \en{tikzpicture} 26

W + B 0 b s s s φ K 0 \begin{tikzpicture} \begin{feynman} \vertex (a1) {\(\overline b\) \vertex[right=2cm of a1] (a2); \vertex[right=0.5cm of a2] (a3); \vertex[right=0.5cm of a3] (a4); \vertex[right=2cm of a4] (a5) {\(\overline s\) \vertex[below=2cm of a1] (b1) {\(\) \vertex[below=2cm of a5] (b2) {\(\) \vertex[below=1.5em of a5] (c1) {\(s\) \vertex[above=1.5em of b2] (c3) {\(\overline s\) \vertex at ($(c1)!0.5!(c3) - (1cm, 0)$) (c2); \iagram* { {[eges=fermion] (a5) -- (a4) -- (a3) -- (a2) -- (a1), }, (b1) -- [fermion] (b2), (c3) -- [fermion, out=180, in=-60] (c2) -- [fermion, out=60, in=180] (c1), (a3) -- [gluon, ben right] (c2), (a4) -- [boson, out=90, in=90, looseness=2.0, ege label'=\(w^{+}\)] (a2) \raw [ecoration={brace}, ecorate] (b1.south west) -- (a1.north west) noe [pos=0.5, left] {\(B^{0}\) \raw [ecoration={brace}, ecorate] (a5.north east) -- (c1.south east) noe [pos=0.5, right] {\(\phi\) \raw [ecoration={brace}, ecorate] (c3.north east) -- (b2.south east) noe [pos=0.5, right] {\(K^{0}\) \en{feynman} \en{tikzpicture} 27

Inex This inex only contains automatically generate entries. A goo inex shoul also contain carefully selecte keywors. This inex is not a goo inex. anti charge boson key, 17 anti charge scalar key, 18 anti fermion key, 18 anti majorana key, 19 arrow istance key, 20 arrow shorten key, 20 arrow style key, 21 baseline key, 11 blob key, 16 boson key, 17 charge boson key, 17 charge scalar key, 18 crosse ot key, 16 \iagram, 8, 9 ot key, 15 ege label key, 19 ege label' key, 19 eges key, 15 empty ot key, 16 Environments feynman, 8 every ege style key, 17 every vertex shape key, 15 every iagram key, 12 every ege key, 17 every feynman key, 10 execute at begin feynman key, 10 execute at en feynman key, 10 fermion key, 18 feynman environment, 8 \feynmaniagram, 8 ghost key, 18 gluon key, 19 /graph rawing/ horizontal, 11 horizontal', 11 layere layout, 13 spring electrical layout, 13 spring layout, 13 tree layout, 14 vertical, 11 vertical', 11 half left key, 21 half right key, 21 horizontal key, 11 horizontal' key, 11 in key, 21 inline key, 10 insertion key, 19 label istance key, 20 label style key, 20 large key, 12 layere layout key, 13 looseness key, 21 majorana key, 18 meium key, 12 momentum key, 19 momentum' key, 19 noes key, 15 out key, 21 particle key, 16 photon key, 18 quarter left key, 21 quarter right key, 21 relative key, 21 reverse momentum key, 19 reverse momentum' key, 19 rmomentum key, 19 rmomentum' key, 20 scalar key, 18 size key, 19 small key, 12 spring electrical layout key, 13 spring layout key, 13 square ot key, 16 style key, 19 /tikz/ baseline, 11 ege label, 19 ege label', 19 graphs/ eges, 15 28

noes, 15 in, 21 looseness, 21 out, 21 relative, 21 /tikzfeynman/ anti charge boson, 17 anti charge scalar, 18 anti fermion, 18 anti majorana, 19 blob, 16 boson, 17 charge boson, 17 charge scalar, 18 crosse ot, 16 ot, 15 empty ot, 16 every ege style, 17 every vertex shape, 15 every iagram, 12 every ege, 17 every feynman, 10 execute at begin feynman, 10 execute at en feynman, 10 fermion, 18 ghost, 18 gluon, 19 half left, 21 half right, 21 inline, 10 insertion/ size, 19 style, 19 insertion, 19 large, 12 majorana, 18 meium, 12 momentum/ arrow istance, 20 arrow shorten, 20 arrow style, 21 label istance, 20 label style, 20 momentum, 19 momentum', 19 particle, 16 photon, 18 quarter left, 21 quarter right, 21 reverse momentum, 19 reverse momentum', 19 rmomentum, 19 rmomentum', 20 scalar, 18 small, 12 square ot, 16 vertex, 15 \tikzfeynmanset, 8 tree layout key, 14 \vertex, 8 vertex key, 15 vertical key, 11 vertical' key, 11 29

Acknowlegements The original proof-of-concept for using TikZ to raw Feynman iagrams was one by the user Jake on the TEX StackExchange. His original answer can be viewe at: http://tex.stackexchange.com/a/87395/26980. I must also thank all the people who have use the evelopment versions of TikZ-Feynman an offere suggestions to improve it an foun bugs for me to fix. References [1] R. P. Feynman, Space-time approach to quantum electroynamics, Phys. Rev. 76, 769 789 (1949). [2] T. Ohl, Drawing Feynman iagrams with LaTeX an Metafont, Computer Physics Communications 90, 340 354 (1995). [3] J. Vermaseren, Axoraw, Computer Physics Communications 83, 45 58 (1994). [4] D. Binosi an L. Theussl, JaxoDraw: A Graphical user interface for rawing Feynman iagrams, Computer Physics Communications 161, 76 86 (2004). [5] D. Binosi, J. Collins, C. Kaufhol an L. Theussl, JaxoDraw: A Graphical user interface for rawing Feynman iagrams. Version 2.0 release notes, Computer Physics Communications 180, 1709 1715 (2009). [6] Y. Hu, Efficient, high-quality force-irecte graph rawing, Mathematica Journal 10, 37 71 (2005). [7] E. Peter an S. Kozo, How to raw a irecte graph, Journal of Information Processing 13, 424 437 (1991). [8] J. Pohlmann, Configurable graph rawing algorithms for the TikZ graphics escription language, PhD thesis (Institute of Theoretical Computer Science, Universität zu Lübeck, Lübeck, Germany, 2011). [9] T. Tantau, The TikZ an PGF packages, 2015. 30