Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop type specs in RecoParticleFlow #31389

Merged
merged 2 commits into from Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -22,7 +22,7 @@
from RecoParticleFlow.PFProducer.chargedHadronPFTrackIsolation_cfi import *

from RecoJets.JetProducers.fixedGridRhoProducerFastjet_cfi import *
fixedGridRhoFastjetAllTmp = fixedGridRhoFastjetAll.clone(pfCandidatesTag = cms.InputTag("particleFlowTmp"))
fixedGridRhoFastjetAllTmp = fixedGridRhoFastjetAll.clone(pfCandidatesTag = "particleFlowTmp")

particleFlowTmpTask = cms.Task(particleFlowTmp)
particleFlowTmpSeq = cms.Sequence(particleFlowTmpTask)
Expand Down
Expand Up @@ -9,8 +9,9 @@

import Geometry.CaloEventSetup.caloTowerConstituents_cfi

CaloTowerConstituentsMapBuilder = Geometry.CaloEventSetup.caloTowerConstituents_cfi.caloTowerConstituents.clone()
CaloTowerConstituentsMapBuilder.MapFile = "Geometry/CaloTopology/data/CaloTowerEEGeometric.map.gz"
CaloTowerConstituentsMapBuilder = Geometry.CaloEventSetup.caloTowerConstituents_cfi.caloTowerConstituents.clone(
MapFile = "Geometry/CaloTopology/data/CaloTowerEEGeometric.map.gz"
)

particleFlowRecoTask = cms.Task(
ckftracksTask,
Expand Down
Expand Up @@ -91,7 +91,7 @@
timeResolutionCalcEndcap = _timeResolutionECALEndcap,
)
_positionCalcECAL_3x3_nodepth = _positionCalcECAL_all_nodepth.clone(
posCalcNCrystals = cms.int32(9)
posCalcNCrystals = 9
)
_positionCalcECAL_all_withdepth = cms.PSet(
algoName = cms.string("ECAL2DPositionCalcWithDepthCorr"),
Expand Down
Expand Up @@ -144,5 +144,5 @@

# HCALonly WF
particleFlowClusterHBHEOnly = particleFlowClusterHBHE.clone(
recHitsSource = cms.InputTag("particleFlowRecHitHBHEOnly")
recHitsSource = "particleFlowRecHitHBHEOnly"
)
Expand Up @@ -53,5 +53,5 @@

# HCALonly WF
particleFlowClusterHCALOnly = particleFlowClusterHCAL.clone(
clustersSource = cms.InputTag("particleFlowClusterHBHEOnly")
clustersSource = "particleFlowClusterHBHEOnly"
)
Expand Up @@ -76,7 +76,7 @@
)

_positionCalcHF_all_nodepth = _positionCalcHF_cross_nodepth.clone(
posCalcNCrystals = cms.int32(-1)
posCalcNCrystals = -1
)

#pf clusters
Expand Down
Expand Up @@ -49,7 +49,7 @@
)

_positionCalcHO_all_nodepth = _positionCalcHO_cross_nodepth.clone(
posCalcNCrystals = cms.int32(-1)
posCalcNCrystals = -1
)

#pf clusters
Expand Down
@@ -1,5 +1,6 @@
import FWCore.ParameterSet.Config as cms
from RecoParticleFlow.PFClusterProducer.particleFlowClusterECALUncorrected_cfi import *

particleFlowClusterOOTECALUncorrected = particleFlowClusterECALUncorrected.clone()
particleFlowClusterOOTECALUncorrected.recHitsSource = cms.InputTag("particleFlowRecHitOOTECAL")
particleFlowClusterOOTECALUncorrected = particleFlowClusterECALUncorrected.clone(
recHitsSource = "particleFlowRecHitOOTECAL"
)
@@ -1,8 +1,9 @@
import FWCore.ParameterSet.Config as cms
from RecoParticleFlow.PFClusterProducer.particleFlowClusterECAL_cff import *

particleFlowClusterOOTECAL = particleFlowClusterECAL.clone()
particleFlowClusterOOTECAL.inputECAL = cms.InputTag("particleFlowClusterOOTECALUncorrected")
particleFlowClusterOOTECAL = particleFlowClusterECAL.clone(
inputECAL = "particleFlowClusterOOTECALUncorrected"
)

