~maddevelopers/mg5amcnlo/FKS_EW_granny-run_py8_at_evtgen

« back to all changes in this revision

Viewing changes to madgraph/interface/reweight_interface.py

merged with 2.5.4_run_py8_at_evtgen rev 284

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
# For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch
13
13
#
14
14
################################################################################
15
 
""" Command interface for MadSpin """
 
15
""" Command interface for Re-Weighting """
16
16
from __future__ import division
17
17
import difflib
18
18
import logging
35
35
import madgraph.interface.common_run_interface as common_run_interface
36
36
import madgraph.interface.madevent_interface as madevent_interface
37
37
import madgraph.iolibs.files as files
38
 
import MadSpin.interface_madspin as madspin_interface
 
38
#import MadSpin.interface_madspin as madspin_interface
39
39
import madgraph.various.misc as misc
40
40
import madgraph.various.banner as banner
41
41
import madgraph.various.lhe_parser as lhe_parser
46
46
 
47
47
import models.import_ufo as import_ufo
48
48
import models.check_param_card as check_param_card 
49
 
import MadSpin.decay as madspin
 
49
#import MadSpin.decay as madspin
50
50
 
51
51
 
52
52
logger = logging.getLogger('decay.stdout') # -> stdout
203
203
        logger.info("options: %s" % option)
204
204
 
205
205
 
206
 
    def get_LO_definition_from_NLO(self, proc, real_only=False):
 
206
    @staticmethod
 
207
    def get_LO_definition_from_NLO(proc, model, real_only=False):
207
208
        """return the LO definitions of the process corresponding to the born/real"""
208
209
        
209
210
        # split the line definition with the part before and after the NLO tag
223
224
                order = order.split('=',1)[1]
224
225
                
225
226
            # define the list of particles that are needed for the radiation
226
 
            pert = fks_common.find_pert_particles_interactions(self.model,
 
227
            pert = fks_common.find_pert_particles_interactions(model,
227
228
                                           pert_order = order)['soft_particles']
228
229
            commandline += "define pert_%s = %s;" % (order.replace(' ',''), ' '.join(map(str,pert)) )
229
230
            
1385
1386
                has_nlo = True
1386
1387
                if self.banner.get('run_card','ickkw') == 3:
1387
1388
                    if len(proc) == min([len(p.strip()) for p in data['processes']]):
1388
 
                        commandline += self.get_LO_definition_from_NLO(proc)
 
1389
                        commandline += self.get_LO_definition_from_NLO(proc,self.model)
1389
1390
                    else:
1390
 
                        commandline += self.get_LO_definition_from_NLO(proc, real_only=True)
 
1391
                        commandline += self.get_LO_definition_from_NLO(proc,self.model, real_only=True)
1391
1392
                else:
1392
 
                    commandline += self.get_LO_definition_from_NLO(proc)
 
1393
                    commandline += self.get_LO_definition_from_NLO(proc,self.model)
1393
1394
        
1394
1395
        commandline = commandline.replace('add process', 'generate',1)
1395
1396
        logger.info(commandline)