CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
cutBasedPhotonID_PHYS14_PU20bx25_V2p1_cff.py
Go to the documentation of this file.
1 
2 from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry
3 
4 # Common functions and classes for ID definition are imported here:
6 
7 ## This is the same as V2 except for using the V3 photon ID
8 #
9 # This is the first version of PHYS14 cuts, optimized on PHYS14 samples.
10 #
11 # The ID cuts below are optimized IDs for PHYS14 Scenario PU 20, bx 25ns
12 # The cut values are taken from the twiki:
13 # https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedPhotonIdentificationRun2#PHYS14_selections_PU20_bunch_cro
14 # (where they may not stay, if a newer version of cuts becomes available for these
15 # conditions)
16 # See also the presentation explaining these working points (this will not change):
17 # https://indico.cern.ch/event/369225/contribution/1/material/slides/0.pdf
18 
19 #
20 # First, define cut values
21 #
22 
23 # Loose working point Barrel and Endcap
24 idName = "cutBasedPhotonID-PHYS14-PU20bx25-V2p1-standalone-loose"
25 WP_Loose_EB = WorkingPoint_V2(
26  idName , # idName
27  0.028 , # hOverECut
28  0.0107 , # full5x5_SigmaIEtaIEtaCut
29  # Isolation cuts are generally absIso < C1 + pt*C2, except for barrel NeuHad is < C1 + exp(pt*C2+C3)
30  2.67 , # absPFChaHadIsoWithEACut_C1
31  0 , # absPFChaHadIsoWithEACut_C2
32  7.23 , # absPFNeuHadIsoWithEACut_C1
33  0.0028 , # absPFNeuHadIsoWithEACut_C2
34  0.5408 , # absPFNeuHadIsoWithEACut_C3
35  2.11 , # absPFPhoIsoWithEACut_C1
36  0.0014 # absPFPhoIsoWithEACut_C2
37  )
38 
39 WP_Loose_EE = WorkingPoint_V1(
40  idName , #idName
41  0.093 , # hOverECut
42  0.0272 , # full5x5_SigmaIEtaIEtaCut
43  # Isolation cuts are generally absIso < C1 + pt*C2
44  1.79 , # absPFChaHadIsoWithEACut_C1
45  0.00 , # absPFChaHadIsoWithEACut_C2
46  8.89 , # absPFNeuHadIsoWithEACut_C1
47  0.01725 , # absPFNeuHadIsoWithEACut_C2
48  3.09 , # absPFPhoIsoWithEACut_C1
49  0.0091 # absPFPhoIsoWithEACut_C2
50  )
51 
52 # Medium working point Barrel and Endcap
53 idName = "cutBasedPhotonID-PHYS14-PU20bx25-V2p1-standalone-medium"
54 WP_Medium_EB = WorkingPoint_V2(
55  idName , # idName
56  0.012 , # hOverECut
57  0.0100 , # full5x5_SigmaIEtaIEtaCut
58  # Isolation cuts are generally absIso < C1 + pt*C2, except for barrel NeuHad is < C1 + exp(pt*C2+C3)
59  1.79 , # absPFChaHadIsoWithEACut_C1
60  0.00 , # absPFChaHadIsoWithEACut_C2
61  0.16 , # absPFNeuHadIsoWithEACut_C1
62  0.0028 , # absPFNeuHadIsoWithEACut_C2
63  0.5408 , # absPFNeuHadIsoWithEACut_C3
64  1.90 , # absPFPhoIsoWithEACut_C1
65  0.0014 # absPFPhoIsoWithEACut_C2
66  )
67 
68 WP_Medium_EE = WorkingPoint_V1(
69  idName , #idName
70  0.023 , # hOverECut
71  0.0267 , # full5x5_SigmaIEtaIEtaCut
72  # Isolation cuts are generally absIso < C1 + pt*C2
73  1.09 , # absPFChaHadIsoWithEACut_C1
74  0.00 , # absPFChaHadIsoWithEACut_C2
75  4.31 , # absPFNeuHadIsoWithEACut_C1
76  0.0172 , # absPFNeuHadIsoWithEACut_C2
77  1.90 , # absPFPhoIsoWithEACut_C1
78  0.0091 # absPFPhoIsoWithEACut_C2
79  )
80 
81 # Tight working point Barrel and Endcap
82 idName = "cutBasedPhotonID-PHYS14-PU20bx25-V2p1-standalone-tight"
83 WP_Tight_EB = WorkingPoint_V2(
84  idName , # idName
85  0.010 , # hOverECut
86  0.0100 , # full5x5_SigmaIEtaIEtaCut
87  # Isolation cuts are generally absIso < C1 + pt*C2, except for barrel NeuHad is < C1 + exp(pt*C2+C3)
88  1.66 , # absPFChaHadIsoWithEACut_C1
89  0.00 , # absPFChaHadIsoWithEACut_C2
90  0.14 , # absPFNeuHadIsoWithEACut_C1
91  0.0028 , # absPFNeuHadIsoWithEACut_C2
92  0.5408 , # absPFNeuHadIsoWithEACut_C3
93  1.40 , # absPFPhoIsoWithEACut_C1
94  0.0014 # absPFPhoIsoWithEACut_C2
95  )
96 
97 WP_Tight_EE = WorkingPoint_V1(
98  idName , #idName
99  0.015 , # hOverECut
100  0.0265 , # full5x5_SigmaIEtaIEtaCut
101  # Isolation cuts are generally absIso < C1 + pt*C2
102  1.04 , # absPFChaHadIsoWithEACut_C1
103  0.00 , # absPFChaHadIsoWithEACut_C2
104  3.89 , # absPFNeuHadIsoWithEACut_C1
105  0.0172 , # absPFNeuHadIsoWithEACut_C2
106  1.40 , # absPFPhoIsoWithEACut_C1
107  0.0091 # absPFPhoIsoWithEACut_C2
108  )
109 
110 
111 # Second, define where to find the precomputed isolations and what effective
112 # areas to use for pile-up correction
113 isoInputs = IsolationCutInputs(
114  # chHadIsolationMapName
115  'photonIDValueMapProducer:phoChargedIsolation' ,
116  # chHadIsolationEffAreas
117  "RecoEgamma/PhotonIdentification/data/PHYS14/effAreaPhotons_cone03_pfChargedHadrons_V2.txt" ,
118  # neuHadIsolationMapName
119  'photonIDValueMapProducer:phoNeutralHadronIsolation' ,
120  # neuHadIsolationEffAreas
121  "RecoEgamma/PhotonIdentification/data/PHYS14/effAreaPhotons_cone03_pfNeutralHadrons_V2.txt" ,
122  # phoIsolationMapName
123  "photonIDValueMapProducer:phoPhotonIsolation" ,
124  # phoIsolationEffAreas
125  "RecoEgamma/PhotonIdentification/data/PHYS14/effAreaPhotons_cone03_pfPhotons_V2.txt"
126 )
127 
128 #
129 # Finally, set up VID configuration for all cuts
130 #
131 cutBasedPhotonID_PHYS14_PU20bx25_V2p1_standalone_loose = configureVIDCutBasedPhoID_V3 ( WP_Loose_EB, WP_Loose_EE, isoInputs)
132 cutBasedPhotonID_PHYS14_PU20bx25_V2p1_standalone_medium = configureVIDCutBasedPhoID_V3 ( WP_Medium_EB, WP_Medium_EE, isoInputs)
133 cutBasedPhotonID_PHYS14_PU20bx25_V2p1_standalone_tight = configureVIDCutBasedPhoID_V3 ( WP_Tight_EB, WP_Tight_EE, isoInputs)
134 
135 #
136 # The MD5 sum numbers below reflect the exact set of cut variables
137 # and values above. If anything changes, one has to
138 # 1) comment out the lines below about the registry,
139 # 2) run "calculateMD5 <this file name> <one of the VID config names just above>
140 # 3) update the MD5 sum strings below and uncomment the lines again.
141 #
142 
143 central_id_registry.register(cutBasedPhotonID_PHYS14_PU20bx25_V2p1_standalone_loose.idName,
144  '88b068028aebbd139249cd3d82ed4693')
145 central_id_registry.register(cutBasedPhotonID_PHYS14_PU20bx25_V2p1_standalone_medium.idName,
146  '4c90f02adee9a99a6bb026c0c20c0894')
147 central_id_registry.register(cutBasedPhotonID_PHYS14_PU20bx25_V2p1_standalone_tight.idName,
148  '3a7ef3805194a788621aeecb70e66b21')
149 
150 #for now until we have a database...
151 cutBasedPhotonID_PHYS14_PU20bx25_V2p1_standalone_loose.isPOGApproved = cms.untracked.bool(True)
152 cutBasedPhotonID_PHYS14_PU20bx25_V2p1_standalone_medium.isPOGApproved = cms.untracked.bool(True)
153 cutBasedPhotonID_PHYS14_PU20bx25_V2p1_standalone_tight.isPOGApproved = cms.untracked.bool(True)