This tutorial contains a specific guide to
- Generate hard events using MadGraph5
- Hadronize using Pythia8
- Run fast simulation for FCC-hh (will be compatible for other collider) detector's response using Delphes
- Submit jobs with Slurm in SLAC S3DF computing environment to produce large number of events
I highly recommend to run this tutorial and all Monte_Carlo generation at S3DF iana /fs/ddn/sdf/group/atlas/d/$USER for large storage space.
First, clone this repo to hold everything
cd /fs/ddn/sdf/group/atlas/d/$USER
git clone https://github.com/Kenny-Jia/MG5_Pythia8_Delphes_tutorial Monte_Carlo
export workdir=$PWD
cd $workdir
If you are on either S3DF or lxplus, you should have access to cvmfs. We will use ROOT from there.
source /cvmfs/sft.cern.ch/lcg/views/LCG_105/x86_64-centos7-gcc11-opt/setup.sh
Download the Madgragh5 package from the official website
wget https://launchpad.net/mg5amcnlo/3.0/3.5.x/+download/MG5_aMC_v3.5.6.tar.gz
tar zxf MG5_aMC_v3.5.6.tar.gz
export mg5dir=$PWD/MG5_aMC_v3_5_6/
Open mg5_aMC
python $mg5dir/bin/mg5_aMC
Now let's install all kinds of package we need within MG5_aMC prompt. Be patient, they may take like 25 mins to finish.
install lhapdf6
install pythia8
install Delphes
exit
So far, this is only design for generating FCC-hh sample with pileup. But you can easily switch from the default to any detector card like what we need to do for FCC-hh here:
cp $mg5dir/Delphes/cards/FCC/FCChh_PileUp.tcl $mg5dir/Template/Common/Cards/delphes_card_default.dat
Assume you have successfully install everything, here the example is generating FCChh diHiggs production as an example.
source setup.sh
cd $datadir
python $mg5dir/bin/mg5_aMC $workdir/MG_script/example-MG5-pythia8-delphes.txt
Similarly, we use the example MG5 script card:
cd $workdir/Monte_Carlo
source setup.sh
sbatch $workdir/Monte_Carlo/submit_job.sh
You can check the progress with
squeue -u $USER
pip install readline
readline is optional but strongly recommended for interactive MadGraph usage. For any issues regarding this repo, please feel free to contact Kenny through email: [email protected]. I would be happy to help!