Setting up CMSSW environment with Sherpa v2.2.5,
OpenLoops v2.0b.
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsrel CMSSW_10_3_0
cd CMSSW_10_3_0/src
cmsenv
As for the next step, checkout the
SherpaInterface.
git cms-addpkg GeneratorInterface/SherpaInterface
Now get the needed run cards from the github
git clone https://github.com/sihyunjeon/SherpaTutorial.git
cd SherpaTutorial/ZtoEE_tutorial
In the directory, there are shell scripts, run cards, and rivet customisation file.
Let's create Sherpack with one of the run cards. In this tutorial session, we will only try to make LO samples with up to 1 jet in the matrix element level. Other samples would be provided from us.
mkdir python
mkdir test
cd test
cp ../data/*sh .
cp ../data/Run.dat_13TeV_ZtoEE_LO01j_OpenLoops .
run_MakeSherpaLibs.sh is the shell script containing needed options to make Sherpa libraries.
• -p : name of the process (in this tutorial, it would be "13TeV_ZtoEE_LO01j_OpenLoops")
• -o : this should be set to LBCR
• -m mpirun -M '-n [XXX]' : Sherpa supports mpi parallelisation, [XXX] is the number of cores that would be used (in this tutorial, we will use "8" cores)
./run_MakeSherpaLibs.sh 13TeV_ZtoEE_LO01j_OpenLoops
After
MakeSherpaLibs is finished, there would be tarball files created in the directory.
The tarball files contain information about run card, integration results, compiled libraries, multiple parton interaction. Also total cross section would be calculated like below :
+-----------------------------------------------------+
| |
| Total XS is 1804.62 pb +- ( 57.2028 pb = 3.16 % ) |
| |
+-----------------------------------------------------+
run_PrepareSherpaLibs.sh is the shell script to make Sherpack using prepared tarball ingredients.
The only option here is "-p" where name of the process should be put in.
./run_PrepareSherpaLibs.sh 13TeV_ZtoEE_LO01j_OpenLoops
Once the
PrepareSherpaLibs is finished, python fragment would be created. We will use cmsDriver.py to later run this fragment with cmsRun.
cp sherpa_13TeV_ZtoEE_LO01j_OpenLoops_MASTER_cff.py ../python/
We also need to compile rivet customisation file as well in order to create yoda files which would be used for plotting.
We will use Rivet-implemented code for Z->ee samples MC_ZINC_EL, MC_ZJETS_EL, ATLAS_2017_I1514251_EL.
Before compiling rivet_customisation file, rivet_customize_13TeV_ZtoEE.py's cross section is set to 1 as below :
process.rivetAnalyzer.CrossSection = cms.double(1.)
Change the cross section to the total cross section you obtained after
MakeSherpaLibs (in pb) to make fair comparison agains actual data (ATLAS_2017_I1514251_EL)
cp ../data/rivet_customize_13TeV_ZtoEE.py ../python/
cd ..
scram b -j 4
cd test
Now using the cmsDriver.py, we will create python file to generate events.
The option added in the end (--customise=SherpaTutorial/ZtoEE_tutorial) allows us to create yoda files which would be used to make plots with Rivet.
cmsDriver.py SherpaTutorial/ZtoEE_tutorial/python/sherpa_13TeV_ZtoEE_LO01j_OpenLoops_MASTER_cff.py -s GEN -n 100 --no_exec --conditions auto:mc --eventcontent RAWSIM --customise=SherpaTutorial/ZtoEE_tutorial/rivet_customize_13TeV_ZtoEE.py
cmsRun sherpa_13TeV_ZtoEE_LO01j_OpenLoops_MASTER_cff_py_GEN.py
After doing cmsRun, there would be a newly created an yoda file named sherpa_output.yoda.
Rivet codes do not work under CMSSW_10_3_0 (not sure why) so we will use different release, CMSSW_10_0_0.
cmsrel CMSSW_10_0_0
cd CMSSW_10_0_0/src
cmsenv
git-cms-init
git-cms-addpkg GeneratorInterface/RivetInterface
source GeneratorInterface/RivetInterface/test/rivetSetup.sh
mkdir test
cd test
Now bring your sherpa_output.yoda to current path and copy paste existing yoda files with different number of jets/order settings from /afs/cern.ch/work/s/shjeon/public/SherpaTutorial/yodafiles/
cp /afs/cern.ch/work/s/shjeon/public/SherpaTutorial/yodafiles/*yoda .
rivet-mkhtml --mc-errs sherpa_output.yoda ZtoEE_LO012jet.yoda ZtoEE_NLO01jet.yoda ZtoEE_NLO0LO12jet.yoda
The above command line would produce rivet-plots directory containing validation results using Rivet.