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

Moving Sequence to Task :RecoLocalMuon RecoMuon RecoEgamma RecoEcal RecoHI #27640

Merged
merged 6 commits into from Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion RecoEcal/Configuration/python/RecoEcalCosmics_cff.py
Expand Up @@ -17,5 +17,6 @@
from RecoEcal.EgammaClusterProducers.cosmicClusteringSequence_cff import *
# create path with all clustering algos
# NB: preshower MUST be run after island clustering in the endcap
ecalClustersCosmics = cms.Sequence(hybridClusteringSequence*cosmicClusteringSequence)
ecalClustersCosmicsTask = cms.Task(hybridClusteringTask,cosmicClusteringTask)
ecalClustersCosmics = cms.Sequence(ecalClustersCosmicsTask)

14 changes: 9 additions & 5 deletions RecoEcal/Configuration/python/RecoEcal_cff.py
Expand Up @@ -18,8 +18,12 @@
#particle flow super clustering sequence
from RecoEcal.EgammaClusterProducers.particleFlowSuperClusteringSequence_cff import *

ecalClustersNoPFBox = cms.Sequence(hybridClusteringSequence*multi5x5ClusteringSequence*multi5x5PreshowerClusteringSequence)
ecalClusters = cms.Sequence(ecalClustersNoPFBox*particleFlowSuperClusteringSequence)
ecalClustersNoPFBoxTask = cms.Task(hybridClusteringTask,
multi5x5ClusteringTask,
multi5x5PreshowerClusteringTask)
ecalClustersNoPFBox = cms.Sequence(ecalClustersNoPFBoxTask)
ecalClustersTask = cms.Task(ecalClustersNoPFBoxTask, particleFlowSuperClusteringTask)
ecalClusters = cms.Sequence(ecalClustersTask)

from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
Expand All @@ -29,7 +33,7 @@

from RecoEcal.EgammaClusterProducers.islandClusteringSequence_cff import *

_ecalClustersHI = ecalClusters.copy()
_ecalClustersHI += islandClusteringSequence
_ecalClustersHITask = ecalClustersTask.copy()
_ecalClustersHITask.add(islandClusteringTask)
for e in [pA_2016, peripheralPbPb, pp_on_AA_2018, pp_on_XeXe_2017, ppRef_2017]:
e.toReplaceWith(ecalClusters, _ecalClustersHI)
e.toReplaceWith(ecalClustersTask, _ecalClustersHITask)
Expand Up @@ -13,4 +13,5 @@
# SuperCluster with Preshower producer
#include "RecoEcal/EgammaClusterProducers/data/SuperClustersWithPreshower.cfi"
# create sequence for clustering
cosmicClusteringSequence = cms.Sequence(cosmicBasicClusters * cosmicSuperClusters)
cosmicClusteringTask = cms.Task(cosmicBasicClusters, cosmicSuperClusters)
cosmicClusteringSequence = cms.Sequence(cosmicClusteringTask)
Expand Up @@ -8,5 +8,6 @@
# Producer for energy corrections
from RecoEcal.EgammaClusterProducers.correctedDynamicHybridSuperClusters_cfi import *
# hybrid clustering sequence
dynamicHybridClusteringSequence = cms.Sequence(dynamicHybridSuperClusters*correctedDynamicHybridSuperClusters)
dynamicHybridClusteringTask = cms.Task(dynamicHybridSuperClusters, correctedDynamicHybridSuperClusters)
dynamicHybridClusteringSequence = cms.Sequence(dynamicHybridClusteringTask)

Expand Up @@ -20,5 +20,12 @@
from RecoEcal.EgammaClusterProducers.ecalDigiSelector_cff import *
# create path with all clustering algos
# NB: preshower MUST be run after island clustering in the endcap
ecalClusteringSequence = cms.Sequence(islandClusteringSequence*hybridClusteringSequence*preshowerClusteringSequence*dynamicHybridClusteringSequence*multi5x5ClusteringSequence*multi5x5PreshowerClusteringSequence * seldigis)
ecalClusteringTask = cms.Task(islandClusteringTask,
hybridClusteringTask,
preshowerClusteringTask,
dynamicHybridClusteringTask,
multi5x5ClusteringTask,
multi5x5PreshowerClusteringTask,
seldigisTask)
ecalClusteringSequence = cms.Sequence(ecalClusteringTask)

