Code review comment for lp:~mg5core2/mg5amcnlo/2.5.5

Revision history for this message
Valentin Hirschi (valentin-hirschi) wrote :

Hi Olivier, quick last minute review:

MadSpin/interface_madspin.py:
two left-over misc.sprint

This change seems a bit hacky, is it really safe?
For example, what could happen if the first operator used is exponentiation, i.e. ** ?

=== modified file 'aloha/aloha_writers.py'
--- aloha/aloha_writers.py 2017-03-27 08:37:47 +0000
+++ aloha/aloha_writers.py 2017-05-24 17:51:30 +0000
@@ -802,7 +802,13 @@
             for ind in numerator.listindices():
                 formatted = self.write_obj(numerator.get_rep(ind))
                 if formatted.startswith(('+','-')):
- formatted = '(%s)*%s' % tuple(formatted.split('*',1))
+ if '*' in formatted:
+ formatted = '(%s)*%s' % tuple(formatted.split('*',1))
+ else:
+ if formatted.startswith('+'):
+ formatted = formatted[1:]
+ else:
+ formatted = '(-1)*%s' % formatted[1:]
                 to_order[self.pass_to_HELAS(ind)] = \
                         ' %s(%d)= %s%s\n' % (self.outname, self.pass_to_HELAS(ind)+1,
                         coeff, formatted)

Going through the other changes nothing struck me.
However, I don't know well enough MadFKS to be able to assess the impact of Rik's clean-up of the code.

So it's all ok for me.

review: Approve

« Back to merge proposal