from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
run2_miniAOD_80XLegacy.toModify(particleFlowClusterOOTECAL,
Expand Down
Expand Up @@ -2,8 +2,8 @@

from RecoParticleFlow.PFClusterProducer.particleFlowClusterTimeAssignerDefault_cfi import *

particleFlowTimeAssignerECAL = particleFlowClusterTimeAssignerDefault.clone()
particleFlowTimeAssignerECAL.timeSrc = cms.InputTag('ecalBarrelClusterFastTimer:PerfectResolutionModel')
particleFlowTimeAssignerECAL.timeResoSrc = cms.InputTag('ecalBarrelClusterFastTimer:PerfectResolutionModelResolution')

particleFlowTimeAssignerECAL = particleFlowClusterTimeAssignerDefault.clone(
timeSrc = 'ecalBarrelClusterFastTimer:PerfectResolutionModel',
timeResoSrc = 'ecalBarrelClusterFastTimer:PerfectResolutionModelResolution'
)

Expand Up @@ -56,5 +56,5 @@

# HCALonly WF
particleFlowRecHitHBHEOnly = particleFlowRecHitHBHE.clone(
producers = { 0: dict(src = cms.InputTag("hbheprereco","")) }
producers = { 0: dict(src = "hbheprereco:") }
)
@@ -1,10 +1,10 @@
import FWCore.ParameterSet.Config as cms
from RecoParticleFlow.PFClusterProducer.particleFlowRecHitECAL_cfi import *

particleFlowRecHitOOTECAL = particleFlowRecHitECAL.clone()
particleFlowRecHitOOTECAL.producers[0].qualityTests[1].timingCleaning = False
particleFlowRecHitOOTECAL.producers[1].qualityTests[1].timingCleaning = False

particleFlowRecHitOOTECAL = particleFlowRecHitECAL.clone(
producers = {0 : dict(qualityTests = {1 : dict(timingCleaning = False) } ),
1 : dict(qualityTests = {1 : dict(timingCleaning = False) } )}
)
from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy

## EB
Expand Down
Expand Up @@ -74,22 +74,15 @@



elPFIsoValueCharged04PFId = elPFIsoValueCharged03PFId.clone()
elPFIsoValueCharged04PFId.deposits[0].deltaR = cms.double(0.4)
elPFIsoValueCharged04PFId = elPFIsoValueCharged03PFId.clone(deposits = {0: dict(deltaR = 0.4)})

elPFIsoValueChargedAll04PFId = elPFIsoValueChargedAll03PFId.clone(deposits = {0: dict(deltaR = 0.4)})

elPFIsoValueChargedAll04PFId = elPFIsoValueChargedAll03PFId.clone()
elPFIsoValueChargedAll04PFId.deposits[0].deltaR = cms.double(0.4)
elPFIsoValueGamma04PFId = elPFIsoValueGamma03PFId.clone(deposits = {0: dict(deltaR = 0.4)})

elPFIsoValueGamma04PFId = elPFIsoValueGamma03PFId.clone()
elPFIsoValueGamma04PFId.deposits[0].deltaR = cms.double(0.4)
elPFIsoValueNeutral04PFId = elPFIsoValueNeutral03PFId.clone(deposits = {0: dict(deltaR = 0.4)})


elPFIsoValueNeutral04PFId = elPFIsoValueNeutral03PFId.clone()
elPFIsoValueNeutral04PFId.deposits[0].deltaR = cms.double(0.4)

elPFIsoValuePU04PFId = elPFIsoValuePU03PFId.clone()
elPFIsoValuePU04PFId.deposits[0].deltaR = cms.double(0.4)
elPFIsoValuePU04PFId = elPFIsoValuePU03PFId.clone(deposits = {0: dict(deltaR = 0.4)})

##########Now the PFNoId
elPFIsoValueCharged03NoPFId = elPFIsoValueCharged03PFId.clone()
Expand Down
48 changes: 26 additions & 22 deletions RecoParticleFlow/PFProducer/python/particleFlowEGamma_cff.py
Expand Up @@ -20,39 +20,43 @@
from RecoEgamma.EgammaIsolationAlgos.egmIsolationDefinitions_cff import pfNoPileUpCandidates
from RecoEgamma.EgammaIsolationAlgos.egmIsoConeDefinitions_cfi import IsoConeDefinitions

particleBasedIsolationTmp = _particleBasedIsolation.clone()
particleBasedIsolationTmp.photonProducer = cms.InputTag("gedPhotonsTmp")
particleBasedIsolationTmp.electronProducer = cms.InputTag("gedGsfElectronsTmp")
particleBasedIsolationTmp.pfCandidates = cms.InputTag("particleFlowTmp")
particleBasedIsolationTmp.valueMapPhoPFblockIso = cms.string("gedPhotonsTmp")
particleBasedIsolationTmp.valueMapElePFblockIso = cms.string("gedGsfElectronsTmp")

egmPhotonIsolationCITK = _egmPhotonIsolationAOD.clone()
egmElectronIsolationCITK = _egmElectronIsolationCITK.clone()
egmElectronIsolationPileUpCITK = _egmElectronIsolationCITKPileUp.clone()

particleBasedIsolationTmp = _particleBasedIsolation.clone(
photonProducer = "gedPhotonsTmp",
electronProducer = "gedGsfElectronsTmp",
pfCandidates = "particleFlowTmp",
valueMapPhoPFblockIso = "gedPhotonsTmp",
valueMapElePFblockIso = "gedGsfElectronsTmp"
)
#change particleBasedIsolation object to tmp
IsoConeDefinitionsPhotonsTmp = copy.deepcopy(IsoConeDefinitions)
for iPSet in IsoConeDefinitionsPhotonsTmp:
iPSet.particleBasedIsolation = cms.InputTag("particleBasedIsolationTmp", "gedPhotonsTmp")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
iPSet.particleBasedIsolation = cms.InputTag("particleBasedIsolationTmp", "gedPhotonsTmp")
iPSet.particleBasedIsolation = "particleBasedIsolationTmp:gedPhotonsTmp"


#photon isolation sums
egmPhotonIsolationCITK = _egmPhotonIsolationAOD.clone(
srcToIsolate = "gedPhotonsTmp",
srcForIsolationCone = "pfNoPileUpCandidates",
isolationConeDefinitions = IsoConeDefinitionsPhotonsTmp
)

#electrons isolation sums
egmElectronIsolationCITK = _egmElectronIsolationCITK.clone(
srcToIsolate = "gedGsfElectronsTmp",
srcForIsolationCone = "pfNoPileUpCandidates"
)

for iPSet in egmElectronIsolationCITK.isolationConeDefinitions:
iPSet.particleBasedIsolation = cms.InputTag("particleBasedIsolationTmp", "gedGsfElectronsTmp")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
iPSet.particleBasedIsolation = cms.InputTag("particleBasedIsolationTmp", "gedGsfElectronsTmp")
iPSet.particleBasedIsolation = "particleBasedIsolationTmp:gedGsfElectronsTmp"


#electrons pileup isolation sum
egmElectronIsolationPileUpCITK = _egmElectronIsolationCITKPileUp.clone(
srcToIsolate = "gedGsfElectronsTmp",
srcForIsolationCone = "pfPileUpAllChargedParticles"
)

for iPSet in egmElectronIsolationPileUpCITK.isolationConeDefinitions:
iPSet.particleBasedIsolation = cms.InputTag("particleBasedIsolationTmp", "gedGsfElectronsTmp")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
iPSet.particleBasedIsolation = cms.InputTag("particleBasedIsolationTmp", "gedGsfElectronsTmp")
iPSet.particleBasedIsolation = "particleBasedIsolationTmp:gedGsfElectronsTmp"


#photon isolation sums
egmPhotonIsolationCITK.srcToIsolate = cms.InputTag("gedPhotonsTmp")
egmPhotonIsolationCITK.srcForIsolationCone = cms.InputTag("pfNoPileUpCandidates")
egmPhotonIsolationCITK.isolationConeDefinitions = IsoConeDefinitionsPhotonsTmp
#electrons isolation sums
egmElectronIsolationCITK.srcToIsolate = cms.InputTag("gedGsfElectronsTmp")
egmElectronIsolationCITK.srcForIsolationCone = cms.InputTag("pfNoPileUpCandidates")
#electrons pileup isolation sum
egmElectronIsolationPileUpCITK.srcToIsolate = cms.InputTag("gedGsfElectronsTmp")
egmElectronIsolationPileUpCITK.srcForIsolationCone = cms.InputTag("pfPileUpAllChargedParticles")

photonIDValueMaps = cms.EDProducer(
"PhotonIDValueMapProducer",
ebReducedRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
Expand Down
Expand Up @@ -3,10 +3,10 @@
import RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi

pfElectronInterestingEcalDetIdEB = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
basicClustersLabel = cms.InputTag("pfElectronTranslator","pf"),
recHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB")
basicClustersLabel = "pfElectronTranslator:pf",
recHitsLabel = "ecalRecHit:EcalRecHitsEB"
)
pfElectronInterestingEcalDetIdEE = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
basicClustersLabel = cms.InputTag("pfElectronTranslator","pf"),
recHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE")
basicClustersLabel = "pfElectronTranslator:pf",
recHitsLabel = "ecalRecHit:EcalRecHitsEE"
)
11 changes: 6 additions & 5 deletions RecoParticleFlow/PFProducer/python/pfLinker_cff.py
Expand Up @@ -2,10 +2,11 @@

