CMS 3D CMS Logo

regressionModifier_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 regressionModifier106XUL = cms.PSet(
4  modifierName = cms.string('EGRegressionModifierV3'),
5  rhoTag = cms.InputTag('fixedGridRhoFastjetAllTmp'),
6  useClosestToCentreSeedCrysDef = cms.bool(False),
7  maxRawEnergyForLowPtEBSigma = cms.double(-1),
8  maxRawEnergyForLowPtEESigma = cms.double(1200.),
9  eleRegs = cms.PSet(
10  ecalOnlyMean = cms.PSet(
11  rangeMinLowEt = cms.double(0.2),
12  rangeMaxLowEt = cms.double(2.0),
13  rangeMinHighEt = cms.double(-1.),
14  rangeMaxHighEt = cms.double(3.0),
15  forceHighEnergyTrainingIfSaturated = cms.bool(True),
16  lowEtHighEtBoundary = cms.double(999999.),
17  ebLowEtForestName = cms.string("electron_eb_ecalOnly_1To300_0p2To2_mean"),
18  ebHighEtForestName = cms.string("electron_eb_ECALonly"),
19  eeLowEtForestName = cms.string("electron_ee_ecalOnly_1To300_0p2To2_mean"),
20  eeHighEtForestName = cms.string("electron_ee_ECALonly"),
21  ),
22  ecalOnlySigma = cms.PSet(
23  rangeMinLowEt = cms.double(0.0002),
24  rangeMaxLowEt = cms.double(0.5),
25  rangeMinHighEt = cms.double(0.0002),
26  rangeMaxHighEt = cms.double(0.5),
27  forceHighEnergyTrainingIfSaturated = cms.bool(True),
28  lowEtHighEtBoundary = cms.double(999999.),
29  ebLowEtForestName = cms.string("electron_eb_ecalOnly_1To300_0p0002To0p5_sigma"),
30  ebHighEtForestName = cms.string("electron_eb_ECALonly_var"),
31  eeLowEtForestName = cms.string("electron_ee_ecalOnly_1To300_0p0002To0p5_sigma"),
32  eeHighEtForestName = cms.string("electron_ee_ECALonly_var"),
33  ),
34  epComb = cms.PSet(
35  ecalTrkRegressionConfig = cms.PSet(
36  rangeMinLowEt = cms.double(0.2),
37  rangeMaxLowEt = cms.double(2.0),
38  rangeMinHighEt = cms.double(0.2),
39  rangeMaxHighEt = cms.double(2.0),
40  lowEtHighEtBoundary = cms.double(999999.),
41  forceHighEnergyTrainingIfSaturated = cms.bool(False),
42  ebLowEtForestName = cms.string('electron_eb_ecalTrk_1To300_0p2To2_mean'),
43  ebHighEtForestName = cms.string('electron_eb_ecalTrk_1To300_0p2To2_mean'),
44  eeLowEtForestName = cms.string('electron_ee_ecalTrk_1To300_0p2To2_mean'),
45  eeHighEtForestName = cms.string('electron_ee_ecalTrk_1To300_0p2To2_mean'),
46  ),
47  ecalTrkRegressionUncertConfig = cms.PSet(
48  rangeMinLowEt = cms.double(0.0002),
49  rangeMaxLowEt = cms.double(0.5),
50  rangeMinHighEt = cms.double(0.0002),
51  rangeMaxHighEt = cms.double(0.5),
52  lowEtHighEtBoundary = cms.double(999999.),
53  forceHighEnergyTrainingIfSaturated = cms.bool(False),
54  ebLowEtForestName = cms.string('electron_eb_ecalTrk_1To300_0p0002To0p5_sigma'),
55  ebHighEtForestName = cms.string('electron_eb_ecalTrk_1To300_0p0002To0p5_sigma'),
56  eeLowEtForestName = cms.string('electron_ee_ecalTrk_1To300_0p0002To0p5_sigma'),
57  eeHighEtForestName = cms.string('electron_ee_ecalTrk_1To300_0p0002To0p5_sigma'),
58  ),
59  maxEcalEnergyForComb=cms.double(200.),
60  minEOverPForComb=cms.double(0.025),
61  maxEPDiffInSigmaForComb=cms.double(15.),
62  maxRelTrkMomErrForComb=cms.double(10.),
63  )
64  ),
65  phoRegs = cms.PSet(
66  ecalOnlyMean = cms.PSet(
67  rangeMinLowEt = cms.double(0.2),
68  rangeMaxLowEt = cms.double(2.0),
69  rangeMinHighEt = cms.double(-1.),
70  rangeMaxHighEt = cms.double(3.0),
71  forceHighEnergyTrainingIfSaturated = cms.bool(True),
72  lowEtHighEtBoundary = cms.double(999999.),
73  ebLowEtForestName = cms.string("photon_eb_ecalOnly_5To300_0p2To2_mean"),
74  ebHighEtForestName = cms.string("photon_eb_ECALonly"),
75  eeLowEtForestName = cms.string("photon_ee_ecalOnly_5To300_0p2To2_mean"),
76  eeHighEtForestName = cms.string("photon_ee_ECALonly"),
77  ),
78  ecalOnlySigma = cms.PSet(
79  rangeMinLowEt = cms.double(0.0002),
80  rangeMaxLowEt = cms.double(0.5),
81  rangeMinHighEt = cms.double(0.0002),
82  rangeMaxHighEt = cms.double(0.5),
83  forceHighEnergyTrainingIfSaturated = cms.bool(True),
84  lowEtHighEtBoundary = cms.double(999999.),
85  ebLowEtForestName = cms.string("photon_eb_ecalOnly_5To300_0p0002To0p5_sigma"),
86  ebHighEtForestName = cms.string("photon_eb_ECALonly_var"),
87  eeLowEtForestName = cms.string("photon_ee_ecalOnly_5To300_0p0002To0p5_sigma"),
88  eeHighEtForestName = cms.string("photon_ee_ECALonly_var"),
89  ),
90  )
91 )
92 
93 regressionModifier103XLowPtPho = cms.PSet(
94  modifierName = cms.string('EGRegressionModifierV3'),
95  rhoTag = cms.InputTag('fixedGridRhoFastjetAllTmp'),
96  useClosestToCentreSeedCrysDef = cms.bool(False),
97  maxRawEnergyForLowPtEBSigma = cms.double(-1),
98  maxRawEnergyForLowPtEESigma = cms.double(1200.),
99  eleRegs = cms.PSet(
100  ecalOnlyMean = cms.PSet(
101  rangeMinLowEt = cms.double(0.2),
102  rangeMaxLowEt = cms.double(2.0),
103  rangeMinHighEt = cms.double(-1.),
104  rangeMaxHighEt = cms.double(3.0),
105  forceHighEnergyTrainingIfSaturated = cms.bool(True),
106  lowEtHighEtBoundary = cms.double(999999.),
107  ebLowEtForestName = cms.string("electron_eb_ecalOnly_1To20_0p2To2_mean"),
108  ebHighEtForestName = cms.string("electron_eb_ECALonly"),
109  eeLowEtForestName = cms.string("electron_ee_ecalOnly_1To20_0p2To2_mean"),
110  eeHighEtForestName = cms.string("electron_ee_ECALonly"),
111  ),
112  ecalOnlySigma = cms.PSet(
113  rangeMinLowEt = cms.double(0.0002),
114  rangeMaxLowEt = cms.double(0.5),
115  rangeMinHighEt = cms.double(0.0002),
116  rangeMaxHighEt = cms.double(0.5),
117  forceHighEnergyTrainingIfSaturated = cms.bool(True),
118  lowEtHighEtBoundary = cms.double(999999.),
119  ebLowEtForestName = cms.string("electron_eb_ecalOnly_1To20_0p0002To0p5_sigma"),
120  ebHighEtForestName = cms.string("electron_eb_ECALonly_var"),
121  eeLowEtForestName = cms.string("electron_ee_ecalOnly_1To20_0p0002To0p5_sigma"),
122  eeHighEtForestName = cms.string("electron_ee_ECALonly_var"),
123  ),
124  epComb = cms.PSet(
125  ecalTrkRegressionConfig = cms.PSet(
126  rangeMinLowEt = cms.double(0.2),
127  rangeMaxLowEt = cms.double(2.0),
128  rangeMinHighEt = cms.double(0.2),
129  rangeMaxHighEt = cms.double(2.0),
130  lowEtHighEtBoundary = cms.double(999999.),
131  forceHighEnergyTrainingIfSaturated = cms.bool(False),
132  ebLowEtForestName = cms.string('electron_eb_ecalTrk_1To20_0p2To2_mean'),
133  ebHighEtForestName = cms.string('electron_eb_ecalTrk_1To20_0p2To2_mean'),
134  eeLowEtForestName = cms.string('electron_ee_ecalTrk_1To20_0p2To2_mean'),
135  eeHighEtForestName = cms.string('electron_ee_ecalTrk_1To20_0p2To2_mean'),
136  ),
137  ecalTrkRegressionUncertConfig = cms.PSet(
138  rangeMinLowEt = cms.double(0.0002),
139  rangeMaxLowEt = cms.double(0.5),
140  rangeMinHighEt = cms.double(0.0002),
141  rangeMaxHighEt = cms.double(0.5),
142  lowEtHighEtBoundary = cms.double(999999.),
143  forceHighEnergyTrainingIfSaturated = cms.bool(False),
144  ebLowEtForestName = cms.string('electron_eb_ecalTrk_1To20_0p0002To0p5_sigma'),
145  ebHighEtForestName = cms.string('electron_eb_ecalTrk_1To20_0p0002To0p5_sigma'),
146  eeLowEtForestName = cms.string('electron_ee_ecalTrk_1To20_0p0002To0p5_sigma'),
147  eeHighEtForestName = cms.string('electron_ee_ecalTrk_1To20_0p0002To0p5_sigma'),
148  ),
149  maxEcalEnergyForComb=cms.double(200.),
150  minEOverPForComb=cms.double(0.025),
151  maxEPDiffInSigmaForComb=cms.double(15.),
152  maxRelTrkMomErrForComb=cms.double(10.),
153  )
154  ),
155  phoRegs = cms.PSet(
156  ecalOnlyMean = cms.PSet(
157  rangeMinLowEt = cms.double(0.2),
158  rangeMaxLowEt = cms.double(2.0),
159  rangeMinHighEt = cms.double(-1.),
160  rangeMaxHighEt = cms.double(3.0),
161  forceHighEnergyTrainingIfSaturated = cms.bool(True),
162  lowEtHighEtBoundary = cms.double(999999.),
163  ebLowEtForestName = cms.string("photon_eb_ecalOnly_1To20_0p2To2_mean"),
164  ebHighEtForestName = cms.string("photon_eb_ECALonly"),
165  eeLowEtForestName = cms.string("photon_ee_ecalOnly_1To20_0p2To2_mean"),
166  eeHighEtForestName = cms.string("photon_ee_ECALonly"),
167  ),
168  ecalOnlySigma = cms.PSet(
169  rangeMinLowEt = cms.double(0.0002),
170  rangeMaxLowEt = cms.double(0.5),
171  rangeMinHighEt = cms.double(0.0002),
172  rangeMaxHighEt = cms.double(0.5),
173  forceHighEnergyTrainingIfSaturated = cms.bool(True),
174  lowEtHighEtBoundary = cms.double(999999.),
175  ebLowEtForestName = cms.string("photon_eb_ecalOnly_1To20_0p0002To0p5_sigma"),
176  ebHighEtForestName = cms.string("photon_eb_ECALonly_var"),
177  eeLowEtForestName = cms.string("photon_ee_ecalOnly_1To20_0p0002To0p5_sigma"),
178  eeHighEtForestName = cms.string("photon_ee_ECALonly_var"),
179  ),
180  )
181 )
182 
183 regressionModifier94X = \
184  cms.PSet( modifierName = cms.string('EGRegressionModifierV2'),
185 
186  rhoCollection = cms.InputTag('fixedGridRhoFastjetAllTmp'),
187 
188  electron_config = cms.PSet( # EB, EE
189  regressionKey = cms.vstring('electron_eb_ECALonly_lowpt', 'electron_eb_ECALonly', 'electron_ee_ECALonly_lowpt', 'electron_ee_ECALonly',
190  'electron_eb_ECALTRK_lowpt', 'electron_eb_ECALTRK', 'electron_ee_ECALTRK_lowpt', 'electron_ee_ECALTRK'),
191  uncertaintyKey = cms.vstring('electron_eb_ECALonly_lowpt_var', 'electron_eb_ECALonly_var', 'electron_ee_ECALonly_lowpt_var', 'electron_ee_ECALonly_var',
192  'electron_eb_ECALTRK_lowpt_var', 'electron_eb_ECALTRK_var', 'electron_ee_ECALTRK_lowpt_var', 'electron_ee_ECALTRK_var'),
193  ),
194 
195  photon_config = cms.PSet( # EB, EE
196  regressionKey = cms.vstring('photon_eb_ECALonly_lowpt', 'photon_eb_ECALonly', 'photon_ee_ECALonly_lowpt', 'photon_ee_ECALonly'),
197  uncertaintyKey = cms.vstring('photon_eb_ECALonly_lowpt_var', 'photon_eb_ECALonly_var', 'photon_ee_ECALonly_lowpt_var', 'photon_ee_ECALonly_var'),
198  ),
199 
200  lowEnergy_ECALonlyThr = cms.double(99999.),
201  lowEnergy_ECALTRKThr = cms.double(50.),
202  highEnergy_ECALTRKThr = cms.double(200.),
203  eOverP_ECALTRKThr = cms.double(0.025),
204  epDiffSig_ECALTRKThr = cms.double(15.),
205  epSig_ECALTRKThr = cms.double(10.),
206  forceHighEnergyEcalTrainingIfSaturated = cms.bool(True)
207 
208  )
209 
210 
211 regressionModifier80X = \
212  cms.PSet( modifierName = cms.string('EGRegressionModifierV1'),
213  autoDetectBunchSpacing = cms.bool(True),
214  applyExtraHighEnergyProtection = cms.bool(True),
215  bunchSpacingTag = cms.InputTag("bunchSpacingProducer"),
216  manualBunchSpacing = cms.int32(50),
217  rhoCollection = cms.InputTag("fixedGridRhoFastjetAll"),
218  vertexCollection = cms.InputTag("offlinePrimaryVertices"),
219  electron_config = cms.PSet( # EB, EE
220  regressionKey_25ns = cms.vstring('gedelectron_EBCorrection_25ns', 'gedelectron_EECorrection_25ns'),
221  uncertaintyKey_25ns = cms.vstring('gedelectron_EBUncertainty_25ns', 'gedelectron_EEUncertainty_25ns'),
222  combinationKey_25ns = cms.string('gedelectron_p4combination_25ns'),
223 
224  regressionKey_50ns = cms.vstring('gedelectron_EBCorrection_50ns', 'gedelectron_EECorrection_50ns'),
225  uncertaintyKey_50ns = cms.vstring('gedelectron_EBUncertainty_50ns', 'gedelectron_EEUncertainty_50ns'),
226  combinationKey_50ns = cms.string('gedelectron_p4combination_50ns'),
227  ),
228 
229  photon_config = cms.PSet( # EB, EE
230  regressionKey_25ns = cms.vstring('gedphoton_EBCorrection_25ns', 'gedphoton_EECorrection_25ns'),
231  uncertaintyKey_25ns = cms.vstring('gedphoton_EBUncertainty_25ns', 'gedphoton_EEUncertainty_25ns'),
232 
233  regressionKey_50ns = cms.vstring('gedphoton_EBCorrection_50ns', 'gedphoton_EECorrection_50ns'),
234  uncertaintyKey_50ns = cms.vstring('gedphoton_EBUncertainty_50ns', 'gedphoton_EEUncertainty_50ns'),
235  )
236  )
237 
238 #by default we use the regression inappropriate to the main purpose of this release
239 #life is simplier that way
240 regressionModifier = regressionModifier94X.clone()
241 
242 
243 from Configuration.Eras.Modifier_run2_egamma_2016_cff import run2_egamma_2016
244 from Configuration.Eras.Modifier_run2_egamma_2017_cff import run2_egamma_2017
245 from Configuration.Eras.Modifier_run2_egamma_2018_cff import run2_egamma_2018
246 
247 (run2_egamma_2016 | run2_egamma_2017 | run2_egamma_2018).toReplaceWith(regressionModifier,regressionModifier106XUL)
248 
249 from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
250 egamma_lowPt_exclusive.toReplaceWith(regressionModifier,regressionModifier103XLowPtPho)