This is a demonstration for the program packages FormCalc and LoopTools.

Two processes are calculated by the demo:

In subdirectory zzzz:
   Elastic ZZ scattering (Z Z -> Z Z)
   A. Denner, S. Dittmaier, and T. Hahn
   Phys. Rev. D56 (1997) 117.

In subdirectory eett:
   Top-pair production in electron collisions (e+ e- -> \bar t t)
   W. Beenakker, S.C. van der Marck, and W. Hollik
   Nucl. Phys. B365 (1991) 24.


The both cases the demo code consists of three parts:

> fa.m -- Generate the diagrams with FeynArts

> fc.m -- Simplify the symbolic amplitudes with FormCalc

> fortran.m -- Prepare the Fortran program


To execute these programs you need

> Mathematica 2.2 or higher

> FORM 1 or higher
  (FORM 1 is available from ftp://ftp.nikhef.nl/pub/form, FORM 2 is
  commercial; however, FORM 1 will be awfully slow on the ee -> tt
  process)

> FeynArts 2.2
  (available from http://www-itp.physik.uni-karlsruhe.de/feynarts)
  IMPORTANT: you need a version newer than 22 Feb 99.

> LoopTools
  (available from http://www-itp.physik.uni-karlsruhe.de/looptools)

> GNU's make
  (available from any GNU ftp site, e.g. prep.ai.mit.edu)

> a Fortran-77 compiler or f2c and a C compiler
  (f2c is available from ftp://ftp.netlib.org/f2c and is generally
  better than g77)

> for plotting the results: gnuplot 3.6
  (available from ftp://cmpc1.phys.soton.ac.uk/pub)


To run the demo:
(Note: "run xxx.m" means: start Mathematica and type "<< xxx.m".
Please use a new Mathematica session for every part of the demo.)

> Edit fa.m and supply the correct path to your FeynArts distribution
  in the line
	<< ~/FeynArts/FeynArts.m
  (you guessed it, that's where my FeynArts distribution is).

> Run fa.m, this produces files called
	{born,self,vert,box,counter}.amp
  in the directory fa/.

> Run fc.m, this simplifies the *.amp files with FormCalc and puts
  the results into fc/.

> Now comes the tricky bit: you have to adapt NumPrep to your Fortran
  compiler. In particular, you need to add a compiler flag for ignoring
  the 72-column limit of standard F77. To this end, edit NumPrep.m
  (located in the numerics/ subdirectory), search for the string
  "compiler flags", and follow the instructions given in the comments
  there.

> Run fortran.m, this produces Fortran code in files like self.m or
  boxT1.m in the directory fortran. It also produces a GNUmakefile.

  Note: NumPrep by default writes instructions for linking with the
  CERNlib into the makefile. This is not necessary for Standard Model
  processes. If you don't have the CERNlib installed, simply remove
  the flags "-L$(CERN)/$(CERN_LEVEL)/lib -lpdflib -lmathlib -lpacklib"
  from the makefile.

> Change into the directory fortran/ and type "gmake". You may want to
  look in run.F for changing parameters. The resulting executable will
  be called run. For several runs, place the parameters for each in a
  separate file, say run1.F, run2.F, ..., and say "gmake run1",
  "gmake run2" etc.

> Run "run" with the following parameters:
	run <pol1> <pol2> <pol3> <pol4> <energyfrom> <energyto>
  where the <poli> are the polarization of the external particles.
  E.g. in the case of ZZ -> ZZ, to obtain a purely longitudinally
  polarized differential cross-section at Sqrt[s] = 250 GeV use
	run 0 0 0 0 250
  or to get an unpolarized integrated cross-section for ee -> tt from
  Sqrt[s] = 500 to 600 GeV use
	run u u u u 500 600

  IMPORTANT: for ee -> tt, the fc.m program calculates the amplitudes
  for unpolarized fermions only (the line Hel[_] = 0 is responsible for
  this). Not surprisingly then, invoking "run" with polarizations
  different from UUUU won't calculate what you expect: not only won't
  it calculate the cross-section for the required polarization, but in
  general it won't even give you the correct unpolarized result because
  of the different averaging factor.

> If you have gnuplot 3.6 installed, you can plot the results with
	plot run-diff.pol=LLLL.E=00500
  plot is a program which writes out a script for running gnuplot and
  which exploits the structure of the file name to make the final plot
  as "publication-ready" as possible. Even if you're not completely
  satisfied with the plot it produces, say you want to modify some
  plotting parameter, you have a head-on start, because all you need
  to do is edit this script. Further notes on plot, e.g. how to compile
  it, can be found in the README file of the numerics/ subdirectory.


An example of why the numerical evaluation cannot be fully automatized:

In the ZZ -> ZZ process, if you compile the program with a Higgs mass
larger than 2 MZ (\sim 182 GeV), and happen to run straight into s ==
MH^2, the program will crash with a division by zero error. This is
because the s-channel Higgs resonance is not treated. This is a specific
thing that must be taken care of by the user.


Send bug reports, omissions, fan mail etc to
Thomas Hahn <hahn@particle.uni-karlsruhe.de>

Have fun!

