* Tree-loop interference *

The new lorentz structures present in the higher dimensional operators of the 
SMEFT can mediate processes at tree-level that only arise at loop-level in the 
SM. The most well know example of these are the H^2 X^\mu\nu X_\mu\nu 
operators, with X being a SM gauge field strength tensor, which mediate several 
Higgs production processes via gluon fusion and/or Higgs decays into SM gauge 
bosons. The mixture of tree/loop level SMEFT contributions with loop-level SM 
diagrams makes extracting the EFT dependence of certain processes more involved 
than usual. The main reason for this is the MadGraph5_aMC@NLO (MG5) has a 
special running mode to compute loop-induced (LI) processes that is only 
launched when no tree-level diagrams are found. 

From now, we take the gluon-fusion production of Higgs+1 jet as an example, 
with the goal of obtaining the complete lowest-order SMEFT dependence of the 
(differential) cross section. 

>> generate p p > h j ...

The operator coefficient cpG induces this process 
at tree-level, while all other SM/SMEFT contributions come from the usual 
diagrams involving a top quark loop. We therefore have 3 types of contributions 
to the amplitude:

a) A(loop)_SM: LI SM 
b) A(loop)_EFT: LI SMEFT (cpd, cpDC, ctG, ctp, cG)
c) A(tree)_EFT: tree-level SMEFT (cpG)

From which we would like to extract the quadratic polynomial of the SMEFT 
dependence:

1) SM contributions: |A(loop)_SM|^2
2) linear loop EFT contributions: A(loop)_SM*A(loop)_EFT
3) linear tree EFT contributions: A(loop)_SM*A(tree)_EFT
4) quadratic loop EFT contributions: |A(loop)_EFT|^2
5) quadratic tree EFT contributions:|A(tree)_EFT|^2
6) quadratic tree-loop EFT contributions: A(loop)_EFT*A(tree)_EFT

Although there is a mixture of tree and loop-level contributions, they are all 
strictly speaking Leading Order (LO), since no contributions exist at a lower 
order for a given operator/the SM. One therefore should not use the full NLO 
capabilities of MG5 as these would generally include further, O(gs^2) 
corrections to the LO numbers. Therefore, a combination of tree-level and LI 
modes is needed to obtain the required numbers. 

Pure tree-level (5) and loop-level contributions (1, 2 & 4) can be obtained by 
running the respective LO and LI modes of MG5, as usual. 

As previously mentioned, in order to obtain the LI diagrams, MG5 must not find 
any tree-level ones. This can be achieved by restricting out the cpG 
coefficient. In this example, we will assume the existence of two restriction 
cards in the UFO:

restrict_with_cpg.dat
restrict_without_cpg.dat

with cpG set to non-zero and zero values, respectively.

Loading the first model and generating the default command, requesting some EFT 
contributions (NP=2) will generate only the tree-level cpG diagrams, and can be 
used to compute contribution 5).

>> import model SMEFTatNLO-with_cpg
>> generate p p > h j NP=2

Loading the second model will launch LI mode and generate the loop diagrams, 
since no tree-level contribution is now possible. This can be used to compute 
contributions 1, 2 & 4 (see different possible commands controlling the NP 
order below).

>> import model SMEFTatNLO-without_cpg
>> generate p p > h j NP=0 QCD=1 QED=1 [QCD] # 1) SM only
>> generate p p > h j NP=2 QCD=1 QED=1 [QCD] # 1) + 2) + 4) SM & EFT
>> generate p p > h j NP^2==2 QCD=1 QED=1 [QCD] # 2) EFT interference only
>> generate p p > h j NP^2==4 QCD=1 QED=1 [QCD] # 4) EFT squared only

Contributions 3) & 6) however, involve the interference of a tree & loop-level 
diagrams, which is not possible "out of the box" using MG5. The best known 
method to extract these numbers is via the reweighting feature of 
MG5 (https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Reweight). First, a 
single (somewhat arbitrary) baseline sample is generated and new weights are 
computed for each event corresponding to a matrix-element according to a 
user-specified MG5 generation command. The process is steered by the 
reweight_card.dat file in the Cards/ directory. I this example, we will 
generate a baseline sample with cpG=1 as it is the fastest to generate. 
For the baseline sample, we proceed as above & generate some events:

