Changes between Version 2 and Version 3 of FeynRules


Ignore:
Timestamp:
04/04/12 14:28:20 (8 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FeynRules

    v2 v3  
     1= !FeynRules =
     2
     3== Material ==
     4
     5The latest version of !FeynRules: [http://feynrules.irmp.ucl.ac.be/downloads/feynrules-current.tar.gz download here].
     6
     7The !FeynRules (not up-to-date) manual: [http://feynrules.irmp.ucl.ac.be/attachment/wiki/WikiStart/Manual_a4.pdf download here].
     8
     9The slides associated to the lectures: [http://cp3.irmp.ucl.ac.be/~bfuks/fuks_kias.pdf download here].
    110
    211
    3 == FeynRules ==
     12== Model files ==
     13During the lectures, a supersymmetric (SUSY) QCD theory is implemented.
     14 * The gauge group is SU(3)_c (as in QCD)
     15 * The field content is given by
     16   * Three generations of up-type quarks
     17   * Three generations of up-type left-handed squarks
     18   * Three generations of up-type right-handed squarks
     19   * A gluon
     20   * A gluino
     21 * The free parameters of the theory consists in
     22   * The masses of the particles
     23   * The strong coupling constant (both gs and alpha_s)
     24 * For the Lagrangian, see the slides.
    425
    5 === A (short) user manual ===
     26The implementation has been performed in three different ways which will illustrate the different features of !FeynRules.
     27 * The good old way, using regular fields including a four-component representation for the fermions: [/attachment/wiki/SchoolKias/FeynRules/susyqcd_dirac.fr susyqcd_dirac.fr]
     28 * A better approach, using regular fields including a two-component representation for the fermions: [/attachment/wiki/SchoolKias/FeynRules/susyqcd_weyl.fr susyqcd_weyl.fr]
     29 * The best method for supersymmetric theoric, using superfields: [/attachment/wiki/SchoolKias/FeynRules/susyqcd_dirac.fr susyqcd_sf.fr]
     30
     31In the case you want to start from your own Weyl fermion implementation to get the superfield implementation, you will have to replace right-handed Weyl quarks and right-handed squarks by their charge-conjugate counterparts. Since this will not be performed explicitly during the lectures, you can either do it yourself or download the add-on to merge to your model file [/attachment/wiki/SchoolKias/FeynRules/addon.fr here].
    632
    733
     34== Tutorial ==
    835
    9 ''FeynRules'' is a ''Mathematica'' © based package allowing the calculation of the Feynman rules from a lagrangian.
     36[/attachment/wiki/SchoolKias/FeynRules/fuks.pdf Slides for the tutorial].
    1037
    11 ==== The ''FeynRules'' model-file ====
     38Documentation for projects 4 and 5:
     39 * [/attachment/wiki/SchoolKias/FeynRules/PhysRevD.48.2182.pdf Paper on triple gauge boson interactions].
     40 * [/attachment/wiki/SchoolKias/FeynRules/notes.pdf Notes on E_6 inspired Z'].
    1241
    13 The main ingredient used by ''FeynRules'' to calculate the Feynman rules from a specific lagrangian is the so-called ''model-file''. The model-file is a text file containing all the information about a specific model (particle content, coupling constants,...) that is read by ''Mathematica'' © to initialize the calculation of the Feynman rules.
    14 Notice that the structure of the ''FeynRules'' model-file is similar to the one encountered for ''FeynArts''. The ''FeynRules'' model-file contains in general a fourfold information,
    15    1. the declaration of all the indices that appear inside the lagrangian.
    16    1. a list of all the parameters that appear inside the lagrangian.
    17    1. a list of all the gauge groups.
    18    1. a list of all the particles appearing in the model.
    19 
    20 ===== The index declaration =====
    21 For ''FeynRules'' to run properly, all the indices (flavor, gauge,...) have to be declared in the model-file, together with the range of value they can take, ''e.g.''
    22 {{{
    23 IndexRange[ Index[Colour] ] = Range[3]
    24 
    25 IndexRange[ Index[Gauge] ] = NoUnfold[ Range[8] ]
    26 }}}
    27 This declares two indices {{{
    28 Colour
    29 }}} and {{{
    30 Gauge
    31 }}} which range from 1 to 3 and 1 to 8 respectively.
    32 The command {{{
    33 NoUnfold
    34 }}} is a ''FeynArts'' command that is ignored by ''FeynRules''. Notice that four-vector indices ({{{
    35 Lorentz
    36 }}}) and Dirac indices ({{{
    37 Spin
    38 }}}) are predefined in ''FeynRules'' and do not need to be declared in the model-file.
    39 
    40 The user should also tell ''FeynRules'' which symbol he should use for each symbol when writing the output (although this is not mandatory, it is strongly recommended, because it makes the output more readable). This is done by including the following lines in the model-file,
    41 {{{
    42 IndexFormat[ Colour, i]
    43 
    44 IndexFormat[ Gauge, a]
    45 }}}
    46 telling ''FeynRules'' to print {{{
    47 Colour
    48 }}} -indices and {{{
    49 Gauge
    50 }}} -indices as {{{
    51 i
    52 }}} and {{{
    53 a
    54 }}} respectively.
    55 
    56 ===== The parameter declaration =====
    57 The parameter declaration contains all symbols that appear inside the lagrangian and that should be treated as c-numbers, and not as fields.
    58 The parameters are entered as a list that ''must'' be called {{{
    59 M$Parameters
    60 }}}, each element of the list corresponding to a different parameter, together with possible options,
    61 {{{
    62 M$Parameters = {
    63    param1 == { options },
    64    param2 == { options },
    65    ...
    66 }
    67 }}}
    68 where {{{
    69 options
    70 }}} is the list of options associated with each parameter, entered as a ''Mathematica'' list of replacements.
    71 ''FeynRules'' distinguishes between two types of parameters,
    72    1. scalar parameter (''e.g.'' coupling constants, mixing angles,...),
    73    1. tensor parameters (''e.g.'' CKM matrix).
    74 
    75 The options for a scalar parameter are
    76    * {{{
    77 ComplexParameter
    78 }}} : This options defines whether the parameter should be treated as real ({{{
    79 False
    80 }}}) or complex ({{{
    81 True
    82 }}}). By default, this option is set to {{{
    83 False
    84 }}}.
    85    * {{{
    86 TeX
    87 }}} : Fixes this parameter to print in {{{
    88 TeXForm
    89 }}} as the right-hand side of the replacement rule.
    90    * {{{
    91 Definitions
    92 }}} : a list of replacements rules that should be applied by ''FeynRules'' before performing any calculation.
    93    * {{{
    94 Description
    95 }}} : a string, describing the parameter (''e.g.'' ="Fermi Constant"=).
    96 In addition to these options, several additional options are needed when running interfaces (''e.g.'' the numerical values of the parameters needed for the MC integration). In particular, all parameters must be declared to be either {{{
    97 External
    98 }}} or {{{
    99 Internal
    100 }}}: an external parameter gets its numerical value form the user , whereas the value of an internal parameter is calculated a posteriori from more fundamental parameters (external as well as internal). By default a scalar parameter is {{{
    101 External
    102 }}}.
    103 It is important to realize that the external parameters are not necessarily independent one from each other. But the relation linking them to the true primary free parameters is complex enough to justify the use of an external software (called a Calculator in the MadGraph language) to compute them. For example, widths of SM particles are related to the SM parameters and masses but the relation is complex enough to justify the use of the SM calculator. In the other hand some parameters like $\cos(\theta_W)$ are trivially linked to external parameters (like $\sin(\theta_W)$) and should thus be defined as internal, the link relation being defined in ''FeynRules''. One could of course use ''Mathematica'' replacement rules to get rid of internal parameters but this would in general badly affect the readability of the generated Fortran code.
    104        
    105 The full list of MG options for scalar parameters is
    106    * {{{
    107 ParameterType
    108 }}} : taking the values {{{
    109 External
    110 }}} or {{{
    111 Internal
    112 }}}, the default value being {{{
    113 External
    114 }}}.
    115    * {{{
    116 OrderBlock
    117 }}} : a list which contains the LH block name of the parameter. By default, the block name is {{{
    118 FRBlock
    119 }}}.
    120    * {{{
    121 Value
    122 }}} :       
    123       * for external parameters, the numerical value.
    124       * for internal parameters, the definition in terms of more fundamental parameters (external and internal).
    125       The default value is 1 (for both external and internal).
    126    * {{{
    127 InteractionOrder
    128 }}} : ''e.g.'' the interaction order of $\alpha_s$ is ={QCD, 2}=.
    129    * {{{
    130 ParameterName
    131 }}} : The name with which the parameter should be printed in the ''Fortran'' output code.
    132 
    133 The options for a tensor parameter are
    134    * {{{
    135 Indices
    136 }}} (mandatory): list of indices attached to the tensor.
    137    * {{{
    138 TensorClass
    139 }}} (mandatory): A name to identify all tensors belonging to the same class, ''e.g.'' all Dirac-matrices.
    140    * {{{
    141 Unitary
    142 }}} : defines unitary matrices ({{{
    143 True
    144 }}} or {{{
    145 False
    146 }}})
    147    * {{{
    148 Hermitian
    149 }}} : defines hermitian matrices ({{{
    150 True
    151 }}} or {{{
    152 False
    153 }}})
    154    * {{{
    155 Orthogonal
    156 }}} : defines orthogonal matrices ({{{
    157 True
    158 }}} or {{{
    159 False
    160 }}})
    161    * {{{
    162 Definitions
    163 }}} : a list of replacements rules that should be applied by ''FeynRules'' before performing any calculation.
    164 Notice that, unlike scalar parameters, tensor parameters are by default complex. Tensor parameters are by default internal (the components are in general specified by a small number os parameters, like for example mixing angles). We must thus add in the mode the definition of the components of the tensor in terms of more fundamental parameters (''e.g.''  the CKM matrix for two quark generations can be defined by the Cabibbo angle)
    165    * {{{
    166 Value
    167 }}} : the definition in terms of more fundamental parameters (external and internal).
    168 
    169 There is an additional option for tensor parameters having only one index. Let us suppose we want to write into the lagrangian a Yukawa coupling of the form
    170 %\[
    171 y_f H \bar{\psi}''f\psi''f\]%
    172 where {{{
    173 f
    174 }}} is a flavor index running from 1 to 3. For FeynRules to run properly, it is necessary that all indices are connected properly, ''i.e.'' connected two by two. This of course is not satisfied by a term like this. However, it can be achieved by adding to the list of options for the one-index tensor parameter {{{
    175 y
    176 }}} the option {{{
    177 NoTensor -> True
    178 }}}. This option tells ''FeynRules'' to ignore the index {{{
    179 f
    180 }}} when connecting the indices among each other.
    181  
    182 ===== The gauge group declaration =====
    183 
    184 The declaration of the gauge groups follows similar lines as the parameter declaration,
    185 {{{
    186 M$GaugeGroups = {
    187     gaugegroup1 == { options },
    188     gaugegroup2 == { options },
    189     ...
    190 }
    191 }}}
    192 The options for a gauge group are
    193    * {{{
    194 Abelian
    195 }}} (mandatory) : defines the gauge group to be abelian ({{{
    196 True
    197 }}})  or not ({{{
    198 False
    199 }}}).
    200    * {{{
    201 GaugeBoson
    202 }}} (mandatory) : the name of the gauge boson associated to the gauge boson (notice that this symbol must be declared during the parameter declaration).
    203    * {{{
    204 StructureConstant
    205 }}} (mandatory for non abelian groups) : the symbol associated to the structure constants of the group.
    206    * {{{
    207 Charge
    208 }}} (mandatory for abelian groups) : the symbol associated with the U(1) charge.
    209    * {{{
    210 CouplingConstant
    211 }}} (mandatory) : the symbol associated with the coupling constant of the gauge group (notice that this symbol must be declared during the parameter declaration)
    212    * {{{
    213 Representations
    214 }}} : a list with the symbols for the different representation matrices used in the lagrangian.
    215    * {{{
    216 Definitions
    217 }}} : a list of replacements rules that should be applied by ''FeynRules'' before performing any calculation.
    218 
    219 The declaration of a U(1) gauge group is then for example
    220 {{{
    221 M$GaugeGroups ={
    222    ...
    223    U1EM == {
    224        Abelian -> True,
    225        GaugeBoson -> A,
    226        Charge -> Q,
    227        CouplingConstant -> ee},
    228    ...
    229 }
    230 }}}
    231 Notice that this declaration defines automatically the field strength tensor associated with this gauge group. This field strength tensor can be called in ''Mathematica'' by {{{
    232 FS[A, mu, nu]
    233 }}}, where {{{
    234 mu
    235 }}} and {{{
    236 nu
    237 }}} denote the Lorentz indices carried by the field strength tensor.
    238 
    239 Similarly, the declaration of an SU(3) gauge group is
    240 {{{
    241 M$GaugeGroups ={
    242    ...
    243    SU3C == {
    244        Abelian -> False,
    245        GaugeBoson -> G,
    246        StructureConstant -> f,
    247        CouplingConstant -> gs,
    248        Representations -> {T, Colour}},
    249    ...
    250 }
    251 }}}
    252 where {{{
    253 T
    254 }}} is the symbol representing the SU(3) matrices in the fundamental representation, and {{{
    255 Colour
    256 }}} is the name of the gauge index carried by the quarks.
    257 Notice that this declaration defines automatically the field strength tensor associated with this gauge group. This field strength tensor can be called in ''Mathematica'' by {{{
    258 FS[A, mu, nu,a]
    259 }}}, where {{{
    260 mu
    261 }}} and {{{
    262 nu
    263 }}} denote the Lorentz indices and {{{
    264 a
    265 }}} the (adjoint) gauge-index carried by the field strength tensor.
    266 
    267 ===== The particle declaration =====
    268 
    269 The declaration of the particle follows similar lines as the parameter and gauge group declaration,
    270 {{{
    271 M$ClassesDescription = {
    272     particle1 == { options },
    273     particle2 == { options },
    274     ...
    275 }
    276 }}}
    277 The particles are grouped into classes having the same quantum numbers (''e.g.'' neutrinos, charged leptons, up and down-type quarks,...).
    278 The right-hand sides of the class declaration must be of the form {{{
    279 F[1]
    280 }}}, {{{
    281 F[2]
    282 }}},..., {{{
    283 V[1]
    284 }}}, {{{
    285 V[2]
    286 }}},..., {{{
    287 S[1]
    288 }}}, {{{
    289 S[2]
    290 }}},..., with
    291    * {{{
    292 S
    293 }}} : scalar fields
    294    * {{{
    295 F
    296 }}} : fermion fields (Spin 1/2)
    297    * {{{
    298 V
    299 }}} : vector fields
    300    * {{{
    301 Sp2
    302 }}} : spin 2 fields
    303 The possible options for a particle class are
    304    * {{{
    305 ClassName
    306 }}} (mandatory) : The symbol representing the class.
    307    * {{{
    308 SelfConjugate
    309 }}} (mandatory): defining whether a field is selfconjugate ({{{
    310 True
    311 }}}) or not ({{{
    312 False
    313 }}})
    314    * {{{
    315 ClassMembers
    316 }}} : a list of all members of the class. If the class contains only one members, this is by default the {{{
    317 ClassName
    318 }}}.
    319    * {{{
    320 Indices
    321 }}} : a list of all possible indices carried by the field. Notice that the Lorentz-indices ({{{
    322 Lorentz
    323 }}}, {{{
    324 Spin
    325 }}}) are not included in this list because they are implicit in the class declaration.
    326    * {{{
    327 QuantumNumbers
    328 }}} : a list of all quantum numbers (charges,...) carried by the field.
    329    * {{{
    330 FlavorIndex
    331 }}} : The name of the index ''FeynRules'' should expand over when the {{{
    332 FlavorExpand
    333 }}} option is turned to {{{
    334 True
    335 }}} during the vertex calculation.
    336    * {{{
    337 Mass
    338 }}} : a list of all the masses for all the class members. A mass can be entered as
    339       * the symbol that represents the mass in the lagrangian.
    340       * a two-component list, the first element being the symbol for the mass, and the second being the numerical value.
    341    * {{{
    342 Unphysical
    343 }}} : declares auxiliary fields ({{{
    344 True
    345 }}}), that should not be used for the output. The default value is {{{
    346 False
    347 }}}. The relations of the unphysical fields to the physical ones can be obtained via the {{{
    348 Definitions
    349 }}} option.
    350    * {{{
    351 Definitions
    352 }}} : a list of replacements rules that should be applied by ''FeynRules'' before performing any calculation.
    353 Notice that only those elements of {{{
    354 M$ClassesDescription
    355 }}} are read where a {{{
    356 ClassName
    357 }}} is defined. This allows to write very general model-files, where only those particle declarations are read in where {{{
    358 ClassName
    359 }}} is not commented out.
    360 
    361 The additional options for the interfaces ignored by ''FeynRules'', are
    362    * {{{
    363 PropagatorLabel
    364 }}} : a list of strings by which the lines in the MG output should be labeled.
    365    * {{{
    366 PropagatorType
    367 }}} : the linetype, by which the corresponding MG output is drawn. Supported linetypes are:
    368       * {{{
    369 S
    370 }}} / {{{
    371 Straight
    372 }}} : Straight
    373       * {{{
    374 D
    375 }}} / {{{
    376 ScalarDash
    377 }}} : Dashed
    378       * {{{
    379 W
    380 }}} / {{{
    381 Sine
    382 }}} : Wavy
    383       * {{{
    384 C
    385 }}} / {{{
    386 Cycles
    387 }}} : Curly
    388    * {{{
    389 ParticleName
    390 }}} : a list of strings, corresponding to the particle names as they should appear in the {{{
    391 particles.dat
    392 }}} file. By default, this is the same as the symbol defined for ''FeynRules''.
    393    * {{{
    394 AntiParticleName
    395 }}} : a list of strings, corresponding to the anti-particle names as they should appear in the {{{
    396 particles.dat
    397 }}} file. By default, this is the same as {{{
    398 ParticleName
    399 }}}, with an extra =~= added.
    400    * {{{
    401 PDG
    402 }}} : the PDG code of the particle (or a list containing the PDG codes for each class member). An automatically generated pdg code is is assigned if this options is omitted.
    403    * {{{
    404 GaugeIndex
    405 }}} : the index which should be used to obtain the MG colour structure (''S'', ''T'', ''O'') of the particle. By default, the MG colour structure is ''S''.
    406    * {{{
    407 FullName
    408 }}} : a string, specifyinh the full name of the particle (''e.g.'' {{{
    409 Electron
    410 }}}), or a list containing the names for each class member. By default {{{
    411 FullName
    412 }}}  is the same as {{{
    413 ParticleName
    414 }}}.
    415 
    416 A QCD-type model, containing 3 up-quark generations and a gluon would then correspond to
    417 {{{
    418 M$ClassesDefinitions = {
    419    (* Quarks (u)*)
    420    F[1] == {
    421       ClassName -> uq,
    422       ClassMembers -> {u, c, t},
    423       FlavorIndex -> Generation,
    424       SelfConjugate -> False,
    425       Indices -> {Index[Generation], Index[Colour]},
    426       Mass -> {{MU, 0.4}, {MC, 3}, {MT, 200}},
    427       Width -> {{WU, 0}, {WC, 0}, {WT,5}},
    428       QuantumNumbers -> { Q -> 2/3},
    429       PropagatorLabel -> {"u", "c", "t"},
    430       GaugeIndex -> Colour,
    431       PropagatorType -> Straight,
    432       PDG -> {2,4,6},
    433       FullName -> {"UQuark", "CQuark", "TQuark"},
    434    
    435    (* Gluons *)
    436    V[1] == {
    437       ClassName -> G,
    438       SelfConjugate -> True,
    439       Indices -> {Index[Gluon]},
    440       Mass -> 0,
    441       PropagatorLabel -> {"G"},
    442       GaugeIndex -> Gluon,
    443       PropagatorType -> Sine,
    444       PDG -> 21,
    445       FullName -> "Gluon" }
    446 }
    447 }}}
    448 
    449 
    450 
    451 ==== Running ''FeynRules'' ====
    452 Before loading ''FeynRules'', the user should tell ''Mathematica'' where to look for the package. This is done via the command
    453 {{{
    454 SetDirectory[ <the address of the package> ];
    455 
    456 $FeynRulesPath = <the address of the package>;
    457 }}}
    458 
    459 The ''FeynRules'' package is loaded via the command
    460 {{{
    461 << FeynRules`
    462 }}}
    463 
    464 The user can now load the model-file. First, the working directory should be set to the address of the model-file
    465 {{{
    466 SetDirectory[<address of the model-file>];
    467 }}}
    468 
    469 The model-file is loaded via the command
    470 {{{
    471 LoadModel[ < file > ]
    472 }}}
    473 Notice that for FeynRules to run properly, the extension of the model-file should be =.fr=.
    474 
    475 After the model-file is loaded, names for the anti-particle fields are generated automatically, ''e.g.'' if {{{
    476 e
    477 }}} denotes the electron field, {{{
    478 ebar
    479 }}} denotes the positron field. These symbols can also be obtained via the commands
    480 {{{
    481 HC[ e ]
    482 anti[ e ]
    483 }}}
    484 
    485 The lagrangian can be entered using standard ''Mathematica'' language. Notice that ''FeynRules'' has some predefined commands,
    486    * {{{
    487 del[ psi, mu ]
    488 }}} denotes the derivative of the field {{{
    489 psi
    490 }}} with respect to the space-time coordinate {{{
    491 x^mu
    492 }}}.
    493    * {{{
    494 Ga[ mu ]
    495 }}} denotes the Dirac-matrix with index {{{
    496 mu
    497 }}} ({{{
    498 mu
    499 }}} may also be 5).
    500    * {{{
    501 ProjP
    502 }}} and {{{
    503 ProjM
    504 }}} denote the projectors on right and left-handed fields.
    505    * {{{
    506 ProjP[ mu ]
    507 }}} and {{{
    508 ProjM[ mu ]
    509 }}} are shorthands for {{{
    510 Ga[ mu ].ProjP
    511 }}} and {{{
    512 Ga[ mu ].ProjM
    513 }}}.
    514    * {{{
    515 HC[ V ]
    516 }}} denotes the hermitian conjugate of the tensor parameter {{{
    517 V
    518 }}}.
    519    * {{{
    520 right[ psi ]
    521 }}} and {{{
    522 left[ psi ]
    523 }}} denote the right and left-handed parts of the Dirac field {{{
    524 psi
    525 }}}.
    526 
    527 If there is no ambiguity, indices of scalar fields and fermion fields may be omitted when writing down the lagrangian. Instead, the ''Mathematica'' {{{
    528 Dot
    529 }}} command (=.=) must then be used, ''e.g.'' the QCD interaction term for up-type quarks can be entered in two different ways,
    530 {{{
    531 -gs uqbar.Ga[mu].T[a].uq G[mu, a] == -gs Ga[mu, s, r] T[a, i, j]  uqbar[s, f, i].uq[r, f, j] G[mu, a]
    532 }}}
    533 Notice that the anticommutation of the fermion fields is taken into account by the dot-product on the right-hand side.
    534 Notice also that by writing the QCD interaction term for up-type quarks in this way, we implicitly used the class notation. We could have entered the same interaction term as
    535 {{{
    536 -gs uqbar.Ga[mu].T[a].uq G[mu, a] == -gs ubar.Ga[mu].T[a].u G[mu, a]
    537                                                              -gs cbar.Ga[mu].T[a].c G[mu, a]
    538                                                              -gs tbar.Ga[mu].T[a].t G[mu, a]
    539                                                       == -gs Ga[mu, s, r] T[a, i, j] ubar[s, i].u[r, j] G[mu, a]
    540                                                             -gs Ga[mu, s, r] T[a, i, j] cbar[s, i].c[r, j] G[mu, a]
    541                                                             -gs Ga[mu, s, r] T[a, i, j] tbar[s, i].t[r, j] G[mu, a]
    542 }}}
    543 Notice that in the last line, the fields {{{
    544 u
    545 }}}, {{{
    546 c
    547 }}} and {{{
    548 t
    549 }}} do not carry the {{{
    550 Generation
    551 }}} -index {{{
    552 f
    553 }}}, because we have the identification
    554 {{{
    555 u[s, i] == uq[s, 1, i]
    556 c[s, i] == uq[s, 2, i]
    557 t[s, i] == uq[s, 3, i]
    558 }}}
    559 
    560 The QCD lagrangian (gluons + up-type quarks) reads
    561 %\[
    562 \begin{cal}L\end{cal} = -\frac{1}{4}\,F_{\mu\nu}^a\,F_a^{\mu\nu}+i\bar u_f\gamma^\mu\partial_\mu u_f-g_s\bar u_f\gamma^\mu T^a u_f G_\mu^a,
    563 \]%
    564 where $f$ denotes the flavor index of the up-type quark ($f=1,2,3$). In ''FeynRules'' language, this lagrangian reads
    565 {{{
    566 L = -1/4 FS[G, mu, nu, a] FS[G, mu, nu, a] +I uqbar . Ga[mu] . del[uq, mu] -gs uq . Ga[mu] . T[a] . uq G[mu, a]
    567 }}}
    568 
    569 The Feynman rules can be obtained via the command
    570 {{{
    571 FeynmanRules[ L ]
    572 }}}
    573 The {{{
    574 FeynmanRules
    575 }}} command has several optional arguments,
    576    * {{{
    577 ScreenOutput
    578 }}} : If {{{
    579 True
    580 }}}, then the output is written on the screen, otherwise it is not. The default value is {{{
    581 True
    582 }}}.
    583    * {{{
    584 TeXOutput
    585 }}} : Writes the vertices obtained by {{{
    586 FeynmanRules
    587 }}} into a TeX-file specified on the right-hand side of the argument (''e.g.'' {{{
    588 TeXOutput -> < file.tex >
    589 }}}).
    590    * {{{
    591 FlavorExpand
    592 }}} :
    593       * Expands over the flavor indices specified by the list at the right-hand side of the argument, ''e.g.'' {{{
    594 FeynmanRules[ L ]
    595 }}} will only generate a single quark-gluon vertex (uq uq G), whereas =FeynmanRules[ L, FlavorExpand -> Generation ] generates three quark-gluon vertices, one for each flavor (u u G, c c G, t t G).
    596       * {{{
    597 FlavorExpand -> True
    598 }}} expands over all flavor indices.
    599    * {{{
    600 Name
    601 }}} : A string chosen by the user. The analytic expressions of the vertices are stored in {{{
    602 Vertices[ < Name > ]
    603 }}}.
    604 
    605 For complicated lagrangians, it may sometimes be convenient to split the lagrangian into several small pieces, ''e.g.'',
    606 {{{
    607 L = LGauge + LQuarks
    608 LGauge = -1/4 FS[G, mu, nu, a] FS[G, mu, nu, a]
    609 LQuarks = I uqbar . Ga[mu] . del[uq, mu] -gs uq . Ga[mu] . T[a] . uq G[mu, a]
    610 }}}
    611 The Feynman rules can be generated separately for each piece using the {{{
    612 FeynmanRules
    613 }}} command. Giving each piece a name via the {{{
    614 Name
    615 }}} option allows to combine the results later, ''e.g.'' a TeX-file containing both the vertices obtained from {{{
    616 LGauge
    617 }}} and {{{
    618 LQuarks
    619 }}},
    620 {{{
    621 FeynmanRules[ LGauge, Name -> "LG" ]
    622 FeynmanRules[ LQuarks, Name -> "LQ" ]
    623 
    624 WriteTeXOutput[ < file.tex >, {"LG", "LQ"}]
    625 }}}
    626 
    627 ==== The FeynArts interface ====
    628 
    629 The FeynArts model-file is then created via
    630 {{{
    631 WriteFeynArtsOutput[< file.mod>, {L1, L2, L3,...}]
    632 }}}
    633 where {{{
    634 L1
    635 }}}, {{{
    636 L2
    637 }}}, {{{
    638 L3
    639 }}}, ... denote the lagrangians which should be used to calculate Feynman rules from. This creates the FeynArts model-file {{{
    640 file.mod
    641 }}} in the current working directory.
    642 
    643 ==== The MadGraph interface ====
    644 
    645 The model file, together with the vertices calculated by the FeynmanRules function, contain all the information needed to run a generic MC generator, so it is sufficient to read out this information.
    646 
    647 When the model file was loaded, the following (invisible) output was produced (See {{{
    648 FirstExample.nb
    649 }}}):
    650    * The list of all particles, with the corresponding properties.
    651      For each class member, this list contains the following information
    652       * a string, representing the name of the particle (e.g. u)
    653       * a string, representing the name of the corresponding antiparticle (e.g. u~)
    654       * the spin (scalar (S), fermion (F), vector(V))
    655       * the way the propagator should be drawn (straight (S), dashed(D), wavy (W), curly(C))
    656       * a string representing the mass (ZERO if the mass is 0)
    657       * a string representing the width (ZERO if the width is 0)
    658       * the colour structure (singlet (S), triplet, (T), octet (O))
    659       * a string, by which the propagator should be labelled in graphical representations (by default the same as the name of the particle)
    660       * the pdg code of the particle (generated automatically, if omitted)
    661       * a string, representing the full name of the particle (by default the same as the name of the particle)
    662    * The list of all values for the masses and the decay rates.
    663    * The list of all parameters entering the model (apart from masses).
    664       For each parameter this list contains
    665       * a string, representing the name of the variable.
    666       * a tag (Ext/Int) indicating whether the parameter is external (i.e.  given by a numerical value) or internal (i.e. given via a relation to other parameters)
    667       * the value of the parameter (numerical for Ext, symbolical for Int)
    668       * only for Ext: the name of the LH Block (assigned automatically if omitted)
    669       * the interaction order (e.g. QCD 1)
    670       * A tag indicating whether the parameter is a compex number (True) or not (False).
    671 
    672 This information , together with the vertices, can be used to write for example the corresponding MadGraph files (saved in a subdirectory of the currentworking directory).
    673 {{{
    674 WriteMGOutput[L1, L2, L3,...]
    675 }}}
    676 where {{{
    677 L1
    678 }}}, {{{
    679 L2
    680 }}}, {{{
    681 L3
    682 }}}, ... denote the lagrangians which should be used to calculate Feynman rules from.
    683 
    684 Notice that there is a compatibility problem of the current interface with ''Mathematica''6.0. This will be fixed soon. The problem does however not occur for version 5.2.
    685 
    686 The created MadGraph-files are
    687 {{{
    688 coupl_check.inc
    689 coupl_definition.inc
    690 coupl_write.inc
    691 coupl.inc
    692 ident_card.dat
    693 input.inc
    694 interactions.dat
    695 param_card.dat
    696 param_read.inc
    697 param_write.inc
    698 particles.dat
    699 }}}
    700 
    701 
    702 
    703 
    704 
    705 
    706 
    707 
    708 
    709 
    710 
    711 
    712 
    713 
    714 
    715 
    716 
    717 
    718 
    719 
    720 
    721 
    722 
    723 
    724 
    725 
    726 
    727 
    728 
    729