After live discussions with Valentin, the following fix (that I shamelessly copy paste from Valentin's e-mail) solves it. Feel free to review it and merge it to the main branch.
Cheers,
Benj
<><><><><><><><><><>
We need to modify helas_objects.py (line 1349 in check_majorana_and_flip_flow) and replace the line
by
if (not new_wf.get('is_loop')) or (new_wf.get('pdg_code')>0): index_wf = wavefunctions.index(new_wf) else: for i_wf, wf in enumerate(wavefunctions): if new_wf == wf and wf.get('pdg_code')==new_wf.get('pdg_code'): index_wf = i_wf break else: raise ValueError new_wf = wavefunctions[index_wf]
This is needed because for loop wavefunctions the recycling of external legs REQUIRES paying attention to the PDG code and not just the properties/charges of the particle:
# When on the optimized output mode, the starting loop wavefunction
# can be recycled if it has the same pdg because whatever its pdg
# it has the same coefficients and loop momentum zero,
# so it is in principle not necessary to add it to the
# diagram_wavefunction. However, this is necessary for the function
# check_and_fix_fermion_flow to correctly update the dependances of
# previous diagrams to an external L-cut majorana wavefunction which
# needs flipping.
if not self.optimized_output: wavefunctionNumber=wavefunctionNumber+1 external_loop_wf.set('number',wavefunctionNumber) diagram_wavefunctions.append(external_loop_wf)
else: try: external_loop_wf=\ external_loop_wfs_dict[external_loop_wf.get('pdg_code’)]
Hi everyone,
After live discussions with Valentin, the following fix (that I shamelessly copy paste from Valentin's e-mail) solves it. Feel free to review it and merge it to the main branch.
Cheers,
Benj
<><><>< ><><><> <><><>
We need to modify helas_objects.py (line 1349 in check_majorana_ and_flip_ flow) and replace the line
by get('is_ loop')) or (new_wf. get('pdg_ code')> 0):
index_ wf = wavefunctions. index(new_ wf)
else:
for i_wf, wf in enumerate( wavefunctions) :
if new_wf == wf and wf.get( 'pdg_code' )==new_ wf.get( 'pdg_code' ):
index_wf = i_wf
break
else:
raise ValueError
new_wf = wavefunctions[ index_wf]
if (not new_wf.
This is needed because for loop wavefunctions the recycling of external legs REQUIRES paying attention to the PDG code and not just the properties/charges of the particle:
# When on the optimized output mode, the starting loop wavefunction wavefunction. However, this is necessary for the function fix_fermion_ flow to correctly update the dependances of output:
wavefunctionN umber=wavefunct ionNumber+ 1
external_ loop_wf. set('number' ,wavefunctionNu mber)
diagram_ wavefunctions. append( external_ loop_wf)
try:
external_ loop_wf= \
external_ loop_wfs_ dict[external_ loop_wf. get('pdg_ code’)]
# can be recycled if it has the same pdg because whatever its pdg
# it has the same coefficients and loop momentum zero,
# so it is in principle not necessary to add it to the
# diagram_
# check_and_
# previous diagrams to an external L-cut majorana wavefunction which
# needs flipping.
if not self.optimized_
else: