~maddevelopers/mg5amcnlo/2.5.4_run_py8_at_evtgen

« back to all changes in this revision

Viewing changes to models/write_param_card.py

  • Committer: olivier Mattelaer
  • Date: 2016-05-12 11:00:18 UTC
  • mfrom: (262.1.150 2.3.4)
  • Revision ID: olivier.mattelaer@uclouvain.be-20160512110018-sevb79f0wm4g8mpp
pass to 2.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
################################################################################
 
1
###############################################################################
2
2
#
3
3
# Copyright (c) 2010 The MadGraph5_aMC@NLO Development team and Contributors
4
4
#
211
211
            info = info[4:]
212
212
    
213
213
        if param.value.imag != 0:
214
 
            raise ParamCardWriterError, 'All External Parameter should be real'
 
214
            raise ParamCardWriterError, 'All External Parameter should be real (not the case for %s)'%param.name
215
215
    
216
216
 
217
217
        # avoid to keep special value used to avoid restriction
256
256
            if part["type"] == "ghost":
257
257
                continue
258
258
            if self.model['parameter_dict'][param.name].imag:
259
 
                raise ParamCardWriterError, 'All Mass/Width Parameter should be real'
 
259
                raise ParamCardWriterError, 'All Mass/Width Parameter should be real (not the case for %s)'%param.name
260
260
            value = complex(self.model['parameter_dict'][param.name]).real
261
261
            text += """%s %s %f # %s : %s \n""" %(prefix, part["pdg_code"], 
262
262
                        value, part["name"], param.expr.replace('mdl_',''))