Changes between Version 10 and Version 11 of LoopInducedTimesTree


Ignore:
Timestamp:
Mar 25, 2017, 9:37:22 PM (8 years ago)
Author:
Valentin Hirschi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LoopInducedTimesTree

    v10 v11  
    146146}}}
    147147>d.7) MadGraph5_aMC@NLO will then ask you questions related to the details of either the MadLoop standalone run you are doing or the event generation run.
     148------------
     149= Optional
     150------------
     151
     152You can decide to use a normal model instead of the special one suggested here. Then, one can use an ad-hoc new command in MG5aMC to create a copy of all base interaction and orders so as to generate their 'BKG_' equivalent.
     153This can be done by adding the following in the class 'MadGraphCmd' in '<MG_root_path>/madgraph/loop/loop_diagram_generation.py':
     154
     155{{{
     156    def do_prepare_model_for_loopInducedXTrees(self, line):
     157        """Commands for adding the necessary TREE UV interactions to the current model."""
     158       
     159        # Short-hand to the current model that will be modified
     160        model = self._curr_model
     161
     162        # First add the necessary BKG coupling_orders to the available coupling_orders
     163        # in the model
     164        if model['order_hierarchy']:
     165            for coupling_order in model['order_hierarchy'].keys():
     166                model['order_hierarchy']['BKG_%s'%coupling_order]=model['order_hierarchy'][coupling_order]
     167                model['perturbation_couplings'].append('BKG_%s'%coupling_order)
     168
     169        new_order_hierarchy = dict(model['order_hierarchy'])
     170        new_perturbation_couplings = list(model['perturbation_couplings'])
     171
     172        # Dubplicate base interactions to make UV ones
     173        new_interactions=[]
     174        id_offset = 1000000
     175        for inter in model['interactions'].get_type('base'):
     176            new_interactions.append(copy.deepcopy(inter))
     177            # Deepcopy intorrectly treats colorstring object. Need to do it by hand.
     178            new_interactions[-1].set('color',[cs.create_copy() for cs in inter.get('color')])
     179            id_offset += 1
     180            new_interactions[-1].set('id',id_offset)           
     181            new_interactions[-1].set('type','UVtree')
     182            new_interactions[-1].set('loop_particles',[[]])
     183            new_orders = {}
     184            for order in new_interactions[-1]['orders']:
     185                new_orders['BKG_%s'%order]=new_interactions[-1]['orders'][order]
     186            new_interactions[-1].set('orders',new_orders)
     187
     188
     189        model.set('interactions',base_objects.InteractionList(model.get('interactions')+new_interactions))
     190        # Reset the model dictionaries to sync changes
     191        model.reset_dictionaries()
     192        # Refresh dictionaries manually (would be done automatically anyway)
     193        model.actualize_dictionaries()
     194       
     195        model.set('order_hierarchy', new_order_hierarchy)
     196        model.set('perturbation_couplings', new_perturbation_couplings)
     197
     198        logger.info('Model %s successfully patched for (finite) Loops x Trees interference computation.'%model.get('name'))
     199        return
     200}}}
     201
     202And then add the following in the class 'Switcher' of '<MG_root_path>/madgraph/interface/master_interface.py':
     203
     204{{{
     205    def do_prepare_model_for_loopInducedXTrees(self, *args, **opts):
     206        return self.cmd.do_prepare_model_for_loopInducedXTrees(self, *args, **opts)
     207}}}
     208
     209You can then simply run the command 'prepare_model_for_loopInducedXTrees' to preprocess your model before running loop-induced x tree computation as instructed above.