1 import FWCore.ParameterSet.Config
as cms
3 _correctionFile2016Legacy =
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Legacy2016_07Aug2017_FineEtaR9_v3_ele_unc" 4 _correctionFile2017Nov17 =
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_17Nov2017_v1_ele_unc" 5 _correctionFile2016ULpreVFP =
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain" 6 _correctionFile2016ULpostVFP =
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_postVFP_RunFineEtaR9Gain" 7 _correctionFile2017UL =
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_24Feb2020_runEtaR9Gain_v2" 8 _correctionFile2018UL =
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2018_29Sep2020_RunFineEtaR9Gain" 10 calibratedEgammaSettings = cms.PSet(minEtToCalibrate = cms.double(5.0),
11 semiDeterministic = cms.bool(
True),
12 correctionFile = cms.string(_correctionFile2017UL),
13 recHitCollectionEB = cms.InputTag(
'reducedEcalRecHitsEB'),
14 recHitCollectionEE = cms.InputTag(
'reducedEcalRecHitsEE'),
15 produceCalibratedObjs = cms.bool(
True)
17 from Configuration.Eras.Modifier_run2_egamma_2016_cff
import run2_egamma_2016
18 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff
import tracker_apv_vfp30_2016
19 (run2_egamma_2016 & tracker_apv_vfp30_2016).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016ULpreVFP)
20 (run2_egamma_2016 & ~tracker_apv_vfp30_2016).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016ULpostVFP)
23 from Configuration.Eras.Modifier_run2_egamma_2017_cff
import run2_egamma_2017
24 run2_egamma_2017.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017UL)
26 from Configuration.Eras.Modifier_run2_egamma_2018_cff
import run2_egamma_2018
27 run2_egamma_2018.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2018UL)
29 calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
30 recHitCollectionEB =
'reducedEgamma:reducedEBRecHits',
31 recHitCollectionEE =
'reducedEgamma:reducedEERecHits' 34 ecalTrkCombinationRegression = cms.PSet(
35 ecalTrkRegressionConfig = cms.PSet(
36 rangeMinLowEt = cms.double(-1.),
37 rangeMaxLowEt = cms.double(3.0),
38 rangeMinHighEt = cms.double(-1.),
39 rangeMaxHighEt = cms.double(3.0),
40 lowEtHighEtBoundary = cms.double(50.),
41 forceHighEnergyTrainingIfSaturated = cms.bool(
False),
42 ebLowEtForestName = cms.ESInputTag(
'',
'electron_eb_ECALTRK_lowpt'),
43 ebHighEtForestName = cms.ESInputTag(
'',
'electron_eb_ECALTRK'),
44 eeLowEtForestName = cms.ESInputTag(
'',
'electron_ee_ECALTRK_lowpt'),
45 eeHighEtForestName = cms.ESInputTag(
'',
'electron_ee_ECALTRK')
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(50.),
53 forceHighEnergyTrainingIfSaturated = cms.bool(
False),
54 ebLowEtForestName = cms.ESInputTag(
'',
'electron_eb_ECALTRK_lowpt_var'),
55 ebHighEtForestName = cms.ESInputTag(
'',
'electron_eb_ECALTRK_var'),
56 eeLowEtForestName = cms.ESInputTag(
'',
'electron_ee_ECALTRK_lowpt_var'),
57 eeHighEtForestName = cms.ESInputTag(
'',
'electron_ee_ECALTRK_var')
59 maxEcalEnergyForComb=cms.double(200.),
60 minEOverPForComb=cms.double(0.025),
61 maxEPDiffInSigmaForComb=cms.double(15.),
62 maxRelTrkMomErrForComb=cms.double(10.),
66 import RecoEgamma.EgammaTools.calibratedElectronProducer_cfi
as _mod_ele
67 import RecoEgamma.EgammaTools.calibratedPatElectronProducer_cfi
as _mod_patele
68 import RecoEgamma.EgammaTools.calibratedPhotonProducer_cfi
as _mod_pho
69 import RecoEgamma.EgammaTools.calibratedPatPhotonProducer_cfi
as _mod_patpho
71 calibratedElectrons = _mod_ele.calibratedElectronProducer.clone(
72 calibratedEgammaSettings,
73 epCombConfig = ecalTrkCombinationRegression,
74 src =
'gedGsfElectrons',
77 calibratedPatElectrons = _mod_patele.calibratedPatElectronProducer.clone(
78 calibratedEgammaPatSettings,
79 epCombConfig = ecalTrkCombinationRegression,
80 src =
'slimmedElectrons',
83 calibratedPhotons = _mod_pho.calibratedPhotonProducer.clone(
84 calibratedEgammaSettings,
88 calibratedPatPhotons = _mod_patpho.calibratedPatPhotonProducer.clone(
89 calibratedEgammaPatSettings,
90 src =
'slimmedPhotons',
94 return prefix+name[0].upper()+name[1:]
def prefixName(prefix, name)