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  rangeMin = cms.double(-1.),
24  rangeMax = cms.double(3.0),
25  lowEtHighEtBoundary = cms.double(50.),
26  forceHighEnergyTrainingIfSaturated = cms.bool(False),
27  ebLowEtForestName = cms.string('electron_eb_ECALTRK_lowpt'),
28  ebHighEtForestName = cms.string('electron_eb_ECALTRK'),
29  eeLowEtForestName = cms.string('electron_ee_ECALTRK_lowpt'),
30  eeHighEtForestName = cms.string('electron_ee_ECALTRK')
31  ),
32  ecalTrkRegressionUncertConfig = cms.PSet(
33  rangeMin = cms.double(0.0002),
34  rangeMax = cms.double(0.5),
35  lowEtHighEtBoundary = cms.double(50.),
36  forceHighEnergyTrainingIfSaturated = cms.bool(False),
37  ebLowEtForestName = cms.string('electron_eb_ECALTRK_lowpt_var'),
38  ebHighEtForestName = cms.string('electron_eb_ECALTRK_var'),
39  eeLowEtForestName = cms.string('electron_ee_ECALTRK_lowpt_var'),
40  eeHighEtForestName = cms.string('electron_ee_ECALTRK_var')
41  ),
42  maxEcalEnergyForComb=cms.double(200.),
43  minEOverPForComb=cms.double(0.025),
44  maxEPDiffInSigmaForComb=cms.double(15.),
45  maxRelTrkMomErrForComb=cms.double(10.),
46 
47 )
48 
49 calibratedElectrons = cms.EDProducer("CalibratedElectronProducer",
50  calibratedEgammaSettings,
51  epCombConfig = ecalTrkCombinationRegression,
52  src = cms.InputTag('gedGsfElectrons'),
53  )
54 
55 calibratedPatElectrons = cms.EDProducer("CalibratedPatElectronProducer",
56  calibratedEgammaPatSettings,
57  epCombConfig = ecalTrkCombinationRegression,
58  src = cms.InputTag('slimmedElectrons'),
59  )
60 
61 calibratedPhotons = cms.EDProducer("CalibratedPhotonProducer",
62  calibratedEgammaSettings,
63  src = cms.InputTag('gedPhotons'),
64  )
65 calibratedPatPhotons = cms.EDProducer("CalibratedPatPhotonProducer",
66  calibratedEgammaPatSettings,
67  src = cms.InputTag('slimmedPhotons'),
68  )
69 
70 def prefixName(prefix,name):
71  return prefix+name[0].upper()+name[1:]
72 
73 
74 
def prefixName(prefix, name)