Phriction HEPForge Herwig Tutorial Second run: Z production and jets at the LHC History Version 16 vs 17
Version 16 vs 17
Version 16 vs 17
Content Changes
Content Changes
This is the simulation of a `P + P -> Z + jet` production event at the LHC for 7 TeV center-of-mass energy, 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.
Please download the following input file and move it to your work directory:
Input file:
{F543471}
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/n36vm5xhxosaddw7xe4x/PHID-FILE-etk5vfa3ii64fngxon2w/LHC-Z_jet.in
```
Before running this event, let us take a look at the input file
```
less LHC-Z+jet.in
```
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
##################################################
## Model assumptions
# read Matchbox/StandardModelLike.in
# read Matchbox/DiagonalCKM.in
## Set the order of the couplings
# cd /Herwig/MatrixElements/Matchbox
# set Factory:OrderInAlphaS 1
# set Factory:OrderInAlphaEW 1
## Select the process
# do Factory:Process p p -> Z0 j
##################################################
## Matrix element library selection
##################################################
## 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
# read Matchbox/MadGraph-OpenLoops.in
```
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):
```
##################################################
# Pre-calculated ME for hadron-hadron collisions
##################################################
cd /Herwig/MatrixElements/
# Z+jet
insert SubProcess:MatrixElements[0] MEZJet
```
Now, we can run the Z+jet event using
```
Herwig read LHC-Z+jet.in
Herwig run LHC-Z+jet.run -N 10000
```
Now you are in a position to run your event correctly, using an external ME provider. This process may take several minutes to complete, based on the number of channels involved in the event. You can reduce the run time by changing the shower selection options:
```
##################################################
## 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
```
The "read Matchbox/MCatNLO-DefaultShower.in" option is chosen by default, activating an MC@NLO matched angular ordered parton shower. Please choose the "read Matchbox/MCatLO-DefaultShower.in" option, to speed up the process with the price of lowering the accuracy.
Now, you can try running the event again:
```
Herwig read LHC-Z+jet.in
```
You will see a message, informing you that the external ME provider is engaged and will create a parton level amplitude for you:
```
Initializing external amplitudes.
>>> Compiling MadGraph amplitudes. This may take some time -- please be patient.
>>> In case of problems see ./Herwig-scratch/Build/MadGraphAmplitudes/MG.log for details.
```
After the "read" command is completed, you can run the event by:
```
Herwig run LHC-dijet.run -N 10000
```
and plot the results by
```
rivet-mkhtml LHC-dijet.yoda
```
Now, rename the yoda file with
```
mv LHC-dijet.yoda LHC-dijet-AO.yoda
```
and then, switch from "read Matchbox/MCatLO-DefaultShower.in" to "read Matchbox/MCatLO-DipoleShower.in" for your shower option. This would change the default angular ordered parton shower to a dipole parton shower.
Now, rerun the event with
```
rm -rf Herwig-scratch
Herwig read LHC-dijet.in
Herwig run LHC-dijet.run -N 10000
mv LHC-dijet.yoda LHC-dijet-Dipole.yoda
rivet-mkhtml LHC-dijet-AO.yoda:AO-shower LHC-dijet-Dipole.yoda:Dipole-shower
```
The first line is to delete the remnants of your previous ME calculation, which was stored in the "Herwig-scratch" folder inside your work directory.
You can check out your result by
```
firefox rivet-plots/index.html
```
Switching things on and off
-------------------------------
At this point, we are going to modify our copy of the LHC-dijet.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 EventHandler:CascadeHandler NULL
```
2. [[ 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 dijet production event, "set Factory:ScaleChoice Scales/HTScale", is pre-selected here. You can choose other options and see the effect.
```
cd /Herwig/MatrixElements/Matchbox/
# set Factory:ScaleChoice Scales/FixedScale
# set Scales/FixedScale:FixedScale 91.1876*GeV
set Factory:ScaleChoice Scales/HTScale
# set Factory:ScaleChoice Scales/HTPrimeScale
# set Factory:ScaleChoice Scales/LeptonPairMassScale
# set Factory:ScaleChoice Scales/LeptonPairPtScale
# set Factory:ScaleChoice Scales/MaxJetPtScale
# set Factory:ScaleChoice Scales/SHatScale
# set Factory:ScaleChoice Scales/TopPairMassScale
# set Factory:ScaleChoice Scales/TopMTScale
```
3. [[ https://herwig.hepforge.org/tutorials/hardprocess/matchbox.html#cuts | Cuts ]]
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 documentation for more options
##################################################
cd /Herwig/Cuts/
## cuts on jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
insert JetCuts:JetRegions 1 SecondJet
# set /Herwig/Cuts/JetFinder:Variant Kt
# set /Herwig/Cuts/JetFinder:ConeRadius 0.4
# set /Herwig/Cuts/FirstJet:PtMin 20.*GeV
# do /Herwig/Cuts/FirstJet:YRange -5.0 5.0
```
This is the simulation of a `P + P -> Z + jet` production event at the LHC for 7 TeV center-of-mass energy, 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.
Please download the following input file and move it to your work directory:
Input file:
{F543471}
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/n36vm5xhxosaddw7xe4x/PHID-FILE-etk5vfa3ii64fngxon2w/LHC-Z_jet.in
```
Before running this event, let us take a look at the input file
```
less LHC-Z+jet.in
```
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
##################################################
## Model assumptions
# read Matchbox/StandardModelLike.in
# read Matchbox/DiagonalCKM.in
## Set the order of the couplings
# cd /Herwig/MatrixElements/Matchbox
# set Factory:OrderInAlphaS 1
# set Factory:OrderInAlphaEW 1
## Select the process
# do Factory:Process p p -> Z0 j
##################################################
## Matrix element library selection
##################################################
## 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
# read Matchbox/MadGraph-OpenLoops.in
```
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):
```
##################################################
# Pre-calculated ME for hadron-hadron collisions
##################################################
cd /Herwig/MatrixElements/
# Z+jet
insert SubProcess:MatrixElements[0] MEZJet
```
Now, we can run the Z+jet event using
```
Herwig read LHC-Z+jet.in
Herwig run LHC-Z+jet.run -N 10000
```
and plot the results by
```
rivet-mkhtml LHC-Z+jet.yoda
```
Please change the name of the produced yoda files
```
mv LHC-Z+jet.yoda Z+jet_MCNLO.yoda
```
and take a look at the parton shower selection section
```
##################################################
## 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
```
The "read Matchbox/MCatNLO-DefaultShower.in" option is chosen by default, activating an MC@NLO matched angular ordered parton shower. Please choose the "read Matchbox/MCatLO-DefaultShower.in" option, to choose the MC@LO and try running the event again:
```
Herwig read LHC-Z+jet.in
Herwig run LHC-Z+jet.run -N 10000
mv LHC-Z+jet.yoda Z+jet_MCLO.yoda
```
Repete 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
```
Switching things on and off
-------------------------------
At this point, we are going to modify our copy of the LHC-dijet.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 EventHandler:CascadeHandler NULL
```
2. [[ 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 dijet production event, "set Factory:ScaleChoice Scales/HTScale", is pre-selected here. You can choose other options and see the effect.
```
cd /Herwig/MatrixElements/Matchbox/
# set Factory:ScaleChoice Scales/FixedScale
# set Scales/FixedScale:FixedScale 91.1876*GeV
set Factory:ScaleChoice Scales/HTScale
# set Factory:ScaleChoice Scales/HTPrimeScale
# set Factory:ScaleChoice Scales/LeptonPairMassScale
# set Factory:ScaleChoice Scales/LeptonPairPtScale
# set Factory:ScaleChoice Scales/MaxJetPtScale
# set Factory:ScaleChoice Scales/SHatScale
# set Factory:ScaleChoice Scales/TopPairMassScale
# set Factory:ScaleChoice Scales/TopMTScale
```
3. [[ https://herwig.hepforge.org/tutorials/hardprocess/matchbox.html#cuts | Cuts ]]
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 documentation for more options
##################################################
cd /Herwig/Cuts/
## cuts on jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
insert JetCuts:JetRegions 1 SecondJet
# set /Herwig/Cuts/JetFinder:Variant Kt
# set /Herwig/Cuts/JetFinder:ConeRadius 0.4
# set /Herwig/Cuts/FirstJet:PtMin 20.*GeV
# do /Herwig/Cuts/FirstJet:YRange -5.0 5.0
```
This is the simulation of a `P + P -> Z + jet` production event at the LHC for 7 TeV center-of-mass energy, 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.
Please download the following input file and move it to your work directory:
Input file:
{F543471}
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/n36vm5xhxosaddw7xe4x/PHID-FILE-etk5vfa3ii64fngxon2w/LHC-Z_jet.in
```
Before running this event, let us take a look at the input file
```
less LHC-Z+jet.in
```
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
##################################################
## Model assumptions
# read Matchbox/StandardModelLike.in
# read Matchbox/DiagonalCKM.in
## Set the order of the couplings
# cd /Herwig/MatrixElements/Matchbox
# set Factory:OrderInAlphaS 1
# set Factory:OrderInAlphaEW 1
## Select the process
# do Factory:Process p p -> Z0 j
##################################################
## Matrix element library selection
##################################################
## 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
# read Matchbox/MadGraph-OpenLoops.in
```
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):
```
##################################################
# Pre-calculated ME for hadron-hadron collisions
##################################################
cd /Herwig/MatrixElements/
# Z+jet
insert SubProcess:MatrixElements[0] MEZJet
```
Now, we can run the Z+jet event using
```
Herwig read LHC-Z+jet.in
Herwig run LHC-Z+jet.run -N 10000
```
Now you are in a position to run your event correctly, using an external ME provider. This process may take several minutes to complete, based on the number of channels involved in the event. You can reduce the run time by changing the shower selection options:and plot the results by
```
rivet-mkhtml LHC-Z+jet.yoda
```
Please change the name of the produced yoda files
```
mv LHC-Z+jet.yoda Z+jet_MCNLO.yoda
```
and take a look at the parton shower selection section
```
##################################################
## 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
```
The "read Matchbox/MCatNLO-DefaultShower.in" option is chosen by default, activating an MC@NLO matched angular ordered parton shower. Please choose the "read Matchbox/MCatLO-DefaultShower.in" option, to speed up the process with the price of loweringto choose the accuracy.
Now, you canMC@LO and try running the event again:
```
Herwig read LHC-Z+jet.in
```
You will see a message, informing you that the external ME provider is engaged and will create a parton level amplitude for you:
```
Initializing external amplitudes.
>>> Compiling MadGraph amplitudes. This may take some time -- please be patient.
>>> In case of problems see ./Herwig-scratch/Build/MadGraphAmplitudes/MG.log for details.
```
After the "read" command is completed, you can run the event by:
```
Herwig run LHC-diHerwig run LHC-Z+jet.run -N 10000
```
and plot the results by
```
rivet-mkhtml LHC-dijetmv LHC-Z+jet.yoda Z+jet_MCLO.yoda
```
NowRepete this process again, this time with "read Matchbox/LO-NoShower.in" option and rename the yoda file withas
```
mv LHC-diZ+jet.yoda LHC-dijet-AOZ+jet_NOPS.yoda
```
and then, switch from "read Matchbox/MCatLO-DefaultShower.in" to "read Matchbox/MCatLO-DipoleShower.in" for your shower option.
At this point, This would change the default angular ordered parton shower to a dipoleyou are in the position of 3 separate Z+jet production events, each with different parton shower.
Now, settings. rerun the event withYou can compare your findings by plotting these yoda files altogether:
```
rm -rf Herwig-scratch
Herwig read LHC-dijet.in
Herwig run LHC-dijet.run -N 10000
mv LHC-dijet.yoda LHC-dijet-Dipole.yoda
rivet-mkhtml LHC-dijet-AO.yoda:AO-shower LHC-dijet-Dipole.yoda:Dipole-showerivet-mkhtml Z+jet_MCNLO.yoda:MC_NLO Z+jet_MCLO.yoda:MC_LO Z+jet_NOPS.yoda:NO_PS
```
The first line is to delete the remnants of your previous ME calculation, which was stored in the "Herwig-scratch" folder inside your work directory.
You canand check out your result by
```
firefox rivet-plots/index.html
```
Switching things on and off
-------------------------------
At this point, we are going to modify our copy of the LHC-dijet.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 EventHandler:CascadeHandler NULL
```
2. [[ 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 dijet production event, "set Factory:ScaleChoice Scales/HTScale", is pre-selected here. You can choose other options and see the effect.
```
cd /Herwig/MatrixElements/Matchbox/
# set Factory:ScaleChoice Scales/FixedScale
# set Scales/FixedScale:FixedScale 91.1876*GeV
set Factory:ScaleChoice Scales/HTScale
# set Factory:ScaleChoice Scales/HTPrimeScale
# set Factory:ScaleChoice Scales/LeptonPairMassScale
# set Factory:ScaleChoice Scales/LeptonPairPtScale
# set Factory:ScaleChoice Scales/MaxJetPtScale
# set Factory:ScaleChoice Scales/SHatScale
# set Factory:ScaleChoice Scales/TopPairMassScale
# set Factory:ScaleChoice Scales/TopMTScale
```
3. [[ https://herwig.hepforge.org/tutorials/hardprocess/matchbox.html#cuts | Cuts ]]
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 documentation for more options
##################################################
cd /Herwig/Cuts/
## cuts on jets
read Matchbox/DefaultPPJets.in
insert JetCuts:JetRegions 0 FirstJet
insert JetCuts:JetRegions 1 SecondJet
# set /Herwig/Cuts/JetFinder:Variant Kt
# set /Herwig/Cuts/JetFinder:ConeRadius 0.4
# set /Herwig/Cuts/FirstJet:PtMin 20.*GeV
# do /Herwig/Cuts/FirstJet:YRange -5.0 5.0
```