The LanHEP input file is the sequence of statements, each starts with a special identifier (such as parameter, lterm etc) and ends with the full-stop '.' symbol. Statement can occupy several lines in the input file.
This section is aimed to clarify the syntax of LanHEP input files, i.e. the structure of the statements.
First of all, each word in any statement is either an identifier or a constant.
Indentfiers are the names of particles, parameters etc. Examples of identifiers from the previous section are particle names
e1 E1 A q Q GThe first word in each statement is also an identifier, defining the function which this statement performs. The identifiers are usually combinations of letters and digits starting with a letter. If an identifier does not respect this rule, it should be quoted. For example, the names of bosons must be written as 'W+' and 'W-', since they contain '+' and '-' symbols.
Constants can be classified as
0 1 -1 123 -98765Integers can appear in Lagrangian terms, parameter definition and in other expressions.
1.0 -1.0 0.000511 5.11e-4Floating point numbers are used only as parameter values (coupling constants, particle masses etc). They can not be explicitly used in Lagrangian terms.
electronIf a string constant contains any character besides letters and digits or does not begin with a letter, it should be quoted. For example, the comments in QED and QCD input files (see previous section) contain blank spaces, so they are quoted:
photon
'elementary electric charge'
'Strong coupling'
User can include comments into the LanHEP input file in two ways. First, symbol '%' denotes the comment till the end of current line. Second way allows one to comment any number of lines by putting a part of input file between '/*' (begin of comment) and '*/' (end of comment) symbols.
LanHEP allows the user to divide the input file into several files. To include the file file, the user should use the statement
read file.The standard extension '.mdl' of the file name may be omitted in this statement.
Another way to include a file is provided by the use statement as
use file.The use statement reads the file only once, next appearances of this statement with the same argument do nothing. This function prevents multiple reading of the same file. This form can be used mainly to include some standard modules, such as declaration of Standard Model particles to be used for writing some extensions of this model.
Let us consider the LanHEP input files for the Standard Model with both the t'Hooft-Feynman and unitary gauges. It is clear that these input files differ by several lines only -- the declaration of gauge bosons and Higgs doublet. It is more convenient to have only one model definition file. In this case the conditional statements are necessary. LanHEP allows the user to define several keys, and use these keys to branch among several variants of the model. The keys have to be declared by the keys statement:
keys name1=value1, name2=value2, ... .Then one can use the conditional statements:
do_if key==value1.
actions1
do_else_if key==value2.
actions2
do_else_if key==value3.
...
do_else.
default actions
end_if.
The statements do_else_if and do_else are not obligatory. The value of the key is a number or symbolic string. An example of using these statement in the Standard model may read:
keys Gauge=unitary.
do_if Gauge==Feynman.
vector Z/Z:('Z-boson',mass MZ = 91.187, width wZ = 2.502, gauge).
do_else_if Gauge==unitary.
vector Z/Z:('Z-boson',mass MZ = 91.187, width wZ = 2.502).
do_else.
write('Error: key Gauge must be either Feynman or unitary').
quit.
end_if.
Thus, to change the choice of gauge fixing in the generated Feynman rules it is enough to modify one word in the input file. There is another way, to set the key value from the command line at the launch of LanHEP:
lhep -key Gauge=Feynman filename.
If the value of key is set from the command line at the program launch, the value for this key in the keys statement is ignored.