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 
7 calibratedEgammaSettings = cms.PSet(minEtToCalibrate = cms.double(5.0),
8  semiDeterministic = cms.bool(True),
9  correctionFile = cms.string(_correctionFile2017UL),
10  recHitCollectionEB = cms.InputTag('reducedEcalRecHitsEB'),
11  recHitCollectionEE = cms.InputTag('reducedEcalRecHitsEE'),
12  produceCalibratedObjs = cms.bool(True)
13  )
14 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
15 run2_miniAOD_80XLegacy.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016Legacy)
16 
17 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
18 run2_miniAOD_94XFall17.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017Nov17)
19 
20 calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
21  recHitCollectionEB = cms.InputTag('reducedEgamma','reducedEBRecHits'),
22  recHitCollectionEE = cms.InputTag('reducedEgamma','reducedEERecHits')
23  )
24 
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')
37  ),
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')
49  ),
50  maxEcalEnergyForComb=cms.double(200.),
51  minEOverPForComb=cms.double(0.025),
52  maxEPDiffInSigmaForComb=cms.double(15.),
53  maxRelTrkMomErrForComb=cms.double(10.),
54 
55 )
56 
57 calibratedElectrons = cms.EDProducer("CalibratedElectronProducer",
58  calibratedEgammaSettings,
59  epCombConfig = ecalTrkCombinationRegression,
60  src = cms.InputTag('gedGsfElectrons'),
61  )
62 
63 calibratedPatElectrons = cms.EDProducer("CalibratedPatElectronProducer",
64  calibratedEgammaPatSettings,
65  epCombConfig = ecalTrkCombinationRegression,
66  src = cms.InputTag('slimmedElectrons'),
67  )
68 
69 calibratedPhotons = cms.EDProducer("CalibratedPhotonProducer",
70  calibratedEgammaSettings,
71  src = cms.InputTag('gedPhotons'),
72  )
73 calibratedPatPhotons = cms.EDProducer("CalibratedPatPhotonProducer",
74  calibratedEgammaPatSettings,
75  src = cms.InputTag('slimmedPhotons'),
76  )
77 
78 def prefixName(prefix,name):
79  return prefix+name[0].upper()+name[1:]
80 
81 
82 
pileupCalc.upper
upper
Definition: pileupCalc.py:214
calibratedEgammas_cff.prefixName
def prefixName(prefix, name)
Definition: calibratedEgammas_cff.py:78