~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to models/write_param_card.py

  • Committer: olivier-mattelaer
  • Date: 2019-09-26 11:09:58 UTC
  • mfrom: (282.1.19 2.6.7)
  • mto: (283.1.18 2.7.0)
  • mto: This revision was merged to the branch mainline in revision 284.
  • Revision ID: olivier-mattelaer-20190926110958-38wrjh8hemq9zibw
merge with 2.6.7 + change L meaning for spin1 

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
 
243
243
        if lhablock == 'MASS':
244
244
            data = self.dep_mass
 
245
            #misc.sprint(data)
245
246
            prefix = " "
246
247
        elif lhablock == 'DECAY':
247
248
            data = self.dep_width
266
267
            if self.model['parameter_dict'][param.name].imag:
267
268
                raise ParamCardWriterError, 'All Mass/Width Parameter should be real (not the case for %s)'%param.name
268
269
            value = complex(self.model['parameter_dict'][param.name]).real
269
 
            text += """%s %s %f # %s : %s \n""" %(prefix, part["pdg_code"], 
 
270
            text += """%s %s %e # %s : %s \n""" %(prefix, part["pdg_code"], 
270
271
                        value, part["name"], param.expr.replace('mdl_',''))  
271
272
        
272
273
        # Add duplicate parameter
281
282
            if self.model['parameter_dict'][param.name].imag:
282
283
                raise ParamCardWriterError, 'All Mass/Width Parameter should be real'
283
284
            value = complex(self.model['parameter_dict'][param.name]).real
284
 
            text += """%s %s %f # %s : %s \n""" %(prefix, part["pdg_code"], 
 
285
            text += """%s %s %e # %s : %s \n""" %(prefix, part["pdg_code"], 
285
286
                        value, part["name"], part[name].replace('mdl_',''))
286
 
            
 
287
 
287
288
        if not text:
288
289
            return
289
290