HEP MC and Data Analysis Tutorial
Tutorial for the Particle Phisics Summer School at Udine University, July 2018 and July 2019.
Re-proposed as part of the classes "Particelle e Interazioni Fondamentali", Master Degree in Mathematics, University of Udine, April-May 2019.
References
Delphes
Tutorial
1. Entering:
- We will need it to connect to the remote machine (INFN Trieste computing farm) to run the simulation and the analysis code.
- Extract it and run it
- insert the following as "Find existing session or server name...":
pinamont@farmts.ts.infn.it
- at the top select "SSH" (first option)
- a password will be asked; insert:
Lilapause13
, then press ENTER
- click on YES when asked about saving password
- you should be redirected to this directory:
tutorial_udine_2018
- to check it type
pwd
and press the ENTER
key
- you should see
/gpfs/atlas/pinamont/tutorial_udine_2018
- Tips on MobaXTerm usage:
- you have a "terminal" and a "file manager" (on the left)
- terminal commands (unix / bash commands):
-
ls
list content of current directory
-
pwd
show current directory full path
-
cd myDirectory
enter the directory with given name
-
cd ..
go back by one directory
-
source myScript.sh
or ./myScript.sh
exectute the script / program myScript.sh
- file manager:
- double-click on a directory to enter it
- double-click on a text file to open it
- double click on the
..
to go back one directory
- to open images, double-click should work as well; if it doesn't, need to download them: use the right-click menu
- next time you open MobaXTerm, can restore session (i.e. don't need to copy-paste
pinamont@farmts.ts.infn.it
again and to type password, if saved before)
2. Setup:
- Only the first time you enter, type in your terminal (provided that you are in the
/gpfs/atlas/pinamont/tutorial_udine_2018
directorry):
./setup.sh yourname
- Whenever you come back with a fresh terminal, you just need to do:
cd yourname
source setup.sh
- Go and modify the file:
MG5_aMC_v2_3_3/input/mg5_configuration.txt
- in order to have this line:
text_editor = nano
- IMPORTANT: you also need to delete the "#" at the beginning of the line!
- Hint: use the text editor inside MobaXterm to modify the text file (from the left part of the screen), or you can use the
nano
text editor from the command line
- Hints on
nano
text editor usage:
- only keyboard, no mouse
- use arrows to navigate
- Ctrl+O to save (followed by ENTER if you really want to save)
- Ctrl+X to exit
- Now, we can enter the MG software and try it:
cd MG5_aMC_v2_3_3
./bin/mg5_aMC
- You are now inside the MG5 shell
- say "no" to question if asked for upgrade
- From inside MG5 type:
install pythia-pgs
install Delphes
3. Generate Signal:
- We will now generate simulated Higgs -> ZZ events
- From inside MG5 (if not yet in, type
./bin/mg5_aMC
from /gpfs/atlas/pinamont/tutorial_udine_2018/yourname/MG5_aMC_v2_3_3
), type:
import model heft
generate p p > h > l+ l- l+ l-
output h4lep
and then exit MG5, with "Ctrl+d"
- Now enter the directory that got created and run the generation of the events:
cd h4lep
./bin/generate_events
- When prompted switch ON Pythia and Delphes
- HINT: type "1" and ENTER, then "3" and ENTER, and then just ENTER
- Modify the run card to set CME = 8 TeV (energy per beam = 4 TeV)
- HINT: type "2" and ENTER to open the text file, then modify the proper lines from 6500 to 4000 (two of them!), then save the file (Ctrl+O) and exit (Ctrl+X)
- Make sure Higgs mass is set it to 125 GeV * HINT: same as above, but type "1" (in principle you don't need to modofy anything)
- Then go back to the
MG5_aMC_v2_3_3
directory:
cd ..
4. Generate Background:
- We will now generate simulated background events
- From inside MG5 (if not yet in, type
./bin/mg5_aMC
from /gpfs/atlas/pinamont/tutorial_udine_2018/yourname/MG5_aMC_v2_3_3
), type:
generate p p > l+ l- l+ l- /h
output zz4lep
and then exit MG5, with "Ctrl+d"
- Now enter the directory that got created and run the generation of the events:
cd zz4lep
./bin/generate_events
- When prompted switch ON Pythia and Delphes
- and modify the run card to set CME = 8 TeV (energy per beam = 4 TeV)
- Then go back to the
MG5_aMC_v2_3_3
directory:
cd ..
5. Create Histogram for data, signal and background:
- Now we will use ROOT to process the "real data" and the simulated samples we just produced
- ROOT "macros" are provided for you, so that you can use them without knowing how to program in C++, but it can be instructive to look inside them at some point!
- Go inside the Delphes directory (provided that you are under
/gpfs/atlas/pinamont/tutorial_udine_2018/yourname/MG5_aMC_v2_3_3
):
cd Delphes
- And now let's run these three command lines, that execute the ROOT macros to transform the three data-sets into histograms:
root -l -b -q '../../MyHiggs4l.C("../../data_events.root","data")'
root -l -b -q '../../MyHiggs4l.C("../h4lep/Events/run_01/tag_1_delphes_events.root","signal")'
root -l -b -q '../../MyHiggs4l.C("../zz4lep/Events/run_01/tag_1_delphes_events.root","background")'
- You can look at the results in the form of pictures showing the histograms by opening the .png files created after each step
6. Merge the histograms
- Another ROOT macro is ready for you to use, to merge the three histograms in a nice plot, showing signal + background compared to data
- type (provided that you are under
/gpfs/atlas/pinamont/tutorial_udine_2018/yourname/MG5_aMC_v2_3_3/Delphes
):
root -l -b -q '../../MyHistMerger.C'
- And now you can finally see your nide plot:
HiggsMass.png
(under /gpfs/atlas/pinamont/tutorial_udine_2018/yourname/
)
--Main.MichelePinamonti - 2019-07-23