Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-26 03:14:02

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from RecoEgamma.EgammaIsolationAlgos.interestingEgammaIsoDetIdsSequence_cff import interestingEgammaIsoHCALSel
0004 
0005 reducedEgamma = cms.EDProducer("ReducedEGProducer",
0006   keepPhotons = cms.string("hadTowOverEm()<0.15 && pt>10 && (pt>14 || chargedHadronIso()<10)"), #keep in output
0007   slimRelinkPhotons = cms.string("hadTowOverEm()<0.15 && pt>10 && (pt>14 || chargedHadronIso()<10)"), #keep only slimmed SuperCluster plus seed cluster
0008   relinkPhotons = cms.string("(r9()>0.8 || chargedHadronIso()<20 || chargedHadronIso()<0.3*pt())"), #keep all associated clusters/rechits/conversions
0009   keepOOTPhotons = cms.string("pt>10"), #keep in output
0010   slimRelinkOOTPhotons = cms.string("pt>10"), #keep only slimmed SuperCluster plus seed cluster
0011   relinkOOTPhotons = cms.string("(r9()>0.8)"), #keep all associated clusters/rechits/conversions
0012   keepGsfElectrons = cms.string(""), #keep in output
0013   slimRelinkGsfElectrons = cms.string(""), #keep only slimmed SuperCluster plus seed cluster
0014   relinkGsfElectrons = cms.string("pt>5"), #keep all associated clusters/rechits/conversions
0015   photons = cms.InputTag("gedPhotons"),
0016   ootPhotons = cms.InputTag("ootPhotons"),
0017   gsfElectrons = cms.InputTag("gedGsfElectrons"),
0018   conversions = cms.InputTag("allConversions"),
0019   gsfTracks = cms.InputTag("electronGsfTracks"),
0020   singleConversions = cms.InputTag("particleFlowEGamma"),
0021   barrelEcalHits = cms.InputTag("reducedEcalRecHitsEB"),
0022   endcapEcalHits = cms.InputTag("reducedEcalRecHitsEE"),
0023   preshowerEcalHits = cms.InputTag("reducedEcalRecHitsES"),
0024   hbheHits= cms.InputTag("reducedHcalRecHits","hbhereco"),
0025   photonsPFValMap = cms.InputTag("particleBasedIsolation","gedPhotons"),
0026   gsfElectronsPFValMap = cms.InputTag("particleBasedIsolation","gedGsfElectrons"),
0027   photonIDSources = cms.VInputTag(),
0028   photonIDOutput = cms.vstring(),
0029   gsfElectronIDSources = cms.VInputTag(),
0030   gsfElectronIDOutput = cms.vstring(),
0031   photonFloatValueMapSources = cms.VInputTag(),
0032   photonFloatValueMapOutput = cms.vstring(),
0033   ootPhotonFloatValueMapSources = cms.VInputTag(),
0034   ootPhotonFloatValueMapOutput = cms.vstring(),
0035   hiPhotonIsolationMapInput = cms.InputTag(""),
0036   hiPhotonIsolationMapOutput = cms.string(""),
0037   gsfElectronFloatValueMapSources = cms.VInputTag(),
0038   gsfElectronFloatValueMapOutput = cms.vstring(),
0039   applyPhotonCalibOnData = cms.bool(False),
0040   applyPhotonCalibOnMC = cms.bool(False),
0041   applyGsfElectronCalibOnData = cms.bool(False),
0042   applyGsfElectronCalibOnMC = cms.bool(False), 
0043   photonCalibEnergySource = cms.InputTag(""),
0044   photonCalibEnergyErrSource = cms.InputTag(""),
0045   gsfElectronCalibEnergySource = cms.InputTag(""),
0046   gsfElectronCalibEnergyErrSource = cms.InputTag(""),
0047   gsfElectronCalibEcalEnergySource = cms.InputTag(""),
0048   gsfElectronCalibEcalEnergyErrSource = cms.InputTag(""),
0049   hcalHitSel = interestingEgammaIsoHCALSel
0050 )
0051 
0052 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
0053 phase2_common.toModify(reducedEgamma, 
0054         preshowerEcalHits = "",
0055 )
0056 
0057 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
0058 run2_miniAOD_80XLegacy.toModify(
0059     reducedEgamma, 
0060     photonFloatValueMapSources      = ["photonEcalPFClusterIsolationProducer",
0061                                        "photonHcalPFClusterIsolationProducer"],
0062     photonFloatValueMapOutput       = ["phoEcalPFClusIso",
0063                                        "phoHcalPFClusIso"],
0064     ootPhotonFloatValueMapSources   = ["ootPhotonEcalPFClusterIsolationProducer"],
0065     ootPhotonFloatValueMapOutput    = ["ootPhoEcalPFClusIso"],
0066     gsfElectronFloatValueMapSources = ["electronEcalPFClusterIsolationProducer",
0067                                        "electronHcalPFClusterIsolationProducer"],
0068     gsfElectronFloatValueMapOutput  = ["eleEcalPFClusIso",
0069                                        "eleHcalPFClusIso"]
0070 )
0071 
0072 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
0073 run2_miniAOD_94XFall17.toModify(
0074     reducedEgamma, 
0075     photonFloatValueMapSources      = ["photonEcalPFClusterIsolationProducer",
0076                                        "photonHcalPFClusterIsolationProducer"],
0077     photonFloatValueMapOutput       = ["phoEcalPFClusIso",
0078                                        "phoHcalPFClusIso"],
0079     ootPhotonFloatValueMapSources   = ["ootPhotonEcalPFClusterIsolationProducer",
0080                                        "ootPhotonHcalPFClusterIsolationProducer"],
0081     ootPhotonFloatValueMapOutput    = ["ootPhoEcalPFClusIso",
0082                                        "ootPhoHcalPFClusIso"],
0083     gsfElectronFloatValueMapSources = ["electronEcalPFClusterIsolationProducer",
0084                                        "electronHcalPFClusterIsolationProducer"],
0085     gsfElectronFloatValueMapOutput  = ["eleEcalPFClusIso",
0086                                        "eleHcalPFClusIso"],
0087 )
0088 
0089 from RecoEgamma.EgammaPhotonProducers.reducedEgamma_tools import calibrateReducedEgamma
0090 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
0091 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
0092 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
0093 modifyReducedEGammaRun2MiniAOD = (
0094     run2_miniAOD_94XFall17 | run2_miniAOD_80XLegacy | run2_miniAOD_UL).makeProcessModifier(calibrateReducedEgamma)
0095 
0096 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0097 
0098 pp_on_AA.toModify(
0099     reducedEgamma,
0100     ootPhotons = "",
0101     keepPhotons = "pt>15 && abs(eta)<2.5",
0102     slimRelinkPhotons = "pt>15 && abs(eta)<2.5",
0103     relinkPhotons = "pt>15 && abs(eta)<2.5",
0104     hiPhotonIsolationMapInput = "photonIsolationHIProducerppGED",
0105     hiPhotonIsolationMapOutput = "photonIsolationHIProducerppGED"
0106 )
0107 
0108 from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
0109 run2_miniAOD_pp_on_AA_103X.toModify(
0110     reducedEgamma,
0111     photonsPFValMap = "pfEGammaToCandidateRemapperCleaned:photons",
0112     gsfElectronsPFValMap = "pfEGammaToCandidateRemapperCleaned:electrons"
0113 )