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 _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"
9 
10 calibratedEgammaSettings = cms.PSet(minEtToCalibrate = cms.double(5.0),
11  semiDeterministic = cms.bool(True),
12  correctionFile = cms.string(_correctionFile2017UL),
13  recHitCollectionEB = cms.InputTag('reducedEcalRecHitsEB'),
14  recHitCollectionEE = cms.InputTag('reducedEcalRecHitsEE'),
15  produceCalibratedObjs = cms.bool(True)
16  )
17 from Configuration.Eras.Modifier_run2_egamma_2016_cff import run2_egamma_2016
18 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
19 (run2_egamma_2016 & tracker_apv_vfp30_2016).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016ULpreVFP)
20 (run2_egamma_2016 & ~tracker_apv_vfp30_2016).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016ULpostVFP)
21 
22 
23 from Configuration.Eras.Modifier_run2_egamma_2017_cff import run2_egamma_2017
24 run2_egamma_2017.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017UL)
25 
26 from Configuration.Eras.Modifier_run2_egamma_2018_cff import run2_egamma_2018
27 run2_egamma_2018.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2018UL)
28 
29 calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
30  recHitCollectionEB = 'reducedEgamma:reducedEBRecHits',
31  recHitCollectionEE = 'reducedEgamma:reducedEERecHits'
32  )
33 
34 ecalTrkCombinationRegression = cms.PSet(
35  ecalTrkRegressionConfig = cms.PSet(
36  rangeMinLowEt = cms.double(-1.),
37  rangeMaxLowEt = cms.double(3.0),
38  rangeMinHighEt = cms.double(-1.),
39  rangeMaxHighEt = cms.double(3.0),
40  lowEtHighEtBoundary = cms.double(50.),
41  forceHighEnergyTrainingIfSaturated = cms.bool(False),
42  ebLowEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK_lowpt'),
43  ebHighEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK'),
44  eeLowEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK_lowpt'),
45  eeHighEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK')
46  ),
47  ecalTrkRegressionUncertConfig = cms.PSet(
48  rangeMinLowEt = cms.double(0.0002),
49  rangeMaxLowEt = cms.double(0.5),
50  rangeMinHighEt = cms.double(0.0002),
51  rangeMaxHighEt = cms.double(0.5),
52  lowEtHighEtBoundary = cms.double(50.),
53  forceHighEnergyTrainingIfSaturated = cms.bool(False),
54  ebLowEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK_lowpt_var'),
55  ebHighEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK_var'),
56  eeLowEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK_lowpt_var'),
57  eeHighEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK_var')
58  ),
59  maxEcalEnergyForComb=cms.double(200.),
60  minEOverPForComb=cms.double(0.025),
61  maxEPDiffInSigmaForComb=cms.double(15.),
62  maxRelTrkMomErrForComb=cms.double(10.),
63 
64 )
65 
66 import RecoEgamma.EgammaTools.calibratedElectronProducer_cfi as _mod_ele
67 import RecoEgamma.EgammaTools.calibratedPatElectronProducer_cfi as _mod_patele
68 import RecoEgamma.EgammaTools.calibratedPhotonProducer_cfi as _mod_pho
69 import RecoEgamma.EgammaTools.calibratedPatPhotonProducer_cfi as _mod_patpho
70 
71 calibratedElectrons = _mod_ele.calibratedElectronProducer.clone(
72  calibratedEgammaSettings,
73  epCombConfig = ecalTrkCombinationRegression,
74  src = 'gedGsfElectrons',
75  )
76 
77 calibratedPatElectrons = _mod_patele.calibratedPatElectronProducer.clone(
78  calibratedEgammaPatSettings,
79  epCombConfig = ecalTrkCombinationRegression,
80  src = 'slimmedElectrons',
81  )
82 
83 calibratedPhotons = _mod_pho.calibratedPhotonProducer.clone(
84  calibratedEgammaSettings,
85  src = 'gedPhotons',
86  )
87 
88 calibratedPatPhotons = _mod_patpho.calibratedPatPhotonProducer.clone(
89  calibratedEgammaPatSettings,
90  src = 'slimmedPhotons',
91  )
92 
93 def prefixName(prefix,name):
94  return prefix+name[0].upper()+name[1:]
95 
96 
97 
def prefixName(prefix, name)