Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ort order of helicity from gg_tt.mad to CODEGEN

The Fortran codegen was using allow_reverse=True and the cpp codegen allow_reverse=False.
Now moved to allow_reverse=True also in cudacpp.
  • Loading branch information
valassi committed Dec 14, 2022
1 parent a331d63 commit c7948f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,12 +1417,12 @@ def get_initProc_lines(self, matrix_element, color_amplitudes):
### initProc_lines.append('jamp2_sv[%d] = new double[%d];' % (i, len(colamp))) # AV - this was commented out already
return '\n'.join(initProc_lines)

# AV - replace the export_cpp.OneProcessExporterCPP method (improve formatting)
# AV - replace the export_cpp.OneProcessExporterCPP method (fix helicity order and improve formatting)
def get_helicity_matrix(self, matrix_element):
"""Return the Helicity matrix definition lines for this matrix element"""
helicity_line = ' static constexpr short helicities[ncomb][mgOnGpu::npar] = {\n '; # AV (this is tHel)
helicity_line_list = []
for helicities in matrix_element.get_helicity_matrix(allow_reverse=False):
for helicities in matrix_element.get_helicity_matrix(allow_reverse=True): # AV was False: different order in Fortran and cudacpp! #569
helicity_line_list.append( '{ ' + ', '.join(['%d'] * len(helicities)) % tuple(helicities) + ' }' ) # AV
return helicity_line + ',\n '.join(helicity_line_list) + ' };' # AV

Expand Down

0 comments on commit c7948f4

Please # to comment.