import RecoParticleFlow.PFProducer.pfLinker_cfi
import RecoParticleFlow.PFProducer.particleFlowTmpPtrs_cfi
particleFlow = RecoParticleFlow.PFProducer.pfLinker_cfi.pfLinker.clone()
particleFlow.PFCandidate = [cms.InputTag("particleFlowTmp")]
particleFlowPtrs = RecoParticleFlow.PFProducer.particleFlowTmpPtrs_cfi.particleFlowTmpPtrs.clone()
particleFlowPtrs.src = "particleFlow"

particleFlow = RecoParticleFlow.PFProducer.pfLinker_cfi.pfLinker.clone(
PFCandidate = ["particleFlowTmp"]
)
particleFlowPtrs = RecoParticleFlow.PFProducer.particleFlowTmpPtrs_cfi.particleFlowTmpPtrs.clone(
src = "particleFlow"
)
from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
phase2_hgcal.toModify(particleFlow, forceElectronsInHGCAL = True)
Expand Up @@ -2,11 +2,11 @@

import RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi
pfPhotonInterestingEcalDetIdEB = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
basicClustersLabel = cms.InputTag("pfPhotonTranslator","pfphot"),
recHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB")
basicClustersLabel = "pfPhotonTranslator:pfphot",
recHitsLabel = "ecalRecHit:EcalRecHitsEB"
)

