~maddevelopers/mg5amcnlo/2.7.4_array

« back to all changes in this revision

Viewing changes to madgraph/iolibs/group_subprocs.py

  • Committer: olivier-mattelaer
  • Date: 2020-03-09 19:05:51 UTC
  • mfrom: (284.1.17 2.7.1)
  • Revision ID: olivier-mattelaer-20200309190551-x8nv2tnob4qmu3om
pass to 2.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
        masses"""
224
224
 
225
225
        beam = [l.get('id') for l in process.get('legs') if not l.get('state')]
226
 
        fs = [l.get('id') for l in process.get('legs') if l.get('state')]
 
226
        fs = [(l.get('id'), l) for l in process.get('legs') if l.get('state')]
227
227
        name = ""
228
228
        for beam in beam:
229
229
            part = process.get('model').get_particle(beam)
231
231
                   part.get('color') != 1:
232
232
                name += "q"
233
233
            elif criteria == 'madweight':
234
 
                 name += part.get_name().replace('~', 'x').\
 
234
                name += part.get_name().replace('~', 'x').\
235
235
                            replace('+', 'p').replace('-', 'm')
236
236
            elif part.get('mass').lower() == 'zero' and part.is_fermion() and \
237
237
                   part.get('color') == 1 and part.get('pdg_code') % 2 == 1:
243
243
                name += part.get_name().replace('~', 'x').\
244
244
                            replace('+', 'p').replace('-', 'm')
245
245
        name += "_"
246
 
        for fs_part in fs:
 
246
        for (fs_part, leg) in fs:
247
247
            part = process.get('model').get_particle(fs_part)
248
248
            if part.get('mass').lower() == 'zero' and part.get('color') != 1 \
249
249
                   and part.get('spin') == 2:
260
260
            else:
261
261
                name += part.get_name().replace('~', 'x').\
262
262
                            replace('+', 'p').replace('-', 'm')
 
263
            if leg.get('polarization'):
 
264
                if leg.get('polarization') in [[-1,1],[1,-1]]:
 
265
                    name += 'T'
 
266
                elif leg.get('polarization') == [-1]:
 
267
                    name += 'L'
 
268
                elif leg.get('polarization') == [1]:
 
269
                    name += 'R'
 
270
                else:
 
271
                    name += '%s' %''.join([str(p).replace('-','m') for p in leg.get('polarization')])   
 
272
 
263
273
        
264
274
        for dc in process.get('decay_chains'):
265
275
            name += "_" + self.generate_name(dc, criteria)