This is the simulation of a `P + P -> Z + jet` production event at the LHC for 7 TeV center-of-mass energyIn this section we will simulate the process 'P + P -> Z+X' at 7 TeV center-of-mass energy and
study the properties of the Z-boson with help of the [[https://rivet.hepforge.org/analyses/MC_ZINC.html | MC_ZINC ]] Rivet analysis.
There are different aspects of event generation, using the [[ https://rivet.hepforge.org/analyses/ATLAS_2011_I945498.html | ATLAS_2011_I945498 ]] and [[ https://rivet.hepforge.org/analyses/MC_ZINC.html | MC_ZINC ]] Rivet plugins for data analysis.each of which plays a crucial role in the correct simulation of Z-bosons at the LHC:
* Hard matrix element
* Parton Shower
* Initial and final state radiation
* Multi parton interactions
* Hadronizaion
During the course of this exercise we will see the different contributions to the Z shape observables, like the Z pT spectrum.
Please download the following input file and move it to your work directory:
Input file:
{F543489} todo
Alternatively, you can use the following command-line codes:
```
mkdir LHC-Z+jet
cd LHC-Z+jet
wget https://phab-files.hepforge.org/file/data/anlew6fe4akjsrh5hgyq/PHID-FILE-m6junuevaqpbly67nbaw/cd LHC-Z_jet.in
mv LHC-Z_jet.in LHC-Z+jet.in
```
Before running this event,
The input file can be used for Z production and Z+Jets production. For now, all parts except for the hard matrix element are commented out. let us take a look atWe will uncomment the necessary parts as we progress with the exercise.
Run the input file without any modifications
```
viHerwig read LHC-Z+jet.in
```
Herwig run LHC-Z.run -N 10000
As you can see, the process selection section has been completely deactivated. This is because for a process like `P + P -> Z + jet`, Herwig needs to use the external matrix element (ME) providers. However, the use of these tools in the docker/VM would be problematic. In an installed version of the Herwig, one can easily use these external ME providers by selecting the hard-process in the `Process selection` and choosing the ME providers from `Matrix element library selection`.
```
##################################################
## Process selection
##################################################It is recommended to change the name of the newly created .yoda file after every new run to something meaningful s.t. you don't have to repeat runs in the end when we compare the runs with each other.
## Model assumptions
# read Matchbox/StandardModelLike.in
# read Matchbox/DiagonalCKM.inFor example:
## Set the order of mv LHC-Z.yoda LHC-noShower.yoda
Now plot the couplingsresults with
```
# cd /Herwig/MatrixElements/Matchboxrivet-mkhtml LHC-noShower.yoda
# set Factory:OrderInAlphaS 1```
# set Factory:OrderInAlphaEW 1Have a look at the produced histograms and try to explain why there is no Z pT and why the Z pT in the peak region basically is just a delta function. You should also have a look at the .log file and understand the first few events.
## Select the processTo have a more realistic simulation of the Z-boson we are going to uncomment some sections in the input file and include the LO Parton shower without initial and final state radiation.
```
# do Factory:Process p p -> Z0 j
##################################################
## Matrix element library selection## ShowerHandler(s)
##################################################
## Select a generic tree/loop combination or a
## specialized NLO package
# read Matchbox/MadGraph-GoSam.in
# read Matchbox/MadGraph-MadGraph.in
# read Matchbox/MadGraph-NJet.in
# Initial and final state radiation
# read Matchbox/MadGraph-OpenLoops.inset /Herwig/Shower/ShowerHandler:DoFSR No
```set /Herwig/Shower/ShowerHandler:DoISR No
Fortunately, Herwig comes equipped with a set of Pre-calculated ME (you can see the complete list of these at Herwig_directory/share/Herwig/LHC.in):
```
cd /Herwig/EventHandlers
###################################################set EventHandler:CascadeHandler NULL
# Pre-calculated ME for hadron-hadron collisionset EventHandler:CascadeHandler:MPIHandler NULL # switches off multi parton interactions
set EventHandler:DecayHandler NULL # switches off particle decays
##################################################set EventHandler:HadronizationHandler NULL # switches off hadronization
cd /Herwig/MatrixElements/
# Z+jet
insert SubProcess:MatrixElements[0] MEZJet
```
Now,Now run Herwig again and compare your results with the first run. we can runWhy do the pT spectra change but the Z+jet event using
```
Herwig read LHC-Z+jet.inreconstructed mass of the Z boson looks roughly the same?
Herwig run LHC-Z+jet.run -N 10000Activate initial and final state radiation and repeat the run.
```
and plot the results by
```set /Herwig/Shower/ShowerHandler:DoFSR Yes
rivet-mkhtml LHC-Z+jet.yodaset /Herwig/Shower/ShowerHandler:DoISR Yes
```
Please change the name of the produced yoda files
```For the next task we are making a jump to a next-to-leading order parton shower
mv LHC-Z+jet.yoda Z+jet_MCNLO.yoda
```
and takeHave a look at the parton shower selection section from the input file
```
##################################################
## Matching and shower selection
##################################################
#read Matchbox/MCatNLO-DefaultShower.in
# read Matchbox/Powheg-DefaultShower.in
## use for strict LO/NLO comparisons
# read Matchbox/MCatLO-DefaultShower.in
## use for improved LO showering
# read Matchbox/LO-DefaultShower.in
# read Matchbox/MCatNLO-DipoleShower.in
# read Matchbox/Powheg-DipoleShower.in
## use for strict LO/NLO comparisons
# read Matchbox/MCatLO-DipoleShower.in
## use for improved LO showering
# read Matchbox/LO-DipoleShower.in
# read Matchbox/NLO-NoShower.in
# read Matchbox/LO-NoShower.in
```
TIn the input file we choose the "read Matchbox/MCatNLO-DefaultShower.in" option is chosen by default,ion activating an MC@NLO matchedLO angular ordered parton shower. PNow please choose the "read Matchbox/MCatNLO-DefaultShower.in" option, to choose the MC@LO and try runningNLO matched shower and run the event again:
```
Herwig read LHC-Z+jet.in.
Herwig run LHC-Z+jet.run -N 10000By now you should have a sheer amount of .yoda files created which you can compare with
mv LHC-Z+jet.yoda Z+jet_MCLO.yoda
```
Repeat this process again, this time with "read Matchbox/LO-NoShower.in" option and rename the yoda file as
```
mv LHC-Z+jet.yoda Z+jet_NOPS.yoda
```
At this point, you are in the position of 3 separate Z+jet production events, each with different parton shower settings. You can compare your findings by plotting these yoda files altogether:
```
rivet-mkhtml Z+jet_MCNLO.yoda:MC_NLO Z+jet_MCLO.yoda:MC_LO Z+jet_NOPS.yoda:NO_PS
```
and check out your result by
```
firefox rivet-plots/index.html
```
You can also compare your results with the official Herwig 7 results that can be found [[ https://herwig.hepforge.org/plots/herwig7.0/Rivet-LHC-EW/ATLAS_2011_I945498/index.html | here ]].
Switching things on and off
-------------------------------
At this point, we are going to modify our copy of the LHC-Z+jet.in input file and make a few more runs.
1. [[ https://herwig.hepforge.org/tutorials/gettingstarted/onoffthings.html | Shower handlers ]]
These commands control the major modules of the event generator. You can switch them on and off, rerun the event and observe the produced effects of the results.
```
##################################################
## ShowerHandler(s)
##################################################
cd /Herwig/EventHandlers
set EventHandler:CascadeHandler:MPIHandler NULL
# set EventHandler:DecayHandler NULL
# set EventHandler:HadronizationHandler NULL
set /Herwig/Shower/ShowerHandler:Interactions QCDandQED
```
- The Multy Particle Interaction (MPIHandler) is switched off by default. Turn it on and off, and run the event in each state and see what changes in the results.
- You can change the type of parton shoer by changing the value in
```
set /Herwig/Shower/ShowerHandler:Interactions QCDandQED
```
The options are `QCDandQED`, `QCD` and `QED`. Try to check out the difference they make in the event.rivet-mkhtml *.yoda
2.For the final task in this section activate multi parton interactions, [[ https://herwig.hepforge.org/tutorials/hardprocess/matchbox.html#scale-choices | Scale choices ]]
Your choice for the scale of the hard-process is made in this section. The primary option for a Z+jet production event, "the fixed scale option", is pre-selected here.decays and hadronization by uncommenting the relevant lines in the input file and compare the leading order partonshower with the next-to-leading order parton shower simulation.
By now you have finished all the obligatory parts of the Herwig tutorial.
You can choose to [[https://herwig.hepforge.org/tutorials/gettingstarted/matrixelements.html#some-scale-variations | dive deeper]] into parton shower variations, You can choose other options and/or change the value of the fixeplay around with different cuts and scale and see the effect.s
or continue with [[https://phab.hepforge.org/w/mcnet2019/thirdrun/ | Third run: minimum bias events and soft physics]] (recommended).
==A note on matrix elements==
As you can see, the process selection section has been completely deactivated. This is because for a process like `P + P -> Z + X`, Herwig needs to use the external matrix element (ME) providers. However, the use of these tools in the docker/VM would be problematic due to some linking issues. In an installed (and properly linked) version of Herwig, one can easily use these external ME providers by selecting the hard-process in the `Process selection` and choosing the ME providers from the `Matrix element library selection`.
```
##################################################
## Scale choice## Process selection
##################################################
cd /Herwig/MatrixElements/Matchbox/
## Fixed scale
set Factory:ScaleChoice Scales/FixedScale
set Scales/FixedScale:FixedScale 91.1876*GeV
## The transverse momenta of coloured particles
# set Factory:ScaleChoice Scales/HTScale
## The transverse momenta of all outgoing non-jet particles
# set Factory:ScaleChoice Scales/HTPrimeScale
## For processes involving a pair of final-state lept## Model assumptions
# set Factory:ScaleChoice Scales/LeptonPairMassScale
## The transverse component of the momentum of the lepton pair# read Matchbox/StandardModelLike.in
# set Factory:ScaleChoice Scales/LeptonPairPtScale# read Matchbox/DiagonalCKM.in
## The transverse momentum## Set the order of the hardest jetcouplings
# set Factory:ScaleChoice Scales/MaxJetPtScale
## The partonic centre-of-mass energy# cd /Herwig/MatrixElements/Matchbox
# set Factory:ScaleChoice Scales/SHatScale
## For processes involving the production of a t-tbar pairOrderInAlphaS 1
# set Factory:ScaleChoice Scales/TopPairMassScaleOrderInAlphaEW 1
## The transverse mass of## Select the t-tbar pair
# set Factory:ScaleChoice Scales/TopMTScale
```process
3. [[ https://herwig.hepforge.org/tutorials/hardp# do Factory:Process/matchbox.html#cuts | Cuts ]] p p -> Z0 j
You can impose any constraint that you want on your event. To find out the compete list of cuts and how to use them, see Herwig documentaion on [[ https://herwig.hepforge.org/tutorials/hardprocess/matchbox.html#cuts | cuts ]].
```
##################################################
## Cut selection
## See the docu## Matrix elementation for more op library selections
##################################################
cd /Herwig/Cuts/
## cuts on jets
# read Matchbox/DefaultPPJets.in
# insert JetCuts:JetRegions 0 FirstJet## Select a generic tree/loop combination or a
# insert JetCuts:JetRegions 1 SecondJet## specialized NLO package
# set /Herwig/Cuts/JetFinder:Variant Kt# read Matchbox/MadGraph-GoSam.in
# set /Herwig/Cuts/JetFinder:ConeRadius 0.4
# set /Herwig/Cuts/FirstJet:PtMin 20.*GeV# read Matchbox/MadGraph-MadGraph.in
# do /Herwig/Cuts/FirstJet:YRange -5.0 5.0# read Matchbox/MadGraph-NJet.in
# read Matchbox/MadGraph-OpenLoops.in
```