~maddevelopers/mg5amcnlo/2.6.6_running

« back to all changes in this revision

Viewing changes to models/write_param_card.py

  • Committer: olivier-mattelaer
  • Date: 2019-03-21 13:04:58 UTC
  • Revision ID: olivier-mattelaer-20190321130458-5r0s872p6iqrusq3
adding structure for loading/writing param_card with scale

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
                if cur_lhablock in todo_block:
189
189
                    todo_block.remove(cur_lhablock)
190
190
                # write the header of the new block
191
 
                self.write_block(cur_lhablock)
 
191
                self.write_block(cur_lhablock, param.scale)
192
192
            #write the parameter
193
193
            self.write_param(param, cur_lhablock)
194
194
        self.write_dep_param_block(cur_lhablock)
197
197
            self.write_dep_param_block(cur_lhablock)
198
198
        self.write_qnumber()
199
199
        
200
 
    def write_block(self, name):
 
200
    def write_block(self, name, scale=None):
201
201
        """ write a comment for a block"""
202
202
        
203
203
        self.fsock.writelines(
206
206
        """\n###################################\n"""
207
207
         )
208
208
        if name!='DECAY':
209
 
            self.fsock.write("""Block %s \n""" % name.lower())
 
209
            if scale:
 
210
                self.fsock.write("""Block %s @ %s \n""" % (name.lower(), scale))
 
211
            else:
 
212
                self.fsock.write("""Block %s \n""" % name.lower())
210
213
            
211
214
    def write_param(self, param, lhablock):
212
215
        """ write the line corresponding to a given parameter """