Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools Thomas Hahn Max-Planck-Institut für Physik München Paper and pencil are no longer sufficient to obtain predictions at precisions mandated by modern colliders. This is due to the number of loops, the number of external legs, and the number of particles in the model. More than any other collider, the LHC has to rely on precise theoretical predictions to even look in the right place, let alone test measurements at a quantitative level. The methods of perturbative quantum field theory, Feynman diagrams, have not changed much over time, and their application remains a formidable, though fully algorithmic, calculational problem. The talk explains how these methods are implemented in the publicly available packages FeynArts, FormCalc, and LoopTools and how calculations are done with them. With the automation thus achieved, results can be obtained in minutes that were previously in the domain of man-years. T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.1
49
Embed
Feynman Diagrams on the Computer: FeynArts, FormCalc ... · Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools Thomas Hahn Max-Planck-Institut für Physik München Paper
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Feynman Diagrams on the Computer:FeynArts, FormCalc, LoopTools
Thomas Hahn
Max-Planck-Institut für PhysikMünchen
Paper and pencil are no longer sufficient to obtain predictions at precisions mandated by moderncolliders. This is due to the number of loops, the number of external legs, and the number of particlesin the model. More than any other collider, the LHC has to rely on precise theoretical predictionsto even look in the right place, let alone test measurements at a quantitative level. The methods ofperturbative quantum field theory, Feynman diagrams, have not changed much over time, and theirapplication remains a formidable, though fully algorithmic, calculational problem. The talk explainshow these methods are implemented in the publicly available packages FeynArts, FormCalc, andLoopTools and how calculations are done with them. With the automation thus achieved, results canbe obtained in minutes that were previously in the domain of man-years.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.1
Automated Diagram EvaluationDiagram Generation:• Create the topologies• Insert fields• Apply the Feynman rules• Paint the diagrams
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.23
More Abbreviations
The Abbreviate Function allows to introduce abbreviationsfor arbitrary (sub-)expressions and extends the advantage ofcategorized evaluation.
The subexpressions are retrieved with Subexpr[].
Abbreviations were so far restricted to one FormCalc session,e.g. one could not save intermediate results involvingabbreviations and resume computation in a new session.
FormCalc 6 adds two functions to ‘register’ abbreviations andsubexpressions from an earlier session:
RegisterAbbr[abbr]
RegisterSubexpr[subexpr]
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.24
Categories of Abbreviations
• Abbreviations are recursively defined in several levels.
• When generating Fortran code, FormCalc introducesanother set of abbreviations for the loop integrals.
In general, the abbreviations are thus costly in CPU time.It is key to a decent performance that the abbreviations areseparated into different Categories:
• Abbreviations that depend on the helicities,
• Abbreviations that depend on angular variables,
• Abbreviations that depend only on√
s.
Correct execution of the categories guarantees that almost noredundant evaluations are made and makes the generatedcode essentially as fast as hand-tuned code.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.25
External Fermion Lines
An amplitude containing external fermions has the form
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.26
Problems with the Trace Technique
PRO: Trace technique is independent of any representation.
CON: For nF Fi’s there are n2F F∗i Fj’s.
Things get worse the more vectors are in the game:multi-particle final states, polarization effects . . .Essentially nF ∼ (# of vectors)! because allcombinations of vectors can appear in the Γi.
Solution: Use Weyl–van der Waerden spinor formalism tocompute the Fi’s directly.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.27
Sigma Chains
Define Sigma matrices and 2-dim. Spinors as
σµ = (1l,−~σ) ,
σµ = (1l,+~σ) ,
〈u|4d ≡(〈u+|2d , 〈u−|2d
),
|v〉4d ≡(|v−〉2d
|v+〉2d
).
Using the chiral representation it is easy to show thatevery chiral 4-dim. Dirac chain can be converted to asingle 2-dim. sigma chain:
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.30
More Freebies
• Polarization does not ‘cost’ extra= Get spin physics for free.
• Better numerical stability because components of kµ arearranged as ‘small’ and ‘large’ matrix entries, viz.
σµkµ =
(k0 + k3 k1 − ik2
k1 + ik2 k0 − k3↓
)
Large cancellations of the form√
k2 + m2 −√
k2 whenm� k are avoided: better precision for mass effects.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.31
Dirac Chains in 4D
As numerical calculations are done mostly using Weyl-spinorchains, there has been a paradigm shift for Dirac chains tomake them better suited for analytical purposes, e.g. theextraction of Wilson coefficients.
• Already in Version 5, Fierz methods have beenimplemented for Dirac chains, thus allowing the user toforce the fermion chains into almost any desired order.
• Version 6 further adds the Colour method to theFermionOrder option of CalcFeynAmp, which brings thespinors into the same order as the external colour indices.
• Also new in Version 6: completely antisymmetrizedDirac chains, i.e. DiracChain[−1, µ, ν] = σµν .
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.32
Alternate Link between FORM and Mathematica
FORM is able to handle very large expressions. To produce(pre-)simplified expressions, however, terms have to bewrapped in functions, to avoid immediate expansion:
a*(b + c) → a*b + a*c
a*f(b + c) → a*f(b + c)
The number of terms in a function is rather limited in FORM:on 32-bit systems to 32767.
Dilemma: FormCalc gets more sophisticated in pre-simplifyingamplitudes while users want to compute larger amplitudes.Thus, recently many ‘overflow’ messages from FORM.
Solution: Send pre-simplified generic amplitude via externalchannel to Mathematica for introducing abbreviations.Significant reduction in size of intermediate expressions.Tentukov, Vermaseren 2006
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.33
Effect on Intermediate Amplitudes
FORM → Mathematica: part of uu→ gg @ tree level+Den[U,MU2]*(
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.34
Numerical Evaluation in Fortran 77
user-level code included in FormCalc
generated code, “black box”
Cross-sections, Decay rates, Asymmetries . . .
SquaredME.Fmaster subroutine
abbr0_s.F
abbr0_angle.F...
abbreviations(invoked onlywhen necessary)
born.F
self.F...
form factors
xsection.Fdriver program
run.Fparameters for this run
process.hprocess definition
main.F
CPU-time (rough)
compute abbrtree}
5 %
compute abbr1-loop}
95 %
computeMtree}
.1 %
computeM1-loop}
.1 %
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.35
Features of the Generated Code
• Modular: largely autonomous pieces of code provide• kinematics,• model initialization,• convolution with PDFs.
• Extensible: default code serves (only) as an example.Other ‘Frontends’ can be supplied, e.g. HadCalc, sofox.
• Re-usable: external program need only callProcessIni (to set up the process) andParameterScan (to set off the calculation).
• Interactive: Mathematica interface provides Mathematicafunction for cross-section/decay rate.
• Parallel: built-in distribution of parameter scans.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.36
Choice of Language
Mentioning Fortran 77 as the programming language in manycircles draws a “Not that dinosaur again” response.But consider:
• Fortran was designed for ‘number crunching,’ i.e. efficientevaluation of large formulas.
• Good and free compilers are available.
• Fortran is still widely used in theoretical physics.
• The code is generated, so largely ‘invisible’ for the user.
• Linking Fortran 77 to C/C++ is pretty straightforward(particularly inside gcc), so is in some sense a ‘smallestcommon denominator.’
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.37
Code-generation Functions
FormCalc’s code-generation functions are now public anddisentangled from the rest of the code. They can be used towrite out an arbitrary Mathematica expression as optimizedFortran code:
• handle = OpenFortran["file.F"]opens file.F as a Fortran file for writing,
• WriteExpr[handle, {var -> expr, ...}]
writes out Fortran code which calculates expr and storesthe result in var,
• Close[handle]closes the file again.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.38
Code generation
• Expressions too large for Fortran are split into parts, as in
var = part1
var = var + part2
...
• High level of optimization, e.g. common subexpressionsare pulled out and computed in temporary variables.
• Many ancillary functions, e.g.PrepareExpr, OnePassOrder, SplitSums,$SymbolPrefix, CommonDecl, SubroutineDecl,etc.
make code generation versatile and highly automatable.Resulting code needs few or no changes by hand.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.39
Not the Cross-Section
Or, How to get things the Standard Setup won’t give you.
Example: extract the Wilson coefficients for b→ sγ .tops = CreateTopologies[1, 1 -> 2]
ins = InsertFields[tops, F[4,{3}] -> {F[4,{2}], V[1]}]
vert = CalcFeynAmp[CreateFeynAmp[ins], FermionChains -> Chiral]
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.40
Not the Cross-Section
Using FormCalc’s output functions it is also prettystraightforward to generate your own Fortran code:
file = OpenFortran["bsgamma.F"]
WriteString[file,
SubroutineDecl["bsgamma(C7,C8)"] <>
"\tdouble complex C7, C8\n" <>
"#include \"looptools.h\"\n"]
WriteExpr[file, {C7 -> c7, C8 -> c8}]
WriteString[file, "\tend\n"]
Close[file]
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.41
Scripting Mathematica
Or, How to do efficient batch processing with Mathematica.
Put everything into a script, using sh’s Here documents:
#! /bin/sh ................ Shell Magic
math << \_EOF_ ............ start Here document (note the \)
<< FeynArts‘
<< FormCalc‘
top = CreateTopologies[...];
...
_EOF_ ..................... end Here document
Everything between “<< \tag” and “tag” goes to Mathematicaas if it were typed from the keyboard.
Note the “\” before tag, it makes the shell pass everythingliterally to Mathematica, without shell substitutions.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.42
Scripting Mathematica
• Everything contained in one compact shell script, even ifit involves several Mathematica sessions.
• Can combine with arbitrary shell programming, e.g. canuse command-line arguments efficiently:
#! /bin/sh
math -run "arg1=$1" -run "arg2=$2" ... << \END
...
END
• Can easily be run in the background, or combined withutilities such as make.
Debugging hint: � � flag makes shell echo every statement,#! /bin/sh -x
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.43
LoopTools
LoopTools is a library for the one-loop integrals. It is based onFF and has a Fortran, C/C++, and Mathematica interface.
• D0 for complex masses added.Le, Dao 2009
• Dim.reg. IR/collinear cases (QCDLoop) added.Scalar integrals only so far (as in QCDLoop).λ2 > 0 regularization with λ2 = −2 coefficient of 1/ε2 in dim.reg.,
photon ‘mass’ λ, λ2 = −1 coefficient of 1/ε in dim.reg.,λ2 = 0 finite piece in dim.reg.
Ellis, Zanderighi 2008
• New dispatcher for IR and collinear divergences.Construct bit pattern: 1 for zero argument, 0 otherwise,then a single table lookup leads to correct case.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.44
LoopTools Environment Variables
Most LoopTools parameters can be set from the outsidethrough environment variables:LTCMPBITS # of bits compared in cache lookupsLTVERSION bit mask for alternate versionsLTMAXDEV maximum allowed relative deviation in comparing to alternate versionsLTDEBUG bit mask for debuggingLTRANGE range of integrals to print out in debug modeLTWARN number of digits lost before warningLTERR number of digits lost before errorLTDELTA ‘divergence’ ∆LTMUDIM renormalization scale µ2
LTLAMBDA IR regulator parameter λ2
LTMINMASS threshold m2min below which particles are considered ‘massless’
E.g. check finiteness without re-compilation by modifyingLTMUDIM, LTLAMBDA.
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.45
Alternate Versions
For some functions Alternate Versions exist, most of which arebased on an implementation by Denner. The user can chooseat run-time which version to use, and whether checking isperformed. This is determined by the Version Key:
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.47
CutTools
Tensor loop integrals have in FormCalc so far been treated byPassarino–Veltman reduction only, e.g.
qµqνD0D1
= gµν B00(p2,m21,m
22) + pµpν B11(p2,m2
1,m22)
where B00 and B11 are provided by LoopTools.
CutTools implements the cutting-technique-inspired OPP(Ossola, Papadopoulos, Pittau) method. It needs thenumerator as a function of q which it can sample:
Bcut(2, num, p,m21,m
22)
where num = qµqν .
Independent way of checking LoopTools results.Performance?
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.48
A Final Look
Using FeynArts, FormCalc, and LoopTools is a lot like drivinga car:
• You have to decide where to go (this is often the hardestdecision).
• You have to turn the ignition key, work gas and brakes,and steer.
• But you don’t have to know, say, which valve has toopen at which time to keep the motor running.
• On the other hand, you can only go where there areroads. You can’t climb a mountain with your car.
feynarts.de
T. Hahn, Feynman Diagrams on the Computer: FeynArts, FormCalc, LoopTools – p.49