~mgtools/mg5amcnlo/2.3.1_MA5

« back to all changes in this revision

Viewing changes to madgraph/interface/madevent_interface.py

  • Committer: Benjamin Fuks
  • Date: 2015-09-04 08:02:07 UTC
  • Revision ID: fuks@cern.ch-20150904080207-mx7i248u1r8o8cvv
Automatic ma card generation for parton and detector level

Show diffs side-by-side

added added

removed removed

Lines of Context:
4273
4273
        # Check the switch status for Madanalysis 5
4274
4274
        if self.options['madanalysis5_path']:
4275
4275
            available_mode.append('6')
4276
 
            if os.path.exists(pjoin(self.me_dir,'Cards','madanalysis5_card.dat')):
4277
 
                switch['madanalysis5'] = 'ON'
4278
 
            else:
4279
 
                switch['madanalysis5'] = 'OFF'
 
4276
            switch['madanalysis5'] = 'ON'
4280
4277
 
4281
4278
        options = list(available_mode) + ['auto', 'done']
4282
4279
        for id, key in enumerate(switch_order):
4370
4367
            cards.append('madspin_card.dat')
4371
4368
        if switch['reweight'] == 'ON':
4372
4369
            cards.append('reweight_card.dat')
4373
 
        ## in the case of madanalysis5, a default card will be created on the basis of the final state
 
4370
        ## The different madanalysis cards
4374
4371
        if switch['madanalysis5'] == 'ON':
4375
 
            cards.append('madanalysis5_card.dat')
4376
4372
            from madanalysis5_interface import MadAnalysis5Interface
4377
4373
            ma5 = MadAnalysis5Interface()
4378
 
            ma5.CreateMA5Script(self.me_dir)
 
4374
            # parton level analysis (always there):  a default card will be created on the basis of the process generated by the user
 
4375
            cards.append('ma5_parton_card.dat')
 
4376
            ma5.CreateMA5Script(self.me_dir,"parton")
 
4377
            if switch['pythia'] == 'ON':
 
4378
              ma5.CreateMA5Script(self.me_dir,"hadron")
 
4379
              cards.append('ma5_hadron_card.dat')
 
4380
              ma5.log.error('check if fastjet is installed')
 
4381
            if switch['pgs'] == 'ON' or switch['delphes'] == 'ON':
 
4382
              ma5.CreateMA5Script(self.me_dir,"detector")
 
4383
              cards.append('ma5_detector_card.dat')
 
4384
              ma5.log.error('check if fastjet is installed')
4379
4385
        self.keep_cards(cards)
4380
4386
        
4381
4387
        if os.path.isfile(pjoin(self.me_dir,'Cards','MadLoopParams.dat')):