File indexing completed on 2024-04-06 12:24:58
0001 import FWCore.ParameterSet.Config as cms
0002
0003 from RecoEgamma.PhotonIdentification.isolationCalculator_cfi import *
0004 from RecoEgamma.PhotonIdentification.mipVariable_cfi import *
0005 from RecoEgamma.PhotonIdentification.mvaHaloVariable_cfi import *
0006 from RecoEcal.EgammaClusterProducers.hybridSuperClusters_cfi import *
0007 from RecoEcal.EgammaClusterProducers.multi5x5BasicClusters_cfi import *
0008 from RecoEgamma.EgammaIsolationAlgos.egammaHBHERecHitThreshold_cff import egammaHBHERecHit
0009
0010 from RecoEgamma.EgammaIsolationAlgos.egammaEcalPFClusterIsolationProducerRecoPhoton_cfi import egammaEcalPFClusterIsolationProducerRecoPhoton
0011 from RecoEgamma.EgammaIsolationAlgos.egammaHcalPFClusterIsolationProducerRecoPhoton_cfi import egammaHcalPFClusterIsolationProducerRecoPhoton
0012
0013
0014
0015
0016 photons = cms.EDProducer("GEDPhotonProducer",
0017 photonProducer = cms.InputTag("photonCore"),
0018 reconstructionStep = cms.string("tmp"),
0019 outputPhotonCollection = cms.string(""),
0020 pfEgammaCandidates = cms.InputTag(""),
0021 valueMapPhotons = cms.string(""),
0022
0023 regressionWeightsFromDB = cms.bool(True),
0024 energyRegressionWeightsFileLocation = cms.string('/afs/cern.ch/user/b/bendavid/cmspublic/regweights/gbrph.root'),
0025 energyRegressionWeightsDBLocation = cms.string('wgbrph'),
0026 superClusterEnergyCorrFunction = cms.string("EcalClusterEnergyCorrection"),
0027 superClusterEnergyErrorFunction = cms.string("EcalClusterEnergyUncertainty"),
0028 superClusterCrackEnergyCorrFunction = cms.string("EcalClusterCrackCorrection"),
0029 photonEcalEnergyCorrFunction = cms.string("EcalClusterEnergyCorrectionObjectSpecific"),
0030
0031 candidateP4type = cms.string("fromEcalEnergy"),
0032 isolationSumsCalculatorSet = cms.PSet(isolationSumsCalculator),
0033 mipVariableSet = cms.PSet(mipVariable),
0034 mvaBasedHaloVariableSet = cms.PSet(mvaHaloVariable),
0035 usePrimaryVertex = cms.bool(True),
0036 primaryVertexProducer = cms.InputTag('offlinePrimaryVerticesWithBS'),
0037 posCalc_t0_endcPresh = cms.double(3.6),
0038 posCalc_logweight = cms.bool(True),
0039 posCalc_w0 = cms.double(4.2),
0040 hbheInstance = cms.string(''),
0041 posCalc_t0_endc = cms.double(6.3),
0042 barrelEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
0043 hbheModule = cms.string('hbhereco'),
0044 endcapEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
0045 preshowerHits = cms.InputTag("ecalPreshowerRecHit","EcalRecHitsES"),
0046 runMIPTagger = cms.bool(True),
0047 runMVABasedHaloTagger = cms.bool(False),
0048 highEt = cms.double(100.),
0049 minR9Barrel = cms.double(0.94),
0050 minR9Endcap = cms.double(0.95),
0051 multThresEB = cms.double(1.00),
0052 multThresEE = cms.double(1.25),
0053 hOverEConeSize = cms.double(0.15),
0054 hbheRecHits = egammaHBHERecHit.hbheRecHits,
0055 recHitEThresholdHB = egammaHBHERecHit.recHitEThresholdHB,
0056 recHitEThresholdHE = egammaHBHERecHit.recHitEThresholdHE,
0057 usePFThresholdsFromDB = egammaHBHERecHit.usePFThresholdsFromDB,
0058 maxHcalRecHitSeverity = egammaHBHERecHit.maxHcalRecHitSeverity,
0059 hcalRun2EffDepth = cms.bool(False),
0060 posCalc_x0 = cms.double(0.89),
0061 posCalc_t0_barl = cms.double(7.7),
0062 minSCEtBarrel = cms.double(10.0),
0063 minSCEtEndcap = cms.double(10.0),
0064 maxHoverEBarrel = cms.double(0.5),
0065 maxHoverEEndcap = cms.double(0.5),
0066 ecalRecHitSumEtOffsetBarrel = cms.double(999999999),
0067 ecalRecHitSumEtSlopeBarrel = cms.double(0.),
0068 ecalRecHitSumEtOffsetEndcap = cms.double(999999999),
0069 ecalRecHitSumEtSlopeEndcap = cms.double(0.),
0070 hcalRecHitSumEtOffsetBarrel = cms.double(999999999),
0071 hcalRecHitSumEtSlopeBarrel = cms.double(0.),
0072 hcalRecHitSumEtOffsetEndcap = cms.double(999999999),
0073 hcalRecHitSumEtSlopeEndcap = cms.double(0.),
0074 nTrackSolidConeBarrel =cms.double(999999999),
0075 nTrackSolidConeEndcap =cms.double(999999999),
0076 nTrackHollowConeBarrel =cms.double(999999999),
0077 nTrackHollowConeEndcap =cms.double(999999999),
0078 trackPtSumSolidConeBarrel =cms.double(999999999),
0079 trackPtSumSolidConeEndcap =cms.double(999999999),
0080 trackPtSumHollowConeBarrel =cms.double(999999999),
0081 trackPtSumHollowConeEndcap =cms.double(999999999),
0082 sigmaIetaIetaCutBarrel=cms.double(999999999),
0083 sigmaIetaIetaCutEndcap=cms.double(999999999),
0084 posCalcParameters = cms.PSet( T0_barl = cms.double(7.4),
0085 T0_endc = cms.double(6.3),
0086 T0_endcPresh = cms.double(3.6),
0087 LogWeighted = cms.bool(True),
0088 W0 = cms.double(4.2),
0089 X0 = cms.double(0.89)
0090 ),
0091
0092 RecHitFlagToBeExcludedEB = cleanedHybridSuperClusters.RecHitFlagToBeExcluded,
0093 RecHitSeverityToBeExcludedEB = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
0094 RecHitFlagToBeExcludedEE = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded,
0095 RecHitSeverityToBeExcludedEE = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
0096 checkHcalStatus = cms.bool(True),
0097 PhotonDNNPFid = cms.PSet(
0098 enabled = cms.bool(False),
0099 inputTensorName = cms.string("FirstLayer_input"),
0100 outputTensorName = cms.string("sequential/FinalLayer/Sigmoid"),
0101 modelsFiles = cms.vstring(
0102 'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EB/EB_modelDNN.pb',
0103 'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EE/EE_modelDNN.pb'),
0104 scalersFiles = cms.vstring(
0105 'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EB/EB_scaler.txt',
0106 'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EE/EE_scaler.txt'
0107 ),
0108 outputDim = cms.vuint32(1,1),
0109 useEBModelInGap = cms.bool(True)
0110 ),
0111 pfECALClusIsolCfg = cms.PSet(
0112 pfClusterProducer = egammaEcalPFClusterIsolationProducerRecoPhoton.pfClusterProducer,
0113 drMax = egammaEcalPFClusterIsolationProducerRecoPhoton.drMax,
0114 drVetoBarrel = egammaEcalPFClusterIsolationProducerRecoPhoton.drVetoBarrel,
0115 drVetoEndcap = egammaEcalPFClusterIsolationProducerRecoPhoton.drVetoEndcap,
0116 etaStripBarrel = egammaEcalPFClusterIsolationProducerRecoPhoton.etaStripBarrel,
0117 etaStripEndcap = egammaEcalPFClusterIsolationProducerRecoPhoton.etaStripEndcap,
0118 energyBarrel = egammaEcalPFClusterIsolationProducerRecoPhoton.energyBarrel,
0119 energyEndcap = egammaEcalPFClusterIsolationProducerRecoPhoton.energyEndcap
0120 ),
0121
0122 pfHCALClusIsolCfg = cms.PSet(
0123
0124 pfClusterProducerHCAL = egammaHcalPFClusterIsolationProducerRecoPhoton.pfClusterProducerHCAL,
0125 useHF = egammaHcalPFClusterIsolationProducerRecoPhoton.useHF,
0126 pfClusterProducerHFEM = egammaHcalPFClusterIsolationProducerRecoPhoton.pfClusterProducerHFEM,
0127 pfClusterProducerHFHAD = egammaHcalPFClusterIsolationProducerRecoPhoton.pfClusterProducerHFHAD,
0128 drMax = egammaHcalPFClusterIsolationProducerRecoPhoton.drMax,
0129 drVetoBarrel = egammaHcalPFClusterIsolationProducerRecoPhoton.drVetoBarrel,
0130 drVetoEndcap = egammaHcalPFClusterIsolationProducerRecoPhoton.drVetoEndcap,
0131 etaStripBarrel = egammaHcalPFClusterIsolationProducerRecoPhoton.etaStripBarrel,
0132 etaStripEndcap = egammaHcalPFClusterIsolationProducerRecoPhoton.etaStripEndcap,
0133 energyBarrel = egammaHcalPFClusterIsolationProducerRecoPhoton.energyBarrel,
0134 energyEndcap = egammaHcalPFClusterIsolationProducerRecoPhoton.energyEndcap,
0135 useEt = egammaHcalPFClusterIsolationProducerRecoPhoton.useEt,
0136
0137 )
0138
0139 )
0140
0141 photonsHGC = photons.clone(
0142 photonProducer = 'photonCoreHGC'
0143 )
0144
0145 islandPhotons = cms.EDProducer("PhotonProducer",
0146 photonCoreProducer = cms.InputTag("islandPhotonCore"),
0147 regressionWeightsFromDB = cms.bool(True),
0148 energyRegressionWeightsFileLocation = cms.string('/afs/cern.ch/user/b/bendavid/cmspublic/regweights/gbrph.root'),
0149 energyRegressionWeightsDBLocation = cms.string('wgbrph'),
0150 superClusterEnergyCorrFunction = cms.string("EcalClusterEnergyCorrection"),
0151 superClusterEnergyErrorFunction = cms.string("EcalClusterEnergyUncertainty"),
0152 superClusterCrackEnergyCorrFunction = cms.string("EcalClusterCrackCorrection"),
0153 photonEcalEnergyCorrFunction = cms.string("EcalClusterEnergyCorrectionObjectSpecific"),
0154 candidateP4type = cms.string("fromEcalEnergy"),
0155 isolationSumsCalculatorSet = cms.PSet(isolationSumsCalculator),
0156 mipVariableSet = cms.PSet(mipVariable),
0157 usePrimaryVertex = cms.bool(True),
0158 primaryVertexProducer = cms.InputTag('offlinePrimaryVerticesWithBS'),
0159 posCalc_t0_endcPresh = cms.double(3.6),
0160 posCalc_logweight = cms.bool(True),
0161 posCalc_w0 = cms.double(4.2),
0162 hbheInstance = cms.string(''),
0163 posCalc_t0_endc = cms.double(6.3),
0164 barrelEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
0165 hbheModule = cms.string('hbhereco'),
0166 endcapEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
0167 runMIPTagger = cms.bool(True),
0168 runMVABasedHaloTagger = cms.bool(False),
0169 highEt = cms.double(100.),
0170 minR9Barrel = cms.double(10.0),
0171 minR9Endcap = cms.double(10.0),
0172 hOverEConeSize = cms.double(0.15),
0173 hbheRecHits = egammaHBHERecHit.hbheRecHits,
0174 recHitEThresholdHB = egammaHBHERecHit.recHitEThresholdHB,
0175 recHitEThresholdHE = egammaHBHERecHit.recHitEThresholdHE,
0176 usePFThresholdsFromDB = egammaHBHERecHit.usePFThresholdsFromDB,
0177 maxHcalRecHitSeverity = egammaHBHERecHit.maxHcalRecHitSeverity,
0178 hcalRun2EffDepth = cms.bool(False),
0179 posCalc_x0 = cms.double(0.89),
0180 posCalc_t0_barl = cms.double(7.7),
0181 minSCEtBarrel = cms.double(5.0),
0182 minSCEtEndcap = cms.double(15.0),
0183 maxHoverEBarrel = cms.double(0.99),
0184 maxHoverEEndcap = cms.double(0.5),
0185 ecalRecHitSumEtOffsetBarrel = cms.double(999999999),
0186 ecalRecHitSumEtSlopeBarrel = cms.double(0.),
0187 ecalRecHitSumEtOffsetEndcap = cms.double(999999999),
0188 ecalRecHitSumEtSlopeEndcap = cms.double(0.),
0189 hcalRecHitSumEtOffsetBarrel = cms.double(999999999),
0190 hcalRecHitSumEtSlopeBarrel = cms.double(0.),
0191 hcalRecHitSumEtOffsetEndcap = cms.double(999999999),
0192 hcalRecHitSumEtSlopeEndcap = cms.double(0.),
0193 nTrackSolidConeBarrel =cms.double(999999999),
0194 nTrackSolidConeEndcap =cms.double(999999999),
0195 nTrackHollowConeBarrel =cms.double(999999999),
0196 nTrackHollowConeEndcap =cms.double(999999999),
0197 trackPtSumSolidConeBarrel =cms.double(999999999),
0198 trackPtSumSolidConeEndcap =cms.double(999999999),
0199 trackPtSumHollowConeBarrel =cms.double(999999999),
0200 trackPtSumHollowConeEndcap =cms.double(999999999),
0201 sigmaIetaIetaCutBarrel=cms.double(999999999),
0202 sigmaIetaIetaCutEndcap=cms.double(999999999),
0203 posCalcParameters = cms.PSet( T0_barl = cms.double(7.4),
0204 T0_endc = cms.double(6.3),
0205 T0_endcPresh = cms.double(3.6),
0206 LogWeighted = cms.bool(True),
0207 W0 = cms.double(4.2),
0208 X0 = cms.double(0.89)
0209 ),
0210
0211 RecHitFlagToBeExcludedEB = cleanedHybridSuperClusters.RecHitFlagToBeExcluded,
0212 RecHitSeverityToBeExcludedEB = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
0213 RecHitFlagToBeExcludedEE = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded,
0214 RecHitSeverityToBeExcludedEE = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
0215 )
0216
0217 from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
0218 egamma_lowPt_exclusive.toModify(photons,
0219 minSCEtBarrel = 1.0,
0220 minSCEtEndcap = 1.0)