Matching/Merging Tutorialmatching in MadGraph+Pythia
Example: Simulation of pp→W with 0, 1, 2 jets
(comfortable on a laptop)mg5> generate p p > w+, w+ > l+ vl @0
mg5> add process p p > w+ j, w+ > l+ vl @1
mg5> add process p p > w+ j j, w+ > l+ vl @2
mg5> output
In run_card.dat:

Matching on…
1 = ickkw

No cone matching…
0 = ptj

kT matching scale…
15 = xqcut

Matching automatically done when run throughMadEvent and Pythia!
Merging scale can be de ned in PY8 card (or left auto)
Monte-Carlo Lecture: 2019fiMattelaer Olivier

156

matching in MadGraph+Pythia• By default, kT-MLM matching is run if xqcut > 0, with thematching scale QCUT = max(xqcut*1.4, xqcut+10)• For shower-kT, by default QCUT = xqcut• If you want to change the Pythia setting for matching scaleor switch to shower-kT matching:In pythia_card.dat:…
! This sets the matching scale, needs to be > xqcut
QCUT = 30! This switches from kT-MLM to shower-kT matching! Note that MSTP(81)>=20 needed (pT-ordered shower)
SHOWERKT = T
Mattelaer Olivier

Monte-Carlo Lecture: 2019157

How to do validate the matching• The matching scale (QCUT) should typically be chosenaround 1/6-1/2 x hard scale (so xqcut correspondingly lower)• The matched cross section (for X+0,1,... jets) should be close
to the unmatched cross section for the 0-jet sample(found on the process HTML page)• The differential jet rate plots should be smooth• When QCUT is varied (within the region of validity), thematched cross section or differential jet rates should not varysigni cantlyfi

Mattelaer Olivier

Monte-Carlo Lecture: 2019158

Differential Jet Rate Plot
• This are the clustering scales in the kt-jetclustering scheme• DJR1: pT of the last remaining jet• DJR2: The minimum between the pT of thesecond to last remaining jet and the kt between
the last two jet.
• Only radiative jet (not those from decay) should
enter those plot.

Mattelaer Olivier

Monte-Carlo Lecture: 2022

159

Matching Validation
W+jets production at the Tevatron for MadGraph+Pythia(kT-jet MLM scheme, q2-ordered Pythia showers)Qmatch = 10 GeV

Qmatch = 30 GeV

log(Differential jet rate for 1 → 2 radiated jets ~ pT(2nd jet))
Mattelaer Olivier

Monte-Carlo Lecture: 2019160

Matching Validation
W+jets production at the Tevatron for MadGraph+Pythia(kT-jet MLM scheme, q2-ordered Pythia showers)

Jet distributions smooth, and stable when we vary the matching scale!
Mattelaer Olivier

Monte-Carlo Lecture: 2022

161

Lecture Summary• Despite the apparent enormous complexity ofsimulation of complete collider events, nature has kindly
allowed us to factorize the simulation into separatesteps• The Monte Carlo method allows us to step-by-stepsimulate hard scattering, parton shower, particle
decays, hadronization, and underlying event• Jet matching between matrix elements and parton
showers gives crucial improvement of simulation of
background as well as signal processes• Running matching with MadGraph + Pythia is very easy,
but the results should always be checked forconsistency
Mattelaer Olivier

Monte-Carlo Lecture: 2019X

Tutorial:• Generate p p > t t~
• Add process p p > t t~ j
• Output; Launch

Ask for MadSpin and Pythia8 and MA5➡ set mpi OFF # This is for speed issue for the tuto
➡ decay t > w+ b, w+ > e+ ve➡ decay t~ > w- b~, w- > e- ve~➡ set xqcut 30 #minimal distance between quark/gluon @tree-level➡ set jetmatching:Qcut 60 #the MLM matching scale➡

• Check the plot
MadGraph Tutorial.

162

Tools 2017

Tutorial II:• Compute the cross-section (MLM merged)• For p p > w+ and p p > w+ j
• Compute the cross-section for various value of the merging scale• Check the plot in the various cases

MadGraph Tutorial.

163

Tools 2017

Validation of MLM
log10d01 []all jet samples
jet sample 0
jet sample 1-81010-10

MadGraph5_aMC@NLO

σ per bin [pb]10-910-1110-12(1) rel.unc.

10.5
0-0.5-1

Relative uncertainties w.r.t. central values
0.5

MadGraph Tutorial.

164

1

1.5

2

2.5

3Tools 2017

PT distribution
pt1 [GeV]
all jet samples
jet sample 0
jet sample 1-81010-10

MadGraph5_aMC@NLO

σ per bin [pb]10-910-1110-12(1) rel.unc.

10.5
0-0.5-1

