Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-04 05:18:57

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 _correctionFile2016Legacy    = "EgammaAnalysis/ElectronTools/data/ScalesSmearings/Legacy2016_07Aug2017_FineEtaR9_v3_ele_unc"
0004 _correctionFile2017Nov17     = "EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_17Nov2017_v1_ele_unc"
0005 _correctionFile2016ULpreVFP  = "EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain_v3"
0006 _correctionFile2016ULpostVFP = "EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_postVFP_RunFineEtaR9Gain_v1"
0007 _correctionFile2017UL        = "EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_24Feb2020_runEtaR9Gain_v2"
0008 _correctionFile2018UL        = "EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2018_29Sep2020_RunFineEtaR9Gain"
0009 
0010 calibratedEgammaSettings = cms.PSet(minEtToCalibrate = cms.double(5.0),
0011                                     semiDeterministic = cms.bool(True),
0012                                     correctionFile = cms.string(_correctionFile2017UL),
0013                                     recHitCollectionEB = cms.InputTag('reducedEcalRecHitsEB'),
0014                                     recHitCollectionEE = cms.InputTag('reducedEcalRecHitsEE'),
0015                                     produceCalibratedObjs = cms.bool(True)
0016                                    )
0017 from Configuration.Eras.Modifier_run2_egamma_2016_cff import run2_egamma_2016
0018 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
0019 (run2_egamma_2016 & tracker_apv_vfp30_2016).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016ULpreVFP)
0020 (run2_egamma_2016 & ~tracker_apv_vfp30_2016).toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016ULpostVFP)
0021 
0022 
0023 from Configuration.Eras.Modifier_run2_egamma_2017_cff import run2_egamma_2017
0024 run2_egamma_2017.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017UL)
0025 
0026 from Configuration.Eras.Modifier_run2_egamma_2018_cff import run2_egamma_2018
0027 run2_egamma_2018.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2018UL)
0028 
0029 calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
0030     recHitCollectionEB = 'reducedEgamma:reducedEBRecHits',
0031     recHitCollectionEE = 'reducedEgamma:reducedEERecHits'
0032     )
0033 
0034 ecalTrkCombinationRegression = cms.PSet(
0035     ecalTrkRegressionConfig = cms.PSet(
0036         rangeMinLowEt = cms.double(-1.),
0037         rangeMaxLowEt = cms.double(3.0),
0038         rangeMinHighEt = cms.double(-1.),
0039         rangeMaxHighEt = cms.double(3.0),
0040         lowEtHighEtBoundary = cms.double(50.),
0041         forceHighEnergyTrainingIfSaturated = cms.bool(False),
0042         ebLowEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK_lowpt'),
0043         ebHighEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK'),
0044         eeLowEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK_lowpt'),
0045         eeHighEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK')
0046         ),
0047     ecalTrkRegressionUncertConfig = cms.PSet(
0048         rangeMinLowEt = cms.double(0.0002),
0049         rangeMaxLowEt = cms.double(0.5),
0050         rangeMinHighEt = cms.double(0.0002),
0051         rangeMaxHighEt = cms.double(0.5),
0052         lowEtHighEtBoundary = cms.double(50.),  
0053         forceHighEnergyTrainingIfSaturated = cms.bool(False),
0054         ebLowEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK_lowpt_var'),
0055         ebHighEtForestName = cms.ESInputTag('', 'electron_eb_ECALTRK_var'),
0056         eeLowEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK_lowpt_var'),
0057         eeHighEtForestName = cms.ESInputTag('', 'electron_ee_ECALTRK_var')
0058         ),
0059     maxEcalEnergyForComb=cms.double(200.),
0060     minEOverPForComb=cms.double(0.025),
0061     maxEPDiffInSigmaForComb=cms.double(15.),
0062     maxRelTrkMomErrForComb=cms.double(10.),
0063     
0064 )
0065 
0066 import RecoEgamma.EgammaTools.calibratedElectronProducer_cfi as _mod_ele
0067 import RecoEgamma.EgammaTools.calibratedPatElectronProducer_cfi as _mod_patele
0068 import RecoEgamma.EgammaTools.calibratedPhotonProducer_cfi as _mod_pho
0069 import RecoEgamma.EgammaTools.calibratedPatPhotonProducer_cfi as _mod_patpho
0070 
0071 calibratedElectrons = _mod_ele.calibratedElectronProducer.clone(
0072                                   calibratedEgammaSettings,                                   
0073                                   epCombConfig = ecalTrkCombinationRegression,
0074                                   src = 'gedGsfElectrons',
0075                                   )
0076 
0077 calibratedPatElectrons = _mod_patele.calibratedPatElectronProducer.clone(
0078                                   calibratedEgammaPatSettings,
0079                                   epCombConfig = ecalTrkCombinationRegression,
0080                                   src = 'slimmedElectrons', 
0081                                   )
0082 
0083 calibratedPhotons = _mod_pho.calibratedPhotonProducer.clone( 
0084                                    calibratedEgammaSettings,
0085                                    src = 'gedPhotons',    
0086                                   )
0087 
0088 calibratedPatPhotons = _mod_patpho.calibratedPatPhotonProducer.clone(
0089                                   calibratedEgammaPatSettings,
0090                                   src = 'slimmedPhotons',
0091                                   )
0092 
0093 def prefixName(prefix,name):
0094     return prefix+name[0].upper()+name[1:]
0095 
0096 
0097