Comment 2 for bug 1946657

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

A first patch (not optimal in term of memory management but functional is the following):

=== modified file 'mg5decay/decay_objects.py'
--- mg5decay/decay_objects.py 2022-02-05 20:06:43 +0000
+++ mg5decay/decay_objects.py 2022-02-10 20:17:32 +0000
@@ -3420,11 +3421,10 @@
         for new_numbers in itertools.permutations(numbers):

             mapping_id = dict([(o,n) for o,n in zip(numbers, new_numbers) if o!=n])
-
             if not mapping_id:
                 out.append(self)
                 continue
- channel = copy.copy(self)
+ channel = copy.deepcopy(self)
             channel['vertices'] = base_objects.VertexList()
                     # (real) DiagramTag
             channel['tag'] = []