~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to madgraph/interface/amcatnlo_run_interface.py

  • Committer: olivier Mattelaer
  • Date: 2014-06-27 13:04:42 UTC
  • mfrom: (253.1.62 2.1.2)
  • mto: (253.1.74 2.1.2)
  • mto: This revision was merged to the branch mainline in revision 254.
  • Revision ID: olivier.mattelaer@uclouvain.be-20140627130442-5nsqrrggn12ocqr6
tmp comit

Show diffs side-by-side

added added

removed removed

Lines of Context:
1261
1261
        if not 'only_generation' in options.keys():
1262
1262
            options['only_generation'] = False
1263
1263
 
1264
 
        self.get_characteristics(pjoin(self.me_dir, 'SubProcesses', 'proc_characteristics.dat'))
 
1264
        self.get_characteristics(pjoin(self.me_dir, 'SubProcesses', 'proc_characteristics'))
1265
1265
 
1266
1266
        if self.cluster_mode == 1:
1267
1267
            cluster_name = self.options['cluster_type']
1437
1437
 
1438
1438
# check that PYTHIA6PT is not used for processes with FSR
1439
1439
            if shower == 'PYTHIA6PT' and \
1440
 
                self.proc_characteristics['has_fsr'] == '.true.':
 
1440
                self.proc_characteristics['has_fsr'] == 'true':
1441
1441
                raise aMCatNLOError('PYTHIA6PT does not support processes with FSR')
1442
1442
 
1443
1443
            if mode in ['aMC@NLO', 'aMC@LO']:
2591
2591
        content += 'SMASS=%s\n' % mcmass_dict[3]
2592
2592
        content += 'CMASS=%s\n' % mcmass_dict[4]
2593
2593
        content += 'BMASS=%s\n' % mcmass_dict[5]
2594
 
        content += 'EMASS=%s\n' % mcmass_dict[11]
2595
 
        content += 'MUMASS=%s\n' % mcmass_dict[13]
2596
 
        content += 'TAUMASS=%s\n' % mcmass_dict[15]
 
2594
        try:
 
2595
            content += 'EMASS=%s\n' % mcmass_dict[11]
 
2596
            content += 'MUMASS=%s\n' % mcmass_dict[13]
 
2597
            content += 'TAUMASS=%s\n' % mcmass_dict[15]
 
2598
        except KeyError:
 
2599
            # this is for backward compatibility
 
2600
            mcmass_lines = [l for l in \
 
2601
                    open(pjoin(self.me_dir, 'SubProcesses', 'MCmasses_%s.inc' % shower.upper())
 
2602
                            ).read().split('\n') if l]
 
2603
            new_mcmass_dict = {}
 
2604
            for l in mcmass_lines:
 
2605
                key, val = l.split('=')
 
2606
                new_mcmass_dict[key.strip()] = val.replace('d', 'e').strip()
 
2607
            content += 'EMASS=%s\n' % new_mcmass_dict['mcmass(11)']
 
2608
            content += 'MUMASS=%s\n' % new_mcmass_dict['mcmass(13)']
 
2609
            content += 'TAUMASS=%s\n' % new_mcmass_dict['mcmass(15)']
 
2610
 
2597
2611
        content += 'GMASS=%s\n' % mcmass_dict[21]
2598
2612
        content += 'EVENT_NORM=%s\n' % self.banner.get_detail('run_card', 'event_norm')
2599
2613
        # check if need to link lhapdf
3095
3109
        self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, 
3096
3110
                          '%s_%s_banner.txt' % (self.run_name, self.run_tag)))
3097
3111
 
 
3112
        self.get_characteristics(pjoin(self.me_dir, 'SubProcesses', 'proc_characteristics'))
3098
3113
 
3099
3114
        #define a bunch of log files
3100
3115
        amcatnlo_log = pjoin(self.me_dir, 'compile_amcatnlo.log')
3165
3180
        try: 
3166
3181
            os.environ['fastjet_config'] = self.options['fastjet']
3167
3182
        except (TypeError, KeyError):
3168
 
            os.environ['fastjet_config'] = 'None'
 
3183
            try:
 
3184
                del os.environ['fastjet_config']
 
3185
            except Exception:
 
3186
                pass
 
3187
            os.unsetenv('fastjet_config')
3169
3188
        
3170
3189
        # make Source
3171
3190
        self.update_status('Compiling source...', level=None)
3229
3248
 
3230
3249
        # check if virtuals have been generated
3231
3250
        proc_card = open(pjoin(self.me_dir, 'Cards', 'proc_card_mg5.dat')).read()
3232
 
        if not '[real=QCD]' in proc_card and \
3233
 
                          not os.path.exists(pjoin(self.me_dir,'OLP_virtuals')):
3234
 
            os.environ['madloop'] = 'true'
3235
 
            if mode in ['NLO', 'aMC@NLO', 'noshower']:
3236
 
                tests.append('check_poles')
3237
 
                hasvirt = True
3238
 
        else:
3239
 
            os.unsetenv('madloop')
3240
 
            hasvirt = False
 
3251
        if self.proc_characteristics['has_loops'].lower() == 'true' and \
 
3252
           mode in ['NLO', 'aMC@NLO', 'noshower']:
 
3253
            tests.append('check_poles')
3241
3254
 
3242
3255
        # make and run tests (if asked for), gensym and make madevent in each dir
3243
3256
        self.update_status('Compiling directories...', level=None)
3282
3295
                #check that none of the tests failed
3283
3296
                self.check_tests(test, this_dir)
3284
3297
 
3285
 
        os.unsetenv('madloop')
3286
 
 
3287
3298
 
3288
3299
    def donothing(*args):
3289
3300
        pass