How to Rtrk Double Ratios
Introduction
One way to asses systematic uncertainties of jet substructure variables is the Rtrk methodology. The following is a brief instruction for the steps necessary to produce double ratios that serve as input for the final estimate of these uncertainties.
Running over DxAODs
First Setup
Download the DeriveJMSR tool from git:
git clone ssh://git@gitlab.cern.ch:7999/amelzer/rtrk.git
Setup the newest release:
cd rtrk
setupATLAS
showVersions|grep AthAnalysisBase
lsetup 'rcsetup Base,2.4.19'
Compile everything:
rc find_packages
rc compile
Check that the
GRL
, the
PRW config files and the
lumicalc files
are available in the data directory
Now you can run the code:
doJMSUncertainties OutputFolderName ConfigFiles/basicSettings.config inputFile.list [mode] [gridOutputName]
OutputFolderName: all histograms and root files with trees will be saved here
data/basicSettings.config : configFile containing e.g. the jet collections you want to run over and other variables you might want to set
inputFile.list: list with input files to run over e.g. /pnfs/desy.de/atlas/dq2/atlaslocalgroupdisk/rucio/mc15_13TeV/d3/44/DAOD_JETM8.08623892._000001.pool.root.1
[mode]: default is "local", optional "grid"
[gridOutputName]: e.g. user.jdoe.my_run_p0001.root (see
naming convention
)
Available Variables
Moment |
xAOD Jet attribute names |
N-subjettiness |
Tau1 , Tau2 , Tau3 , Tau21 , Tau32 , Tau1_wta , Tau2_wta , Tau3_wta , Tau21_wta , Tau32_wta |
kT splitting scale |
Split12 , Split23 , Split34 |
zCut |
ZCut12 , ZCut23 , ZCut34 |
Dipolarity |
Dip12 , Dip13 , Dip23 , DipExcl12 |
Angularity |
Angularity |
kT Delta R |
KtDR |
kT Mass drop |
Mu12 |
Planar flow |
PlanarFlow |
Energy correlations |
ECF1 , ECF2 , ECF3 , C2 , D2 |
Thrust |
ThrustMin , ThrustMaj |
FoxWolfram |
FoxWolfram0 , FoxWolfram1 , FoxWolfram2 , FoxWolfram3 , FoxWolfram4 |
Sphericity |
Sphericity , Aplanarity |
Shower deconstruction |
ShowerDeconstructionW , ShowerDeconstructionTop |
In case you add other variables please do not use underscores.
Configuration
Parameter |
Explanation |
JetAlgos |
name of the calo jet container |
TrackJetAlgos |
name of the track jet container |
skipEvents |
Skips the first n events of a run. (only for debugging) |
configDataPath |
Directory where all PRW config files, lumicalc files and the GRL are. |
ghost-matching |
If false track jets and calo jets are matched with the dR criterion. |
dRCone |
The dR parameter that is used in case ghost-matching is set to false . |
prwConfig |
Prefix to identify PRW config files. |
CalibJetConfig |
Config file for jet calibration of jets that are evaluated. |
Jets |
Type of the evaluated jet. |
CalibSmallRConfig |
Config file for jet calibration of smallR jets that are used for cleaning only, since no jet cleaning was available for largeR jets at that time. |
This should produce several .root files with a TTree. The Tree holds all activated variables for the leading and the sub leading jet with 5 prefixes
c
,
t
,
tc1
,
tc2
and
tc3
.
These are refering to calo jet, track jet and the three variations that are applied to MC only.
tc1
covers track reconstruction efficiency (global, PP0 and IBL), efficiency for dense environment and impact parameter resolution ( including dead modules).
tc2
covers fake rate.
tc3
covers Sagita Bias.
Plotting
After you have retrieved your outputs. You will most likely need to merge it in order to have one .root file per sample and one for data.
In
!DeriveJMSR/
you should see
plotting/
containing:
atlasStyleMacro.py
,
atlasStyleMacro.pyc
,
functions.py
,
functions.pyc
,
HistoCreator.py
,
merge_jet1_jet2_doubleFiles.py
,
merge_jet1_jet2_inclusive.py
,
rTrack_plottingMaker.py
and =run_histo_creator.py=
run_histo_creator.py
calls
run_histo_creator.py
with the specified cuts. Usually you bin these double ratios in pT and m/pT. The binning in pT comes for free, while for each m/pT bin an additional output file is generated.
HistoCreator.py
produces for each variable a 2D histogram with the simple ratio X_Calo/X_Track. As well as some 1D histograms to check the continuity of the pT spectrum.
merge_jet1_jet2_inclusive.py
merges the output of
HistoCreator.py
for the leading and sub leading jet if you run inclusive in m/pT.
merge_jet1_jet2_inclusive.py
merges the output of
HistoCreator.py
for the leading and sub leading jet.
rTrack_plottingMaker.py
calculates the mean of the simple ratio per bin and produces the 1D histograms as control plots and the 2D maps, that are used as input for the calculation of uncertainties.
To run everything:
setupATLAS
lsetup root
python run_histo_creator.py
python merge_jet1_jet2_doubleFiles.py
python rTrack_plottingMaker.py
(run_histo_creator.py will take quite some time though.)
Settings
In
run_histo_creator.py
:
Choose if you like to run inclusive in m/pT or not.
In
HistoCreator.py
:
Normalization:
For the normalization (
sliceWeight_...
) you need to look up the cross section and the filter efficiency on
ami
.
The product is then divide by the total number of processed events for JZXW samles and the sum of weights of processed events for JZX samples.
*Types:*
To add another generator put it in
types=[]
. You need to add it as well in
QCD_weights={}
and in
files_dic={}
*Variables:*
In
variables=[]
you specify the axis of the 2D histograms separated by a colon. (y-axis:x-axis)
In
bin_dic={}
you specify the binning of these histograms (#bins x-axis, start, end, #bins y-axis, start, end)
These values are overwritten for histograms ending with
/1e3
with the binning defined in
binLowE
.
In
rTrack_plottingMaker.py
:
In filDic={} you specify the input. In m_pt_s={} you specify for which variables you would like produce maps.
With pt_mass_vectors_nBins={} you ensure that the binning is done right.
In variables=[] you specify the variables for which you would like to see the control plots.
Other dictionaries specify the layout and labeling of the plots.