~maddevelopers/mg5amcnlo/2.5.3_lep

« back to all changes in this revision

Viewing changes to models/write_param_card.py

  • Committer: olivier Mattelaer
  • Date: 2017-01-15 14:28:13 UTC
  • Revision ID: olivier.mattelaer@uclouvain.be-20170115142813-ha3dujol1qmi9dwr
allow model were all masses/width are zero

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
  
175
175
        # order the parameter in a smart way
176
176
        self.external.sort(self.order_param)
 
177
        todo_block= ['MASS', 'DECAY'] # ensure that those two block are always written
177
178
        
178
179
        cur_lhablock = ''
179
180
        for param in self.external:
182
183
                # check if some dependent param should be written
183
184
                self.write_dep_param_block(cur_lhablock)
184
185
                cur_lhablock = param.lhablock.upper()
 
186
                if cur_lhablock in todo_block:
 
187
                    todo_block.remove(cur_lhablock)
185
188
                # write the header of the new block
186
189
                self.write_block(cur_lhablock)
187
190
            #write the parameter
188
191
            self.write_param(param, cur_lhablock)
189
192
        self.write_dep_param_block(cur_lhablock)
 
193
        for cur_lhablock in todo_block:
 
194
            self.write_block(cur_lhablock)
 
195
            self.write_dep_param_block(cur_lhablock)
190
196
        self.write_qnumber()
191
197
        
192
198
    def write_block(self, name):