CMS 3D CMS Logo

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