41 | | For later... |
| 41 | Go in the file vertices.py and identify the interactions that you want to modify: |
| 42 | Let assume that you want to modify the following interactions: |
| 43 | {{{ |
| 44 | V_2 = Vertex(name = 'V_2', |
| 45 | particles = [ P.W__minus__, P.W__plus__, P.H ], |
| 46 | color = [ '1' ], |
| 47 | lorentz = [ L.VVS1, L.VVS2 ], |
| 48 | couplings = {(0,0):C.GC_1,(0,1):C.GC_3}) |
| 49 | }}} |
| 50 | Then youhave to modify the lorentz structure associate to it: |
| 51 | {{{ |
| 52 | V_2 = Vertex(name = 'V_2', |
| 53 | particles = [ P.W__minus__, P.W__plus__, P.H ], |
| 54 | color = [ '1' ], |
| 55 | lorentz = [ L.FF1, L.FF2 ], |
| 56 | couplings = {(0,0):C.GC_1,(0,1):C.GC_3}) |
| 57 | }}} |
| 58 | Then you have to define those lorentz structure in the file lorentz.py |
| 59 | if they were define as: |
| 60 | {{{ |
| 61 | VVS1 = Lorentz(name = 'VVS1', |
| 62 | spins = [ 3, 3, 1 ], |
| 63 | structure = 'Metric(1,2)') |
| 64 | |
| 65 | VVS2 = Lorentz(name = 'VVS2', |
| 66 | spins = [ 3, 3, 1 ], |
| 67 | structure = 'P(-1,1)*P(-1,2)*Metric(1,2)') |
| 68 | }}} |
| 69 | then you need to add the following lines: |
| 70 | {{{ |
| 71 | FF1 = Lorentz(name = 'FF1', |
| 72 | spins = [ 3, 3, 1 ], |
| 73 | structure = 'AAA*Metric(1,2)', |
| 74 | formfactors=[ForFac.AAA]) |
| 75 | |
| 76 | VVS2 = Lorentz(name = 'VVS2', |
| 77 | spins = [ 3, 3, 1 ], |
| 78 | structure = 'AAA*P(-1,1)*P(-1,2)*Metric(1,2)', |
| 79 | formfactors=[ForFac.AAA]) |
| 80 | }}} |
| 81 | 1. You need to be sure to have the line "import formfactors as ForFac" at the beginning of the lorentz.py file |
| 82 | 2. You can include more than one formfactor for a single lorentz structure. |
| 83 | 3. You are not force to define a new Lorentz structure if the old one will not be use anymore. |
| 84 | |
| 85 | |
| 86 | === For More complex formfactor (Those who cann't be written in one line). |
| 87 | |
| 88 | If the formfactor is a very complex function with a lot of "if" statement (like those obtained if when you add a form-factor to have the vertex associated to a full loop). |
| 89 | The above procedure is not the most clear one. They are therefore the possibility to code your form-factor directly in Fortran. By providing a unique file containing the definition of the functions. |
| 90 | Even if this method is usually easier to implement, this is not compatible with the C++/Python output, and you can not validate your implementation with the "check" command and/or produce any type of code related to the C++/Python output provided by MG5_aMC@NLO. |
| 91 | |
| 92 | In that case you need to create a directory Fortran insice the UFO directory |
| 93 | and create a file functions.f |
| 94 | You are free to define whatever you want in that file (if this doesn't create conflict with another functions of mg5. I advice to start all your routine/function by "mymdl_" to avoid any problem). |
| 95 | |
| 96 | Assuming that this Fortran file define the function AAA. Then you can modify the lorentz.py structure to the following: |
| 97 | VVS2 = Lorentz(name = 'VVS2', |
| 98 | spins = [ 3, 3, 1 ], |
| 99 | structure = 'AAA(P(-1,1)*P(-1,3))*P(-1,1)*P(-1,2)*Metric(1,2)') |
| 100 | }}} |
| 101 | 1. All functions defined liked that need to return a complex number |
| 102 | 2. All argument of such function need to be a complex number, or an expression returning a complex number. It is therefore not possible to provide to the function the set of momenta as argument (since this is a vector). |