From ed952acd6b5eb1fcc5ed3679a505b8276dc925d6 Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Mon, 30 Jan 2017 13:45:22 +0000 Subject: [PATCH] changing gs rec-hits to global reco --- ...py => ecalMultiAndGSGlobalRecHitEB_cfi.py} | 7 +++---- .../python/gsFixedSuperClustering_cff.py | 6 +++--- .../python/gsFixedGsfElectrons_cfi.py | 2 +- .../python/gsSimpleFixedGsfElectrons_cfi.py | 2 +- .../python/gsSimpleFixedPhotons_cfi.py | 2 +- .../python/gsFixedGEDPhotons_cfi.py | 2 +- .../ecalGlobalRecHitFromSelectedDigis_cff.py | 19 +++++++++++++++++++ .../ecalWeightRecHitFromSelectedDigis_cff.py | 19 ------------------- .../python/egammaGainSwitchFixTools.py | 2 +- .../egammaGainSwitchFixToolsForPAT_cff.py | 2 +- .../python/egammaGainSwitchFix_cff.py | 10 +++++----- .../python/egammaGainSwitchFlag_cff.py | 4 ++-- 12 files changed, 38 insertions(+), 39 deletions(-) rename RecoEcal/EgammaClusterProducers/python/{ecalMultiAndGSWeightRecHitEB_cfi.py => ecalMultiAndGSGlobalRecHitEB_cfi.py} (76%) create mode 100644 RecoEgamma/EgammaTools/python/ecalGlobalRecHitFromSelectedDigis_cff.py delete mode 100644 RecoEgamma/EgammaTools/python/ecalWeightRecHitFromSelectedDigis_cff.py diff --git a/RecoEcal/EgammaClusterProducers/python/ecalMultiAndGSWeightRecHitEB_cfi.py b/RecoEcal/EgammaClusterProducers/python/ecalMultiAndGSGlobalRecHitEB_cfi.py similarity index 76% rename from RecoEcal/EgammaClusterProducers/python/ecalMultiAndGSWeightRecHitEB_cfi.py rename to RecoEcal/EgammaClusterProducers/python/ecalMultiAndGSGlobalRecHitEB_cfi.py index 4a19f4c963eb2..398c1a6439006 100644 --- a/RecoEcal/EgammaClusterProducers/python/ecalMultiAndGSWeightRecHitEB_cfi.py +++ b/RecoEcal/EgammaClusterProducers/python/ecalMultiAndGSGlobalRecHitEB_cfi.py @@ -1,11 +1,10 @@ import FWCore.ParameterSet.Config as cms -ecalMultiAndGSWeightRecHitEB = cms.EDProducer("CombinedRecHitCollectionProducer", +ecalMultiAndGSGlobalRecHitEB = cms.EDProducer("CombinedRecHitCollectionProducer", primaryRecHits=cms.InputTag("reducedEcalRecHitsEB",processName=cms.InputTag.skipCurrentProcess()), - secondaryRecHits=cms.InputTag("ecalWeightRecHitSelectedDigis","EcalRecHitsEB"), + secondaryRecHits=cms.InputTag("ecalGlobalRecHitSelectedDigis","EcalRecHitsEB"), outputCollectionName=cms.string(""), outputReplacedHitsCollName =cms.string("gsMultiFit"), - outputReplacingHitsCollName =cms.string("gsWeight"), - + outputReplacingHitsCollName =cms.string("gsGlobal"), flagsToReplaceHit=cms.vstring("kHasSwitchToGain6","kHasSwitchToGain1") ) diff --git a/RecoEcal/EgammaClusterProducers/python/gsFixedSuperClustering_cff.py b/RecoEcal/EgammaClusterProducers/python/gsFixedSuperClustering_cff.py index 57396ff449d97..9ad10f54a4efc 100644 --- a/RecoEcal/EgammaClusterProducers/python/gsFixedSuperClustering_cff.py +++ b/RecoEcal/EgammaClusterProducers/python/gsFixedSuperClustering_cff.py @@ -10,7 +10,7 @@ particleFlowRecHitECALGSFixed=RecoParticleFlow.PFClusterProducer.particleFlowCluster_cff.particleFlowRecHitECAL.clone() particleFlowRecHitPSGSFixed=RecoParticleFlow.PFClusterProducer.particleFlowCluster_cff.particleFlowRecHitPS.clone() -particleFlowRecHitECALGSFixed.producers[0].src=cms.InputTag("ecalMultiAndGSWeightRecHitEB") +particleFlowRecHitECALGSFixed.producers[0].src=cms.InputTag("ecalMultiAndGSGlobalRecHitEB") particleFlowRecHitECALGSFixed.producers[1].src=cms.InputTag("reducedEcalRecHitsEE") particleFlowRecHitPSGSFixed.producers[0].src=cms.InputTag("reducedEcalRecHitsES") @@ -22,14 +22,14 @@ particleFlowClusterECALUncorrectedGSFixed.recHitsSource = cms.InputTag("particleFlowRecHitECALGSFixed") particleFlowClusterECALGSFixed = RecoParticleFlow.PFClusterProducer.particleFlowCluster_cff.particleFlowClusterECAL.clone() -particleFlowClusterECALGSFixed.energyCorrector.recHitsEBLabel=cms.InputTag("ecalMultiAndGSWeightRecHitEB") +particleFlowClusterECALGSFixed.energyCorrector.recHitsEBLabel=cms.InputTag("ecalMultiAndGSGlobalRecHitEB") particleFlowClusterECALGSFixed.energyCorrector.recHitsEELabel=cms.InputTag("reducedEcalRecHitsEE") particleFlowClusterECALGSFixed.inputECAL = cms.InputTag("particleFlowClusterECALUncorrectedGSFixed") particleFlowClusterECALGSFixed.inputPS = cms.InputTag("particleFlowClusterPSGSFixed") import RecoEcal.EgammaClusterProducers.particleFlowSuperClusteringSequence_cff particleFlowSuperClusterECALGSFixed=RecoEcal.EgammaClusterProducers.particleFlowSuperClusteringSequence_cff.particleFlowSuperClusterECAL.clone() -particleFlowSuperClusterECALGSFixed.regressionConfig.ecalRecHitsEB=cms.InputTag("ecalMultiAndGSWeightRecHitEB") +particleFlowSuperClusterECALGSFixed.regressionConfig.ecalRecHitsEB=cms.InputTag("ecalMultiAndGSGlobalRecHitEB") particleFlowSuperClusterECALGSFixed.regressionConfig.ecalRecHitsEE=cms.InputTag("reducedEcalRecHitsEE") particleFlowSuperClusterECALGSFixed.PFClusters = cms.InputTag("particleFlowClusterECALGSFixed") particleFlowSuperClusterECALGSFixed.ESAssociation = cms.InputTag("particleFlowClusterECALGSFixed") diff --git a/RecoEgamma/EgammaElectronProducers/python/gsFixedGsfElectrons_cfi.py b/RecoEgamma/EgammaElectronProducers/python/gsFixedGsfElectrons_cfi.py index 3c3d73a3ea1f1..92105041be951 100644 --- a/RecoEgamma/EgammaElectronProducers/python/gsFixedGsfElectrons_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/gsFixedGsfElectrons_cfi.py @@ -4,6 +4,6 @@ gsFixedGsfElectrons = cms.EDProducer("GsfElectronGSCrysFixer", newCores=cms.InputTag("gsFixedGsfElectronCores"), oldEles=cms.InputTag("gedGsfElectrons", '', cms.InputTag.skipCurrentProcess()), - ebRecHits=cms.InputTag("ecalMultiAndGSWeightRecHitEB"), + ebRecHits=cms.InputTag("ecalMultiAndGSGlobalRecHitEB"), regressionConfig = regressionModifier.clone(rhoCollection=cms.InputTag("fixedGridRhoFastjetAllTmp")), ) diff --git a/RecoEgamma/EgammaElectronProducers/python/gsSimpleFixedGsfElectrons_cfi.py b/RecoEgamma/EgammaElectronProducers/python/gsSimpleFixedGsfElectrons_cfi.py index 1705f666d16d4..25d435a272e66 100644 --- a/RecoEgamma/EgammaElectronProducers/python/gsSimpleFixedGsfElectrons_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/gsSimpleFixedGsfElectrons_cfi.py @@ -4,5 +4,5 @@ gsSimpleFixedGsfElectrons = cms.EDProducer("GsfEleGSCrysSimpleFixer", oldEles = cms.InputTag("gedGsfElectrons"), ebMultiRecHits = cms.InputTag("reducedEcalRecHitsEB"), - ebMultiAndWeightsRecHits = cms.InputTag("ecalMultiAndGSWeightRecHitEB"), + ebMultiAndWeightsRecHits = cms.InputTag("ecalMultiAndGSGlobalRecHitEB"), ) diff --git a/RecoEgamma/EgammaElectronProducers/python/gsSimpleFixedPhotons_cfi.py b/RecoEgamma/EgammaElectronProducers/python/gsSimpleFixedPhotons_cfi.py index b2cecbab8e06d..ff9ffcb2ff106 100644 --- a/RecoEgamma/EgammaElectronProducers/python/gsSimpleFixedPhotons_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/gsSimpleFixedPhotons_cfi.py @@ -4,7 +4,7 @@ gsSimpleFixedPhotons = cms.EDProducer("PhotonGSCrysSimpleFixer", oldPhos = cms.InputTag("gedPhotons"), ebMultiRecHits = cms.InputTag("reducedEcalRecHitsEB"), - ebMultiAndWeightsRecHits = cms.InputTag("ecalMultiAndGSWeightRecHitEB"), + ebMultiAndWeightsRecHits = cms.InputTag("ecalMultiAndGSGlobalRecHitEB"), energyTypesToFix = cms.vstring("ecal_standard","ecal_photons","regression1","regression2"), energyTypeForP4 = cms.string("regression2") ) diff --git a/RecoEgamma/EgammaPhotonProducers/python/gsFixedGEDPhotons_cfi.py b/RecoEgamma/EgammaPhotonProducers/python/gsFixedGEDPhotons_cfi.py index 1e07b9d23d3e8..5336b4a03b057 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/gsFixedGEDPhotons_cfi.py +++ b/RecoEgamma/EgammaPhotonProducers/python/gsFixedGEDPhotons_cfi.py @@ -5,7 +5,7 @@ gsFixedGEDPhotons = cms.EDProducer('GEDPhotonGSCrysFixer', photons = cms.InputTag('gedPhotons', '', cms.InputTag.skipCurrentProcess()), newCores = cms.InputTag('gsFixedGEDPhotonCores'), - barrelEcalHits=cms.InputTag("ecalMultiAndGSWeightRecHitEB"), + barrelEcalHits=cms.InputTag("ecalMultiAndGSGlobalRecHitEB"), primaryVertexProducer = cms.InputTag('offlinePrimaryVerticesWithBS'), # rest for regression minR9Barrel = cms.double(0.94), diff --git a/RecoEgamma/EgammaTools/python/ecalGlobalRecHitFromSelectedDigis_cff.py b/RecoEgamma/EgammaTools/python/ecalGlobalRecHitFromSelectedDigis_cff.py new file mode 100644 index 0000000000000..f1f2a0465d0ea --- /dev/null +++ b/RecoEgamma/EgammaTools/python/ecalGlobalRecHitFromSelectedDigis_cff.py @@ -0,0 +1,19 @@ +import FWCore.ParameterSet.Config as cms + +import RecoLocalCalo.EcalRecProducers.ecalGlobalUncalibRecHit_cfi + +ecalGlobalUncalibRecHitSelectedDigis = RecoLocalCalo.EcalRecProducers.ecalGlobalUncalibRecHit_cfi.ecalGlobalUncalibRecHit.clone() +ecalGlobalUncalibRecHitSelectedDigis.EBdigiCollection = cms.InputTag("selectDigi","selectedEcalEBDigiCollection") +ecalGlobalUncalibRecHitSelectedDigis.EEdigiCollection = cms.InputTag("selectDigi","selectedEcalEEDigiCollection") + +import RecoLocalCalo.EcalRecProducers.ecalRecHit_cfi +ecalGlobalRecHitSelectedDigis = RecoLocalCalo.EcalRecProducers.ecalRecHit_cfi.ecalRecHit.clone() +ecalGlobalRecHitSelectedDigis.EEuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHitSelectedDigis","EcalUncalibRecHitsEE") +ecalGlobalRecHitSelectedDigis.EBuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHitSelectedDigis","EcalUncalibRecHitsEB") +ecalGlobalRecHitSelectedDigis.recoverEBFE = cms.bool(False) +ecalGlobalRecHitSelectedDigis.recoverEEFE = cms.bool(False) +ecalGlobalRecHitSelectedDigis.killDeadChannels = cms.bool(False) + +ecalGlobalLocalRecoFromSelectedDigis =cms.Sequence(ecalGlobalUncalibRecHitSelectedDigis* + ecalGlobalRecHitSelectedDigis) + diff --git a/RecoEgamma/EgammaTools/python/ecalWeightRecHitFromSelectedDigis_cff.py b/RecoEgamma/EgammaTools/python/ecalWeightRecHitFromSelectedDigis_cff.py deleted file mode 100644 index 670ee265bd650..0000000000000 --- a/RecoEgamma/EgammaTools/python/ecalWeightRecHitFromSelectedDigis_cff.py +++ /dev/null @@ -1,19 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -import RecoLocalCalo.EcalRecProducers.ecalWeightUncalibRecHit_cfi - -ecalWeightUncalibRecHitSelectedDigis = RecoLocalCalo.EcalRecProducers.ecalWeightUncalibRecHit_cfi.ecalWeightUncalibRecHit.clone() -ecalWeightUncalibRecHitSelectedDigis.EBdigiCollection = cms.InputTag("selectDigi","selectedEcalEBDigiCollection") -ecalWeightUncalibRecHitSelectedDigis.EEdigiCollection = cms.InputTag("selectDigi","selectedEcalEEDigiCollection") - -import RecoLocalCalo.EcalRecProducers.ecalRecHit_cfi -ecalWeightRecHitSelectedDigis = RecoLocalCalo.EcalRecProducers.ecalRecHit_cfi.ecalRecHit.clone() -ecalWeightRecHitSelectedDigis.EEuncalibRecHitCollection = cms.InputTag("ecalWeightUncalibRecHitSelectedDigis","EcalUncalibRecHitsEE") -ecalWeightRecHitSelectedDigis.EBuncalibRecHitCollection = cms.InputTag("ecalWeightUncalibRecHitSelectedDigis","EcalUncalibRecHitsEB") -ecalWeightRecHitSelectedDigis.recoverEBFE = cms.bool(False) -ecalWeightRecHitSelectedDigis.recoverEEFE = cms.bool(False) -ecalWeightRecHitSelectedDigis.killDeadChannels = cms.bool(False) - -ecalWeightLocalRecoFromSelectedDigis =cms.Sequence(ecalWeightUncalibRecHitSelectedDigis* - ecalWeightRecHitSelectedDigis) - diff --git a/RecoEgamma/EgammaTools/python/egammaGainSwitchFixTools.py b/RecoEgamma/EgammaTools/python/egammaGainSwitchFixTools.py index 4a86ea77b6ef8..82519ae0a4adf 100644 --- a/RecoEgamma/EgammaTools/python/egammaGainSwitchFixTools.py +++ b/RecoEgamma/EgammaTools/python/egammaGainSwitchFixTools.py @@ -40,7 +40,7 @@ def replaceModulesInSeq(process,seq,names_dict): def customiseForAODGainSwitchFix(process,newNameSuffex=""): process.load("RecoEgamma.EgammaTools.egammaGainSwitchFix_cff") - names_dict = {"ecalMultiAndGSWeightRecHitEB" : "reducedEcalRecHitsEB" + newNameSuffex, + names_dict = {"ecalMultiAndGSGlobalRecHitEB" : "reducedEcalRecHitsEB" + newNameSuffex, "particleFlowRecHitECALGSFixed" : "particleFlowRecHitECAL" + newNameSuffex, "particleFlowRecHitPSGSFixed" : "particleFlowRecHitPS" + newNameSuffex, "particleFlowClusterPSGSFixed" : "particleFlowClusterPS" + newNameSuffex, diff --git a/RecoEgamma/EgammaTools/python/egammaGainSwitchFixToolsForPAT_cff.py b/RecoEgamma/EgammaTools/python/egammaGainSwitchFixToolsForPAT_cff.py index ff7d159fcec46..33757036cbaf2 100644 --- a/RecoEgamma/EgammaTools/python/egammaGainSwitchFixToolsForPAT_cff.py +++ b/RecoEgamma/EgammaTools/python/egammaGainSwitchFixToolsForPAT_cff.py @@ -127,7 +127,7 @@ def customizeGSFixForPAT(process): cms.InputTag("PhotonCutBasedIDLooseEMGSFixed"), cms.InputTag("PhotonCutBasedIDTightGSFixed") ) - process.reducedEgamma.barrelEcalHits = cms.InputTag("ecalMultiAndGSWeightRecHitEB") + process.reducedEgamma.barrelEcalHits = cms.InputTag("ecalMultiAndGSGlobalRecHitEB") process.reducedEgamma.endcapEcalHits = cms.InputTag("reducedEcalRecHitsEE") process.reducedEgamma.preshowerEcalHits = cms.InputTag("reducedEcalRecHitsES") diff --git a/RecoEgamma/EgammaTools/python/egammaGainSwitchFix_cff.py b/RecoEgamma/EgammaTools/python/egammaGainSwitchFix_cff.py index dd2ad1bd02a4d..945f428e89a1c 100644 --- a/RecoEgamma/EgammaTools/python/egammaGainSwitchFix_cff.py +++ b/RecoEgamma/EgammaTools/python/egammaGainSwitchFix_cff.py @@ -1,10 +1,10 @@ import FWCore.ParameterSet.Config as cms -#this module re-makes the rec-hits using the weights reco for hits saved in ecal selected digis -from RecoEgamma.EgammaTools.ecalWeightRecHitFromSelectedDigis_cff import * +#this module re-makes the rec-hits using the global (weights+ratio) reco for hits saved in ecal selected digis +from RecoEgamma.EgammaTools.ecalGlobalRecHitFromSelectedDigis_cff import * #this module makes a new collection of barrel rechits where gain switched multifit crystals are swapped #with weights reco hits if availible -from RecoEcal.EgammaClusterProducers.ecalMultiAndGSWeightRecHitEB_cfi import * +from RecoEcal.EgammaClusterProducers.ecalMultiAndGSGlobalRecHitEB_cfi import * #this sequence re-runs PF clustering with "GSFixed" suffext from RecoEcal.EgammaClusterProducers.gsFixedSuperClustering_cff import * #this module remakes the refined EGamma superclusters although it has to approximate them as there is not @@ -20,8 +20,8 @@ from RecoEgamma.EgammaPhotonProducers.gsFixedGEDPhotons_cfi import * egammaGainSwitchLocalFixSequence = cms.Sequence( - ecalWeightLocalRecoFromSelectedDigis* - ecalMultiAndGSWeightRecHitEB + ecalGlobalLocalRecoFromSelectedDigis* + ecalMultiAndGSGlobalRecHitEB ) egammaGainSwitchFixSequence = cms.Sequence( diff --git a/RecoEgamma/EgammaTools/python/egammaGainSwitchFlag_cff.py b/RecoEgamma/EgammaTools/python/egammaGainSwitchFlag_cff.py index f3c8aa4915e12..689e109a9d517 100644 --- a/RecoEgamma/EgammaTools/python/egammaGainSwitchFlag_cff.py +++ b/RecoEgamma/EgammaTools/python/egammaGainSwitchFlag_cff.py @@ -2,8 +2,8 @@ PhotonGainSwitchFlagProducer = cms.EDProducer('PhotonGainSwitchFlagProducer', src = cms.InputTag('reducedEgamma','reducedGedPhotons'), - ebRecHits = cms.InputTag('ecalMultiAndGSWeightRecHitEB')) + ebRecHits = cms.InputTag('ecalMultiAndGSGlobalRecHitEB')) ElectronGainSwitchFlagProducer = cms.EDProducer('ElectronGainSwitchFlagProducer', src = cms.InputTag('reducedEgamma', 'reducedGedGsfElectrons'), - ebRecHits = cms.InputTag('ecalMultiAndGSWeightRecHitEB')) + ebRecHits = cms.InputTag('ecalMultiAndGSGlobalRecHitEB'))