>> import model SMEFTatNLO-with_cpg
>> generate p p > h j NP=2
>> output hj_reweight_tutorial
>> launch hj_reweight

Then depending on the desired contribution, the reweight_card.dat can be 
modified as follows:

Contribution 3), SM loop x cpG interference:
# specify new matrix element command 
>> change process p p > h j NP=2 QCD=1 QED=1 QCD^2==4 NP^2==2 [virt=QCD]  # SM x cphiG
# launch reweighting
>> launch --rwgt_name=SMxcpG
# set parameters
>> set cpG 1. # set relevant operator to 1
>> set ctp 0. # set other operators to 0
>> set ctG 0.
...

In the change process command, note the very specific coupling order 
specifications that select the tree-level SMEFT and loop-level SM as well as 
the the [virt = QCD], which forces only the finite part of loops to be 
computed. The events can then be reweighted by launching bin/madevent and 
running the command

>> reweight hj_reweight

Contribution 6), EFT loop x cpG interference:
>> change process p p > h j NP=2 QCD=1 QED=1 QCD^2==4 NP^2==4 [virt=QCD] # EFT x cphiG including square

# compute one quadratic EFT tree-loop interference contribution
>> launch --rwgt_name=cpGxctG
>> set cpG 1. # set first relevant operator to 1
>> set ctG 1. # set second relevant operator to 1
>> set ctp 0. # set other operators to 0
... 

# compute another
>> launch --rwgt_name=cpGxctp
>> set cpG 1. # set first relevant operator to 1
>> set ctp 1. # set second relevant operator to 1
>> set ctG 0. # set other operators to 0
... 

This particular matrix element command unavoidably includes quadratic 
contributions from cpG that you don’t want. These must be removed a posteriori 
by generating an additional reweighting with cpG = 1 and all others = 0. The 
weight computed here must be subtracted from all other weights in this run to 
to extract the pure interference between cpG and other coefficients.

# compute pure cpG weight to subtract from all others
>> launch --rwgt_name=cpG_SUB
>> set cpG 1. # set cpG to 1
>> set ctp 0. # set all others to zero
... 

Tips & comments:
0) Always specify coupling orders as much as possible & use "display diagrams" 
to verify that MG5 has produced the expected output!

1) Reweighting has a well known limitation that the phase-space population of 
the event sample is tied to the baseline run. A judicious choice can be made to 
avoid reweighting to parameter points that populate significantly different 
regions, to avoid inducing large MC uncertainties from a large spread of 
weights in the reweighted sample. Using a tree-level cpG baseline, for example, 
may not be ideal for certain processes such as p p > h h as the cross section 
falls to zero around the threshold much faster than the SM prediction.

2) Each 'change X' command can only be used once in the reweight_card.dat. If 
multiple such commands are needed, they must be split into separate reweighting 
runs.

3) In principle, reweighting can be used to evaluate all components of the 
quadratic polynomial EFT dependence. In order to obtain the pure loop 
contributions, one should additionally specify:

>> change model restrict_without_cpg
>> change process p p > h j ...

to swap to the model without cpG and only generate the LI contributions by 
default. The commands for computing contributions  1), 2) & 4) can then be used 
as shown above (bear in mind point 2)).

4) In principle, this procedure can be combined with jet merging algorithms to 
obtain samples with different jet multiplicities. However, we have not testing 
this feature and therefore cannot provide explicit support.

5) Other reweight command examples for extracting SM x cpG interferences:
Higgs + 0j:
>> change process p p > h  NP=2 QCD=0 QED=1 QCD^2==2 NP^2==2 [virt=QCD]
Higgs + 2j
>> change process p p > h j j NP=2 QCD=2 QED=1 QCD^2==6 NP^2==2 [virt=QCD]
di-Higgs
>> change process p p > h h NP=2 QCD=0 QED=2 QCD^2==2 NP^2==2 [virt=QCD]