Changes between Version 7 and Version 8 of FAQ-General-4


Ignore:
Timestamp:
Apr 10, 2021, 8:50:49 AM (4 years ago)
Author:
Olivier Mattelaer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FAQ-General-4

    v7 v8  
    8282
    8383p =invert_momenta(p)
     84proc_id = -1 # if you use the syntax "@X" (with X>0), you can set proc_id to that value (this allows to distinguish process with identical initial/final state.)
     85nhel = -1 # means sum over all helicity
     86pdgs = [21,21,6,-6] #which pdg is requested
     87scale2 = 0.  #only used for loop matrix element. should be set to 0 for tree-level
     88alphas=0.13
     89
     90ans = allmatrix2py.smatrixhel(pdgs,p,alphas,scale2,nhel)
     91print ans
     92}}}
     93
     94
     95=== Full library of process in python for version 2.6.0 and 2.7.0
     96
     97If you are interested to have a single python library for a set of matrix-element.
     98This is also possible in fortran/python.
     99This is possible both for loop output ([sqr=virt]) and for tree level.
     100{{{
     101   generate p p > t t~
     102   output standalone PATH --prefix=int
     103}}}
     104
     105then you can compile the library by going to the SubProcesses  directory and
     106{{{
     107make allmatrix2py.so
     108}}}
     109
     110Here is one example in that case
     111{{{
     112import allmatrix2py
     113allmatrix2py.initialise('../Cards/param_card.dat')
     114
     115def invert_momenta(p):
     116        """ fortran/C-python do not order table in the same order"""
     117        new_p = []
     118        for i in range(len(p[0])):  new_p.append([0]*len(p))
     119        for i, onep in enumerate(p):
     120            for j, x in enumerate(onep):
     121                new_p[j][i] = x
     122        return new_p
     123p =[[  0.5000000E+03,  0.0000000E+00,  0.0000000E+00,  0.5000000E+03],
     124    [0.5000000E+03,  0.0000000E+00,  0.0000000E+00, -0.5000000E+03],
     125    [ 0.5000000E+03,  0.1040730E+03,  0.4173556E+03, -0.1872274E+03],
     126    [ 0.5000000E+03, -0.1040730E+03, -0.4173556E+03,  0.1872274E+03]
     127    ]
     128
     129p =invert_momenta(p)
    84130nhel = -1 # means sum over all helicity
    85131pdgs = [21,21,6,-6] #which pdg is requested