Document for mctest
Introduction
This package tests MC generators by making plots of physics distributions from MCKineChunk. It can serve as a MC verification tool by overlaying plots from two MC samples to compare them.
Package structure
- mctest/src/
Mctest.cpp is the source code to define and fill histograms. conejet.cpp is the source code to make parton jets using PXCONE algorithm. The parton jets configurations are specified in Mctest.cpp - cone size = 0.5, pT > 10 GeV, excluding muons and neutrinos.
- mctest/tools/
ComparePlots.cpp is the source code to read plots from a ROOT file and draw them into a postscript file.
- mctest/rcp/
Mctest.rcp file specifies the pT cuts on electrons, muons, and light-partons. There are always two sets of plots of number of particles and pT distributions, one set before the cut and one set after the cut.
- mctest/script/
Some scripts to help users to submit batch jobs using SAM inputs.
How to run
- First run Mctest_x to obtain the root file.
Interactive running mode:
setup D0RunII xxx.xx.xx
d0setwa
addpkg -h mctest
gmake mctest.all
If using generator's output (MCevents.dat):
cd mctest/rcp/
ln -sf $SRT_PRIVATE_CONTEXT/bin/Linux2.4-GCC_3_4(...)/Mctest_x .
./Mctest_x -rcp framework.rcp -input_file (...your-)MCevents.dat
Or, if using TMB files:
./Mctest_x -rcp framework_TMB.rcp -input_file (...your-)tmb_file
Batch job mode using SAM input:
The above showed how to run the executable interactively. One can also submit jobs to batch system and use a SAM dataset definition as the input. For example, if you know a list of MC request IDs to process, you can put them into a file mctest/script/requests_tmb then do the following:
setup sam
setup d0tools
cd mctest/script/
./makedefs_tmb.py
./runjobs.sh
- Make plots from the output root file and save them into a postscript file.
cd (...your-)dir
ln -sf $SRT_PRIVATE_CONTEXT/bin/Linux2.4-GCC_3_4(...)/ComparePlots .
./ComparePlots mctest.root (optional)test.ps
This will make plots for one file mctest.root and save as test.ps .
./ComparePlots mctest.root mctest2.root (optional)test.ps
This will make overlaid plots for mctest.root (in black) and mctest2.root (in red).
Plots details
The following are the description for plots on each page of the postscript file:
- MC Particles
- Number of MC particles, Number of stable particles, pT of stable particles, eta of stable particles, phi of stable particles.
- Electrons
- Number of electrons (no cut), pT of electrons (no cut): for all electrons, without any cut. While all other plots are made with a pT cut specified in rcp file.
- Number of electrons (pT > ? GeV), pT of electrons (pT > ? GeV), eta of electrons, phi of electrons: pT cut specified in rcp file Mctest.rcp (the default cut value is pT > 0 GeV).
- abs(Parent ID) of electrons, abs(Parent ID) of electrons (overflows): PDG particle IDs of the parent of electron. Some of the usual PDG IDs are: tau (15), gamma (22), Z (23), W (24), pi_0 (111), charged pion (211), J/psi (443), and others can be found here.
- Muons (similar to electrons)
- Parton Jets
- Number of parton jets, pT of parton jets, pT of parton jets (semi-log scale): parton jets which may include electrons. Parton jets do not contain muons nor neutrinos, which do not interact within the Calorimeter.
- Number of parton jets (no electron), pT of parton jets (no electron), pT of parton jets (no electron, semi-log scale): these parton jets further exclude any electron in them.
- Parton Jets (continued)
- Eta of parton jets, phi of parton jets, mass of two leading parton jets, delta_phi of two leading parton jets: these plots are for parton jets which may contain electrons.
- Vertex
- Primary vertex x, primary vertex y, primary vertex z: the expected width for x, y, and z distributions can be found in d0_mcpp/rcp/mcvertex.rcp, which is 0.003 cm for x and y, and 25 cm for z.
- Event Information
- Parton x1, parton x2: PDF parameters x1, x2.
- Cross section vs. run number: each event is associated with a cross section number, but only the last event in every run has a more accurate value. This plot shows the last event's cross section vs. run number.
- Cross section of last event per run: this is the distribution of the cross section from the last event per run. If the plots are made by overlaying two ROOT files, then there will be two such plots, one for each ROOT file. If the number of entries is larger than 5, a Gaussian fit will be performed.
- Inst. lumi. of overlaid events: This is the only information not obtained from MCKineChunk. Two things to be noted: First, only TMB files made with p20.09.02 or later d0reco versions have the instantaneous luminosity information available. Second, it's different from the average luminosity which is the sum of all 36 ticks instantaneous luminosity, so the x-axis scale is about 36 times smaller than the average luminosity scale.
- Generated W Bosons
- Number of generated W bosons, pT of generated W bosons, pT of generated W bosons (semi-log scale), rapidity of generated W bosons, phi of generated W bosons, mass of generated W bosons.
- Generated Z Bosons (similar to W bosons)
- Generated t quarks
- Number of generated t quarks, pT of generated t quarks, rapidity of generated t quarks, phi of generated t quarks, mass of generated t quarks.
- Generated b quarks
- Number of generated b quarks, eta of generated b quarks, phi of generated b quarks, pT of generated b quarks: all distributions are for ALPGEN MC generated b quarks associated with W or Z boson, not for b quarks as in decay products.
- PT of generated leading b, pT of generated second b, pT of generated third b, pT of generated fourth b: b quarks are ordered in decending pT.
- Delta_R_min of b quarks: the minimum delta_R between any pair of b quarks.
- Generated c quarks (similar to b quarks)
- Generated light-partons
- Number of generated lp (no cut), pT of generated lp (no cut): for all generated light partons, without any cut. While all other plots are made with a pT cut specified in rcp file. A generated light parton is associated with W or Z boson production in ALPGEN MC, not from decay products. It can be gluon, u-quark, d-quark, s-quark, or massless c-quark.
- Number of generated lp (pT > ? GeV), pT of generated lp (pT > ? GeV), eta of generated light partons, phi of generated light partons: pT cut specified in rcp file Mctest.rcp (the default cut value is pT > 8 GeV).
- Generated light-partons (continued)
- PT of generated leading lp, pT of generated second lp, pT of generated third lp, pT of generated fourth lp, pT of generated fifth lp: light partons are ordered in decending pT.
- Delta_R_min of light partons: the minimum delta_R between any pair of light partons.
Last modified: