-
Notifications
You must be signed in to change notification settings - Fork 4.4k
/
Copy pathcutBasedPhotonID_RunIIIWinter22_122X_V1_cff.py
177 lines (155 loc) · 7.47 KB
/
cutBasedPhotonID_RunIIIWinter22_122X_V1_cff.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry
import FWCore.ParameterSet.Config as cms
# Common functions and classes for ID definition are imported here:
from RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_tools \
import ( WorkingPoint_V3,
IsolationCutInputs,
ClusterIsolationCutInputs,
HoverECutInputs,
configureVIDCutBasedPhoID_V6 )
#
# Details of the ID values can be found in the following link
# https://indico.cern.ch/event/1204277/#5-update-on-run3-photon-cut-ba
#
#
# First, define cut values
#
# Loose working point Barrel and Endcap
idName = "cutBasedPhotonID-RunIIIWinter22-122X-V1-loose"
WP_Loose_EB = WorkingPoint_V3(
idName , # idName
0.011452 , # full5x5_SigmaIEtaIEtaCut
0.12999 , # hOverEWithEACut
# Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
1.8852 , # absPFChgHadIsoWithEACut_C1
0.0 , # absPFChgHadIsoWithEACut_C2
0.70379 , # absPFECalClusIsoWithEACut_C1
0.00065204 , # absPFECalClusIsoWithEACut_C2
6.3440 , # absPFHCalClusIsoWithEACut_C1
0.010055 , # absPFHCalClusIsoWithEACut_C2
0.00005783 # absPFHCalClusIsoWithEACut_C3
)
WP_Loose_EE = WorkingPoint_V3(
idName , # idName
0.027674 , # full5x5_SigmaIEtaIEtaCut
0.15343 , # hOverEWithEACut
# Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
1.6540 , # absPFChgHadIsoWithEACut_C1
0.0 , # absPFChgHadIsoWithEACut_C2
6.61585 , # absPFECalClusIsoWithEACut_C1
0.00019549 , # absPFECalClusIsoWithEACut_C2
1.8588 , # absPFHCalClusIsoWithEACut_C1
0.01170 , # absPFHCalClusIsoWithEACut_C2
0.00007476 # absPFHCalClusIsoWithEACut_C3
)
# Medium working point Barrel and Endcap
idName = "cutBasedPhotonID-RunIIIWinter22-122X-V1-medium"
WP_Medium_EB = WorkingPoint_V3(
idName , # idName
0.01001 , # full5x5_SigmaIEtaIEtaCut
0.058305 , # hOverEWithEACut
# Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0.93929 , # absPFChgHadIsoWithEACut_C1
0.0 , # absPFChgHadIsoWithEACut_C2
0.22770 , # absPFECalClusIsoWithEACut_C1
0.00065204 , # absPFECalClusIsoWithEACut_C2
2.1890 , # absPFHCalClusIsoWithEACut_C1
0.010055 , # absPFHCalClusIsoWithEACut_C2
0.00005783 # absPFHCalClusIsoWithEACut_C3
)
WP_Medium_EE = WorkingPoint_V3(
idName , #idName
0.02687 , # full5x5_SigmaIEtaIEtaCut
0.005181 , # hOverECutWithEA
# Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0.97029 , # absPFChgHadIsoWithEACut_C1
0.0 , # absPFChaHadIsoWithEACut_C2
1.124 , # absPFECalClusIsoWithEACut_C1
0.00019549 , # absPFECalClusIsoWithEACut_C2
0.033670 , # absPFHCalClusIsowithEACut_C1
0.01170 , # absPFHCalClusIsoWithEACut_C2
0.00007476 # absPFHCalClusIsoWithEACut_C3
)
# Tight working point Barrel and Endcap
idName = "cutBasedPhotonID-RunIIIWinter22-122X-V1-tight"
WP_Tight_EB = WorkingPoint_V3(
idName , # idName
0.009993 , # full5x5_SigmaIEtaIEtaCut
0.0417588 , # hOverECutWithEA
# Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0.31631 , # absPFChgHadIsoWithEACut_C1
0.0 , # absPFChgHadIsoWithEACut_C2
0.14189 , # absPFECalClusIsoWithEACut_C1
0.00065204 , # absPFECalClusIsoWithEACut_C2
0.39057 , # absPFHCalClusIsoWithEACut_C1
0.0100547 , # absPFHCalClusIsoWithEACut_C2
0.00005783 # absPFHCalClusIsoWithEACut_C3
)
WP_Tight_EE = WorkingPoint_V3(
idName , # idName
0.02687 , # full5x5_SigmaIEtaIEtaCut
0.0025426 , # hOverECutWithEA
# Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0.29266 , # absPFChgHadIsoWithEACut_C1
0.0 , # absPFChgHadIsoWithEACut_C2
1.04269 , # absPFECalClusIsoWithEACut_C1
0.00019549 , # absPFECalClusIsoWithEACut_C2
0.029262 , # absPFHCalClusIsowithEACut_C1
0.01170 , # absPFHCalClusIsoWithEACut_C2
0.00007476 # absPFHCalClusIsoWithEACut_C3
)
# Second, define where to find the precomputed isolations and what effective
# areas to use for pile-up correction
isoInputs = IsolationCutInputs(
# chHadIsolationMapName
'photonIDValueMapProducer:phoChargedIsolation' ,
# chHadIsolationEffAreas
"RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_ChgHadronIso_95percentBased.txt",
# neuHadIsolationMapName
'photonIDValueMapProducer:phoNeutralHadronIsolation' ,
# neuHadIsolationEffAreas
"RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_NeuHadronIso_95percentBased.txt" ,
# phoIsolationMapName
'photonIDValueMapProducer:phoPhotonIsolation' ,
# phoIsolationEffAreas
"RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_PhotonIso_95percentBased.txt"
)
clusterIsoInputs = ClusterIsolationCutInputs(
# trkIsolationMapName
'photonIDValueMapProducer:phoTrkIsolation' ,
# trkIsolationEffAreas
"RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_TrackerIso_95percentBased.txt",
# ecalClusIsolationMapName
'photonIDValueMapProducer:phoEcalPFClIsolation' ,
# ecalClusIsolationEffAreas
"RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_ECalClusterIso_95percentBased.txt",
# hcalClusIsolationMapName
'photonIDValueMapProducer:phoHcalPFClIsolation' ,
# hcalClusIsolationEffAreas
"RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_HCalClusterIso_95percentBased.txt"
)
hOverEInputs = HoverECutInputs(
# hOverEEffAreas
"RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_coneBasedHoverE_95percentBased.txt"
)
#
# Finally, set up VID configuration for all cuts
#
cutBasedPhotonID_RunIIIWinter22_122X_V1_loose = configureVIDCutBasedPhoID_V6 ( WP_Loose_EB, WP_Loose_EE, isoInputs, clusterIsoInputs, hOverEInputs)
cutBasedPhotonID_RunIIIWinter22_122X_V1_medium = configureVIDCutBasedPhoID_V6 ( WP_Medium_EB, WP_Medium_EE, isoInputs, clusterIsoInputs, hOverEInputs)
cutBasedPhotonID_RunIIIWinter22_122X_V1_tight = configureVIDCutBasedPhoID_V6 ( WP_Tight_EB, WP_Tight_EE, isoInputs, clusterIsoInputs, hOverEInputs)
## The MD5 sum numbers below reflect the exact set of cut variables
# and values above. If anything changes, one has to
# 1) comment out the lines below about the registry,
# 2) run "calculateIdMD5 <this file name> <one of the VID config names just above>
# 3) update the MD5 sum strings below and uncomment the lines again.
#
central_id_registry.register(cutBasedPhotonID_RunIIIWinter22_122X_V1_loose.idName,
'57d3fe8d9a1bff37aca5d13887138607233af1b5')
central_id_registry.register(cutBasedPhotonID_RunIIIWinter22_122X_V1_medium.idName,
'114b047ad28e2aae54869847420514d74f2540b8')
central_id_registry.register(cutBasedPhotonID_RunIIIWinter22_122X_V1_tight.idName,
'2e56bbbca90e9bc089e5a716412cc51f3de47cb3')
cutBasedPhotonID_RunIIIWinter22_122X_V1_loose.isPOGApproved = cms.untracked.bool(True)
cutBasedPhotonID_RunIIIWinter22_122X_V1_medium.isPOGApproved = cms.untracked.bool(True)
cutBasedPhotonID_RunIIIWinter22_122X_V1_tight.isPOGApproved = cms.untracked.bool(True)