~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to madgraph/various/shower_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:
152
152
            newlines = []
153
153
            for line in self.text.split('\n'):
154
154
                key_match = key_re.match(line)
155
 
                if key_match and not str(key).upper().startswith('DM'):
 
155
                if key_match and not ( str(key).upper().startswith('DM') ):
156
156
                    try:
157
157
                        comment = line.split('#')[1]
158
158
                    except:
164
164
                            newlines.append('%s = %s #%s' % (key, 'T', comment))
165
165
                        else:
166
166
                            newlines.append('%s = %s #%s' % (key, 'F', comment))
167
 
                elif key_match and str(key).upper().startswith('DM'):
 
167
                elif key_match and ( str(key).upper().startswith('DM') ):
168
168
                    pass
169
169
                else:
170
170
                    newlines.append(line)
171
171
 
172
172
            if str(key).upper().startswith('DM') and not value.lower() in ['','none','default']:
173
173
                newlines.append('%s = %s' % (str(key).upper(), value[0:len(value)]))
174
 
                logger.info('please specify a decay through set dm_1 M > D1 D2 @ BR @ ME; see shower_card.dat for details')
 
174
                logger.info('please specify a decay through set DM_1 decay; see shower_card.dat for details')
175
175
                
176
176
            self.text = '\n'.join(newlines) + '\n'
177
177