From a3a327ec10a354dd5fe7267145d58cf34ef34384 Mon Sep 17 00:00:00 2001 From: brusale Date: Mon, 21 Oct 2024 14:43:26 +0200 Subject: [PATCH 1/9] implement CLUE algorithm in the barrel Adds CLUE algorithm implementation in the barrel. Also the respective producer and plugin factory are introduced, along with the validation chain. --- .../CaloRecHit/interface/CaloCluster.h | 2 + DataFormats/HGCalReco/interface/Common.h | 10 + .../HGCalReco/interface/TICLLayerTile.h | 17 +- DataFormats/HGCalReco/src/classes_def.xml | 14 + .../hltBarrelLayerClustersEBL1Seeded_cfi.py | 14 + .../modules/hltBarrelLayerClustersEB_cfi.py | 14 + .../modules/hltBarrelLayerClustersHB_cfi.py | 14 + .../hltHgcalMergeLayerClustersL1Seeded_cfi.py | 6 +- .../modules/hltHgcalMergeLayerClusters_cfi.py | 6 +- ...bleEle25CaloIdLPMS2UnseededSequence_cfi.py | 2 + .../HLTHgcalLocalRecoSequence_cfi.py | 7 + ...ClusteringForEgammaL1SeededSequence_cfi.py | 3 +- ...ClusteringForEgammaUnseededSequence_cfi.py | 8 +- .../HLTHgcalTiclPFClusteringForEgamma_cfi.py | 6 +- .../HLTParticleFlowClusterSequence_cfi.py | 6 +- .../HLTPhoton187UnseededSequence_cfi.py | 1 + .../TICL/plugins/TICLLayerTileProducer.cc | 23 +- .../TICL/plugins/TracksterInferenceByDNN.cc | 2 + .../TICL/plugins/TracksterInferenceByPFN.cc | 2 + .../HGCalRecAlgos/interface/RecHitTools.h | 10 +- .../HGCalRecAlgos/src/RecHitTools.cc | 23 +- .../interface/BarrelTilesConstants.h | 39 + .../interface/HGCalClusteringAlgoBase.h | 9 + .../interface/HGCalImagingAlgo.h | 2 + .../interface/HGCalLayerTiles.h | 4 + .../HGCalRecProducers/plugins/HGCalCLUEAlgo.h | 3 +- .../plugins/MergeClusterProducer.cc | 102 +- .../plugins/RecHitMapProducer.cc | 28 +- .../plugins/BarrelCLUEAlgo.cc | 399 +++++ .../plugins/BarrelCLUEAlgo.h | 191 +++ .../BarrelLayerClusterPluginFactory.cc | 9 + .../plugins/BarrelLayerClusterProducer.cc | 193 +++ .../PFClusterProducer/plugins/BuildFile.xml | 1 + .../plugins/PFClusterFromHGCalTrackster.cc | 5 +- .../python/barrelLayerClusters_cff.py | 29 + .../python/particleFlowCluster_cff.py | 3 +- .../LCToCPAssociatorByEnergyScoreImpl.cc | 23 +- .../LCToCPAssociatorByEnergyScoreProducer.cc | 6 +- .../LCToSCAssociatorByEnergyScoreImpl.cc | 21 +- .../LCToSCAssociatorByEnergyScoreProducer.cc | 6 +- .../python/LCToCPAssociation_cfi.py | 6 + .../python/LCToSCAssociation_cfi.py | 6 + .../Configuration/python/autoValidation.py | 5 +- .../python/barrelSimValid_cff.py | 17 + .../python/globalValidation_cff.py | 16 + .../python/postValidation_cff.py | 6 + .../interface/BarrelVHistoProducerAlgo.h | 403 +++++ .../interface/BarrelValidator.h | 112 ++ .../plugins/BarrelValidator.cc | 563 +++++++ .../HGCalValidation/plugins/SealModule.cc | 2 + .../python/BarrelPostProcessor_cff.py | 10 + .../python/BarrelValidator_cff.py | 6 + .../python/HGCalPostProcessor_cff.py | 1 + .../python/PostProcessorBarrel_cfi.py | 27 + .../src/BarrelVHistoProducerAlgo.cc | 1433 +++++++++++++++++ .../src/HGVHistoProducerAlgo.cc | 35 +- 56 files changed, 3790 insertions(+), 121 deletions(-) create mode 100644 HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersEBL1Seeded_cfi.py create mode 100644 HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersEB_cfi.py create mode 100644 HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersHB_cfi.py create mode 100644 RecoLocalCalo/HGCalRecProducers/interface/BarrelTilesConstants.h create mode 100644 RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.cc create mode 100644 RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.h create mode 100644 RecoParticleFlow/PFClusterProducer/plugins/BarrelLayerClusterPluginFactory.cc create mode 100644 RecoParticleFlow/PFClusterProducer/plugins/BarrelLayerClusterProducer.cc create mode 100644 RecoParticleFlow/PFClusterProducer/python/barrelLayerClusters_cff.py create mode 100644 Validation/Configuration/python/barrelSimValid_cff.py create mode 100644 Validation/HGCalValidation/interface/BarrelVHistoProducerAlgo.h create mode 100644 Validation/HGCalValidation/interface/BarrelValidator.h create mode 100644 Validation/HGCalValidation/plugins/BarrelValidator.cc create mode 100644 Validation/HGCalValidation/python/BarrelPostProcessor_cff.py create mode 100644 Validation/HGCalValidation/python/BarrelValidator_cff.py create mode 100644 Validation/HGCalValidation/python/PostProcessorBarrel_cfi.py create mode 100644 Validation/HGCalValidation/src/BarrelVHistoProducerAlgo.cc diff --git a/DataFormats/CaloRecHit/interface/CaloCluster.h b/DataFormats/CaloRecHit/interface/CaloCluster.h index c2c4dc095fc19..941ec56dadae0 100644 --- a/DataFormats/CaloRecHit/interface/CaloCluster.h +++ b/DataFormats/CaloRecHit/interface/CaloCluster.h @@ -41,6 +41,8 @@ namespace reco { hgcal_had = 7, hgcal_scintillator = 8, hfnose = 9, + barrel_em = 10, + barrel_had = 11, undefined = 1000 }; diff --git a/DataFormats/HGCalReco/interface/Common.h b/DataFormats/HGCalReco/interface/Common.h index 98ba79210b19d..c85ac04ee792a 100644 --- a/DataFormats/HGCalReco/interface/Common.h +++ b/DataFormats/HGCalReco/interface/Common.h @@ -28,6 +28,16 @@ namespace ticl { static constexpr int nBins = nEtaBins * nPhiBins; }; + struct TileConstantsBarrel { + static constexpr float minEta = -1.5f; + static constexpr float maxEta = 1.5f; + static constexpr int nEtaBins = 68; + static constexpr int nPhiBins = 36; + static constexpr int nLayers = 5; + static constexpr int iterations = 1; + static constexpr int nBins = nEtaBins * nPhiBins; + }; + } // namespace ticl namespace ticl { diff --git a/DataFormats/HGCalReco/interface/TICLLayerTile.h b/DataFormats/HGCalReco/interface/TICLLayerTile.h index b114b6268a751..65aeefa08944c 100644 --- a/DataFormats/HGCalReco/interface/TICLLayerTile.h +++ b/DataFormats/HGCalReco/interface/TICLLayerTile.h @@ -18,7 +18,11 @@ class TICLLayerTileT { constexpr float etaRange = T::maxEta - T::minEta; static_assert(etaRange >= 0.f); float r = T::nEtaBins / etaRange; - int etaBin = (std::abs(eta) - T::minEta) * r; + int etaBin; + if constexpr (std::is_same_v) + etaBin = (eta - T::minEta) * r; + else + etaBin = (std::abs(eta) - T::minEta) * r; etaBin = std::clamp(etaBin, 0, T::nEtaBins - 1); return etaBin; } @@ -34,8 +38,10 @@ class TICLLayerTileT { std::array searchBoxEtaPhi(float etaMin, float etaMax, float phiMin, float phiMax) const { // The tile only handles one endcap at a time and does not hold mixed eta // values. - if (etaMin * etaMax < 0) { - return std::array({{0, 0, 0, 0}}); + if (!std::is_same_v) { + if (etaMin * etaMax < 0) { + return std::array({{0, 0, 0, 0}}); + } } if (etaMax - etaMin < 0) { return std::array({{0, 0, 0, 0}}); @@ -83,6 +89,9 @@ namespace ticl { using TilesHFNose = std::array; using TracksterTilesHFNose = std::array; + using TICLLayerTileBarrel = TICLLayerTileT; + using TilesBarrel = std::array; + using TracksterTilesBarrel = std::array; } // namespace ticl template @@ -104,5 +113,7 @@ using TICLLayerTiles = TICLGenericTile; using TICLTracksterTiles = TICLGenericTile; using TICLLayerTilesHFNose = TICLGenericTile; using TICLTracksterTilesHFNose = TICLGenericTile; +using TICLLayerTilesBarrel = TICLGenericTile; +using TICLTracksterTilesBarrel = TICLGenericTile; #endif diff --git a/DataFormats/HGCalReco/src/classes_def.xml b/DataFormats/HGCalReco/src/classes_def.xml index cd0ecf057aafe..3392d06943182 100644 --- a/DataFormats/HGCalReco/src/classes_def.xml +++ b/DataFormats/HGCalReco/src/classes_def.xml @@ -29,6 +29,20 @@ + + + + + + + + + + + + + + diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersEBL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersEBL1Seeded_cfi.py new file mode 100644 index 0000000000000..473586b8c260e --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersEBL1Seeded_cfi.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms + +hltBarrelLayerClustersEBL1Seeded = cms.EDProducer('BarrelLayerClusterProducer', + recHits = cms.InputTag("hltParticleFlowRecHitECALL1Seeded"), + plugin = cms.PSet( + outlierDeltaFactor = cms.double(2.7 * 0.0175), + kappa = cms.double(3.5), + maxLayerIndex = cms.int32(0), + deltac = cms.double(1.8 * 0.0175), + fractionCutoff = cms.double(0.0), + doSharing = cms.bool(False), + type = cms.string('EBCLUE') + ) +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersEB_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersEB_cfi.py new file mode 100644 index 0000000000000..9c6aea18dcf75 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersEB_cfi.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms + +hltBarrelLayerClustersEB = cms.EDProducer('BarrelLayerClusterProducer', + recHits = cms.InputTag("hltParticleFlowRecHitECALUnseeded"), + plugin = cms.PSet( + outlierDeltaFactor = cms.double(2.7 * 0.0175), + kappa = cms.double(1), + maxLayerIndex = cms.int32(0), + deltac = cms.double(1.8 * 0.0175), + fractionCutoff = cms.double(0.0), + doSharing = cms.bool(False), + type = cms.string('EBCLUE') + ) +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersHB_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersHB_cfi.py new file mode 100644 index 0000000000000..6cf50da979b74 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltBarrelLayerClustersHB_cfi.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms + +hltBarrelLayerClustersHB = cms.EDProducer('BarrelLayerClusterProducer', + recHits = cms.InputTag("hltParticleFlowRecHitHBHE"), + plugin = cms.PSet( + outlierDeltaFactor = cms.double(2.7 * 0.0175), + kappa = cms.double(3.5), + maxLayerIndex = cms.int32(4), + deltac = cms.double(1.8 * 0.0175), + fractionCutoff = cms.double(0.0), + doSharing = cms.bool(False), + type = cms.string('HBCLUE') + ) +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py index 48c3103c50899..7c1e887da5916 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py @@ -4,9 +4,13 @@ layerClustersEE = cms.InputTag("hltHgcalLayerClustersEEL1Seeded"), layerClustersHSci = cms.InputTag("hltHgcalLayerClustersHSciL1Seeded"), layerClustersHSi = cms.InputTag("hltHgcalLayerClustersHSiL1Seeded"), + layerClustersEB = cms.InputTag("hltBarrelLayerClustersEBL1Seeded"), + layerClustersHB = cms.InputTag("hltBarrelLayerClustersEBL1Seeded"), mightGet = cms.optional.untracked.vstring, timeClname = cms.string('timeLayerCluster'), time_layerclustersEE = cms.InputTag("hltHgcalLayerClustersEEL1Seeded","timeLayerCluster"), time_layerclustersHSci = cms.InputTag("hltHgcalLayerClustersHSciL1Seeded","timeLayerCluster"), - time_layerclustersHSi = cms.InputTag("hltHgcalLayerClustersHSiL1Seeded","timeLayerCluster") + time_layerclustersHSi = cms.InputTag("hltHgcalLayerClustersHSiL1Seeded","timeLayerCluster"), + time_layerclustersEB = cms.InputTag("hltBarrelLayerClustersEBL1Seeded","timeLayerCluster"), + time_layerclustersHB = cms.InputTag("hltBarrelLayerClustersEBL1Seeded","timeLayerCluster"), ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClusters_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClusters_cfi.py index 9325f13069192..63852353fa3ba 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClusters_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClusters_cfi.py @@ -4,11 +4,15 @@ layerClustersEE = cms.InputTag("hltHgcalLayerClustersEE"), layerClustersHSci = cms.InputTag("hltHgcalLayerClustersHSci"), layerClustersHSi = cms.InputTag("hltHgcalLayerClustersHSi"), + layerClustersEB = cms.InputTag("hltBarrelLayerClustersEB"), + layerClustersHB = cms.InputTag("hltBarrelLayerClustersHB"), mightGet = cms.optional.untracked.vstring, timeClname = cms.string('timeLayerCluster'), time_layerclustersEE = cms.InputTag("hltHgcalLayerClustersEE","timeLayerCluster"), time_layerclustersHSci = cms.InputTag("hltHgcalLayerClustersHSci","timeLayerCluster"), - time_layerclustersHSi = cms.InputTag("hltHgcalLayerClustersHSi","timeLayerCluster") + time_layerclustersHSi = cms.InputTag("hltHgcalLayerClustersHSi","timeLayerCluster"), + time_layerclustersEB = cms.InputTag("hltBarrelLayerClustersEB","timeLayerCluster"), + time_layerclustersHB = cms.InputTag("hltBarrelLayerClustersHB","timeLayerCluster") ) from Configuration.ProcessModifiers.alpaka_cff import alpaka diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py index 8519652f01f49..9292bce950708 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py @@ -13,6 +13,7 @@ from ..modules.hltEgammaClusterShapeUnseeded_cfi import * from ..modules.hltEgammaHGCALIDVarsUnseeded_cfi import * from ..modules.hltEgammaHoverEUnseeded_cfi import * +from ..modules.hltParticleFlowRecHitHBHE_cfi import * from ..sequences.HLTDoFullUnpackingEgammaEcalSequence_cfi import * from ..sequences.HLTEGammaDoLocalHcalSequence_cfi import * @@ -24,6 +25,7 @@ HLTDoubleEle25CaloIdLPMS2UnseededSequence = cms.Sequence(HLTL1Sequence +hltEGL1SeedsForDoubleEleNonIsolatedFilter + +hltParticleFlowRecHitHBHE +HLTDoFullUnpackingEgammaEcalSequence +HLTPFClusteringForEgammaUnseededSequence +HLTHgcalTiclPFClusteringForEgammaUnseededSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi.py index b68b5217ff888..4432395f85f86 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi.py @@ -11,6 +11,9 @@ from ..modules.hltHgcalSoARecHitsLayerClustersProducer_cfi import * from ..modules.hltHgcalSoALayerClustersProducer_cfi import * from ..modules.hltHgcalLayerClustersFromSoAProducer_cfi import * +# Barrel layer clusters +from ..modules.hltBarrelLayerClustersEB_cfi import * +from ..modules.hltBarrelLayerClustersHB_cfi import * HLTHgcalLocalRecoSequence = cms.Sequence( hltHGCalUncalibRecHit+ @@ -18,6 +21,8 @@ hltHgcalLayerClustersEE+ hltHgcalLayerClustersHSci+ hltHgcalLayerClustersHSi+ + hltBarrelLayerClustersEB+ + hltBarrelLayerClustersHB+ hltHgcalMergeLayerClusters) _HLTHgcalLocalRecoSequence_heterogeneous = cms.Sequence( @@ -29,6 +34,8 @@ hltHgCalLayerClustersFromSoAProducer+ hltHgcalLayerClustersHSci+ hltHgcalLayerClustersHSi+ + hltBarrelLayerClustersEB+ + hltBarrelLayerClustersHB+ hltHgcalMergeLayerClusters) from Configuration.ProcessModifiers.alpaka_cff import alpaka diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py index 5a0d425f37a20..94f48c6f8b1d1 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py @@ -18,8 +18,9 @@ from ..modules.hltTiclSeedingL1_cfi import * from ..modules.hltTiclTrackstersCLUE3DHighL1Seeded_cfi import * from ..modules.hltTiclTracksterLinksL1Seeded_cfi import * +from ..modules.hltBarrelLayerClustersEBL1Seeded_cfi import * -_HgcalLocalRecoL1SeededSequence = cms.Sequence(hltHgcalDigis+hltL1TEGammaHGCFilteredCollectionProducer+hltHgcalDigisL1Seeded+hltHGCalUncalibRecHitL1Seeded+hltHGCalRecHitL1Seeded+hltParticleFlowRecHitHGCL1Seeded+hltRechitInRegionsHGCAL+hltHgcalLayerClustersEEL1Seeded+hltHgcalLayerClustersHSciL1Seeded+hltHgcalLayerClustersHSiL1Seeded+hltHgcalMergeLayerClustersL1Seeded) +_HgcalLocalRecoL1SeededSequence = cms.Sequence(hltHgcalDigis+hltL1TEGammaHGCFilteredCollectionProducer+hltHgcalDigisL1Seeded+hltHGCalUncalibRecHitL1Seeded+hltHGCalRecHitL1Seeded+hltParticleFlowRecHitHGCL1Seeded+hltRechitInRegionsHGCAL+hltHgcalLayerClustersEEL1Seeded+hltHgcalLayerClustersHSciL1Seeded+hltHgcalLayerClustersHSiL1Seeded+hltBarrelLayerClustersEBL1Seeded+hltHgcalMergeLayerClustersL1Seeded) _HgcalTICLPatternRecognitionL1SeededSequence = cms.Sequence(hltFilteredLayerClustersCLUE3DHighL1Seeded+hltTiclSeedingL1+hltTiclLayerTileProducerL1Seeded+hltTiclTrackstersCLUE3DHighL1Seeded) _SuperclusteringL1SeededSequence = cms.Sequence(hltParticleFlowClusterHGCalFromTICLL1Seeded+hltParticleFlowSuperClusterHGCalFromTICLL1Seeded) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py index 244f7ae810a03..0028913d4817a 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py @@ -19,8 +19,10 @@ from ..modules.hltHgcalSoALayerClustersProducer_cfi import * from ..modules.hltHgcalLayerClustersFromSoAProducer_cfi import * from ..modules.hltTiclTracksterLinks_cfi import * - -_HgcalLocalRecoUnseededSequence = cms.Sequence(hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltHgcalMergeLayerClusters) +# Barrel layer clusters +from ..modules.hltBarrelLayerClustersEB_cfi import * +from ..modules.hltBarrelLayerClustersHB_cfi import * +_HgcalLocalRecoUnseededSequence = cms.Sequence(hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltBarrelLayerClustersEB+hltBarrelLayerClustersHB+hltHgcalMergeLayerClusters) _HgcalTICLPatternRecognitionUnseededSequence = cms.Sequence(hltFilteredLayerClustersCLUE3DHigh+hltTiclSeedingGlobal+hltTiclLayerTileProducer+hltTiclTrackstersCLUE3DHigh) _SuperclusteringUnseededSequence = cms.Sequence(hltParticleFlowClusterHGCalFromTICLUnseeded+hltParticleFlowSuperClusterHGCalFromTICLUnseeded) @@ -40,6 +42,8 @@ + hltHgCalLayerClustersFromSoAProducer + hltHgcalLayerClustersHSci + hltHgcalLayerClustersHSi + + hltBarrelLayerClustersEB + + hltBarrelLayerClustersHB + hltHgcalMergeLayerClusters ) ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py index 0bd5de832249d..49b5f7a5d9556 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py @@ -14,5 +14,7 @@ from ..modules.hltTiclLayerTileProducer_cfi import * from ..modules.hltTiclSeedingGlobal_cfi import * from ..modules.hltTiclTrackstersCLUE3DHigh_cfi import * - -HLTHgcalTiclPFClusteringForEgamma = cms.Sequence((hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltHgcalMergeLayerClusters+hltFilteredLayerClustersCLUE3DHigh+hltTiclSeedingGlobal+hltTiclLayerTileProducer+hltTiclTrackstersCLUE3DHigh+hltParticleFlowClusterHGCal+hltParticleFlowSuperClusterHGCal)) +# Barrel layer clusters +from ..modules.hltBarrelLayerClustersEB_cfi import * +from ..modules.hltBarrelLayerClustersHB_cfi import * +HLTHgcalTiclPFClusteringForEgamma = cms.Sequence((hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltBarrelLayerClustersEB+hltBarrelLayerClustersHB+hltHgcalMergeLayerClusters+hltFilteredLayerClustersCLUE3DHigh+hltTiclSeedingGlobal+hltTiclLayerTileProducer+hltTiclTrackstersCLUE3DHigh+hltParticleFlowClusterHGCal+hltParticleFlowSuperClusterHGCal)) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTParticleFlowClusterSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTParticleFlowClusterSequence_cfi.py index 2c62402419129..db6a09ae75263 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTParticleFlowClusterSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTParticleFlowClusterSequence_cfi.py @@ -5,4 +5,8 @@ from ..sequences.HLTPfClusteringHBHEHFSequence_cfi import * from ..sequences.HLTPfClusteringHOSequence_cfi import * -HLTParticleFlowClusterSequence = cms.Sequence(hltParticleFlowBadHcalPseudoCluster+HLTPfClusteringECALSequence+HLTPfClusteringHBHEHFSequence+HLTPfClusteringHOSequence) +HLTParticleFlowClusterSequence = cms.Sequence(hltParticleFlowBadHcalPseudoCluster + +HLTPfClusteringECALSequence + +HLTPfClusteringHBHEHFSequence + +HLTPfClusteringHOSequence +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton187UnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton187UnseededSequence_cfi.py index cee90cc74b57c..20a889e134f78 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton187UnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton187UnseededSequence_cfi.py @@ -8,6 +8,7 @@ from ..modules.hltEgammaCandidatesUnseeded_cfi import * from ..modules.hltEgammaHGCALIDVarsUnseeded_cfi import * from ..modules.hltEgammaHoverEUnseeded_cfi import * +from ..modules.hltParticleFlowRecHitHBHE_cfi import * from ..sequences.HLTDoFullUnpackingEgammaEcalSequence_cfi import * from ..sequences.HLTEGammaDoLocalHcalSequence_cfi import * diff --git a/RecoHGCal/TICL/plugins/TICLLayerTileProducer.cc b/RecoHGCal/TICL/plugins/TICLLayerTileProducer.cc index b91ad35edd7e6..3141de326eda7 100644 --- a/RecoHGCal/TICL/plugins/TICLLayerTileProducer.cc +++ b/RecoHGCal/TICL/plugins/TICLLayerTileProducer.cc @@ -44,6 +44,7 @@ TICLLayerTileProducer::TICLLayerTileProducer(const edm::ParameterSet &ps) } else { clusters_token_ = consumes>(ps.getParameter("layer_clusters")); produces(); + produces("ticlLayerTilesBarrel"); } } @@ -55,9 +56,11 @@ void TICLLayerTileProducer::beginRun(edm::Run const &, edm::EventSetup const &es void TICLLayerTileProducer::produce(edm::Event &evt, const edm::EventSetup &) { std::unique_ptr resultHFNose; std::unique_ptr result; + std::unique_ptr resultBarrel; if (doNose_) { resultHFNose = std::make_unique(); } else { + resultBarrel = std::make_unique(); result = std::make_unique(); } @@ -71,25 +74,31 @@ void TICLLayerTileProducer::produce(edm::Event &evt, const edm::EventSetup &) { int lcId = 0; for (auto const &lc : layerClusters) { const auto firstHitDetId = lc.hitsAndFractions()[0].first; - int layer = rhtools_.getLayerWithOffset(firstHitDetId) + - rhtools_.lastLayer(doNose_) * ((rhtools_.zside(firstHitDetId) + 1) >> 1) - 1; - + int layer = rhtools_.getLayerWithOffset(firstHitDetId); + bool isBarrelLC = rhtools_.isBarrel(firstHitDetId); + if (!isBarrelLC) { + layer += rhtools_.lastLayer(doNose_) * ((rhtools_.zside(firstHitDetId) + 1) >> 1) - 1; + } assert(layer >= 0); if (doNose_) { resultHFNose->fill(layer, lc.eta(), lc.phi(), lcId); + } else if (isBarrelLC) { + resultBarrel->fill(layer, lc.eta(), lc.phi(), lcId); } else { result->fill(layer, lc.eta(), lc.phi(), lcId); - LogDebug("TICLLayerTileProducer") << "Adding layerClusterId: " << lcId << " into bin [eta,phi]: [ " - << (*result)[layer].etaBin(lc.eta()) << ", " - << (*result)[layer].phiBin(lc.phi()) << "] for layer: " << layer << std::endl; } + LogDebug("TICLLayerTileProducer") << "Adding layerClusterId: " << lcId << " into bin [eta,phi]: [ " + << (*result)[layer].etaBin(lc.eta()) << ", " << (*result)[layer].phiBin(lc.phi()) + << "] for layer: " << layer << std::endl; lcId++; } if (doNose_) evt.put(std::move(resultHFNose)); - else + else { + evt.put(std::move(resultBarrel), "ticlLayerTilesBarrel"); evt.put(std::move(result)); + } } void TICLLayerTileProducer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { diff --git a/RecoHGCal/TICL/plugins/TracksterInferenceByDNN.cc b/RecoHGCal/TICL/plugins/TracksterInferenceByDNN.cc index 6d115e169606f..a172e4d233a23 100644 --- a/RecoHGCal/TICL/plugins/TracksterInferenceByDNN.cc +++ b/RecoHGCal/TICL/plugins/TracksterInferenceByDNN.cc @@ -38,6 +38,8 @@ namespace ticl { for (int i = 0; i < static_cast(tracksters.size()); i++) { float sumClusterEnergy = 0.; for (const unsigned int& vertex : tracksters[i].vertices()) { + if (rhtools_.isBarrel(layerClusters[vertex].seed())) + continue; sumClusterEnergy += static_cast(layerClusters[vertex].energy()); if (sumClusterEnergy >= eidMinClusterEnergy_) { tracksters[i].setRegressedEnergy(0.f); // Set regressed energy to 0 diff --git a/RecoHGCal/TICL/plugins/TracksterInferenceByPFN.cc b/RecoHGCal/TICL/plugins/TracksterInferenceByPFN.cc index f8d9b34a60f7c..ca69916d052d4 100644 --- a/RecoHGCal/TICL/plugins/TracksterInferenceByPFN.cc +++ b/RecoHGCal/TICL/plugins/TracksterInferenceByPFN.cc @@ -37,6 +37,8 @@ namespace ticl { for (int i = 0; i < static_cast(tracksters.size()); i++) { float sumClusterEnergy = 0.; for (const unsigned int& vertex : tracksters[i].vertices()) { + if (rhtools_.isBarrel(layerClusters[vertex].seed())) + continue; sumClusterEnergy += static_cast(layerClusters[vertex].energy()); if (sumClusterEnergy >= eidMinClusterEnergy_) { tracksters[i].setRegressedEnergy(0.f); // Set regressed energy to 0 diff --git a/RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h b/RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h index 49924b72d054b..2693385339b57 100644 --- a/RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h +++ b/RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h @@ -30,6 +30,10 @@ namespace hgcal { bhOffset_(0), fhLastLayer_(0), noseLastLayer_(0), + hcalBarrelFirstLayer_(1), + hcalBarrelLastLayer_(4), + ecalBarrelFirstLayer_(0), + ecalBarrelLastLayer_(0), geometryType_(0) {} ~RecHitTools() {} @@ -37,7 +41,7 @@ namespace hgcal { const CaloSubdetectorGeometry* getSubdetectorGeometry(const DetId& id) const; GlobalPoint getPosition(const DetId& id) const; - GlobalPoint getPositionLayer(int layer, bool nose = false) const; + GlobalPoint getPositionLayer(int layer, bool nose = false, bool barrel = false) const; // zside returns +/- 1 int zside(const DetId& id) const; @@ -59,6 +63,7 @@ namespace hgcal { bool isSilicon(const DetId&) const; bool isScintillator(const DetId&) const; + bool isBarrel(const DetId&) const; bool isOnlySilicon(const unsigned int layer) const; @@ -78,6 +83,8 @@ namespace hgcal { unsigned int firstLayerBH() const { return bhFirstLayer_; } unsigned int lastLayerBH() const { return bhLastLayer_; } unsigned int lastLayer(bool nose = false) const { return (nose ? noseLastLayer_ : bhLastLayer_); } + unsigned int lastLayerECAL() const { return ecalBarrelLastLayer_; } + unsigned int lastLayerBarrel() const { return hcalBarrelLastLayer_; } std::pair firstAndLastLayer(DetId::Detector det, int subdet) const; unsigned int maxNumberOfWafersPerLayer(bool nose = false) const { return (nose ? maxNumberOfWafersNose_ : maxNumberOfWafersPerLayer_); @@ -89,6 +96,7 @@ namespace hgcal { private: const CaloGeometry* geom_; unsigned int eeOffset_, fhOffset_, bhFirstLayer_, bhLastLayer_, bhOffset_, fhLastLayer_, noseLastLayer_; + unsigned int hcalBarrelFirstLayer_, hcalBarrelLastLayer_, ecalBarrelFirstLayer_, ecalBarrelLastLayer_; unsigned int maxNumberOfWafersPerLayer_, maxNumberOfWafersNose_; int geometryType_; int bhMaxIphi_; diff --git a/RecoLocalCalo/HGCalRecAlgos/src/RecHitTools.cc b/RecoLocalCalo/HGCalRecAlgos/src/RecHitTools.cc index aa5558010448c..5154e393cbea1 100644 --- a/RecoLocalCalo/HGCalRecAlgos/src/RecHitTools.cc +++ b/RecoLocalCalo/HGCalRecAlgos/src/RecHitTools.cc @@ -4,6 +4,7 @@ #include "DataFormats/ForwardDetId/interface/HGCScintillatorDetId.h" #include "DataFormats/ForwardDetId/interface/HGCSiliconDetId.h" #include "DataFormats/HcalDetId/interface/HcalDetId.h" +#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" #include "Geometry/HGCalGeometry/interface/HGCalGeometry.h" #include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h" #include "Geometry/CaloGeometry/interface/CaloGeometry.h" @@ -149,9 +150,9 @@ GlobalPoint RecHitTools::getPosition(const DetId& id) const { return position; } -GlobalPoint RecHitTools::getPositionLayer(int layer, bool nose) const { +GlobalPoint RecHitTools::getPositionLayer(int layer, bool nose, bool barrel) const { unsigned int lay = std::abs(layer); - double z(0); + double x(0), y(0), z(0); if (nose) { auto geomNose = static_cast(geom_->getSubdetectorGeometry(DetId::Forward, ForwardSubdetector::HFNose)); @@ -160,6 +161,19 @@ GlobalPoint RecHitTools::getPositionLayer(int layer, bool nose) const { if (ddd) z = (layer > 0) ? ddd->waferZ(lay, true) : -ddd->waferZ(lay, true); } + } else if (barrel) { + if (layer == 0) { + DetId firstValidDetId = (geom_->getValidDetIds(DetId::Ecal, EcalBarrel))[0]; + x = getPosition(firstValidDetId).x(); + y = getPosition(firstValidDetId).y(); + } else { + const std::vector& validDetIds = geom_->getValidDetIds(DetId::Hcal, HcalBarrel); + auto firstValidDetId = + std::find_if(validDetIds.begin(), validDetIds.end(), [&](auto id) { return HcalDetId(id).depth() == layer; }); + assert(firstValidDetId != validDetIds.end()); + x = getPosition(*firstValidDetId).x(); + y = getPosition(*firstValidDetId).y(); + } } else { const HGCalDDDConstants* ddd = get_ddd(geom_, geometryType_, fhOffset_, lay); if (geometryType_ == 1) { @@ -168,7 +182,7 @@ GlobalPoint RecHitTools::getPositionLayer(int layer, bool nose) const { } z = (layer > 0) ? ddd->waferZ(lay, true) : -ddd->waferZ(lay, true); } - return GlobalPoint(0, 0, z); + return GlobalPoint(x, y, z); } int RecHitTools::zside(const DetId& id) const { @@ -480,8 +494,9 @@ bool RecHitTools::isSilicon(const DetId& id) const { (id.det() == DetId::Forward && id.subdetId() == static_cast(HFNose))); } -bool RecHitTools::isScintillator(const DetId& id) const { return id.det() == DetId::HGCalHSc; } +bool RecHitTools::isScintillator(const DetId& id) const { return (id.det() == DetId::HGCalHSc); } +bool RecHitTools::isBarrel(const DetId& id) const { return (id.det() == DetId::Ecal || id.det() == DetId::Hcal); } bool RecHitTools::isOnlySilicon(const unsigned int layer) const { // HFnose TODO bool isonlysilicon = (layer % bhLastLayer_) < bhOffset_; diff --git a/RecoLocalCalo/HGCalRecProducers/interface/BarrelTilesConstants.h b/RecoLocalCalo/HGCalRecProducers/interface/BarrelTilesConstants.h new file mode 100644 index 0000000000000..cba0325df4271 --- /dev/null +++ b/RecoLocalCalo/HGCalRecProducers/interface/BarrelTilesConstants.h @@ -0,0 +1,39 @@ +// Authors: Alessandro Brusamolino + +#ifndef RecoLocalCalo_HGCalRecProducer_BarrelTilesConstants_h +#define RecoLocalCalo_HGCalRecProducer_BarrelTilesConstants_h + +#include "DataFormats/Math/interface/constexpr_cmath.h" +#include +#include +#include + +struct EBTilesConstants { + static constexpr float cellWidthEta = 0.0175f; + static constexpr float cellWidthPhi = cellWidthEta; + static constexpr float tileSizeEtaPhi = cellWidthEta; + static constexpr float minDim1 = -1.5f; + static constexpr float maxDim1 = 1.5f; + static constexpr float minDim2 = -M_PI; + static constexpr float maxDim2 = M_PI; + static constexpr int nColumns = reco::ceil((maxDim1 - minDim1) / tileSizeEtaPhi); + static constexpr int nRows = reco::ceil(2. * M_PI / tileSizeEtaPhi); + static constexpr int nTiles = nColumns * nRows; + static constexpr float showerSigma = 0.5f; // in unit of xtals +}; + +struct HBTilesConstants { + static constexpr float cellWidthEta = 0.087f; + static constexpr float cellWidthPhi = cellWidthEta; + static constexpr float tileSizeEtaPhi = 5 * cellWidthEta; + static constexpr float minDim1 = -1.5f; + static constexpr float maxDim1 = 1.5f; + static constexpr float minDim2 = -M_PI; + static constexpr float maxDim2 = M_PI; + static constexpr int nColumns = reco::ceil((maxDim1 - minDim1) / tileSizeEtaPhi); + static constexpr int nRows = reco::ceil(2. * M_PI / tileSizeEtaPhi); + static constexpr int nTiles = nColumns * nRows; + static constexpr float showerSigma = 0.5f; // in unit of xtals +}; + +#endif diff --git a/RecoLocalCalo/HGCalRecProducers/interface/HGCalClusteringAlgoBase.h b/RecoLocalCalo/HGCalRecProducers/interface/HGCalClusteringAlgoBase.h index a9ceeec37dd72..0b670b58a23c0 100644 --- a/RecoLocalCalo/HGCalRecProducers/interface/HGCalClusteringAlgoBase.h +++ b/RecoLocalCalo/HGCalRecProducers/interface/HGCalClusteringAlgoBase.h @@ -5,11 +5,17 @@ #include "FWCore/Framework/interface/ConsumesCollector.h" #include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h" +#include "DataFormats/ParticleFlowReco/interface/PFRecHitFwd.h" #include "DataFormats/Math/interface/Point3D.h" #include "DataFormats/EgammaReco/interface/BasicCluster.h" #include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h" +#include "CondFormats/DataRecord/interface/EcalPFRecHitThresholdsRcd.h" +#include "CondFormats/EcalObjects/interface/EcalPFRecHitThresholds.h" +#include "CondFormats/DataRecord/interface/HcalPFCutsRcd.h" +#include "CondFormats/HcalObjects/interface/HcalPFCuts.h" + // C/C++ headers #include #include @@ -53,6 +59,7 @@ class HGCalClusteringAlgoBase { virtual ~HGCalClusteringAlgoBase() {} virtual void populate(const HGCRecHitCollection &hits) = 0; + virtual void populate(const reco::PFRecHitCollection &hits) = 0; virtual void makeClusters() = 0; virtual std::vector getClusters(bool) = 0; virtual void reset() = 0; @@ -73,6 +80,8 @@ class HGCalClusteringAlgoBase { algoId_ = algo; isNose_ = isNose; } + virtual void setThresholds(edm::ESGetToken, + edm::ESGetToken){}; //max number of layers unsigned int maxlayer_; diff --git a/RecoLocalCalo/HGCalRecProducers/interface/HGCalImagingAlgo.h b/RecoLocalCalo/HGCalRecProducers/interface/HGCalImagingAlgo.h index a810712993995..d198963afd4d7 100644 --- a/RecoLocalCalo/HGCalRecProducers/interface/HGCalImagingAlgo.h +++ b/RecoLocalCalo/HGCalRecProducers/interface/HGCalImagingAlgo.h @@ -9,6 +9,7 @@ #include "Geometry/CaloTopology/interface/HGCalTopology.h" #include "DataFormats/DetId/interface/DetId.h" #include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h" +#include "DataFormats/ParticleFlowReco/interface/PFRecHitFwd.h" #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" #include "Geometry/CaloGeometry/interface/CaloGeometry.h" #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h" @@ -54,6 +55,7 @@ class HGCalImagingAlgo : public HGCalClusteringAlgoBase { void getEventSetupPerAlgorithm(const edm::EventSetup &es) override; void populate(const HGCRecHitCollection &hits) override; + void populate(const reco::PFRecHitCollection &hits) override {} // this is the method that will start the clusterisation (it is possible to invoke this method more than once - but make sure it is with // different hit collections (or else use reset) diff --git a/RecoLocalCalo/HGCalRecProducers/interface/HGCalLayerTiles.h b/RecoLocalCalo/HGCalRecProducers/interface/HGCalLayerTiles.h index c40646a79eab6..82f3c97d3e9c6 100644 --- a/RecoLocalCalo/HGCalRecProducers/interface/HGCalLayerTiles.h +++ b/RecoLocalCalo/HGCalRecProducers/interface/HGCalLayerTiles.h @@ -7,6 +7,7 @@ #include "RecoLocalCalo/HGCalRecProducers/interface/HGCalTilesConstants.h" #include "RecoLocalCalo/HGCalRecProducers/interface/HFNoseTilesConstants.h" #include "RecoLocalCalo/HGCalRecProducers/interface/HGCalTilesWrapper.h" +#include "RecoLocalCalo/HGCalRecProducers/interface/BarrelTilesConstants.h" #include "DataFormats/Math/interface/normalizedPhi.h" #include @@ -122,4 +123,7 @@ class HGCalLayerTilesT { using HGCalSiliconLayerTiles = HGCalLayerTilesT; using HGCalScintillatorLayerTiles = HGCalLayerTilesT; using HFNoseLayerTiles = HGCalLayerTilesT; + +using EBLayerTiles = HGCalLayerTilesT; +using HBLayerTiles = HGCalLayerTilesT; #endif diff --git a/RecoLocalCalo/HGCalRecProducers/plugins/HGCalCLUEAlgo.h b/RecoLocalCalo/HGCalRecProducers/plugins/HGCalCLUEAlgo.h index b985f41ac4180..c31bf4ccfba95 100644 --- a/RecoLocalCalo/HGCalRecProducers/plugins/HGCalCLUEAlgo.h +++ b/RecoLocalCalo/HGCalRecProducers/plugins/HGCalCLUEAlgo.h @@ -7,6 +7,7 @@ #include "DataFormats/DetId/interface/DetId.h" #include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h" +#include "DataFormats/ParticleFlowReco/interface/PFRecHitFwd.h" #include "Geometry/CaloTopology/interface/HGCalTopology.h" #include "Geometry/HGCalGeometry/interface/HGCalGeometry.h" #include "Geometry/Records/interface/CaloGeometryRecord.h" @@ -65,7 +66,7 @@ class HGCalCLUEAlgoT : public HGCalClusteringAlgoBase { void getEventSetupPerAlgorithm(const edm::EventSetup& es) override; void populate(const HGCRecHitCollection& hits) override; - + void populate(const reco::PFRecHitCollection& hits) override {} // this is the method that will start the clusterisation (it is possible to invoke this method // more than once - but make sure it is with different hit collections (or else use reset) diff --git a/RecoLocalCalo/HGCalRecProducers/plugins/MergeClusterProducer.cc b/RecoLocalCalo/HGCalRecProducers/plugins/MergeClusterProducer.cc index 29111af73285e..34845108ec23d 100644 --- a/RecoLocalCalo/HGCalRecProducers/plugins/MergeClusterProducer.cc +++ b/RecoLocalCalo/HGCalRecProducers/plugins/MergeClusterProducer.cc @@ -38,15 +38,10 @@ class MergeClusterProducer : public edm::stream::EDProducer<> { void produce(edm::Event &, const edm::EventSetup &) override; private: - edm::EDGetTokenT> EEclusters_token_; - edm::EDGetTokenT> HSiclusters_token_; - edm::EDGetTokenT> HSciclusters_token_; + std::vector>> tokens_; + std::vector>>> time_tokens_; std::string timeClname_; - const edm::EDGetTokenT>> clustersTimeEE_token_; - const edm::EDGetTokenT>> clustersTimeHSi_token_; - const edm::EDGetTokenT>> clustersTimeHSci_token_; - /** * @brief method merge three vectors of reco::CaloCluster to one * @@ -55,10 +50,7 @@ class MergeClusterProducer : public edm::stream::EDProducer<> { * @param[in] HSi vector for Hardon silicon * @param[in] ESci vector for hadron scintillator */ - void mergeTogether(std::vector &merge, - const std::vector &EE, - const std::vector &HSi, - const std::vector &HSci); + void mergeTogether(std::vector &merge, std::vector> &clusters); /** * @brief copy all values from vm to to @@ -80,16 +72,17 @@ class MergeClusterProducer : public edm::stream::EDProducer<> { * @param[out] times vector of merged time vectors */ void mergeTime(edm::Event &evt, size_t size, std::vector> ×) { - edm::Handle>> EE, HSi, HSci; // get values from all three part of detectors - evt.getByToken(clustersTimeEE_token_, EE); - evt.getByToken(clustersTimeHSi_token_, HSi); - evt.getByToken(clustersTimeHSci_token_, HSci); - + std::vector>> time_maps; + for (auto token : time_tokens_) { + edm::Handle>> handle; + evt.getByToken(token, handle); + time_maps.push_back(*handle); + } times.reserve(size); - addTo(times, *EE); - addTo(times, *HSi); - addTo(times, *HSci); + for (const auto &vm : time_maps) { + addTo(times, vm); + } } /** * @brief get info form event and then call merge @@ -103,31 +96,27 @@ class MergeClusterProducer : public edm::stream::EDProducer<> { * @return merged result */ template - void createMerge(edm::Event &evt, - const edm::EDGetTokenT &EE_token, - const edm::EDGetTokenT &HSi_token, - const edm::EDGetTokenT &HSci_token, - T &merge) { - edm::Handle EE, HSi, HSci; - // get values from all three part of detectors - evt.getByToken(EE_token, EE); - evt.getByToken(HSi_token, HSi); - evt.getByToken(HSci_token, HSci); - mergeTogether(merge, *EE, *HSi, *HSci); + void createMerge(edm::Event &evt, std::vector> &tokens, T &merge) { + std::vector handles; + for (auto token : tokens) { + edm::Handle handle; + evt.getByToken(token, handle); + handles.push_back(*handle); + } + mergeTogether(merge, handles); } }; MergeClusterProducer::MergeClusterProducer(const edm::ParameterSet &ps) - : timeClname_(ps.getParameter("timeClname")), - clustersTimeEE_token_( - consumes>>(ps.getParameter("time_layerclustersEE"))), - clustersTimeHSi_token_( - consumes>>(ps.getParameter("time_layerclustersHSi"))), - clustersTimeHSci_token_( - consumes>>(ps.getParameter("time_layerclustersHSci"))) { - EEclusters_token_ = consumes>(ps.getParameter("layerClustersEE")); - HSiclusters_token_ = consumes>(ps.getParameter("layerClustersHSi")); - HSciclusters_token_ = consumes>(ps.getParameter("layerClustersHSci")); + : timeClname_(ps.getParameter("timeClname")) { + std::vector tags = ps.getParameter>("layerClusters"); + for (auto &tag : tags) { + tokens_.push_back(consumes>(tag)); + } + std::vector time_tags = ps.getParameter>("time_layerclusters"); + for (auto &tag : time_tags) { + time_tokens_.push_back(consumes>>(tag)); + } produces>("InitialLayerClustersMask"); produces>(); @@ -140,15 +129,15 @@ void MergeClusterProducer::fillDescriptions(edm::ConfigurationDescriptions &desc // hgcalMergeLayerClusters edm::ParameterSetDescription desc; //layer clusters - desc.add("layerClustersEE", edm::InputTag("hgcalLayerClustersEE")); - desc.add("layerClustersHSi", edm::InputTag("hgcalLayerClustersHSi")); - desc.add("layerClustersHSci", edm::InputTag("hgcalLayerClustersHSci")); - + desc.add>("layerClusters", + {edm::InputTag("hgcalLayerClustersEE"), + edm::InputTag("hgcalLayerClustersHSi"), + edm::InputTag("hgcalLayerClustersHSci")}); //time - desc.add("time_layerclustersEE", edm::InputTag("hgcalLayerClustersEE", "timeLayerCluster")); - desc.add("time_layerclustersHSi", edm::InputTag("hgcalLayerClustersHSi", "timeLayerCluster")); - desc.add("time_layerclustersHSci", edm::InputTag("hgcalLayerClustersHSci", "timeLayerCluster")); - + desc.add>("time_layerclusters", + {edm::InputTag("hgcalLayerClustersEE:timeLayerCluster"), + edm::InputTag("hgcalLayerClustersHSi:timeLayerCluster"), + edm::InputTag("hgcalLayerClustersHSci:timeLayerCluster")}); desc.add("timeClname", "timeLayerCluster"); descriptions.add("hgcalMergeLayerClusters", desc); } @@ -156,7 +145,7 @@ void MergeClusterProducer::fillDescriptions(edm::ConfigurationDescriptions &desc void MergeClusterProducer::produce(edm::Event &evt, const edm::EventSetup &es) { //merge clusters std::unique_ptr> clusters(new std::vector); - createMerge(evt, EEclusters_token_, HSiclusters_token_, HSciclusters_token_, *clusters); + createMerge(evt, tokens_, *clusters); //put new clusters to event auto clusterHandle = evt.put(std::move(clusters)); @@ -178,15 +167,16 @@ void MergeClusterProducer::produce(edm::Event &evt, const edm::EventSetup &es) { } void MergeClusterProducer::mergeTogether(std::vector &merge, - const std::vector &EE, - const std::vector &HSi, - const std::vector &HSci) { - auto clusterSize = EE.size() + HSi.size() + HSci.size(); + std::vector> &clusters) { + size_t clusterSize = 0; + for (auto &cl : clusters) { + clusterSize += cl.size(); + } merge.reserve(clusterSize); - merge.insert(merge.end(), EE.begin(), EE.end()); - merge.insert(merge.end(), HSi.begin(), HSi.end()); - merge.insert(merge.end(), HSci.begin(), HSci.end()); + for (auto &cl : clusters) { + merge.insert(merge.end(), cl.begin(), cl.end()); + } } #include "FWCore/Framework/interface/MakerMacros.h" diff --git a/RecoLocalCalo/HGCalRecProducers/plugins/RecHitMapProducer.cc b/RecoLocalCalo/HGCalRecProducers/plugins/RecHitMapProducer.cc index 36cbb04accf31..b4ac0ccf5586e 100644 --- a/RecoLocalCalo/HGCalRecProducers/plugins/RecHitMapProducer.cc +++ b/RecoLocalCalo/HGCalRecProducers/plugins/RecHitMapProducer.cc @@ -29,7 +29,6 @@ class RecHitMapProducer : public edm::global::EDProducer<> { const edm::EDGetTokenT hits_eb_token_; const edm::EDGetTokenT hits_hb_token_; const edm::EDGetTokenT hits_ho_token_; - bool hgcalOnly_; }; DEFINE_FWK_MODULE(RecHitMapProducer); @@ -41,12 +40,9 @@ RecHitMapProducer::RecHitMapProducer(const edm::ParameterSet& ps) hits_fh_token_(consumes(ps.getParameter("FHInput"))), hits_bh_token_(consumes(ps.getParameter("BHInput"))), hits_eb_token_(consumes(ps.getParameter("EBInput"))), - hits_hb_token_(consumes(ps.getParameter("HBInput"))), - hits_ho_token_(consumes(ps.getParameter("HOInput"))), - hgcalOnly_(ps.getParameter("hgcalOnly")) { + hits_hb_token_(consumes(ps.getParameter("HBInput"))) { produces("hgcalRecHitMap"); - if (!hgcalOnly_) - produces("barrelRecHitMap"); + produces("barrelRecHitMap"); } void RecHitMapProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { @@ -56,7 +52,6 @@ void RecHitMapProducer::fillDescriptions(edm::ConfigurationDescriptions& descrip desc.add("BHInput", {"HGCalRecHit", "HGCHEBRecHits"}); desc.add("EBInput", {"particleFlowRecHitECAL", ""}); desc.add("HBInput", {"particleFlowRecHitHBHE", ""}); - desc.add("HOInput", {"particleFlowRecHitHO", ""}); desc.add("hgcalOnly", true); descriptions.add("recHitMapProducer", desc); } @@ -88,16 +83,13 @@ void RecHitMapProducer::produce(edm::StreamID, edm::Event& evt, const edm::Event evt.put(std::move(hitMapHGCal), "hgcalRecHitMap"); - if (!hgcalOnly_) { - auto hitMapBarrel = std::make_unique(); - MultiVectorManager barrelRechitManager; - barrelRechitManager.addVector(evt.get(hits_eb_token_)); - barrelRechitManager.addVector(evt.get(hits_hb_token_)); - barrelRechitManager.addVector(evt.get(hits_ho_token_)); - for (unsigned int i = 0; i < barrelRechitManager.size(); ++i) { - const auto recHitDetId = barrelRechitManager[i].detId(); - hitMapBarrel->emplace(recHitDetId, i); - } - evt.put(std::move(hitMapBarrel), "barrelRecHitMap"); + auto hitMapBarrel = std::make_unique(); + MultiVectorManager barrelRechitManager; + barrelRechitManager.addVector(evt.get(hits_eb_token_)); + barrelRechitManager.addVector(evt.get(hits_hb_token_)); + for (unsigned int i = 0; i < barrelRechitManager.size(); ++i) { + const auto recHitDetId = barrelRechitManager[i].detId(); + hitMapBarrel->emplace(recHitDetId, i); } + evt.put(std::move(hitMapBarrel), "barrelRecHitMap"); } diff --git a/RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.cc b/RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.cc new file mode 100644 index 0000000000000..4d56d9d30f80f --- /dev/null +++ b/RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.cc @@ -0,0 +1,399 @@ +#include "RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" +#include "DataFormats/CaloRecHit/interface/CaloID.h" +#include "DataFormats/HcalDetId/interface/HcalDetId.h" + +#include "oneapi/tbb/task_arena.h" +#include "oneapi/tbb.h" +#include + +using namespace hgcal_clustering; + +template +void BarrelCLUEAlgoT::setThresholds(edm::ESGetToken EBThres, + edm::ESGetToken HCALThres) { + tok_ebThresholds_ = EBThres; + tok_hcalThresholds_ = HCALThres; +} + +template +void BarrelCLUEAlgoT::getEventSetupPerAlgorithm(const edm::EventSetup& es) { + cells_.clear(); + numberOfClustersPerLayer_.clear(); + ebThresholds_ = &es.getData(tok_ebThresholds_); + hcalThresholds_ = &es.getData(tok_hcalThresholds_); + maxlayer_ = maxLayerIndex_; //for testing purposes + cells_.resize(maxlayer_ + 1); + numberOfClustersPerLayer_.resize(maxlayer_ + 1, 0); +} + +template +void BarrelCLUEAlgoT::populate(const reco::PFRecHitCollection& hits) { + for (unsigned int i = 0; i < hits.size(); ++i) { + const reco::PFRecHit& hit = hits[i]; + DetId detid(hit.detId()); + const GlobalPoint position = rhtools_.getPosition(detid); + int layer = 0; + + if (detid.det() == DetId::Hcal) { + HcalDetId hid(detid); + layer = hid.depth(); + if (detid.subdetId() == HcalSubdetector::HcalOuter) + layer += 1; + } + + cells_[layer].detid.push_back(detid); + cells_[layer].eta.push_back(position.eta()); + cells_[layer].phi.push_back(position.phi()); + cells_[layer].weight.push_back(hit.energy()); + cells_[layer].r.push_back(position.mag()); + float sigmaNoise = 0.f; + if (detid.det() == DetId::Ecal) { + sigmaNoise = (*ebThresholds_)[detid]; + } else { + const HcalPFCut* item = (*hcalThresholds_).getValues(detid); + sigmaNoise = item->seedThreshold(); + } + cells_[layer].sigmaNoise.push_back(sigmaNoise); + } +} + +template +void BarrelCLUEAlgoT::prepareDataStructures(unsigned int l) { + auto cellsSize = cells_[l].detid.size(); + cells_[l].rho.resize(cellsSize, 0.f); + cells_[l].delta.resize(cellsSize, 9999999); + cells_[l].nearestHigher.resize(cellsSize, -1); + cells_[l].clusterIndex.resize(cellsSize); + cells_[l].followers.resize(cellsSize); + cells_[l].isSeed.resize(cellsSize, false); + cells_[l].eta.resize(cellsSize, 0.f); + cells_[l].phi.resize(cellsSize, 0.f); + cells_[l].r.resize(cellsSize, 0.f); +} + +template +void BarrelCLUEAlgoT::makeClusters() { + tbb::this_task_arena::isolate([&] { + tbb::parallel_for(size_t(0), size_t(maxlayer_ + 1), [&](size_t i) { + prepareDataStructures(i); + T lt; + lt.clear(); + lt.fill(cells_[i].eta, cells_[i].phi); + + calculateLocalDensity(lt, i, deltac_); + calculateDistanceToHigher(lt, i, deltac_); + numberOfClustersPerLayer_[i] = findAndAssignClusters(i, deltac_); + + if (doSharing_) + // Now running the sharing routine + passSharedClusterIndex(lt, i, deltac_); + }); + }); + for (unsigned int i = 0; i < maxlayer_ + 1; ++i) { + setDensity(i); + } +} + +template +std::vector BarrelCLUEAlgoT::getClusters(bool) { + std::vector offsets(numberOfClustersPerLayer_.size(), 0); + + int maxClustersOnLayer = numberOfClustersPerLayer_[0]; + + if constexpr (!std::is_same_v) { + for (unsigned layerId = 1; layerId < offsets.size(); ++layerId) { + offsets[layerId] = offsets[layerId - 1] + numberOfClustersPerLayer_[layerId - 1]; + maxClustersOnLayer = std::max(maxClustersOnLayer, numberOfClustersPerLayer_[layerId]); + } + } + + auto totalNumberOfClusters = offsets.back() + numberOfClustersPerLayer_.back(); + clusters_v_.resize(totalNumberOfClusters); + // Store the cellId and energy for each cluster + // We need to store the energy as a pair here because we perform the energy splitting + std::vector>> cellsIdInCluster; + cellsIdInCluster.reserve(maxClustersOnLayer); + + for (unsigned int layerId = 0; layerId < maxlayer_ + 1; ++layerId) { + cellsIdInCluster.resize(numberOfClustersPerLayer_[layerId]); + auto& cellsOnLayer = cells_[layerId]; + unsigned int numberOfCells = cellsOnLayer.detid.size(); + auto firstClusterIdx = offsets[layerId]; + + for (unsigned int i = 0; i < numberOfCells; ++i) { + auto clusterIndex = cellsOnLayer.clusterIndex[i]; + + if (clusterIndex.size() == 1) { + cellsIdInCluster[clusterIndex[0]].push_back(std::make_pair(i, 1.f)); + } else if (clusterIndex.size() > 1) { + std::vector fractions(clusterIndex.size()); + + for (unsigned int j = 0; j < clusterIndex.size(); j++) { + const auto& seed = clusterIndex[j]; + const auto& seedCell = cellsOnLayer.seedToCellIndex[seed]; + const auto& seedEnergy = cellsOnLayer.weight[seedCell]; + // compute the distance + float dist = distance(i, seedCell, layerId) / T::type::cellWidthEta; + fractions[j] = seedEnergy * std::exp(-(std::pow(dist, 2)) / (2 * std::pow(T::type::showerSigma, 2))); + } + auto tot_norm_fractions = std::accumulate(std::begin(fractions), std::end(fractions), 0.); + + for (unsigned int j = 0; j < clusterIndex.size(); j++) { + float norm_fraction = fractions[j] / tot_norm_fractions; + if (norm_fraction < fractionCutoff_) { + auto clusterIndex_it = std::find(clusterIndex.begin(), clusterIndex.end(), clusterIndex[j]); + auto fraction_it = std::find(fractions.begin(), fractions.end(), fractions[j]); + clusterIndex.erase(clusterIndex_it); + fractions.erase(fraction_it); + } + if (norm_fraction >= fractionCutoff_) { + cellsIdInCluster[clusterIndex[j]].push_back(std::make_pair(i, norm_fraction)); + } + } + auto tot_norm_cleaned_fractions = std::accumulate(fractions.begin(), fractions.end(), 0.); + for (unsigned int j = 0; j < clusterIndex.size(); j++) { + float norm_fraction = fractions[j] / tot_norm_cleaned_fractions; + cellsIdInCluster[clusterIndex[j]].push_back(std::make_pair(i, norm_fraction)); + } + } + } + + std::vector> thisCluster; + for (int clIndex = 0; clIndex < numberOfClustersPerLayer_[layerId]; clIndex++) { + auto& cl = cellsIdInCluster[clIndex]; + auto position = calculatePosition(cl, layerId); + float energy = 0.f; + int seedDetId = -1; + + for (auto [cellIdx, fraction] : cl) { + energy += cellsOnLayer.weight[cellIdx] * fraction; + thisCluster.emplace_back(cellsOnLayer.detid[cellIdx], fraction); + if (cellsOnLayer.isSeed[cellIdx]) { + seedDetId = cellsOnLayer.detid[cellIdx]; + } + } + auto globalClusterIndex = clIndex + firstClusterIdx; + + if constexpr (std::is_same_v) { + clusters_v_[globalClusterIndex] = + reco::BasicCluster(energy, position, reco::CaloID::DET_ECAL_BARREL, thisCluster, algoId_); + } else if constexpr (std::is_same_v) { + clusters_v_[globalClusterIndex] = + reco::BasicCluster(energy, position, reco::CaloID::DET_HCAL_BARREL, thisCluster, algoId_); + } else { + clusters_v_[globalClusterIndex] = + reco::BasicCluster(energy, position, reco::CaloID::DET_HO, thisCluster, algoId_); + } + clusters_v_[globalClusterIndex].setSeed(seedDetId); + thisCluster.clear(); + } + cellsIdInCluster.clear(); + } + return clusters_v_; +} + +template +math::XYZPoint BarrelCLUEAlgoT::calculatePosition(const std::vector>& v, + const unsigned int layerId) const { + float total_weight = 0.f; + float x = 0.f; + float y = 0.f; + float z = 0.f; + + auto& cellsOnLayer = cells_[layerId]; + for (const auto& [i, fraction] : v) { + float rhEnergy = cellsOnLayer.weight[i] * fraction; + total_weight += rhEnergy; + float theta = 2 * std::atan(std::exp(-cellsOnLayer.eta[i])); + const GlobalPoint gp(GlobalPoint::Polar(theta, cellsOnLayer.phi[i], cellsOnLayer.r[i])); + x += gp.x() * rhEnergy; + y += gp.y() * rhEnergy; + z += gp.z() * rhEnergy; + } + if (total_weight != 0.f) { + float inv_total_weight = 1.f / total_weight; + return math::XYZPoint(x * inv_total_weight, y * inv_total_weight, z * inv_total_weight); + } else { + return math::XYZPoint(0.f, 0.f, 0.f); + } +} + +template +void BarrelCLUEAlgoT::calculateLocalDensity(const T& lt, const unsigned int layerId, float deltac_) { + auto& cellsOnLayer = cells_[layerId]; + unsigned int numberOfCells = cellsOnLayer.detid.size(); + + for (unsigned int i = 0; i < numberOfCells; ++i) { + float delta = deltac_; + std::array search_box = lt.searchBox(cellsOnLayer.eta[i] - delta, + cellsOnLayer.eta[i] + delta, + cellsOnLayer.phi[i] - delta, + cellsOnLayer.phi[i] + delta); + LogDebug("BarrelCLUEAlgo") << "searchBox for cell " << i << " cell eta: " << cellsOnLayer.eta[i] + << " cell phi: " << cellsOnLayer.phi[i] << " eta window: " << cellsOnLayer.eta[i] - delta + << " -> " << cellsOnLayer.eta[i] + delta + << " phi window: " << cellsOnLayer.phi[i] - delta << " -> " + << cellsOnLayer.phi[i] + delta << "\n"; + for (int etaBin = search_box[0]; etaBin < search_box[1]; ++etaBin) { + for (int phiBin = search_box[2]; phiBin < search_box[3]; ++phiBin) { + int phi = (phiBin % T::type::nRows); + int binId = lt.getGlobalBinByBin(etaBin, phi); + size_t binSize = lt[binId].size(); + LogDebug("BarrelCLUEAlgo") << "Bin size for cell " << i << ": " << binSize << " binId: " << binId + << " etaBin: " << etaBin << " phi: " << phi << "\n"; + for (unsigned int j = 0; j < binSize; ++j) { + unsigned int otherId = lt[binId][j]; + if (distance(i, otherId, layerId) < delta) { + cellsOnLayer.rho[i] += (i == otherId ? 1.f : 0.5f) * cellsOnLayer.weight[otherId]; + } + } + } + } + } +} + +template +void BarrelCLUEAlgoT::calculateDistanceToHigher(const T& lt, const unsigned int layerId, float delta_c) { + auto& cellsOnLayer = cells_[layerId]; + unsigned int numberOfCells = cellsOnLayer.detid.size(); + + for (unsigned int i = 0; i < numberOfCells; ++i) { + float maxDelta = std::numeric_limits::max(); + float i_delta = maxDelta; + float i_nearestHigher = -1; + + float range = delta_c; + std::array search_box = lt.searchBox(cellsOnLayer.eta[i] - range, + cellsOnLayer.eta[i] + range, + cellsOnLayer.phi[i] - range, + cellsOnLayer.phi[i] + range); + + for (int etaBin = search_box[0]; etaBin < search_box[1]; ++etaBin) { + for (int phiBin = search_box[2]; phiBin < search_box[3]; ++phiBin) { + int phi = (phiBin % T::type::nRows); + size_t binId = lt.getGlobalBinByBin(etaBin, phi); + size_t binSize = lt[binId].size(); + + for (unsigned int j = 0; j < binSize; ++j) { + int otherId = lt[binId][j]; + float dist = distance(i, otherId, layerId); + bool foundHigher = + (cellsOnLayer.rho[otherId] > cellsOnLayer.rho[i]) || + (cellsOnLayer.rho[otherId] == cellsOnLayer.rho[i] && cellsOnLayer.detid[otherId] > cellsOnLayer.detid[i]); + if (foundHigher && dist <= i_delta) { + i_delta = dist; + i_nearestHigher = otherId; + } + } + } + } + bool foundNearestHigherInSearchBox = (i_delta != maxDelta); + if (foundNearestHigherInSearchBox) { + cellsOnLayer.delta[i] = i_delta; + cellsOnLayer.nearestHigher[i] = i_nearestHigher; + } else { + cellsOnLayer.delta[i] = maxDelta; + cellsOnLayer.nearestHigher[i] = -1; + } + LogDebug("BarrelCLUEAlgo") << "Debugging calculateDistanceToHigher: \n" + << " cell: " << i << " eta: " << cellsOnLayer.eta[i] << " phi: " << cellsOnLayer.phi[i] + << " energy: " << cellsOnLayer.weight[i] << " density: " << cellsOnLayer.rho[i] + << " nearest higher: " << cellsOnLayer.nearestHigher[i] + << " distance: " << cellsOnLayer.delta[i] << "\n"; + } +} + +template +int BarrelCLUEAlgoT::findAndAssignClusters(const unsigned int layerId, float delta_c) { + unsigned int nClustersOnLayer = 0; + auto& cellsOnLayer = cells_[layerId]; + unsigned int numberOfCells = cellsOnLayer.detid.size(); + std::vector localStack; + for (unsigned int i = 0; i < numberOfCells; ++i) { + float rho_c = kappa_ * cellsOnLayer.sigmaNoise[i]; + float delta = delta_c; + + //std::vector outDeltas = {7., 9., 10., 11.}; + //if constexpr (std::is_same_v) + // outlierDeltaFactor_ = outDeltas[layerId - 1]; + bool isSeed = (cellsOnLayer.delta[i] > delta) && (cellsOnLayer.rho[i] >= rho_c); + bool isOutlier = (cellsOnLayer.delta[i] > outlierDeltaFactor_) && (cellsOnLayer.rho[i] < rho_c); + if (isSeed) { + cellsOnLayer.clusterIndex[i].push_back(nClustersOnLayer); + cellsOnLayer.isSeed[i] = true; + cellsOnLayer.seedToCellIndex.push_back(i); + nClustersOnLayer++; + localStack.push_back(i); + } else if (!isOutlier) { + cellsOnLayer.followers[cellsOnLayer.nearestHigher[i]].push_back(i); + } + } + + while (!localStack.empty()) { + int endStack = localStack.back(); + auto& thisSeed = cellsOnLayer.followers[endStack]; + localStack.pop_back(); + + for (int j : thisSeed) { + cellsOnLayer.clusterIndex[j].push_back(cellsOnLayer.clusterIndex[endStack][0]); + localStack.push_back(j); + } + } + return nClustersOnLayer; +} + +template +void BarrelCLUEAlgoT::passSharedClusterIndex(const T& lt, const unsigned int layerId, float delta_c) { + auto& cellsOnLayer = cells_[layerId]; + unsigned int numberOfCells = cellsOnLayer.detid.size(); + float delta = delta_c; + for (unsigned int i = 0; i < numberOfCells; ++i) { + // Do not run on outliers, but run also on seeds and followers + if ((cellsOnLayer.clusterIndex[i].size() == 0)) + continue; + + std::array search_box = lt.searchBox(cellsOnLayer.eta[i] - delta, + cellsOnLayer.eta[i] + delta, + cellsOnLayer.phi[i] - delta, + cellsOnLayer.phi[i] + delta); + + for (int etaBin = search_box[0]; etaBin < search_box[1]; ++etaBin) { + for (int phiBin = search_box[2]; phiBin < search_box[3]; ++phiBin) { + int phi = (phiBin % T::type::nRows); + size_t binId = lt.getGlobalBinByBin(etaBin, phi); + size_t binSize = lt[binId].size(); + + for (unsigned int j = 0; j < binSize; ++j) { + unsigned int otherId = lt[binId][j]; + if (cellsOnLayer.clusterIndex[otherId].size() == 0) + continue; + int otherClusterIndex = cellsOnLayer.clusterIndex[otherId][0]; + if (std::find(std::begin(cellsOnLayer.clusterIndex[i]), + std::end(cellsOnLayer.clusterIndex[i]), + otherClusterIndex) == std::end(cellsOnLayer.clusterIndex[i])) + cellsOnLayer.clusterIndex[i].push_back(otherClusterIndex); + } + } + } + } +} + +template +void BarrelCLUEAlgoT::setDensity(const unsigned int layerId) { + auto& cellsOnLayer = cells_[layerId]; + unsigned int numberOfCells = cellsOnLayer.detid.size(); + for (unsigned int i = 0; i < numberOfCells; ++i) { + density_[cellsOnLayer.detid[i]] = cellsOnLayer.rho[i]; + } +} + +template +Density BarrelCLUEAlgoT::getDensity() { + return density_; +} + +template class BarrelCLUEAlgoT; +template class BarrelCLUEAlgoT; diff --git a/RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.h b/RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.h new file mode 100644 index 0000000000000..58d91130a012a --- /dev/null +++ b/RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.h @@ -0,0 +1,191 @@ +#ifndef RecoParticleFlow_PFClusterProducer_BarrelCLUEAlgo_h +#define RecoParticleFlow_PFClusterProducer_BarrelCLUEAlgo_h + +#include "RecoLocalCalo/HGCalRecProducers/interface/HGCalClusteringAlgoBase.h" + +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" + +#include "DataFormats/DetId/interface/DetId.h" +#include "DataFormats/ParticleFlowReco/interface/PFRecHit.h" +#include "DataFormats/ParticleFlowReco/interface/PFRecHitFwd.h" + +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/Records/interface/CaloGeometryRecord.h" + +#include "DataFormats/EgammaReco/interface/BasicCluster.h" +#include "DataFormats/Math/interface/Point3D.h" +#include "DataFormats/Math/interface/deltaPhi.h" + +#include "RecoLocalCalo/HGCalRecProducers/interface/HGCalLayerTiles.h" + +#include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h" + +#include "CondFormats/DataRecord/interface/EcalPFRecHitThresholdsRcd.h" +#include "CondFormats/EcalObjects/interface/EcalPFRecHitThresholds.h" +#include "CondFormats/DataRecord/interface/HcalPFCutsRcd.h" +#include "CondFormats/HcalObjects/interface/HcalPFCuts.h" + +// C/C++ headers +#include +#include +#include + +using Density = hgcal_clustering::Density; + +template +class BarrelCLUEAlgoT : public HGCalClusteringAlgoBase { +public: + BarrelCLUEAlgoT(const edm::ParameterSet& ps) + : HGCalClusteringAlgoBase( + (HGCalClusteringAlgoBase::VerbosityLevel)ps.getUntrackedParameter("verbosity", 3), + reco::CaloCluster::undefined), + deltac_(ps.getParameter("deltac")), + kappa_(ps.getParameter("kappa")), + fractionCutoff_(ps.getParameter("fractionCutoff")), + maxLayerIndex_(ps.getParameter("maxLayerIndex")), + outlierDeltaFactor_(ps.getParameter("outlierDeltaFactor")), + doSharing_(ps.getParameter("doSharing")) {} + ~BarrelCLUEAlgoT() override {} + + void getEventSetupPerAlgorithm(const edm::EventSetup& es) override; + void setThresholds(edm::ESGetToken, + edm::ESGetToken) override; + + void populate(const HGCRecHitCollection& hits) override {}; + void populate(const reco::PFRecHitCollection& hits) override; + // this is the method that will start the clusterisation (it is possible to invoke this method + // more than once - but make sure it is with different hit collections (or else use reset) + + void makeClusters() override; + + // this is the method to get the cluster collection out + std::vector getClusters(bool) override; + + void reset() override { + clusters_v_.clear(); + clusters_v_.shrink_to_fit(); + for (auto& cl : numberOfClustersPerLayer_) { + cl = 0; + } + + for (auto& cells : cells_) { + cells.clear(); + cells.shrink_to_fit(); + } + density_.clear(); + } + + Density getDensity() override; + + void computeThreshold(); + + static void fillPSetDescription(edm::ParameterSetDescription& iDesc) { + iDesc.add("outlierDeltaFactor", 2.); + iDesc.add("kappa", 1.34); + iDesc.add("maxLayerIndex", 0); + iDesc.add("deltac", 0.0175); + iDesc.add("fractionCutoff", 0.); + iDesc.add("doSharing", false); + } + + /// point in the space + typedef math::XYZPoint Point; + +private: + // To get ECAL sigmaNoise + edm::ESGetToken tok_ebThresholds_; + const EcalPFRecHitThresholds* ebThresholds_; + //To get HCAL sigmaNoise + edm::ESGetToken tok_hcalThresholds_; + const HcalPFCuts* hcalThresholds_; + // The two parameters used to identify clusters + double deltac_; + double kappa_; + double fractionCutoff_; + int maxLayerIndex_; + float outlierDeltaFactor_; + bool doSharing_; + Density density_; + // For keeping the density per hit + + struct BarrelCellsOnLayer { + std::vector detid; + std::vector eta; + std::vector phi; + std::vector r; + + std::vector weight; + std::vector rho; + + std::vector delta; + std::vector nearestHigher; + std::vector> clusterIndex; + std::vector sigmaNoise; + std::vector> followers; + std::vector isSeed; + std::vector seedToCellIndex; + + void clear() { + detid.clear(); + eta.clear(); + phi.clear(); + r.clear(); + weight.clear(); + rho.clear(); + delta.clear(); + nearestHigher.clear(); + clusterIndex.clear(); + sigmaNoise.clear(); + followers.clear(); + isSeed.clear(); + seedToCellIndex.clear(); + } + + void shrink_to_fit() { + detid.shrink_to_fit(); + r.shrink_to_fit(); + eta.shrink_to_fit(); + phi.shrink_to_fit(); + weight.shrink_to_fit(); + rho.shrink_to_fit(); + delta.shrink_to_fit(); + nearestHigher.shrink_to_fit(); + clusterIndex.shrink_to_fit(); + sigmaNoise.shrink_to_fit(); + followers.shrink_to_fit(); + isSeed.shrink_to_fit(); + seedToCellIndex.clear(); + } + }; + + std::vector cells_; + + std::vector numberOfClustersPerLayer_; + + inline float distance2(int cell1, int cell2, int layerId) const { // distance squared + const float dphi = reco::deltaPhi(cells_[layerId].phi[cell1], cells_[layerId].phi[cell2]); + const float deta = cells_[layerId].eta[cell1] - cells_[layerId].eta[cell2]; + return (deta * deta + dphi * dphi); + } + + inline float distance(int cell1, int cell2, int layerId) const { // 2-d distance on the layer (x-y) + return std::sqrt(distance2(cell1, cell2, layerId)); + } + + void prepareDataStructures(const unsigned int layerId); + void calculateLocalDensity(const TILE& lt, const unsigned int layerId, float delta_c); + void calculateDistanceToHigher(const TILE& lt, const unsigned int layerId, float delta_c); + int findAndAssignClusters(const unsigned int layerId, float delta_c); + void passSharedClusterIndex(const TILE& lt, const unsigned int layerId, float delta_c); + math::XYZPoint calculatePosition(const std::vector>& v, const unsigned int layerId) const; + void setDensity(const unsigned int layerId); +}; + +// explicit template instantiation +extern template class BarrelCLUEAlgoT; +extern template class BarrelCLUEAlgoT; + +using EBCLUEAlgo = BarrelCLUEAlgoT; +using HBCLUEAlgo = BarrelCLUEAlgoT; + +#endif diff --git a/RecoParticleFlow/PFClusterProducer/plugins/BarrelLayerClusterPluginFactory.cc b/RecoParticleFlow/PFClusterProducer/plugins/BarrelLayerClusterPluginFactory.cc new file mode 100644 index 0000000000000..e3ab92e1f1972 --- /dev/null +++ b/RecoParticleFlow/PFClusterProducer/plugins/BarrelLayerClusterPluginFactory.cc @@ -0,0 +1,9 @@ +#include "RecoLocalCalo/HGCalRecProducers/interface/HGCalLayerClusterAlgoFactory.h" +#include "RecoLocalCalo/HGCalRecProducers/interface/HGCalClusteringAlgoBase.h" +#include "RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.h" +#include "FWCore/ParameterSet/interface/ValidatedPluginFactoryMacros.h" +#include "FWCore/ParameterSet/interface/ValidatedPluginMacros.h" + +EDM_REGISTER_VALIDATED_PLUGINFACTORY(HGCalLayerClusterAlgoFactory, "HGCalLayerClusterAlgoFactory"); +DEFINE_EDM_VALIDATED_PLUGIN(HGCalLayerClusterAlgoFactory, EBCLUEAlgo, "EBCLUE"); +DEFINE_EDM_VALIDATED_PLUGIN(HGCalLayerClusterAlgoFactory, HBCLUEAlgo, "HBCLUE"); diff --git a/RecoParticleFlow/PFClusterProducer/plugins/BarrelLayerClusterProducer.cc b/RecoParticleFlow/PFClusterProducer/plugins/BarrelLayerClusterProducer.cc new file mode 100644 index 0000000000000..4f7267a870a25 --- /dev/null +++ b/RecoParticleFlow/PFClusterProducer/plugins/BarrelLayerClusterProducer.cc @@ -0,0 +1,193 @@ +#ifndef __RecoParticleFlow_PFClusterProducer_BarrelLayerClusterProducer_H__ +#define __RecoParticleFlow_PFClusterProducer_BarrelLayerClusterProducer_H__ + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/ParameterSet/interface/PluginDescription.h" + +#include "RecoParticleFlow/PFClusterProducer/interface/RecHitTopologicalCleanerBase.h" +#include "RecoParticleFlow/PFClusterProducer/interface/SeedFinderBase.h" +#include "RecoParticleFlow/PFClusterProducer/interface/InitialClusteringStepBase.h" +#include "RecoParticleFlow/PFClusterProducer/interface/PFClusterBuilderBase.h" +#include "RecoParticleFlow/PFClusterProducer/interface/PFCPositionCalculatorBase.h" +#include "RecoParticleFlow/PFClusterProducer/interface/PFClusterEnergyCorrectorBase.h" +#include "RecoParticleFlow/PFClusterProducer/interface/CaloRecHitResolutionProvider.h" + +#include "RecoLocalCalo/HGCalRecProducers/interface/ComputeClusterTime.h" + +#include "RecoLocalCalo/HGCalRecProducers/interface/HGCalLayerClusterAlgoFactory.h" +#include "RecoLocalCalo/HGCalRecAlgos/interface/HGCalDepthPreClusterer.h" + +#include "Geometry/Records/interface/IdealGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" + +#include "DataFormats/ParticleFlowReco/interface/PFCluster.h" +#include "DataFormats/ParticleFlowReco/interface/PFRecHit.h" + +#include "DataFormats/Common/interface/ValueMap.h" + +#include "RecoParticleFlow/PFClusterProducer/plugins/BarrelCLUEAlgo.h" +#include "RecoLocalCalo/HGCalRecProducers/interface/BarrelTilesConstants.h" + +using Density = hgcal_clustering::Density; + +class BarrelLayerClusterProducer : public edm::stream::EDProducer<> { +public: + BarrelLayerClusterProducer(const edm::ParameterSet&); + ~BarrelLayerClusterProducer() override {} + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + + void produce(edm::Event&, const edm::EventSetup&) override; + +private: + reco::CaloCluster::AlgoId algoId_; + std::string timeClname_; + unsigned int nHitsTime_; + edm::EDGetTokenT hits_token_; + edm::ESGetToken caloGeomToken_; + + std::unique_ptr algo_; + hgcal::RecHitTools rhtools_; + std::unique_ptr timeResolutionCalc_; + + void setAlgoId(std::string& type); +}; + +DEFINE_FWK_MODULE(BarrelLayerClusterProducer); + +BarrelLayerClusterProducer::BarrelLayerClusterProducer(const edm::ParameterSet& ps) + : algoId_(reco::CaloCluster::undefined), + timeClname_(ps.getParameter("timeClname")), + nHitsTime_(ps.getParameter("nHitsTime")), + hits_token_{consumes(ps.getParameter("recHits"))}, + caloGeomToken_{consumesCollector().esConsumes()} { + auto pluginPSet = ps.getParameter("plugin"); + std::string type = pluginPSet.getParameter("type"); + algo_ = HGCalLayerClusterAlgoFactory::get()->create(type, pluginPSet); + setAlgoId(type); + + algo_->setThresholds(consumesCollector().esConsumes(), + consumesCollector().esConsumes()); + + timeResolutionCalc_ = std::make_unique(ps.getParameterSet("timeResolutionCalc")); + produces>("InitialLayerClustersMask"); + produces>(); + produces>>(timeClname_); +} + +void BarrelLayerClusterProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + + edm::ParameterSetDescription pluginDesc; + pluginDesc.addNode(edm::PluginDescription("type", "EBCLUE", true)); + + desc.add("plugin", pluginDesc); + + desc.add("recHits", edm::InputTag("particleFlowRecHitECAL", "")); + + edm::ParameterSetDescription timeResolutionCalcDesc; + timeResolutionCalcDesc.addNode(edm::ParameterDescription("noiseTerm", 1.10889, true) and + edm::ParameterDescription("constantTerm", 0.428192, true) and + edm::ParameterDescription("corrTermLowE", 0.0510871, true) and + edm::ParameterDescription("threshLowE", 0.5, true) and + edm::ParameterDescription("constantTermLowE", 0.0, true) and + edm::ParameterDescription("noiseTermLowE", 1.31883, true) and + edm::ParameterDescription("threshHighE", 5.0, true)); + desc.add("timeResolutionCalc", timeResolutionCalcDesc); + + desc.add("timeClname", "timeLayerCluster"); + desc.add("nHitsTime", 3); + descriptions.add("barrelLayerClusters", desc); +} + +void BarrelLayerClusterProducer::produce(edm::Event& evt, const edm::EventSetup& es) { + edm::Handle hits; + edm::ESHandle geom = es.getHandle(caloGeomToken_); + rhtools_.setGeometry(*geom); + + //auto density = std::make_unique(); + algo_->getEventSetup(es, rhtools_); + + //make a map detid-rechit + // NB for the moment just host EE and FH hits + // timing in digi for BH not implemented for now + std::unordered_map hitmap; + + evt.getByToken(hits_token_, hits); + algo_->populate(*hits); + for (auto& hit : *hits) { + hitmap[hit.detId()] = &(hit); + } + algo_->makeClusters(); + + std::unique_ptr> clusters(new std::vector); + *clusters = algo_->getClusters(false); + auto clusterHandle = evt.put(std::move(clusters)); + + edm::PtrVector clusterPtrs; //, clusterPtrsSharing; + + std::vector> times; + times.reserve(clusterHandle->size()); + + for (unsigned i = 0; i < clusterHandle->size(); ++i) { + edm::Ptr ptr(clusterHandle, i); + clusterPtrs.push_back(ptr); + + std::pair timeCl(-99., -1.); + + const reco::CaloCluster& sCl = (*clusterHandle)[i]; + if (sCl.size() >= nHitsTime_) { + std::vector timeClhits; + std::vector timeErrorClhits; + + for (auto const& hit : sCl.hitsAndFractions()) { + auto finder = hitmap.find(hit.first); + if (finder == hitmap.end()) + continue; + + //time is computed wrt 0-25ns + offset and set to -1 if no time + const reco::PFRecHit* rechit = finder->second; + float rhTimeE = timeResolutionCalc_->timeResolution2(rechit->energy()); + if (rhTimeE < 0.) + continue; + timeClhits.push_back(rechit->time()); + timeErrorClhits.push_back(1. / rhTimeE); + } + hgcalsimclustertime::ComputeClusterTime timeEstimator; + timeCl = timeEstimator.fixSizeHighestDensity(timeClhits, timeErrorClhits, nHitsTime_); + } + times.push_back(timeCl); + } + + std::unique_ptr> layerClustersMask(new std::vector); + layerClustersMask->resize(clusterHandle->size(), 1.0); + evt.put(std::move(layerClustersMask), "InitialLayerClustersMask"); + + auto timeCl = std::make_unique>>(); + edm::ValueMap>::Filler filler(*timeCl); + filler.insert(clusterHandle, times.begin(), times.end()); + filler.fill(); + evt.put(std::move(timeCl), timeClname_); + + algo_->reset(); +} + +void BarrelLayerClusterProducer::setAlgoId(std::string& type) { + if (type == "EBCLUE") { + algoId_ = reco::CaloCluster::barrel_em; + } else if (type == "HBCLUE") { + algoId_ = reco::CaloCluster::barrel_had; + } else { + throw cms::Exception("InvalidPlugin") << "Invalid plugin type: " << type << std::endl; + } +} + +#endif //__RecoLocalCalo_HGCRecProducers_BarrelLayerClusterProducer_H__ diff --git a/RecoParticleFlow/PFClusterProducer/plugins/BuildFile.xml b/RecoParticleFlow/PFClusterProducer/plugins/BuildFile.xml index 220bee86bde6e..98e40847aa7d8 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/BuildFile.xml +++ b/RecoParticleFlow/PFClusterProducer/plugins/BuildFile.xml @@ -17,6 +17,7 @@ + diff --git a/RecoParticleFlow/PFClusterProducer/plugins/PFClusterFromHGCalTrackster.cc b/RecoParticleFlow/PFClusterProducer/plugins/PFClusterFromHGCalTrackster.cc index 6d91ce81d4c1f..cd61f9a68a79d 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/PFClusterFromHGCalTrackster.cc +++ b/RecoParticleFlow/PFClusterProducer/plugins/PFClusterFromHGCalTrackster.cc @@ -102,6 +102,9 @@ void PFClusterFromHGCalTrackster::buildClusters(const edm::Handle::LCToCPAssociatorByEnergyScoreImpl( if constexpr (std::is_same_v) layers_ = recHitTools_->lastLayerBH(); else - layers_ = 6; + layers_ = recHitTools_->lastLayerBarrel() + 1; } template @@ -48,8 +48,11 @@ ticl::association LCToCPAssociatorByEnergyScoreImpl::makeConnections( ticl::caloParticleToLayerCluster cPOnLayer; cPOnLayer.resize(nCaloParticles); for (unsigned int i = 0; i < nCaloParticles; ++i) { - cPOnLayer[i].resize(layers_ * 2); - for (unsigned int j = 0; j < layers_ * 2; ++j) { + unsigned int nLayers = layers_ * 2; + if constexpr (std::is_same_v) + nLayers = layers_; + cPOnLayer[i].resize(nLayers); + for (unsigned int j = 0; j < nLayers; ++j) { cPOnLayer[i][j].caloParticleId = i; cPOnLayer[i][j].energy = 0.f; cPOnLayer[i][j].hits_and_fractions.clear(); @@ -349,6 +352,13 @@ ticl::association LCToCPAssociatorByEnergyScoreImpl::makeConnections( // together with the returned AssociationMap for (unsigned int lcId = 0; lcId < nLayerClusters; ++lcId) { // find the unique caloparticles id contributing to the layer clusters + if constexpr (std::is_same_v) { + if (recHitTools_->isBarrel(clusters[lcId].seed())) + continue; + } else { + if (!recHitTools_->isBarrel(clusters[lcId].seed())) + continue; + } std::sort(cpsInLayerCluster[lcId].begin(), cpsInLayerCluster[lcId].end()); auto last = std::unique(cpsInLayerCluster[lcId].begin(), cpsInLayerCluster[lcId].end()); cpsInLayerCluster[lcId].erase(last, cpsInLayerCluster[lcId].end()); @@ -380,6 +390,8 @@ ticl::association LCToCPAssociatorByEnergyScoreImpl::makeConnections( bool hitWithNoCP = (detIdToCaloParticleId_Map.find(rh_detid) == detIdToCaloParticleId_Map.end()); auto itcheck = hitMap_->find(rh_detid); + if (itcheck == hitMap_->end()) + continue; const HIT* hit = hits_[itcheck->second]; float hitEnergyWeight = hit->energy() * hit->energy(); @@ -405,7 +417,10 @@ ticl::association LCToCPAssociatorByEnergyScoreImpl::makeConnections( // Compute the CaloParticle-To-LayerCluster score for (const auto& cpId : cPIndices) { - for (unsigned int layerId = 0; layerId < layers_ * 2; ++layerId) { + unsigned int nLayers = layers_ * 2; + if constexpr (std::is_same_v) + nLayers = layers_; + for (unsigned int layerId = 0; layerId < nLayers; ++layerId) { unsigned int CPNumberOfHits = cPOnLayer[cpId][layerId].hits_and_fractions.size(); if (CPNumberOfHits == 0) continue; diff --git a/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToCPAssociatorByEnergyScoreProducer.cc b/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToCPAssociatorByEnergyScoreProducer.cc index 8a80f1a72967a..da04af8b4cfcc 100644 --- a/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToCPAssociatorByEnergyScoreProducer.cc +++ b/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToCPAssociatorByEnergyScoreProducer.cc @@ -86,10 +86,8 @@ void LCToCPAssociatorByEnergyScoreProducer::fillDescriptions(edm::Configura edm::InputTag("HGCalRecHit", "HGCHEBRecHits")}); } else { desc.add("hitMapTag", edm::InputTag("recHitMapProducer", "barrelRecHitMap")); - desc.add>("hits", - {edm::InputTag("particleFlowRecHitECAL", ""), - edm::InputTag("particleFlowRecHitHBHE", ""), - edm::InputTag("particleFlowRecHitHO", "")}); + desc.add>( + "hits", {edm::InputTag("particleFlowRecHitECAL", ""), edm::InputTag("particleFlowRecHitHBHE", "")}); } cfg.addWithDefaultLabel(desc); } diff --git a/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToSCAssociatorByEnergyScoreImpl.cc b/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToSCAssociatorByEnergyScoreImpl.cc index 8fc1b4074a3af..8b65dde60a924 100644 --- a/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToSCAssociatorByEnergyScoreImpl.cc +++ b/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToSCAssociatorByEnergyScoreImpl.cc @@ -18,7 +18,7 @@ LCToSCAssociatorByEnergyScoreImpl::LCToSCAssociatorByEnergyScoreImpl( if constexpr (std::is_same_v) layers_ = recHitTools_->lastLayerBH(); else - layers_ = 6; //EB + 4 HB + HO + layers_ = recHitTools_->lastLayerBarrel() + 1; //EB + 4 HB } template @@ -52,8 +52,11 @@ ticl::association LCToSCAssociatorByEnergyScoreImpl::makeConnections( ticl::simClusterToLayerCluster lcsInSimCluster; lcsInSimCluster.resize(nSimClusters); for (unsigned int i = 0; i < nSimClusters; ++i) { - lcsInSimCluster[i].resize(layers_ * 2); - for (unsigned int j = 0; j < layers_ * 2; ++j) { + unsigned int nLayers = 2 * layers_; + if constexpr (std::is_same_v) + nLayers = layers_; + lcsInSimCluster[i].resize(nLayers); + for (unsigned int j = 0; j < nLayers; ++j) { lcsInSimCluster[i][j].simClusterId = i; lcsInSimCluster[i][j].energy = 0.f; lcsInSimCluster[i][j].hits_and_fractions.clear(); @@ -353,6 +356,13 @@ ticl::association LCToSCAssociatorByEnergyScoreImpl::makeConnections( for (unsigned int lcId = 0; lcId < nLayerClusters; ++lcId) { // The simclusters contributing to the layer clusters should already be unique. // find the unique simclusters id contributing to the layer clusters + if constexpr (std::is_same_v) { + if (recHitTools_->isBarrel(clusters[lcId].seed())) + continue; + } else { + if (!recHitTools_->isBarrel(clusters[lcId].seed())) + continue; + } std::sort(scsInLayerCluster[lcId].begin(), scsInLayerCluster[lcId].end()); auto last = std::unique(scsInLayerCluster[lcId].begin(), scsInLayerCluster[lcId].end()); scsInLayerCluster[lcId].erase(last, scsInLayerCluster[lcId].end()); @@ -418,7 +428,10 @@ ticl::association LCToSCAssociatorByEnergyScoreImpl::makeConnections( // Compute the SimCluster-To-LayerCluster score for (const auto& scId : sCIndices) { - for (unsigned int layerId = 0; layerId < layers_ * 2; ++layerId) { + unsigned int nLayers = layers_ * 2; + if constexpr (std::is_same_v) + nLayers = layers_; + for (unsigned int layerId = 0; layerId < nLayers; ++layerId) { unsigned int SCNumberOfHits = lcsInSimCluster[scId][layerId].hits_and_fractions.size(); if (SCNumberOfHits == 0) continue; diff --git a/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToSCAssociatorByEnergyScoreProducer.cc b/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToSCAssociatorByEnergyScoreProducer.cc index b0624101d9327..dc26b9f0cdf9b 100644 --- a/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToSCAssociatorByEnergyScoreProducer.cc +++ b/SimCalorimetry/HGCalAssociatorProducers/plugins/LCToSCAssociatorByEnergyScoreProducer.cc @@ -85,10 +85,8 @@ void LCToSCAssociatorByEnergyScoreProducer::fillDescriptions(edm::Configura edm::InputTag("HGCalRecHit", "HGCHEBRecHits")}); } else { desc.add("hitMapTag", edm::InputTag("recHitMapProducer", "barrelRecHitMap")); - desc.add>("hits", - {edm::InputTag("particleFlowRecHitECAL", ""), - edm::InputTag("particleFlowRecHitHBHE", ""), - edm::InputTag("particleFlowRecHitHO", "")}); + desc.add>( + "hits", {edm::InputTag("particleFlowRecHitECAL", ""), edm::InputTag("particleFlowRecHitHBHE", "")}); } cfg.addWithDefaultLabel(desc); } diff --git a/SimCalorimetry/HGCalAssociatorProducers/python/LCToCPAssociation_cfi.py b/SimCalorimetry/HGCalAssociatorProducers/python/LCToCPAssociation_cfi.py index e71648b762af6..9affdcbba0a91 100644 --- a/SimCalorimetry/HGCalAssociatorProducers/python/LCToCPAssociation_cfi.py +++ b/SimCalorimetry/HGCalAssociatorProducers/python/LCToCPAssociation_cfi.py @@ -6,6 +6,12 @@ label_lc = cms.InputTag("hgcalMergeLayerClusters") ) +barrelLayerClusterCaloParticleAssociation = cms.EDProducer("LCToCPAssociatorEDProducer", + associator = cms.InputTag('barrelLCToCPAssociatorByEnergyScoreProducer'), + label_cp = cms.InputTag("mix","MergedCaloTruth"), + label_lc = cms.InputTag("hgcalMergeLayerClusters") +) + from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2 premix_stage2.toModify(layerClusterCaloParticleAssociation, label_cp = "mixData:MergedCaloTruth" diff --git a/SimCalorimetry/HGCalAssociatorProducers/python/LCToSCAssociation_cfi.py b/SimCalorimetry/HGCalAssociatorProducers/python/LCToSCAssociation_cfi.py index a01a4a1497a07..b571548ded4fe 100644 --- a/SimCalorimetry/HGCalAssociatorProducers/python/LCToSCAssociation_cfi.py +++ b/SimCalorimetry/HGCalAssociatorProducers/python/LCToSCAssociation_cfi.py @@ -6,6 +6,12 @@ label_lcl = cms.InputTag("hgcalMergeLayerClusters") ) +barrelLayerClusterSimClusterAssociation = cms.EDProducer("LCToSCAssociatorEDProducer", + associator = cms.InputTag('barrelLCToSCAssociatorByEnergyScoreProducer'), + label_scl = cms.InputTag("mix","MergedCaloTruth"), + label_lcl = cms.InputTag("hgcalMergeLayerClusters") +) + from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2 premix_stage2.toModify(layerClusterSimClusterAssociation, label_scl = "mixData:MergedCaloTruth" diff --git a/Validation/Configuration/python/autoValidation.py b/Validation/Configuration/python/autoValidation.py index e5ef5c873e0b6..4922171c10ced 100644 --- a/Validation/Configuration/python/autoValidation.py +++ b/Validation/Configuration/python/autoValidation.py @@ -19,12 +19,13 @@ 'standardValidationHiMix' : ['prevalidation','validationHiMix','validationHarvesting'], 'standardValidationNoHLTHiMix' : ['prevalidationNoHLT','validationNoHLTHiMix','validationHarvestingNoHLT'], 'HGCalValidation' : ['globalPrevalidationHGCal', 'globalValidationHGCal', 'hgcalValidatorPostProcessor'], - 'MTDValidation' : ['', 'globalValidationMTD', 'mtdValidationPostProcessor'], + 'BarrelValidation' : ['globalPrevalidationBarrel', 'globalValidationBarrel', 'barrelValidatorPostProcessor'], + 'MTDValidation' : ['', 'globalValidationMTD', 'mtdValidationPostProcessor'], 'ecalValidation_phase2' : ['', 'validationECALPhase2', ''], 'TrackerPhase2Validation' : ['', 'trackerphase2ValidationSource', 'trackerphase2ValidationHarvesting'], } -_phase2_allowed = ['baseValidation','trackingValidation','muonOnlyValidation','JetMETOnlyValidation', 'electronOnlyValidation', 'photonOnlyValidation','bTagOnlyValidation', 'tauOnlyValidation', 'hcalValidation', 'HGCalValidation', 'MTDValidation', 'ecalValidation_phase2', 'TrackerPhase2Validation', 'hltValidation'] +_phase2_allowed = ['baseValidation','trackingValidation','muonOnlyValidation','JetMETOnlyValidation', 'electronOnlyValidation', 'photonOnlyValidation','bTagOnlyValidation', 'tauOnlyValidation', 'hcalValidation', 'HGCalValidation', 'BarrelValidation', 'MTDValidation', 'ecalValidation_phase2', 'TrackerPhase2Validation', 'hltValidation'] autoValidation['phase2Validation'] = ['','',''] for i in range(0,3): autoValidation['phase2Validation'][i] = '+'.join([_f for _f in [autoValidation[m][i] for m in _phase2_allowed] if _f]) diff --git a/Validation/Configuration/python/barrelSimValid_cff.py b/Validation/Configuration/python/barrelSimValid_cff.py new file mode 100644 index 0000000000000..585644a618af6 --- /dev/null +++ b/Validation/Configuration/python/barrelSimValid_cff.py @@ -0,0 +1,17 @@ +from SimCalorimetry.HGCalAssociatorProducers.LCToCPAssociation_cfi import barrelLayerClusterCaloParticleAssociation +from SimCalorimetry.HGCalAssociatorProducers.LCToSCAssociation_cfi import barrelLayerClusterSimClusterAssociation +from SimCalorimetry.HGCalAssociatorProducers.barrelLCToSCAssociatorByEnergyScoreProducer_cfi import * +from SimCalorimetry.HGCalAssociatorProducers.barrelLCToCPAssociatorByEnergyScoreProducer_cfi import * + +from Validation.HGCalValidation.BarrelValidator_cff import barrelValidator + +barrelValidatorSequence = cms.Sequence(barrelValidator) + +barrelAssociators = cms.Task( + barrelLCToCPAssociatorByEnergyScoreProducer, + barrelLCToSCAssociatorByEnergyScoreProducer, + barrelLayerClusterCaloParticleAssociation, + barrelLayerClusterSimClusterAssociation +) + +barrelValidation = cms.Sequence(barrelValidatorSequence) \ No newline at end of file diff --git a/Validation/Configuration/python/globalValidation_cff.py b/Validation/Configuration/python/globalValidation_cff.py index 9be9dc739b991..4e0e5b9d95fb6 100644 --- a/Validation/Configuration/python/globalValidation_cff.py +++ b/Validation/Configuration/python/globalValidation_cff.py @@ -200,8 +200,24 @@ globalValidationHGCal = cms.Sequence(hgcalValidation) +globalPrevalidationBarrel = cms.Sequence() +_globalPrevalidationBarrel = globalPrevalidationBarrel.copy() +_globalPrevalidationBarrel += cms.Sequence(barrelAssociators) + +globalValidationBarrel = cms.Sequence() +_globalValidationBarrel = globalValidationBarrel.copy() +_globalValidationBarrel += barrelValidation + +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +ticl_barrel.toReplaceWith(globalPrevalidationBarrel, _globalPrevalidationBarrel) +ticl_barrel.toReplaceWith(globalValidationBarrel, _globalValidationBarrel) + globalValidationMTD = cms.Sequence() +globalPrevalidationBarrel = cms.Sequence(barrelAssociators) + +globalValidationBarrel = cms.Sequence(barrelValidation) + globalPrevalidationMuons = cms.Sequence( gemSimValid + me0SimValid diff --git a/Validation/Configuration/python/postValidation_cff.py b/Validation/Configuration/python/postValidation_cff.py index 8ee576ce8ebcb..ce0ba28b1da00 100644 --- a/Validation/Configuration/python/postValidation_cff.py +++ b/Validation/Configuration/python/postValidation_cff.py @@ -8,6 +8,7 @@ from Validation.HcalHits.SimHitsPostProcessor_cff import * from Validation.HcalDigis.HcalDigisPostProcessor_cff import * from Validation.HcalRecHits.hcalRecHitsPostProcessor_cff import * +from Validation.HGCalValidation.BarrelPostProcessor_cff import * from Validation.EventGenerator.PostProcessor_cff import * from Validation.RecoEgamma.photonPostProcessor_cff import * from Validation.RecoEgamma.electronPostValidationSequence_cff import * @@ -140,6 +141,9 @@ _phase2_ge0_postValidation += hgcalPostProcessor _phase2_ge0_postValidation += trackerphase2ValidationHarvesting +_phase2_ticl_barrel_postValidation = _phase2_postValidation.copy() +_phase2_ticl_barrel_postValidation += barrelValidatorPostProcessor + from Configuration.Eras.Modifier_run2_GEM_2017_cff import run2_GEM_2017 run2_GEM_2017.toReplaceWith( postValidation, _run3_postValidation ) from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM @@ -149,3 +153,5 @@ from Configuration.Eras.Modifier_phase2_GE0_cff import phase2_GE0 (phase2_GE0 & phase2_hgcal).toReplaceWith( postValidation, _phase2_ge0_postValidation ) phase2_GE0.toReplaceWith( postValidation_muons, postValidation_muons.copyAndExclude([MuonME0DigisPostProcessors, MuonME0SegPostProcessors]) ) +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +ticl_barrel.toReplaceWith(postValidation, _phase2_ticl_barrel_postValidation) diff --git a/Validation/HGCalValidation/interface/BarrelVHistoProducerAlgo.h b/Validation/HGCalValidation/interface/BarrelVHistoProducerAlgo.h new file mode 100644 index 0000000000000..3a860864f7adb --- /dev/null +++ b/Validation/HGCalValidation/interface/BarrelVHistoProducerAlgo.h @@ -0,0 +1,403 @@ +#ifndef Validation_HGCalValidation_BarrelVHistoProducerAlgo_h +#define Validation_HGCalValidation_BarrelVHistoProducerAlgo_h + +/* \author HGCal + */ + +#include +#include +#include +#include + +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Framework/interface/EventSetup.h" + +#include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h" +#include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h" +#include "DataFormats/ForwardDetId/interface/HFNoseDetId.h" +#include "DataFormats/ForwardDetId/interface/HGCSiliconDetId.h" +#include "DataFormats/ForwardDetId/interface/HGCScintillatorDetId.h" +#include "DataFormats/HGCRecHit/interface/HGCRecHit.h" +#include "DataFormats/HGCalReco/interface/Trackster.h" +#include "DataFormats/ParticleFlowReco/interface/PFRecHit.h" + +#include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h" +#include "CommonTools/RecoAlgos/interface/MultiVectorManager.h" + +#include "SimDataFormats/CaloAnalysis/interface/CaloParticle.h" +#include "SimDataFormats/Vertex/interface/SimVertex.h" +#include "RecoLocalCalo/HGCalRecProducers/interface/HGCalClusteringAlgoBase.h" +#include "SimDataFormats/Associations/interface/LayerClusterToCaloParticleAssociatorBaseImpl.h" +#include "SimDataFormats/Associations/interface/LayerClusterToSimClusterAssociatorBaseImpl.h" +#include "DQMServices/Core/interface/DQMStore.h" + +#include "SimDataFormats/Associations/interface/TICLAssociationMap.h" + +struct BarrelVHistoProducerAlgoHistograms { + dqm::reco::MonitorElement* lastLayerEB; + dqm::reco::MonitorElement* lastLayerHB; + //1D + std::vector h_cluster_eta; + std::vector h_energyclustered; + + std::unordered_map h_clusternum_perlayer; + std::unordered_map h_energyclustered_perlayer; + std::unordered_map h_score_layercl2caloparticle_perlayer; + std::unordered_map h_score_caloparticle2layercl_perlayer; + std::unordered_map h_energy_vs_score_caloparticle2layercl_perlayer; + std::unordered_map h_energy_vs_score_layercl2caloparticle_perlayer; + std::unordered_map h_sharedenergy_caloparticle2layercl_perlayer; + std::unordered_map h_sharedenergy_caloparticle2layercl_vs_eta_perlayer; + std::unordered_map h_sharedenergy_caloparticle2layercl_vs_phi_perlayer; + std::unordered_map h_sharedenergy_layercl2caloparticle_perlayer; + std::unordered_map h_sharedenergy_layercl2caloparticle_vs_eta_perlayer; + std::unordered_map h_sharedenergy_layercl2caloparticle_vs_phi_perlayer; + std::unordered_map h_num_caloparticle_eta_perlayer; + std::unordered_map h_numDup_caloparticle_eta_perlayer; + std::unordered_map h_denom_caloparticle_eta_perlayer; + std::unordered_map h_num_caloparticle_phi_perlayer; + std::unordered_map h_numDup_caloparticle_phi_perlayer; + std::unordered_map h_denom_caloparticle_phi_perlayer; + std::unordered_map h_num_layercl_eta_perlayer; + std::unordered_map h_numMerge_layercl_eta_perlayer; + std::unordered_map h_denom_layercl_eta_perlayer; + std::unordered_map h_num_layercl_phi_perlayer; + std::unordered_map h_numMerge_layercl_phi_perlayer; + std::unordered_map h_denom_layercl_phi_perlayer; + std::unordered_map h_cellAssociation_perlayer; + + std::unordered_map h_caloparticle_eta; + std::unordered_map h_caloparticle_eta_Zorigin; + std::unordered_map h_caloparticle_energy; + std::unordered_map h_caloparticle_selfenergy; + std::unordered_map h_caloparticle_energyDifference; + std::unordered_map h_caloparticle_pt; + std::unordered_map h_caloparticle_phi; + std::unordered_map h_caloparticle_nSimClusters; + std::unordered_map h_caloparticle_nHitsInSimClusters; + std::unordered_map h_caloparticle_firstlayer; + std::unordered_map h_caloparticle_lastlayer; + std::unordered_map h_caloparticle_layersnum; + std::unordered_map h_caloparticle_nHitsInSimClusters_matchedtoRecHit; + std::unordered_map h_caloparticle_nHits_matched_energy; + std::unordered_map h_caloparticle_nHits_matched_energy_layer; + std::unordered_map h_caloparticle_nHits_matched_energy_layer_1SimCl; + std::unordered_map h_caloparticle_sum_energy_layer; + std::unordered_map h_caloparticle_firstlayer_matchedtoRecHit; + std::unordered_map h_caloparticle_lastlayer_matchedtoRecHit; + std::unordered_map h_caloparticle_layersnum_matchedtoRecHit; + std::unordered_map h_caloparticle_fractions, h_caloparticle_fractions_weight; + + //For SimClusters + std::unordered_map h_simclusternum_perlayer; + + std::vector> h_denom_layercl_in_simcl_eta_perlayer; + std::vector> h_denom_layercl_in_simcl_phi_perlayer; + std::vector> h_score_layercl2simcluster_perlayer; + std::vector> h_sharedenergy_layercl2simcluster_perlayer; + std::vector> h_energy_vs_score_layercl2simcluster_perlayer; + std::vector> h_num_layercl_in_simcl_eta_perlayer; + std::vector> h_num_layercl_in_simcl_phi_perlayer; + std::vector> h_numMerge_layercl_in_simcl_eta_perlayer; + std::vector> h_numMerge_layercl_in_simcl_phi_perlayer; + std::vector> h_sharedenergy_layercl2simcluster_vs_eta_perlayer; + std::vector> h_sharedenergy_layercl2simcluster_vs_phi_perlayer; + std::vector> h_denom_simcluster_eta_perlayer; + std::vector> h_denom_simcluster_phi_perlayer; + std::vector> h_score_simcluster2layercl_perlayer; + std::vector> h_sharedenergy_simcluster2layercl_perlayer; + std::vector> h_energy_vs_score_simcluster2layercl_perlayer; + std::vector> h_num_simcluster_eta_perlayer; + std::vector> h_num_simcluster_phi_perlayer; + std::vector> h_numDup_simcluster_eta_perlayer; + std::vector> h_numDup_simcluster_phi_perlayer; + std::vector> h_sharedenergy_simcluster2layercl_vs_eta_perlayer; + std::vector> h_sharedenergy_simcluster2layercl_vs_phi_perlayer; + + // For Tracksters + constexpr static int numberOfValidationTypes_ = 4; + + std::vector h_score_trackster2caloparticle[numberOfValidationTypes_]; + std::vector h_score_trackster2bestCaloparticle[numberOfValidationTypes_]; + std::vector h_score_trackster2bestCaloparticle2[numberOfValidationTypes_]; + std::vector h_score_caloparticle2trackster[numberOfValidationTypes_]; + std::vector h_scorePur_caloparticle2trackster[numberOfValidationTypes_]; + std::vector h_scoreDupl_caloparticle2trackster[numberOfValidationTypes_]; + std::vector h_energy_vs_score_trackster2caloparticle[numberOfValidationTypes_]; + std::vector h_energy_vs_score_trackster2bestCaloparticle[numberOfValidationTypes_]; + std::vector h_energy_vs_score_trackster2bestCaloparticle2[numberOfValidationTypes_]; + std::vector h_energy_vs_score_caloparticle2trackster[numberOfValidationTypes_]; + std::vector h_energy_vs_score_caloparticle2bestTrackster[numberOfValidationTypes_]; + std::vector h_energy_vs_score_caloparticle2bestTrackster2[numberOfValidationTypes_]; + std::vector h_num_trackster_eta[numberOfValidationTypes_]; + std::vector h_num_trackster_phi[numberOfValidationTypes_]; + std::vector h_num_trackster_en[numberOfValidationTypes_]; + std::vector h_num_trackster_pt[numberOfValidationTypes_]; + std::vector h_numMerge_trackster_eta[numberOfValidationTypes_]; + std::vector h_numMerge_trackster_phi[numberOfValidationTypes_]; + std::vector h_numMerge_trackster_en[numberOfValidationTypes_]; + std::vector h_numMerge_trackster_pt[numberOfValidationTypes_]; + std::vector h_sharedenergy_trackster2caloparticle[numberOfValidationTypes_]; + std::vector h_sharedenergy_trackster2bestCaloparticle[numberOfValidationTypes_]; + std::vector h_sharedenergy_trackster2bestCaloparticle2[numberOfValidationTypes_]; + std::vector h_sharedenergy_caloparticle2trackster[numberOfValidationTypes_]; + std::vector h_sharedenergy_caloparticle2trackster_assoc[numberOfValidationTypes_]; + std::vector h_sharedenergy_caloparticle2trackster_assoc2[numberOfValidationTypes_]; + std::vector h_sharedenergy_trackster2bestCaloparticle_vs_eta[numberOfValidationTypes_]; + std::vector h_sharedenergy_trackster2bestCaloparticle_vs_phi[numberOfValidationTypes_]; + std::vector h_sharedenergy_caloparticle2trackster_assoc_vs_eta[numberOfValidationTypes_]; + std::vector h_sharedenergy_caloparticle2trackster_assoc_vs_phi[numberOfValidationTypes_]; + std::vector h_denom_trackster_eta[numberOfValidationTypes_]; + std::vector h_denom_trackster_phi[numberOfValidationTypes_]; + std::vector h_denom_trackster_en[numberOfValidationTypes_]; + std::vector h_denom_trackster_pt[numberOfValidationTypes_]; + std::vector h_numEff_caloparticle_eta[numberOfValidationTypes_]; + std::vector h_numEff_caloparticle_phi[numberOfValidationTypes_]; + std::vector h_numEff_caloparticle_en[numberOfValidationTypes_]; + std::vector h_numEff_caloparticle_pt[numberOfValidationTypes_]; + std::vector h_num_caloparticle_eta[numberOfValidationTypes_]; + std::vector h_num_caloparticle_phi[numberOfValidationTypes_]; + std::vector h_num_caloparticle_en[numberOfValidationTypes_]; + std::vector h_num_caloparticle_pt[numberOfValidationTypes_]; + std::vector h_numDup_trackster_eta[numberOfValidationTypes_]; + std::vector h_numDup_trackster_phi[numberOfValidationTypes_]; + std::vector h_numDup_trackster_en[numberOfValidationTypes_]; + std::vector h_numDup_trackster_pt[numberOfValidationTypes_]; + std::vector h_denom_caloparticle_eta[numberOfValidationTypes_]; + std::vector h_denom_caloparticle_phi[numberOfValidationTypes_]; + std::vector h_denom_caloparticle_en[numberOfValidationTypes_]; + std::vector h_denom_caloparticle_pt[numberOfValidationTypes_]; + // Generic histograms + std::vector h_tracksternum; + std::vector h_conttracksternum; + std::vector h_nonconttracksternum; + std::vector h_clusternum_in_trackster; + std::vector> h_clusternum_in_trackster_perlayer; + std::vector h_multiplicityOfLCinTST; + std::vector h_multiplicity_numberOfEventsHistogram; + std::vector h_multiplicity_zminus_numberOfEventsHistogram; + std::vector h_multiplicity_zplus_numberOfEventsHistogram; + std::vector h_multiplicityOfLCinTST_vs_layercluster; + std::vector h_multiplicityOfLCinTST_vs_layerclusterenergy; + std::vector h_clusternum_in_trackster_vs_layer; + std::vector h_trackster_pt; + std::vector h_trackster_eta; + std::vector h_trackster_phi; + std::vector h_trackster_energy; + std::vector h_trackster_x; + std::vector h_trackster_y; + std::vector h_trackster_z; + std::vector h_trackster_firstlayer; + std::vector h_trackster_lastlayer; + std::vector h_trackster_layersnum; +}; + +using Density = hgcal_clustering::Density; + +class BarrelVHistoProducerAlgo { +public: + typedef dqm::legacy::DQMStore DQMStore; + typedef dqm::legacy::MonitorElement MonitorElement; + using TracksterToTracksterMap = + ticl::AssociationMap, std::vector>; + using SimClusterToCaloParticleMap = + ticl::AssociationMap, std::vector>; + enum validationType { byHits_CP = 0, byLCs, byLCs_CP, byHits }; + + BarrelVHistoProducerAlgo(const edm::ParameterSet& pset); + ~BarrelVHistoProducerAlgo(); + + using Histograms = BarrelVHistoProducerAlgoHistograms; + + void bookInfo(DQMStore::IBooker& ibook, Histograms& histograms); + void bookCaloParticleHistos(DQMStore::IBooker& ibook, Histograms& histograms, int pdgid, unsigned int layers); + + void bookSimClusterHistos(DQMStore::IBooker& ibook, Histograms& histograms, unsigned int layers); + + void bookSimClusterAssociationHistos(DQMStore::IBooker& ibook, Histograms& histograms, unsigned int layers); + + void bookClusterHistos_ClusterLevel(DQMStore::IBooker& ibook, Histograms& histograms, unsigned int layers); + + void bookClusterHistos_LCtoCP_association(DQMStore::IBooker& ibook, Histograms& histograms, unsigned int layers); + + void bookClusterHistos_CellLevel(DQMStore::IBooker& ibook, Histograms& histograms, unsigned int layers); + + void bookTracksterHistos(DQMStore::IBooker& ibook, Histograms& histograms, unsigned int layers); + + void bookTracksterSTSHistos(DQMStore::IBooker& ibook, Histograms& histograms, const validationType valType); + + void layerClusters_to_CaloParticles(const Histograms& histograms, + edm::Handle clusterHandle, + const reco::CaloClusterCollection& clusters, + edm::Handle> caloParticleHandle, + std::vector const& cP, + std::vector const& cPIndices, + std::vector const& cPSelectedIndices, + std::unordered_map const&, + unsigned int layers, + const ticl::RecoToSimCollection& recSimColl, + const ticl::SimToRecoCollection& simRecColl, + MultiVectorManager const& barrelHits) const; + void layerClusters_to_SimClusters(const Histograms& histograms, + const int count, + edm::Handle clusterHandle, + const reco::CaloClusterCollection& clusters, + edm::Handle> simClusterHandle, + std::vector const& simClusters, + std::vector const& sCIndices, + const std::vector& mask, + std::unordered_map const&, + unsigned int layers, + const ticl::RecoToSimCollectionWithSimClusters& recSimColl, + const ticl::SimToRecoCollectionWithSimClusters& simRecColl, + MultiVectorManager const& barrelHits) const; + + void tracksters_to_SimTracksters_fp(const Histograms& histograms, + const int count, + const TracksterToTracksterMap& trackstersToSimTrackstersMap, + const TracksterToTracksterMap& simTrackstersToTrackstersMap, + const validationType valType, + const SimClusterToCaloParticleMap& scToCpMap, + const std::vector& cPIndices, + const std::vector& cPSelectedIndices, + const edm::ProductID& cPHandle_id) const; + + void fill_info_histos(const Histograms& histograms, unsigned int layers) const; + void fill_caloparticle_histos(const Histograms& histograms, + int pdgid, + const CaloParticle& caloparticle, + std::vector const& simVertices, + unsigned int layers, + std::unordered_map const&, + MultiVectorManager const& barrelHits) const; + void fill_generic_cluster_histos(const Histograms& histograms, + const int count, + edm::Handle clusterHandle, + const reco::CaloClusterCollection& clusters, + edm::Handle> caloParticleHandle, + std::vector const& cP, + std::vector const& cPIndices, + std::vector const& cPSelectedIndices, + std::unordered_map const&, + unsigned int layers, + const ticl::RecoToSimCollection& recSimColl, + const ticl::SimToRecoCollection& simRecColl, + MultiVectorManager const& barrelHits) const; + void fill_simCluster_histos(const Histograms& histograms, + std::vector const& simClusters, + unsigned int layers) const; + void fill_simClusterAssociation_histos(const Histograms& histograms, + const int count, + edm::Handle clusterHandle, + const reco::CaloClusterCollection& clusters, + edm::Handle> simClusterHandle, + std::vector const& simClusters, + std::vector const& sCIndices, + const std::vector& mask, + std::unordered_map const& barrelHitMap, + unsigned int layers, + const ticl::RecoToSimCollectionWithSimClusters& recSimColl, + const ticl::SimToRecoCollectionWithSimClusters& simRecColl, + MultiVectorManager const& barrelHits) const; + void fill_cluster_histos(const Histograms& histograms, const int count, const reco::CaloCluster& cluster) const; + + double distance2(const double x1, const double y1, const double x2, const double y2) const; + double distance(const double x1, const double y1, const double x2, const double y2) const; + + void setRecHitTools(std::shared_ptr recHitTools); + + DetId findmaxhit(const reco::CaloCluster& cluster, + std::unordered_map const&, + MultiVectorManager const& hits) const; + + struct detIdInfoInCluster { + bool operator==(const detIdInfoInCluster& o) const { return clusterId == o.clusterId; }; + long unsigned int clusterId; + float fraction; + }; + + struct detIdInfoInTrackster { + bool operator==(const detIdInfoInTrackster& o) const { return tracksterId == o.tracksterId; }; + unsigned int tracksterId; + long unsigned int clusterId; + float fraction; + }; + + struct caloParticleOnLayer { + unsigned int caloParticleId; + float energy = 0; + std::vector> hits_and_fractions; + std::unordered_map> layerClusterIdToEnergyAndScore; + }; + +private: + double getEta(double eta) const; + + std::shared_ptr recHitTools_; + constexpr static int numberOfValidationTypes_ = 4; + std::array ref_ = { + {"SimTrackster_fromCP_byHits", "SimTrackster_byLCs", "SimTrackster_fromCP_byLCs", "SimTrackster_byHits"}}; + std::array refText_ = {{"SimTrackster from CP Associated by Hits", + "SimTrackster Associated by LCs", + "SimTrackster from CP Associated by LCs", + "SimTrackster Associated by Hits"}}; + // Must be in sync with labels in PostProcessorHGCAL_cfi.py + std::array valSuffix_ = {{"_byHits_CP", "_byLCs", "_byLCs_CP", "_byHits"}}; + + int barrelLayersOffset_ = 5; + + //private data members + double minEta_, maxEta_; + int nintEta_; + bool useFabsEta_; + double minEne_, maxEne_; + int nintEne_; + double minPt_, maxPt_; + int nintPt_; + double minPhi_, maxPhi_; + int nintPhi_; + double minMixedHitsSimCluster_, maxMixedHitsSimCluster_; + int nintMixedHitsSimCluster_; + double minMixedHitsCluster_, maxMixedHitsCluster_; + int nintMixedHitsCluster_; + double minEneCl_, maxEneCl_; + int nintEneCl_; + double minLongDepBary_, maxLongDepBary_; + int nintLongDepBary_; + double minZpos_, maxZpos_; + int nintZpos_; + double minTotNsimClsperlay_, maxTotNsimClsperlay_; + int nintTotNsimClsperlay_; + double minTotNClsperlay_, maxTotNClsperlay_; + int nintTotNClsperlay_; + double minEneClperlay_, maxEneClperlay_; + int nintEneClperlay_; + double minScore_, maxScore_; + int nintScore_; + double minSharedEneFrac_, maxSharedEneFrac_; + int nintSharedEneFrac_; + double minTSTSharedEneFracEfficiency_; + double minTSTSharedEneFrac_, maxTSTSharedEneFrac_; + int nintTSTSharedEneFrac_; + double minTotNTSTs_, maxTotNTSTs_; + int nintTotNTSTs_; + double minTotNClsinTSTs_, maxTotNClsinTSTs_; + int nintTotNClsinTSTs_; + double minTotNClsinTSTsperlayer_, maxTotNClsinTSTsperlayer_; + int nintTotNClsinTSTsperlayer_; + double minMplofLCs_, maxMplofLCs_; + int nintMplofLCs_; + double minSizeCLsinTSTs_, maxSizeCLsinTSTs_; + int nintSizeCLsinTSTs_; + double minClEnepermultiplicity_, maxClEnepermultiplicity_; + int nintClEnepermultiplicity_; + double minX_, maxX_; + int nintX_; + double minY_, maxY_; + int nintY_; + double minZ_, maxZ_; + int nintZ_; +}; + +#endif diff --git a/Validation/HGCalValidation/interface/BarrelValidator.h b/Validation/HGCalValidation/interface/BarrelValidator.h new file mode 100644 index 0000000000000..764d5d2813826 --- /dev/null +++ b/Validation/HGCalValidation/interface/BarrelValidator.h @@ -0,0 +1,112 @@ +#ifndef BarrelValidator_h +#define BarrelValidator_h + +/** \class BarrelValidator + * Class that produces histograms to validate HGCal Reconstruction performances + * + * \author HGCal + */ +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/Utilities/interface/EDGetToken.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/ParameterSet/interface/FileInPath.h" + +#include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h" +#include "DataFormats/ParticleFlowReco/interface/PFCluster.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "DataFormats/HGCalReco/interface/Trackster.h" +#include "SimDataFormats/CaloAnalysis/interface/CaloParticle.h" +#include "SimDataFormats/CaloAnalysis/interface/SimCluster.h" +#include "SimDataFormats/Vertex/interface/SimVertex.h" + +#include "DQMServices/Core/interface/DQMGlobalEDAnalyzer.h" + +#include "Validation/HGCalValidation/interface/TICLCandidateValidator.h" +#include "Validation/HGCalValidation/interface/BarrelVHistoProducerAlgo.h" +#include "Validation/HGCalValidation/interface/CaloParticleSelector.h" +#include "RecoLocalCalo/HGCalRecProducers/interface/HGCalClusteringAlgoBase.h" + +#include "SimDataFormats/Associations/interface/LayerClusterToCaloParticleAssociator.h" +#include "SimDataFormats/Associations/interface/LayerClusterToSimClusterAssociator.h" +#include "SimDataFormats/Associations/interface/TICLAssociationMap.h" + +#include "CommonTools/RecoAlgos/interface/MultiVectorManager.h" + +class PileupSummaryInfo; + +struct BarrelValidatorHistograms { + BarrelVHistoProducerAlgoHistograms histoProducerAlgo; + std::vector h_layerclusters_coll; +}; + +class BarrelValidator : public DQMGlobalEDAnalyzer { +public: + using Histograms = BarrelValidatorHistograms; + using TracksterToTracksterMap = + ticl::AssociationMap, std::vector>; + using SimClusterToCaloParticleMap = + ticl::AssociationMap, std::vector>; + + /// Constructor + BarrelValidator(const edm::ParameterSet& pset); + + /// Destructor + ~BarrelValidator() override; + + /// Method called once per event + void dqmAnalyze(const edm::Event&, const edm::EventSetup&, const Histograms&) const override; + /// Method called to book the DQM histograms + void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&, Histograms&) const override; + + void cpParametersAndSelection(const Histograms& histograms, + std::vector const& cPeff, + std::vector const& simVertices, + std::vector& selected_cPeff, + unsigned int layers, + std::unordered_map const&, + MultiVectorManager const& barrelHits) const; + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + +protected: + edm::ESGetToken caloGeomToken_; + edm::InputTag label_lcl; + std::vector associator_; + std::vector associatorSim_; + const bool SaveGeneralInfo_; + const bool doCaloParticlePlots_; + const bool doCaloParticleSelection_; + const bool doSimClustersPlots_; + edm::InputTag label_SimClustersPlots_, label_SimClustersLevel_; + const bool doLayerClustersPlots_; + edm::InputTag label_layerClustersPlots_, label_LCToCPLinking_; + std::vector label_clustersmask; + + std::vector> labelToken; + edm::EDGetTokenT> simClusters_; + edm::EDGetTokenT layerclusters_; + edm::EDGetTokenT> label_cp_effic; + edm::EDGetTokenT> label_cp_fake; + edm::EDGetTokenT> simVertices_; + std::vector>> clustersMaskTokens_; + edm::EDGetTokenT> barrelHitMap_; + std::vector> associatorMapRtS; + std::vector> associatorMapStR; + std::vector> associatorMapSimtR; + std::vector> associatorMapRtSim; + std::unique_ptr histoProducerAlgo_; + std::vector barrel_hits_label_; + std::vector>> barrel_hits_tokens_; + edm::EDGetTokenT scToCpMapToken_; + +private: + CaloParticleSelector cpSelector; + std::shared_ptr tools_; + std::vector particles_to_monitor_; + unsigned totallayers_to_monitor_; + std::string dirName_; +}; + +#endif diff --git a/Validation/HGCalValidation/plugins/BarrelValidator.cc b/Validation/HGCalValidation/plugins/BarrelValidator.cc new file mode 100644 index 0000000000000..3e4e3f2cb8d15 --- /dev/null +++ b/Validation/HGCalValidation/plugins/BarrelValidator.cc @@ -0,0 +1,563 @@ +#include + +#include "Validation/HGCalValidation/interface/BarrelValidator.h" + +#include "SimCalorimetry/HGCalAssociatorProducers/interface/AssociatorTools.h" + +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" + +using namespace std; +using namespace edm; +using namespace ticl; + +bool assignTracksterMaps(const edm::Handle>& tracksterHandle, + const edm::Handle>& simTracksterHandle, + const edm::Handle>& simTracksterFromCPHandle, + const std::vector>& tracksterToTracksterMapsHandles, + edm::Handle& trackstersToSimTrackstersMap, + edm::Handle& simTrackstersToTrackstersMap, + edm::Handle& trackstersToSimTrackstersFromCPsMap, + edm::Handle& simTrackstersFromCPsToTrackstersMap) { + const auto recoTrackstersProductId = tracksterHandle.id(); + const auto simTrackstersProductId = simTracksterHandle.id(); + const auto simTrackstersFromCPsProductId = simTracksterFromCPHandle.id(); + if (recoTrackstersProductId == simTrackstersProductId or recoTrackstersProductId == simTrackstersFromCPsProductId) { + edm::LogInfo("MissingProduct") << "no SimTrackster to Simtrackster map available."; + return false; + } + for (const auto& handle : tracksterToTracksterMapsHandles) { + const auto& firstID = handle->getCollectionIDs().first.id(); + const auto& secondID = handle->getCollectionIDs().second.id(); + + if (firstID == recoTrackstersProductId && secondID == simTrackstersProductId) { + trackstersToSimTrackstersMap = handle; + } else if (firstID == simTrackstersProductId && secondID == recoTrackstersProductId) { + simTrackstersToTrackstersMap = handle; + } else if (firstID == recoTrackstersProductId && secondID == simTrackstersFromCPsProductId) { + trackstersToSimTrackstersFromCPsMap = handle; + } else if (firstID == simTrackstersFromCPsProductId && secondID == recoTrackstersProductId) { + simTrackstersFromCPsToTrackstersMap = handle; + } + } + if (not trackstersToSimTrackstersMap.isValid()) { + edm::LogError("MissingProduct") << "trackstersToSimTrackstersMap is not valid"; + return false; + } + if (not simTrackstersToTrackstersMap.isValid()) { + edm::LogError("MissingProduct") << "simTrackstersToTrackstersMap is not valid"; + return false; + } + if (not trackstersToSimTrackstersFromCPsMap.isValid()) { + edm::LogError("MissingProduct") << "trackstersToSimTrackstersFromCPsMap is not valid"; + return false; + } + if (not simTrackstersFromCPsToTrackstersMap.isValid()) { + edm::LogError("MissingProduct") << "simTrackstersFromCPsToTrackstersMap is not valid"; + return false; + } + return true; +} + +BarrelValidator::BarrelValidator(const edm::ParameterSet& pset) + : caloGeomToken_(esConsumes()), + label_lcl(pset.getParameter("label_lcl")), + associator_(pset.getUntrackedParameter>("associator")), + associatorSim_(pset.getUntrackedParameter>("associatorSim")), + SaveGeneralInfo_(pset.getUntrackedParameter("SaveGeneralInfo")), + doCaloParticlePlots_(pset.getUntrackedParameter("doCaloParticlePlots")), + doCaloParticleSelection_(pset.getUntrackedParameter("doCaloParticleSelection")), + doSimClustersPlots_(pset.getUntrackedParameter("doSimClustersPlots")), + label_SimClustersPlots_(pset.getParameter("label_SimClusters")), + label_SimClustersLevel_(pset.getParameter("label_SimClustersLevel")), + doLayerClustersPlots_(pset.getUntrackedParameter("doLayerClustersPlots")), + label_layerClustersPlots_(pset.getParameter("label_layerClusterPlots")), + label_LCToCPLinking_(pset.getParameter("label_LCToCPLinking")), + barrel_hits_label_(pset.getParameter>("barrel_hits")), + scToCpMapToken_( + consumes(pset.getParameter("simClustersToCaloParticlesMap"))) { + //In this way we can easily generalize to associations between other objects also. + const edm::InputTag& label_cp_effic_tag = pset.getParameter("label_cp_effic"); + const edm::InputTag& label_cp_fake_tag = pset.getParameter("label_cp_fake"); + + for (auto& label : barrel_hits_label_) { + barrel_hits_tokens_.push_back(consumes>(label)); + } + + label_cp_effic = consumes>(label_cp_effic_tag); + label_cp_fake = consumes>(label_cp_fake_tag); + + simVertices_ = consumes>(pset.getParameter("simVertices")); + + for (auto& itag : label_clustersmask) { + clustersMaskTokens_.push_back(consumes>(itag)); + } + + for (auto& itag : associatorSim_) { + associatorMapRtSim.push_back(consumes(itag)); + } + for (auto& itag : associatorSim_) { + associatorMapSimtR.push_back(consumes(itag)); + } + + barrelHitMap_ = + consumes>(edm::InputTag("recHitMapProducer", "barrelRecHitMap")); + + simClusters_ = consumes>(pset.getParameter("label_scl")); + + layerclusters_ = consumes(label_lcl); + + for (auto& itag : associator_) { + associatorMapRtS.push_back(consumes(itag)); + } + for (auto& itag : associator_) { + associatorMapStR.push_back(consumes(itag)); + } + + cpSelector = CaloParticleSelector(pset.getParameter("ptMinCP"), + pset.getParameter("ptMaxCP"), + pset.getParameter("minRapidityCP"), + pset.getParameter("maxRapidityCP"), + pset.getParameter("lipCP"), + pset.getParameter("tipCP"), + pset.getParameter("minHitCP"), + pset.getParameter("maxSimClustersCP"), + pset.getParameter("signalOnlyCP"), + pset.getParameter("intimeOnlyCP"), + pset.getParameter("chargedOnlyCP"), + pset.getParameter("stableOnlyCP"), + pset.getParameter("notConvertedOnlyCP"), + pset.getParameter>("pdgIdCP")); + + tools_ = std::make_shared(); + + particles_to_monitor_ = pset.getParameter>("pdgIdCP"); + totallayers_to_monitor_ = pset.getParameter("totallayers_to_monitor"); + + ParameterSet psetForHistoProducerAlgo = pset.getParameter("histoProducerAlgoBlock"); + histoProducerAlgo_ = std::make_unique(psetForHistoProducerAlgo); + + dirName_ = pset.getParameter("dirName"); +} + +BarrelValidator::~BarrelValidator() {} + +void BarrelValidator::bookHistograms(DQMStore::IBooker& ibook, + edm::Run const&, + edm::EventSetup const& setup, + Histograms& histograms) const { + if (SaveGeneralInfo_) { + ibook.cd(); + ibook.setCurrentFolder(dirName_ + "GeneralInfo"); + histoProducerAlgo_->bookInfo(ibook, histograms.histoProducerAlgo); + } + + if (doCaloParticlePlots_) { + ibook.cd(); + + for (auto const particle : particles_to_monitor_) { + ibook.setCurrentFolder(dirName_ + "SelectedCaloParticles/" + std::to_string(particle)); + histoProducerAlgo_->bookCaloParticleHistos( + ibook, histograms.histoProducerAlgo, particle, totallayers_to_monitor_); + } + ibook.cd(); + ibook.setCurrentFolder(dirName_); + } + + //Booking histograms concerning with simClusters + if (doSimClustersPlots_) { + ibook.cd(); + ibook.setCurrentFolder(dirName_ + label_SimClustersPlots_.label() + "/" + label_SimClustersLevel_.label()); + histoProducerAlgo_->bookSimClusterHistos(ibook, histograms.histoProducerAlgo, totallayers_to_monitor_); + + for (unsigned int ws = 0; ws < label_clustersmask.size(); ws++) { + ibook.cd(); + InputTag algo = label_clustersmask[ws]; + string dirName = dirName_ + label_SimClustersPlots_.label() + "/"; + if (!algo.process().empty()) + dirName += algo.process() + "_"; + LogDebug("BarrelValidator") << dirName << "\n"; + if (!algo.label().empty()) + dirName += algo.label() + "_"; + LogDebug("BarrelValidator") << dirName << "\n"; + if (!algo.instance().empty()) + dirName += algo.instance() + "_"; + LogDebug("BarrelValidator") << dirName << "\n"; + + if (!dirName.empty()) { + dirName.resize(dirName.size() - 1); + } + + LogDebug("BarrelValidator") << dirName << "\n"; + + ibook.setCurrentFolder(dirName); + + histoProducerAlgo_->bookSimClusterAssociationHistos(ibook, histograms.histoProducerAlgo, totallayers_to_monitor_); + } //end of loop over masks + } //if for simCluster plots + + //Booking histograms concerning with hgcal layer clusters + if (doLayerClustersPlots_) { + ibook.cd(); + ibook.setCurrentFolder(dirName_ + label_layerClustersPlots_.label() + "/ClusterLevel"); + histoProducerAlgo_->bookClusterHistos_ClusterLevel(ibook, histograms.histoProducerAlgo, totallayers_to_monitor_); + ibook.cd(); + ibook.setCurrentFolder(dirName_ + label_layerClustersPlots_.label() + "/" + label_LCToCPLinking_.label()); + histoProducerAlgo_->bookClusterHistos_LCtoCP_association( + ibook, histograms.histoProducerAlgo, totallayers_to_monitor_); + + ibook.cd(); + ibook.setCurrentFolder(dirName_ + label_layerClustersPlots_.label() + "/CellLevel"); + histoProducerAlgo_->bookClusterHistos_CellLevel(ibook, histograms.histoProducerAlgo, totallayers_to_monitor_); + } +} + +void BarrelValidator::cpParametersAndSelection(const Histograms& histograms, + std::vector const& cPeff, + std::vector const& simVertices, + std::vector& selected_cPeff, + unsigned int layers, + std::unordered_map const& barrelHitMap, + MultiVectorManager const& barrelHits) const { + selected_cPeff.reserve(cPeff.size()); + + size_t j = 0; + for (auto const& caloParticle : cPeff) { + int id = caloParticle.pdgId(); + + if (!doCaloParticleSelection_ || (doCaloParticleSelection_ && cpSelector(caloParticle, simVertices))) { + selected_cPeff.push_back(j); + if (doCaloParticlePlots_) { + histoProducerAlgo_->fill_caloparticle_histos( + histograms.histoProducerAlgo, id, caloParticle, simVertices, layers, barrelHitMap, barrelHits); + } + } + ++j; + } //end of loop over caloparticles +} + +void BarrelValidator::dqmAnalyze(const edm::Event& event, + const edm::EventSetup& setup, + const Histograms& histograms) const { + using namespace reco; + + LogDebug("BarrelValidator") << "\n====================================================" + << "\n" + << "Analyzing new event" + << "\n" + << "====================================================\n" + << "\n"; + + edm::Handle> simVerticesHandle; + event.getByToken(simVertices_, simVerticesHandle); + std::vector const& simVertices = *simVerticesHandle; + + edm::Handle> caloParticleHandle; + event.getByToken(label_cp_effic, caloParticleHandle); + std::vector const& caloParticles = *caloParticleHandle; + + edm::ESHandle geom = setup.getHandle(caloGeomToken_); + tools_->setGeometry(*geom); + histoProducerAlgo_->setRecHitTools(tools_); + + std::vector recSimColl; + std::vector simRecColl; + for (unsigned int i = 0; i < associatorMapRtS.size(); ++i) { + edm::Handle simToRecoCollectionH; + event.getByToken(associatorMapStR[i], simToRecoCollectionH); + simRecColl.push_back(*simToRecoCollectionH); + edm::Handle recoToSimCollectionH; + event.getByToken(associatorMapRtS[i], recoToSimCollectionH); + recSimColl.push_back(*recoToSimCollectionH); + } + + edm::Handle> barrelHitMapHandle; + event.getByToken(barrelHitMap_, barrelHitMapHandle); + const std::unordered_map& barrelHitMap = *barrelHitMapHandle; + + MultiVectorManager barrelRechitManager; + for (const auto& token : barrel_hits_tokens_) { + Handle> hitsHandle; + event.getByToken(token, hitsHandle); + barrelRechitManager.addVector(*hitsHandle); + } + + //Some general info on layers etc. + if (SaveGeneralInfo_) { + histoProducerAlgo_->fill_info_histos(histograms.histoProducerAlgo, totallayers_to_monitor_); + } + + std::vector cPIndices; + //Consider CaloParticles coming from the hard scatterer + //excluding the PU contribution and save the indices. + removeCPFromPU(caloParticles, cPIndices); + + // ############################################## + // Fill caloparticles histograms + // ############################################## + // HGCRecHit are given to select the SimHits which are also reconstructed + LogTrace("BarrelValidator") << "\n# of CaloParticles: " << caloParticles.size() << "\n" << std::endl; + std::vector selected_cPeff; + cpParametersAndSelection(histograms, + caloParticles, + simVertices, + selected_cPeff, + totallayers_to_monitor_, + barrelHitMap, + barrelRechitManager); + + //get collections from the event + //simClusters + edm::Handle> simClustersHandle; + event.getByToken(simClusters_, simClustersHandle); + std::vector const& simClusters = *simClustersHandle; + + //Layer clusters + edm::Handle clusterHandle; + event.getByToken(layerclusters_, clusterHandle); + const reco::CaloClusterCollection& clusters = *clusterHandle; + + auto nSimClusters = simClusters.size(); + std::vector sCIndices; + //There shouldn't be any SimTracks from different crossings, but maybe they will be added later. + //At the moment there should be one SimTrack in each SimCluster. + for (unsigned int scId = 0; scId < nSimClusters; ++scId) { + if (simClusters[scId].g4Tracks()[0].eventId().event() != 0 or + simClusters[scId].g4Tracks()[0].eventId().bunchCrossing() != 0) { + LogDebug("BarrelValidator") << "Excluding SimClusters from event: " + << simClusters[scId].g4Tracks()[0].eventId().event() + << " with BX: " << simClusters[scId].g4Tracks()[0].eventId().bunchCrossing() + << std::endl; + continue; + } + sCIndices.emplace_back(scId); + } + + // ############################################## + // Fill simCluster histograms + // ############################################## + if (doSimClustersPlots_) { + histoProducerAlgo_->fill_simCluster_histos(histograms.histoProducerAlgo, simClusters, totallayers_to_monitor_); + + for (unsigned int ws = 0; ws < label_clustersmask.size(); ws++) { + const auto& inputClusterMask = event.get(clustersMaskTokens_[ws]); + + std::vector recSimColl; + std::vector simRecColl; + for (unsigned int i = 0; i < associatorMapRtSim.size(); ++i) { + edm::Handle simtorecoCollectionH; + event.getByToken(associatorMapSimtR[i], simtorecoCollectionH); + simRecColl.push_back(*simtorecoCollectionH); + edm::Handle recotosimCollectionH; + event.getByToken(associatorMapRtSim[i], recotosimCollectionH); + recSimColl.push_back(*recotosimCollectionH); + } + + histoProducerAlgo_->fill_simClusterAssociation_histos(histograms.histoProducerAlgo, + ws, + clusterHandle, + clusters, + simClustersHandle, + simClusters, + sCIndices, + inputClusterMask, + barrelHitMap, + totallayers_to_monitor_, + recSimColl[0], + simRecColl[0], + barrelRechitManager); + + //General Info on simClusters + LogTrace("BarrelValidator") << "\n# of SimClusters: " << nSimClusters + << ", layerClusters mask label: " << label_clustersmask[ws].label() << "\n"; + } //end of loop overs masks + } + + // ############################################## + // Fill layercluster histograms + // ############################################## + int w = 0; //counter counting the number of sets of histograms + if (doLayerClustersPlots_) { + histoProducerAlgo_->fill_generic_cluster_histos(histograms.histoProducerAlgo, + w, + clusterHandle, + clusters, + caloParticleHandle, + caloParticles, + cPIndices, + selected_cPeff, + barrelHitMap, + totallayers_to_monitor_, + recSimColl[0], + simRecColl[0], + barrelRechitManager); + + for (unsigned int layerclusterIndex = 0; layerclusterIndex < clusters.size(); layerclusterIndex++) { + histoProducerAlgo_->fill_cluster_histos(histograms.histoProducerAlgo, w, clusters[layerclusterIndex]); + } + + //General Info on hgcalLayerClusters + LogTrace("BarrelValidator") << "\n# of layer clusters with " << label_lcl.process() << ":" << label_lcl.label() + << ":" << label_lcl.instance() << ": " << clusters.size() << "\n"; + } +} + +void BarrelValidator::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + // hgcalValidator + edm::ParameterSetDescription desc; + desc.add("ptMinCP", 0.5); + desc.add("ptMaxCP", 300.0); + desc.add("minRapidityCP", -3.1); + desc.add("maxRapidityCP", 3.1); + desc.add("lipCP", 30.0); + desc.add("tipCP", 60); + desc.add("chargedOnlyCP", false); + desc.add("stableOnlyCP", false); + desc.add("notConvertedOnlyCP", true); + desc.add>("pdgIdCP", + { + 11, + -11, + 13, + -13, + 22, + 111, + 211, + -211, + 321, + -321, + 311, + 130, + 310, + }); + desc.add("signalOnlyCP", true); + desc.add("intimeOnlyCP", true); + desc.add("minHitCP", 0); + desc.add("maxSimClustersCP", -1); + { + edm::ParameterSetDescription psd1; + psd1.add("minEta", -4.5); + psd1.add("maxEta", 4.5); + psd1.add("nintEta", 100); + psd1.add("useFabsEta", false); + psd1.add("minEne", 0.0); + psd1.add("maxEne", 500.0); + psd1.add("nintEne", 250); + psd1.add("minPt", 0.0); + psd1.add("maxPt", 100.0); + psd1.add("nintPt", 100); + psd1.add("minPhi", -3.2); + psd1.add("maxPhi", 3.2); + psd1.add("nintPhi", 80); + psd1.add("minMixedHitsSimCluster", 0.0); + psd1.add("maxMixedHitsSimCluster", 800.0); + psd1.add("nintMixedHitsSimCluster", 100); + psd1.add("minMixedHitsCluster", 0.0); + psd1.add("maxMixedHitsCluster", 800.0); + psd1.add("nintMixedHitsCluster", 100); + psd1.add("minEneCl", 0.0); + psd1.add("maxEneCl", 110.0); + psd1.add("nintEneCl", 110); + psd1.add("minLongDepBary", 0.0); + psd1.add("maxLongDepBary", 110.0); + psd1.add("nintLongDepBary", 110); + psd1.add("minZpos", -550.0); + psd1.add("maxZpos", 550.0); + psd1.add("nintZpos", 1100); + psd1.add("minTotNsimClsperlay", 0.0); + psd1.add("maxTotNsimClsperlay", 50.0); + psd1.add("nintTotNsimClsperlay", 50); + psd1.add("minTotNClsperlay", 0.0); + psd1.add("maxTotNClsperlay", 100.0); + psd1.add("nintTotNClsperlay", 50); + psd1.add("minEneClperlay", 0.0); + psd1.add("maxEneClperlay", 110.0); + psd1.add("nintEneClperlay", 110); + psd1.add("minScore", 0.0); + psd1.add("maxScore", 1.02); + psd1.add("nintScore", 51); + psd1.add("minSharedEneFrac", 0.0); + psd1.add("maxSharedEneFrac", 1.02); + psd1.add("nintSharedEneFrac", 51); + psd1.add("minTSTSharedEneFracEfficiency", 0.5); + psd1.add("minTSTSharedEneFrac", 0.0); + psd1.add("maxTSTSharedEneFrac", 1.01); + psd1.add("nintTSTSharedEneFrac", 101); + psd1.add("minTotNTSTs", 0.0); + psd1.add("maxTotNTSTs", 50.0); + psd1.add("nintTotNTSTs", 50); + psd1.add("minTotNClsinTSTs", 0.0); + psd1.add("maxTotNClsinTSTs", 400.0); + psd1.add("nintTotNClsinTSTs", 100); + + psd1.add("minTotNClsinTSTsperlayer", 0.0); + psd1.add("maxTotNClsinTSTsperlayer", 50.0); + psd1.add("nintTotNClsinTSTsperlayer", 50); + psd1.add("minMplofLCs", 0.0); + psd1.add("maxMplofLCs", 20.0); + psd1.add("nintMplofLCs", 20); + psd1.add("minSizeCLsinTSTs", 0.0); + psd1.add("maxSizeCLsinTSTs", 50.0); + psd1.add("nintSizeCLsinTSTs", 50); + psd1.add("minClEnepermultiplicity", 0.0); + psd1.add("maxClEnepermultiplicity", 10.0); + psd1.add("nintClEnepermultiplicity", 10); + psd1.add("minX", -300.0); + psd1.add("maxX", 300.0); + psd1.add("nintX", 100); + psd1.add("minY", -300.0); + psd1.add("maxY", 300.0); + psd1.add("nintY", 100); + psd1.add("minZ", -550.0); + psd1.add("maxZ", 550.0); + psd1.add("nintZ", 1100); + desc.add("histoProducerAlgoBlock", psd1); + } + desc.add>("hgcal_hits", + { + edm::InputTag("HGCalRecHit", "HGCEERecHits"), + edm::InputTag("HGCalRecHit", "HGCHEFRecHits"), + edm::InputTag("HGCalRecHit", "HGCHEBRecHits"), + }); + desc.add>("barrel_hits", + { + edm::InputTag("particleFlowRecHitECAL"), + edm::InputTag("particleFlowRecHitHBHE"), + }); + + desc.add("label_lcl", edm::InputTag("hgcalMergeLayerClusters")); + desc.add>("label_tst", + { + edm::InputTag("ticlTrackstersCLUE3DHigh"), + edm::InputTag("ticlTrackstersMerge"), + edm::InputTag("ticlSimTracksters", "fromCPs"), + edm::InputTag("ticlSimTracksters"), + }); + desc.add("label_simTS", edm::InputTag("ticlSimTracksters")); + desc.add("label_simTSFromCP", edm::InputTag("ticlSimTracksters", "fromCPs")); + desc.addUntracked>("associator", + {edm::InputTag("barrelLayerClusterCaloParticleAssociation")}); + desc.addUntracked>("associatorSim", + {edm::InputTag("barrelLayerClusterSimClusterAssociation")}); + desc.addUntracked("SaveGeneralInfo", true); + desc.addUntracked("doCaloParticlePlots", true); + desc.addUntracked("doCaloParticleSelection", true); + desc.addUntracked("doSimClustersPlots", true); + desc.add("label_SimClusters", edm::InputTag("SimClusters")); + desc.add("label_SimClustersLevel", edm::InputTag("ClusterLevel")); + desc.addUntracked("doLayerClustersPlots", true); + desc.add("label_layerClusterPlots", edm::InputTag("hgcalMergeLayerClusters")); + desc.add("label_LCToCPLinking", edm::InputTag("LCToCP_association")); + desc.add("simClustersToCaloParticlesMap", + edm::InputTag("SimClusterToCaloParticleAssociation", "simClusterToCaloParticleMap")); + desc.add("label_cp_effic", edm::InputTag("mix", "MergedCaloTruth")); + desc.add("label_cp_fake", edm::InputTag("mix", "MergedCaloTruth")); + desc.add("label_scl", edm::InputTag("mix", "MergedCaloTruth")); + desc.add("simVertices", edm::InputTag("g4SimHits")); + desc.add("totallayers_to_monitor", 5); + desc.add("dirName", "BarrelCalorimeters/BarrelValidator/"); + descriptions.add("barrelValidator", desc); +} diff --git a/Validation/HGCalValidation/plugins/SealModule.cc b/Validation/HGCalValidation/plugins/SealModule.cc index ec323a99883d9..21e3e05e6b519 100644 --- a/Validation/HGCalValidation/plugins/SealModule.cc +++ b/Validation/HGCalValidation/plugins/SealModule.cc @@ -2,5 +2,7 @@ #include "FWCore/Framework/interface/MakerMacros.h" #include "Validation/HGCalValidation/interface/HGCalValidator.h" +#include "Validation/HGCalValidation/interface/BarrelValidator.h" DEFINE_FWK_MODULE(HGCalValidator); +DEFINE_FWK_MODULE(BarrelValidator); diff --git a/Validation/HGCalValidation/python/BarrelPostProcessor_cff.py b/Validation/HGCalValidation/python/BarrelPostProcessor_cff.py new file mode 100644 index 0000000000000..09b4d948df843 --- /dev/null +++ b/Validation/HGCalValidation/python/BarrelPostProcessor_cff.py @@ -0,0 +1,10 @@ +import FWCore.ParameterSet.Config as cms + +from Validation.HGCalValidation.PostProcessorBarrel_cfi import postProcessorBarrellayerclusters + +barrelValidatorPostProcessor = cms.Sequence() +_barrelValidatorPostProcessor = barrelValidatorPostProcessor.copy() +_barrelValidatorPostProcessor += cms.Sequence(postProcessorBarrellayerclusters) + +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +ticl_barrel.toReplaceWith(barrelValidatorPostProcessor, _barrelValidatorPostProcessor) diff --git a/Validation/HGCalValidation/python/BarrelValidator_cff.py b/Validation/HGCalValidation/python/BarrelValidator_cff.py new file mode 100644 index 0000000000000..4c16892afb23a --- /dev/null +++ b/Validation/HGCalValidation/python/BarrelValidator_cff.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +from DQMServices.Core.DQM_cfg import * +from Validation.HGCalValidation.barrelValidator_cfi import barrelValidator as _barrelValidator + +barrelValidator = _barrelValidator.clone() diff --git a/Validation/HGCalValidation/python/HGCalPostProcessor_cff.py b/Validation/HGCalValidation/python/HGCalPostProcessor_cff.py index 219f9ce6fefde..001b3102a15e6 100644 --- a/Validation/HGCalValidation/python/HGCalPostProcessor_cff.py +++ b/Validation/HGCalValidation/python/HGCalPostProcessor_cff.py @@ -20,3 +20,4 @@ postProcessorHGCALsimclusters+ postProcessorHGCALTracksters+ postProcessorHGCALCandidates) + diff --git a/Validation/HGCalValidation/python/PostProcessorBarrel_cfi.py b/Validation/HGCalValidation/python/PostProcessorBarrel_cfi.py new file mode 100644 index 0000000000000..f658bccd6af5f --- /dev/null +++ b/Validation/HGCalValidation/python/PostProcessorBarrel_cfi.py @@ -0,0 +1,27 @@ +import FWCore.ParameterSet.Config as cms +from DQMServices.Core.DQMEDHarvester import DQMEDHarvester +from Validation.HGCalValidation.BarrelValidator_cff import barrelValidator + +prefix = 'BarrelCalorimeters/BarrelValidator/' +maxlayer = barrelValidator.totallayers_to_monitor.value() + +#barrelLayerClusters +eff_layers = ["effic_eta_layer_barrel{} 'LayerCluster Efficiency vs #eta Layer{}' Num_CaloParticle_Eta_perlayer_barrel{} Denom_CaloParticle_Eta_perlayer_barrel{}".format(i, i, i, i) for i in range(maxlayer)] +eff_layers.extend(["effic_phi_layer_barrel{} 'LayerCluster Efficiency vs #phi Layer{}' Num_CaloParticle_Phi_perlayer_barrel{} Denom_CaloParticle_Phi_perlayer_barrel{}".format(i, i, i, i) for i in range(maxlayer)]) +eff_layers.extend(["duplicate_eta_layer_barrel{} 'LayerCluster Duplicate(Split) Rate vs #eta Layer{}' NumDup_CaloParticle_Eta_perlayer_barrel{} Denom_CaloParticle_Eta_perlayer_barrel{}".format(i, i, i, i) for i in range(maxlayer)]) +eff_layers.extend(["duplicate_phi_layer_barrel{} 'LayerCluster Duplicate(Split) Rate vs #phi Layer{}' NumDup_CaloParticle_Phi_perlayer_barrel{} Denom_CaloParticle_Phi_perlayer_barrel{}".format(i, i, i, i) for i in range(maxlayer)]) +eff_layers.extend(["fake_eta_layer_barrel{} 'LayerCluster Fake Rate vs #eta Layer{}' Num_LayerCluster_Eta_perlayer_barrel{} Denom_LayerCluster_Eta_perlayer_barrel{} fake".format(i, i, i, i) for i in range(maxlayer)]) +eff_layers.extend(["fake_phi_layer_barrel{} 'LayerCluster Fake Rate vs #phi Layer{}' Num_LayerCluster_Phi_perlayer_barrel{} Denom_LayerCluster_Phi_perlayer_barrel{} fake".format(i, i, i, i) for i in range(maxlayer)]) +eff_layers.extend(["merge_eta_layer_barrel{} 'LayerCluster Merge Rate vs #eta Layer{}' NumMerge_LayerCluster_Eta_perlayer_barrel{} Denom_LayerCluster_Eta_perlayer_barrel{}".format(i, i, i, i) for i in range(maxlayer)]) +eff_layers.extend(["merge_phi_layer_barrel{} 'LayerCluster Merge Rate vs #phi Layer{}' NumMerge_LayerCluster_Phi_perlayer_barrel{} Denom_LayerCluster_Phi_perlayer_barrel{}".format(i, i, i, i) for i in range(maxlayer)]) + +lcToCP_linking = barrelValidator.label_LCToCPLinking._InputTag__moduleLabel +postProcessorBarrellayerclusters = DQMEDHarvester('DQMGenericClient', + subDirs = cms.untracked.vstring(prefix + barrelValidator.label_layerClusterPlots._InputTag__moduleLabel + '/' + lcToCP_linking), + efficiency = cms.vstring(eff_layers), + resolution = cms.vstring(), + cumulativeDists = cms.untracked.vstring(), + noFlowDists = cms.untracked.vstring(), + outputFileName = cms.untracked.string(""), + verbose = cms.untracked.uint32(4)) + diff --git a/Validation/HGCalValidation/src/BarrelVHistoProducerAlgo.cc b/Validation/HGCalValidation/src/BarrelVHistoProducerAlgo.cc new file mode 100644 index 0000000000000..6f7b18e34cee2 --- /dev/null +++ b/Validation/HGCalValidation/src/BarrelVHistoProducerAlgo.cc @@ -0,0 +1,1433 @@ +#include +#include +#include + +#include "Validation/HGCalValidation/interface/BarrelVHistoProducerAlgo.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "SimDataFormats/CaloAnalysis/interface/SimCluster.h" +#include "TMath.h" +#include "TLatex.h" +#include "TF1.h" + +using namespace std; + +//Parameters for the score cut. Later, this will become part of the +//configuration parameter for the Barrel associator. +const double ScoreCutLCtoCP_ = 0.1; +const double ScoreCutCPtoLC_ = 0.1; +const double ScoreCutLCtoSC_ = 0.1; +const double ScoreCutSCtoLC_ = 0.1; + +BarrelVHistoProducerAlgo::BarrelVHistoProducerAlgo(const edm::ParameterSet& pset) + : //parameters for eta + minEta_(pset.getParameter("minEta")), + maxEta_(pset.getParameter("maxEta")), + nintEta_(pset.getParameter("nintEta")), + useFabsEta_(pset.getParameter("useFabsEta")), + + //parameters for energy + minEne_(pset.getParameter("minEne")), + maxEne_(pset.getParameter("maxEne")), + nintEne_(pset.getParameter("nintEne")), + + //parameters for pt + minPt_(pset.getParameter("minPt")), + maxPt_(pset.getParameter("maxPt")), + nintPt_(pset.getParameter("nintPt")), + + //parameters for phi + minPhi_(pset.getParameter("minPhi")), + maxPhi_(pset.getParameter("maxPhi")), + nintPhi_(pset.getParameter("nintPhi")), + + //parameters for the total amount of energy clustered by all layer clusters (fraction over CaloParticless) + minEneCl_(pset.getParameter("minEneCl")), + maxEneCl_(pset.getParameter("maxEneCl")), + nintEneCl_(pset.getParameter("nintEneCl")), + + //parameters for z positionof vertex plots + minZpos_(pset.getParameter("minZpos")), + maxZpos_(pset.getParameter("maxZpos")), + nintZpos_(pset.getParameter("nintZpos")), + + //Parameters for the total number of SimClusters per layer + minTotNsimClsperlay_(pset.getParameter("minTotNsimClsperlay")), + maxTotNsimClsperlay_(pset.getParameter("maxTotNsimClsperlay")), + nintTotNsimClsperlay_(pset.getParameter("nintTotNsimClsperlay")), + + //Parameters for the total number of layer clusters per layer + minTotNClsperlay_(pset.getParameter("minTotNClsperlay")), + maxTotNClsperlay_(pset.getParameter("maxTotNClsperlay")), + nintTotNClsperlay_(pset.getParameter("nintTotNClsperlay")), + + //Parameters for the energy clustered by layer clusters per layer (fraction over CaloParticless) + minEneClperlay_(pset.getParameter("minEneClperlay")), + maxEneClperlay_(pset.getParameter("maxEneClperlay")), + nintEneClperlay_(pset.getParameter("nintEneClperlay")), + + //Parameters for the score both for: + //1. calo particle to layer clusters association per layer + //2. layer cluster to calo particles association per layer + minScore_(pset.getParameter("minScore")), + maxScore_(pset.getParameter("maxScore")), + nintScore_(pset.getParameter("nintScore")), + + //Parameters for shared energy fraction. That is: + //1. Fraction of each of the layer clusters energy related to a + //calo particle over that calo particle's energy. + //2. Fraction of each of the calo particles energy + //related to a layer cluster over that layer cluster's energy. + minSharedEneFrac_(pset.getParameter("minSharedEneFrac")), + maxSharedEneFrac_(pset.getParameter("maxSharedEneFrac")), + nintSharedEneFrac_(pset.getParameter("nintSharedEneFrac")), + + //parameters for x + minX_(pset.getParameter("minX")), + maxX_(pset.getParameter("maxX")), + nintX_(pset.getParameter("nintX")), + + //parameters for y + minY_(pset.getParameter("minY")), + maxY_(pset.getParameter("maxY")), + nintY_(pset.getParameter("nintY")), + + //parameters for z + minZ_(pset.getParameter("minZ")), + maxZ_(pset.getParameter("maxZ")), + nintZ_(pset.getParameter("nintZ")) {} + +BarrelVHistoProducerAlgo::~BarrelVHistoProducerAlgo() {} + +void BarrelVHistoProducerAlgo::bookInfo(DQMStore::IBooker& ibook, Histograms& histograms) { + histograms.lastLayerEB = ibook.bookInt("lastLayerEB"); + histograms.lastLayerHB = ibook.bookInt("lastLayerHB"); +} + +void BarrelVHistoProducerAlgo::bookCaloParticleHistos(DQMStore::IBooker& ibook, + Histograms& histograms, + int pdgid, + unsigned int layers) { + histograms.h_caloparticle_eta[pdgid] = + ibook.book1D("N of caloparticle vs eta", "N of caloParticles vs eta", nintEta_, minEta_, maxEta_); + histograms.h_caloparticle_eta_Zorigin[pdgid] = + ibook.book2D("Eta vs Zorigin", "Eta vs Zorigin", nintEta_, minEta_, maxEta_, nintZpos_, minZpos_, maxZpos_); + + histograms.h_caloparticle_energy[pdgid] = + ibook.book1D("Energy", "Energy of CaloParticles; Energy [GeV]", nintEne_, minEne_, maxEne_); + histograms.h_caloparticle_pt[pdgid] = ibook.book1D("Pt", "Pt of CaloParticles", nintPt_, minPt_, maxPt_); + histograms.h_caloparticle_phi[pdgid] = ibook.book1D("Phi", "Phi of CaloParticles", nintPhi_, minPhi_, maxPhi_); + histograms.h_caloparticle_selfenergy[pdgid] = + ibook.book1D("SelfEnergy", "Total Energy of Hits in Sim Clusters (matched)", nintEne_, minEne_, maxEne_); + histograms.h_caloparticle_energyDifference[pdgid] = + ibook.book1D("EnergyDifference", "(Energy-SelfEnergy)/Energy", 300., -5., 1.); + + histograms.h_caloparticle_nSimClusters[pdgid] = + ibook.book1D("Num Sim Clusters", "Num Sim Clusters in CaloParticles", 100, 0., 100.); + histograms.h_caloparticle_nHitsInSimClusters[pdgid] = + ibook.book1D("Num Hits in Sim Clusters", "Num Hits in Sim Clusters in CaloParticles", 1000, 0., 1000.); + histograms.h_caloparticle_nHitsInSimClusters_matchedtoRecHit[pdgid] = ibook.book1D( + "Num Rec-matched Hits in Sim Clusters", "Num Hits in Sim Clusters (matched) in CaloParticles", 1000, 0., 1000.); + + histograms.h_caloparticle_nHits_matched_energy[pdgid] = + ibook.book1D("Energy of Rec-matched Hits", "Energy of Hits in Sim Clusters (matched)", 100, 0., 10.); + histograms.h_caloparticle_nHits_matched_energy_layer[pdgid] = + ibook.book2D("Energy of Rec-matched Hits vs layer", + "Energy of Hits in Sim Clusters (matched) vs layer", + layers, + 0., + (float)layers, + 100, + 0., + 10.); + histograms.h_caloparticle_nHits_matched_energy_layer_1SimCl[pdgid] = + ibook.book2D("Energy of Rec-matched Hits vs layer (1SC)", + "Energy of Hits only 1 Sim Clusters (matched) vs layer", + layers, + 0., + (float)layers, + 100, + 0., + 10.); + histograms.h_caloparticle_sum_energy_layer[pdgid] = + ibook.book2D("Rec-matched Hits Sum Energy vs layer", + "Rescaled Sum Energy of Hits in Sim Clusters (matched) vs layer", + layers, + 0., + (float)layers, + 110, + 0., + 110.); + histograms.h_caloparticle_fractions[pdgid] = + ibook.book2D("HitFractions", "Hit fractions;Hit fraction;E_{hit}^{2} fraction", 101, 0, 1.01, 100, 0, 1); + histograms.h_caloparticle_fractions_weight[pdgid] = ibook.book2D( + "HitFractions_weighted", "Hit fractions weighted;Hit fraction;E_{hit}^{2} fraction", 101, 0, 1.01, 100, 0, 1); + + histograms.h_caloparticle_firstlayer[pdgid] = + ibook.book1D("First Layer", "First layer of the CaloParticles", layers, 0., (float)layers); + histograms.h_caloparticle_lastlayer[pdgid] = + ibook.book1D("Last Layer", "Last layer of the CaloParticles", layers, 0., (float)layers); + histograms.h_caloparticle_layersnum[pdgid] = + ibook.book1D("Number of Layers", "Number of layers of the CaloParticles", layers, 0., (float)layers); + histograms.h_caloparticle_firstlayer_matchedtoRecHit[pdgid] = ibook.book1D( + "First Layer (rec-matched hit)", "First layer of the CaloParticles (matched)", layers, 0., (float)layers); + histograms.h_caloparticle_lastlayer_matchedtoRecHit[pdgid] = ibook.book1D( + "Last Layer (rec-matched hit)", "Last layer of the CaloParticles (matched)", layers, 0., (float)layers); + histograms.h_caloparticle_layersnum_matchedtoRecHit[pdgid] = + ibook.book1D("Number of Layers (rec-matched hit)", + "Number of layers of the CaloParticles (matched)", + layers, + 0., + (float)layers); +} + +void BarrelVHistoProducerAlgo::bookSimClusterHistos(DQMStore::IBooker& ibook, + Histograms& histograms, + unsigned int layers) { + //--------------------------------------------------------------------------------------------------------------------------- + for (unsigned ilayer = 0; ilayer < layers; ++ilayer) { + auto istr1 = std::to_string(ilayer); + std::string istr2 = istr1 + " in barrel"; + istr1 = "_barrel" + istr1; + histograms.h_simclusternum_perlayer[ilayer] = ibook.book1D("totsimclusternum_layer_" + istr1, + "total number of SimClusters for layer " + istr1, + nintTotNsimClsperlay_, + minTotNsimClsperlay_, + maxTotNsimClsperlay_); + + } //end of loop over layers +} + +void BarrelVHistoProducerAlgo::bookSimClusterAssociationHistos(DQMStore::IBooker& ibook, + Histograms& histograms, + unsigned int layers) { + std::unordered_map denom_layercl_in_simcl_eta_perlayer; + denom_layercl_in_simcl_eta_perlayer.clear(); + std::unordered_map denom_layercl_in_simcl_phi_perlayer; + denom_layercl_in_simcl_phi_perlayer.clear(); + std::unordered_map score_layercl2simcluster_perlayer; + score_layercl2simcluster_perlayer.clear(); + std::unordered_map sharedenergy_layercl2simcluster_perlayer; + sharedenergy_layercl2simcluster_perlayer.clear(); + std::unordered_map energy_vs_score_layercl2simcluster_perlayer; + energy_vs_score_layercl2simcluster_perlayer.clear(); + std::unordered_map num_layercl_in_simcl_eta_perlayer; + num_layercl_in_simcl_eta_perlayer.clear(); + std::unordered_map num_layercl_in_simcl_phi_perlayer; + num_layercl_in_simcl_phi_perlayer.clear(); + std::unordered_map numMerge_layercl_in_simcl_eta_perlayer; + numMerge_layercl_in_simcl_eta_perlayer.clear(); + std::unordered_map numMerge_layercl_in_simcl_phi_perlayer; + numMerge_layercl_in_simcl_phi_perlayer.clear(); + std::unordered_map sharedenergy_layercl2simcluster_vs_eta_perlayer; + sharedenergy_layercl2simcluster_vs_eta_perlayer.clear(); + std::unordered_map sharedenergy_layercl2simcluster_vs_phi_perlayer; + sharedenergy_layercl2simcluster_vs_phi_perlayer.clear(); + std::unordered_map denom_simcluster_eta_perlayer; + denom_simcluster_eta_perlayer.clear(); + std::unordered_map denom_simcluster_phi_perlayer; + denom_simcluster_phi_perlayer.clear(); + std::unordered_map score_simcluster2layercl_perlayer; + score_simcluster2layercl_perlayer.clear(); + std::unordered_map sharedenergy_simcluster2layercl_perlayer; + sharedenergy_simcluster2layercl_perlayer.clear(); + std::unordered_map energy_vs_score_simcluster2layercl_perlayer; + energy_vs_score_simcluster2layercl_perlayer.clear(); + std::unordered_map num_simcluster_eta_perlayer; + num_simcluster_eta_perlayer.clear(); + std::unordered_map num_simcluster_phi_perlayer; + num_simcluster_phi_perlayer.clear(); + std::unordered_map numDup_simcluster_eta_perlayer; + numDup_simcluster_eta_perlayer.clear(); + std::unordered_map numDup_simcluster_phi_perlayer; + numDup_simcluster_phi_perlayer.clear(); + std::unordered_map sharedenergy_simcluster2layercl_vs_eta_perlayer; + sharedenergy_simcluster2layercl_vs_eta_perlayer.clear(); + std::unordered_map sharedenergy_simcluster2layercl_vs_phi_perlayer; + sharedenergy_simcluster2layercl_vs_phi_perlayer.clear(); + + //--------------------------------------------------------------------------------------------------------------------------- + for (unsigned ilayer = 0; ilayer < layers; ++ilayer) { + auto istr1 = std::to_string(ilayer); + std::string istr2 = istr1 + " in barrel"; + istr1 = "_barrel" + istr1; + //------------------------------------------------------------------------------------------------------------------------- + denom_layercl_in_simcl_eta_perlayer[ilayer] = + ibook.book1D("Denom_LayerCluster_in_SimCluster_Eta_perlayer" + istr1, + "Denom LayerCluster in SimCluster Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + //------------------------------------------------------------------------------------------------------------------------- + denom_layercl_in_simcl_phi_perlayer[ilayer] = + ibook.book1D("Denom_LayerCluster_in_SimCluster_Phi_perlayer" + istr1, + "Denom LayerCluster in SimCluster Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + //------------------------------------------------------------------------------------------------------------------------- + score_layercl2simcluster_perlayer[ilayer] = ibook.book1D("Score_layercl2simcluster_perlayer" + istr1, + "Score of Layer Cluster per SimCluster for layer " + istr2, + nintScore_, + minScore_, + maxScore_); + //------------------------------------------------------------------------------------------------------------------------- + score_simcluster2layercl_perlayer[ilayer] = ibook.book1D("Score_simcluster2layercl_perlayer" + istr1, + "Score of SimCluster per Layer Cluster for layer " + istr2, + nintScore_, + minScore_, + maxScore_); + //------------------------------------------------------------------------------------------------------------------------- + energy_vs_score_simcluster2layercl_perlayer[ilayer] = + ibook.book2D("Energy_vs_Score_simcluster2layer_perlayer" + istr1, + "Energy vs Score of SimCluster per Layer Cluster for layer " + istr2, + nintScore_, + minScore_, + maxScore_, + nintSharedEneFrac_, + minSharedEneFrac_, + maxSharedEneFrac_); + //------------------------------------------------------------------------------------------------------------------------- + energy_vs_score_layercl2simcluster_perlayer[ilayer] = + ibook.book2D("Energy_vs_Score_layer2simcluster_perlayer" + istr1, + "Energy vs Score of Layer Cluster per SimCluster for layer " + istr2, + nintScore_, + minScore_, + maxScore_, + nintSharedEneFrac_, + minSharedEneFrac_, + maxSharedEneFrac_); + //------------------------------------------------------------------------------------------------------------------------- + sharedenergy_simcluster2layercl_perlayer[ilayer] = + ibook.book1D("SharedEnergy_simcluster2layercl_perlayer" + istr1, + "Shared Energy of SimCluster per Layer Cluster for layer " + istr2, + nintSharedEneFrac_, + minSharedEneFrac_, + maxSharedEneFrac_); + //------------------------------------------------------------------------------------------------------------------------- + sharedenergy_simcluster2layercl_vs_eta_perlayer[ilayer] = + ibook.bookProfile("SharedEnergy_simcluster2layercl_vs_eta_perlayer" + istr1, + "Shared Energy of SimCluster vs #eta per best Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_, + minSharedEneFrac_, + maxSharedEneFrac_); + //------------------------------------------------------------------------------------------------------------------------- + sharedenergy_simcluster2layercl_vs_phi_perlayer[ilayer] = + ibook.bookProfile("SharedEnergy_simcluster2layercl_vs_phi_perlayer" + istr1, + "Shared Energy of SimCluster vs #phi per best Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_, + minSharedEneFrac_, + maxSharedEneFrac_); + //------------------------------------------------------------------------------------------------------------------------- + sharedenergy_layercl2simcluster_perlayer[ilayer] = + ibook.book1D("SharedEnergy_layercluster2simcluster_perlayer" + istr1, + "Shared Energy of Layer Cluster per SimCluster for layer " + istr2, + nintSharedEneFrac_, + minSharedEneFrac_, + maxSharedEneFrac_); + //------------------------------------------------------------------------------------------------------------------------- + sharedenergy_layercl2simcluster_vs_eta_perlayer[ilayer] = + ibook.bookProfile("SharedEnergy_layercl2simcluster_vs_eta_perlayer" + istr1, + "Shared Energy of LayerCluster vs #eta per best SimCluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_, + minSharedEneFrac_, + maxSharedEneFrac_); + //------------------------------------------------------------------------------------------------------------------------- + sharedenergy_layercl2simcluster_vs_phi_perlayer[ilayer] = + ibook.bookProfile("SharedEnergy_layercl2simcluster_vs_phi_perlayer" + istr1, + "Shared Energy of LayerCluster vs #phi per best SimCluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_, + minSharedEneFrac_, + maxSharedEneFrac_); + //------------------------------------------------------------------------------------------------------------------------- + num_simcluster_eta_perlayer[ilayer] = ibook.book1D("Num_SimCluster_Eta_perlayer" + istr1, + "Num SimCluster Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + //------------------------------------------------------------------------------------------------------------------------- + numDup_simcluster_eta_perlayer[ilayer] = + ibook.book1D("NumDup_SimCluster_Eta_perlayer" + istr1, + "Num Duplicate SimCluster Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + //------------------------------------------------------------------------------------------------------------------------- + denom_simcluster_eta_perlayer[ilayer] = ibook.book1D("Denom_SimCluster_Eta_perlayer" + istr1, + "Denom SimCluster Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + //------------------------------------------------------------------------------------------------------------------------- + num_simcluster_phi_perlayer[ilayer] = ibook.book1D("Num_SimCluster_Phi_perlayer" + istr1, + "Num SimCluster Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + //------------------------------------------------------------------------------------------------------------------------- + numDup_simcluster_phi_perlayer[ilayer] = + ibook.book1D("NumDup_SimCluster_Phi_perlayer" + istr1, + "Num Duplicate SimCluster Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + //------------------------------------------------------------------------------------------------------------------------- + denom_simcluster_phi_perlayer[ilayer] = ibook.book1D("Denom_SimCluster_Phi_perlayer" + istr1, + "Denom SimCluster Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + //------------------------------------------------------------------------------------------------------------------------- + num_layercl_in_simcl_eta_perlayer[ilayer] = + ibook.book1D("Num_LayerCluster_in_SimCluster_Eta_perlayer" + istr1, + "Num LayerCluster Eta per Layer Cluster in SimCluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + //------------------------------------------------------------------------------------------------------------------------- + numMerge_layercl_in_simcl_eta_perlayer[ilayer] = + ibook.book1D("NumMerge_LayerCluster_in_SimCluster_Eta_perlayer" + istr1, + "Num Merge LayerCluster Eta per Layer Cluster in SimCluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + //------------------------------------------------------------------------------------------------------------------------- + num_layercl_in_simcl_phi_perlayer[ilayer] = + ibook.book1D("Num_LayerCluster_in_SimCluster_Phi_perlayer" + istr1, + "Num LayerCluster Phi per Layer Cluster in SimCluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + //------------------------------------------------------------------------------------------------------------------------- + numMerge_layercl_in_simcl_phi_perlayer[ilayer] = + ibook.book1D("NumMerge_LayerCluster_in_SimCluster_Phi_perlayer" + istr1, + "Num Merge LayerCluster Phi per Layer Cluster in SimCluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + + } //end of loop over layers + + histograms.h_denom_layercl_in_simcl_eta_perlayer.push_back(std::move(denom_layercl_in_simcl_eta_perlayer)); + histograms.h_denom_layercl_in_simcl_phi_perlayer.push_back(std::move(denom_layercl_in_simcl_phi_perlayer)); + histograms.h_score_layercl2simcluster_perlayer.push_back(std::move(score_layercl2simcluster_perlayer)); + histograms.h_sharedenergy_layercl2simcluster_perlayer.push_back(std::move(sharedenergy_layercl2simcluster_perlayer)); + histograms.h_energy_vs_score_layercl2simcluster_perlayer.push_back( + std::move(energy_vs_score_layercl2simcluster_perlayer)); + histograms.h_num_layercl_in_simcl_eta_perlayer.push_back(std::move(num_layercl_in_simcl_eta_perlayer)); + histograms.h_num_layercl_in_simcl_phi_perlayer.push_back(std::move(num_layercl_in_simcl_phi_perlayer)); + histograms.h_numMerge_layercl_in_simcl_eta_perlayer.push_back(std::move(numMerge_layercl_in_simcl_eta_perlayer)); + histograms.h_numMerge_layercl_in_simcl_phi_perlayer.push_back(std::move(numMerge_layercl_in_simcl_phi_perlayer)); + histograms.h_sharedenergy_layercl2simcluster_vs_eta_perlayer.push_back( + std::move(sharedenergy_layercl2simcluster_vs_eta_perlayer)); + histograms.h_sharedenergy_layercl2simcluster_vs_phi_perlayer.push_back( + std::move(sharedenergy_layercl2simcluster_vs_phi_perlayer)); + histograms.h_denom_simcluster_eta_perlayer.push_back(std::move(denom_simcluster_eta_perlayer)); + histograms.h_denom_simcluster_phi_perlayer.push_back(std::move(denom_simcluster_phi_perlayer)); + histograms.h_score_simcluster2layercl_perlayer.push_back(std::move(score_simcluster2layercl_perlayer)); + histograms.h_sharedenergy_simcluster2layercl_perlayer.push_back(std::move(sharedenergy_simcluster2layercl_perlayer)); + histograms.h_energy_vs_score_simcluster2layercl_perlayer.push_back( + std::move(energy_vs_score_simcluster2layercl_perlayer)); + histograms.h_num_simcluster_eta_perlayer.push_back(std::move(num_simcluster_eta_perlayer)); + histograms.h_num_simcluster_phi_perlayer.push_back(std::move(num_simcluster_phi_perlayer)); + histograms.h_numDup_simcluster_eta_perlayer.push_back(std::move(numDup_simcluster_eta_perlayer)); + histograms.h_numDup_simcluster_phi_perlayer.push_back(std::move(numDup_simcluster_phi_perlayer)); + histograms.h_sharedenergy_simcluster2layercl_vs_eta_perlayer.push_back( + std::move(sharedenergy_simcluster2layercl_vs_eta_perlayer)); + histograms.h_sharedenergy_simcluster2layercl_vs_phi_perlayer.push_back( + std::move(sharedenergy_simcluster2layercl_vs_phi_perlayer)); +} +void BarrelVHistoProducerAlgo::bookClusterHistos_ClusterLevel(DQMStore::IBooker& ibook, + Histograms& histograms, + unsigned int layers) { + //--------------------------------------------------------------------------------------------------------------------------- + histograms.h_cluster_eta.push_back( + ibook.book1D("num_reco_cluster_eta", "N of reco clusters vs eta", nintEta_, minEta_, maxEta_)); + + //--------------------------------------------------------------------------------------------------------------------------- + for (unsigned ilayer = 0; ilayer < layers; ++ilayer) { + auto istr1 = std::to_string(ilayer); + std::string istr2 = istr1 + " in barrel"; + istr1 = "_barrel" + istr1; + + histograms.h_clusternum_perlayer[ilayer] = ibook.book1D("totclusternum_layer_" + istr1, + "total number of layer clusters for layer " + istr2, + nintTotNClsperlay_, + minTotNClsperlay_, + maxTotNClsperlay_); + histograms.h_energyclustered_perlayer[ilayer] = ibook.book1D( + "energyclustered_perlayer" + istr1, + "percent of total energy clustered by layer clusters over CaloParticless energy for layer " + istr2, + nintEneClperlay_, + minEneClperlay_, + maxEneClperlay_); + } +} + +void BarrelVHistoProducerAlgo::bookClusterHistos_LCtoCP_association(DQMStore::IBooker& ibook, + Histograms& histograms, + unsigned int layers) { + //---------------------------------------------------------------------------------------------------------------------------- + for (unsigned ilayer = 0; ilayer < layers; ++ilayer) { + auto istr1 = std::to_string(ilayer); + std::string istr2 = istr1 + " in barrel"; + istr1 = "_barrel" + istr1; + histograms.h_score_layercl2caloparticle_perlayer[ilayer] = + ibook.book1D("Score_layercl2caloparticle_perlayer" + istr1, + "Score of Layer Cluster per CaloParticle for layer " + istr2, + nintScore_, + minScore_, + maxScore_); + histograms.h_score_caloparticle2layercl_perlayer[ilayer] = + ibook.book1D("Score_caloparticle2layercl_perlayer" + istr1, + "Score of CaloParticle per Layer Cluster for layer " + istr2, + nintScore_, + minScore_, + maxScore_); + histograms.h_energy_vs_score_caloparticle2layercl_perlayer[ilayer] = + ibook.book2D("Energy_vs_Score_caloparticle2layer_perlayer" + istr1, + "Energy vs Score of CaloParticle per Layer Cluster for layer " + istr2, + nintScore_, + minScore_, + maxScore_, + nintSharedEneFrac_, + minSharedEneFrac_, + maxSharedEneFrac_); + histograms.h_energy_vs_score_layercl2caloparticle_perlayer[ilayer] = + ibook.book2D("Energy_vs_Score_layer2caloparticle_perlayer" + istr1, + "Energy vs Score of Layer Cluster per CaloParticle Layer for layer " + istr2, + nintScore_, + minScore_, + maxScore_, + nintSharedEneFrac_, + minSharedEneFrac_, + maxSharedEneFrac_); + histograms.h_sharedenergy_caloparticle2layercl_perlayer[ilayer] = + ibook.book1D("SharedEnergy_caloparticle2layercl_perlayer" + istr1, + "Shared Energy of CaloParticle per Layer Cluster for layer " + istr2, + nintSharedEneFrac_, + minSharedEneFrac_, + maxSharedEneFrac_); + histograms.h_sharedenergy_caloparticle2layercl_vs_eta_perlayer[ilayer] = + ibook.bookProfile("SharedEnergy_caloparticle2layercl_vs_eta_perlayer" + istr1, + "Shared Energy of CaloParticle vs #eta per best Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_, + minSharedEneFrac_, + maxSharedEneFrac_); + histograms.h_sharedenergy_caloparticle2layercl_vs_phi_perlayer[ilayer] = + ibook.bookProfile("SharedEnergy_caloparticle2layercl_vs_phi_perlayer" + istr1, + "Shared Energy of CaloParticle vs #phi per best Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_, + minSharedEneFrac_, + maxSharedEneFrac_); + histograms.h_sharedenergy_layercl2caloparticle_perlayer[ilayer] = + ibook.book1D("SharedEnergy_layercluster2caloparticle_perlayer" + istr1, + "Shared Energy of Layer Cluster per Layer Calo Particle for layer " + istr2, + nintSharedEneFrac_, + minSharedEneFrac_, + maxSharedEneFrac_); + histograms.h_sharedenergy_layercl2caloparticle_vs_eta_perlayer[ilayer] = + ibook.bookProfile("SharedEnergy_layercl2caloparticle_vs_eta_perlayer" + istr1, + "Shared Energy of LayerCluster vs #eta per best Calo Particle for layer " + istr2, + nintEta_, + minEta_, + maxEta_, + minSharedEneFrac_, + maxSharedEneFrac_); + histograms.h_sharedenergy_layercl2caloparticle_vs_phi_perlayer[ilayer] = + ibook.bookProfile("SharedEnergy_layercl2caloparticle_vs_phi_perlayer" + istr1, + "Shared Energy of LayerCluster vs #phi per best Calo Particle for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_, + minSharedEneFrac_, + maxSharedEneFrac_); + histograms.h_num_caloparticle_eta_perlayer[ilayer] = + ibook.book1D("Num_CaloParticle_Eta_perlayer" + istr1, + "Num CaloParticle Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + histograms.h_numDup_caloparticle_eta_perlayer[ilayer] = + ibook.book1D("NumDup_CaloParticle_Eta_perlayer" + istr1, + "Num Duplicate CaloParticle Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + histograms.h_denom_caloparticle_eta_perlayer[ilayer] = + ibook.book1D("Denom_CaloParticle_Eta_perlayer" + istr1, + "Denom CaloParticle Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + histograms.h_num_caloparticle_phi_perlayer[ilayer] = + ibook.book1D("Num_CaloParticle_Phi_perlayer" + istr1, + "Num CaloParticle Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + histograms.h_numDup_caloparticle_phi_perlayer[ilayer] = + ibook.book1D("NumDup_CaloParticle_Phi_perlayer" + istr1, + "Num Duplicate CaloParticle Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + histograms.h_denom_caloparticle_phi_perlayer[ilayer] = + ibook.book1D("Denom_CaloParticle_Phi_perlayer" + istr1, + "Denom CaloParticle Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + histograms.h_num_layercl_eta_perlayer[ilayer] = + ibook.book1D("Num_LayerCluster_Eta_perlayer" + istr1, + "Num LayerCluster Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + histograms.h_numMerge_layercl_eta_perlayer[ilayer] = + ibook.book1D("NumMerge_LayerCluster_Eta_perlayer" + istr1, + "Num Merge LayerCluster Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + histograms.h_denom_layercl_eta_perlayer[ilayer] = + ibook.book1D("Denom_LayerCluster_Eta_perlayer" + istr1, + "Denom LayerCluster Eta per Layer Cluster for layer " + istr2, + nintEta_, + minEta_, + maxEta_); + histograms.h_num_layercl_phi_perlayer[ilayer] = + ibook.book1D("Num_LayerCluster_Phi_perlayer" + istr1, + "Num LayerCluster Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + histograms.h_numMerge_layercl_phi_perlayer[ilayer] = + ibook.book1D("NumMerge_LayerCluster_Phi_perlayer" + istr1, + "Num Merge LayerCluster Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + histograms.h_denom_layercl_phi_perlayer[ilayer] = + ibook.book1D("Denom_LayerCluster_Phi_perlayer" + istr1, + "Denom LayerCluster Phi per Layer Cluster for layer " + istr2, + nintPhi_, + minPhi_, + maxPhi_); + } + //--------------------------------------------------------------------------------------------------------------------------- +} + +void BarrelVHistoProducerAlgo::bookClusterHistos_CellLevel(DQMStore::IBooker& ibook, + Histograms& histograms, + unsigned int layers) { + //---------------------------------------------------------------------------------------------------------------------------- + for (unsigned ilayer = 0; ilayer < layers; ++ilayer) { + auto istr1 = std::to_string(ilayer); + std::string istr2 = istr1 + " in barrel"; + istr1 = "_barrel" + istr1; + histograms.h_cellAssociation_perlayer[ilayer] = + ibook.book1D("cellAssociation_perlayer" + istr1, "Cell Association for layer " + istr2, 5, -4., 1.); + histograms.h_cellAssociation_perlayer[ilayer]->setBinLabel(2, "TN(purity)"); + histograms.h_cellAssociation_perlayer[ilayer]->setBinLabel(3, "FN(ineff.)"); + histograms.h_cellAssociation_perlayer[ilayer]->setBinLabel(4, "FP(fake)"); + histograms.h_cellAssociation_perlayer[ilayer]->setBinLabel(5, "TP(eff.)"); + } +} +//---------------------------------------------------------------------------------------------------------------------------- + +void BarrelVHistoProducerAlgo::fill_info_histos(const Histograms& histograms, unsigned int layers) const { + // Save some info straight from geometry to avoid mistakes from updates + //----------- TODO ---------------------------------------------------------- + // For now values returned for 'lastLayerFHzp': '104', 'lastLayerFHzm': '52' are not the one expected. + // Will come back to this when there will be info in CMSSW to put in DQM file. + histograms.lastLayerEB->Fill(0); + histograms.lastLayerHB->Fill(recHitTools_->lastLayerBarrel()); +} + +void BarrelVHistoProducerAlgo::fill_caloparticle_histos( + const Histograms& histograms, + int pdgid, + const CaloParticle& caloParticle, + std::vector const& simVertices, + unsigned int layers, + std::unordered_map const& barrelHitMap, + MultiVectorManager const& barrelHits) const { + const auto eta = getEta(caloParticle.eta()); + if (histograms.h_caloparticle_eta.count(pdgid)) { + histograms.h_caloparticle_eta.at(pdgid)->Fill(eta); + } + if (histograms.h_caloparticle_eta_Zorigin.count(pdgid)) { + histograms.h_caloparticle_eta_Zorigin.at(pdgid)->Fill( + simVertices.at(caloParticle.g4Tracks()[0].vertIndex()).position().z(), eta); + } + + if (histograms.h_caloparticle_energy.count(pdgid)) { + histograms.h_caloparticle_energy.at(pdgid)->Fill(caloParticle.energy()); + } + if (histograms.h_caloparticle_pt.count(pdgid)) { + histograms.h_caloparticle_pt.at(pdgid)->Fill(caloParticle.pt()); + } + if (histograms.h_caloparticle_phi.count(pdgid)) { + histograms.h_caloparticle_phi.at(pdgid)->Fill(caloParticle.phi()); + } + + if (histograms.h_caloparticle_nSimClusters.count(pdgid)) { + histograms.h_caloparticle_nSimClusters.at(pdgid)->Fill(caloParticle.simClusters().size()); + + int simHits = 0; + int minLayerId = 999; + int maxLayerId = 0; + + int simHits_matched = 0; + int minLayerId_matched = 999; + int maxLayerId_matched = 0; + + float energy = 0.; + std::map totenergy_layer; + + float hitEnergyWeight_invSum = 0; + std::vector> haf_cp; + for (const auto& sc : caloParticle.simClusters()) { + LogDebug("BarrelValidator") << " This sim cluster has " << sc->hits_and_fractions().size() << " simHits and " + << sc->energy() << " energy. " << std::endl; + simHits += sc->hits_and_fractions().size(); + for (auto const& h_and_f : sc->hits_and_fractions()) { + const auto hitDetId = h_and_f.first; + const int layerId = recHitTools_->getLayerWithOffset(hitDetId); + // set to 0 if matched RecHit not found + int layerId_matched_min = 999; + int layerId_matched_max = 0; + std::unordered_map::const_iterator itcheck = barrelHitMap.find(hitDetId); + if (itcheck != barrelHitMap.end()) { + layerId_matched_min = layerId; + layerId_matched_max = layerId; + simHits_matched++; + + const auto hitEn = (barrelHits[itcheck->second]).energy(); + hitEnergyWeight_invSum += pow(hitEn, 2); + const auto hitFr = h_and_f.second; + const auto hitEnFr = hitEn * hitFr; + energy += hitEnFr; + histograms.h_caloparticle_nHits_matched_energy.at(pdgid)->Fill(hitEnFr); + histograms.h_caloparticle_nHits_matched_energy_layer.at(pdgid)->Fill(layerId, hitEnFr); + + if (totenergy_layer.find(layerId) != totenergy_layer.end()) { + totenergy_layer[layerId] = totenergy_layer.at(layerId) + hitEn; + } else { + totenergy_layer.emplace(layerId, hitEn); + } + if (caloParticle.simClusters().size() == 1) + histograms.h_caloparticle_nHits_matched_energy_layer_1SimCl.at(pdgid)->Fill(layerId, hitEnFr); + + auto found = std::find_if(std::begin(haf_cp), + std::end(haf_cp), + [&hitDetId](const std::pair& v) { return v.first == hitDetId; }); + if (found != haf_cp.end()) + found->second += hitFr; + else + haf_cp.emplace_back(hitDetId, hitFr); + + } else { + LogDebug("BarrelValidator") << " matched to RecHit NOT found !" << std::endl; + } + + minLayerId = std::min(minLayerId, layerId); + maxLayerId = std::max(maxLayerId, layerId); + minLayerId_matched = std::min(minLayerId_matched, layerId_matched_min); + maxLayerId_matched = std::max(maxLayerId_matched, layerId_matched_max); + } + LogDebug("BarrelValidator") << std::endl; + } // End loop over SimClusters of CaloParticle + if (hitEnergyWeight_invSum) + hitEnergyWeight_invSum = 1 / hitEnergyWeight_invSum; + + histograms.h_caloparticle_firstlayer.at(pdgid)->Fill(minLayerId); + histograms.h_caloparticle_lastlayer.at(pdgid)->Fill(maxLayerId); + histograms.h_caloparticle_layersnum.at(pdgid)->Fill(int(maxLayerId - minLayerId)); + + histograms.h_caloparticle_firstlayer_matchedtoRecHit.at(pdgid)->Fill(minLayerId_matched); + histograms.h_caloparticle_lastlayer_matchedtoRecHit.at(pdgid)->Fill(maxLayerId_matched); + histograms.h_caloparticle_layersnum_matchedtoRecHit.at(pdgid)->Fill(int(maxLayerId_matched - minLayerId_matched)); + + histograms.h_caloparticle_nHitsInSimClusters.at(pdgid)->Fill((float)simHits); + histograms.h_caloparticle_nHitsInSimClusters_matchedtoRecHit.at(pdgid)->Fill((float)simHits_matched); + histograms.h_caloparticle_selfenergy.at(pdgid)->Fill((float)energy); + histograms.h_caloparticle_energyDifference.at(pdgid)->Fill((float)1. - energy / caloParticle.energy()); + + //Calculate sum energy per-layer + auto i = totenergy_layer.begin(); + double sum_energy = 0.0; + while (i != totenergy_layer.end()) { + sum_energy += i->second; + histograms.h_caloparticle_sum_energy_layer.at(pdgid)->Fill(i->first, sum_energy / caloParticle.energy() * 100.); + i++; + } + + for (auto const& haf : haf_cp) { + if (!recHitTools_->isBarrel(haf.first)) + continue; + const auto hitEn = (barrelHits[barrelHitMap.find(haf.first)->second]).energy(); + const auto weight = pow(hitEn, 2); + histograms.h_caloparticle_fractions.at(pdgid)->Fill(haf.second, weight * hitEnergyWeight_invSum); + histograms.h_caloparticle_fractions_weight.at(pdgid)->Fill(haf.second, weight * hitEnergyWeight_invSum, weight); + } + } +} + +void BarrelVHistoProducerAlgo::BarrelVHistoProducerAlgo::fill_simCluster_histos( + const Histograms& histograms, std::vector const& simClusters, unsigned int layers) const { + //To keep track of total num of simClusters per layer + //tnscpl[layerid] + std::vector tnscpl(1000, 0); //tnscpl.clear(); tnscpl.reserve(1000); + + //loop through simClusters + for (const auto& sc : simClusters) { + //To keep track if we added the simCluster in a specific layer + std::vector occurenceSCinlayer(1000, 0); //[layerid][0 if not added] + + //loop through hits of the simCluster + for (const auto& hAndF : sc.hits_and_fractions()) { + const DetId sh_detid = hAndF.first; + + if (recHitTools_->isBarrel(sh_detid)) { + //The layer the cluster belongs to. As mentioned in the mapping above, it takes into account -z and +z. + int layerid = recHitTools_->getLayerWithOffset(sh_detid); + //zside that the current cluster belongs to. + if (occurenceSCinlayer[layerid] == 0) { + tnscpl[layerid]++; + } + occurenceSCinlayer[layerid]++; + } + } //end of loop through hits + } //end of loop through SimClusters of the event + + //Per layer : Loop 0->99 + for (unsigned ilayer = 0; ilayer < layers; ++ilayer) { + if (histograms.h_simclusternum_perlayer.count(ilayer)) + histograms.h_simclusternum_perlayer.at(ilayer)->Fill(tnscpl[ilayer]); + } +} + +void BarrelVHistoProducerAlgo::BarrelVHistoProducerAlgo::fill_simClusterAssociation_histos( + const Histograms& histograms, + const int count, + edm::Handle clusterHandle, + const reco::CaloClusterCollection& clusters, + edm::Handle> simClusterHandle, + std::vector const& simClusters, + std::vector const& sCIndices, + const std::vector& mask, + std::unordered_map const& barrelHitMap, + unsigned int layers, + const ticl::RecoToSimCollectionWithSimClusters& scsInLayerClusterMap, + const ticl::SimToRecoCollectionWithSimClusters& lcsInSimClusterMap, + MultiVectorManager const& barrelHits) const { + //Each event to be treated as two events: an event in +ve endcap, + //plus another event in -ve endcap. In this spirit there will be + //a layer variable (layerid) that maps the layers in : + //-z: 0->49 + //+z: 50->99 + + //Will add some general plots on the specific mask in the future. + + layerClusters_to_SimClusters(histograms, + count, + clusterHandle, + clusters, + simClusterHandle, + simClusters, + sCIndices, + mask, + barrelHitMap, + layers, + scsInLayerClusterMap, + lcsInSimClusterMap, + barrelHits); +} + +void BarrelVHistoProducerAlgo::fill_cluster_histos(const Histograms& histograms, + const int count, + const reco::CaloCluster& cluster) const { + if (!recHitTools_->isBarrel(cluster.seed())) + return; + const auto eta = getEta(cluster.eta()); + histograms.h_cluster_eta[count]->Fill(eta); +} + +void BarrelVHistoProducerAlgo::layerClusters_to_CaloParticles( + const Histograms& histograms, + edm::Handle clusterHandle, + const reco::CaloClusterCollection& clusters, + edm::Handle> caloParticleHandle, + std::vector const& cP, + std::vector const& cPIndices, + std::vector const& cPSelectedIndices, + std::unordered_map const& barrelHitMap, + unsigned int layers, + const ticl::RecoToSimCollection& cpsInLayerClusterMap, + const ticl::SimToRecoCollection& cPOnLayerMap, + MultiVectorManager const& barrelHits) const { + const auto nLayerClusters = clusters.size(); + + std::unordered_map> detIdToCaloParticleId_Map; + std::unordered_map> detIdToLayerClusterId_Map; + + // The association has to be done in an all-vs-all fashion. + // For this reason use the full set of CaloParticles, with the only filter on bx + for (const auto& cpId : cPIndices) { + for (const auto& simCluster : cP[cpId].simClusters()) { + for (const auto& it_haf : simCluster->hits_and_fractions()) { + const DetId hitid = (it_haf.first); + if (barrelHitMap.find(hitid) != barrelHitMap.end()) { + if (detIdToCaloParticleId_Map.find(hitid) == detIdToCaloParticleId_Map.end()) { + detIdToCaloParticleId_Map[hitid] = std::vector(); + detIdToCaloParticleId_Map[hitid].emplace_back( + BarrelVHistoProducerAlgo::detIdInfoInCluster{cpId, it_haf.second}); + } else { + auto findHitIt = + std::find(detIdToCaloParticleId_Map[hitid].begin(), + detIdToCaloParticleId_Map[hitid].end(), + BarrelVHistoProducerAlgo::detIdInfoInCluster{ + cpId, 0.f}); // only the first element is used for the matching (overloaded operator==) + if (findHitIt != detIdToCaloParticleId_Map[hitid].end()) + findHitIt->fraction += it_haf.second; + else + detIdToCaloParticleId_Map[hitid].emplace_back( + BarrelVHistoProducerAlgo::detIdInfoInCluster{cpId, it_haf.second}); + } + } + } + } + } + + for (unsigned int lcId = 0; lcId < nLayerClusters; ++lcId) { + const auto& hits_and_fractions = clusters[lcId].hitsAndFractions(); + const auto numberOfHitsInLC = hits_and_fractions.size(); + + // This vector will store, for each hit in the Layercluster, the index of + // the CaloParticle that contributed the most, in terms of energy, to it. + // Special values are: + // + // -2 --> the reconstruction fraction of the RecHit is 0 (used in the past to monitor Halo Hits) + // -3 --> same as before with the added condition that no CaloParticle has been linked to this RecHit + // -1 --> the reco fraction is >0, but no CaloParticle has been linked to it + // >=0 --> index of the linked CaloParticle + std::vector hitsToCaloParticleId(numberOfHitsInLC); + const auto firstHitDetId = hits_and_fractions[0].first; + int lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId); + bool isBarrel = recHitTools_->isBarrel(firstHitDetId); + if (!isBarrel) + continue; + // This will store the fraction of the CaloParticle energy shared with the LayerCluster: e_shared/cp_energy + std::unordered_map CPEnergyInLC; + + for (unsigned int iHit = 0; iHit < numberOfHitsInLC; iHit++) { + const DetId rh_detid = hits_and_fractions[iHit].first; + const auto rhFraction = hits_and_fractions[iHit].second; + + float hit_energy; + if (!isBarrel) { + continue; + } else { + std::unordered_map::const_iterator itcheck = barrelHitMap.find(rh_detid); + const reco::PFRecHit* hit = &(barrelHits[itcheck->second]); + hit_energy = hit->energy(); + } + if (detIdToLayerClusterId_Map.find(rh_detid) == detIdToLayerClusterId_Map.end()) { + detIdToLayerClusterId_Map[rh_detid] = std::vector(); + } + detIdToLayerClusterId_Map[rh_detid].emplace_back(BarrelVHistoProducerAlgo::detIdInfoInCluster{lcId, rhFraction}); + + const auto& hit_find_in_CP = detIdToCaloParticleId_Map.find(rh_detid); + + // if the fraction is zero or the hit does not belong to any calo + // particle, set the caloparticleId for the hit to -1 this will + // contribute to the number of noise hits + + // MR Remove the case in which the fraction is 0, since this could be a + // real hit that has been marked as halo. + if (rhFraction == 0.) { + hitsToCaloParticleId[iHit] = -2; + } + if (hit_find_in_CP == detIdToCaloParticleId_Map.end()) { + hitsToCaloParticleId[iHit] -= 1; + } else { + auto maxCPEnergyInLC = 0.f; + auto maxCPId = -1; + for (auto& h : hit_find_in_CP->second) { + const auto iCP = h.clusterId; + CPEnergyInLC[iCP] += h.fraction * hit_energy; + // Keep track of which CaloParticle contributed the most, in terms + // of energy, to this specific LayerCluster. + if (CPEnergyInLC[iCP] > maxCPEnergyInLC) { + maxCPEnergyInLC = CPEnergyInLC[iCP]; + maxCPId = iCP; + } + } + hitsToCaloParticleId[iHit] = maxCPId; + } + histograms.h_cellAssociation_perlayer.at(lcLayerId)->Fill( + hitsToCaloParticleId[iHit] > 0. ? 0. : hitsToCaloParticleId[iHit]); + } // End loop over hits on a LayerCluster + + } // End of loop over LayerClusters + + // Fill the plots to compute the different metrics linked to + // reco-level, namely fake-rate an merge-rate. In this loop should *not* + // restrict only to the selected caloParticles. + for (unsigned int lcId = 0; lcId < nLayerClusters; ++lcId) { + const auto firstHitDetId = (clusters[lcId].hitsAndFractions())[0].first; + bool isBarrel = recHitTools_->isBarrel(firstHitDetId); + int lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId); + if (!isBarrel) + continue; + histograms.h_denom_layercl_eta_perlayer.at(lcLayerId)->Fill(clusters[lcId].eta()); + histograms.h_denom_layercl_phi_perlayer.at(lcLayerId)->Fill(clusters[lcId].phi()); + // + const edm::Ref lcRef(clusterHandle, lcId); + const auto& cpsIt = cpsInLayerClusterMap.find(lcRef); + if (cpsIt == cpsInLayerClusterMap.end()) + continue; + + const auto lc_en = clusters[lcId].energy(); + const auto& cps = cpsIt->val; + if (lc_en == 0. && !cps.empty()) { + for (const auto& cpPair : cps) + histograms.h_score_layercl2caloparticle_perlayer.at(lcLayerId)->Fill(cpPair.second); + continue; + } + for (const auto& cpPair : cps) { + LogDebug("BarrelValidator") << "layerCluster Id: \t" << lcId << "\t CP id: \t" << cpPair.first.index() + << "\t score \t" << cpPair.second << std::endl; + histograms.h_score_layercl2caloparticle_perlayer.at(lcLayerId)->Fill(cpPair.second); + auto const& cp_linked = + std::find_if(std::begin(cPOnLayerMap[cpPair.first]), + std::end(cPOnLayerMap[cpPair.first]), + [&lcRef](const std::pair, std::pair>& p) { + return p.first == lcRef; + }); + if (cp_linked == + cPOnLayerMap[cpPair.first].end()) // This should never happen by construction of the association maps + continue; + histograms.h_sharedenergy_layercl2caloparticle_perlayer.at(lcLayerId)->Fill(cp_linked->second.first / lc_en, + lc_en); + histograms.h_energy_vs_score_layercl2caloparticle_perlayer.at(lcLayerId)->Fill(cpPair.second, + cp_linked->second.first / lc_en); + } + const auto assoc = + std::count_if(std::begin(cps), std::end(cps), [](const auto& obj) { return obj.second < ScoreCutLCtoCP_; }); + if (assoc) { + histograms.h_num_layercl_eta_perlayer.at(lcLayerId)->Fill(clusters[lcId].eta()); + histograms.h_num_layercl_phi_perlayer.at(lcLayerId)->Fill(clusters[lcId].phi()); + if (assoc > 1) { + histograms.h_numMerge_layercl_eta_perlayer.at(lcLayerId)->Fill(clusters[lcId].eta()); + histograms.h_numMerge_layercl_phi_perlayer.at(lcLayerId)->Fill(clusters[lcId].phi()); + } + const auto& best = std::min_element( + std::begin(cps), std::end(cps), [](const auto& obj1, const auto& obj2) { return obj1.second < obj2.second; }); + const auto& best_cp_linked = + std::find_if(std::begin(cPOnLayerMap[best->first]), + std::end(cPOnLayerMap[best->first]), + [&lcRef](const std::pair, std::pair>& p) { + return p.first == lcRef; + }); + if (best_cp_linked == + cPOnLayerMap[best->first].end()) // This should never happen by construction of the association maps + continue; + histograms.h_sharedenergy_layercl2caloparticle_vs_eta_perlayer.at(lcLayerId)->Fill( + clusters[lcId].eta(), best_cp_linked->second.first / lc_en); + histograms.h_sharedenergy_layercl2caloparticle_vs_phi_perlayer.at(lcLayerId)->Fill( + clusters[lcId].phi(), best_cp_linked->second.first / lc_en); + } + } // End of loop over LayerClusters + + // Here Fill the plots to compute the different metrics linked to + // gen-level, namely efficiency and duplicate. In this loop should restrict + // only to the selected caloParaticles. + for (const auto& cpId : cPSelectedIndices) { + const edm::Ref cpRef(caloParticleHandle, cpId); + const auto& lcsIt = cPOnLayerMap.find(cpRef); + + std::map cPEnergyOnLayer; + for (unsigned int layerId = 0; layerId < layers; ++layerId) + cPEnergyOnLayer[layerId] = 0; + + for (const auto& simCluster : cP[cpId].simClusters()) { + for (const auto& it_haf : simCluster->hits_and_fractions()) { + const DetId hitid = (it_haf.first); + bool isBarrel = recHitTools_->isBarrel(hitid); + auto hitLayerId = recHitTools_->getLayerWithOffset(hitid); + if (!isBarrel) { + continue; + } else { + std::unordered_map::const_iterator itcheck = barrelHitMap.find(hitid); + if (itcheck != barrelHitMap.end()) { + const reco::PFRecHit* hit = &(barrelHits[itcheck->second]); + cPEnergyOnLayer[hitLayerId] += it_haf.second * hit->energy(); + } + } + } + } + + for (unsigned int layerId = 0; layerId < layers; ++layerId) { + if (!cPEnergyOnLayer[layerId]) + continue; + + histograms.h_denom_caloparticle_eta_perlayer.at(layerId)->Fill(cP[cpId].g4Tracks()[0].momentum().eta()); + histograms.h_denom_caloparticle_phi_perlayer.at(layerId)->Fill(cP[cpId].g4Tracks()[0].momentum().phi()); + + if (lcsIt == cPOnLayerMap.end()) + continue; + const auto& lcs = lcsIt->val; + + auto getLCLayerId = [&](const unsigned int lcId) { + const auto firstHitDetId = (clusters[lcId].hitsAndFractions())[0].first; + bool isBarrel = recHitTools_->isBarrel(firstHitDetId); + if (!isBarrel) + return 9999u; + auto lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId); + return lcLayerId; + }; + + for (const auto& lcPair : lcs) { + if (getLCLayerId(lcPair.first.index()) != layerId) + continue; + histograms.h_score_caloparticle2layercl_perlayer.at(layerId)->Fill(lcPair.second.second); + histograms.h_sharedenergy_caloparticle2layercl_perlayer.at(layerId)->Fill( + lcPair.second.first / cPEnergyOnLayer[layerId], cPEnergyOnLayer[layerId]); + histograms.h_energy_vs_score_caloparticle2layercl_perlayer.at(layerId)->Fill( + lcPair.second.second, lcPair.second.first / cPEnergyOnLayer[layerId]); + } + const auto assoc = std::count_if(std::begin(lcs), std::end(lcs), [&](const auto& obj) { + if (getLCLayerId(obj.first.index()) != layerId) + return false; + else + return obj.second.second < ScoreCutCPtoLC_; + }); + if (assoc) { + histograms.h_num_caloparticle_eta_perlayer.at(layerId)->Fill(cP[cpId].g4Tracks()[0].momentum().eta()); + histograms.h_num_caloparticle_phi_perlayer.at(layerId)->Fill(cP[cpId].g4Tracks()[0].momentum().phi()); + if (assoc > 1) { + histograms.h_numDup_caloparticle_eta_perlayer.at(layerId)->Fill(cP[cpId].g4Tracks()[0].momentum().eta()); + histograms.h_numDup_caloparticle_phi_perlayer.at(layerId)->Fill(cP[cpId].g4Tracks()[0].momentum().phi()); + } + const auto best = std::min_element(std::begin(lcs), std::end(lcs), [&](const auto& obj1, const auto& obj2) { + if (getLCLayerId(obj1.first.index()) != layerId) + return false; + else if (getLCLayerId(obj2.first.index()) == layerId) + return obj1.second.second < obj2.second.second; + else + return true; + }); + histograms.h_sharedenergy_caloparticle2layercl_vs_eta_perlayer.at(layerId)->Fill( + cP[cpId].g4Tracks()[0].momentum().eta(), best->second.first / cPEnergyOnLayer[layerId]); + histograms.h_sharedenergy_caloparticle2layercl_vs_phi_perlayer.at(layerId)->Fill( + cP[cpId].g4Tracks()[0].momentum().phi(), best->second.first / cPEnergyOnLayer[layerId]); + } + } + } +} + +void BarrelVHistoProducerAlgo::layerClusters_to_SimClusters( + const Histograms& histograms, + const int count, + edm::Handle clusterHandle, + const reco::CaloClusterCollection& clusters, + edm::Handle> simClusterHandle, + std::vector const& sC, + std::vector const& sCIndices, + const std::vector& mask, + std::unordered_map const& barrelHitMap, + unsigned int layers, + const ticl::RecoToSimCollectionWithSimClusters& scsInLayerClusterMap, + const ticl::SimToRecoCollectionWithSimClusters& lcsInSimClusterMap, + MultiVectorManager const& barrelHits) const { + // Here fill the plots to compute the different metrics linked to + // reco-level, namely fake-rate and merge-rate. In this loop should *not* + // restrict only to the selected SimClusters. + for (unsigned int lcId = 0; lcId < clusters.size(); ++lcId) { + if (mask[lcId] != 0.) { + LogDebug("BarrelValidator") << "Skipping layer cluster " << lcId << " not belonging to mask" << std::endl; + continue; + } + const auto firstHitDetId = (clusters[lcId].hitsAndFractions())[0].first; + bool isBarrel = recHitTools_->isBarrel(firstHitDetId); + auto lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId); + if (!isBarrel) + continue; + //Although the ones below are already created in the LC to CP association, will + //recreate them here since in the post processor it looks in a specific directory. + histograms.h_denom_layercl_in_simcl_eta_perlayer[count].at(lcLayerId)->Fill(clusters[lcId].eta()); + histograms.h_denom_layercl_in_simcl_phi_perlayer[count].at(lcLayerId)->Fill(clusters[lcId].phi()); + // + const edm::Ref lcRef(clusterHandle, lcId); + const auto& scsIt = scsInLayerClusterMap.find(lcRef); + if (scsIt == scsInLayerClusterMap.end()) + continue; + + const auto lc_en = clusters[lcId].energy(); + const auto& scs = scsIt->val; + // If a reconstructed LayerCluster has energy 0 but is linked to at least a + // SimCluster, then his score should be 1 as set in the associator + if (lc_en == 0. && !scs.empty()) { + for (const auto& scPair : scs) { + histograms.h_score_layercl2simcluster_perlayer[count].at(lcLayerId)->Fill(scPair.second); + } + continue; + } + //Loop through all SimClusters linked to the layer cluster under study + for (const auto& scPair : scs) { + LogDebug("BarrelValidator") << "layerCluster Id: \t" << lcId << "\t SC id: \t" << scPair.first.index() + << "\t score \t" << scPair.second << std::endl; + //This should be filled #layerClusters in layer x #linked SimClusters + histograms.h_score_layercl2simcluster_perlayer[count].at(lcLayerId)->Fill(scPair.second); + auto const& sc_linked = + std::find_if(std::begin(lcsInSimClusterMap[scPair.first]), + std::end(lcsInSimClusterMap[scPair.first]), + [&lcRef](const std::pair, std::pair>& p) { + return p.first == lcRef; + }); + if (sc_linked == + lcsInSimClusterMap[scPair.first].end()) // This should never happen by construction of the association maps + continue; + histograms.h_sharedenergy_layercl2simcluster_perlayer[count].at(lcLayerId)->Fill(sc_linked->second.first / lc_en, + lc_en); + histograms.h_energy_vs_score_layercl2simcluster_perlayer[count].at(lcLayerId)->Fill( + scPair.second, sc_linked->second.first / lc_en); + } + //Here he counts how many of the linked SimClusters of the layer cluster under study have a score above a certain value. + const auto assoc = + std::count_if(std::begin(scs), std::end(scs), [](const auto& obj) { return obj.second < ScoreCutLCtoSC_; }); + if (assoc) { + histograms.h_num_layercl_in_simcl_eta_perlayer[count].at(lcLayerId)->Fill(clusters[lcId].eta()); + histograms.h_num_layercl_in_simcl_phi_perlayer[count].at(lcLayerId)->Fill(clusters[lcId].phi()); + if (assoc > 1) { + histograms.h_numMerge_layercl_in_simcl_eta_perlayer[count].at(lcLayerId)->Fill(clusters[lcId].eta()); + histograms.h_numMerge_layercl_in_simcl_phi_perlayer[count].at(lcLayerId)->Fill(clusters[lcId].phi()); + } + const auto& best = std::min_element( + std::begin(scs), std::end(scs), [](const auto& obj1, const auto& obj2) { return obj1.second < obj2.second; }); + //From all SimClusters he founds the one with the best (lowest) score and takes his scId + const auto& best_sc_linked = + std::find_if(std::begin(lcsInSimClusterMap[best->first]), + std::end(lcsInSimClusterMap[best->first]), + [&lcRef](const std::pair, std::pair>& p) { + return p.first == lcRef; + }); + if (best_sc_linked == + lcsInSimClusterMap[best->first].end()) // This should never happen by construction of the association maps + continue; + histograms.h_sharedenergy_layercl2simcluster_vs_eta_perlayer[count].at(lcLayerId)->Fill( + clusters[lcId].eta(), best_sc_linked->second.first / lc_en); + histograms.h_sharedenergy_layercl2simcluster_vs_phi_perlayer[count].at(lcLayerId)->Fill( + clusters[lcId].phi(), best_sc_linked->second.first / lc_en); + } + } // End of loop over LayerClusters + + // Fill the plots to compute the different metrics linked to + // gen-level, namely efficiency and duplicate. In this loop should restrict + // only to the selected SimClusters. + for (const auto& scId : sCIndices) { + const edm::Ref scRef(simClusterHandle, scId); + const auto& lcsIt = lcsInSimClusterMap.find(scRef); + + std::map sCEnergyOnLayer; + for (unsigned int layerId = 0; layerId < layers * 2; ++layerId) + sCEnergyOnLayer[layerId] = 0; + + for (const auto& it_haf : sC[scId].hits_and_fractions()) { + const DetId hitid = (it_haf.first); + bool isBarrel = recHitTools_->isBarrel(hitid); + auto scLayerId = recHitTools_->getLayerWithOffset(hitid); + if (!isBarrel) { + continue; + } else { + std::unordered_map::const_iterator itcheck = barrelHitMap.find(hitid); + if (itcheck != barrelHitMap.end()) { + const reco::PFRecHit* hit = &(barrelHits[itcheck->second]); + sCEnergyOnLayer[scLayerId] += it_haf.second * hit->energy(); + } + } + } + + for (unsigned int layerId = 0; layerId < layers * 2; ++layerId) { + if (!sCEnergyOnLayer[layerId]) + continue; + + histograms.h_denom_simcluster_eta_perlayer[count].at(layerId)->Fill(sC[scId].eta()); + histograms.h_denom_simcluster_phi_perlayer[count].at(layerId)->Fill(sC[scId].phi()); + + if (lcsIt == lcsInSimClusterMap.end()) + continue; + const auto& lcs = lcsIt->val; + + auto getLCLayerId = [&](const unsigned int lcId) { + const auto firstHitDetId = (clusters[lcId].hitsAndFractions())[0].first; + bool isBarrel = recHitTools_->isBarrel(firstHitDetId); + if (!isBarrel) + return 9999u; + unsigned int lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId); + return lcLayerId; + }; + + //Loop through layer clusters linked to the SimCluster under study + for (const auto& lcPair : lcs) { + auto lcId = lcPair.first.index(); + if (mask[lcId] != 0.) { + LogDebug("BarrelValidator") << "Skipping layer cluster " << lcId << " not belonging to mask" << std::endl; + continue; + } + + if (getLCLayerId(lcId) != layerId) + continue; + histograms.h_score_simcluster2layercl_perlayer[count].at(layerId)->Fill(lcPair.second.second); + histograms.h_sharedenergy_simcluster2layercl_perlayer[count].at(layerId)->Fill( + lcPair.second.first / sCEnergyOnLayer[layerId], sCEnergyOnLayer[layerId]); + histograms.h_energy_vs_score_simcluster2layercl_perlayer[count].at(layerId)->Fill( + lcPair.second.second, lcPair.second.first / sCEnergyOnLayer[layerId]); + } + const auto assoc = std::count_if(std::begin(lcs), std::end(lcs), [&](const auto& obj) { + if (getLCLayerId(obj.first.index()) != layerId) + return false; + else + return obj.second.second < ScoreCutSCtoLC_; + }); + if (assoc) { + histograms.h_num_simcluster_eta_perlayer[count].at(layerId)->Fill(sC[scId].eta()); + histograms.h_num_simcluster_phi_perlayer[count].at(layerId)->Fill(sC[scId].phi()); + if (assoc > 1) { + histograms.h_numDup_simcluster_eta_perlayer[count].at(layerId)->Fill(sC[scId].eta()); + histograms.h_numDup_simcluster_phi_perlayer[count].at(layerId)->Fill(sC[scId].phi()); + } + const auto best = std::min_element(std::begin(lcs), std::end(lcs), [&](const auto& obj1, const auto& obj2) { + if (getLCLayerId(obj1.first.index()) != layerId) + return false; + else if (getLCLayerId(obj2.first.index()) == layerId) + return obj1.second.second < obj2.second.second; + else + return true; + }); + histograms.h_sharedenergy_simcluster2layercl_vs_eta_perlayer[count].at(layerId)->Fill( + sC[scId].eta(), best->second.first / sCEnergyOnLayer[layerId]); + histograms.h_sharedenergy_simcluster2layercl_vs_phi_perlayer[count].at(layerId)->Fill( + sC[scId].phi(), best->second.first / sCEnergyOnLayer[layerId]); + } + } + } +} + +void BarrelVHistoProducerAlgo::fill_generic_cluster_histos( + const Histograms& histograms, + const int count, + edm::Handle clusterHandle, + const reco::CaloClusterCollection& clusters, + edm::Handle> caloParticleHandle, + std::vector const& cP, + std::vector const& cPIndices, + std::vector const& cPSelectedIndices, + std::unordered_map const& barrelHitMap, + unsigned int layers, + const ticl::RecoToSimCollection& cpsInLayerClusterMap, + const ticl::SimToRecoCollection& cPOnLayerMap, + MultiVectorManager const& barrelHits) const { + //To keep track of total num of layer clusters per layer + //tnlcpl[layerid] + std::vector tnlcpl(1000, 0); //tnlcpl.clear(); tnlcpl.reserve(1000); + + layerClusters_to_CaloParticles(histograms, + clusterHandle, + clusters, + caloParticleHandle, + cP, + cPIndices, + cPSelectedIndices, + barrelHitMap, + layers, + cpsInLayerClusterMap, + cPOnLayerMap, + barrelHits); + + std::vector tecpl(1000, 0.0); //tecpl.clear(); tecpl.reserve(1000); + + // loop through clusters of the event + for (const auto& lcId : clusters) { + const auto seedid = lcId.seed(); + if (!recHitTools_->isBarrel(seedid)) { + continue; + } + const float lc_en = lcId.energy(); + int layerid = recHitTools_->getLayerWithOffset(seedid); + //Energy clustered per layer + tecpl[layerid] = tecpl[layerid] + lc_en; + tnlcpl[layerid] = tnlcpl[layerid] + 1; + + } //end of loop through clusters of the event + + for (unsigned ilayer = 0; ilayer < layers; ++ilayer) { + if (histograms.h_clusternum_perlayer.count(ilayer)) { + histograms.h_clusternum_perlayer.at(ilayer)->Fill(tnlcpl[ilayer]); + histograms.h_energyclustered_perlayer.at(ilayer)->Fill(tecpl[ilayer]); + } + } //end of loop over layers +} + +double BarrelVHistoProducerAlgo::distance2(const double x1, + const double y1, + const double x2, + const double y2) const { //distance squared + const double dx = x1 - x2; + const double dy = y1 - y2; + return (dx * dx + dy * dy); +} //distance squaredq +double BarrelVHistoProducerAlgo::distance(const double x1, + const double y1, + const double x2, + const double y2) const { //2-d distance on the layer (x-y) + return std::sqrt(distance2(x1, y1, x2, y2)); +} + +void BarrelVHistoProducerAlgo::setRecHitTools(std::shared_ptr recHitTools) { + recHitTools_ = recHitTools; +} + +DetId BarrelVHistoProducerAlgo::findmaxhit(const reco::CaloCluster& cluster, + std::unordered_map const& hitMap, + MultiVectorManager const& hits) const { + const auto& hits_and_fractions = cluster.hitsAndFractions(); + + DetId themaxid; + double maxene = 0.; + for (std::vector>::const_iterator it_haf = hits_and_fractions.begin(); + it_haf != hits_and_fractions.end(); + ++it_haf) { + const DetId rh_detid = it_haf->first; + if (!recHitTools_->isBarrel(rh_detid)) + continue; + const auto hitEn = (hits[hitMap.find(rh_detid)->second]).energy(); + if (maxene < hitEn) { + maxene = hitEn; + themaxid = rh_detid; + } + } + + return themaxid; +} + +double BarrelVHistoProducerAlgo::getEta(double eta) const { + if (useFabsEta_) + return fabs(eta); + else + return eta; +} diff --git a/Validation/HGCalValidation/src/HGVHistoProducerAlgo.cc b/Validation/HGCalValidation/src/HGVHistoProducerAlgo.cc index 677cd9942ae76..0a40557bca318 100644 --- a/Validation/HGCalValidation/src/HGVHistoProducerAlgo.cc +++ b/Validation/HGCalValidation/src/HGVHistoProducerAlgo.cc @@ -1492,9 +1492,11 @@ void HGVHistoProducerAlgo::fill_caloparticle_histos(const Histograms& histograms for (const auto& sc : caloParticle.simClusters()) { LogDebug("HGCalValidator") << " This sim cluster has " << sc->hits_and_fractions().size() << " simHits and " << sc->energy() << " energy. " << std::endl; - simHits += sc->hits_and_fractions().size(); - for (auto const& h_and_f : sc->hits_and_fractions()) { + simHits += sc->endcap_hits_and_fractions().size(); + for (auto const& h_and_f : sc->endcap_hits_and_fractions()) { const auto hitDetId = h_and_f.first; + if (recHitTools_->isBarrel(hitDetId)) + continue; const int layerId = recHitTools_->getLayerWithOffset(hitDetId) + layers * ((recHitTools_->zside(hitDetId) + 1) >> 1) - 1; // set to 0 if matched RecHit not found @@ -1544,6 +1546,8 @@ void HGVHistoProducerAlgo::fill_caloparticle_histos(const Histograms& histograms if (hitEnergyWeight_invSum) hitEnergyWeight_invSum = 1 / hitEnergyWeight_invSum; + if (minLayerId == 999) + return; histograms.h_caloparticle_firstlayer.at(pdgid)->Fill(minLayerId); histograms.h_caloparticle_lastlayer.at(pdgid)->Fill(maxLayerId); histograms.h_caloparticle_layersnum.at(pdgid)->Fill(int(maxLayerId - minLayerId)); @@ -1769,6 +1773,8 @@ void HGVHistoProducerAlgo::layerClusters_to_CaloParticles(const Histograms& hist for (const auto& simCluster : cP[cpId].simClusters()) { for (const auto& it_haf : simCluster->hits_and_fractions()) { const DetId hitid = (it_haf.first); + if (recHitTools_->isBarrel(hitid)) + continue; if (hitMap.find(hitid) != hitMap.end()) { if (detIdToCaloParticleId_Map.find(hitid) == detIdToCaloParticleId_Map.end()) { detIdToCaloParticleId_Map[hitid] = std::vector(); @@ -1805,6 +1811,8 @@ void HGVHistoProducerAlgo::layerClusters_to_CaloParticles(const Histograms& hist // >=0 --> index of the linked CaloParticle std::vector hitsToCaloParticleId(numberOfHitsInLC); const auto firstHitDetId = hits_and_fractions[0].first; + if (recHitTools_->isBarrel(firstHitDetId)) + continue; int lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId) + layers * ((recHitTools_->zside(firstHitDetId) + 1) >> 1) - 1; @@ -1862,6 +1870,8 @@ void HGVHistoProducerAlgo::layerClusters_to_CaloParticles(const Histograms& hist // restrict only to the selected caloParaticles. for (unsigned int lcId = 0; lcId < nLayerClusters; ++lcId) { const auto firstHitDetId = (clusters[lcId].hitsAndFractions())[0].first; + if (recHitTools_->isBarrel(firstHitDetId)) + continue; const int lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId) + layers * ((recHitTools_->zside(firstHitDetId) + 1) >> 1) - 1; histograms.h_denom_layercl_eta_perlayer.at(lcLayerId)->Fill(clusters[lcId].eta()); @@ -1938,6 +1948,8 @@ void HGVHistoProducerAlgo::layerClusters_to_CaloParticles(const Histograms& hist for (const auto& simCluster : cP[cpId].simClusters()) { for (const auto& it_haf : simCluster->hits_and_fractions()) { const DetId hitid = (it_haf.first); + if (recHitTools_->isBarrel(hitid)) + continue; const auto hitLayerId = recHitTools_->getLayerWithOffset(hitid) + layers * ((recHitTools_->zside(hitid) + 1) >> 1) - 1; std::unordered_map::const_iterator itcheck = hitMap.find(hitid); @@ -1961,12 +1973,16 @@ void HGVHistoProducerAlgo::layerClusters_to_CaloParticles(const Histograms& hist auto getLCLayerId = [&](const unsigned int lcId) { const auto firstHitDetId = (clusters[lcId].hitsAndFractions())[0].first; + if (recHitTools_->isBarrel(firstHitDetId)) + return 9999u; const auto lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId) + layers * ((recHitTools_->zside(firstHitDetId) + 1) >> 1) - 1; return lcLayerId; }; for (const auto& lcPair : lcs) { + if (recHitTools_->isBarrel(clusters[lcPair.first.index()].seed())) + continue; if (getLCLayerId(lcPair.first.index()) != layerId) continue; histograms.h_score_caloparticle2layercl_perlayer.at(layerId)->Fill(lcPair.second.second); @@ -2028,6 +2044,8 @@ void HGVHistoProducerAlgo::layerClusters_to_SimClusters( continue; } const auto firstHitDetId = (clusters[lcId].hitsAndFractions())[0].first; + if (recHitTools_->isBarrel(firstHitDetId)) + continue; const auto lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId) + layers * ((recHitTools_->zside(firstHitDetId) + 1) >> 1) - 1; //Although the ones below are already created in the LC to CP association, will @@ -2112,6 +2130,8 @@ void HGVHistoProducerAlgo::layerClusters_to_SimClusters( for (const auto& it_haf : sC[scId].hits_and_fractions()) { const DetId hitid = (it_haf.first); + if (recHitTools_->isBarrel(hitid)) + continue; const auto scLayerId = recHitTools_->getLayerWithOffset(hitid) + layers * ((recHitTools_->zside(hitid) + 1) >> 1) - 1; std::unordered_map::const_iterator itcheck = hitMap.find(hitid); @@ -2134,6 +2154,8 @@ void HGVHistoProducerAlgo::layerClusters_to_SimClusters( auto getLCLayerId = [&](const unsigned int lcId) { const auto firstHitDetId = (clusters[lcId].hitsAndFractions())[0].first; + if (recHitTools_->isBarrel(firstHitDetId)) + return 9999u; const unsigned int lcLayerId = recHitTools_->getLayerWithOffset(firstHitDetId) + layers * ((recHitTools_->zside(firstHitDetId) + 1) >> 1) - 1; return lcLayerId; @@ -2257,6 +2279,8 @@ void HGVHistoProducerAlgo::fill_generic_cluster_histos(const Histograms& histogr // loop through clusters of the event for (const auto& lcId : clusters) { const auto seedid = lcId.seed(); + if (recHitTools_->isBarrel(seedid)) + continue; const double seedx = recHitTools_->getPosition(seedid).x(); const double seedy = recHitTools_->getPosition(seedid).y(); DetId maxid = findmaxhit(lcId, hitMap, hits); @@ -2751,11 +2775,14 @@ void HGVHistoProducerAlgo::fill_trackster_histos( for (const auto lcId : tst.vertices()) { //take the hits and their fraction of the specific layer cluster. const auto& hits_and_fractions = layerClusters[lcId].hitsAndFractions(); - + if (recHitTools_->isBarrel(hits_and_fractions[0].first)) + continue; //For the multiplicity of the 2d layer clusters in Tracksters multiplicity[tstId].emplace_back(hits_and_fractions.size()); const auto firstHitDetId = hits_and_fractions[0].first; + if (recHitTools_->isBarrel(firstHitDetId)) + continue; //The layer that the layer cluster belongs to const auto layerid = recHitTools_->getLayerWithOffset(firstHitDetId) + layers * ((recHitTools_->zside(firstHitDetId) + 1) >> 1) - 1; @@ -2941,6 +2968,8 @@ DetId HGVHistoProducerAlgo::findmaxhit(const reco::CaloCluster& cluster, it_haf != hits_and_fractions.end(); ++it_haf) { const DetId rh_detid = it_haf->first; + if (recHitTools_->isBarrel(rh_detid)) + continue; const auto hitEn = (hits[hitMap.find(rh_detid)->second]).energy(); if (maxene < hitEn) { maxene = hitEn; From 1d12a41bf140e1cecc83b6b631e599236ffc2cfb Mon Sep 17 00:00:00 2001 From: brusale Date: Mon, 24 Mar 2025 23:10:51 +0100 Subject: [PATCH 2/9] change doHGCAL flag in fillSimHits Modify doHGCAL flag. Now the check is made on the collection of SimHits. This is a solution to a problem for which CaloParticles were not built in HCAL when the doHGCAL flag was set to true. --- SimGeneral/CaloAnalysis/plugins/CaloTruthAccumulator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SimGeneral/CaloAnalysis/plugins/CaloTruthAccumulator.cc b/SimGeneral/CaloAnalysis/plugins/CaloTruthAccumulator.cc index 10774ce45a1bd..5fc2b7544b64a 100644 --- a/SimGeneral/CaloAnalysis/plugins/CaloTruthAccumulator.cc +++ b/SimGeneral/CaloAnalysis/plugins/CaloTruthAccumulator.cc @@ -558,13 +558,14 @@ void CaloTruthAccumulator::fillSimHits(std::vector> hSimHits; const bool isHcal = (collectionTag.instance().find("HcalHits") != std::string::npos); + const bool isHGCal = (collectionTag.instance().find("HGCHits") != std::string::npos); event.getByLabel(collectionTag, hSimHits); for (auto const &simHit : *hSimHits) { DetId id(0); //Relabel as necessary for HGCAL - if (doHGCAL) { + if (isHGCal) { const uint32_t simId = simHit.id(); if (geometryType_ == 1) { // no test numbering in new geometry From e1525faf35f3a52c9809663a0f339665e32dca9d Mon Sep 17 00:00:00 2001 From: brusale Date: Thu, 27 Mar 2025 11:54:01 +0100 Subject: [PATCH 3/9] add ticl_barrel procModifier and workflows --- .../python/CloseByPGun_Barrel_Front_cfi.py | 14 +++++++ .../python/ticl_barrel_cff.py | 3 ++ .../python/upgradeWorkflowComponents.py | 32 +++++++++++++++ .../hltHgcalMergeLayerClustersL1Seeded_cfi.py | 18 ++++----- .../modules/hltHgcalMergeLayerClusters_cfi.py | 21 ---------- .../modules/hltMergeLayerClusters_cfi.py | 17 ++++++++ ...bleEle25CaloIdLPMS2UnseededSequence_cfi.py | 2 - ...ClusteringForEgammaL1SeededSequence_cfi.py | 19 ++++++++- ...ClusteringForEgammaUnseededSequence_cfi.py | 8 +++- .../HLTHgcalTiclPFClusteringForEgamma_cfi.py | 23 ++++++++++- ...ClusteringForEgammaUnseededSequence_cfi.py | 3 +- ...cfi.py => HLTTICLLocalRecoSequence_cfi.py} | 40 ++++++++++++++++--- .../python/hgcalLayerClusters_cff.py | 4 ++ .../python/particleFlowCluster_cff.py | 14 ++++++- .../python/globalValidation_cff.py | 5 +-- 15 files changed, 173 insertions(+), 50 deletions(-) create mode 100644 Configuration/Generator/python/CloseByPGun_Barrel_Front_cfi.py create mode 100644 Configuration/ProcessModifiers/python/ticl_barrel_cff.py delete mode 100644 HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClusters_cfi.py create mode 100644 HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClusters_cfi.py rename HLTrigger/Configuration/python/HLT_75e33/sequences/{HLTHgcalLocalRecoSequence_cfi.py => HLTTICLLocalRecoSequence_cfi.py} (53%) diff --git a/Configuration/Generator/python/CloseByPGun_Barrel_Front_cfi.py b/Configuration/Generator/python/CloseByPGun_Barrel_Front_cfi.py new file mode 100644 index 0000000000000..d0b7c238519bf --- /dev/null +++ b/Configuration/Generator/python/CloseByPGun_Barrel_Front_cfi.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms +from .CE_E_Front_300um_cfi import generator + +_pgunPSet = generator.PGunParameters + +_pgunPSet.ControlledByEta = cms.bool(True) +_pgunPSet.MinEta = cms.double(-1.479) +_pgunPSet.MaxEta = cms.double(1.479) +_pgunPSet.RMin = cms.double(128.5) +_pgunPSet.RMax = cms.double(128.4) +_pgunPSet.ZMin = cms.double(-230) +_pgunPSet.ZMax = cms.double(230) + +generator.PGunParameters = _pgunPSet diff --git a/Configuration/ProcessModifiers/python/ticl_barrel_cff.py b/Configuration/ProcessModifiers/python/ticl_barrel_cff.py new file mode 100644 index 0000000000000..be2a2d085439e --- /dev/null +++ b/Configuration/ProcessModifiers/python/ticl_barrel_cff.py @@ -0,0 +1,3 @@ +import FWCore.ParameterSet.Config as cms + +ticl_barrel = cms.Modifier() diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index d019213282a2e..9e77e09b65829 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -997,6 +997,37 @@ def condition(self, fragment, stepList, key, hasHarvest): upgradeWFs['CPfromPU'].step3 = {'--procModifiers': 'enableCPfromPU'} upgradeWFs['CPfromPU'].step4 = {'--procModifiers': 'enableCPfromPU'} +class UpgradeWorkflow_ticl_barrel(UpgradeWorkflow): + def setup_(self, step, stepName, stepDict, k, properties): + if ('Digi' in step and 'NoHLT' not in step) or ('HLTOnly' in step): + stepDict[stepName][k] = merge([self.step2, stepDict[step][k]]) + if 'RecoGlobal' in step: + stepDict[stepName][k] = merge([self.step3, stepDict[step][k]]) + if 'HARVESTGlobal' in step: + stepDict[stepName][k] = merge([self.step4, stepDict[step][k]]) + def condition(self, fragment, stepList, key, hasHarvest): + return ('CloseByPGun_Barrel') in fragment and ('Run4' in key) + +upgradeWFs['ticl_barrel'] = UpgradeWorkflow_ticl_barrel( + steps = [ + 'HLTOnly', + 'DigiTrigger', + 'RecoGlobal', + 'HARVESTGlobal' + ], + PU = [ + 'HLTOnly', + 'DigiTrigger', + 'RecoGlobal', + 'HARVESTGlobal' + ], + suffix = '_ticl_barrel', + offset = 0.209, +) +upgradeWFs['ticl_barrel'].step2 = {'--procModifiers': 'ticl_barrel'} +upgradeWFs['ticl_barrel'].step3 = {'--procModifiers': 'ticl_barrel'} +upgradeWFs['ticl_barrel'].step4 = {'--procModifiers': 'ticl_barrel'} + # L3 Tracker Muon Outside-In reconstruction first class UpgradeWorkflow_phase2L3MuonsOIFirst(UpgradeWorkflow): def setup_(self, step, stepName, stepDict, k, properties): @@ -3803,4 +3834,5 @@ def __init__(self, howMuch, dataset): ('Hydjet_Quenched_MinBias_5362GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5362GeV')), ('Hydjet_Quenched_MinBias_5519GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5519GeV')), ('SingleMuPt15Eta0_0p4_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt15Eta0p_0p4')), + ('CloseByPGun_Barrel_Front_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_Barrel_Front')), ]) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py index 7c1e887da5916..d9131b5a8a413 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py @@ -1,16 +1,12 @@ import FWCore.ParameterSet.Config as cms hltHgcalMergeLayerClustersL1Seeded = cms.EDProducer("MergeClusterProducer", - layerClustersEE = cms.InputTag("hltHgcalLayerClustersEEL1Seeded"), - layerClustersHSci = cms.InputTag("hltHgcalLayerClustersHSciL1Seeded"), - layerClustersHSi = cms.InputTag("hltHgcalLayerClustersHSiL1Seeded"), - layerClustersEB = cms.InputTag("hltBarrelLayerClustersEBL1Seeded"), - layerClustersHB = cms.InputTag("hltBarrelLayerClustersEBL1Seeded"), + layerClusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded", "hltHgcalLayerClustersHSciL1Seeded", "hltHgcalLayerClustersHSiL1Seeded"), mightGet = cms.optional.untracked.vstring, - timeClname = cms.string('timeLayerCluster'), - time_layerclustersEE = cms.InputTag("hltHgcalLayerClustersEEL1Seeded","timeLayerCluster"), - time_layerclustersHSci = cms.InputTag("hltHgcalLayerClustersHSciL1Seeded","timeLayerCluster"), - time_layerclustersHSi = cms.InputTag("hltHgcalLayerClustersHSiL1Seeded","timeLayerCluster"), - time_layerclustersEB = cms.InputTag("hltBarrelLayerClustersEBL1Seeded","timeLayerCluster"), - time_layerclustersHB = cms.InputTag("hltBarrelLayerClustersEBL1Seeded","timeLayerCluster"), + time_layerclusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded:timeLayerCluster","hltHgcalLayerClustersHSciL1Seeded:timeLayerCluster","hltHgcalLayerClustersHSiL1Seeded:timeLayerCluster") ) + +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +layerClusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded", "hltHgcalLayerClustersHSciL1Seeded", "hltHgcalLayerClustersHSiL1Seeded", "hltBarrelLayerClustersEBL1Seeded") +time_layerclusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded:timeLayerCluster", "hltHgcalLayerClustersHSciL1Seeded:timeLayerCluster", "hltHgcalLayerClustersHSiL1Seeded:timeLayerCluster", "hltBarrelLayerClustersEBL1Seeded:timeLayerCluster") +ticl_barrel.toModify(hltHgcalMergeLayerClustersL1Seeded, layerClusters = layerClusters, time_layerclusters = time_layerclusters) \ No newline at end of file diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClusters_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClusters_cfi.py deleted file mode 100644 index 63852353fa3ba..0000000000000 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClusters_cfi.py +++ /dev/null @@ -1,21 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -hltHgcalMergeLayerClusters = cms.EDProducer("MergeClusterProducer", - layerClustersEE = cms.InputTag("hltHgcalLayerClustersEE"), - layerClustersHSci = cms.InputTag("hltHgcalLayerClustersHSci"), - layerClustersHSi = cms.InputTag("hltHgcalLayerClustersHSi"), - layerClustersEB = cms.InputTag("hltBarrelLayerClustersEB"), - layerClustersHB = cms.InputTag("hltBarrelLayerClustersHB"), - mightGet = cms.optional.untracked.vstring, - timeClname = cms.string('timeLayerCluster'), - time_layerclustersEE = cms.InputTag("hltHgcalLayerClustersEE","timeLayerCluster"), - time_layerclustersHSci = cms.InputTag("hltHgcalLayerClustersHSci","timeLayerCluster"), - time_layerclustersHSi = cms.InputTag("hltHgcalLayerClustersHSi","timeLayerCluster"), - time_layerclustersEB = cms.InputTag("hltBarrelLayerClustersEB","timeLayerCluster"), - time_layerclustersHB = cms.InputTag("hltBarrelLayerClustersHB","timeLayerCluster") -) - -from Configuration.ProcessModifiers.alpaka_cff import alpaka -alpaka.toModify(hltHgcalMergeLayerClusters, - layerClustersEE = cms.InputTag("hltHgCalLayerClustersFromSoAProducer"), - time_layerclustersEE = cms.InputTag("hltHgCalLayerClustersFromSoAProducer", "timeLayerCluster")) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClusters_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClusters_cfi.py new file mode 100644 index 0000000000000..9079e2bc52f7b --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClusters_cfi.py @@ -0,0 +1,17 @@ +import FWCore.ParameterSet.Config as cms + +hltMergeLayerClusters = cms.EDProducer("MergeClusterProducer", + layerClusters = cms.VInputTag("hltHgcalLayerClustersEE", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi"), + mightGet = cms.optional.untracked.vstring, + time_layerclusters = cms.VInputTag("hltHgcalLayerClustersEE:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster") +) + +from Configuration.ProcessModifiers.alpaka_cff import alpaka +alpaka.toModify(hltMergeLayerClusters, + layerClustersEE = cms.InputTag("hltHgCalLayerClustersFromSoAProducer"), + time_layerclustersEE = cms.InputTag("hltHgCalLayerClustersFromSoAProducer", "timeLayerCluster")) + +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +layerClusters = cms.VInputTag("hltHgcalLayerClustersEE", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi", "hltBarrelLayerClustersEB", "hltBarrelLayerClustersHB") +time_layerclusters = cms.VInputTag("hltHgcalLayerClustersEE:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster", "hltBarrelLayerClustersEB:timeLayerCluster", "hltBarrelLayerClustersHB:timeLayerCluster") +ticl_barrel.toModify(hltMergeLayerClusters, layerClusters = layerClusters, time_layerclusters = time_layerclusters) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py index 9292bce950708..8519652f01f49 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py @@ -13,7 +13,6 @@ from ..modules.hltEgammaClusterShapeUnseeded_cfi import * from ..modules.hltEgammaHGCALIDVarsUnseeded_cfi import * from ..modules.hltEgammaHoverEUnseeded_cfi import * -from ..modules.hltParticleFlowRecHitHBHE_cfi import * from ..sequences.HLTDoFullUnpackingEgammaEcalSequence_cfi import * from ..sequences.HLTEGammaDoLocalHcalSequence_cfi import * @@ -25,7 +24,6 @@ HLTDoubleEle25CaloIdLPMS2UnseededSequence = cms.Sequence(HLTL1Sequence +hltEGL1SeedsForDoubleEleNonIsolatedFilter - +hltParticleFlowRecHitHBHE +HLTDoFullUnpackingEgammaEcalSequence +HLTPFClusteringForEgammaUnseededSequence +HLTHgcalTiclPFClusteringForEgammaUnseededSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py index 94f48c6f8b1d1..12e86e744e8c8 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py @@ -20,7 +20,7 @@ from ..modules.hltTiclTracksterLinksL1Seeded_cfi import * from ..modules.hltBarrelLayerClustersEBL1Seeded_cfi import * -_HgcalLocalRecoL1SeededSequence = cms.Sequence(hltHgcalDigis+hltL1TEGammaHGCFilteredCollectionProducer+hltHgcalDigisL1Seeded+hltHGCalUncalibRecHitL1Seeded+hltHGCalRecHitL1Seeded+hltParticleFlowRecHitHGCL1Seeded+hltRechitInRegionsHGCAL+hltHgcalLayerClustersEEL1Seeded+hltHgcalLayerClustersHSciL1Seeded+hltHgcalLayerClustersHSiL1Seeded+hltBarrelLayerClustersEBL1Seeded+hltHgcalMergeLayerClustersL1Seeded) +_HgcalLocalRecoL1SeededSequence = cms.Sequence(hltHgcalDigis+hltL1TEGammaHGCFilteredCollectionProducer+hltHgcalDigisL1Seeded+hltHGCalUncalibRecHitL1Seeded+hltHGCalRecHitL1Seeded+hltParticleFlowRecHitHGCL1Seeded+hltRechitInRegionsHGCAL+hltHgcalLayerClustersEEL1Seeded+hltHgcalLayerClustersHSciL1Seeded+hltHgcalLayerClustersHSiL1Seeded+hltHgcalMergeLayerClustersL1Seeded) _HgcalTICLPatternRecognitionL1SeededSequence = cms.Sequence(hltFilteredLayerClustersCLUE3DHighL1Seeded+hltTiclSeedingL1+hltTiclLayerTileProducerL1Seeded+hltTiclTrackstersCLUE3DHighL1Seeded) _SuperclusteringL1SeededSequence = cms.Sequence(hltParticleFlowClusterHGCalFromTICLL1Seeded+hltParticleFlowSuperClusterHGCalFromTICLL1Seeded) @@ -76,3 +76,20 @@ layerClusters=cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), enableRegression=cms.bool(False) ) + +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +_HgcalLocalRecoL1SeededSequence_barrel = cms.Sequence( + hltHgcalDigis+ + hltL1TEGammaHGCFilteredCollectionProducer+ + hltHgcalDigisL1Seeded+ + hltHGCalUncalibRecHitL1Seeded+ + hltHGCalRecHitL1Seeded+ + hltParticleFlowRecHitHGCL1Seeded+ + hltRechitInRegionsHGCAL+ + hltHgcalLayerClustersEEL1Seeded+ + hltHgcalLayerClustersHSciL1Seeded+ + hltHgcalLayerClustersHSiL1Seeded+ + hltBarrelLayerClustersEBL1Seeded+ + hltHgcalMergeLayerClustersL1Seeded +) +ticl_barrel.toReplaceWith(_HgcalLocalRecoL1SeededSequence, _HgcalLocalRecoL1SeededSequence_barrel) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py index 0028913d4817a..971bd9b8f6968 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py @@ -22,7 +22,7 @@ # Barrel layer clusters from ..modules.hltBarrelLayerClustersEB_cfi import * from ..modules.hltBarrelLayerClustersHB_cfi import * -_HgcalLocalRecoUnseededSequence = cms.Sequence(hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltBarrelLayerClustersEB+hltBarrelLayerClustersHB+hltHgcalMergeLayerClusters) +_HgcalLocalRecoUnseededSequence = cms.Sequence(hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltHgcalMergeLayerClusters) _HgcalTICLPatternRecognitionUnseededSequence = cms.Sequence(hltFilteredLayerClustersCLUE3DHigh+hltTiclSeedingGlobal+hltTiclLayerTileProducer+hltTiclTrackstersCLUE3DHigh) _SuperclusteringUnseededSequence = cms.Sequence(hltParticleFlowClusterHGCalFromTICLUnseeded+hltParticleFlowSuperClusterHGCalFromTICLUnseeded) @@ -97,3 +97,9 @@ layerClusters=cms.InputTag("hltHgcalMergeLayerClusters"), enableRegression=cms.bool(False) ) + +_HgcalLocalRecoUnseededSequence_barrel = _HgcalLocalRecoUnseededSequence.copy() +_HgcalLocalRecoUnseededSequence_barrel += hltBarrelLayerClustersEB +_HgcalLocalRecoUnseededSequence_barrel += hltBarrelLayerClustersHB +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +ticl_barrel.toReplaceWith(_HgcalLocalRecoUnseededSequence, _HgcalLocalRecoUnseededSequence_barrel) \ No newline at end of file diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py index 49b5f7a5d9556..d338b7774e3b8 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py @@ -17,4 +17,25 @@ # Barrel layer clusters from ..modules.hltBarrelLayerClustersEB_cfi import * from ..modules.hltBarrelLayerClustersHB_cfi import * -HLTHgcalTiclPFClusteringForEgamma = cms.Sequence((hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltBarrelLayerClustersEB+hltBarrelLayerClustersHB+hltHgcalMergeLayerClusters+hltFilteredLayerClustersCLUE3DHigh+hltTiclSeedingGlobal+hltTiclLayerTileProducer+hltTiclTrackstersCLUE3DHigh+hltParticleFlowClusterHGCal+hltParticleFlowSuperClusterHGCal)) +HLTHgcalTiclPFClusteringForEgamma = cms.Sequence((hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltHgcalMergeLayerClusters+hltFilteredLayerClustersCLUE3DHigh+hltTiclSeedingGlobal+hltTiclLayerTileProducer+hltTiclTrackstersCLUE3DHigh+hltParticleFlowClusterHGCal+hltParticleFlowSuperClusterHGCal)) + +HLTHgcalTiclPFClusteringForEgamma_barrel = cms.Sequence(( + hltHgcalDigis+ + hltHGCalUncalibRecHit+ + hltHGCalRecHit+ + hltParticleFlowRecHitHGC+ + hltHgcalLayerClustersEE+ + hltHgcalLayerClustersHSci+ + hltHgcalLayerClustersHSi+ + hltBarrelLayerClustersEB+ + hltBarrelLayerClustersHB+ + hltHgcalMergeLayerClusters+ + hltFilteredLayerClustersCLUE3DHigh+ + hltTiclSeedingGlobal+ + hltTiclLayerTileProducer+ + hltTiclTrackstersCLUE3DHigh+ + hltParticleFlowClusterHGCal+ + hltParticleFlowSuperClusterHGCal +)) +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +ticl_barrel.toReplaceWith(HLTHgcalTiclPFClusteringForEgamma, HLTHgcalTiclPFClusteringForEgamma_barrel) \ No newline at end of file diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPFClusteringForEgammaUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPFClusteringForEgammaUnseededSequence_cfi.py index e87cdf27a52fd..f7b0a48df2fd5 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPFClusteringForEgammaUnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPFClusteringForEgammaUnseededSequence_cfi.py @@ -4,5 +4,6 @@ from ..modules.hltParticleFlowClusterECALUnseeded_cfi import * from ..modules.hltParticleFlowRecHitECALUnseeded_cfi import * from ..modules.hltParticleFlowSuperClusterECALUnseeded_cfi import * +from ..modules.hltParticleFlowRecHitHBHE_cfi import * -HLTPFClusteringForEgammaUnseededSequence = cms.Sequence(hltParticleFlowRecHitECALUnseeded+hltParticleFlowClusterECALUncorrectedUnseeded+hltParticleFlowClusterECALUnseeded+hltParticleFlowSuperClusterECALUnseeded) +HLTPFClusteringForEgammaUnseededSequence = cms.Sequence(hltParticleFlowRecHitECALUnseeded+hltParticleFlowRecHitHBHE+hltParticleFlowClusterECALUncorrectedUnseeded+hltParticleFlowClusterECALUnseeded+hltParticleFlowSuperClusterECALUnseeded) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py similarity index 53% rename from HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi.py rename to HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py index 4432395f85f86..1fae42dd9a27d 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py @@ -15,17 +15,43 @@ from ..modules.hltBarrelLayerClustersEB_cfi import * from ..modules.hltBarrelLayerClustersHB_cfi import * -HLTHgcalLocalRecoSequence = cms.Sequence( +HLTTICLLocalRecoSequence = cms.Sequence( hltHGCalUncalibRecHit+ hltHGCalRecHit+ hltHgcalLayerClustersEE+ hltHgcalLayerClustersHSci+ hltHgcalLayerClustersHSi+ + hltMergeLayerClusters) + +_HLTTICLLocalRecoSequence_heterogeneous = cms.Sequence( + hltHGCalUncalibRecHit+ + hltHGCalRecHit+ + hltHgcalSoARecHitsProducer+ + hltHgcalSoARecHitsLayerClustersProducer+ + hltHgcalSoALayerClustersProducer+ + hltHgCalLayerClustersFromSoAProducer+ + hltHgcalLayerClustersHSci+ + hltHgcalLayerClustersHSi+ hltBarrelLayerClustersEB+ hltBarrelLayerClustersHB+ - hltHgcalMergeLayerClusters) + hltMergeLayerClusters) + +from Configuration.ProcessModifiers.alpaka_cff import alpaka +alpaka.toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_heterogeneous) -_HLTHgcalLocalRecoSequence_heterogeneous = cms.Sequence( + +_HLTTICLLocalRecoSequence_withBarrel = cms.Sequence( + hltHGCalUncalibRecHit+ + hltHGCalRecHit+ + hltHgcalLayerClustersEE+ + hltHgcalLayerClustersHSci+ + hltHgcalLayerClustersHSi+ + hltBarrelLayerClustersEB+ + hltBarrelLayerClustersHB+ + hltMergeLayerClusters +) + +_HLTTICLLocalRecoSequence_heterogeneous_withBarrel = cms.Sequence( hltHGCalUncalibRecHit+ hltHGCalRecHit+ hltHgcalSoARecHitsProducer+ @@ -36,7 +62,9 @@ hltHgcalLayerClustersHSi+ hltBarrelLayerClustersEB+ hltBarrelLayerClustersHB+ - hltHgcalMergeLayerClusters) + hltHgcalMergeLayerClusters +) -from Configuration.ProcessModifiers.alpaka_cff import alpaka -alpaka.toReplaceWith(HLTHgcalLocalRecoSequence, _HLTHgcalLocalRecoSequence_heterogeneous) +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +ticl_barrel.toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_withBarrel) +(ticl_barrel & alpaka).toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_heterogeneous_withBarrel) diff --git a/RecoLocalCalo/HGCalRecProducers/python/hgcalLayerClusters_cff.py b/RecoLocalCalo/HGCalRecProducers/python/hgcalLayerClusters_cff.py index 93c96033662eb..f1d9f5be137aa 100644 --- a/RecoLocalCalo/HGCalRecProducers/python/hgcalLayerClusters_cff.py +++ b/RecoLocalCalo/HGCalRecProducers/python/hgcalLayerClusters_cff.py @@ -85,3 +85,7 @@ hgcalMergeLayerClusters = hgcalMergeLayerClusters_.clone( ) +layerClusters = cms.VInputTag('hgcalLayerClustersEE', 'hgcalLayerClustersHSi', 'hgcalLayerClustersHSci', 'barrelLayerClustersEB', 'barrelLayerClustersHB') +time_layerClusters = cms.VInputTag('hgcalLayerClustersEE:timeLayerCluster', 'hgcalLayerClustersHSi:timeLayerCluster', 'hgcalLayerClustersHSci:timeLayerCluster', 'barrelLayerClustersEB:timeLayerCluster', 'barrelLayerClustersHB:timeLayerCluster') +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +ticl_barrel.toModify(hgcalMergeLayerClusters, layerClusters = layerClusters, time_layerclusters = time_layerClusters) diff --git a/RecoParticleFlow/PFClusterProducer/python/particleFlowCluster_cff.py b/RecoParticleFlow/PFClusterProducer/python/particleFlowCluster_cff.py index 50693789ea164..847525c72a696 100644 --- a/RecoParticleFlow/PFClusterProducer/python/particleFlowCluster_cff.py +++ b/RecoParticleFlow/PFClusterProducer/python/particleFlowCluster_cff.py @@ -66,8 +66,7 @@ #HGCal from RecoParticleFlow.PFClusterProducer.particleFlowRecHitHGC_cfi import particleFlowRecHitHGC -from RecoParticleFlow.PFClusterProducer.barrelLayerClusters_cff import barrelLayerClustersEB, barrelLayerClustersHB -pfClusteringHGCalTask = cms.Task(particleFlowRecHitHGC, barrelLayerClustersEB, barrelLayerClustersHB) +pfClusteringHGCalTask = cms.Task(particleFlowRecHitHGC) pfClusteringHGCal = cms.Sequence(pfClusteringHGCalTask) _phase2_hgcal_particleFlowClusterTask = particleFlowClusterTask.copy() @@ -98,3 +97,14 @@ def _addProcessPFClusterAlpaka(process): process.load("RecoParticleFlow.PFClusterProducer.pfClusterHBHEAlpaka_cff") modifyConfigurationPFClusterAlpaka_ = alpaka.makeProcessModifier(_addProcessPFClusterAlpaka) + +from RecoParticleFlow.PFClusterProducer.barrelLayerClusters_cff import barrelLayerClustersEB, barrelLayerClustersHB +_pfClusteringECALTask = pfClusteringECALTask.copy() +_pfClusteringECALTask.add(barrelLayerClustersEB) + +_pfClusteringHBHEHFTask = pfClusteringHBHEHFTask.copy() +_pfClusteringHBHEHFTask.add(barrelLayerClustersHB) + +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +ticl_barrel.toReplaceWith(pfClusteringECALTask, _pfClusteringECALTask) +ticl_barrel.toReplaceWith(pfClusteringHBHEHFTask, _pfClusteringHBHEHFTask) diff --git a/Validation/Configuration/python/globalValidation_cff.py b/Validation/Configuration/python/globalValidation_cff.py index 4e0e5b9d95fb6..02572fa69b79f 100644 --- a/Validation/Configuration/python/globalValidation_cff.py +++ b/Validation/Configuration/python/globalValidation_cff.py @@ -43,6 +43,7 @@ from DQMOffline.RecoB.dqmAnalyzer_cff import * from Validation.RecoB.BDHadronTrackValidation_cff import * from Validation.Configuration.hgcalSimValid_cff import * +from Validation.Configuration.barrelSimValid_cff import * from Validation.Configuration.mtdSimValid_cff import * from Validation.Configuration.ecalSimValid_cff import * from Validation.SiTrackerPhase2V.Phase2TrackerValidationFirstStep_cff import * @@ -214,10 +215,6 @@ globalValidationMTD = cms.Sequence() -globalPrevalidationBarrel = cms.Sequence(barrelAssociators) - -globalValidationBarrel = cms.Sequence(barrelValidation) - globalPrevalidationMuons = cms.Sequence( gemSimValid + me0SimValid From 87e1e8d09958c77ce6145fc08328c1484c61484b Mon Sep 17 00:00:00 2001 From: brusale Date: Wed, 2 Apr 2025 23:00:16 +0200 Subject: [PATCH 4/9] rearrange HLT sequences to include ticl_barrel modifier --- .../EventContent/python/EventContent_cff.py | 4 +++- .../python/upgradeWorkflowComponents.py | 13 ++++++++++++ .../hltEgammaHGCALIDVarsL1Seeded_cfi.py | 2 +- .../hltEgammaHGCALIDVarsUnseeded_cfi.py | 2 +- ...tEgammaHGCalLayerClusterIsoL1Seeded_cfi.py | 2 +- ...tEgammaHGCalLayerClusterIsoUnseeded_cfi.py | 2 +- ...eredLayerClustersCLUE3DHighL1Seeded_cfi.py | 4 ++-- .../hltFilteredLayerClustersCLUE3DHigh_cfi.py | 4 ++-- ...lteredLayerClustersRecoveryL1Seeded_cfi.py | 2 +- .../hltFilteredLayerClustersRecovery_cfi.py | 2 +- ...y => hltMergeLayerClustersL1Seeded_cfi.py} | 4 ++-- ...cleFlowClusterHGCalFromTICLL1Seeded_cfi.py | 2 +- ...cleFlowClusterHGCalFromTICLUnseeded_cfi.py | 2 +- .../hltParticleFlowClusterHGCal_cfi.py | 2 +- ...0dRVetoHad0p02minEEM0p00minEHad0p00_cfi.py | 2 +- .../HLT_75e33/modules/hltTiclCandidate_cfi.py | 6 +++--- .../hltTiclLayerTileProducerL1Seeded_cfi.py | 2 +- .../modules/hltTiclLayerTileProducer_cfi.py | 2 +- .../hltTiclTracksterLinksL1Seeded_cfi.py | 6 +++--- .../modules/hltTiclTracksterLinks_cfi.py | 6 +++--- ...hltTiclTrackstersCLUE3DHighL1Seeded_cfi.py | 6 +++--- .../hltTiclTrackstersCLUE3DHigh_cfi.py | 6 +++--- .../modules/hltTiclTrackstersMerge_cfi.py | 4 ++-- .../hltTiclTrackstersRecoveryL1Seeded_cfi.py | 4 ++-- .../modules/hltTiclTrackstersRecovery_cfi.py | 4 ++-- .../HLT_75e33/paths/DST_PFScouting_cfi.py | 6 +++--- .../paths/HLT_AK4PFPuppiJet520_cfi.py | 4 ++-- ...leMediumChargedIsoPFTauHPS40_eta2p1_cfi.py | 4 ++-- ...oubleMediumDeepTauPFTauHPS35_eta2p1_cfi.py | 4 ++-- ...ets128_DoublePFPuppiBTagDeepCSV_2p4_cfi.py | 4 ++-- ...28_DoublePFPuppiBTagDeepFlavour_2p4_cfi.py | 4 ++-- ...oseDeepTauPFTauHPS30_eta2p1_CrossL1_cfi.py | 4 ++-- ...oseDeepTauPFTauHPS27_eta2p1_CrossL1_cfi.py | 4 ++-- .../paths/HLT_IsoMu24_FromL1TkMuon_cfi.py | 8 +++++--- ...30_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py | 4 ++-- ...40_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py | 4 ++-- .../HLT_75e33/paths/HLT_PFPuppiHT1070_cfi.py | 4 ++-- ..._PFPuppiMETTypeOne140_PFPuppiMHT140_cfi.py | 4 ++-- .../python/HLT_75e33/paths/MC_BTV_cfi.py | 4 ++-- .../python/HLT_75e33/paths/MC_JME_cfi.py | 4 ++-- ...photon3023IsoCaloIdUnseededSequence_cfi.py | 2 +- ...bleEle25CaloIdLPMS2UnseededSequence_cfi.py | 2 +- .../HLTEle26WP70UnseededSequence_cfi.py | 2 +- .../HLTEle32WPTightUnseededSequence_cfi.py | 2 +- ...ClusteringForEgammaL1SeededSequence_cfi.py | 10 +++++----- ...ClusteringForEgammaUnseededSequence_cfi.py | 20 +++++++++++-------- .../HLTHgcalTiclPFClusteringForEgamma_cfi.py | 6 +++--- .../sequences/HLTParticleFlowSequence_cfi.py | 3 ++- .../HLTPfClusteringECALSequence_cfi.py | 3 +-- .../HLTPfClusteringHBHEHFSequence_cfi.py | 3 +-- .../HLTPfRecHitUnseededSequence_cfi.py | 6 ++++++ ...08EBTightIDTightIsoUnseededSequence_cfi.py | 2 +- .../HLTPhoton187UnseededSequence_cfi.py | 2 +- .../sequences/HLTTICLLocalRecoSequence_cfi.py | 18 ++++++++++++++--- .../Configuration/python/HLT_75e33_cff.py | 2 +- .../python/HLT_75e33_timing_cff.py | 2 +- RecoHGCal/TICL/python/HLTSimTracksters_cff.py | 8 ++++---- .../python/hltHGCalSimValid_cff.py | 11 +++++----- .../plugins/BarrelValidator.cc | 4 ++-- .../python/HLTHGCalValidator_cff.py | 3 ++- 60 files changed, 155 insertions(+), 117 deletions(-) rename HLTrigger/Configuration/python/HLT_75e33/modules/{hltHgcalMergeLayerClustersL1Seeded_cfi.py => hltMergeLayerClustersL1Seeded_cfi.py} (81%) create mode 100644 HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfRecHitUnseededSequence_cfi.py diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index 13da1c1f9c2dd..40aff710591b2 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -700,7 +700,9 @@ def SwapKeepAndDrop(l): phase2_common.toModify(FEVTDEBUGHLTEventContent, outputCommands = FEVTDEBUGHLTEventContent.outputCommands+[ 'keep *_hltHGCalRecHit_*_*', - 'keep *_hltHgcalMergeLayerClusters_*_*', + 'keep *_hltMergeLayerClusters_*_*', + #'keep *_hltHgcalMergeLayerClusters_*_*', + 'keep *_hltParticleFlowRecHit*_*_*', 'keep *_hltEgammaGsfTracksL1Seeded_*_*', ]) diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 9e77e09b65829..b6c9a069dcfa1 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -1953,6 +1953,19 @@ def condition(self, fragment, stepList, key, hasHarvest): '-s':'HARVESTING:@hltValidation' } +upgradeWFs['HLTTiming75e33TiclBarrel'] = deepcopy(upgradeWFs['HLTTiming75e33']) +upgradeWFs['HLTTiming75e33TiclBarrel'].suffix = '_HLT75e33TimingTiclBarrel' +upgradeWFs['HLTTiming75e33TiclBarrel'].offset = 0.758 +upgradeWFs['HLTTiming75e33TiclBarrel'].step2 = { + '-s' : 'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:75e33_timing,VALIDATION:@hltValidation', + '--procModifiers': 'ticl_barrel', + '--datatier':'GEN-SIM-DIGI-RAW,DQMIO', + '--eventcontent':'FEVTDEBUGHLT,DQMIO' +} +upgradeWFs['HLTTiming75e33TiclBarrel'].step3 = { + '-s':'HARVESTING:@hltValidation' +} + class UpgradeWorkflow_HLTPhase2_WithNano(UpgradeWorkflow): def setup_(self, step, stepName, stepDict, k, properties): # skip RECO, ALCA and HLT diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCALIDVarsL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCALIDVarsL1Seeded_cfi.py index 2bfb0cd860038..274d6233e549a 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCALIDVarsL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCALIDVarsL1Seeded_cfi.py @@ -2,7 +2,7 @@ hltEgammaHGCALIDVarsL1Seeded = cms.EDProducer("EgammaHLTHGCalIDVarProducer", hgcalRecHits = cms.InputTag("hltParticleFlowRecHitHGCL1Seeded"), - layerClusters = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), + layerClusters = cms.InputTag("hltMergeLayerClustersL1Seeded"), rCylinder = cms.double(2.8), recoEcalCandidateProducer = cms.InputTag("hltEgammaCandidatesL1Seeded") ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCALIDVarsUnseeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCALIDVarsUnseeded_cfi.py index bc6f148b9e53d..19ba541da4047 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCALIDVarsUnseeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCALIDVarsUnseeded_cfi.py @@ -2,7 +2,7 @@ hltEgammaHGCALIDVarsUnseeded = cms.EDProducer("EgammaHLTHGCalIDVarProducer", hgcalRecHits = cms.InputTag("hltParticleFlowRecHitHGC"), - layerClusters = cms.InputTag("hltHgcalMergeLayerClusters"), + layerClusters = cms.InputTag("hltMergeLayerClusters"), rCylinder = cms.double(2.8), recoEcalCandidateProducer = cms.InputTag("hltEgammaCandidatesUnseeded") ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCalLayerClusterIsoL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCalLayerClusterIsoL1Seeded_cfi.py index 81b1cd1fa1ae7..5c251422335ce 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCalLayerClusterIsoL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCalLayerClusterIsoL1Seeded_cfi.py @@ -5,7 +5,7 @@ drMax = cms.double(0.2), drVetoEM = cms.double(0.02), drVetoHad = cms.double(0.0), - layerClusterProducer = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), + layerClusterProducer = cms.InputTag("hltMergeLayerClustersL1Seeded"), minEnergyEM = cms.double(0.02), minEnergyHad = cms.double(0.07), recoEcalCandidateProducer = cms.InputTag("hltEgammaCandidatesL1Seeded"), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCalLayerClusterIsoUnseeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCalLayerClusterIsoUnseeded_cfi.py index bceafbcca562d..dfe2d3688b248 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCalLayerClusterIsoUnseeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaHGCalLayerClusterIsoUnseeded_cfi.py @@ -5,7 +5,7 @@ drMax = cms.double(0.2), drVetoEM = cms.double(0.02), drVetoHad = cms.double(0.0), - layerClusterProducer = cms.InputTag("hltHgcalMergeLayerClusters"), + layerClusterProducer = cms.InputTag("hltMergeLayerClusters"), minEnergyEM = cms.double(0.02), minEnergyHad = cms.double(0.07), recoEcalCandidateProducer = cms.InputTag("hltEgammaCandidatesUnseeded"), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersCLUE3DHighL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersCLUE3DHighL1Seeded_cfi.py index 765601d19a667..20672809ca795 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersCLUE3DHighL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersCLUE3DHighL1Seeded_cfi.py @@ -1,8 +1,8 @@ import FWCore.ParameterSet.Config as cms hltFilteredLayerClustersCLUE3DHighL1Seeded = cms.EDProducer("FilteredLayerClustersProducer", - LayerClusters = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), - LayerClustersInputMask = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded","InitialLayerClustersMask"), + LayerClusters = cms.InputTag("hltMergeLayerClustersL1Seeded"), + LayerClustersInputMask = cms.InputTag("hltMergeLayerClustersL1Seeded","InitialLayerClustersMask"), clusterFilter = cms.string('ClusterFilterByAlgoAndSize'), iteration_label = cms.string('CLUE3DHigh'), max_cluster_size = cms.int32(9999), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersCLUE3DHigh_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersCLUE3DHigh_cfi.py index 765681f7b8d30..f596ab09b0cc9 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersCLUE3DHigh_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersCLUE3DHigh_cfi.py @@ -1,8 +1,8 @@ import FWCore.ParameterSet.Config as cms hltFilteredLayerClustersCLUE3DHigh = cms.EDProducer("FilteredLayerClustersProducer", - LayerClusters = cms.InputTag("hltHgcalMergeLayerClusters"), - LayerClustersInputMask = cms.InputTag("hltHgcalMergeLayerClusters","InitialLayerClustersMask"), + LayerClusters = cms.InputTag("hltMergeLayerClusters"), + LayerClustersInputMask = cms.InputTag("hltMergeLayerClusters","InitialLayerClustersMask"), clusterFilter = cms.string('ClusterFilterByAlgoAndSize'), iteration_label = cms.string('CLUE3DHigh'), max_cluster_size = cms.int32(9999), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersRecoveryL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersRecoveryL1Seeded_cfi.py index 399eb6076eabc..9b75a95740e44 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersRecoveryL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersRecoveryL1Seeded_cfi.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms hltFilteredLayerClustersRecoveryL1Seeded = cms.EDProducer("FilteredLayerClustersProducer", - LayerClusters = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), + LayerClusters = cms.InputTag("hltMergeLayerClustersL1Seeded"), LayerClustersInputMask = cms.InputTag("hltTiclTrackstersCLUE3DHighL1Seeded"), algo_number = cms.vint32(6, 7, 8), clusterFilter = cms.string('ClusterFilterBySize'), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersRecovery_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersRecovery_cfi.py index 181cd69329a5a..5cd15fd100734 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersRecovery_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersRecovery_cfi.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms hltFilteredLayerClustersRecovery = cms.EDProducer("FilteredLayerClustersProducer", - LayerClusters = cms.InputTag("hltHgcalMergeLayerClusters"), + LayerClusters = cms.InputTag("hltMergeLayerClusters"), LayerClustersInputMask = cms.InputTag("hltTiclTrackstersCLUE3DHigh"), algo_number = cms.vint32(6, 7, 8), clusterFilter = cms.string('ClusterFilterBySize'), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py similarity index 81% rename from HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py rename to HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py index d9131b5a8a413..6c924b30306f9 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHgcalMergeLayerClustersL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -hltHgcalMergeLayerClustersL1Seeded = cms.EDProducer("MergeClusterProducer", +hltMergeLayerClustersL1Seeded = cms.EDProducer("MergeClusterProducer", layerClusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded", "hltHgcalLayerClustersHSciL1Seeded", "hltHgcalLayerClustersHSiL1Seeded"), mightGet = cms.optional.untracked.vstring, time_layerclusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded:timeLayerCluster","hltHgcalLayerClustersHSciL1Seeded:timeLayerCluster","hltHgcalLayerClustersHSiL1Seeded:timeLayerCluster") @@ -9,4 +9,4 @@ from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel layerClusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded", "hltHgcalLayerClustersHSciL1Seeded", "hltHgcalLayerClustersHSiL1Seeded", "hltBarrelLayerClustersEBL1Seeded") time_layerclusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded:timeLayerCluster", "hltHgcalLayerClustersHSciL1Seeded:timeLayerCluster", "hltHgcalLayerClustersHSiL1Seeded:timeLayerCluster", "hltBarrelLayerClustersEBL1Seeded:timeLayerCluster") -ticl_barrel.toModify(hltHgcalMergeLayerClustersL1Seeded, layerClusters = layerClusters, time_layerclusters = time_layerclusters) \ No newline at end of file +ticl_barrel.toModify(hltMergeLayerClustersL1Seeded, layerClusters = layerClusters, time_layerclusters = time_layerclusters) \ No newline at end of file diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCalFromTICLL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCalFromTICLL1Seeded_cfi.py index 9307ca7c2a9ec..1f6732ae40a90 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCalFromTICLL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCalFromTICLL1Seeded_cfi.py @@ -6,7 +6,7 @@ ), initialClusteringStep = cms.PSet( algoName = cms.string('PFClusterFromHGCalTrackster'), - clusterSrc = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), + clusterSrc = cms.InputTag("hltMergeLayerClustersL1Seeded"), filterByTracksterIteration = cms.bool(False), filterByTracksterPID = cms.bool(True), filter_on_categories = cms.vint32(0, 1), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCalFromTICLUnseeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCalFromTICLUnseeded_cfi.py index d389a353a38f8..e59c391dad5c2 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCalFromTICLUnseeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCalFromTICLUnseeded_cfi.py @@ -6,7 +6,7 @@ ), initialClusteringStep = cms.PSet( algoName = cms.string('PFClusterFromHGCalTrackster'), - clusterSrc = cms.InputTag("hltHgcalMergeLayerClusters"), + clusterSrc = cms.InputTag("hltMergeLayerClusters"), filterByTracksterIteration = cms.bool(False), filterByTracksterPID = cms.bool(True), filter_on_categories = cms.vint32(0, 1), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCal_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCal_cfi.py index 0bb4f2211f25f..2fabc663f3ddf 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCal_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltParticleFlowClusterHGCal_cfi.py @@ -6,7 +6,7 @@ ), initialClusteringStep = cms.PSet( algoName = cms.string('PFClusterFromHGCalTrackster'), - clusterSrc = cms.InputTag("hltHgcalMergeLayerClusters"), + clusterSrc = cms.InputTag("hltMergeLayerClusters"), filterByTracksterIteration = cms.bool(True), filterByTracksterPID = cms.bool(False), filter_on_categories = cms.vint32(0, 1), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2L3MuonsHgcalLCIsodR0p2dRVetoEM0p00dRVetoHad0p02minEEM0p00minEHad0p00_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2L3MuonsHgcalLCIsodR0p2dRVetoEM0p00dRVetoHad0p02minEEM0p00minEHad0p00_cfi.py index c61a83c4809b2..c5ebdaf6930f0 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2L3MuonsHgcalLCIsodR0p2dRVetoEM0p00dRVetoHad0p02minEEM0p00minEHad0p00_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2L3MuonsHgcalLCIsodR0p2dRVetoEM0p00dRVetoHad0p02minEEM0p00minEHad0p00_cfi.py @@ -6,7 +6,7 @@ drVetoEM = cms.double(0.0), drVetoHad = cms.double(0.02), effectiveAreas = cms.vdouble(0.0, 0.0), - layerClusterProducer = cms.InputTag("hltHgcalMergeLayerClusters"), + layerClusterProducer = cms.InputTag("hltMergeLayerClusters"), minEnergyEM = cms.double(0.0), minEnergyHad = cms.double(0.0), minEtEM = cms.double(0.0), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py index 2f108c32757b9..efaa81a348abd 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py @@ -15,11 +15,11 @@ timing_quality_threshold = cms.double(0.5), type = cms.string('General') ), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClusters"), - layer_clustersTime = cms.InputTag("hltHgcalMergeLayerClusters","timeLayerCluster"), + layer_clusters = cms.InputTag("hltMergeLayerClusters"), + layer_clustersTime = cms.InputTag("hltMergeLayerClusters","timeLayerCluster"), mightGet = cms.optional.untracked.vstring, muons = cms.InputTag("hltPhase2L3Muons"), - original_masks = cms.VInputTag("hltHgcalMergeLayerClusters:InitialLayerClustersMask"), + original_masks = cms.VInputTag("hltMergeLayerClusters:InitialLayerClustersMask"), propagator = cms.string('PropagatorWithMaterial'), timingQualityThreshold = cms.double(0.5), timingSoA = cms.InputTag("mtdSoA"), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclLayerTileProducerL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclLayerTileProducerL1Seeded_cfi.py index b1a795121797e..ef323f17ca317 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclLayerTileProducerL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclLayerTileProducerL1Seeded_cfi.py @@ -3,6 +3,6 @@ hltTiclLayerTileProducerL1Seeded = cms.EDProducer("TICLLayerTileProducer", detector = cms.string('HGCAL'), layer_HFNose_clusters = cms.InputTag("hgcalLayerClustersHFNose"), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), + layer_clusters = cms.InputTag("hltMergeLayerClustersL1Seeded"), mightGet = cms.optional.untracked.vstring ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclLayerTileProducer_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclLayerTileProducer_cfi.py index 822e2cd013447..972ec6baabb87 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclLayerTileProducer_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclLayerTileProducer_cfi.py @@ -3,6 +3,6 @@ hltTiclLayerTileProducer = cms.EDProducer("TICLLayerTileProducer", detector = cms.string('HGCAL'), layer_HFNose_clusters = cms.InputTag("hgcalLayerClustersHFNose"), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClusters"), + layer_clusters = cms.InputTag("hltMergeLayerClusters"), mightGet = cms.optional.untracked.vstring ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinksL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinksL1Seeded_cfi.py index 8c31bd697fac1..367706fffeddc 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinksL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinksL1Seeded_cfi.py @@ -3,8 +3,8 @@ hltTiclTracksterLinksL1Seeded = cms.EDProducer("TracksterLinksProducer", detector = cms.string('HGCAL'), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), - layer_clustersTime = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded","timeLayerCluster"), + layer_clusters = cms.InputTag("hltMergeLayerClustersL1Seeded"), + layer_clustersTime = cms.InputTag("hltMergeLayerClustersL1Seeded","timeLayerCluster"), inferenceAlgo = cms.string('TracksterInferenceByPFN'), linkingPSet = hltTiclTracksterLinksPSet, pluginInferenceAlgoTracksterInferenceByDNN = cms.PSet( @@ -36,7 +36,7 @@ type = cms.string('TracksterInferenceByPFN') ), mightGet = cms.optional.untracked.vstring, - original_masks = cms.VInputTag("hltHgcalMergeLayerClustersL1Seeded:InitialLayerClustersMask"), + original_masks = cms.VInputTag("hltMergeLayerClustersL1Seeded:InitialLayerClustersMask"), propagator = cms.string('PropagatorWithMaterial'), regressionAndPid = cms.bool(True), tracksters_collections = cms.VInputTag("hltTiclTrackstersCLUE3DHighL1Seeded", "hltTiclTrackstersRecoveryL1Seeded") diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinks_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinks_cfi.py index 0a42611690106..b787e3fb03f82 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinks_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinks_cfi.py @@ -3,8 +3,8 @@ hltTiclTracksterLinks = cms.EDProducer("TracksterLinksProducer", detector = cms.string('HGCAL'), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClusters"), - layer_clustersTime = cms.InputTag("hltHgcalMergeLayerClusters","timeLayerCluster"), + layer_clusters = cms.InputTag("hltMergeLayerClusters"), + layer_clustersTime = cms.InputTag("hltMergeLayerClusters","timeLayerCluster"), inferenceAlgo = cms.string('TracksterInferenceByPFN'), linkingPSet = hltTiclTracksterLinksPSet, pluginInferenceAlgoTracksterInferenceByDNN = cms.PSet( @@ -36,7 +36,7 @@ type = cms.string('TracksterInferenceByPFN') ), mightGet = cms.optional.untracked.vstring, - original_masks = cms.VInputTag("hltHgcalMergeLayerClusters:InitialLayerClustersMask"), + original_masks = cms.VInputTag("hltMergeLayerClusters:InitialLayerClustersMask"), propagator = cms.string('PropagatorWithMaterial'), regressionAndPid = cms.bool(True), tracksters_collections = cms.VInputTag("hltTiclTrackstersCLUE3DHigh", "hltTiclTrackstersRecovery") diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersCLUE3DHighL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersCLUE3DHighL1Seeded_cfi.py index 91324defabfbe..d2203dc57b1f1 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersCLUE3DHighL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersCLUE3DHighL1Seeded_cfi.py @@ -4,11 +4,11 @@ detector = cms.string('HGCAL'), filtered_mask = cms.InputTag("hltFilteredLayerClustersCLUE3DHighL1Seeded","CLUE3DHigh"), itername = cms.string('CLUE3DHigh'), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), + layer_clusters = cms.InputTag("hltMergeLayerClustersL1Seeded"), layer_clusters_hfnose_tiles = cms.InputTag("ticlLayerTileHFNose"), layer_clusters_tiles = cms.InputTag("hltTiclLayerTileProducerL1Seeded"), mightGet = cms.optional.untracked.vstring, - original_mask = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded","InitialLayerClustersMask"), + original_mask = cms.InputTag("hltMergeLayerClustersL1Seeded","InitialLayerClustersMask"), patternRecognitionBy = cms.string('CLUE3D'), inferenceAlgo = cms.string('TracksterInferenceByCNNv4'), pluginPatternRecognitionByCA = cms.PSet( @@ -150,7 +150,7 @@ ), seeding_regions = cms.InputTag("hltTiclSeedingL1"), - time_layerclusters = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded","timeLayerCluster"), + time_layerclusters = cms.InputTag("hltMergeLayerClustersL1Seeded","timeLayerCluster"), ) from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersCLUE3DHigh_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersCLUE3DHigh_cfi.py index f53eddb049efa..111ae49aa2fff 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersCLUE3DHigh_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersCLUE3DHigh_cfi.py @@ -4,11 +4,11 @@ detector = cms.string('HGCAL'), filtered_mask = cms.InputTag("hltFilteredLayerClustersCLUE3DHigh","CLUE3DHigh"), itername = cms.string('CLUE3DHigh'), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClusters"), + layer_clusters = cms.InputTag("hltMergeLayerClusters"), layer_clusters_hfnose_tiles = cms.InputTag("ticlLayerTileHFNose"), layer_clusters_tiles = cms.InputTag("hltTiclLayerTileProducer"), mightGet = cms.optional.untracked.vstring, - original_mask = cms.InputTag("hltHgcalMergeLayerClusters","InitialLayerClustersMask"), + original_mask = cms.InputTag("hltMergeLayerClusters","InitialLayerClustersMask"), patternRecognitionBy = cms.string('CLUE3D'), inferenceAlgo = cms.string('TracksterInferenceByCNNv4'), pluginPatternRecognitionByCA = cms.PSet( @@ -151,7 +151,7 @@ ), seeding_regions = cms.InputTag("hltTiclSeedingGlobal"), - time_layerclusters = cms.InputTag("hltHgcalMergeLayerClusters","timeLayerCluster") + time_layerclusters = cms.InputTag("hltMergeLayerClusters","timeLayerCluster") ) from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersMerge_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersMerge_cfi.py index 0873c68d9067a..59c5d7efca357 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersMerge_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersMerge_cfi.py @@ -12,8 +12,8 @@ eid_output_name_id = cms.string('output/id_probabilities'), eta_bin_window = cms.int32(1), halo_max_distance2 = cms.double(4), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClusters"), - layer_clustersTime = cms.InputTag("hltHgcalMergeLayerClusters","timeLayerCluster"), + layer_clusters = cms.InputTag("hltMergeLayerClusters"), + layer_clustersTime = cms.InputTag("hltMergeLayerClusters","timeLayerCluster"), linkingPSet = cms.PSet( algo_verbosity = cms.int32(0), cutTk = cms.string('1.48 < abs(eta) < 3.0 && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5'), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersRecoveryL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersRecoveryL1Seeded_cfi.py index 94a54c6f5ccb3..77e7e5eabdb1a 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersRecoveryL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersRecoveryL1Seeded_cfi.py @@ -4,7 +4,7 @@ detector = cms.string('HGCAL'), filtered_mask = cms.InputTag("hltFilteredLayerClustersRecoveryL1Seeded","Recovery"), itername = cms.string('Recovery'), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), + layer_clusters = cms.InputTag("hltMergeLayerClustersL1Seeded"), layer_clusters_hfnose_tiles = cms.InputTag("ticlLayerTileHFNose"), layer_clusters_tiles = cms.InputTag("hltTiclLayerTileProducerL1Seeded"), mightGet = cms.optional.untracked.vstring, @@ -103,5 +103,5 @@ ), seeding_regions = cms.InputTag("hltTiclSeedingL1"), - time_layerclusters = cms.InputTag("hltHgcalMergeLayerClustersL1Seeded","timeLayerCluster") + time_layerclusters = cms.InputTag("hltMergeLayerClustersL1Seeded","timeLayerCluster") ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersRecovery_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersRecovery_cfi.py index c5e9c8ae32f24..8c4a5025fbead 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersRecovery_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersRecovery_cfi.py @@ -4,7 +4,7 @@ detector = cms.string('HGCAL'), filtered_mask = cms.InputTag("hltFilteredLayerClustersRecovery","Recovery"), itername = cms.string('Recovery'), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClusters"), + layer_clusters = cms.InputTag("hltMergeLayerClusters"), layer_clusters_hfnose_tiles = cms.InputTag("ticlLayerTileHFNose"), layer_clusters_tiles = cms.InputTag("hltTiclLayerTileProducer"), mightGet = cms.optional.untracked.vstring, @@ -103,5 +103,5 @@ ), seeding_regions = cms.InputTag("hltTiclSeedingGlobal"), - time_layerclusters = cms.InputTag("hltHgcalMergeLayerClusters","timeLayerCluster") + time_layerclusters = cms.InputTag("hltMergeLayerClusters","timeLayerCluster") ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/DST_PFScouting_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/DST_PFScouting_cfi.py index f312cc790442a..3af0afd80fef1 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/DST_PFScouting_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/DST_PFScouting_cfi.py @@ -27,8 +27,8 @@ from ..sequences.HLTBtagDeepFlavourSequencePFPuppi_cfi import * from ..sequences.HLTEndSequence_cfi import * from ..sequences.HLTHPSDeepTauPFTauSequence_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * -from ..sequences.HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * +from ..sequences.HLTHgcalTiclPFClusteringForEgamma_cfi import * from ..sequences.HLTLocalrecoSequence_cfi import * from ..sequences.HLTMuonsSequence_cfi import * from ..sequences.HLTPFPuppiMETReconstruction_cfi import * @@ -46,7 +46,7 @@ HLTBeginSequence + hltL1GTAcceptFilter + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + + HLTTICLLocalRecoSequence + HLTLocalrecoSequence + HLTTrackingSequence + HLTMuonsSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_AK4PFPuppiJet520_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_AK4PFPuppiJet520_cfi.py index e5e5a2f922088..acdc949c86d2e 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_AK4PFPuppiJet520_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_AK4PFPuppiJet520_cfi.py @@ -2,7 +2,7 @@ from ..modules.hltSingleAK4PFPuppiJet520_cfi import * from ..modules.hltL1SeedsForPuppiJetFilter_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFPuppiJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTEndSequence_cfi import * @@ -16,8 +16,8 @@ HLTBeginSequence + hltL1SeedsForPuppiJetFilter + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoubleMediumChargedIsoPFTauHPS40_eta2p1_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoubleMediumChargedIsoPFTauHPS40_eta2p1_cfi.py index eb079b53e173d..fe6b21ef76dbb 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoubleMediumChargedIsoPFTauHPS40_eta2p1_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoubleMediumChargedIsoPFTauHPS40_eta2p1_cfi.py @@ -4,7 +4,7 @@ from ..modules.hltHpsDoublePFTau40TrackPt1MediumChargedIsolation_cfi import * from ..modules.hltHpsSelectedPFTausTrackPt1MediumChargedIsolation_cfi import * from ..modules.hltPreDoublePFTauHPS_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTEndSequence_cfi import * @@ -22,8 +22,8 @@ + hltL1SeedForDoublePuppiTau + hltPreDoublePFTauHPS + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoubleMediumDeepTauPFTauHPS35_eta2p1_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoubleMediumDeepTauPFTauHPS35_eta2p1_cfi.py index 531d39987d757..df658b3ebbaf1 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoubleMediumDeepTauPFTauHPS35_eta2p1_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoubleMediumDeepTauPFTauHPS35_eta2p1_cfi.py @@ -4,7 +4,7 @@ from ..modules.hltHpsDoublePFTau35MediumDitauWPDeepTau_cfi import * from ..modules.hltHpsSelectedPFTausMediumDitauWPDeepTau_cfi import * from ..modules.hltPreDoublePFTauHPS_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTEndSequence_cfi import * @@ -22,8 +22,8 @@ + hltL1SeedForDoublePuppiTau + hltPreDoublePFTauHPS + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepCSV_2p4_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepCSV_2p4_cfi.py index cf5dcf6d00827..3c6a83d41c362 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepCSV_2p4_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepCSV_2p4_cfi.py @@ -4,7 +4,7 @@ from ..modules.hltDoublePFPuppiJets128Eta2p4MaxDeta1p6_cfi import * from ..modules.hltDoublePFPuppiJets128MaxEta2p4_cfi import * from ..modules.hltL1SeedsForDoublePuppiJetBtagFilter_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFPuppiJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTBtagDeepCSVSequencePFPuppiModEta2p4_cfi import * @@ -19,8 +19,8 @@ HLTBeginSequence + hltL1SeedsForDoublePuppiJetBtagFilter + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepFlavour_2p4_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepFlavour_2p4_cfi.py index d0c00e38b4dbd..e6980da9f343b 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepFlavour_2p4_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepFlavour_2p4_cfi.py @@ -4,7 +4,7 @@ from ..modules.hltDoublePFPuppiJets128Eta2p4MaxDeta1p6_cfi import * from ..modules.hltDoublePFPuppiJets128MaxEta2p4_cfi import * from ..modules.hltL1SeedsForDoublePuppiJetBtagFilter_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFPuppiJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTBtagDeepFlavourSequencePFPuppiModEta2p4_cfi import * @@ -19,8 +19,8 @@ HLTBeginSequence + hltL1SeedsForDoublePuppiJetBtagFilter + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_Ele30_WPTight_L1Seeded_LooseDeepTauPFTauHPS30_eta2p1_CrossL1_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_Ele30_WPTight_L1Seeded_LooseDeepTauPFTauHPS30_eta2p1_CrossL1_cfi.py index 5944ad65a21a0..e988cce7c353e 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_Ele30_WPTight_L1Seeded_LooseDeepTauPFTauHPS30_eta2p1_CrossL1_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_Ele30_WPTight_L1Seeded_LooseDeepTauPFTauHPS30_eta2p1_CrossL1_cfi.py @@ -12,7 +12,7 @@ from ..sequences.HLTPFTauHPS_cfi import * from ..sequences.HLTHPSDeepTauPFTauSequence_cfi import * from ..sequences.HLTRawToDigiSequence_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTLocalrecoSequence_cfi import * from ..sequences.HLTTrackingSequence_cfi import * from ..sequences.HLTMuonsSequence_cfi import * @@ -56,8 +56,8 @@ HLTBeginSequence + hltPuppiTauTkIsoEle45_22L1TkFilter + HLTRawToDigiSequence + - HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTDoFullUnpackingEgammaEcalL1SeededSequence + HLTPFClusteringForEgammaL1SeededSequence + HLTHgcalTiclPFClusteringForEgammaL1SeededSequence + diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_IsoMu20_eta2p1_LooseDeepTauPFTauHPS27_eta2p1_CrossL1_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_IsoMu20_eta2p1_LooseDeepTauPFTauHPS27_eta2p1_CrossL1_cfi.py index c63ec3af2fb1b..66360ffa5714c 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_IsoMu20_eta2p1_LooseDeepTauPFTauHPS27_eta2p1_CrossL1_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_IsoMu20_eta2p1_LooseDeepTauPFTauHPS27_eta2p1_CrossL1_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTEndSequence_cfi import * @@ -35,8 +35,8 @@ HLTBeginSequence + hltPuppiTauTkMuon4218L1TkFilter + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_IsoMu24_FromL1TkMuon_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_IsoMu24_FromL1TkMuon_cfi.py index e60c4c91228f1..60a787ddbfb55 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_IsoMu24_FromL1TkMuon_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_IsoMu24_FromL1TkMuon_cfi.py @@ -5,7 +5,7 @@ from ..sequences.HLTRawToDigiSequence_cfi import * from ..sequences.HLTItLocalRecoSequence_cfi import * from ..sequences.HLTOtLocalRecoSequence_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTDoLocalHcalSequence_cfi import * from ..sequences.HLTDoFullUnpackingEgammaEcalSequence_cfi import * from ..sequences.HLTMuonsSequence_cfi import * @@ -13,6 +13,7 @@ from ..sequences.HLTPfClusteringHBHEHFSequence_cfi import * from ..sequences.HLTPFClusteringForEgammaUnseededSequence_cfi import * from ..sequences.HLTPhase2L3MuonGeneralTracksSequence_cfi import * +from ..sequences.HLTPfRecHitUnseededSequence_cfi import * from ..modules.hltSingleTkMuon22L1TkMuonFilter_cfi import * from ..modules.hltPhase2PixelFitterByHelixProjections_cfi import * from ..modules.hltPhase2PixelTrackFilterByKinematics_cfi import * @@ -36,9 +37,10 @@ + hltPhase2PixelTrackFilterByKinematics + HLTMuonsSequence + hltL3fL1TkSingleMu22L3Filtered24Q - + HLTHgcalLocalRecoSequence - + HLTDoLocalHcalSequence + HLTDoFullUnpackingEgammaEcalSequence + + HLTDoLocalHcalSequence + + HLTPfRecHitUnseededSequence + + HLTTICLLocalRecoSequence + HLTFastJetForEgammaSequence + HLTPfClusteringHBHEHFSequence + HLTPFClusteringForEgammaUnseededSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFHT200PT30_QuadPFPuppiJet_70_40_30_30_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFHT200PT30_QuadPFPuppiJet_70_40_30_30_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py index c018094a9d328..8a32a035b864b 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFHT200PT30_QuadPFPuppiJet_70_40_30_30_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFHT200PT30_QuadPFPuppiJet_70_40_30_30_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py @@ -7,7 +7,7 @@ from ..modules.hltPFPuppiCentralJetQuad30MaxEta2p4_cfi import * from ..modules.hltPFPuppiCentralJetsQuad30HT200MaxEta2p4_cfi import * from ..modules.hltL1SeedsForQuadPuppiJetTripleBtagFilter_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFPuppiJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTBtagDeepFlavourSequencePFPuppiModEta2p4_cfi import * @@ -22,8 +22,8 @@ HLTBeginSequence + hltL1SeedsForQuadPuppiJetTripleBtagFilter + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFHT330PT30_QuadPFPuppiJet_75_60_45_40_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFHT330PT30_QuadPFPuppiJet_75_60_45_40_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py index 5ba63ef04d1a4..ce451bafb139f 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFHT330PT30_QuadPFPuppiJet_75_60_45_40_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFHT330PT30_QuadPFPuppiJet_75_60_45_40_TriplePFPuppiBTagDeepFlavour_2p4_cfi.py @@ -9,7 +9,7 @@ from ..modules.hltPFPuppiCentralJetQuad30MaxEta2p4_cfi import * from ..modules.hltPFPuppiCentralJetsQuad30HT330MaxEta2p4_cfi import * from ..modules.hltL1SeedsForQuadPuppiJetTripleBtagFilter_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFPuppiJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTBtagDeepFlavourSequencePFPuppiModEta2p4_cfi import * @@ -24,8 +24,8 @@ HLTBeginSequence + hltL1SeedsForQuadPuppiJetTripleBtagFilter + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFPuppiHT1070_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFPuppiHT1070_cfi.py index 302b66e9064da..2258110b952f9 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFPuppiHT1070_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFPuppiHT1070_cfi.py @@ -3,7 +3,7 @@ from ..modules.hltPFPuppiHT_cfi import * from ..modules.hltPFPuppiHT1070_cfi import * from ..modules.hltL1SeedsForPuppiHTFilter_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFPuppiJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTEndSequence_cfi import * @@ -17,8 +17,8 @@ HLTBeginSequence + hltL1SeedsForPuppiHTFilter + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFPuppiMETTypeOne140_PFPuppiMHT140_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFPuppiMETTypeOne140_PFPuppiMHT140_cfi.py index f7bf85bdfd9c2..a4ba6be018c84 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFPuppiMETTypeOne140_PFPuppiMHT140_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/HLT_PFPuppiMETTypeOne140_PFPuppiMHT140_cfi.py @@ -6,7 +6,7 @@ from ..modules.hltPFPuppiMHT_cfi import * from ..modules.hltPFPuppiMHT140_cfi import * from ..modules.hltL1SeedsForPuppiMETFilter_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFPuppiJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTEndSequence_cfi import * @@ -21,8 +21,8 @@ HLTBeginSequence + hltL1SeedsForPuppiMETFilter + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/MC_BTV_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/MC_BTV_cfi.py index d13982ea94136..890465ae14b48 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/MC_BTV_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/MC_BTV_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTAK4PFPuppiJetsReconstruction_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTBtagDeepCSVSequencePFPuppi_cfi import * @@ -14,8 +14,8 @@ MC_BTV = cms.Path( HLTBeginSequence + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/MC_JME_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/MC_JME_cfi.py index 18961eb88cdab..89c4515b30bab 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/MC_JME_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/MC_JME_cfi.py @@ -2,7 +2,7 @@ from ..modules.hltPFPuppiHT_cfi import * from ..modules.hltPFPuppiMHT_cfi import * -from ..sequences.HLTHgcalLocalRecoSequence_cfi import * +from ..sequences.HLTTICLLocalRecoSequence_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTHgcalTiclPFClusteringForEgamma_cfi import * from ..sequences.HLTJMESequence_cfi import * @@ -15,8 +15,8 @@ MC_JME = cms.Path( HLTBeginSequence + HLTRawToDigiSequence - + HLTHgcalLocalRecoSequence + HLTLocalrecoSequence + + HLTTICLLocalRecoSequence + HLTTrackingSequence + HLTMuonsSequence + HLTParticleFlowSequence diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDiphoton3023IsoCaloIdUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDiphoton3023IsoCaloIdUnseededSequence_cfi.py index 2b17497fcb5ce..5896d449e1e60 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDiphoton3023IsoCaloIdUnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDiphoton3023IsoCaloIdUnseededSequence_cfi.py @@ -30,6 +30,7 @@ HLTDiphoton3023IsoCaloIdUnseededSequence = cms.Sequence(hltEGL1SeedsForDoublePhotonIsolatedFilter +HLTDoFullUnpackingEgammaEcalSequence + +HLTEGammaDoLocalHcalSequence +HLTPFClusteringForEgammaUnseededSequence +HLTHgcalTiclPFClusteringForEgammaUnseededSequence +hltEgammaCandidatesUnseeded @@ -42,7 +43,6 @@ +hltDiEG3023IsoCaloIdClusterShapeSigmavvUnseededFilter +hltDiEG3023IsoCaloIdClusterShapeSigmawwUnseededFilter +hltDiEG3023IsoCaloIdHgcalHEUnseededFilter - +HLTEGammaDoLocalHcalSequence +HLTFastJetForEgammaSequence +hltEgammaHoverEUnseeded +hltDiEG3023IsoCaloIdHEUnseededFilter diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py index 8519652f01f49..b470c3c720bdf 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDoubleEle25CaloIdLPMS2UnseededSequence_cfi.py @@ -25,6 +25,7 @@ HLTDoubleEle25CaloIdLPMS2UnseededSequence = cms.Sequence(HLTL1Sequence +hltEGL1SeedsForDoubleEleNonIsolatedFilter +HLTDoFullUnpackingEgammaEcalSequence + +HLTEGammaDoLocalHcalSequence +HLTPFClusteringForEgammaUnseededSequence +HLTHgcalTiclPFClusteringForEgammaUnseededSequence +hltEgammaCandidatesUnseeded @@ -35,7 +36,6 @@ +hltEgammaHGCALIDVarsUnseeded +hltDiEG25CaloIdLClusterShapeSigmavvUnseededFilter +hltDiEG25CaloIdLHgcalHEUnseededFilter - +HLTEGammaDoLocalHcalSequence +HLTFastJetForEgammaSequence +hltEgammaHoverEUnseeded +hltDiEG25CaloIdLHEUnseededFilter diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTEle26WP70UnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTEle26WP70UnseededSequence_cfi.py index 5f5bbdd499c62..35b32c7201a44 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTEle26WP70UnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTEle26WP70UnseededSequence_cfi.py @@ -42,6 +42,7 @@ HLTEle26WP70UnseededSequence = cms.Sequence(hltEGL1SeedsForSingleEleIsolatedFilter +HLTDoFullUnpackingEgammaEcalSequence + +HLTEGammaDoLocalHcalSequence +HLTPFClusteringForEgammaUnseededSequence +HLTHgcalTiclPFClusteringForEgammaUnseededSequence +hltEgammaCandidatesUnseeded @@ -53,7 +54,6 @@ +hltEle26WP70ClusterShapeSigmavvUnseededFilter +hltEle26WP70ClusterShapeSigmawwUnseededFilter +hltEle26WP70HgcalHEUnseededFilter - +HLTEGammaDoLocalHcalSequence +HLTFastJetForEgammaSequence +hltEgammaHoverEUnseeded +hltEle26WP70HEUnseededFilter diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTEle32WPTightUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTEle32WPTightUnseededSequence_cfi.py index e4169c46ea1fe..099b28e3e0259 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTEle32WPTightUnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTEle32WPTightUnseededSequence_cfi.py @@ -43,6 +43,7 @@ HLTEle32WPTightUnseededSequence = cms.Sequence( hltEGL1SeedsForSingleEleIsolatedFilter +HLTDoFullUnpackingEgammaEcalSequence + +HLTEGammaDoLocalHcalSequence +HLTPFClusteringForEgammaUnseededSequence +HLTHgcalTiclPFClusteringForEgammaUnseededSequence +hltEgammaCandidatesUnseeded @@ -54,7 +55,6 @@ +hltEle32WPTightClusterShapeSigmavvUnseededFilter +hltEle32WPTightClusterShapeSigmawwUnseededFilter +hltEle32WPTightHgcalHEUnseededFilter - +HLTEGammaDoLocalHcalSequence +HLTFastJetForEgammaSequence +hltEgammaHoverEUnseeded +hltEle32WPTightHEUnseededFilter diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py index 12e86e744e8c8..29ad3f7644bf9 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaL1SeededSequence_cfi.py @@ -6,7 +6,7 @@ from ..modules.hltHgcalLayerClustersEEL1Seeded_cfi import * from ..modules.hltHgcalLayerClustersHSciL1Seeded_cfi import * from ..modules.hltHgcalLayerClustersHSiL1Seeded_cfi import * -from ..modules.hltHgcalMergeLayerClustersL1Seeded_cfi import * +from ..modules.hltMergeLayerClustersL1Seeded_cfi import * from ..modules.hltHGCalRecHitL1Seeded_cfi import * from ..modules.hltHGCalUncalibRecHitL1Seeded_cfi import * from ..modules.hltL1TEGammaHGCFilteredCollectionProducer_cfi import * @@ -20,7 +20,7 @@ from ..modules.hltTiclTracksterLinksL1Seeded_cfi import * from ..modules.hltBarrelLayerClustersEBL1Seeded_cfi import * -_HgcalLocalRecoL1SeededSequence = cms.Sequence(hltHgcalDigis+hltL1TEGammaHGCFilteredCollectionProducer+hltHgcalDigisL1Seeded+hltHGCalUncalibRecHitL1Seeded+hltHGCalRecHitL1Seeded+hltParticleFlowRecHitHGCL1Seeded+hltRechitInRegionsHGCAL+hltHgcalLayerClustersEEL1Seeded+hltHgcalLayerClustersHSciL1Seeded+hltHgcalLayerClustersHSiL1Seeded+hltHgcalMergeLayerClustersL1Seeded) +_HgcalLocalRecoL1SeededSequence = cms.Sequence(hltHgcalDigis+hltL1TEGammaHGCFilteredCollectionProducer+hltHgcalDigisL1Seeded+hltHGCalUncalibRecHitL1Seeded+hltHGCalRecHitL1Seeded+hltParticleFlowRecHitHGCL1Seeded+hltRechitInRegionsHGCAL+hltHgcalLayerClustersEEL1Seeded+hltHgcalLayerClustersHSciL1Seeded+hltHgcalLayerClustersHSiL1Seeded+hltMergeLayerClustersL1Seeded) _HgcalTICLPatternRecognitionL1SeededSequence = cms.Sequence(hltFilteredLayerClustersCLUE3DHighL1Seeded+hltTiclSeedingL1+hltTiclLayerTileProducerL1Seeded+hltTiclTrackstersCLUE3DHighL1Seeded) _SuperclusteringL1SeededSequence = cms.Sequence(hltParticleFlowClusterHGCalFromTICLL1Seeded+hltParticleFlowSuperClusterHGCalFromTICLL1Seeded) @@ -50,7 +50,7 @@ hltTiclEGammaSuperClusterProducerL1Seeded = _ticlEGammaSuperClusterProducer.clone( ticlSuperClusters = "hltTiclTracksterLinksSuperclusteringDNNL1Seeded", ticlTrackstersEM = "hltTiclTrackstersCLUE3DHighL1Seeded", - layerClusters = "hltHgcalMergeLayerClustersL1Seeded" + layerClusters = "hltMergeLayerClustersL1Seeded" ) # DNN @@ -73,7 +73,7 @@ ticl_superclustering_mustache_ticl.toModify(hltTiclEGammaSuperClusterProducerL1Seeded, ticlSuperClusters=cms.InputTag("hltTiclTracksterLinksSuperclusteringMustacheL1Seeded"), ticlTrackstersEM=cms.InputTag("hltTiclTrackstersCLUE3DHighL1Seeded"), - layerClusters=cms.InputTag("hltHgcalMergeLayerClustersL1Seeded"), + layerClusters=cms.InputTag("hltMergeLayerClustersL1Seeded"), enableRegression=cms.bool(False) ) @@ -90,6 +90,6 @@ hltHgcalLayerClustersHSciL1Seeded+ hltHgcalLayerClustersHSiL1Seeded+ hltBarrelLayerClustersEBL1Seeded+ - hltHgcalMergeLayerClustersL1Seeded + hltMergeLayerClustersL1Seeded ) ticl_barrel.toReplaceWith(_HgcalLocalRecoL1SeededSequence, _HgcalLocalRecoL1SeededSequence_barrel) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py index 971bd9b8f6968..4c278d3e9c8f0 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py @@ -5,7 +5,7 @@ from ..modules.hltHgcalLayerClustersEE_cfi import * from ..modules.hltHgcalLayerClustersHSci_cfi import * from ..modules.hltHgcalLayerClustersHSi_cfi import * -from ..modules.hltHgcalMergeLayerClusters_cfi import * +from ..modules.hltMergeLayerClusters_cfi import * from ..modules.hltHGCalRecHit_cfi import * from ..modules.hltHGCalUncalibRecHit_cfi import * from ..modules.hltParticleFlowClusterHGCalFromTICLUnseeded_cfi import * @@ -22,7 +22,7 @@ # Barrel layer clusters from ..modules.hltBarrelLayerClustersEB_cfi import * from ..modules.hltBarrelLayerClustersHB_cfi import * -_HgcalLocalRecoUnseededSequence = cms.Sequence(hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltHgcalMergeLayerClusters) +_HgcalLocalRecoUnseededSequence = cms.Sequence(hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltMergeLayerClusters) _HgcalTICLPatternRecognitionUnseededSequence = cms.Sequence(hltFilteredLayerClustersCLUE3DHigh+hltTiclSeedingGlobal+hltTiclLayerTileProducer+hltTiclTrackstersCLUE3DHigh) _SuperclusteringUnseededSequence = cms.Sequence(hltParticleFlowClusterHGCalFromTICLUnseeded+hltParticleFlowSuperClusterHGCalFromTICLUnseeded) @@ -42,9 +42,7 @@ + hltHgCalLayerClustersFromSoAProducer + hltHgcalLayerClustersHSci + hltHgcalLayerClustersHSi - + hltBarrelLayerClustersEB - + hltBarrelLayerClustersHB - + hltHgcalMergeLayerClusters + + hltMergeLayerClusters ) ) @@ -71,7 +69,7 @@ hltTiclEGammaSuperClusterProducerUnseeded = _ticlEGammaSuperClusterProducer.clone( ticlSuperClusters = "hltTiclTracksterLinksSuperclusteringDNNUnseeded", ticlTrackstersEM = "hltTiclTrackstersCLUE3DHigh", - layerClusters = "hltHgcalMergeLayerClusters" + layerClusters = "hltMergeLayerClusters" ) # DNN @@ -94,7 +92,7 @@ ticl_superclustering_mustache_ticl.toModify(hltTiclEGammaSuperClusterProducerUnseeded, ticlSuperClusters=cms.InputTag("hltTiclTracksterLinksSuperclusteringMustacheUnseeded"), ticlTrackstersEM=cms.InputTag("hltTiclTrackstersCLUE3DHigh"), - layerClusters=cms.InputTag("hltHgcalMergeLayerClusters"), + layerClusters=cms.InputTag("hltMergeLayerClusters"), enableRegression=cms.bool(False) ) @@ -102,4 +100,10 @@ _HgcalLocalRecoUnseededSequence_barrel += hltBarrelLayerClustersEB _HgcalLocalRecoUnseededSequence_barrel += hltBarrelLayerClustersHB from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel -ticl_barrel.toReplaceWith(_HgcalLocalRecoUnseededSequence, _HgcalLocalRecoUnseededSequence_barrel) \ No newline at end of file +ticl_barrel.toReplaceWith(_HgcalLocalRecoUnseededSequence, _HgcalLocalRecoUnseededSequence_barrel) +layerClusters = cms.VInputTag("hltHgcalLayerClustersEE", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi", "hltBarrelLayerClustersEB", "hltBarrelLayerClustersHB") +time_layerClusters = cms.VInputTag("hltHgcalLayerClustersEE:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster", "hltBarrelLayerClustersEB:timeLayerCluster", "hltBarrelLayerClustersHB:timeLayerCluster") +ticl_barrel.toModify(hltMergeLayerClusters, layerClusters=layerClusters, time_layerclusters=time_layerClusters) +layerClusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi", "hltBarrelLayerClustersEB", "hltBarrelLayerClustersHB") +time_layerClusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster", "hltBarrelLayerClustersEB:timeLayerCluster", "hltBarrelLayerClustersHB:timeLayerCluster") +(ticl_barrel & alpaka).toModify(hltMergeLayerClusters, layerClusters=layerClusters, time_layerclusters=time_layerClusters) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py index d338b7774e3b8..dd22eac97532f 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py @@ -5,7 +5,7 @@ from ..modules.hltHgcalLayerClustersEE_cfi import * from ..modules.hltHgcalLayerClustersHSci_cfi import * from ..modules.hltHgcalLayerClustersHSi_cfi import * -from ..modules.hltHgcalMergeLayerClusters_cfi import * +from ..modules.hltMergeLayerClusters_cfi import * from ..modules.hltHGCalRecHit_cfi import * from ..modules.hltHGCalUncalibRecHit_cfi import * from ..modules.hltParticleFlowClusterHGCal_cfi import * @@ -17,7 +17,7 @@ # Barrel layer clusters from ..modules.hltBarrelLayerClustersEB_cfi import * from ..modules.hltBarrelLayerClustersHB_cfi import * -HLTHgcalTiclPFClusteringForEgamma = cms.Sequence((hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltHgcalMergeLayerClusters+hltFilteredLayerClustersCLUE3DHigh+hltTiclSeedingGlobal+hltTiclLayerTileProducer+hltTiclTrackstersCLUE3DHigh+hltParticleFlowClusterHGCal+hltParticleFlowSuperClusterHGCal)) +HLTHgcalTiclPFClusteringForEgamma = cms.Sequence((hltHgcalDigis+hltHGCalUncalibRecHit+hltHGCalRecHit+hltParticleFlowRecHitHGC+hltHgcalLayerClustersEE+hltHgcalLayerClustersHSci+hltHgcalLayerClustersHSi+hltMergeLayerClusters+hltFilteredLayerClustersCLUE3DHigh+hltTiclSeedingGlobal+hltTiclLayerTileProducer+hltTiclTrackstersCLUE3DHigh+hltParticleFlowClusterHGCal+hltParticleFlowSuperClusterHGCal)) HLTHgcalTiclPFClusteringForEgamma_barrel = cms.Sequence(( hltHgcalDigis+ @@ -29,7 +29,7 @@ hltHgcalLayerClustersHSi+ hltBarrelLayerClustersEB+ hltBarrelLayerClustersHB+ - hltHgcalMergeLayerClusters+ + hltMergeLayerClusters+ hltFilteredLayerClustersCLUE3DHigh+ hltTiclSeedingGlobal+ hltTiclLayerTileProducer+ diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTParticleFlowSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTParticleFlowSequence_cfi.py index 151c3de1d78d0..dc0ce6773fb45 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTParticleFlowSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTParticleFlowSequence_cfi.py @@ -2,9 +2,10 @@ from ..sequences.HLTCaloTowersRecSequence_cfi import * from ..sequences.HLTIterTICLSequence_cfi import * +from ..sequences.HLTPfRecHitUnseededSequence_cfi import * from ..sequences.HLTParticleFlowClusterSequence_cfi import * from ..sequences.HLTParticleFlowRecoSequence_cfi import * from ..sequences.HLTParticleFlowSuperClusteringSequence_cfi import * from ..sequences.HLTVertexRecoSequence_cfi import * -HLTParticleFlowSequence = cms.Sequence(HLTParticleFlowClusterSequence+HLTIterTICLSequence+HLTVertexRecoSequence+HLTParticleFlowSuperClusteringSequence+HLTCaloTowersRecSequence+HLTParticleFlowRecoSequence) +HLTParticleFlowSequence = cms.Sequence(HLTPfRecHitUnseededSequence+HLTParticleFlowClusterSequence+HLTIterTICLSequence+HLTVertexRecoSequence+HLTParticleFlowSuperClusteringSequence+HLTCaloTowersRecSequence+HLTParticleFlowRecoSequence) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfClusteringECALSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfClusteringECALSequence_cfi.py index 3be92338dc38b..866fc78fccdf2 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfClusteringECALSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfClusteringECALSequence_cfi.py @@ -1,7 +1,6 @@ import FWCore.ParameterSet.Config as cms from ..modules.hltParticleFlowClusterECALUncorrected_cfi import * -from ..modules.hltParticleFlowRecHitECALUnseeded_cfi import * from ..sequences.HLTParticleFlowClusterECALSequence_cfi import * -HLTPfClusteringECALSequence = cms.Sequence(hltParticleFlowRecHitECALUnseeded+hltParticleFlowClusterECALUncorrected+HLTParticleFlowClusterECALSequence) +HLTPfClusteringECALSequence = cms.Sequence(hltParticleFlowClusterECALUncorrected+HLTParticleFlowClusterECALSequence) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfClusteringHBHEHFSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfClusteringHBHEHFSequence_cfi.py index c07456d49f741..e34a95bc99a65 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfClusteringHBHEHFSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfClusteringHBHEHFSequence_cfi.py @@ -2,8 +2,7 @@ from ..modules.hltParticleFlowClusterHBHE_cfi import * from ..modules.hltParticleFlowClusterHCAL_cfi import * -from ..modules.hltParticleFlowRecHitHBHE_cfi import * from ..modules.hltParticleFlowClusterHF_cfi import * from ..modules.hltParticleFlowRecHitHF_cfi import * -HLTPfClusteringHBHEHFSequence = cms.Sequence(hltParticleFlowRecHitHBHE+hltParticleFlowClusterHBHE+hltParticleFlowClusterHCAL+hltParticleFlowRecHitHF+hltParticleFlowClusterHF) +HLTPfClusteringHBHEHFSequence = cms.Sequence(hltParticleFlowClusterHBHE+hltParticleFlowClusterHCAL+hltParticleFlowRecHitHF+hltParticleFlowClusterHF) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfRecHitUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfRecHitUnseededSequence_cfi.py new file mode 100644 index 0000000000000..a3ed8e2c264b6 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPfRecHitUnseededSequence_cfi.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +from ..modules.hltParticleFlowRecHitECALUnseeded_cfi import * +from ..modules.hltParticleFlowRecHitHBHE_cfi import * + +HLTPfRecHitUnseededSequence = cms.Sequence(hltParticleFlowRecHitECALUnseeded+hltParticleFlowRecHitHBHE) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton108EBTightIDTightIsoUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton108EBTightIDTightIsoUnseededSequence_cfi.py index 52c1b68e06a5b..a14b98f1aa9d8 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton108EBTightIDTightIsoUnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton108EBTightIDTightIsoUnseededSequence_cfi.py @@ -23,6 +23,7 @@ HLTPhoton108EBTightIDTightIsoUnseededSequence = cms.Sequence(hltEGL1SeedsForSinglePhotonIsolatedFilter +HLTDoFullUnpackingEgammaEcalSequence + +HLTEGammaDoLocalHcalSequence +HLTPFClusteringForEgammaUnseededSequence +HLTHgcalTiclPFClusteringForEgammaUnseededSequence +hltEgammaCandidatesUnseeded @@ -30,7 +31,6 @@ +hltEG108EtUnseededFilter +hltEgammaClusterShapeUnseeded +hltPhoton108EBTightIDTightIsoClusterShapeUnseededFilter - +HLTEGammaDoLocalHcalSequence +HLTFastJetForEgammaSequence +hltEgammaHoverEUnseeded +hltPhoton108EBTightIDTightIsoHEUnseededFilter diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton187UnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton187UnseededSequence_cfi.py index 20a889e134f78..40dbe8e1f745f 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton187UnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTPhoton187UnseededSequence_cfi.py @@ -18,6 +18,7 @@ HLTPhoton187UnseededSequence = cms.Sequence(l1tTkEmSingle51Filter +HLTDoFullUnpackingEgammaEcalSequence + +HLTEGammaDoLocalHcalSequence +HLTPFClusteringForEgammaUnseededSequence +HLTHgcalTiclPFClusteringForEgammaUnseededSequence +hltEgammaCandidatesUnseeded @@ -25,7 +26,6 @@ +hltEG187EtUnseededFilter +hltEgammaHGCALIDVarsUnseeded +hltPhoton187HgcalHEUnseededFilter - +HLTEGammaDoLocalHcalSequence +HLTFastJetForEgammaSequence +hltEgammaHoverEUnseeded +hltPhoton187HEUnseededFilter) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py index 1fae42dd9a27d..bfc5b718b27e4 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py @@ -3,7 +3,7 @@ from ..modules.hltHgcalLayerClustersEE_cfi import * from ..modules.hltHgcalLayerClustersHSci_cfi import * from ..modules.hltHgcalLayerClustersHSi_cfi import * -from ..modules.hltHgcalMergeLayerClusters_cfi import * +from ..modules.hltMergeLayerClusters_cfi import * from ..modules.hltHGCalRecHit_cfi import * from ..modules.hltHGCalUncalibRecHit_cfi import * # Heterogeneous HGCAL EE layer clusters @@ -12,8 +12,11 @@ from ..modules.hltHgcalSoALayerClustersProducer_cfi import * from ..modules.hltHgcalLayerClustersFromSoAProducer_cfi import * # Barrel layer clusters +from ..modules.hltParticleFlowRecHitECALUnseeded_cfi import * +from ..modules.hltParticleFlowRecHitHBHE_cfi import * from ..modules.hltBarrelLayerClustersEB_cfi import * from ..modules.hltBarrelLayerClustersHB_cfi import * +from ..sequences.HLTPfRecHitUnseededSequence_cfi import * HLTTICLLocalRecoSequence = cms.Sequence( hltHGCalUncalibRecHit+ @@ -36,16 +39,18 @@ hltBarrelLayerClustersHB+ hltMergeLayerClusters) +layerClusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi") +time_layerclusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster") from Configuration.ProcessModifiers.alpaka_cff import alpaka alpaka.toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_heterogeneous) - _HLTTICLLocalRecoSequence_withBarrel = cms.Sequence( hltHGCalUncalibRecHit+ hltHGCalRecHit+ hltHgcalLayerClustersEE+ hltHgcalLayerClustersHSci+ hltHgcalLayerClustersHSi+ + HLTPfRecHitUnseededSequence+ hltBarrelLayerClustersEB+ hltBarrelLayerClustersHB+ hltMergeLayerClusters @@ -60,11 +65,18 @@ hltHgCalLayerClustersFromSoAProducer+ hltHgcalLayerClustersHSci+ hltHgcalLayerClustersHSi+ + HLTPfRecHitUnseededSequence+ hltBarrelLayerClustersEB+ hltBarrelLayerClustersHB+ - hltHgcalMergeLayerClusters + hltMergeLayerClusters ) +layerClusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi", "hltBarrelLayerClustersEB", "hltBarrelLayerClustersHB") +time_layerclusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster", "hltBarrelLayerClustersEB:timeLayerCluster", "hltBarrelLayerClustersHB:timeLayerCluster") from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel ticl_barrel.toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_withBarrel) (ticl_barrel & alpaka).toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_heterogeneous_withBarrel) +(ticl_barrel & alpaka).toModify(hltMergeLayerClusters, + layerClusters = layerClusters, + time_layerclusters = time_layerclusters +) diff --git a/HLTrigger/Configuration/python/HLT_75e33_cff.py b/HLTrigger/Configuration/python/HLT_75e33_cff.py index d54286fce38bd..8518bbac29c85 100644 --- a/HLTrigger/Configuration/python/HLT_75e33_cff.py +++ b/HLTrigger/Configuration/python/HLT_75e33_cff.py @@ -226,7 +226,7 @@ fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTCsclocalrecoSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTDtlocalrecoSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTGemLocalRecoSequence_cfi") -fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTHighPtTripletStepSeedingSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTHighPtTripletStepSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTAK4PFJetsReconstruction_cfi") diff --git a/HLTrigger/Configuration/python/HLT_75e33_timing_cff.py b/HLTrigger/Configuration/python/HLT_75e33_timing_cff.py index 6649f8a946bec..bb75f637219af 100644 --- a/HLTrigger/Configuration/python/HLT_75e33_timing_cff.py +++ b/HLTrigger/Configuration/python/HLT_75e33_timing_cff.py @@ -220,7 +220,7 @@ fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTCsclocalrecoSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTDtlocalrecoSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTGemLocalRecoSequence_cfi") -fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTHighPtTripletStepSeedingSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTHighPtTripletStepSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTAK4PFJetsReconstruction_cfi") diff --git a/RecoHGCal/TICL/python/HLTSimTracksters_cff.py b/RecoHGCal/TICL/python/HLTSimTracksters_cff.py index d8956ae9d913c..afbcbdfe0a0a0 100644 --- a/RecoHGCal/TICL/python/HLTSimTracksters_cff.py +++ b/RecoHGCal/TICL/python/HLTSimTracksters_cff.py @@ -8,8 +8,8 @@ # CA - PATTERN RECOGNITION hltFilteredLayerClustersSimTracksters = _filteredLayerClustersProducer.clone( - LayerClusters = cms.InputTag("hltHgcalMergeLayerClusters"), - LayerClustersInputMask = cms.InputTag("hltHgcalMergeLayerClusters","InitialLayerClustersMask"), + LayerClusters = cms.InputTag("hltMergeLayerClusters"), + LayerClustersInputMask = cms.InputTag("hltMergeLayerClusters","InitialLayerClustersMask"), clusterFilter = "ClusterFilterByAlgoAndSize", min_cluster_size = 0, # inclusive iteration_label = "hltTiclSimTracksters" @@ -23,8 +23,8 @@ layerClusterCaloParticleAssociator = cms.InputTag("hltLayerClusterCaloParticleAssociationProducer"), layerClusterSimClusterAssociator = cms.InputTag("hltLayerClusterSimClusterAssociationProducer"), filtered_mask = cms.InputTag("hltFilteredLayerClustersSimTracksters","hltTiclSimTracksters"), - layer_clusters = cms.InputTag("hltHgcalMergeLayerClusters"), - time_layerclusters = cms.InputTag("hltHgcalMergeLayerClusters","timeLayerCluster"), + layer_clusters = cms.InputTag("hltMergeLayerClusters"), + time_layerclusters = cms.InputTag("hltMergeLayerClusters","timeLayerCluster"), simTrackToTPMap = cms.InputTag("simHitTPAssocProducer","simTrackToTP"), recoTracks = cms.InputTag("hltGeneralTracks"), simclusters = cms.InputTag("mix","MergedCaloTruth"), diff --git a/Validation/Configuration/python/hltHGCalSimValid_cff.py b/Validation/Configuration/python/hltHGCalSimValid_cff.py index e88f3083529c9..567a4f6a081be 100644 --- a/Validation/Configuration/python/hltHGCalSimValid_cff.py +++ b/Validation/Configuration/python/hltHGCalSimValid_cff.py @@ -18,7 +18,6 @@ EEInput = cms.InputTag("hltHGCalRecHit","HGCEERecHits"), FHInput = cms.InputTag("hltHGCalRecHit","HGCHEFRecHits"), HBInput = cms.InputTag("hltParticleFlowRecHitHBHE"), - HOInput = cms.InputTag("hltParticleFlowRecHitHO"), hgcalOnly = cms.bool(True), ) @@ -34,18 +33,18 @@ hltLayerClusterCaloParticleAssociationProducer = _layerClusterCaloParticleAssociationProducer.clone( associator = cms.InputTag("hltLcAssocByEnergyScoreProducer"), - label_lc = cms.InputTag("hltHgcalMergeLayerClusters") + label_lc = cms.InputTag("hltMergeLayerClusters") ) hltLayerClusterSimClusterAssociationProducer = _layerClusterSimClusterAssociationProducer.clone( associator = cms.InputTag("hltScAssocByEnergyScoreProducer"), - label_lcl = cms.InputTag("hltHgcalMergeLayerClusters") + label_lcl = cms.InputTag("hltMergeLayerClusters") ) from SimCalorimetry.HGCalAssociatorProducers.AllLayerClusterToTracksterAssociatorsProducer_cfi import AllLayerClusterToTracksterAssociatorsProducer as _AllLayerClusterToTracksterAssociatorsProducer hltAllLayerClusterToTracksterAssociations = _AllLayerClusterToTracksterAssociatorsProducer.clone( - layer_clusters = cms.InputTag("hltHgcalMergeLayerClusters"), + layer_clusters = cms.InputTag("hltMergeLayerClusters"), tracksterCollections = cms.VInputTag( *[cms.InputTag(label) for label in _hltTiclIterLabels], cms.InputTag("hltTiclSimTracksters"), @@ -55,7 +54,7 @@ hltAllTrackstersToSimTrackstersAssociationsByLCs = _allTrackstersToSimTrackstersAssociationsByLCs.clone( allLCtoTSAccoc = cms.string("hltAllLayerClusterToTracksterAssociations"), - layerClusters = cms.InputTag("hltHgcalMergeLayerClusters"), + layerClusters = cms.InputTag("hltMergeLayerClusters"), tracksterCollections = cms.VInputTag( *[cms.InputTag(label) for label in _hltTiclIterLabels] ), @@ -77,7 +76,7 @@ hltAllHitToTracksterAssociations = _AllHitToTracksterAssociatorsProducer.clone( hitMapTag = cms.InputTag("hltRecHitMapProducer","hgcalRecHitMap"), hits = cms.VInputTag("hltHGCalRecHit:HGCEERecHits", "hltHGCalRecHit:HGCHEFRecHits", "hltHGCalRecHit:HGCHEBRecHits"), - layerClusters = cms.InputTag("hltHgcalMergeLayerClusters"), + layerClusters = cms.InputTag("hltMergeLayerClusters"), tracksterCollections = cms.VInputTag( *[cms.InputTag(label) for label in _hltTiclIterLabels], cms.InputTag("hltTiclSimTracksters"), diff --git a/Validation/HGCalValidation/plugins/BarrelValidator.cc b/Validation/HGCalValidation/plugins/BarrelValidator.cc index 3e4e3f2cb8d15..f60df6c27c288 100644 --- a/Validation/HGCalValidation/plugins/BarrelValidator.cc +++ b/Validation/HGCalValidation/plugins/BarrelValidator.cc @@ -471,10 +471,10 @@ void BarrelValidator::fillDescriptions(edm::ConfigurationDescriptions& descripti psd1.add("maxTotNsimClsperlay", 50.0); psd1.add("nintTotNsimClsperlay", 50); psd1.add("minTotNClsperlay", 0.0); - psd1.add("maxTotNClsperlay", 100.0); + psd1.add("maxTotNClsperlay", 1000.0); psd1.add("nintTotNClsperlay", 50); psd1.add("minEneClperlay", 0.0); - psd1.add("maxEneClperlay", 110.0); + psd1.add("maxEneClperlay", 1000.0); psd1.add("nintEneClperlay", 110); psd1.add("minScore", 0.0); psd1.add("maxScore", 1.02); diff --git a/Validation/HGCalValidation/python/HLTHGCalValidator_cff.py b/Validation/HGCalValidation/python/HLTHGCalValidator_cff.py index f45132210c383..1b3a6704d87f6 100644 --- a/Validation/HGCalValidation/python/HLTHGCalValidator_cff.py +++ b/Validation/HGCalValidation/python/HLTHGCalValidator_cff.py @@ -22,7 +22,7 @@ hitMap = cms.InputTag("hltRecHitMapProducer","hgcalRecHitMap"), simTrackstersMap = cms.InputTag("hltTiclSimTracksters"), label_layerClusterPlots = cms.InputTag("hltHgcalMergeLayerClusters"), - label_lcl = cms.InputTag("hltHgcalMergeLayerClusters"), + label_lcl = cms.InputTag("hltMergeLayerClusters"), label_simTS = cms.InputTag("hltTiclSimTracksters"), label_simTSFromCP = cms.InputTag("hltTiclSimTracksters","fromCPs"), recoTracks = cms.InputTag("hltGeneralTracks"), @@ -46,3 +46,4 @@ mergeSimToRecoAssociator = cms.InputTag("hltAllTrackstersToSimTrackstersAssociationsByLCs:hltTiclSimTrackstersfromCPsTohltTiclCandidate"), mergeRecoToSimAssociator = cms.InputTag("hltAllTrackstersToSimTrackstersAssociationsByLCs:hltTiclCandidateTohltTiclSimTrackstersfromCPs"), ) + From ae10daa5f906116958e0d48e4b9b3d7512034008 Mon Sep 17 00:00:00 2001 From: brusale Date: Sun, 11 May 2025 20:01:24 +0200 Subject: [PATCH 5/9] wf with CP from PU --- .../python/upgradeWorkflowComponents.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index b6c9a069dcfa1..8a6b9cb3c6d8a 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -1028,6 +1028,37 @@ def condition(self, fragment, stepList, key, hasHarvest): upgradeWFs['ticl_barrel'].step3 = {'--procModifiers': 'ticl_barrel'} upgradeWFs['ticl_barrel'].step4 = {'--procModifiers': 'ticl_barrel'} +class UpgradeWorkflow_ticl_barrel_CPfromPU(UpgradeWorkflow): + def setup_(self, step, stepName, stepDict, k, properties): + if ('Digi' in step and 'NoHLT' not in step) or ('HLTOnly' in step): + stepDict[stepName][k] = merge([self.step2, stepDict[step][k]]) + if 'RecoGlobal' in step: + stepDict[stepName][k] = merge([self.step3, stepDict[step][k]]) + if 'HARVESTGlobal' in step: + stepDict[stepName][k] = merge([self.step4, stepDict[step][k]]) + def condition(self, fragment, stepList, key, hasHarvest): + return ('CloseByPGun_Barrel') in fragment and ('Run4' in key) and ('PU' in key) + +upgradeWFs['ticl_barrel_CPfromPU'] = UpgradeWorkflow_ticl_barrel_CPfromPU( + steps = [ + 'HLTOnly', + 'DigiTrigger', + 'RecoGlobal', + 'HARVESTGlobal' + ], + PU = [ + 'HLTOnly', + 'DigiTrigger', + 'RecoGlobal', + 'HARVESTGlobal' + ], + suffix = '_ticl_barrel_CPfromPU', + offset = 0.2091, +) +upgradeWFs['ticl_barrel_CPfromPU'].step2 = {'--procModifiers': 'ticl_barrel,enableCPfromPU'} +upgradeWFs['ticl_barrel_CPfromPU'].step3 = {'--procModifiers': 'ticl_barrel,enableCPfromPU'} +upgradeWFs['ticl_barrel_CPfromPU'].step4 = {'--procModifiers': 'ticl_barrel,enableCPfromPU'} + # L3 Tracker Muon Outside-In reconstruction first class UpgradeWorkflow_phase2L3MuonsOIFirst(UpgradeWorkflow): def setup_(self, step, stepName, stepDict, k, properties): From d918b9c185720eedc0c7c4d523e8c89b33cab949 Mon Sep 17 00:00:00 2001 From: brusale Date: Thu, 15 May 2025 09:14:34 +0200 Subject: [PATCH 6/9] fix NGT scouting and minor fixes --- Configuration/EventContent/python/EventContent_cff.py | 1 - .../HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py | 3 ++- .../Configuration/python/HLT_75e33/paths/DST_PFScouting_cfi.py | 2 +- .../HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py | 1 + .../sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py | 3 ++- HLTrigger/Configuration/python/HLT_NGTScouting_cff.py | 3 ++- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index 40aff710591b2..bc7a9366d9b0d 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -701,7 +701,6 @@ def SwapKeepAndDrop(l): outputCommands = FEVTDEBUGHLTEventContent.outputCommands+[ 'keep *_hltHGCalRecHit_*_*', 'keep *_hltMergeLayerClusters_*_*', - #'keep *_hltHgcalMergeLayerClusters_*_*', 'keep *_hltParticleFlowRecHit*_*_*', 'keep *_hltEgammaGsfTracksL1Seeded_*_*', ]) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py index 6c924b30306f9..6c0085a802c0a 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py @@ -9,4 +9,5 @@ from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel layerClusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded", "hltHgcalLayerClustersHSciL1Seeded", "hltHgcalLayerClustersHSiL1Seeded", "hltBarrelLayerClustersEBL1Seeded") time_layerclusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded:timeLayerCluster", "hltHgcalLayerClustersHSciL1Seeded:timeLayerCluster", "hltHgcalLayerClustersHSiL1Seeded:timeLayerCluster", "hltBarrelLayerClustersEBL1Seeded:timeLayerCluster") -ticl_barrel.toModify(hltMergeLayerClustersL1Seeded, layerClusters = layerClusters, time_layerclusters = time_layerclusters) \ No newline at end of file +ticl_barrel.toModify(hltMergeLayerClustersL1Seeded, layerClusters = layerClusters, time_layerclusters = time_layerclusters) + diff --git a/HLTrigger/Configuration/python/HLT_75e33/paths/DST_PFScouting_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/paths/DST_PFScouting_cfi.py index 3af0afd80fef1..d94b5ad7262a2 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/paths/DST_PFScouting_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/paths/DST_PFScouting_cfi.py @@ -28,7 +28,7 @@ from ..sequences.HLTEndSequence_cfi import * from ..sequences.HLTHPSDeepTauPFTauSequence_cfi import * from ..sequences.HLTTICLLocalRecoSequence_cfi import * -from ..sequences.HLTHgcalTiclPFClusteringForEgamma_cfi import * +from ..sequences.HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi import * from ..sequences.HLTLocalrecoSequence_cfi import * from ..sequences.HLTMuonsSequence_cfi import * from ..sequences.HLTPFPuppiMETReconstruction_cfi import * diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py index 4c278d3e9c8f0..0c67daad303e2 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py @@ -99,6 +99,7 @@ _HgcalLocalRecoUnseededSequence_barrel = _HgcalLocalRecoUnseededSequence.copy() _HgcalLocalRecoUnseededSequence_barrel += hltBarrelLayerClustersEB _HgcalLocalRecoUnseededSequence_barrel += hltBarrelLayerClustersHB + from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel ticl_barrel.toReplaceWith(_HgcalLocalRecoUnseededSequence, _HgcalLocalRecoUnseededSequence_barrel) layerClusters = cms.VInputTag("hltHgcalLayerClustersEE", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi", "hltBarrelLayerClustersEB", "hltBarrelLayerClustersHB") diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py index dd22eac97532f..c5f373f37e0ae 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgamma_cfi.py @@ -38,4 +38,5 @@ hltParticleFlowSuperClusterHGCal )) from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel -ticl_barrel.toReplaceWith(HLTHgcalTiclPFClusteringForEgamma, HLTHgcalTiclPFClusteringForEgamma_barrel) \ No newline at end of file +ticl_barrel.toReplaceWith(HLTHgcalTiclPFClusteringForEgamma, HLTHgcalTiclPFClusteringForEgamma_barrel) + diff --git a/HLTrigger/Configuration/python/HLT_NGTScouting_cff.py b/HLTrigger/Configuration/python/HLT_NGTScouting_cff.py index d18e6694a3ba1..98631d74b76ac 100644 --- a/HLTrigger/Configuration/python/HLT_NGTScouting_cff.py +++ b/HLTrigger/Configuration/python/HLT_NGTScouting_cff.py @@ -195,7 +195,7 @@ fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTCsclocalrecoSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTDtlocalrecoSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTGemLocalRecoSequence_cfi") -fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTHgcalLocalRecoSequence_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTHighPtTripletStepSeedingSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTHighPtTripletStepSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTAK4PFJetsReconstruction_cfi") @@ -244,6 +244,7 @@ fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTL1UnpackerSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTL2MuonsFromL1TkSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTMuonsSequence_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTPfRecHitUnseededSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTParticleFlowSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTPFClusteringForEgammaL1SeededSequence_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/sequences/HLTPFClusteringForEgammaUnseededSequence_cfi") From f4e6d86c5ce1ce4c6abc54a528dc325b2fc5b0c7 Mon Sep 17 00:00:00 2001 From: brusale Date: Wed, 21 May 2025 16:09:50 +0200 Subject: [PATCH 7/9] updated runTheMatrix README --- Configuration/PyReleaseValidation/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Configuration/PyReleaseValidation/README.md b/Configuration/PyReleaseValidation/README.md index b365a9b640648..3448afa7351bf 100644 --- a/Configuration/PyReleaseValidation/README.md +++ b/Configuration/PyReleaseValidation/README.md @@ -63,6 +63,7 @@ The offsets currently in use are: * 0.7561 HLT phase-2 timing menu Alpaka, trimmed tracking * 0.7562 HLT phase-2 timing menu Alpaka, trimmed tracking, single tracking iteration variant * 0.757: HLT phase-2 timing menu Alpaka, single tracking iteration, LST seeding + CKF building variant +* 0.758 HLT phase-2 timing menu ticl_barrel variant * 0.759: HLT phase-2 timing menu, with NANO:@Phase2HLT * 0.77: HLT phase-2 NGT Scouting menu * 0.771: HLT phase-2 NGT Scouting menu, with NANO:@NGTScouting @@ -108,6 +109,8 @@ The offsets currently in use are: * 0.203: HGCAL TICLv5 * 0.204: HGCAL superclustering : using Mustache in TICLv5 * 0.205: HGCAL superclustering : using old PFCluster-based Mustache algorithm with TICLv5 +* 0.209: TICL barrel : run TICL in HGCAL and barrel calorimeters +* 0.2091: TICL barrel with CaloParticles from PU enabled * 0.302: FastSim Run-3 trackingOnly validation * 0.303: FastSim Run-3 MB for mixing * 0.9001: Sonic Triton From 779342007c0fb98919523b4bbc30f4505262cd4c Mon Sep 17 00:00:00 2001 From: brusale Date: Tue, 24 Jun 2025 14:05:30 +0200 Subject: [PATCH 8/9] drop cms type specifications --- .../hltMergeLayerClustersL1Seeded_cfi.py | 14 +++++-- .../modules/hltMergeLayerClusters_cfi.py | 15 ++++++- ...ClusteringForEgammaUnseededSequence_cfi.py | 30 ++++++++++++-- .../sequences/HLTTICLLocalRecoSequence_cfi.py | 41 +++++++++++++++---- 4 files changed, 83 insertions(+), 17 deletions(-) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py index 6c0085a802c0a..ca108fe9193f6 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClustersL1Seeded_cfi.py @@ -7,7 +7,15 @@ ) from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel -layerClusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded", "hltHgcalLayerClustersHSciL1Seeded", "hltHgcalLayerClustersHSiL1Seeded", "hltBarrelLayerClustersEBL1Seeded") -time_layerclusters = cms.VInputTag("hltHgcalLayerClustersEEL1Seeded:timeLayerCluster", "hltHgcalLayerClustersHSciL1Seeded:timeLayerCluster", "hltHgcalLayerClustersHSiL1Seeded:timeLayerCluster", "hltBarrelLayerClustersEBL1Seeded:timeLayerCluster") -ticl_barrel.toModify(hltMergeLayerClustersL1Seeded, layerClusters = layerClusters, time_layerclusters = time_layerclusters) +layerClusters = ["hltHgcalLayerClustersEEL1Seeded", + "hltHgcalLayerClustersHSciL1Seeded", + "hltHgcalLayerClustersHSiL1Seeded", + "hltBarrelLayerClustersEBL1Seeded"] + +time_layerclusters = ["hltHgcalLayerClustersEEL1Seeded:timeLayerCluster", + "hltHgcalLayerClustersHSciL1Seeded:timeLayerCluster", + "hltHgcalLayerClustersHSiL1Seeded:timeLayerCluster", + "hltBarrelLayerClustersEBL1Seeded:timeLayerCluster"] + +ticl_barrel.toModify(hltMergeLayerClustersL1Seeded, layerClusters = layerClusters, time_layerclusters = time_layerclusters) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClusters_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClusters_cfi.py index 9079e2bc52f7b..654496bfc7905 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClusters_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMergeLayerClusters_cfi.py @@ -12,6 +12,17 @@ time_layerclustersEE = cms.InputTag("hltHgCalLayerClustersFromSoAProducer", "timeLayerCluster")) from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel -layerClusters = cms.VInputTag("hltHgcalLayerClustersEE", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi", "hltBarrelLayerClustersEB", "hltBarrelLayerClustersHB") -time_layerclusters = cms.VInputTag("hltHgcalLayerClustersEE:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster", "hltBarrelLayerClustersEB:timeLayerCluster", "hltBarrelLayerClustersHB:timeLayerCluster") + +layerClusters = ["hltHgcalLayerClustersEE", + "hltHgcalLayerClustersHSci", + "hltHgcalLayerClustersHSi", + "hltBarrelLayerClustersEB", + "hltBarrelLayerClustersHB"] + +time_layerclusters = ["hltHgcalLayerClustersEE:timeLayerCluster", + "hltHgcalLayerClustersHSci:timeLayerCluster", + "hltHgcalLayerClustersHSi:timeLayerCluster", + "hltBarrelLayerClustersEB:timeLayerCluster", + "hltBarrelLayerClustersHB:timeLayerCluster"] + ticl_barrel.toModify(hltMergeLayerClusters, layerClusters = layerClusters, time_layerclusters = time_layerclusters) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py index 0c67daad303e2..ad173e412e591 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTHgcalTiclPFClusteringForEgammaUnseededSequence_cfi.py @@ -102,9 +102,31 @@ from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel ticl_barrel.toReplaceWith(_HgcalLocalRecoUnseededSequence, _HgcalLocalRecoUnseededSequence_barrel) -layerClusters = cms.VInputTag("hltHgcalLayerClustersEE", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi", "hltBarrelLayerClustersEB", "hltBarrelLayerClustersHB") -time_layerClusters = cms.VInputTag("hltHgcalLayerClustersEE:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster", "hltBarrelLayerClustersEB:timeLayerCluster", "hltBarrelLayerClustersHB:timeLayerCluster") + +layerClusters = ["hltHgcalLayerClustersEE", + "hltHgcalLayerClustersHSci", + "hltHgcalLayerClustersHSi", + "hltBarrelLayerClustersEB", + "hltBarrelLayerClustersHB"] + +time_layerClusters = ["hltHgcalLayerClustersEE:timeLayerCluster", + "hltHgcalLayerClustersHSci:timeLayerCluster", + "hltHgcalLayerClustersHSi:timeLayerCluster", + "hltBarrelLayerClustersEB:timeLayerCluster", + "hltBarrelLayerClustersHB:timeLayerCluster"] + ticl_barrel.toModify(hltMergeLayerClusters, layerClusters=layerClusters, time_layerclusters=time_layerClusters) -layerClusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi", "hltBarrelLayerClustersEB", "hltBarrelLayerClustersHB") -time_layerClusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster", "hltBarrelLayerClustersEB:timeLayerCluster", "hltBarrelLayerClustersHB:timeLayerCluster") + +layerClusters = ["hltHgCalLayerClustersFromSoAProducer", + "hltHgcalLayerClustersHSci", + "hltHgcalLayerClustersHSi", + "hltBarrelLayerClustersEB", + "hltBarrelLayerClustersHB"] + +time_layerClusters = ["hltHgCalLayerClustersFromSoAProducer:timeLayerCluster", + "hltHgcalLayerClustersHSci:timeLayerCluster", + "hltHgcalLayerClustersHSi:timeLayerCluster", + "hltBarrelLayerClustersEB:timeLayerCluster", + "hltBarrelLayerClustersHB:timeLayerCluster"] + (ticl_barrel & alpaka).toModify(hltMergeLayerClusters, layerClusters=layerClusters, time_layerclusters=time_layerClusters) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py index bfc5b718b27e4..629927d82e9af 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTICLLocalRecoSequence_cfi.py @@ -39,8 +39,6 @@ hltBarrelLayerClustersHB+ hltMergeLayerClusters) -layerClusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi") -time_layerclusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster") from Configuration.ProcessModifiers.alpaka_cff import alpaka alpaka.toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_heterogeneous) @@ -56,6 +54,25 @@ hltMergeLayerClusters ) +layerClusters = ["hltHgCalLayerClustersEE", + "hltHgcalLayerClustersHSci", + "hltHgcalLayerClustersHSi", + "hltBarrelLayerClustersEB", + "hltBarrelLayerClustersHB"] + +time_layerclusters = ["hltHgCalLayerClustersEE:timeLayerCluster", + "hltHgcalLayerClustersHSci:timeLayerCluster", + "hltHgcalLayerClustersHSi:timeLayerCluster", + "hltBarrelLayerClustersEB:timeLayerCluster", + "hltBarrelLayerClustersHB:timeLayerCluster"] + + +from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel +ticl_barrel.toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_withBarrel) +ticl_barrel.toModify(hltMergeLayerClusters, + layerClusters = layerClusters, + time_layerclusters = time_layerclusters) + _HLTTICLLocalRecoSequence_heterogeneous_withBarrel = cms.Sequence( hltHGCalUncalibRecHit+ hltHGCalRecHit+ @@ -71,12 +88,20 @@ hltMergeLayerClusters ) -layerClusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer", "hltHgcalLayerClustersHSci", "hltHgcalLayerClustersHSi", "hltBarrelLayerClustersEB", "hltBarrelLayerClustersHB") -time_layerclusters = cms.VInputTag("hltHgCalLayerClustersFromSoAProducer:timeLayerCluster", "hltHgcalLayerClustersHSci:timeLayerCluster", "hltHgcalLayerClustersHSi:timeLayerCluster", "hltBarrelLayerClustersEB:timeLayerCluster", "hltBarrelLayerClustersHB:timeLayerCluster") -from Configuration.ProcessModifiers.ticl_barrel_cff import ticl_barrel -ticl_barrel.toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_withBarrel) +layerClusters = ["hltHgCalLayerClustersFromSoAProducer", + "hltHgcalLayerClustersHSci", + "hltHgcalLayerClustersHSi", + "hltBarrelLayerClustersEB", + "hltBarrelLayerClustersHB"] + +time_layerclusters = ["hltHgCalLayerClustersFromSoAProducer:timeLayerCluster", + "hltHgcalLayerClustersHSci:timeLayerCluster", + "hltHgcalLayerClustersHSi:timeLayerCluster", + "hltBarrelLayerClustersEB:timeLayerCluster", + "hltBarrelLayerClustersHB:timeLayerCluster"] + (ticl_barrel & alpaka).toReplaceWith(HLTTICLLocalRecoSequence, _HLTTICLLocalRecoSequence_heterogeneous_withBarrel) (ticl_barrel & alpaka).toModify(hltMergeLayerClusters, - layerClusters = layerClusters, - time_layerclusters = time_layerclusters + layerClusters = layerClusters, + time_layerclusters = time_layerclusters ) From 939fcb4e70cb01b21221a1f22cacac4c980f7d95 Mon Sep 17 00:00:00 2001 From: brusale Date: Tue, 24 Jun 2025 19:40:44 +0200 Subject: [PATCH 9/9] add wf 29634.758 to ph2_hlt short matrix --- Configuration/PyReleaseValidation/python/relval_Run4.py | 1 + Configuration/PyReleaseValidation/scripts/runTheMatrix.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_Run4.py b/Configuration/PyReleaseValidation/python/relval_Run4.py index abf770014f7c1..157f2eb6b4a51 100644 --- a/Configuration/PyReleaseValidation/python/relval_Run4.py +++ b/Configuration/PyReleaseValidation/python/relval_Run4.py @@ -77,6 +77,7 @@ numWFIB.extend([prefixDet+34.7561])# HLTTiming75e33, alpaka,phase2_hlt_vertexTrimming numWFIB.extend([prefixDet+34.7562])# HLTTiming75e33, alpaka,phase2_hlt_vertexTrimming,singleIterPatatrack numWFIB.extend([prefixDet+34.757]) # HLTTiming75e33, alpaka,singleIterPatatrack,trackingLST,seedingLST +numWFIB.extend([prefixDet+34.758]) # HLTTiming75e33, ticl_barrel numWFIB.extend([prefixDet+34.759]) # HLTTiming75e33 + NANO numWFIB.extend([prefixDet+34.77]) # NGTScouting numWFIB.extend([prefixDet+34.771]) # NGTScouting + NANO diff --git a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py index e01e5f817c87a..febce26c37952 100755 --- a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py +++ b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py @@ -161,8 +161,9 @@ def runSelected(opt): 29634.756, # HLT phase-2 timing menu trimmed tracking 29634.7561, # HLT phase-2 timing menu Alpaka, trimmed tracking 29634.7562, # HLT phase-2 timing menu Alpaka, trimmed tracking, single tracking iteration variant - 29634.757, # HLT phase-2 timing menu Alpaka, single tracking iteration, LST seeding + CKF building variant - 29634.759, # HLT phase-2 timing menu, with NANO:@Phase2HLT + 29634.757, # HLT phase-2 timing menu, with NANO:@Phase2HLT + 29634.758, # HLT phase-2 timing menu ticl_barrel variant + 29634.759, # HLT phase-2 timing menu Alpaka, single tracking iteration, LST seeding + CKF building variant 29634.77, # HLT phase-2 NGT Scouting menu 29634.771, # HLT phase-2 NGT Scouting menu, with NANO:@NGTScouting 29634.772] # HLT phase-2 NGT Scouting menu, with NANO:@NGTScoutingVal