pfPhotonInterestingEcalDetIdEE = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
basicClustersLabel = cms.InputTag("pfPhotonTranslator","pfphot"),
recHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE")
basicClustersLabel = "pfPhotonTranslator:pfphot",
recHitsLabel = "ecalRecHit:EcalRecHitsEE"
)
@@ -1,5 +1,9 @@
import TrackingTools.GsfTracking.GsfElectronMaterialEffects_cfi
ElectronMaterialEffects_forPreId = TrackingTools.GsfTracking.GsfElectronMaterialEffects_cfi.ElectronMaterialEffects.clone()

ElectronMaterialEffects_forPreId = TrackingTools.GsfTracking.GsfElectronMaterialEffects_cfi.ElectronMaterialEffects.clone(
ComponentName = 'ElectronMaterialEffects_forPreId',
BetheHeitlerParametrization = 'BetheHeitler_cdfmom_nC3_O5.par'
)
from RecoParticleFlow.PFTracking.trackerDrivenElectronSeeds_cfi import *
CloseComponentsMerger_forPreId = cms.ESProducer("CloseComponentsMergerESProducer5D",
ComponentName = cms.string('CloseComponentsMerger_forPreId'),
Expand All @@ -24,5 +28,3 @@
RecoGeometry = cms.string('GlobalDetLayerGeometry')
)

ElectronMaterialEffects_forPreId.ComponentName = 'ElectronMaterialEffects_forPreId'
ElectronMaterialEffects_forPreId.BetheHeitlerParametrization = 'BetheHeitler_cdfmom_nC3_O5.par'
Expand Up @@ -59,11 +59,11 @@
# Therefore we let the seeds depend on the 'before mixing' generalTracks collection
# TODO: investigate whether the dependence on trajectories can be avoided
from Configuration.Eras.Modifier_fastSim_cff import fastSim
trackerDrivenElectronSeedsTmp = trackerDrivenElectronSeeds.clone(TkColList = cms.VInputTag(cms.InputTag("generalTracksBeforeMixing")))
trackerDrivenElectronSeedsTmp = trackerDrivenElectronSeeds.clone(TkColList = ["generalTracksBeforeMixing"])
import FastSimulation.Tracking.ElectronSeedTrackRefFix_cfi
_fastSim_trackerDrivenElectronSeeds = FastSimulation.Tracking.ElectronSeedTrackRefFix_cfi.fixedTrackerDrivenElectronSeeds.clone()
_fastSim_trackerDrivenElectronSeeds.seedCollection.setModuleLabel("trackerDrivenElectronSeedsTmp"),
_fastSim_trackerDrivenElectronSeeds.idCollection = cms.VInputTag("trackerDrivenElectronSeedsTmp:preid",)
_fastSim_trackerDrivenElectronSeeds.seedCollection.setModuleLabel("trackerDrivenElectronSeedsTmp")
_fastSim_trackerDrivenElectronSeeds.idCollection = ["trackerDrivenElectronSeedsTmp:preid",]
fastSim.toReplaceWith(trackerDrivenElectronSeeds,_fastSim_trackerDrivenElectronSeeds)

from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
Expand Down