Package madgraph :: Package loop :: Module loop_exporters :: Class LoopProcessExporterFortranSA
[hide private]
[frames] | no frames]

Class LoopProcessExporterFortranSA

source code

                                 object --+    
                                          |    
                        LoopExporterFortran --+
                                              |
                         object --+           |
                                  |           |
   iolibs.export_v4.VirtualExporter --+       |
                                      |       |
iolibs.export_v4.ProcessExporterFortran --+   |
                                          |   |
  iolibs.export_v4.ProcessExporterFortranSA --+
                                              |
                                             LoopProcessExporterFortranSA
Known Subclasses:

Class to take care of exporting a set of loop matrix elements in the Fortran format.

Instance Methods [hide private]
 
__init__(self, *args, **opts)
Initiate the LoopExporterFortran with directory information on where to find all the loop-related source files, like CutTools
source code
 
copy_template(self, model)
Additional actions needed to setup the Template.
source code
 
finalize(self, matrix_element, cmdhistory, MG5options, outputflag)
create the global information for loops
source code
 
write_f2py_makefile(self) source code
 
write_f2py_check_sa(self, matrix_element, output_path)
Write the general check_sa.py in SubProcesses that calls all processes successively.
source code
 
write_f2py_splitter(self)
write a function to call the correct matrix element
source code
 
loop_additional_template_setup(self, copy_Source_makefile=True)
Perform additional actions specific for this class when setting up the template with the copy_template function.
source code
 
write_loop_makefile_definitions(self, writer, link_tir_libs, tir_libs, tir_include=[])
Create the file makefile which links to the TIR libraries.
source code
 
convert_model(self, model, wanted_lorentz=[], wanted_couplings=[])
Caches the aloha model created here when writing out the aloha fortran subroutine.
source code
 
get_ME_identifier(self, matrix_element, group_number=None, group_elem_number=None)
A function returning a string uniquely identifying the matrix element given in argument so that it can be used as a prefix to all MadLoop5 subroutines and common blocks related to it.
source code
 
get_SubProc_folder_name(self, process, group_number=None, group_elem_number=None)
Returns the name of the SubProcess directory, which can contain the process goup and group element number for the case of loop-induced integration with MadEvent.
source code
 
compiler_choice(self, compiler={'cpp': 'g++', 'f2py': 'f2py', 'fortran': 'gfortran'})
Different daughter classes might want different compilers.
source code
 
turn_to_mp_calls(self, helas_calls_list) source code
 
make_source_links(self)
In the loop output, we don't need the files from the Source folder
source code
 
make_model_symbolic_link(self)
Add the linking of the additional model files for multiple precision
source code
 
make(self)
Compiles the additional dependences for loop (such as CutTools).
source code
 
cat_coeff(self, ff_number, frac, is_imaginary, Nc_power, Nc_value=3)
Concatenate the coefficient information to reduce it to (fraction, is_imaginary)
source code
 
get_amp_to_jamp_map(self, col_amps, n_amps)
Returns a list with element 'i' being a list of tuples corresponding to all apparition of amplitude number 'i' in the jamp number 'j' with coeff 'coeff_j'.
source code
 
get_color_matrix(self, matrix_element)
Return the color matrix definition lines.
source code
 
get_context(self, matrix_element)
Returns the contextual variables which need to be set when pre-processing the template files.
source code
 
generate_loop_subprocess(self, matrix_element, fortran_model, group_number=None, proc_id=None, config_map=None, unique_id=None)
Generate the Pxxxxx directory for a loop subprocess in MG4 standalone, including the necessary loop_matrix.f, born_matrix.f and include files.
source code
 
link_files_from_Subprocesses(self, proc_name)
To link required files from the Subprocesses directory to the different P* ones
source code
 
generate_general_replace_dict(self, matrix_element, group_number=None, proc_id=None)
Generates the entries for the general replacement dictionary used for the different output codes for this exporter.The arguments group_number and proc_id are just for the LoopInduced output with MadEvent.
source code
 
write_loop_matrix_element_v4(self, writer, matrix_element, fortran_model, group_number=None, proc_id=None, config_map=None)
Writes loop_matrix.f, CT_interface.f, loop_num.f and mp_born_amps_and_wfs.
source code
 
write_process_info_file(self, writer, matrix_element)
A small structural function to write the include file specifying some process characteristics.
source code
 
generate_subprocess_directory(self, matrix_element, fortran_model)
To overload the default name for this function such that the correct function is used when called from the command interface
source code
 
write_check_sa(self, writer, matrix_element)
Writes out the steering code check_sa.
source code
 
