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(_correctionFile2017Nov17),
13 recHitCollectionEB = cms.InputTag(
'reducedEcalRecHitsEB'),
14 recHitCollectionEE = cms.InputTag(
'reducedEcalRecHitsEE'),
15 produceCalibratedObjs = cms.bool(
True)
18 from Configuration.Eras.Modifier_run2_miniAOD_devel_cff
import run2_miniAOD_devel
20 from Configuration.Eras.Modifier_run2_egamma_2016_cff
import run2_egamma_2016
21 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff
import tracker_apv_vfp30_2016
22 (run2_miniAOD_devel & run2_egamma_2016 & tracker_apv_vfp30_2016).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016ULpreVFP)
23 (run2_miniAOD_devel & run2_egamma_2016 & ~tracker_apv_vfp30_2016).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016ULpostVFP)
25 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff
import run2_miniAOD_UL
27 from Configuration.Eras.Modifier_run2_egamma_2017_cff
import run2_egamma_2017
28 (run2_miniAOD_UL & run2_egamma_2017).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017UL)
30 from Configuration.Eras.Modifier_run2_egamma_2018_cff
import run2_egamma_2018
31 (run2_miniAOD_UL & run2_egamma_2018).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2018UL)
33 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
34 run2_miniAOD_80XLegacy.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016Legacy)
36 calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
37 recHitCollectionEB = cms.InputTag(
'reducedEgamma',
'reducedEBRecHits'),
38 recHitCollectionEE = cms.InputTag(
'reducedEgamma',
'reducedEERecHits')
41 ecalTrkCombinationRegression = cms.PSet(
42 ecalTrkRegressionConfig = cms.PSet(
43 rangeMinLowEt = cms.double(-1.),
44 rangeMaxLowEt = cms.double(3.0),
45 rangeMinHighEt = cms.double(-1.),
46 rangeMaxHighEt = cms.double(3.0),
47 lowEtHighEtBoundary = cms.double(50.),
48 forceHighEnergyTrainingIfSaturated = cms.bool(
False),
49 ebLowEtForestName = cms.string(
'electron_eb_ECALTRK_lowpt'),
50 ebHighEtForestName = cms.string(
'electron_eb_ECALTRK'),
51 eeLowEtForestName = cms.string(
'electron_ee_ECALTRK_lowpt'),
52 eeHighEtForestName = cms.string(
'electron_ee_ECALTRK')
54 ecalTrkRegressionUncertConfig = cms.PSet(
55 rangeMinLowEt = cms.double(0.0002),
56 rangeMaxLowEt = cms.double(0.5),
57 rangeMinHighEt = cms.double(0.0002),
58 rangeMaxHighEt = cms.double(0.5),
59 lowEtHighEtBoundary = cms.double(50.),
60 forceHighEnergyTrainingIfSaturated = cms.bool(
False),
61 ebLowEtForestName = cms.string(
'electron_eb_ECALTRK_lowpt_var'),
62 ebHighEtForestName = cms.string(
'electron_eb_ECALTRK_var'),
63 eeLowEtForestName = cms.string(
'electron_ee_ECALTRK_lowpt_var'),
64 eeHighEtForestName = cms.string(
'electron_ee_ECALTRK_var')
66 maxEcalEnergyForComb=cms.double(200.),
67 minEOverPForComb=cms.double(0.025),
68 maxEPDiffInSigmaForComb=cms.double(15.),
69 maxRelTrkMomErrForComb=cms.double(10.),
73 calibratedElectrons = cms.EDProducer(
"CalibratedElectronProducer",
74 calibratedEgammaSettings,
75 epCombConfig = ecalTrkCombinationRegression,
76 src = cms.InputTag(
'gedGsfElectrons'),
79 calibratedPatElectrons = cms.EDProducer(
"CalibratedPatElectronProducer",
80 calibratedEgammaPatSettings,
81 epCombConfig = ecalTrkCombinationRegression,
82 src = cms.InputTag(
'slimmedElectrons'),
85 calibratedPhotons = cms.EDProducer(
"CalibratedPhotonProducer",
86 calibratedEgammaSettings,
87 src = cms.InputTag(
'gedPhotons'),
89 calibratedPatPhotons = cms.EDProducer(
"CalibratedPatPhotonProducer",
90 calibratedEgammaPatSettings,
91 src = cms.InputTag(
'slimmedPhotons'),
95 return prefix+name[0].
upper()+name[1:]
def prefixName(prefix, name)