Skip to content

Commit

Permalink
[pp4t] in codegen, next (ugly) attempt to fix the P1-specific value o…
Browse files Browse the repository at this point in the history
…f nwf (madgraph5/madgraph4gpu#644), will revert
  • Loading branch information
valassi committed May 22, 2023
1 parent cbb4d3a commit ab4bf39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions model_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,8 @@ def __init__(self, *args, **kwargs):
def get_process_class_definitions(self, write=True):
replace_dict = super().get_process_class_definitions(write=False)
replace_dict['process_lines'] = replace_dict['process_lines'].replace('\n','\n ')
replace_dict['nwavefunc'] = self.matrix_elements[0].get_number_of_wavefunctions() # this is the correct P1-specific nwf, now in CPPProcess.h (#644)
replace_dict['nwavefunc'] = self.nwavefuncP1 # this is the correct P1-specific nwf, now in CPPProcess.h (#644)
###replace_dict['nwavefunc'] = self.matrix_elements[0].get_number_of_wavefunctions() # this is the WRONG P1-specific nwf (?!?!)
file = self.read_template_file(self.process_class_template) % replace_dict # HACK! ignore write=False case
file = '\n'.join( file.split('\n')[8:] ) # skip first 8 lines in process_class.inc (copyright)
return file
Expand Down Expand Up @@ -1242,7 +1243,7 @@ def get_all_sigmaKin_lines(self, color_amplitudes, class_name):
assert len(self.matrix_elements) == 1 # how to handle if this is not true?
self.couplings2order = self.helas_call_writer.couplings2order
self.params2order = self.helas_call_writer.params2order
nwavefuncs = self.matrix_elements[0].get_number_of_wavefunctions()
self.nwavefuncP1 = self.matrix_elements[0].get_number_of_wavefunctions() # this is the correct P1-specific nwf, now in CPPProcess.h (#644)
ret_lines += helas_calls
else:
ret_lines.extend([self.get_sigmaKin_single_process(i, me) \
Expand Down

0 comments on commit ab4bf39

Please sign in to comment.