--
XuyangGao - 2019-11-20
Electron short exercise
We would introduce the measurements on the efficiency of trigger, HEEP ID with tag & probe method.
- Use tag & probe method to measure trigger efficiency for HEEP electron.
- Use tag & probe method to measure HEEP ID efficiency for GSF electron.
- Try to optimize each detailed cut of HEEP ID criteria according to N-1 efficiency.
Get object information from CMS dataset using IIHENtuple
You can skip this step next step if you have your own code to get object information from
CMS dataset.
The IIHENtuple code is a powerful framework developped by IIHE institute
Set up CMSSW area
cmsrel CMSSW_10_2_13
cd CMSSW_10_2_13/src
cmsenv
git cms-init
git cms-merge-topic cms-egamma:EgammaPostRecoTools
git cms-addpkg EgammaAnalysis/ElectronTools
rm EgammaAnalysis/ElectronTools/data -rf
git clone git@githubNOSPAMPLEASE.com:cms-data/egammaanalysis-electrontools.git EgammaAnalysis/ElectronTools/data
git cms-addpkg RecoMET/METFilters
git cms-merge-topic cms-met:METFixEE2017_949_v2_backport_to_102X
scram b -j 16
Clone IIHENtuple code
git clone git@githubNOSPAMPLEASE.com:rgoldouz/miniaod_iihe_2018.git -b Legacy_CMSSW_10_2_13 UserCode/IIHETree
scram b -j 16
Submit to crab3
Since there are more than 16K files in the whole 2018 datasets (run ABCD), It will take a very long time to run on all of them.
We thus have provided the output root files in:
link : zzzzzzzzzzzzzzzzz
You can use them for next step directly.
Tag & probe method
We would give a short introduction about the Tag and Probe method, we will use it in the following measurements on trigger efficiency and ID efficiency.
Produce preliminary tag & probe pair
First of all, we will produce a preliminary tag & probe pair, the "preliminary" means that the cut on tag and probe are not fully applied, because we would like to use these pairs as base of more than one measurements, so some other cuts will be added in related steps.
Here we loop each event and ask the following requirements for tag:
ET > 35 GeV
In barrel region
Pass HEEP ID
If there are more than one tags in the event, we will store all possible tag & probe pair.
Here we have provided a python script as an example.
python xxx.py
The output root file is also provided since this step will take a lot of time without queue:
path : xxxxxxxxxxxxxxxxxxxxxxxxx
Measure trigger efficiency:
We will measure single electron trigger efficiency for HEEP electron in this step.
First we will add some cuts based on preliminary T&P pairs:
tag must be matched with Ele35_WPTight trigger
T&P must be in [60, 120] GeV
These cuts can make sure that we are making unbias measurements on real electron.
Trigger efficiency = number of probe match with trigger final filter and pass HEEP ID / number of probe pass HEEP ID
We loop each pair of T&P, get the number of denominator and numerator, we can of course split the events into different bins to get trigger efficiency curve as functions of different values, such as eta, ET, phi, number of vertex et al.
Here is an example python script to draw the plot:
python xxx.py
For double electron trigger, such as
DoubleEle25 _MW, it is a bit more complicated, there are two legs in this trigger, one is L1 seeded leg, the other is unseeded leg. So if we want to measure efficiency, we need to add cuts:
tag must be matched with Ele35_WPTight trigger
tag must be matched with L1 filter of DoubleEle25
T&P must be in [60, 120] GeV
And as we know, each trigger has many filters, for example, L1, ET, ISO, ID, they are in linear, it means the object must pass the filters one by one. If we want to measure the efficiency of one of that filter, we can just change the cut on probe:
For example:
Trigger DoubleEle25 ID efficiency = #probe pass HEEP, match with unseeded ID filter / #probe pass HEEP, match with unseeded ET filter
Measure HEEP ID efficiency:
We will measure the HEEP ID efficiency for GSF electron in this step.
First we will add some cuts based on preliminary T&P pairs:
tag must be matched with Ele35_WPTight trigger
T&P must be in [70, 110] GeV
These cuts can make sure that we are making unbias measurements on real electron.
HEEP ID efficiency = #probe pass HEEP ID / #probe
Sometimes, we would like to do some more detailed study for each cut, then we can measure N-1 efficiency (N means all cut):
HEEP ID N-1 efficiency = #probe pass HEEP ID / #probe pass HEEP ID except for one cut