Difference: CMSDAS2018_GEN_Draft (2 vs. 3)

Revision 32018-08-03 - AndreasAlbert

Line: 1 to 1
 
META TOPICPARENT name="TWiki.WebPreferences"

Part 1: Using MadGraph to generate parton-level events

Line: 29 to 30
 

The cards we are interested in are located in this subfolder:

Added:
>
>
 
 
ls genproductions/bin/MadGraph5_aMCatNLO/cards/examples/wplustest_4f_LO/

Changed:
<
<
wplustest_4f_LO_run_card.dat

>
>
wplustest_4f_LO_run_card.dat

 wplustest_4f_LO_proc_card.dat

The proc_card file defines process to be generate (hence the name proc). Look at the syntax:

Changed:
<
<
generate p p > w+, w+ > l+ vl

>
>
generate p p > w+, w+ > l+ vl

 
Changed:
<
<
What does this statement mean? Refer to this MG tutorial for documentation on the syntax INSERTLINKHERE.
>
>
What does this statement mean? Refer to the MG5 documentation on the syntax .
 What modifications of this statement can you think of? What could we replace the "w+ > l+ vl" part with?

Setting up Madgraph

Line: 181 to 183
  What observations do you make? Are the two datasets consistent? What are the shapes of the lepton pT distributions? What is the shape of the pT distribution of the W system? Are these shapes physical?
Changed:
<
<
Feel free to experiment here and plot other quantities you find interesting. You can check a syntax reference here: INSERTLINKHERE.
>
>
Feel free to experiment here and plot other quantities you find interesting. You can refer to the user manual to learn about the syntax.
 

Part 2: Generating particle-level events

Line: 197 to 199
 

TASK 3: Parton showering

To generate physical collision events, the LHE files we have created need to be showered. Parton showering accounts for non-perturbative QCD effects with phenomenological models.

Changed:
<
<
The most used tool for parton showering in CMS is Pythia 8 (P8). While we could again run P8 completely on our own (you can download it from the P8 website INSERTLINKHERE, compile and run it on your laptop if you'd like), we are going to use the CMSSW GeneratorInterface in this exercise. Simply stated, CMSSW can act as a wrapper around various generators and chain their outputs together. This makes it quite easy to run large-scale production from a gridpack to the finished (Mini/Nano)AOD file.
>
>
The most used tool for parton showering in CMS is Pythia 8 (P8). While we could again run P8 completely on our own (you can download it from the P8 website, compile and run it on your laptop if you'd like), we are going to use the CMSSW GeneratorInterface in this exercise. Simply stated, CMSSW can act as a wrapper around various generators and chain their outputs together. This makes it quite easy to run large-scale production from a gridpack to the finished (Mini/Nano)AOD file.
 

Use cmsDriver to shower an existing LHE file

Line: 244 to 246
 Without opening the output file, can you already discern some differences with respect to the LHE input file?
Changed:
<
<

Inspecting the output

>
>

Inspecting the output

 Since the output files are now in EDM format, we cannot use a simple text editor to inspect the events. As a simple alternative, CMSSW contains the ParticleListDrawer module:


Line: 272 to 274
  As in the LHE-level case, look at the distributions and try to make sense of them. What are the differences compared to before?
Added:
>
>

Jet multiplicity merging

In the example case we have studied so far, parton radiation was modeled exclusively by P8. MG5 created a matrix element prediction for production of only a W boson on its own, and P8 then took care of adding radiated jets. Another approach is to generate the full matrix elements not only for the W final state, but also for W + 1 jet, W + 2 jet, ..., W + N jet final states. In this case, we will rely on P8 only to model jet multiplicities > N (and of course model the hadronization of outgoing partons).

Generating events

We have prepared an MG5 gridpack for a W+jet process, which you can find at this location:

PATH_TO_GRIDPACK="/afs/cern.ch/work/a/aalbert/public/2018-07-30_CMSDAS/wplustest_4f_012jet_LO_slc6_amd64_gcc481_CMSSW_7_1_30_tarball.tar.xz"

To understand what is going on inside a gridpack, it is a good idea to unpack it and look at the InputCards directory, as well as the gridpack_generation.log file:

mkdir unpack
cd unpack
tar xf ${PATH_TO_GRIDPACK}
ls -l gridpack_generation.log InputCards

Compare the input cards to the ones we used before. What is different, what stayed the same? What can you learn from the log file? How many subprocesses are produced? What is the cross section? How does all of this compare to the previous case?

Let's generate some events. Again, we are going to use cmsDriver, but now with a different fragment. Compare the fragment to the earlier one to see what is different now. Before running it, make sure that it has the correct gridpack path in it.

cp Hadronizer_TuneCP5_13TeV_MLM_5f_max2j_qCut20_LHE_pythia8_cff.py ${CONFIG_PATH}
cd ${CMSSW_BASE}/src
scram b;
cd -

cmsDriver.py CMSDAS/GEN/python/Hadronizer_TuneCP5_13TeV_MLM_5f_max2j_qCut20_LHE_pythia8_cff.py \
--mc \
--eventcontent RAWSIM,LHE \
--datatier GEN-SIM,LHE \
--conditions 93X_mc2017_realistic_v3 \
--beamspot Realistic25ns13TeVEarly2017Collision \
--step LHE,GEN \
--nThreads 1 \
--geometry DB:Extended \
--era Run2_2017  \
--fileout file:step0.root \
-n 1000

At the end of the run, CMSSW automatically runs the GenXSecAnalyzer, which is a simple tool to calculate the sample cross-section, check the distribution of weights and give other useful insights. In the case of jet matching, it also gives the matching efficiencies. What are the matching efficiencies for each subprocess? How does the cross-section after matching compare to the cross-section before matching?

If you want to generate merged samples, it is important to check that the merging performs well. Since we have artificially split the physical process into energy regimes above and below QCUT, we need to make sure that the transition between the two regimes is smooth. Optimally, it should be impossible to tell from the merged sample what value of QCUT we used. To test this, we consider the distribution of the differential jet rates (DJRs). The DJRs correspond to the kt separation of the final clustering step for a given jet multiplicity. E.g. if we keep clustering an event until it has exaclty 2 jets left, and these 2 jets have a kt separation of 20 GeV, then DJR(1->2) = 20 GeV. It is called "1->2" because as we decrease the cutoff scale from >20 GeV to <20 GeV, the event turns from a 1-jet into a 2-jet event.

In the genproductions repository, there is a macro that plots these quantities for a given EDM file:

root -l -b -q /path/to/genproductions/bin/MadGraph5_aMCatNLO/macros/plotdjr.C\(\"step0.root\",\"djr_qcut20.pdf\"\)

Look at the resulting PDF file and check out the distributions. The contributions with different numbers of matrix element partons should sum up to give a smooth distribution.

To save on computing time in this exercise, we have pre-generated samples with different values of QCUT. What do the DJR distributions look like for the different values of QCUT? Which one would you choose?

 -- AndreasAlbert - 2018-08-02
Added:
>
>
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback