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