Expand Up @@ -10,5 +10,8 @@
# FixedMatrix SuperCluster with Preshower producer
from RecoEcal.EgammaClusterProducers.fixedMatrixSuperClustersWithPreshower_cfi import *
# create sequence for fixedMatrix clustering
fixedMatrixClusteringSequence = cms.Sequence(fixedMatrixBasicClusters*fixedMatrixSuperClusters*fixedMatrixSuperClustersWithPreshower)
fixedMatrixClusteringTask = cms.Task(fixedMatrixBasicClusters,
fixedMatrixSuperClusters,
fixedMatrixSuperClustersWithPreshower)
fixedMatrixClusteringSequence = cms.Sequence(fixedMatrixClusteringTask)

Expand Up @@ -10,5 +10,6 @@
# producer for preshower cluster shapes
from RecoEcal.EgammaClusterProducers.fixedMatrixPreshowerClusterShape_cfi import *
# create sequence for preshower clustering
fixedMatrixPreshowerClusteringSequence = cms.Sequence(correctedFixedMatrixSuperClustersWithPreshower*fixedMatrixPreshowerClusterShape)
fixedMatrixPreshowerClusteringTask = cms.Task(correctedFixedMatrixSuperClustersWithPreshower,fixedMatrixPreshowerClusterShape)
fixedMatrixPreshowerClusteringSequence = cms.Sequence(fixedMatrixPreshowerClusteringTask)

Expand Up @@ -13,5 +13,9 @@
from RecoEcal.EgammaClusterProducers.correctedIslandBarrelSuperClusters_cfi import *
from RecoEcal.EgammaClusterProducers.correctedIslandEndcapSuperClusters_cfi import *
# create sequence for island clustering
islandClusteringSequence = cms.Sequence(islandBasicClusters*islandSuperClusters*correctedIslandBarrelSuperClusters*correctedIslandEndcapSuperClusters)
islandClusteringTask = cms.Task(islandBasicClusters,
islandSuperClusters,
correctedIslandBarrelSuperClusters,
correctedIslandEndcapSuperClusters)
islandClusteringSequence = cms.Sequence(islandClusteringTask)

Expand Up @@ -8,7 +8,8 @@
# Producer for energy corrections
#from RecoEcal.EgammaClusterProducers.correctedDynamicHybridSuperClusters_cfi import *
# PFECAL super clusters, either hybrid-clustering clone (Box) or mustache.
particleFlowSuperClusteringSequence = cms.Sequence(particleFlowSuperClusterECAL)
particleFlowSuperClusteringTask = cms.Task(particleFlowSuperClusterECAL)
particleFlowSuperClusteringSequence = cms.Sequence(particleFlowSuperClusteringTask)

particleFlowSuperClusterHGCal = particleFlowSuperClusterECAL.clone()
from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
Expand All @@ -29,9 +30,9 @@
particleFlowSuperClusterHGCalFromMultiCl,
PFClusters = cms.InputTag('particleFlowClusterHGCalFromMultiCl')
)
_phase2_hgcal_particleFlowSuperClusteringSequence = particleFlowSuperClusteringSequence.copy()
_phase2_hgcal_particleFlowSuperClusteringSequence += particleFlowSuperClusterHGCal
_phase2_hgcal_particleFlowSuperClusteringSequence += particleFlowSuperClusterHGCalFromMultiCl
_phase2_hgcal_particleFlowSuperClusteringTask = particleFlowSuperClusteringTask.copy()
_phase2_hgcal_particleFlowSuperClusteringTask.add(particleFlowSuperClusterHGCal)
_phase2_hgcal_particleFlowSuperClusteringTask.add(particleFlowSuperClusterHGCalFromMultiCl)

phase2_hgcal.toReplaceWith( particleFlowSuperClusteringSequence, _phase2_hgcal_particleFlowSuperClusteringSequence )
phase2_hgcal.toReplaceWith( particleFlowSuperClusteringTask, _phase2_hgcal_particleFlowSuperClusteringTask )

Expand Up @@ -10,5 +10,6 @@
# producer for preshower cluster shapes
from RecoEcal.EgammaClusterProducers.preshowerClusterShape_cfi import *
# create sequence for preshower clustering
preshowerClusteringSequence = cms.Sequence(correctedEndcapSuperClustersWithPreshower*preshowerClusterShape)
preshowerClusteringTask = cms.Task(correctedEndcapSuperClustersWithPreshower, preshowerClusterShape)
preshowerClusteringSequence = cms.Sequence(preshowerClusteringTask)

