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 _correctionFile2017UL =
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_24Feb2020_runEtaR9Gain_v2" 7 calibratedEgammaSettings = cms.PSet(minEtToCalibrate = cms.double(5.0),
8 semiDeterministic = cms.bool(
True),
9 correctionFile = cms.string(_correctionFile2017Nov17),
10 recHitCollectionEB = cms.InputTag(
'reducedEcalRecHitsEB'),
11 recHitCollectionEE = cms.InputTag(
'reducedEcalRecHitsEE'),
12 produceCalibratedObjs = cms.bool(
True)
14 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
15 run2_miniAOD_80XLegacy.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016Legacy)
17 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff
import run2_miniAOD_UL
18 run2_miniAOD_UL.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017UL)
20 calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
21 recHitCollectionEB = cms.InputTag(
'reducedEgamma',
'reducedEBRecHits'),
22 recHitCollectionEE = cms.InputTag(
'reducedEgamma',
'reducedEERecHits')
25 ecalTrkCombinationRegression = cms.PSet(
26 ecalTrkRegressionConfig = cms.PSet(
27 rangeMinLowEt = cms.double(-1.),
28 rangeMaxLowEt = cms.double(3.0),
29 rangeMinHighEt = cms.double(-1.),
30 rangeMaxHighEt = cms.double(3.0),
31 lowEtHighEtBoundary = cms.double(50.),
32 forceHighEnergyTrainingIfSaturated = cms.bool(
False),
33 ebLowEtForestName = cms.string(
'electron_eb_ECALTRK_lowpt'),
34 ebHighEtForestName = cms.string(
'electron_eb_ECALTRK'),
35 eeLowEtForestName = cms.string(
'electron_ee_ECALTRK_lowpt'),
36 eeHighEtForestName = cms.string(
'electron_ee_ECALTRK')
38 ecalTrkRegressionUncertConfig = cms.PSet(
39 rangeMinLowEt = cms.double(0.0002),
40 rangeMaxLowEt = cms.double(0.5),
41 rangeMinHighEt = cms.double(0.0002),
42 rangeMaxHighEt = cms.double(0.5),
43 lowEtHighEtBoundary = cms.double(50.),
44 forceHighEnergyTrainingIfSaturated = cms.bool(
False),
45 ebLowEtForestName = cms.string(
'electron_eb_ECALTRK_lowpt_var'),
46 ebHighEtForestName = cms.string(
'electron_eb_ECALTRK_var'),
47 eeLowEtForestName = cms.string(
'electron_ee_ECALTRK_lowpt_var'),
48 eeHighEtForestName = cms.string(
'electron_ee_ECALTRK_var')
50 maxEcalEnergyForComb=cms.double(200.),
51 minEOverPForComb=cms.double(0.025),
52 maxEPDiffInSigmaForComb=cms.double(15.),
53 maxRelTrkMomErrForComb=cms.double(10.),
57 calibratedElectrons = cms.EDProducer(
"CalibratedElectronProducer",
58 calibratedEgammaSettings,
59 epCombConfig = ecalTrkCombinationRegression,
60 src = cms.InputTag(
'gedGsfElectrons'),
63 calibratedPatElectrons = cms.EDProducer(
"CalibratedPatElectronProducer",
64 calibratedEgammaPatSettings,
65 epCombConfig = ecalTrkCombinationRegression,
66 src = cms.InputTag(
'slimmedElectrons'),
69 calibratedPhotons = cms.EDProducer(
"CalibratedPhotonProducer",
70 calibratedEgammaSettings,
71 src = cms.InputTag(
'gedPhotons'),
73 calibratedPatPhotons = cms.EDProducer(
"CalibratedPatPhotonProducer",
74 calibratedEgammaPatSettings,
75 src = cms.InputTag(
'slimmedPhotons'),
79 return prefix+name[0].
upper()+name[1:]
def prefixName(prefix, name)