write_improve_ps(self, writer, matrix_element)
Write out the improve_ps subroutines which modify the PS point given in input and slightly deform it to achieve exact onshellness on all external particles as well as perfect energy-momentum conservation
source code
 
write_loop_num(self, writer, matrix_element, fortran_model)
Create the file containing the core subroutine called by CutTools which contains the Helas calls building the loop
source code
 
write_CT_interface(self, writer, matrix_element, optimized_output=False)
Create the file CT_interface.f which contains the subroutine defining the loop HELAS-like calls along with the general interfacing subroutine.
source code
 
split_HELASCALLS(self, writer, replace_dict, template_name, masterfile, helas_calls, entry_name, bunch_name, n_helas=2000, required_so_broadcaster='LOOP_REQ_SO_DONE', continue_label=1000, momenta_array_name='P', context={})
Finish the code generation with splitting.
source code
 
write_loopmatrix(self, writer, matrix_element, fortran_model, noSplit=False)
Create the loop_matrix.f file.
source code
 
write_bornmatrix(self, writer, matrix_element, fortran_model)
Create the born_matrix.f file for the born process as for a standard tree-level computation.
source code
 
write_born_amps_and_wfs(self, writer, matrix_element, fortran_model, noSplit=False)
Writes out the code for the subroutine MP_BORN_AMPS_AND_WFS which computes just the external wavefunction and born amplitudes in multiple precision.
source code

Inherited from LoopExporterFortran: get_aloha_model, link_CutTools, write_mp_files

Inherited from iolibs.export_v4.ProcessExporterFortranSA: create_MA5_cards, export_model_files, write_check_sa_splitOrders, write_matrix_element_v4, write_procdef_mg5, write_source_makefile

Inherited from iolibs.export_v4.ProcessExporterFortran: coeff, create_default_madanalysis5_cards, create_proc_charac, create_run_card, export_helas, export_processes, format_integer_list, get_JAMP_coefs, get_JAMP_lines, get_JAMP_lines_split_order, get_amp2_lines, get_color_data_lines, get_den_factor_line, get_helicity_lines, get_ic_line, get_icolamp_lines, get_leshouche_lines, get_mg5_info_lines, get_pdf_lines, get_process_info_lines, get_source_libraries_list, get_split_orders_lines, modify_grouping, pass_information_from_cmd, replace_make_opt_c_compiler, replace_make_opt_f_compiler, set_chosen_SO_index, set_compiler, set_cpp_compiler, set_fortran_compiler, write_configs_file, write_configs_file_from_diagrams, write_helamp_madspin, write_leshouche_file, write_maxamps_file, write_maxparticles_file, write_nexternal_file, write_nexternal_madspin, write_ngraphs_file, write_pdf_opendata, write_pmass_file, write_props_file

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  template_dir = '/Users/omattelaer/Documents/workspace/3.0.1/MG...
  madloop_makefile_name = 'makefile'
  MadLoop_banner = 'write(*,*) \' ==============================...

Inherited from LoopExporterFortran: default_opt, include_names

Inherited from iolibs.export_v4.ProcessExporterFortranSA: matrix_template

Inherited from iolibs.export_v4.ProcessExporterFortran: grouped_mode

Inherited from iolibs.export_v4.VirtualExporter: check, exporter, output, sa_symmetry

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **opts)
(Constructor)

source code 

Initiate the LoopExporterFortran with directory information on where to find all the loop-related source files, like CutTools

Overrides: object.__init__
(inherited documentation)

copy_template(self, model)

source code 

Additional actions needed to setup the Template.

Overrides: iolibs.export_v4.VirtualExporter.copy_template

finalize(self, matrix_element, cmdhistory, MG5options, outputflag)

source code 

create the global information for loops

Overrides: iolibs.export_v4.VirtualExporter.finalize

write_f2py_makefile(self)

source code 
Overrides: iolibs.export_v4.ProcessExporterFortranSA.write_f2py_makefile
(inherited documentation)

write_f2py_check_sa(self, matrix_element, output_path)

source code 

Write the general check_sa.py in SubProcesses that calls all processes successively.

Overrides: iolibs.export_v4.ProcessExporterFortranSA.write_f2py_check_sa

write_f2py_splitter(self)

source code 

write a function to call the correct matrix element

Overrides: iolibs.export_v4.ProcessExporterFortranSA.write_f2py_splitter

convert_model(self, model, wanted_lorentz=[], wanted_couplings=[])

source code 

Caches the aloha model created here when writing out the aloha fortran subroutine.

Overrides: iolibs.export_v4.VirtualExporter.convert_model