16 changes: 9 additions & 7 deletions RecoEgamma/EgammaPhotonProducers/python/photonSequence_cff.py
Expand Up @@ -7,16 +7,18 @@
from RecoEgamma.EgammaPhotonProducers.photonCore_cfi import *
from RecoEgamma.EgammaPhotonProducers.photons_cfi import *

photonSequence = cms.Sequence( photonCore + photons )
_photonSequenceFromMultiCl = photonSequence.copy()
_photonSequenceFromMultiCl += ( photonCoreFromMultiCl + photonsFromMultiCl)
_photonSequenceWithIsland = photonSequence.copy()
_photonSequenceWithIsland += ( islandPhotonCore + islandPhotons )
photonTask = cms.Task(photonCore,photons)
photonSequence = cms.Sequence(photonTask)

_photonTaskFromMultiCl = photonTask.copy()
_photonTaskFromMultiCl.add(photonCoreFromMultiCl,photonsFromMultiCl)
_photonTaskWithIsland = photonTask.copy()
_photonTaskWithIsland.add(islandPhotonCore,islandPhotons)


from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
phase2_hgcal.toReplaceWith(
photonSequence, _photonSequenceFromMultiCl
photonTask, _photonTaskFromMultiCl
)

from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
Expand All @@ -25,4 +27,4 @@
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
for e in [pA_2016, peripheralPbPb, pp_on_AA_2018, pp_on_XeXe_2017, ppRef_2017]:
e.toReplaceWith(photonSequence, _photonSequenceWithIsland)
e.toReplaceWith(photonTask, _photonTaskWithIsland)
15 changes: 9 additions & 6 deletions RecoHI/HiEgammaAlgos/python/HiEgamma_cff.py
Expand Up @@ -7,11 +7,12 @@
from RecoEcal.EgammaClusterProducers.multi5x5PreshowerClusteringSequence_cff import *
from RecoEcal.EgammaClusterProducers.preshowerClusteringSequence_cff import *
from RecoHI.HiEgammaAlgos.HiIsolationCommonParameters_cff import *
from RecoEcal.EgammaClusterProducers.particleFlowSuperClusteringSequence_cff import *
from RecoEcal.EgammaClusterProducers.particleFlowSuperClusterECAL_cfi import *

particleFlowSuperClusterECAL.regressionConfig.vertexCollection = 'hiSelectedVertex'

hiEcalClusteringSequence = cms.Sequence(islandClusteringSequence*hybridClusteringSequence*multi5x5ClusteringSequence*multi5x5PreshowerClusteringSequence*preshowerClusteringSequence*particleFlowSuperClusteringSequence)
hiEcalClusteringTask = cms.Task(islandClusteringTask,hybridClusteringTask,multi5x5ClusteringTask,multi5x5PreshowerClusteringTask,preshowerClusteringTask,particleFlowSuperClusterECAL)
hiEcalClusteringSequence = cms.Sequence(hiEcalClusteringTask)


# reco photon producer
Expand All @@ -31,7 +32,8 @@
photons.isolationSumsCalculatorSet.trackProducer = isolationInputParameters.track # cms.InputTag("highPurityTracks")

from RecoHI.HiEgammaAlgos.photonIsolationHIProducer_cfi import photonIsolationHIProducer
hiPhotonSequence = cms.Sequence(photonSequence * photonIsolationHIProducer)
hiPhotonTask = cms.Task(photonTask,photonIsolationHIProducer)
hiPhotonSequence = cms.Sequence(hiPhotonTask)

# HI Ecal reconstruction
hiEcalClusters = cms.Sequence(hiEcalClusteringSequence)
Expand All @@ -47,6 +49,7 @@
photonCoreProducer = cms.InputTag("cleanPhotonCore")
)

hiPhotonCleaningSequence = cms.Sequence(hiSpikeCleanedSC *
cleanPhotonCore *
cleanPhotons)
hiPhotonCleaningTask = cms.Task(hiSpikeCleanedSC,
cleanPhotonCore,
cleanPhotons)
hiPhotonCleaningSequence = cms.Sequence(hiPhotonCleaningTask)
Expand Up @@ -13,5 +13,9 @@
from RecoHI.HiEgammaAlgos.HiCorrectedIslandBarrelSuperClusters_cfi import *
from RecoHI.HiEgammaAlgos.HiCorrectedIslandEndcapSuperClusters_cfi import *
# create sequence for island clustering
islandClusteringSequence = cms.Sequence(islandBasicClusters*islandSuperClusters*correctedIslandBarrelSuperClusters*correctedIslandEndcapSuperClusters)
islandClusteringTask = cms.Task(islandBasicClusters,
islandSuperClusters,
correctedIslandBarrelSuperClusters,
correctedIslandEndcapSuperClusters)
islandClusteringSequence = cms.Sequence(islandClusteringTask)

