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" 6 calibratedEgammaSettings = cms.PSet(minEtToCalibrate = cms.double(5.0),
7 semiDeterministic = cms.bool(
True),
8 correctionFile = cms.string(_correctionFile2017Nov17),
9 recHitCollectionEB = cms.InputTag(
'reducedEcalRecHitsEB'),
10 recHitCollectionEE = cms.InputTag(
'reducedEcalRecHitsEE'),
11 produceCalibratedObjs = cms.bool(
True)
13 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
14 run2_miniAOD_80XLegacy.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016Legacy)
16 calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
17 recHitCollectionEB = cms.InputTag(
'reducedEgamma',
'reducedEBRecHits'),
18 recHitCollectionEE = cms.InputTag(
'reducedEgamma',
'reducedEERecHits')
21 ecalTrkCombinationRegression = cms.PSet(
22 ecalTrkRegressionConfig = cms.PSet(
23 rangeMin = cms.double(-1.),
24 rangeMax = cms.double(3.0),
25 lowEtHighEtBoundary = cms.double(50.),
26 forceHighEnergyTrainingIfSaturated = cms.bool(
False),
27 ebLowEtForestName = cms.string(
'electron_eb_ECALTRK_lowpt'),
28 ebHighEtForestName = cms.string(
'electron_eb_ECALTRK'),
29 eeLowEtForestName = cms.string(
'electron_ee_ECALTRK_lowpt'),
30 eeHighEtForestName = cms.string(
'electron_ee_ECALTRK')
32 ecalTrkRegressionUncertConfig = cms.PSet(
33 rangeMin = cms.double(0.0002),
34 rangeMax = cms.double(0.5),
35 lowEtHighEtBoundary = cms.double(50.),
36 forceHighEnergyTrainingIfSaturated = cms.bool(
False),
37 ebLowEtForestName = cms.string(
'electron_eb_ECALTRK_lowpt_var'),
38 ebHighEtForestName = cms.string(
'electron_eb_ECALTRK_var'),
39 eeLowEtForestName = cms.string(
'electron_ee_ECALTRK_lowpt_var'),
40 eeHighEtForestName = cms.string(
'electron_ee_ECALTRK_var')
42 maxEcalEnergyForComb=cms.double(200.),
43 minEOverPForComb=cms.double(0.025),
44 maxEPDiffInSigmaForComb=cms.double(15.),
45 maxRelTrkMomErrForComb=cms.double(10.),
53 calibratedElectrons = cms.EDProducer(
"CalibratedElectronProducer",
54 calibratedEgammaSettings,
55 useSmearCorrEcalEnergyErrInComb = cms.bool(
True),
56 epCombConfig = ecalTrkCombinationRegression,
57 src = cms.InputTag(
'gedGsfElectrons'),
60 calibratedPatElectrons = cms.EDProducer(
"CalibratedPatElectronProducer",
61 calibratedEgammaPatSettings,
62 useSmearCorrEcalEnergyErrInComb = cms.bool(
True),
63 epCombConfig = ecalTrkCombinationRegression,
64 src = cms.InputTag(
'slimmedElectrons'),
67 run2_miniAOD_80XLegacy.toModify(calibratedElectrons,useSmearCorrEcalEnergyErrInComb =
False)
68 run2_miniAOD_80XLegacy.toModify(calibratedPatElectrons,useSmearCorrEcalEnergyErrInComb =
False)
72 calibratedPhotons = cms.EDProducer(
"CalibratedPhotonProducer",
73 calibratedEgammaSettings,
74 src = cms.InputTag(
'gedPhotons'),
76 calibratedPatPhotons = cms.EDProducer(
"CalibratedPatPhotonProducer",
77 calibratedEgammaPatSettings,
78 src = cms.InputTag(
'slimmedPhotons'),
82 return prefix+name[0].
upper()+name[1:]
def prefixName(prefix, name)