get_ME_identifier(self, matrix_element, group_number=None, group_elem_number=None)

source code 

A function returning a string uniquely identifying the matrix element given in argument so that it can be used as a prefix to all MadLoop5 subroutines and common blocks related to it. This allows to compile several processes into one library as requested by the BLHA (Binoth LesHouches Accord) guidelines. The arguments group_number and proc_id are just for the LoopInduced output with MadEvent.

compiler_choice(self, compiler={'cpp': 'g++', 'f2py': 'f2py', 'fortran': 'gfortran'})

source code 

Different daughter classes might want different compilers. Here, the gfortran compiler is used throughout the compilation (mandatory for CutTools written in f90)

Overrides: iolibs.export_v4.ProcessExporterFortranSA.compiler_choice

make_source_links(self)

source code 

In the loop output, we don't need the files from the Source folder

Overrides: iolibs.export_v4.ProcessExporterFortran.make_source_links

make_model_symbolic_link(self)

source code 

Add the linking of the additional model files for multiple precision

Overrides: iolibs.export_v4.ProcessExporterFortran.make_model_symbolic_link

make(self)

source code 

Compiles the additional dependences for loop (such as CutTools).

Overrides: iolibs.export_v4.ProcessExporterFortranSA.make

get_amp_to_jamp_map(self, col_amps, n_amps)

source code 

Returns a list with element 'i' being a list of tuples corresponding to all apparition of amplitude number 'i' in the jamp number 'j' with coeff 'coeff_j'. The format of each tuple describing an apparition is (j, coeff_j). where coeff_j is of the form (Fraction, is_imag).

get_color_matrix(self, matrix_element)

source code 

Return the color matrix definition lines. This color matrix is of size NLOOPAMPSxNBORNAMPS and allows for squaring individually each Loop and Born amplitude.

generate_loop_subprocess(self, matrix_element, fortran_model, group_number=None, proc_id=None, config_map=None, unique_id=None)

source code 

Generate the Pxxxxx directory for a loop subprocess in MG4 standalone, including the necessary loop_matrix.f, born_matrix.f and include files. Notice that this is too different from generate_subprocess_directory so that there is no point reusing this mother function. The 'group_number' and 'proc_id' options are only used for the LoopInduced MadEvent output and only to specify the ME_identifier and the P* SubProcess directory name.

write_loop_matrix_element_v4(self, writer, matrix_element, fortran_model, group_number=None, proc_id=None, config_map=None)

source code 

Writes loop_matrix.f, CT_interface.f, loop_num.f and mp_born_amps_and_wfs. The arguments group_number and proc_id are just for the LoopInduced output with MadEvent and only used in get_ME_identifier.

generate_subprocess_directory(self, matrix_element, fortran_model)

source code 

To overload the default name for this function such that the correct function is used when called from the command interface

Overrides: iolibs.export_v4.VirtualExporter.generate_subprocess_directory

write_check_sa(self, writer, matrix_element)

source code 

Writes out the steering code check_sa. In the optimized output mode, All the necessary entries in the replace_dictionary have already been set in write_loopmatrix because it is only there that one has access to the information about split orders.

write_CT_interface(self, writer, matrix_element, optimized_output=False)

source code 

Create the file CT_interface.f which contains the subroutine defining the loop HELAS-like calls along with the general interfacing subroutine. It is used to interface against any OPP tool, including Samurai and Ninja.

split_HELASCALLS(self, writer, replace_dict, template_name, masterfile, helas_calls, entry_name, bunch_name, n_helas=2000, required_so_broadcaster='LOOP_REQ_SO_DONE', continue_label=1000, momenta_array_name='P', context={})

source code 

Finish the code generation with splitting. Split the helas calls in the argument helas_calls into bunches of size n_helas and place them in dedicated subroutine with name <bunch_name>_i. Also setup the corresponding calls to these subroutine in the replace_dict dictionary under the entry entry_name. The context specified will be forwarded to the the fileWriter.


Class Variable Details [hide private]

template_dir

Value:
'/Users/omattelaer/Documents/workspace/3.0.1/MG5_aMC_v3_0_1/madgraph/i\
olibs/template_files/loop'

MadLoop_banner

Value:
'''write(*,*) \' =====================================================\
===================================== \'
write(*,*) \'{                                                        \
                                  }\'
write(*,*) \'{       \'//char(27)//\'[32m\'//\'                       \
                                                     \'//char(27)//\'[\
0m\'//\'       }\'
write(*,*) \'{       \'//char(27)//\'[32m\'//\'                       \
...