66 changes: 37 additions & 29 deletions RecoLocalMuon/Configuration/python/RecoLocalMuonCosmics_cff.py
Expand Up @@ -26,56 +26,64 @@
# DT sequence for the standard reconstruction chain
# The reconstruction of the 2D segments are not required for the 4D segments reconstruction, they are used
# only for debuging purpose and for specific studies
dtlocalreco = cms.Sequence(dt1DRecHits*dt4DSegments)
dtlocalrecoTask = cms.Task(dt1DRecHits,dt4DSegments)
dtlocalreco = cms.Sequence(dtlocalrecoTask)
# DT sequence with the 2D segment reconstruction
dtlocalreco_with_2DSegments = cms.Sequence(dt1DRecHits*dt2DSegments*dt4DSegments)
dtlocalreco_with_2DSegmentsTask = cms.Task(dt1DRecHits,dt2DSegments,dt4DSegments)
dtlocalreco_with_2DSegments = cms.Sequence(dtlocalreco_with_2DSegmentsTask)
# DT sequence with T0seg correction
dtlocalrecoT0Seg = cms.Sequence(dt1DRecHits*dt4DSegments*dt4DSegmentsT0Seg)
dtlocalrecoT0SegTask = cms.Task(dt1DRecHits,dt4DSegments,dt4DSegmentsT0Seg)
dtlocalrecoT0Seg = cms.Sequence(dtlocalrecoT0SegTask)
# CSC sequence
csclocalreco = cms.Sequence(csc2DRecHits*cscSegments)
csclocalrecoTask = cms.Task(csc2DRecHits,cscSegments)
csclocalreco = cms.Sequence(csclocalrecoTask)
# DT, CSC and RPC together
muonlocalreco_with_2DSegments = cms.Sequence(dtlocalreco_with_2DSegments+csclocalreco+rpcRecHits)
muonlocalreco_with_2DSegmentsTask = cms.Task(dtlocalreco_with_2DSegmentsTask,csclocalrecoTask,rpcRecHits)
muonlocalreco_with_2DSegments = cms.Sequence(muonlocalreco_with_2DSegmentsTask)
# DT, CSC and RPC together (correct sequence for the standard path)
muonlocalreco = cms.Sequence(dtlocalreco+csclocalreco+rpcRecHits)
muonlocalrecoTask = cms.Task(dtlocalrecoTask,csclocalrecoTask,rpcRecHits)
muonlocalreco = cms.Sequence(muonlocalrecoTask)
# DT, CSC and RPC together (with t0seg correction for DTs)
muonlocalrecoT0Seg = cms.Sequence(dtlocalrecoT0Seg+csclocalreco+rpcRecHits)
muonlocalrecoT0SegTask = cms.Task(dtlocalrecoT0SegTask,csclocalrecoTask,rpcRecHits)
muonlocalrecoT0Seg = cms.Sequence(muonlocalrecoT0SegTask)
# all sequences to be used for GR
muonLocalRecoGR = cms.Sequence(muonlocalreco+muonlocalrecoT0Seg)
muonLocalRecoGRTask = cms.Task(muonlocalrecoTask,muonlocalrecoT0SegTask)
muonLocalRecoGR = cms.Sequence(muonLocalRecoGRTask)

from RecoLocalMuon.GEMRecHit.gemLocalReco_cff import *
from RecoLocalMuon.GEMRecHit.me0LocalReco_cff import *

_run2_GEM_2017_muonlocalreco = muonlocalreco.copy()
_run2_GEM_2017_muonlocalreco += gemLocalReco
_run2_GEM_2017_muonlocalrecoTask = muonlocalrecoTask.copy()
_run2_GEM_2017_muonlocalrecoTask.add(gemLocalRecoTask)

_run3_muonlocalreco = muonlocalreco.copy()
_run3_muonlocalreco += gemLocalReco
_run3_muonlocalrecoTask = muonlocalrecoTask.copy()
_run3_muonlocalrecoTask.add(gemLocalRecoTask)

