Debian Codegraph @

texmf-dist/doc/generic/pst-feyn/pst-feyn-doc.tex

raw
1 %% $Id: pst-feyn-doc.tex 826 2018-09-27 09:21:43Z herbert $
2 \PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
3 \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings,
4 headexclude,footexclude,oneside,dvipsnames,svgnames]{pst-doc}
5 \listfiles
6
7 \usepackage[utf8]{inputenc}
8 \usepackage{pst-feyn}
9 \let\pstFV\fileversion
10 \let\pstFD\filedate
11 \let\belowcaptionskip\abovecaptionskip
12 \usepackage{pst-plot}
13
14
15 %\usepackage[dvipsnames,svgnames,x11names]{xcolor}
16
17 \def\textRed#1{\textcolor{red}{#1}}
18 \def\textBlack#1{\textcolor{black}{#1}}
19 \def\textOliveGreen#1{\textcolor{OliveGreen}{#1}}
20
21 \makeatletter
22 \renewcommand*\l@subsection{\bprot@dottedtocline{2}{1.5em}{3.6em}}
23 \renewcommand*\l@subsubsection{\bprot@dottedtocline{3}{3.8em}{4.5em}}
24 \makeatother
25 \def\bgImage{\begin{pspicture}(0,-1)(4.4,2)
26 \psArrowLine(0,0)(1,1) \psArrowLine(1,1)(0,2)
27 \psArrowLine(3,1)(4,0) \psArrowLine(4,2)(3,1)
28 \psPhoton[windings=4.5,amplitude=4pt,linecolor=blue](1,1)(3,1)
29 \psGluon[windings=4,amplitude=3pt,linecolor=Green](3.5,1.5)(4.2,0.9)
30 \rput(0.5,1.9){$\mathrm{e}^-$} \rput(3.5,1.9){$\bar{\mathrm{q}}$}
31 \rput(0.5,0.2){$\mathrm{e}^+$} \rput(3.5,0.2){q}
32 \rput(2,1.5){$\gamma$}\rput[r](4.2,1.3){$\mathrm{g}$}
33 \psline{->}(0,-0.2)(4,-0.2)\uput[0](4,-0.2){$t$}
34 \end{pspicture}
35 }
36 \lstset{explpreset={pos=l,width=-99pt,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}},
37 escapechar=?}
38 \def\textat{\char064}%
39
40 \let\KeyWord\Lkeyword
41 %#1{$\backslash\!\!\textRed{#1}\textBlack\!\!$}
42
43 \addbibresource{\jobname.bib}
44
45
46 \begin{document}
47 \author{Herbert Voß}
48 \date{\today}
49 \title{pst-feyn}
50 \subtitle{A PSTricks package for drawing Feynman diagrams\newline v\pstFV~--~\pstFD}
51 \maketitle
52
53 \tableofcontents
54
55 \begin{abstract}
56 \LPack{pst-feyn} is a set of drawing graphical elements which are used for Feynman diagrams.
57 Simple flow charts and other graphics are possible, too. The package is based on the
58 macros of the old package \LPack{axodraw} from John Collins and Jos Vermaseren (\cite{axodraw2}), but uses the
59 capabilities of PSTricks (\cite{PSTricks2,PSTricksE}).
60
61
62 \vfill\noindent
63 Thanks for feedback and contributions to:\\
64
65 \end{abstract}
66 \clearpage
67
68 \section{Using pst-feyn}
69
70 The commands of \LPack{pst-feyn} should be executed inside either the \Lenv{pspicture}
71 environment. Inside this environment it is possible to place objects
72 at arbitrary positions and put text between them. An example would be
73
74
75 \begin{LTXexample}[width=5cm]
76 \begin{pspicture}[showgrid](-1,-3.3)(4,3)
77 \psGluonArc[linecolor=red,windings=8,radius=2cm](1.5,0)(0,180)
78 \psGluonArc[linecolor=green,windings=8,radius=2cm](1.5,0)(180,360)
79 \psGluon[linecolor=blue,windings=4](-0.5,0)(1,0)\psdot(-0.5,0)
80 \psGluon[linecolor=blue,windings=4](2,0)(3.5,0)\psdot(3.5,0)
81 \end{pspicture}
82 \end{LTXexample}
83
84 The syntax and the meaning of these command are explained in the next
85 section. One should note that all coordinates are presented in the current
86 user units, which is by default 1cm.
87 It is possible to use scale
88 transformations if these units are not convenient.
89
90
91
92 \section{The commands}
93
94 The commands that are currently available in \LPack{pst-feyn} are (in alphabetic
95 order):
96
97 \subsection*{\Lcs{psArrowArc}\OptArgs\Largr{$x,y$}\Largr{$\phi_1,\phi_2$}}
98
99 Draws an arc segment centered around $(x,y)$. The radius can be set by the optional argument \Lkeyword{radius}
100 The arc-segment runs counterclockwise from $\phi_1$ to $\phi_2$. All
101 angles are given in degrees. In the middle of the segment there will
102 be an arrow.
103
104 \begin{LTXexample}[width=5cm]
105 \begin{pspicture}[showgrid](-0.4,-0.4)(4,2.4)
106 \psArrowArc[linecolor=blue,
107 linewidth=1.5pt,radius=1.75](2,0)(0,180)
108 \end{pspicture}
109 \end{LTXexample}
110
111 \subsection*{\Lcs{psArrowArcn}\OptArgs\Largr{$x,y$}\Largr{$\phi_1,\phi_2$}}
112
113 The same, but clockwise.
114
115 \subsection*{\Lcs{psArrowLine}\OptArgs\Largr{$x_1,y_1$}\Largr{$x_2,y_2$}}
116
117 Draws a line from ($x_1$,$y_1$) to ($x_2$,$y_2$). There will be an
118 arrow in the middle of the line.
119
120 \begin{LTXexample}[width=5cm]
121 \begin{pspicture}[showgrid](-0.4,-0.4)(4,2.4)
122 \psArrowLine[linecolor=blue,
123 linewidth=1.5pt](0,0)(4,2)
124 \end{pspicture}
125 \end{LTXexample}
126
127
128 \subsection*{\Lcs{psBCirc}\OptArgs\Largr{x,y}\Largb{radius}}
129
130 Draws a circle of which the contents are blanked out. This means that
131 anything that was present at the position of the circle will be
132 overwritten. The center of the circle is at $(x,y)$.
133
134 \begin{LTXexample}[width=5cm]
135 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4.2)
136 \psBCirc[linecolor=blue,
137 linewidth=1.5pt](2,2){2}
138 \end{pspicture}
139 \end{LTXexample}
140
141
142 \subsection*{\Lcs{psBText}\OptArgs\Largr{$x,y$}\Largb{text}}
143 Draws a box with one line of text in it. The coordinates refer to the
144 center of the box. The box is like a BBox in that it blanks out
145 whatever was at the position of the box.
146
147 \begin{LTXexample}[width=5cm]
148 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4.2)
149 \psBText[linecolor=blue](2,3.5){A short line}
150 \psBText[linecolor=red](2,1.5){%
151 A short line\\ and another one \\a.s.o.}
152 \end{pspicture}
153 \end{LTXexample}
154
155
156 \subsection*{\Lcs{psCArc}\OptArgs\Largr{$x,y$}\Largr{$\phi_1,\phi_2$}}
157
158 Draws an arc segment centered around $(x,y)$. The radius is set by the optional argument \Lkeyword{radius}. The
159 arc-segment runs counterclockwise from $\phi_1$ to $\phi_2$. The star version (\Lcs{psCArc*}) creates a filled arc.
160
161 \begin{LTXexample}[width=5cm]
162 \begin{pspicture}[showgrid](-0.4,-0.4)(4,2.2)
163 \psCArc[linecolor=blue,radius=2,
164 linewidth=1.5pt](2,0)(80,180)
165 \psCArc[linecolor=red,linestyle=dashed,radius=2,
166 linewidth=1.5pt](2,0)(0,80)
167 \end{pspicture}
168 \end{LTXexample}
169
170
171 \subsection*{\Lcs{psCCirc}\Largr{$x,y$}\Largb{radius}\Largb{color1}\Largb{color2}}
172 Draws a circle around $(x,y)$. The contents of
173 the circle are lost. The color of the box will be color1 and the color
174 of the background inside the box will be color2. It is the same as\\
175 \verb|\pscircle[linecolor=color1,fillstyle=solid,fillcolor=color2](x,y){radius}|
176
177 \begin{LTXexample}[width=5cm]
178 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4)
179 \psCCirc[linewidth=1.5pt](1.5,2){1.5}{blue}{red}
180 \psCCirc[linewidth=2.5pt](3,1){1}{green}{cyan}
181 \end{pspicture}
182 \end{LTXexample}
183
184
185 \subsection*{\Lcs{psCText}\OptArgs\Largr{$x,y$}\Largb{col1}\Largb{col2}\Largb{text}}
186 Draws a box with test in it. The
187 box is just big enough to fit around the text. The box is like a CBox in that it blanks out
188 whatever was at the position of the box. The color of the box and the
189 text inside is color1 and the background inside has the color color2.
190
191 \begin{LTXexample}[width=5cm]
192 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4.2)
193 \psCText(2,3.5){red}{cyan}{A short line}
194 \psCText(2,1.5){green}{yellow}{%
195 A short line\\ and another one \\a.s.o.}
196 \end{pspicture}
197 \end{LTXexample}
198
199
200 \subsection*{\Lcs{psGluonArc}\Largr{$x,y$}\Largr{$\phi_1,\phi_2$}}
201
202 Draws a gluon on an arc-segment. The center of the arc is (x,y) and r
203 is its radius. The arc segment runs counterclockwise from $\phi_1$
204 to $\phi_2$. The width of the gluon is twice `amplitude'. Note that whether
205 the curls are inside or outside can be influenced with the sign of
206 the amplitude. When it is positive the curls are on the inside.
207
208 \begin{LTXexample}[width=5cm]
209 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4.2)
210 \psGluonArc(0,2)(-90,90)% shows the default setting
211 \psGluonArc[windings=8,amplitude=5mm,radius=2cm,
212 linecolor=red](4,2)(90,270)
213 \psGluonArc[windings=8,amplitude=-3mm,radius=2cm,
214 linecolor=blue](4,2)(90,270)
215 \end{pspicture}
216 \end{LTXexample}
217
218 \subsection*{\Lcs{psGluon}\Largr{$x_1,y_1$}\Largr{$x_2,y_2$}}
219 Draws a gluon from ($x_1$,$y_1$) to ($x_2$,$y_2$). The width of the
220 gluon will be twice the value of `amplitude'. If the number of windings is not an integer
221 it will be rounded. The side at which the
222 windings lie is determined by the order of the two coordinates. Also
223 a negative amplitude can change this side.
224
225 \begin{LTXexample}[width=5cm]
226 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4.2)
227 \psGluon(0,3)(4,3)% shows the default setting
228 \psGluon[windings=5,amplitude=5mm,linecolor=red](0,2)(4,2)
229 \psGluon[windings=6,amplitude=-3mm,linecolor=blue](0,1)(4,1)
230 \end{pspicture}
231 \end{LTXexample}
232
233 \subsection*{\Lcs{psPhoton}\Largr{$x_1,y_1$}\Largr{$x_2,y_2$}}
234 Draws a photon from $(x_1,y_1)$ to $(x_2,y_2)$. The width of the
235 photon will be twice the value of `amplitude'. The number of wiggles
236 is given by the last parameter. If twice this parameter is not an integer
237 it will be rounded to an integer value. Whether the first wiggle
238 starts up or down can be influenced with the sign of the amplitude.
239
240 \begin{LTXexample}[width=5cm]
241 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4.2)
242 \psPhoton(0,3)(4,3)% shows the default setting
243 \psPhoton[windings=5,amplitude=5mm,linecolor=red](0,2)(4,2)
244 \psPhoton[windings=6,amplitude=-2mm,linecolor=blue](0,1)(4,1)
245 \end{pspicture}
246 \end{LTXexample}
247
248
249
250 \subsection*{\Lcs{psPhotonArc}\Largr{$x,y$}\Largr{$\phi_1,\phi_2$}}
251 Draws a photon on an arc-segment. The center of the arc is $(x,y)$. The arc segment runs counterclockwise from $\phi_1$
252 to $\phi_2$. The width of the photon is twice `amplitude', and the
253 number of wiggles is given by the last parameter. Note that
254 the sign of the amplitude influences whether the photon starts going
255 outside (positive) or starts going inside (negative). If one likes
256 the photon to reach both endpoints from the outside the number of
257 wiggles should be an integer plus 0.5.
258
259 \begin{LTXexample}[width=5cm]
260 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4.2)
261 \psPhotonArc(0,2)(-90,90)% shows the default setting
262 \psPhotonArc[windings=8,amplitude=5mm,radius=2cm,
263 linecolor=red](4,2)(90,270)
264 \psPhotonArc[windings=8,amplitude=-3mm,radius=2cm,
265 linecolor=blue](4,2)(90,270)
266 \end{pspicture}
267 \end{LTXexample}
268
269
270 \subsection*{\Lcs{psPText}\OptArg{mode}\Largr{$x,y$}\Largr{$\phi$}\Largb{text}}
271 The focal point of the text box is $(x,y)$. The mode parameter tells how the text should be
272 positioned with respect to the focal point. If this parameter is
273 omitted the center of the text will correspond to the focal point.
274 Other options are: l for having the left side correspond to the
275 focal point, r for having the right side correspond to it, t for
276 having the top at the focal point and b for the bottom. One may
277 combine two letters as in [bl], as long as it makes sense. The
278 parameter $\phi$ is a rotation angle. The command is the same as\\
279 \verb|\rput[mode]{phi}(x,y){\shortstack{#4}}|
280
281
282 \begin{LTXexample}[width=5cm]
283 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4.2)
284 \psPText(2,3.5)(0){A short line}
285 \psPText[lb](3,0)(90){%
286 A short line\\ and another one \\a.s.o.}
287 \end{pspicture}
288 \end{LTXexample}
289
290
291
292 \subsection*{\Lcs{psText}\OptArg{mode}\Largr{$x,y$}\Largb{text}}
293 Same as \Lcs{rput}.
294
295
296
297 \subsection*{\Lcs{psZigZag}\Largr{$x_1,y_1$}\Largr{$x_2,y_2$}}
298 Draws a zigzag line from ($x_1$,$y_1$) to ($x_2$,$y_2$). The width of the
299 zigzagging will be twice the value of `amplitude'. The number of zigzags
300 is given by the last parameter. If twice this parameter is not an integer
301 it will be rounded to an integer value. Whether the first zigzag
302 starts up or down can be influenced with the sign of the amplitude.
303
304 \begin{LTXexample}[width=5cm]
305 \begin{pspicture}[showgrid](-0.4,-0.4)(4,4.2)
306 \psZigZag(0,3)(4,3)% shows the default setting
307 \psZigZag[windings=5,amplitude=5mm,linecolor=red](0,2)(4,2)
308 \psZigZag[windings=6,amplitude=-2mm,linecolor=blue](0,1)(4,1)
309 \end{pspicture}
310 \end{LTXexample}
311
312
313
314 \iffalse
315 \begin{itemize}
316 \item \Lcs{psLinAxis}($x_1$,$y_1$)($x_2$,$y_2$)($N_D$,$d$,hashsize
317 ,offset,width) \hfill \\
318 This draws a line to be used as an axis in a graph. Along the axis
319 are hash marks. Going from the first coordinate to the second, the
320 hash marks are on the left side if `hashsize', which is the size of the
321 hash marks, is positive and on the right side if it is negative.
322 $N_D$ is the number of `decades', indicated by fat hash marks, and
323 $d$ is the number of subdivisions inside each decade. The offset
324 parameter tells to which subdivision the first coordinate
325 corresponds. When it is zero, this coordinate corresponds to a fat
326 mark of a decade. Because axes have their own width, this is
327 indicated with the last parameter.
328 \item \Lcs{psLogAxis}($x_1$,$y_1$)($x_2$,$y_2$)($N_L$,hashsize
329 ,offset,width) \hfill \\
330 This draws a line to be used as an axis in a graph. Along the axis
331 are hash marks. Going from the first coordinate to the second, the
332 hash marks are on the left side if `hashsize', which is the size of the
333 hash marks, is positive and on the right side if it is negative.
334 $N_L$ is the number of orders of magnitude, indicated by fat
335 hash marks. The offset parameter tells to which integer subdivision
336 the first coordinate corresponds. When it is zero, this coordinate
337 corresponds to a fat mark, which is identical to when the value
338 would have been 1. Because axes have their own width, this is
339 indicated with the last parameter.
340 \end{itemize}
341 \fi
342
343 A note about color. The names of the colors can be found in the documentation
344 of package \LPack{xcolor}.
345 This package gives also the commands that allow the user to change the color of the text.
346 It is loaded by default with PSTricks.
347
348 \section{Examples}
349
350 \subsection{Text modes}
351 The meaning of the mode characters in the text commands can best be
352 demonstrated. The statements
353 produce 9 texts and for each the focal point is indicated by a little
354 circle. It looks like
355
356
357 \begin{LTXexample}[width=7cm]
358 \begin{pspicture}[showgrid](7,2)
359 \psset{linecolor=BrickRed,radius=2pt}\footnotesize
360 \psCArc*(0,2)(0,360)\psText[lt](0,2){left-top}
361 \psCArc(0,1)(0,360) \psText[l] (0,1){left-center}
362 \psCArc*(0,0)(0,360)\psText[lb](0,0){left-bottom}
363 \psCArc*(3,2)(0,360)\psText[t] (3,2){center-top}
364 \psCArc(3,1)(0,360) \psText (3,1){center-center}
365 \psCArc*(3,0)(0,360)\psText[b] (3,0){center-bottom}
366 \psCArc*(7,2)(0,360)\psText[rt](7,2){right-top}
367 \psCArc(7,1)(0,360) \psText[r](7,1){right-center}
368 \psCArc*(7,0)(0,360)\psText[rb](7,0){right-bottom}
369 \end{pspicture}
370 \end{LTXexample}
371
372 This illustrates exactly all the combinations of the mode characters and
373 what their effects are. The text is
374 insensitive to the scaling commands, and the color of the text should be
375 set with the regular color commands. In the case of \LaTeX{} text
376 it can of course contain different fonts,
377 math mode and all those little things.
378
379
380
381 \subsection{The windings of a gluon}
382
383 Gluons are traditionally represented by a two dimensional projection of
384 a helix. Actually close inspection of some pretty gluons reveals that
385 it is usually not quite a helix. Hence the gluons in pst-feyn are also
386 not quite helices. In addition one may notice that the begin and end
387 points deviate slightly from the regular windings. This makes it more in
388 agreement with hand drawn gluons. When a gluon is drawn, one needs not
389 only its begin and end points but there is an amplitude connected to
390 this almost helix, and in addition there are windings. The number of
391 windings is the number of curls that the gluon will have. Different
392 people may prefer different densities of curls. This can effect the
393 appearance considerably:
394
395 \begin{LTXexample}[pos=t]
396 \begin{pspicture}[showgrid](0,-0.4)(10,4)
397 \psset{linecolor=Red}\footnotesize
398 \psGluon[windings=4](1,0.5)(1,4)\psText(1,0.25){4 windings}
399 \psGluon[windings=5](3,0.5)(3,4)\psText(3,0.25){5 windings}
400 \psGluon[windings=6](5,0.5)(5,4)\psText(5,0.25){6 windings}
401 \psGluon[windings=7](7,0.5)(7,4)\psText(7,0.25){7 windings}
402 \psGluon[windings=8](9,0.5)(9,4)\psText(9,0.25){8 windings}
403 \end{pspicture}
404 \end{LTXexample}
405
406 The influence of the amplitude is also rather great. The user should
407 experiment with it. There is however an aspect to the amplitude that
408 should be discussed. For a straight gluon the amplitude can determine on
409 which side the curls are. So does the direction of the gluon:
410
411
412 \begin{LTXexample}[pos=t]
413 \begin{pspicture}[showgrid](0,-0.4)(10,4)
414 \psset{linecolor=Red,windings=10}\footnotesize
415 \psGluon[amplitude=0.2](2,0.5)(2,4) \psText(2,0.2){amp $> 0$}\psText(1.5,2){$\uparrow$}
416 \psGluon[amplitude=0.2](4,4)(4,0.5) \psText(4,0.2){amp $> 0$}\psText(3.5,2){$\downarrow$}
417 \psGluon[amplitude=-0.2](6,0.5)(6,4)\psText(6,0.2){amp $< 0$}\psText(5.5,2){$\uparrow$}
418 \psGluon[amplitude=-0.2](8,4)(8,0.5)\psText(8,0.2){amp $< 0$}\psText(7.5,2){$\downarrow$}
419 \end{pspicture}
420 \end{LTXexample}
421
422 For straight gluons one does not need the option of the negative
423 amplitude. It is however necessary for gluons on an arc segment. In that
424 case the arc is always drawn in an anticlockwise direction. Hence the
425 direction is fixed and only the amplitude is left as a tool for
426 determining the side with the curls.
427
428 \subsection{Scaling}
429
430 Sometimes it is much easier to design a figure on a larger scale than it
431 is needed in the eventual printing. In that case one can use a scale
432 factor, either during the design or in the final result. We use the
433 figure in the first section as an example:
434
435 \begin{LTXexample}[pos=t]
436 \psset{unit=0.3,amplitude=0.2}
437 \begin{pspicture}[shift=*](0,-0.4)(10,3.5)
438 \psGluonArc[linecolor=Red,radius=2,windings=8](5,2)(0,180)
439 \psGluonArc[linecolor=Green,radius=2,windings=8](5,2)(180,360)
440 \psGluon[windings=6,linecolor=Blue](0,2)(3,2)\psdot(3,2)
441 \psGluon[windings=6,linecolor=Blue](7,2)(10,2)\psdot(7,2)
442 \end{pspicture}
443 $+ \textrm{ others} = C_A(\frac{5}{3}+\frac{31}{9}\epsilon)
444 + n_F(-\frac{2}{3}-\frac{10}{9}\epsilon)$
445 \end{LTXexample}
446
447 This way it is rather straightforward to make whole pictorial equations.
448 Of course some things are not scale invariant. The appreciation of a
449 figure may be somewhat different when the scale is changed. In the above
450 case one might consider changing the amplitude of the gluons a little
451 bit. Changing this to 0.5cm and at the same time reducing the number
452 of windings from 6 to 3 for the straight gluons and from 8 to 7 for the
453 gluons in the arcs gives
454
455 \begin{LTXexample}[pos=t]
456 \psset{unit=0.3,amplitude=0.5}
457 \begin{pspicture}[shift=*](0,-0.4)(10,3.5)
458 \psGluonArc[linecolor=Red,radius=2,windings=7](5,2)(0,180)
459 \psGluonArc[linecolor=Green,radius=2,windings=7](5,2)(180,360)
460 \psGluon[windings=3,linecolor=Blue](0,2)(3,2)\psdot(3,2)
461 \psGluon[windings=3,linecolor=Blue](7,2)(10,2)\psdot(7,2)
462 \end{pspicture}
463 $+ \textrm{ others} = C_A(\frac{5}{3}+\frac{31}{9}\epsilon)
464 + n_F(-\frac{2}{3}-\frac{10}{9}\epsilon)$
465 \end{LTXexample}
466
467 \subsection{Photons}
468
469 When drawing photons one should take care that the number of wiggles is
470 selected properly. Very often this number should be an integer plus
471 $0.5$. This can be seen in the following example:
472
473 \begin{LTXexample}[width=5cm]
474 \begin{pspicture}[showgrid](0,-0.4)(4,3)
475 \psdot(0.5,0.4)\psdot(3.5,0.4)
476 \psArrowLine[linecolor=Red](0,0.4)(4,0.4)
477 \psarc[linecolor=Green,arrowscale=2]{->}(2,0.4){1}{60}{120}
478 \psPhotonArc[amplitude=4pt,windings=8.5,% wiggles
479 radius=1.5,linecolor=Brown](2,0.4)(0,180)
480 \end{pspicture}
481 \end{LTXexample}
482
483
484
485 When the number of wiggles is reduced to 8 we obtain:
486
487 \begin{LTXexample}[width=5cm]
488 \begin{pspicture}[showgrid](0,-0.4)(4,3)
489 \psdot(0.5,0.4)\psdot(3.5,0.4)
490 \psArrowLine[linecolor=Red](0,0.4)(4,0.4)
491 \psarc[linecolor=Green,arrowscale=2]{->}(2,0.4){1}{60}{120}
492 \psPhotonArc[amplitude=4pt,windings=8,% wiggles
493 radius=1.5,linecolor=Brown](2,0.4)(0,180)
494 \end{pspicture}
495 \end{LTXexample}
496
497 This is not as nice. Somehow the symmetry is violated. One should also
498 take care that the wiggles start in the proper way. If we make the
499 amplitude negative we see that the photons are not `right' either:
500
501
502 \begin{LTXexample}[width=5cm]
503 \begin{pspicture}[showgrid](0,-0.4)(4,3)
504 \psdot(0.5,0.4)\psdot(3.5,0.4)
505 \psArrowLine[linecolor=Red](0,0.4)(4,0.4)
506 \psarc[linecolor=Green,arrowscale=2]{->}(2,0.4){1}{60}{120}
507 \psPhotonArc[amplitude=-4pt,windings=8.5,% wiggles
508 radius=1.5,linecolor=Brown](2,0.4)(0,180)
509 \end{pspicture}
510 \end{LTXexample}
511
512
513 \begin{LTXexample}[width=5cm]
514 \begin{pspicture}[showgrid](0,-0.4)(4,2)
515 \psArrowLine(0,0)(1,1) \psArrowLine(1,1)(0,2)
516 \psArrowLine(3,1)(4,0) \psArrowLine(4,2)(3,1)
517 \psPhoton[windings=4.5,amplitude=4pt](1,1)(3,1)
518 \psdot(1,1) \psdot(3,1)
519 \end{pspicture}
520 \end{LTXexample}
521
522
523 \begin{LTXexample}[width=5cm]
524 \begin{pspicture}(0,-1)(4.4,2)
525 \psArrowLine(0,0)(1,1) \psArrowLine(1,1)(0,2)
526 \psArrowLine(3,1)(4,0) \psArrowLine(4,2)(3,1)
527 \psPhoton[windings=4.5,amplitude=4pt,linecolor=blue](1,1)(3,1)
528 \psGluon[windings=4,amplitude=3pt,linecolor=Green](3.5,1.5)(4.2,0.9)
529 \rput(0.5,1.9){$\mathrm{e}^-$} \rput(3.5,1.9){$\bar{\mathrm{q}}$}
530 \rput(0.5,0.2){$\mathrm{e}^+$} \rput(3.5,0.2){q}
531 \rput(2,1.5){$\gamma$}\rput[r](4.2,1.3){$\mathrm{g}$}
532 \psline{->}(0,-0.2)(4,-0.2)\uput[0](4,-0.2){$t$}
533 \end{pspicture}
534 \end{LTXexample}
535
536
537
538 \subsection{Curves and graphs}
539
540 \LPack{pst-feyn} is a PSTricks related package and can use all commands by one of
541 the nearly``endless'' PSTricks packages.
542 An example of a complete picture would be:
543
544 %\begin{LTXexample}[pos=t]
545 \psset{unit=1pt}
546 \begin{pspicture}(-30,-30)(360,440)
547 \psLinAxis(0,0)(300,0)(3,10,5,0)\psLinAxis(0,400)(300,400)(3,10,-5,0)
548 \psLogAxis(0,0)(0,400)(4,-5,2) \psLogAxis(300,0)(300,400)(4,5,2)
549 \readdata\DataA{data/data0.dat} \readdata\DataB{data/data1.dat}
550 \listplot[plotstyle=curve,linecolor=Blue,linewidth=1.5pt,unit=100,curvature=.5 2 0]{\DataA}
551 \listplot[plotstyle=curve,linecolor=Red,linewidth=1.5pt,linestyle=dashed,unit=100,
552 curvature=.5 2 0]{\DataB}
553 \psline[linecolor=Blue](200,360)(270,360)
554 \rput[r](195,360){\blue\large$e^+e^-\rightarrow\mu^+\mu^-$}
555 \psline[linestyle=dashed,linecolor=Red](200,330)(270,330)
556 \rput[r](195,330){\red\large$e^+e^-\rightarrow\tau^+\tau^-$}
557 \rput(0,-10){0} \rput(100,-10){1}\rput(200,-10){2}\rput(300,-10){3}
558 \rput(150,-25){Beam energy in GeV (Threshold effects for $\mu$ and $\tau$)}
559 \rput(-10,70){$1$} \rput(-10,170){$10$}\rput(-10,270){$10^2$}\rput(-10,370){$10^3$}
560 \rput{90}(-25,220){\large$\sigma$ in nb}
561 \psArrowLine(190,270)(160,300) \psArrowLine(160,240)(190,270)
562 \psArrowLine(270,300)(240,270) \psArrowLine(240,270)(270,240)
563 \psPhoton[windings=4.5,amplitude=4](190,270)(240,270)
564 \psdot(190,270) \psdot(240,270)
565 \end{pspicture}
566 %\end{LTXexample}
567
568 \begin{lstlisting}
569 \psset{unit=1pt}
570 \begin{pspicture}(-30,-30)(360,440)
571 \psLinAxis(0,0)(300,0)(3,10,5,0)\psLinAxis(0,400)(300,400)(3,10,-5,0)
572 \psLogAxis(0,0)(0,400)(4,-5,2) \psLogAxis(300,0)(300,400)(4,5,2)
573 \readdata\DataA{data/data0.dat} \readdata\DataB{data/data1.dat}
574 \listplot[plotstyle=curve,linecolor=Blue,linewidth=1pt,unit=100,curvature=.5 2 0]{\DataA}
575 \listplot[plotstyle=curve,linecolor=Red,linewidth=1.5pt,linestyle=dashed,unit=100,
576 curvature=.5 2 0]{\DataB}
577 \psline[linecolor=Blue](200,360)(270,360)
578 \rput[r](195,360){\blue\large$e^+e^-\rightarrow\mu^+\mu^-$}
579 \psline[linestyle=dashed,linecolor=Red](200,330)(270,330)
580 \rput[r](195,330){\red\large$e^+e^-\rightarrow\tau^+\tau^-$}
581 \rput(0,-10){0} \rput(100,-10){1}\rput(200,-10){2}\rput(300,-10){3}
582 \rput(150,-25){Beam energy in GeV (Threshold effects for $\mu$ and $\tau$)}
583 \rput(-10,70){$1$} \rput(-10,170){$10$}\rput(-10,270){$10^2$}\rput(-10,370){$10^3$}
584 \rput{90}(-25,220){\large$\sigma$ in nb}
585 \psArrowLine(190,270)(160,300) \psArrowLine(160,240)(190,270)
586 \psArrowLine(270,300)(240,270) \psArrowLine(240,270)(270,240)
587 \psPhoton[windings=4.5,amplitude=4](190,270)(240,270)
588 \psdot(190,270) \psdot(240,270)
589 \end{pspicture}
590 \end{lstlisting}
591
592 \psset{unit=1cm}
593
594
595 \begin{LTXexample}[width=5cm]
596 \begin{pspicture}(0,-0.4)(4,2)
597 \psline[linecolor=Blue](0,1)(2,1)
598 \psGluon[linecolor=Green,amplitude=3pt,windings=6](2,1)(4,1)
599 \psPhoton[linecolor=Red,amplitude=3pt,windings=6](2,1.5)(4,2)
600 \psZigZag[linecolor=Lime,amplitude=3pt,windings=6](2,0.5)(4,0)
601 \psellipse[fillcolor=Yellow,fillstyle=solid](2,1)(0.45,0.8)
602 \end{pspicture}
603 \end{LTXexample}
604
605
606
607 \subsection{Flowcharts}
608
609 There are several commands for creating boxes with text in them. The rest
610 is just a matter of drawing lines and circle segments with arrows. It might describe
611 a system for the automatic computation of cross-sections:
612
613 %\begin{LTXexample}[pos=t]
614 \begin{center}
615 \psscalebox{0.9}{%
616 \begin{pspicture}(11,14)
617 \sffamily\psset{unit=1pt,linecolor=Magenta}
618 \psArrowLine(200,40)(200,10) \psArrowLine(200,100)(200,40)
619 \psArrowLine(200,150)(200,100)\psArrowLine(100,130)(200,100)
620 \psArrowLine(85,95)(200,100) \psArrowLine(260,105)(200,100)
621 \psArrowLine(250,135)(200,100)\psArrowLine(160,75)(200,100)
622 \psArrowLine(200,100)(250,70) \psArrowLine(200,185)(200,150)
623 \psArrowLine(200,220)(200,185)\psArrowLine(200,250)(200,220)
624 \psArrowLine(240,263)(200,250)\psArrowLine(240,237)(200,250)
625 \psArrowLine(200,285)(200,250)\psArrowLine(200,310)(200,285)
626 \psArrowLine(200,335)(200,310)\psArrowLine(180,360)(200,335)
627 \psArrowLine(200,385)(180,360)\psArrowLine(50,370)(180,360)
628 \psArrowArc[radius=62.5](200,247.5)(90,180)\psArrowArc[radius=62.5](200,247.5)(180,270)
629 \psArrowLine(210,385)(300,360) \psArrowLine(210,335)(300,360)
630 \psArrowLine(80,300)(80,130) \psArrowLine(190,335)(80,300)
631 \psArrowLine(190,385)(80,300) \psArrowLine(50,335)(80,300)
632 \psArrowLine(300,360)(340,340) \psArrowArcn[radius=37.5](205,347.5)(90,270)
633 \psBCirc[linecolor=Blue](200,100){10} \psBCirc[linecolor=Blue](200,100){5}
634 \psBCirc[linecolor=Blue](200,40){7.5} \psBCirc[linecolor=Blue](200,250){10}
635 \psBCirc[linecolor=Blue](200,250){5} \psBCirc[linecolor=Blue](200,310){7.5}
636 \psBCirc[linecolor=Blue](180,360){7.5}\psBCirc[linecolor=Blue](80,300){7.5}
637 \psBCirc[linecolor=Blue](300,360){7.5}\psCCirc(200,185){7.5}{Blue}{Yellow}
638 \footnotesize\psBText[linecolor=Red](200,285){\red Form program}
639 \psBText[linecolor=Red](200,335){\red Diagrams}\psBText[linecolor=Red](200,385){\red Model}
640 \psBText[linecolor=Red](200,10){\red events}\psBText[linecolor=Red](80,95){\red Axolib}
641 \psBText[linecolor=Red](350,335){\red Pictures}\psCText(137.5,247.5){Blue}{Yellow}{instructions}
642 \psBText(260,70){Cross-sections\\Histograms}\psBText(140,75){Monte Carlo\\Routine}
643 \psBText(275,105){FF\\1 loop integrals}\psCText(260,135){Blue}{Yellow}{Spiderlib\\Fortran/C}
644 \psCText(200,150){Blue}{Yellow}{Matrix\\Element}\psBText(80,130){Kinematics\\Configuration}
645 \psCText(200,220){Blue}{Yellow}{Output\\Formula}
646 \psCText(260,263){Blue}{Yellow}{Spiderlib\\Form part}
647 \psCText(260,237){Blue}{Yellow}{FF support\\library}\psBText(40,370){Reaction\\selection}
648 \psBText(40,340){Specification\\Cuts, etc.}\psPText[lb](211,36)(0){Event Generator}
649 \psPText[lb](211,181)(0){Code Generator}\psPText[lb](162,258)(0){FORM}
650 \psPText[lb](211,301)(0){Form program construction}\psPText[lb](191,362)(0){Diagram}
651 \psPText[lb](191,352)(0){Generator}\psPText[lb](311,370)(0){Postscript}
652 \psPText[lb](311,360)(0){Generator}\psPText[lb](91,292)(0){Kinematics}
653 \psPText[lb](91,282)(0){Generator}
654 \end{pspicture}%
655 }
656 %\end{LTXexample}
657 \end{center}
658
659 \begin{lstlisting}
660 \begin{pspicture}(11,14)
661 \sffamily\psset{unit=1pt,linecolor=Magenta}
662 \psArrowLine(200,40)(200,10) \psArrowLine(200,100)(200,40)
663 \psArrowLine(200,150)(200,100)\psArrowLine(100,130)(200,100)
664 \psArrowLine(85,95)(200,100) \psArrowLine(260,105)(200,100)
665 \psArrowLine(250,135)(200,100)\psArrowLine(160,75)(200,100)
666 \psArrowLine(200,100)(250,70) \psArrowLine(200,185)(200,150)
667 \psArrowLine(200,220)(200,185)\psArrowLine(200,250)(200,220)
668 \psArrowLine(240,263)(200,250)\psArrowLine(240,237)(200,250)
669 \psArrowLine(200,285)(200,250)\psArrowLine(200,310)(200,285)
670 \psArrowLine(200,335)(200,310)\psArrowLine(180,360)(200,335)
671 \psArrowLine(200,385)(180,360)\psArrowLine(50,370)(180,360)
672 \psArrowArc[radius=62.5](200,247.5)(90,180)\psArrowArc[radius=62.5](200,247.5)(180,270)
673 \psArrowLine(210,385)(300,360) \psArrowLine(210,335)(300,360)
674 \psArrowLine(80,300)(80,130) \psArrowLine(190,335)(80,300)
675 \psArrowLine(190,385)(80,300) \psArrowLine(50,335)(80,300)
676 \psArrowLine(300,360)(340,340) \psArrowArcn[radius=37.5](205,347.5)(90,270)
677 \psBCirc[linecolor=Blue](200,100){10} \psBCirc[linecolor=Blue](200,100){5}
678 \psBCirc[linecolor=Blue](200,40){7.5} \psBCirc[linecolor=Blue](200,250){10}
679 \psBCirc[linecolor=Blue](200,250){5} \psBCirc[linecolor=Blue](200,310){7.5}
680 \psBCirc[linecolor=Blue](180,360){7.5}\psBCirc[linecolor=Blue](80,300){7.5}
681 \psBCirc[linecolor=Blue](300,360){7.5}\psCCirc(200,185){7.5}{Blue}{Yellow}
682 \footnotesize\psBText[linecolor=Red](200,285){\red Form program}
683 \psBText[linecolor=Red](200,335){\red Diagrams}\psBText[linecolor=Red](200,385){\red Model}
684 \psBText[linecolor=Red](200,10){\red events}\psBText[linecolor=Red](80,95){\red Axolib}
685 \psBText[linecolor=Red](350,335){\red Pictures}\psCText(137.5,247.5){Blue}{Yellow}{instructions}
686 \psBText(260,70){Cross-sections\\Histograms}\psBText(140,75){Monte Carlo\\Routine}
687 \psBText(275,105){FF\\1 loop integrals}\psCText(260,135){Blue}{Yellow}{Spiderlib\\Fortran/C}
688 \psCText(200,150){Blue}{Yellow}{Matrix\\Element}\psBText(80,130){Kinematics\\Configuration}
689 \psCText(200,220){Blue}{Yellow}{Output\\Formula}
690 \psCText(260,263){Blue}{Yellow}{Spiderlib\\Form part}
691 \psCText(260,237){Blue}{Yellow}{FF support\\library}\psBText(40,370){Reaction\\selection}
692 \psBText(40,340){Specification\\Cuts, etc.}\psPText[lb](211,36)(0){Event Generator}
693 \psPText[lb](211,181)(0){Code Generator}\psPText[lb](162,258)(0){FORM}
694 \psPText[lb](211,301)(0){Form program construction}\psPText[lb](191,362)(0){Diagram}
695 \psPText[lb](191,352)(0){Generator}\psPText[lb](311,370)(0){Postscript}
696 \psPText[lb](311,360)(0){Generator}\psPText[lb](91,292)(0){Kinematics}
697 \psPText[lb](91,282)(0){Generator}
698 \end{pspicture}
699 \end{lstlisting}
700
701
702 \clearpage
703 \section{List of all optional arguments for \nxLPack{pst-feyn}}
704
705 \xkvview{family=pst-feyn,columns={key,type,default}}
706
707
708 \bgroup
709 \raggedright
710 \nocite{*}
711 \printbibliography
712 \egroup
713
714 \printindex
715
716
717
718
719 \end{document}