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 
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)
12  )
13 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
14 run2_miniAOD_80XLegacy.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016Legacy)
15 
16 calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
17  recHitCollectionEB = cms.InputTag('reducedEgamma','reducedEBRecHits'),
18  recHitCollectionEE = cms.InputTag('reducedEgamma','reducedEERecHits')
19  )
20 
21 ecalTrkCombinationRegression = cms.PSet(
22  ecalTrkRegressionConfig = cms.PSet(
23  rangeMinLowEt = cms.double(-1.),
24  rangeMaxLowEt = cms.double(3.0),
25  rangeMinHighEt = cms.double(-1.),
26  rangeMaxHighEt = cms.double(3.0),
27  lowEtHighEtBoundary = cms.double(50.),
28  forceHighEnergyTrainingIfSaturated = cms.bool(False),
29  ebLowEtForestName = cms.string('electron_eb_ECALTRK_lowpt'),
30  ebHighEtForestName = cms.string('electron_eb_ECALTRK'),
31  eeLowEtForestName = cms.string('electron_ee_ECALTRK_lowpt'),
32  eeHighEtForestName = cms.string('electron_ee_ECALTRK')
33  ),
34  ecalTrkRegressionUncertConfig = cms.PSet(
35  rangeMinLowEt = cms.double(0.0002),
36  rangeMaxLowEt = cms.double(0.5),
37  rangeMinHighEt = cms.double(0.0002),
38  rangeMaxHighEt = cms.double(0.5),
39  lowEtHighEtBoundary = cms.double(50.),
40  forceHighEnergyTrainingIfSaturated = cms.bool(False),
41  ebLowEtForestName = cms.string('electron_eb_ECALTRK_lowpt_var'),
42  ebHighEtForestName = cms.string('electron_eb_ECALTRK_var'),
43  eeLowEtForestName = cms.string('electron_ee_ECALTRK_lowpt_var'),
44  eeHighEtForestName = cms.string('electron_ee_ECALTRK_var')
45  ),
46  maxEcalEnergyForComb=cms.double(200.),
47  minEOverPForComb=cms.double(0.025),
48  maxEPDiffInSigmaForComb=cms.double(15.),
49  maxRelTrkMomErrForComb=cms.double(10.),
50 
51 )
52 
53 calibratedElectrons = cms.EDProducer("CalibratedElectronProducer",
54  calibratedEgammaSettings,
55  epCombConfig = ecalTrkCombinationRegression,
56  src = cms.InputTag('gedGsfElectrons'),
57  )
58 
59 calibratedPatElectrons = cms.EDProducer("CalibratedPatElectronProducer",
60  calibratedEgammaPatSettings,
61  epCombConfig = ecalTrkCombinationRegression,
62  src = cms.InputTag('slimmedElectrons'),
63  )
64 
65 calibratedPhotons = cms.EDProducer("CalibratedPhotonProducer",
66  calibratedEgammaSettings,
67  src = cms.InputTag('gedPhotons'),
68  )
69 calibratedPatPhotons = cms.EDProducer("CalibratedPatPhotonProducer",
70  calibratedEgammaPatSettings,
71  src = cms.InputTag('slimmedPhotons'),
72  )
73 
74 def prefixName(prefix,name):
75  return prefix+name[0].upper()+name[1:]
76 
77 
78 
def prefixName(prefix, name)