_phase2_muonlocalreco = _run3_muonlocalreco.copy()
_phase2_muonlocalreco += me0LocalReco
_phase2_muonlocalrecoTask = _run3_muonlocalrecoTask.copy()
_phase2_muonlocalrecoTask.add(me0LocalRecoTask)

from Configuration.Eras.Modifier_run2_GEM_2017_cff import run2_GEM_2017
run2_GEM_2017.toReplaceWith( muonlocalreco , _run2_GEM_2017_muonlocalreco )
run2_GEM_2017.toReplaceWith( muonlocalrecoTask , _run2_GEM_2017_muonlocalrecoTask )
from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
run3_GEM.toReplaceWith( muonlocalreco , _run3_muonlocalreco )
run3_GEM.toReplaceWith( muonlocalrecoTask , _run3_muonlocalrecoTask )
from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
phase2_muon.toReplaceWith( muonlocalreco , _phase2_muonlocalreco )
phase2_muon.toReplaceWith( muonlocalrecoTask , _phase2_muonlocalrecoTask )


# RPC New Readout Validation
from Configuration.Eras.Modifier_stage2L1Trigger_2017_cff import stage2L1Trigger_2017
_rpc_NewReadoutVal_muonlocalreco_with_2DSegments = muonlocalreco_with_2DSegments.copy()
_rpc_NewReadoutVal_muonlocalreco = muonlocalreco.copy()
_rpc_NewReadoutVal_muonlocalrecoT0Seg = muonlocalrecoT0Seg.copy()
_rpc_NewReadoutVal_muonlocalreco_with_2DSegments += rpcNewRecHits
_rpc_NewReadoutVal_muonlocalreco += rpcNewRecHits
_rpc_NewReadoutVal_muonlocalrecoT0Seg += rpcNewRecHits
stage2L1Trigger_2017.toReplaceWith(muonlocalreco_with_2DSegments, _rpc_NewReadoutVal_muonlocalreco_with_2DSegments)
stage2L1Trigger_2017.toReplaceWith(muonlocalreco, _rpc_NewReadoutVal_muonlocalreco)
stage2L1Trigger_2017.toReplaceWith(muonlocalrecoT0Seg, _rpc_NewReadoutVal_muonlocalrecoT0Seg)
_rpc_NewReadoutVal_muonlocalreco_with_2DSegmentsTask = muonlocalreco_with_2DSegmentsTask.copy()
_rpc_NewReadoutVal_muonlocalrecoTask = muonlocalrecoTask.copy()
_rpc_NewReadoutVal_muonlocalrecoT0SegTask = muonlocalrecoT0SegTask.copy()
_rpc_NewReadoutVal_muonlocalreco_with_2DSegmentsTask.add(rpcNewRecHits)
_rpc_NewReadoutVal_muonlocalrecoTask.add(rpcNewRecHits)
_rpc_NewReadoutVal_muonlocalrecoT0SegTask.add(rpcNewRecHits)
stage2L1Trigger_2017.toReplaceWith(muonlocalreco_with_2DSegmentsTask, _rpc_NewReadoutVal_muonlocalreco_with_2DSegmentsTask)
stage2L1Trigger_2017.toReplaceWith(muonlocalrecoTask, _rpc_NewReadoutVal_muonlocalrecoTask)
stage2L1Trigger_2017.toReplaceWith(muonlocalrecoT0SegTask, _rpc_NewReadoutVal_muonlocalrecoT0SegTask)

from Configuration.Eras.Modifier_fastSim_cff import fastSim
fastSim.toReplaceWith(muonlocalreco_with_2DSegments, muonlocalreco_with_2DSegments.copyAndExclude([rpcNewRecHits]))
fastSim.toReplaceWith(muonlocalreco, muonlocalreco.copyAndExclude([rpcNewRecHits]))
fastSim.toReplaceWith(muonlocalrecoT0Seg, muonlocalrecoT0Seg.copyAndExclude([rpcNewRecHits]))
fastSim.toReplaceWith(muonlocalreco_with_2DSegmentsTask, muonlocalreco_with_2DSegmentsTask.copyAndExclude([rpcNewRecHits]))
fastSim.toReplaceWith(muonlocalrecoTask, muonlocalrecoTask.copyAndExclude([rpcNewRecHits]))
fastSim.toReplaceWith(muonlocalrecoT0SegTask, muonlocalrecoT0SegTask.copyAndExclude([rpcNewRecHits]))