Relative uncertainties w.r.t. central values
100MadGraph Tutorial.

200

300

400

500

165600

700

800

900

1000Tools 2017

Exercise VI: Matching+Merging
nomatching

w+0j

w+1jw+2j

w+3j

8,35E+04

1,58E+04

8,7E+03

3,5E+03

1GeV

10GeV

20GeV

50GeV

100GeV

500GeVw+0

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

0+1

1,07E+05

9,09E+04

8,91E+04

8,61E+04

8,40E+04

8.35+04

0+1+2

1,12E+05

9,29E+04

9,03E+04

8,66E+04

8,44E+04

8,35E+04

0+1+2+3 1,20E+05

9,47E+04

9,07E+04

8,68E+04

8,40E+04

8,35E+04

Slowlow ef ciency
fifi

MadGraph Tutorial.

Fast
High ef ciency
166Tools 2017

Exercise VI: Matching+Merging
w+0j

•w+1j

w+2j

w+3j

no8,35E+04 1,58E+04 8,7E+03
3,5E+03
matching
No effect of the matching for 0 jet sample.
1GeV

10GeV

20GeV

50GeV

100GeV

500GeVw+0

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

0+1

1,07E+05

9,09E+04

8,91E+04

8,61E+04

8,40E+04

8.35+04

0+1+2

1,12E+05

9,29E+04

9,03E+04

8,66E+04

8,44E+04

8,35E+04

0+1+2+3 1,20E+05

9,47E+04

9,07E+04

8,68E+04

8,40E+04

8,35E+04

MadGraph Tutorial.

167Tools 2017

Exercise VI: Matching+Merging
w+0j

•

w+1j

w+2j

w+3j

no8,35E+04 1,58E+04 8,7E+03
3,5E+03
matching
matching scale too high only the 0 jet sample

contributes => all radiations are from pythia
1GeV

10GeV

20GeV

50GeV

100GeV

500GeVw+0

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

0+1

1,07E+05

9,09E+04

8,91E+04

8,61E+04

8,40E+048.35+04

0+1+2

1,12E+05

9,29E+04

9,03E+04

8,66E+04

8,44E+04

8,35E+04

0+1+2+3 1,20E+05

9,47E+04

9,07E+04

8,68E+04

8,40E+04

8,35E+04

MadGraph Tutorial.

168Tools 2017

Exercise VI: Matching+Merging
w+0j

•

w+1j

w+2j

w+3j

no8,35E+04 1,58E+04 8,7E+03
3,5E+03
matching
matching scale too low. Only highest multiplicity

sample contributes and low ef ciency
1GeV

10GeV

20GeV

50GeV

100GeV

500GeVw+0

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

0+11,07E+05

9,09E+04

8,91E+04

8,61E+04

8,40E+04

8.35+04

0+1+2

1,12E+05

9,29E+04

9,03E+04

8,66E+04

8,44E+04

8,35E+04

0+1+2+3 1,20E+05

9,47E+04

9,07E+04

8,68E+04

8,40E+04

8,35E+04

169

Tools 2017fi

MadGraph Tutorial.

Exercise VI: Matching+Merging
w+0j

•

w+1j

w+2jw+3j

no8,35E+04 1,58E+04 8,7E+03
3,5E+03
matching
Wrong differential rate plot. so to discard.
1GeV

10GeV

20GeV

50GeV

100GeV

500GeVw+08,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

0+1

1,07E+05

9,09E+04

8,91E+04

8,61E+04

8,40E+04

8.35+04

0+1+2

1,12E+05

9,29E+04

9,03E+04

8,66E+04

8,44E+04

8,35E+04

0+1+2+3 1,20E+05

9,47E+04

9,07E+04

8,68E+04

8,40E+04

8,35E+04

MadGraph Tutorial.

170

Tools 2017

xqcut=1GeV

xqcut=100GeV

xqcut=20GeV
smooth transition

MadGraph Tutorial.

171

Tools 2017

Exercise VI: Matching+Merging
w+0j

w+1j

w+2j

w+3j

no8,35E+04 1,58E+04 8,7E+03
3,5E+03
matching
Relatively stable cross-section! Important check.

•the unmatched
1GeV to 10GeV
20GeV 0j cross-section
50GeV
100GeV• Close500GeVw+0

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

8,35E+04

0+1

1,07E+05

9,09E+04

8,91E+04

8,61E+04

8,40E+04

8.35+04

0+1+2

1,12E+05

9,29E+04

9,03E+04

8,66E+04

8,44E+04

8,35E+04

0+1+2+3 1,20E+05

9,47E+04

9,07E+04

8,68E+04

8,40E+04

8,35E+04

MadGraph Tutorial.

172

Tools 2017