Skip to content

BonghoTae/EgammaAnalysis-TnPTreeProducer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EgammaAnalysis-TnPTreeProducer

Package of the EGamma group to produce Tag-and-Probe trees

Overview of branches

Branch release tnpEleIDs tnpPhoIDs tnpEleTrig tnpEleReco purpose
miniAOD miniAOD miniAOD AOD
RunIIfinal CMSSW_10_2 ✔️ ✔️ ✔️ ✔️ Run II analysis
RunIIfinal CMSSW_10_6 ✔️ ✔️ ✔️ ✔️ Run II analysis using ultra-legacy
CMSSW_11_X_Y CMSSW_11 ✔️ ✔️ ✔️ Development for Run III (experimental)
Run3_13X CMSSW_13 ✔️ ✔️ ✔️ Run3 2022/2023

Note: because of a dataformat CMSSW_10_6 can only be used for ultra-legacy samples, and CMSSW_10_2 should be used for the rereco samples.

Available tuples

ReReco 2016, 2017 and 2018

If you do not need changes to the default code, you can simply use existing flat tag and probe trees, avalaible for both 2016, 2017 and 2018 (RunIIfinal branch):

ls /eos/cms/store/group/phys_egamma/tnpTuples/tomc/2020-06-09/*/merged/

These inlcude the tnpEleTrig, tnpEleIDs and tnpPhoIDs trees produced with the RunIIfinal branch. Main change with respect to the 2020-02-28 production is the inclusion of some additional branches, e.g. the leptonMva's

ReReco 2016, 2017 and 2018 - L1 matched

In case you need L1 matching for the measurement of doubleEle HLT triggers, you can use the tnpEleTrig trees found in:

ls /eos/cms/store/group/phys_egamma/tnpTuples/tomc/2020-03-03/*/merged/*L1matched.root

UL2017 and UL2018

For ultra-legacy we have tnpEleTrig, tnpEleIDs and tnpPhoIDs trees available at:

ls /eos/cms/store/group/phys_egamma/tnpTuples/tomc/2020-05-20/UL2018/merged
ls /eos/cms/store/group/phys_egamma/tnpTuples/tomc/2020-05-20/UL2017/merged
ls /eos/cms/store/group/phys_egamma/tnpTuples/rasharma/2021-02-10/UL2016postVFP/merged
ls /eos/cms/store/group/phys_egamma/tnpTuples/rasharma/2021-02-10/UL2016preVFP/merged

To produce new tuples

1a. Install for rereco (CMSSW_10_2_X with X=10 or higher, works for 2016, 2017 and 2018 data/MC)

cmsrel CMSSW_10_2_22
cd CMSSW_10_2_22/src
cmsenv
git clone -b RunIIfinal [email protected]:cms-egamma/EgammaAnalysis-TnPTreeProducer.git EgammaAnalysis/TnPTreeProducer
scram b -j8

1b. Install for ultra-legacy (CMSSW_10_6_X, works for UL2017 and UL2018 data/MC)

cmsrel CMSSW_10_6_13
cd CMSSW_10_6_13/src
cmsenv
git clone -b RunIIfinal [email protected]:cms-egamma/EgammaAnalysis-TnPTreeProducer.git EgammaAnalysis/TnPTreeProducer
scram b -j8

1c. Install for Run3 (CMSSW_13_3_X, works for 2022 and 2023 data/MC)

cmsrel CMSSW_13_3_1
cd CMSSW_13_3_1/src
cmsenv
git clone -b Run3_13X [email protected]:cms-egamma/EgammaAnalysis-TnPTreeProducer.git EgammaAnalysis/TnPTreeProducer
scram b -j8

2. Try-out

You can find the cmsRun executable in EgammaAnalysis/TnPTreeProducer/python:

cd EgammaAnalysis/TnPTreeProducer/python/
cmsRun TnPTreeProducer_cfg.py isMC=True doTrigger=True era=UL2018

Check TnPTreeProducer_cfg.py for all available options. Update the code if you need to implement custom-made recipes.

Test files can be defined in python/etc/tnpInputTestFiles_cff.py If you update the code, you can use the ./runTests.py script in the test directory to check for new differences in the 2016, 2017 and 2018 test files.

3. Submit jobs

Check in EgammaAnalysis/TnPTreeProducer//crab the tnpCrabSubmit.py script to submit your jobs using crab

source /cvmfs/cms.cern.ch/common/crab-setup.sh

To make a pull request to this repository

  1. On github fork the package https://github.com/cms-analysis/EgammaAnalysis-TnPTreeProducer
  2. Add the remote
git remote add username-push [email protected]:username/EgammaAnalysis-TnPTreeProducer.git
  1. push commits to fork and then standard pull request process
git push username-push branchname

Adding new workingpoints

You can add new electron workingpoints in python/egmElectronIDModules_cff.py and new photon workingpoints in python/egmPhotonIDModules_cff.py. Each new workingpoint added in these python config fragments will add a new "passing" boolean in the electron and photon trees respectively. Of course, one can also choose to simply add a variable in python/egmTreesContent_cff.py, which might be preferred for MVA variables when you want to have the flexibility to explore different workingpoints: you can simply put a cut on these variable in the egm_tnp_analysis package.

Description of variables

Description of some of variables in the output tree is given here.

About

TnP package for EGM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 61.2%
  • C++ 38.8%