=== How to add momentum dependent form factors? in UFO model=== === Compatible model. All UFO model are not ready to use form-factor (all recent one should be). In order to see if your model is compatible, look in the file __init__.py if you see the following lines: {{{ try: import form_factors except ImportError: pass else: all_form_factor = form_factors.all_form_factors }}} === Defining your form factor: create/edit the file form_factors.py and add the following lines: {{{ from object_library import all_form_factors, FormFactor from function_library import complexconjugate, re, im, csc, sec, acsc, asec, HeavTheta AAA = FormFactor(name = 'AAA', type = 'real', value = 'HeavTheta(MH - P(-1,1)*P(-1,3),-2*MH*,MH)') }}} 1. HeavTheta is a special function for a IF statement. If the first argument is positive then the function is equal to the second argument otherwise the function is equal to the third argument. 2. Any parameter of the model can be used inside the 'value' expression 3. You can use any type of object define in the ALOHA syntax (see the [ALOHA paper http://arxiv.org/abs/arXiv:1108.2041] for the convention). This includes the momenta P(x,y). This first index is the lorentz index which should be contracted, while the second index refers to the particle ordering of the vertex. 4. If you need to add an additional parameter in your model, you can do it in the parameters.py file. === Add the vertex dependencies in your form factor: For later... === How to add momentum dependent form factors? in v4 model=== The easiest way to implement momentum dependent form factors, without changing all the details in the {{{ matrix.f }}} files in a process is by adding them in the model files. In particular the {{{ couplings.f }}} can contain momentum dependent form factors. The following steps explain most of the details. * The first thing you have to do is download the full MG_ME package and untar it. Then, if your model contains new particles and interactions add them to the SM using the UserModel, giving some generic values to the coupling constants. (If your model does not contain new particles and you only want to modify existing interactions, it is enough to make a copy of the {{{ sm }}} directory to a new directory. ) * Generate the process you would like to study. * Go to the =./Source/MODEL/= directory and open the {{{ couplings.f }}} file. * Add (in the setpara subroutine) ''before'' the line {{{ c Start calculating the couplings for HELAS }}} the following lines to the file: {{{ c Momenta of particles in event include '../genps.inc' double precision pp(0:3,max_particles) common/momenta_pp/pp }}} This makes sure that the information of the momenta is available in the {{{ common/momenta_pp/pp }}} This makes sure that the information of the momenta is available in the {{{ couplings.f }}} file. These momenta can be used to calculate the anomalous (momentum dependent) couplings. The syntax is as follows. All the momenta are saved in an array called pp. The first element is running from 0 to 3, these are the energy, and the x, y and z components of the momentum of a particle (the beam direction is in the z direction) in the center of momentum frame of the event. The second element of the array labels the particles. Only momenta of '''external particles''' are in the array. The labeling is as follows. The first two are the incoming particles, and the others the outgoing numbered according to how the process is written down in the {{{ proc_card.dat }}} . For example, if you are studying {{{ e+e->Zh>bb~mu+mu- }}} then the first particle will be the positron, the second the electron. The final state particles: b quark, b anti-quark, muon+ and muon- , are 3, 4, 5 and 6 respectively. Hence momentum pp(2,4) is the y-component of the momentum of the b anti-quark in the center of momentum frame of the event. Using these components most anomalous couplings can be implemented by changing the SM values of the couplings in the {{{ couplings.f }}} file. These momenta can be used to calculate the anomalous (momentum dependent) couplings. The syntax is as follows. All the momenta are saved in an array called pp. The first element is running from 0 to 3, these are the energy, and the x, y and z components of the momentum of a particle (the beam direction is in the z direction) in the center of momentum frame of the event. The second element of the array labels the particles. Only momenta of '''external particles''' are in the array. The labeling is as follows. The first two are the incoming particles, and the others the outgoing numbered according to how the process is written down in the {{{ proc_card.dat }}} . For example, if you are studying {{{ e+e->Zh>bb~mu+mu- }}} then the first particle will be the positron, the second the electron. The final state particles: b quark, b anti-quark, muon+ and muon- , are 3, 4, 5 and 6 respectively. Hence momentum pp(2,4) is the y-component of the momentum of the b anti-quark in the center of momentum frame of the event. Using these components most anomalous couplings can be implemented by changing the SM values of the couplings in the {{{ couplings.f }}} file. * As a final step you have to make sure that the {{{ setpara }}} subroutine is called on an event-by-event basis, by adding to the {{{ run_card.dat }}} the line {{{ T = fixed_couplings ! if .false. calc. coupl. for every event }}} just after the line where you can set the scale factor. For an example {{{ run_card.dat }}} look [attachment:run_card.dat here]. Note that it might be interesting to make a new model for every process you want to study. In that case, instead of modifying the {{{ couplings.f }}} file in the =./Source/MODEL/= directory, you could change the one in the =./Models/newmodel/= directory. Doing it this way has the clear advantage of being able to regenerate your process, without having to change the {{{ couplings.f }}} file every time, which makes it less error prone. (Make sure that you also save a copy of the {{{ proc_card.dat }}} in the model directory so that you won't forget for which process you created this model.) -- Main.RikkertFrederix - 20 Jul 2008