Version 21 vs 22
Version 21 vs 22
Edits
Edits
- Edit by sidsule, Version 22
- Thu, May 15 12:44 PM
- ·Overhaul of First Run Tutorial. Now it does Z production at the LHC (Leading Order). Start with just hard process, then add shower and hadronisation. Second Run is the NLO equivalent, so students will be able to compare their plots.
- Edit by aidin, Version 21
- May 30 2023 12:39 PM
« Previous Change | Next Change » |
Edit Older Version 21... | Edit Older Version 22... |
Content Changes
Content Changes
For the first run, we are going to simulate a LEP event with the default setup and look at the output files.
First, create a folder
mkdir herwig-tutorial
cd herwig-tutorial
and copy the input file LEP.in that you will find under {Herwigpath}/share/Herwig/ or here into that folder.
{F542999}
You can download the input file via
wget https://phab-files.hepforge.org/file/download/d3y555lituggiomcwatj/PHID-FILE-hirg3s3rz7xph4yuaij6/LEP.in
Have a look at the input file with the tool of your choice and try to understand what process is being simulated.
gedit LEP.in
vi LEP.in
less LEP.in
cat LEP.in
emacs LEP.in
Then execute the following commands in order to simulate 10000 LEP events:
Herwig read LEP.in
Herwig run LEP.run -N 10000
In the next step, have a look at the "LEP.log" file that displays the first 10 events of that run. Each event is made up of individual steps that reflect the treatment of the event as it passes through the various stages of the generator (hard subprocess, parton shower, hadronization and decays). Try to make sense of the numbers displayed and try to find the individual steps in the event record (the LEP.log file).
Looking at numbers is tedious. In order to make our life easier we now try to compare the simulation with data from the ALEPH experiment.
For that purpose, we need to modify the LEP.in input file and include the following part
cd /Herwig/Generators
read snippets/Rivet.in
insert /Herwig/Analysis/Rivet:Analyses 0 ALEPH_1996_S3486095
right above the line "saverun LEP EventGenerator".
Now we need to run Herwig again. The steps are the same as above but now we should have created a "LEP.yoda" file. A yoda file is a file created by [[ https://yoda.hepforge.org/ | YODA ]] which is a lightweight common system for MC event generator validation analyses, particularly as the core histogramming system in [[ https://rivet.hepforge.org/ | Rivet ]]. In order to plot this yoda file, we use the following command
rivet-mkhtml LEP.yoda
This creates a folder named "rivet-plots" that collects all the created histograms of the ALEPH analysis. You can display the analysis in your browser by opening the file.
rivet-plots/index.html
Have a look at the created histograms and try to roughly understand what is being measured.
Also, change the name of the **.yoda** file to **LEP-default.yoda** with
mv LEP.yoda LEP-default.yoda
# Switching off the Parton Shower
In the next step, we switch off the Parton Shower and compare the simulation to the one that includes the Parton Shower.
Add the following lines to the input file
cd /Herwig/EventHandlers
set EventHandler:CascadeHandler NULL
right below
set EventGenerator:EventHandler:LuminosityFunction:Energy 91.2
Then, run Herwig again with 10000 Events
Herwig read LEP.in
Herwig run LEP.run -N 10000
and plot the two yoda files together with
rivet-mkhtml LEP-default.yoda LEP.yoda
Now, have a look at the histograms. Why is the mean charged multiplicity larger without a Parton Shower?
Optional: You can also include more [[ https://rivet.hepforge.org/analyses/ | Rivet analyses ]].
# A First Herwig Run: Z Production at the LHC
In this tutorial, we will simulate the process //pp -> Z -> e+e-// at //root_s// = 13 TeV at the LHC. We will focus on the different components of the event generator - we will start by simulating the hard process and then include parton shower and hadronisation components. For this tutorial, you will need to download this file:
{F11286682}
## Step 1: Hard Process Generation
Look into the file `LHC.in`. This is where we specify the details of our simulation. For our case, we need to specify the following:
- This is a proton-proton collision
- We want //root_s// = 13000 GeV
- We want to generate Drell-Yan Z/gamma
- We just want e+ e- (no other pairs)
This is also the place to specify any cuts on the events we want to generate. To make things efficient, we can specify cuts of the combined mass of the electrons to be around the //Z// boson mass.
### Running Herwig
Simulating events in Herwig involves two steps:
```
Herwig read LHC.in # Will generate LHC.run, the run file
Herwig run LHC.run -N 10000 # Generates 10000 Events
```
This should output a few files. The first file of interest is the `LHC.log` file. Here, the details of the first few events are provided. The cross-section calculated from these simulated events is also provided at the end. Useful analyses of the event and the electron pair are done using Rivet, and stored as histograms in `LHC.yoda`. Plot these histograms using
```
rivet-mkhtml --mc-errs LHC.yoda
```
This will create histograms in a folder called `rivet-plots`. For now, focus on the `MC_ZINC` folder, which has observables for the //Z//.
(Careful - every time this folder is overwritten, you can specify a different folder name using `-o`)
### Monte Carlo and Convergence
Now try simulating 1, 10, 100, 100, 10000 and 10000 events. What happens to the cross-section and its uncertainty as you increase the number of events? Does this agree with what we talked about in the lectures?
(You should achieve results like [this GIF](https://gitlab.com/siddharthsule/evgen-diagrams/-/blob/main/z-production-convergence.gif?ref_type=heads))
## Step 2: The Parton Shower
You will notice in your plots that while the //Z// mass and rapidity show interesting distributions, the famously used //Z p_T// distribution is empty. This is because the quarks from our protons collide face-to-face. Gluon/Photon emissions from these quarks would offset their path, leading to the //Z// gaining transverse momentum. Similarly, the electron pair can emit photons, changing their trajectory.
Additionally, the emitted gluons can emit more gluons and decay into quark-antiquark pairs. This leads to a chain reaction/cascade, giving rise to jets.
### Parton Showers Choices
Let's stick to QCD for now - In `LHC.in`, you will find the options for two parton shower models:
- **The Angular Ordered Shower**: The default shower in Herwig. This shower orders emissions by the angle generated between the emitter and the emission.
- **The Dipole Shower**: The alternate shower. This model includes a third //spectator// parton, which is involved in maintaining colour flows and taking recoil from the emisssion.
Turn on one shower at a time and see what the //Z p_T// distribution looks like. You can now also have a look in the `MC_ZJETS` folder, which does jet clustering with the quarks and gluons in the system.
You can now start renaming `LHC.yoda` and store results of your different simulations. Multiple histograms can be plotted by the command
```
rivet-mkhtml --mc-errs LHC-Angular.yoda LHC-Dipole.yoda ...
```
What immediate differences do you notice from before? Do the two showers agree with each other, or differ? If so, discuss the differences with your peers and the tutorial hosts.
//Why is MPI off?// We want to study the effect of the parton shower in isolation in this step. Additionally, we have a complete tutorial on Soft QCD that covers MPI in detail, which you can do after.
## Step 3: Hadronisation
Due to confinement, all our quarks and gluons need to be converted into hadrons. While we don't have a full theory of this hadronisation process, we have models informed by the physical phenomena that we understand. There are two popular models of hadronisation used today, the string model and the cluster model.
In Herwig, use the cluster model. We start by forcing all gluons to split into quark antiquark pairs, as well as the remant of the proton into quarks and diquarks. These particles are paired up by their colour to form colourless pseudoparticles called clusters. These clusters then decay into unstable hadrons, which decay into stable ones. This model is based on the pre-confinement theory of quarks, and relies on the parton shower to provide it accurate momenta and colour.
### Turning on Hadronisation
Enable Hadronisation by uncommenting the lines. What differences do you see? How do the two showers behave with the hadronisation model? Which areas of the histograms are affected most?
## End of Tutorial
Now you know how to generate an LHC Event in Herwig! We looked at each event generator component's contributions to the simulated results. You can now proceed to the second tutorial.
**Next Steps**: There are two tutorials you may be interested in looking into
- Second Run: [NLO Processes, Matching and Merging](https://phab.hepforge.org/w/mcnet2019/secondrun/)
- Third Run: [MPI, Diffraction, Colour Reconnection](https://phab.hepforge.org/w/mcnet2019/thirdrun/)
For the f# A First run, we are going to simulate a LEP event with the default setup and lookHerwig Run: Z Production at the output files.LHC
FirstIn this tutorial, create a folder
mkdir herwig-tutorial
cd herwig-tutorialwe will simulate the process //pp -> Z -> e+e-// at //root_s// = 13 TeV at the LHC. We will focus on the different components of the event generator - we will start by simulating the hard process and then include parton shower and hadronisation components. For this tutorial, you will need to download this file:
and copy the input file LEP.in that you will find under {Herwigpath}/share/Herwig/ or here into that folder.
{F542999}{F11286682}
You can download the input file via
wget https://phab-files.hepforge.org/file/download/d3y555lituggiomcwatj/PHID-FILE-hirg3s3rz7xph4yuaij6/LEP.i## Step 1: Hard Process Generation
Have a look at the input file with the tool of your choice and try to understand what process is being simulated.Look into the file `LHC.in`. This is where we specify the details of our simulation. For our case, we need to specify the following:
gedit LEP.in
vi LEP.in- This is a proton-proton collision
less LEP.in- We want //root_s// = 13000 GeV
cat LEP.in- We want to generate Drell-Yan Z/gamma
emacs LEP.in- We just want e+ e- (no other pairs)
This is also the place to specify any cuts on the events we want to generate. To make things efficient, we can specify cuts of the combined mass of the electrons to be around the //Z// boson mass.
### Running Herwig
Then execute the followSimulating commandevents in order to simulate 10000 LEP events:Herwig involves two steps:
Herwig read LEP.in```
Herwig run LEP.run -N 10000Herwig read LHC.in # Will generate LHC.run, the run file
Herwig run LHC.run -N 10000 # Generates 10000 Events
```
This should output a few files. The first file of interest is the `LHC.log` file. Here, the details of the first few events are provided. The cross-section calculated from these simulated events is also provided at the end. Useful analyses of the event and the electron pair are done using Rivet, and stored as histograms in `LHC.yoda`. Plot these histograms using
In the next step, have a look at the "LEP.log" file that displays the first 10 events of that run. Each event is made up of individual steps that reflect the treatment of the event as it passes through the various stages of the generator (hard subprocess, parton shower, hadronization and decays). Try to make sense of the numbers displayed and try to find the individual steps in the event record (the LEP.log file).
Looking at numbers is tedious. In order to make our life easier we now try to compare the simulation with data from the ALEPH experiment.
For that purpose, we need to modify the LEP.in input file and include the following part
cd /Herwig/Generators```
read snippets/Rivet.inrivet-mkhtml --mc-errs LHC.yoda
insert /Herwig/Analysis/Rivet:Analyses 0 ALEPH_1996_S3486095```
right above the line "saverun LEP EventGenerator"This will create histograms in a folder called `rivet-plots`. For now, focus on the `MC_ZINC` folder, which has observables for the //Z//.
Now we need to run Herwig again. The steps are the same as above but now we should have created a "LEP.yoda" file. A yoda file is a file created by [[ https://yoda.hepforge.org/ | YODA ]] which is a lightweight common system for MC event generator validation analyses, particularly as the core histogramming system in [[ https://rivet.hepforge.org/ | Rivet ]]. In order to plot this yoda file(Careful - every time this folder is overwritten, we use theyou can specify a different following commandder name using `-o`)
rivet-mkhtml LEP.yoda### Monte Carlo and Convergence
This creates a folder named "rivet-plots" that collects all the created histograms of the ALEPH analysis.Now try simulating 1, 10, 100, 100, 10000 and 10000 events. What happens to the cross-section and its uncertainty as you increase the number of events? You can display the analysis in your browser by openingDoes this agree with what we talked about in the file.lectures?
rivet-plots/index.html
Have a look at the created histograms and try to roughly understand what is being measured.
Also, change the name of the **.yoda** file to **LEP-default.yoda** with(You should achieve results like [this GIF](https://gitlab.com/siddharthsule/evgen-diagrams/-/blob/main/z-production-convergence.gif?ref_type=heads))
mv LEP.yoda LEP-default.yoda## Step 2: The Parton Shower
# Switching off the Parton ShowerYou will notice in your plots that while the //Z// mass and rapidity show interesting distributions, the famously used //Z p_T// distribution is empty. This is because the quarks from our protons collide face-to-face. Gluon/Photon emissions from these quarks would offset their path, leading to the //Z// gaining transverse momentum. Similarly, the electron pair can emit photons, changing their trajectory.
In the next stepAdditionally, the emitted gluons can emit more gluons and decay into quark-antiquark pairs. This leads to a chain reaction/cascade, we switch off the Parton Shower and compare the simulation to the one that includes the Parton Showergiving rise to jets.
Add the following lines to the input file### Parton Showers Choices
cd /Herwig/EventHandlers
set EventHandler:CascadeHandler NULLLet's stick to QCD for now - In `LHC.in`, you will find the options for two parton shower models:
- **The Angular Ordered Shower**: The default shower in Herwig. This shower orders emissions by the angle generated between the emitter and the emission.
right below
set EventGenerator:EventHandler:LuminosityFunction:Energy 91.2- **The Dipole Shower**: The alternate shower. This model includes a third //spectator// parton, which is involved in maintaining colour flows and taking recoil from the emisssion.
Thenurn on one shower at a time and see what the //Z p_T// distribution looks like. You can now also have a look in the `MC_ZJETS` folder, run Herwig again with 10000 Eventswhich does jet clustering with the quarks and gluons in the system.
Herwig read LEP.inYou can now start renaming `LHC.yoda` and store results of your different simulations. Multiple histograms can be plotted by the command
```
rivet-mkhtml --mc-errs LHC-Angular.yoda LHC-Dipole.yoda ...
Herwig run LEP.run -N 10000```
What immediate differences do you notice from before? Do the two showers agree with each other, or differ? If so, discuss the differences with your peers and the tutorial hosts.
//Why is MPI off?// We want to study the effect of the parton shower in isolation in this step. Additionally, we have a complete tutorial on Soft QCD that covers MPI in detail, which you can do after.
## Step 3: Hadronisation
and plot the two yoda files together withDue to confinement, all our quarks and gluons need to be converted into hadrons. While we don't have a full theory of this hadronisation process, we have models informed by the physical phenomena that we understand. There are two popular models of hadronisation used today, the string model and the cluster model.
rivet-mkhtml LEP-default.yoda LEP.yodaIn Herwig, use the cluster model. We start by forcing all gluons to split into quark antiquark pairs, as well as the remant of the proton into quarks and diquarks. These particles are paired up by their colour to form colourless pseudoparticles called clusters. These clusters then decay into unstable hadrons, which decay into stable ones. This model is based on the pre-confinement theory of quarks, and relies on the parton shower to provide it accurate momenta and colour.
Now, have a look at the histograms. Why is the mean charged multiplicity larger without a Parton Shower?### Turning on Hadronisation
Optional: You can also include more [[ https://rivet.hepforge.org/analyses/ | Rivet analyses ]].Enable Hadronisation by uncommenting the lines. What differences do you see? How do the two showers behave with the hadronisation model? Which areas of the histograms are affected most?
## End of Tutorial
Now you know how to generate an LHC Event in Herwig! We looked at each event generator component's contributions to the simulated results. You can now proceed to the second tutorial.
**Next Steps**: There are two tutorials you may be interested in looking into
- Second Run: [NLO Processes, Matching and Merging](https://phab.hepforge.org/w/mcnet2019/secondrun/)
- Third Run: [MPI, Diffraction, Colour Reconnection](https://phab.hepforge.org/w/mcnet2019/thirdrun/)