CMS 3D CMS Logo

calibratedEgammas_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
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"
7 
8 calibratedEgammaSettings = cms.PSet(minEtToCalibrate = cms.double(5.0),
9  semiDeterministic = cms.bool(True),
10  correctionFile = cms.string(_correctionFile2017UL),
11  recHitCollectionEB = cms.InputTag('reducedEcalRecHitsEB'),
12  recHitCollectionEE = cms.InputTag('reducedEcalRecHitsEE'),
13  produceCalibratedObjs = cms.bool(True)
14  )
15 
16 from Configuration.Eras.Modifier_run2_egamma_2017_cff import run2_egamma_2017
17 run2_egamma_2017.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017UL)
18 
19 from Configuration.Eras.Modifier_run2_egamma_2018_cff import run2_egamma_2018
20 run2_egamma_2018.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2018UL)
21 
22 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
23 run2_miniAOD_80XLegacy.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016Legacy)
24 
25 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
26 run2_miniAOD_94XFall17.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017Nov17)
27 
28 calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
29  recHitCollectionEB = 'reducedEgamma:reducedEBRecHits',
30  recHitCollectionEE = 'reducedEgamma:reducedEERecHits'
31  )
32 
33 ecalTrkCombinationRegression = cms.PSet(
34  ecalTrkRegressionConfig = cms.PSet(
35  rangeMinLowEt = cms.double(-1.),
36  rangeMaxLowEt = cms.double(3.0),
37  rangeMinHighEt = cms.double(-1.),
38  rangeMaxHighEt = cms.double(3.0),
39  lowEtHighEtBoundary = cms.double(50.),
40  forceHighEnergyTrainingIfSaturated = cms.bool(False),
41  ebLowEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK_lowpt'),
42  ebHighEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK'),
43  eeLowEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK_lowpt'),
44  eeHighEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK')
45  ),
46  ecalTrkRegressionUncertConfig = cms.PSet(
47  rangeMinLowEt = cms.double(0.0002),
48  rangeMaxLowEt = cms.double(0.5),
49  rangeMinHighEt = cms.double(0.0002),
50  rangeMaxHighEt = cms.double(0.5),
51  lowEtHighEtBoundary = cms.double(50.),
52  forceHighEnergyTrainingIfSaturated = cms.bool(False),
53  ebLowEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK_lowpt_var'),
54  ebHighEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK_var'),
55  eeLowEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK_lowpt_var'),
56  eeHighEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK_var')
57  ),
58  maxEcalEnergyForComb=cms.double(200.),
59  minEOverPForComb=cms.double(0.025),
60  maxEPDiffInSigmaForComb=cms.double(15.),
61  maxRelTrkMomErrForComb=cms.double(10.),
62 
63 )
64 
65 calibratedElectrons = cms.EDProducer("CalibratedElectronProducer",
66  calibratedEgammaSettings,
67  epCombConfig = ecalTrkCombinationRegression,
68  src = cms.InputTag('gedGsfElectrons'),
69  )
70 
71 calibratedPatElectrons = cms.EDProducer("CalibratedPatElectronProducer",
72  calibratedEgammaPatSettings,
73  epCombConfig = ecalTrkCombinationRegression,
74  src = cms.InputTag('slimmedElectrons'),
75  )
76 
77 calibratedPhotons = cms.EDProducer("CalibratedPhotonProducer",
78  calibratedEgammaSettings,
79  src = cms.InputTag('gedPhotons'),
80  )
81 calibratedPatPhotons = cms.EDProducer("CalibratedPatPhotonProducer",
82  calibratedEgammaPatSettings,
83  src = cms.InputTag('slimmedPhotons'),
84  )
85 
86 def prefixName(prefix,name):
87  return prefix+name[0].upper()+name[1:]
88 
89 
90 
pileupCalc.upper
upper
Definition: pileupCalc.py:214
calibratedEgammas_cff.prefixName
def prefixName(prefix, name)
Definition: calibratedEgammas_cff.py:86