Package madgraph :: Package iolibs :: Module helas_call_writers :: Class FortranHelasCallWriter
[hide private]
[frames] | no frames]

Class FortranHelasCallWriter

source code

                 object --+            
                          |            
                       dict --+        
                              |        
core.base_objects.PhysicsObject --+    
                                  |    
                    HelasCallWriter --+
                                      |
                                     FortranHelasCallWriter

The class for writing Helas calls in Fortran, starting from HelasWavefunctions and HelasAmplitudes.

Includes the function generate_helas_call, which automatically generates the Fortran Helas call based on the Lorentz structure of the interaction.

Nested Classes [hide private]

Inherited from core.base_objects.PhysicsObject: PhysicsObjectError

Instance Methods [hide private]
 
default_setup(self)
Set up special Helas calls (wavefunctions and amplitudes) that can not be done automatically by generate_helas_call
source code
 
get_wavefunction_call(self, wavefunction)
Return the function for writing the wavefunction corresponding to the key.
source code
 
get_amplitude_call(self, amplitude)
Return the function for writing the amplitude corresponding to the key.
source code
 
generate_helas_call(self, argument)
Routine for automatic generation of Fortran Helas calls according to just the spin structure of the interaction.
source code

Inherited from HelasCallWriter: __init__, add_amplitude, add_wavefunction, filter, get_amplitude_calls, get_matrix_element_calls, get_model_name, get_sorted_keys, get_wavefunction_calls

Inherited from core.base_objects.PhysicsObject: __getitem__, __repr__, __str__, get, is_valid_prop, set

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __setitem__, __sizeof__, clear, copy, fromkeys, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Static Methods [hide private]
 
sorted_letters(arg)
Gives a list of letters sorted according to the order of letters in the Fortran Helas calls
source code
 
sorted_mothers(arg)
Gives a list of mother wavefunctions sorted according to
source code
Class Variables [hide private]
  self_dict = {-2: 'F', 1: 'H', 2: 'F', 3: 'J', 5: 'U'}
  sort_wf = {'I': 1, 'O': 0, 'S': 2, 'T': 3, 'V': 4}
  sort_amp = {'I': 4, 'O': 3, 'S': 0, 'T': 1, 'V': 2}

Inherited from HelasCallWriter: mother_dict

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

default_setup(self)

source code 

Set up special Helas calls (wavefunctions and amplitudes) that can not be done automatically by generate_helas_call

Overrides: core.base_objects.PhysicsObject.default_setup

get_wavefunction_call(self, wavefunction)

source code 

Return the function for writing the wavefunction corresponding to the key. If the function doesn't exist, generate_helas_call is called to automatically create the function.

Overrides: HelasCallWriter.get_wavefunction_call

get_amplitude_call(self, amplitude)

source code 

Return the function for writing the amplitude corresponding to the key. If the function doesn't exist, generate_helas_call is called to automatically create the function.

Overrides: HelasCallWriter.get_amplitude_call

generate_helas_call(self, argument)

source code 

Routine for automatic generation of Fortran Helas calls according to just the spin structure of the interaction.

First the call string is generated, using a dictionary to go from the spin state of the calling wavefunction and its mothers, or the mothers of the amplitude, to letters.

Then the call function is generated, as a lambda which fills the call string with the information of the calling wavefunction or amplitude. The call has different structure, depending on the spin of the wavefunction and the number of mothers (multiplicity of the vertex). The mother wavefunctions, when entering the call, must be sorted in the correct way - this is done by the sorted_mothers routine.

Finally the call function is stored in the relevant dictionary, in order to be able to reuse the function the next time a wavefunction with the same Lorentz structure is needed.

sorted_mothers(arg)
Static Method

source code 

Gives a list of mother wavefunctions sorted according to

  1. The order of the particles in the interaction
  2. Cyclic reordering of particles in same spin group
  3. Fermions ordered IOIOIO... according to the pairs in the interaction.