Diagram removal does not remove crossed diagrams

Bug #1820040 reported by Danilo Enoque Ferreira de Lima
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Unassigned

Bug Description

Dear MadGraph authors,

I am trying to generate the following process:

    import model HHVBF_UFO
    generate p p > h h j j QCD=0 --diagram_filter

I use the diagram filter to keep only diagrams where a Z/W decays into quarks in the final state (the code used is below). That is, I want to select the non-VBF diagrams to study them separately.

When doing this, I always get VBF diagrams anyway (for some quark configurations), although those diagrams disappear, when specifying the exact initial and final state. For example, I see some of the VBF diagrams in the u c~ > h h u c~ process with this:

generate u p > h h j j QCD=0 --diagram_filter

But not if I type directly:

generate u c~ > h h u c~ QCD=0 --diagram_filter

(in the latter case, all diagrams are removed by the filter)

I have identified that such diagrams are always produced by crossing symmetry in the MadGraph output. That is, I see messages such as the following one for the offending diagrams:

INFO: Crossed process found for u c~ > h h u c~, reuse diagrams.

Looking in the code, I have manually changed madgraph/code/diagram_generation.py in line 1785 (of MG5 2.6.5) leading to the following diff in the generate_multi_amplitudes function (where it checks for crossing diagrams):

daniloefl@daniloefl-work:~/workspace/MG5_aMC_v2_6_5$ diff madgraph/core/diagram_generation.py.orig madgraph/core/diagram_generation.py
1785c1785
< not process.get('is_decay_chain'):
---
> not process.get('is_decay_chain') and not diagram_filter:

After this, the diagrams that I wish were removed no longer appear, reinforcing my suspicion that this is a bug.

For completeness, I add my code in PLUGIN/user_filter.py below, if it is useful (as I could have made a mistake in it too).

Best regards,
Danilo

def remove_diag(diag):
    """keep all diagrams with a V->jj decay, where j is a final-state quark"""
    found_vjj = 0
    found_tchan = 0
    for vertex in diag['vertices']:
        if vertex.get('id') == 0: # special final vertex
             continue
        if len(vertex['legs']) != 3: # ignore 4-point vertices
            continue

        leg = vertex['legs'][2]
        if (abs(leg['id']) == 24 or abs(leg['id']) == 23):
            if leg.get('number') > 2:
                leg = vertex['legs'][0]
                if not(abs(leg['id']) < 6 and leg['state']):
                    continue
                leg = vertex['legs'][1]
                if not(abs(leg['id']) < 6 and leg['state']):
                    continue
                found_vjj += 1
        else:
            leg = vertex['legs'][-1]
            if leg.get('number') < 3:
                continue
            leg = vertex['legs'][-1]
            if not(abs(leg['id']) < 6 and leg['state']):
                continue
            i = 1
            if abs(vertex['legs'][i]['id']) == 24 or abs(vertex['legs'][i]['id']) == 23:
                i = 0
            leg = vertex['legs'][i]
            if not(abs(leg['id']) < 6 and leg['state']):
                continue
            found_vjj += 1
    order_ok = (diag['orders'].get('C3') == 0 and diag['orders'].get('C2V') == 0 and diag['orders'].get('CV') >= 2)
    accept = (found_vjj >= 1 and order_ok)
    return not accept

description: updated
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Danilo,

Can you attach your model?
This model is not our online database of model.
I have also tried with the SM model, but there, your script removes 100% of the diagram.

Cheers,

Olivier

Revision history for this message
Danilo Enoque Ferreira de Lima (daniloefl) wrote :

Hi Olivier,

as I am not entirely sure I can share this publicly, I have sent you the model in a private email.

Cheers,
Danilo

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Thanks,

Your fix is correct and I pushed it in the development version.

Thanks,

Olivier

Changed in mg5amcnlo:
status: New → Fix Committed
Revision history for this message
Danilo Enoque Ferreira de Lima (daniloefl) wrote :

Thank you, Olivier.

Changed in mg5amcnlo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.