From 06a85eb8e73dd9bae2747534f52df8deb1024bfe Mon Sep 17 00:00:00 2001 From: maria Date: Tue, 29 Dec 2020 20:20:32 +0100 Subject: [PATCH 01/14] initial version --- .../TICL/plugins/SeedingRegionByTracks.cc | 10 +++-- .../TICL/plugins/SeedingRegionByTracks.h | 2 +- RecoHGCal/TICL/python/EMStep_cff.py | 12 ++++-- .../TICL/python/TICLSeedingRegions_cff.py | 6 +++ RecoHGCal/TICL/python/TrkEMStep_cff.py | 40 ++++++++++++++++++- RecoHGCal/TICL/python/iterativeTICL_cff.py | 8 ++-- 6 files changed, 65 insertions(+), 13 deletions(-) diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc index c7b07b757775b..5bd0420b9f7ed 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc +++ b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc @@ -17,12 +17,16 @@ SeedingRegionByTracks::SeedingRegionByTracks(const edm::ParameterSet &conf, edm: : SeedingRegionAlgoBase(conf, sumes), tracks_token_(sumes.consumes(conf.getParameter("tracks"))), cutTk_(conf.getParameter("cutTk")), + detector_(conf.getParameter("detector")), propName_(conf.getParameter("propagator")), - hdc_token_(sumes.esConsumes( - edm::ESInputTag("", detectorName_))), bfield_token_(sumes.esConsumes()), propagator_token_(sumes.esConsumes( - edm::ESInputTag("", propName_))) {} + edm::ESInputTag("", propName_))) { + + std::string detectorName_ = (detector_ == "HFNose") ? "HGCalHFNoseSensitive": "HGCalEESensitive"; + hdc_token_ = sumes.esConsumes( + edm::ESInputTag("", detectorName_)); +} SeedingRegionByTracks::~SeedingRegionByTracks() {} diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.h b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.h index fc8f0f539ef22..5b6be87823176 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.h +++ b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.h @@ -46,7 +46,7 @@ namespace ticl { std::once_flag initializeGeometry_; const HGCalDDDConstants* hgcons_; const StringCutObjectSelector cutTk_; - inline static const std::string detectorName_ = "HGCalEESensitive"; + std::string detector_; edm::ESHandle propagator_; const std::string propName_; edm::ESHandle bfield_; diff --git a/RecoHGCal/TICL/python/EMStep_cff.py b/RecoHGCal/TICL/python/EMStep_cff.py index 0aa6f9ca50fd9..7d9c12008e530 100644 --- a/RecoHGCal/TICL/python/EMStep_cff.py +++ b/RecoHGCal/TICL/python/EMStep_cff.py @@ -51,21 +51,25 @@ filteredLayerClustersHFNoseEM = filteredLayerClustersEM.clone( LayerClusters = 'hgcalLayerClustersHFNose', - LayerClustersInputMask = "hgcalLayerClustersHFNose:InitialLayerClustersMask", + LayerClustersInputMask = 'ticlTrackstersHFNoseTrkEM', iteration_label = "EMn", algo_number = 9 -#no tracking mask for EM for now ) ticlTrackstersHFNoseEM = ticlTrackstersEM.clone( detector = "HFNose", layer_clusters = "hgcalLayerClustersHFNose", layer_clusters_hfnose_tiles = "ticlLayerTileHFNose", - original_mask = "hgcalLayerClustersHFNose:InitialLayerClustersMask", + original_mask = "ticlTrackstersHFNoseTrkEM", filtered_mask = "filteredLayerClustersHFNoseEM:EMn", seeding_regions = "ticlSeedingGlobalHFNose", time_layerclusters = "hgcalLayerClustersHFNose:timeLayerCluster", - min_layers_per_trackster = 6 + itername = "EMn", + filter_on_categories = [0, 1], + min_layers_per_trackster = 6, + pid_threshold = 0., +# energy_em_over_total_threshold = -1., + shower_start_max_layer = 5 ### inclusive ) ticlHFNoseEMStepTask = cms.Task(ticlSeedingGlobalHFNose diff --git a/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py b/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py index e5d55aaec4883..0f2618cb1d230 100644 --- a/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py +++ b/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py @@ -15,3 +15,9 @@ ticlSeedingGlobalHFNose = _ticlSeedingRegionProducer.clone( seedingPSet = _ticlSeedingRegionProducer.seedingPSet.clone(type="SeedingRegionGlobal") ) + +ticlSeedingTrkHFNose = _ticlSeedingRegionProducer.clone( + algoId = 1, + detector = "HFNose", + cutTk = cms.string('3. < abs(eta) < 4. && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5'), +) diff --git a/RecoHGCal/TICL/python/TrkEMStep_cff.py b/RecoHGCal/TICL/python/TrkEMStep_cff.py index 458f489f696ec..550968557e810 100644 --- a/RecoHGCal/TICL/python/TrkEMStep_cff.py +++ b/RecoHGCal/TICL/python/TrkEMStep_cff.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoHGCal.TICL.TICLSeedingRegions_cff import ticlSeedingTrk +from RecoHGCal.TICL.TICLSeedingRegions_cff import ticlSeedingTrk, ticlSeedingTrkHFNose from RecoHGCal.TICL.trackstersProducer_cfi import trackstersProducer as _trackstersProducer from RecoHGCal.TICL.filteredLayerClustersProducer_cfi import filteredLayerClustersProducer as _filteredLayerClustersProducer from RecoHGCal.TICL.multiClustersFromTrackstersProducer_cfi import multiClustersFromTrackstersProducer as _multiClustersFromTrackstersProducer @@ -49,3 +49,41 @@ ,ticlTrackstersTrkEM ,ticlMultiClustersFromTrackstersTrkEM) +filteredLayerClustersHFNoseTrkEM = filteredLayerClustersTrkEM.clone( + LayerClusters = 'hgcalLayerClustersHFNose', + LayerClustersInputMask = cms.InputTag("hgcalLayerClustersHFNose","InitialLayerClustersMask"), + # min_cluster_size = 3, # inclusive + # max_layerId = 30, # inclusive + algo_number = 9, + iteration_label = "TrkEMn" +) + +ticlTrackstersHFNoseTrkEM = ticlTrackstersTrkEM.clone( + detector = "HFNose", + layer_clusters = "hgcalLayerClustersHFNose", + layer_clusters_hfnose_tiles = "ticlLayerTileHFNose", + original_mask = cms.InputTag("hgcalLayerClustersHFNose","InitialLayerClustersMask"), + filtered_mask = cms.InputTag("filteredLayerClustersHFNoseTrkEM", "TrkEMn"), + seeding_regions = "ticlSeedingTrkHFNose", + filter_on_categories = [0, 1], + pid_threshold = 0., +# energy_em_over_total_threshold = 0.9, +# max_longitudinal_sigmaPCA = 10, + shower_start_max_layer = 5, #inclusive +# max_out_in_hops = 1, +# max_missing_layers_in_trackster = 2, +# skip_layers = 2, + min_layers_per_trackster = 6, +# min_cos_theta = 0.97, # ~14 degrees +# min_cos_pointing = 0.94, # ~20 degrees +# root_doublet_max_distance_from_seed_squared = 2.5e-3, # dR=0.05 +# max_delta_time = 3., + itername = "TrkEMn", +# algo_verbosity = 0, + time_layerclusters = "hgcalLayerClustersHFNose:timeLayerCluster", +) + +ticlHFNoseTrkEMStepTask = cms.Task(ticlSeedingTrkHFNose + ,filteredLayerClustersHFNoseTrkEM + ,ticlTrackstersHFNoseTrkEM) + diff --git a/RecoHGCal/TICL/python/iterativeTICL_cff.py b/RecoHGCal/TICL/python/iterativeTICL_cff.py index a3e8851ab68d4..447af3db28c89 100644 --- a/RecoHGCal/TICL/python/iterativeTICL_cff.py +++ b/RecoHGCal/TICL/python/iterativeTICL_cff.py @@ -37,8 +37,8 @@ ticlLayerTileHFNoseTask = cms.Task(ticlLayerTileHFNose) -iterHFNoseTICLTask = cms.Task( - ticlLayerTileHFNoseTask, - ticlHFNoseMIPStepTask, - ticlHFNoseEMStepTask +iterHFNoseTICLTask = cms.Task(ticlLayerTileHFNoseTask + ,ticlHFNoseTrkEMStepTask + ,ticlHFNoseEMStepTask + ,ticlHFNoseMIPStepTask ) From f8110fd0aca4c78fc8f8c2676a7aee02e48a8b98 Mon Sep 17 00:00:00 2001 From: maria Date: Thu, 31 Dec 2020 09:31:02 +0100 Subject: [PATCH 02/14] use min_cluster_size = 2 --- RecoHGCal/TICL/python/EMStep_cff.py | 1 + RecoHGCal/TICL/python/TrkEMStep_cff.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RecoHGCal/TICL/python/EMStep_cff.py b/RecoHGCal/TICL/python/EMStep_cff.py index 7d9c12008e530..646b445436c86 100644 --- a/RecoHGCal/TICL/python/EMStep_cff.py +++ b/RecoHGCal/TICL/python/EMStep_cff.py @@ -53,6 +53,7 @@ LayerClusters = 'hgcalLayerClustersHFNose', LayerClustersInputMask = 'ticlTrackstersHFNoseTrkEM', iteration_label = "EMn", + min_cluster_size = 2, # inclusive algo_number = 9 ) diff --git a/RecoHGCal/TICL/python/TrkEMStep_cff.py b/RecoHGCal/TICL/python/TrkEMStep_cff.py index 550968557e810..b785ca7381e9f 100644 --- a/RecoHGCal/TICL/python/TrkEMStep_cff.py +++ b/RecoHGCal/TICL/python/TrkEMStep_cff.py @@ -52,7 +52,7 @@ filteredLayerClustersHFNoseTrkEM = filteredLayerClustersTrkEM.clone( LayerClusters = 'hgcalLayerClustersHFNose', LayerClustersInputMask = cms.InputTag("hgcalLayerClustersHFNose","InitialLayerClustersMask"), - # min_cluster_size = 3, # inclusive + min_cluster_size = 2, # inclusive # max_layerId = 30, # inclusive algo_number = 9, iteration_label = "TrkEMn" From ad064cdc19f7ce8f18b4af22e3bdf5a9fb2f2277 Mon Sep 17 00:00:00 2001 From: maria Date: Tue, 9 Feb 2021 19:29:48 +0100 Subject: [PATCH 03/14] fix getPositionLayer for HFnose --- RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc b/RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc index d668ac8d05806..be6a3eb243fa2 100644 --- a/RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc +++ b/RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc @@ -188,7 +188,7 @@ void PatternRecognitionbyCA::makeTracksters( ticl::assignPCAtoTracksters(tmpTracksters, input.layerClusters, input.layerClustersTime, - rhtools_.getPositionLayer(rhtools_.lastLayerEE(type)).z()); + rhtools_.getPositionLayer(rhtools_.lastLayerEE(type), type).z()); // run energy regression and ID energyRegressionAndID(input.layerClusters, tmpTracksters); @@ -247,7 +247,7 @@ void PatternRecognitionbyCA::makeTracksters( } ticl::assignPCAtoTracksters( - result, input.layerClusters, input.layerClustersTime, rhtools_.getPositionLayer(rhtools_.lastLayerEE(type)).z()); + result, input.layerClusters, input.layerClustersTime, rhtools_.getPositionLayer(rhtools_.lastLayerEE(type), type).z()); // run energy regression and ID energyRegressionAndID(input.layerClusters, result); From 7dcd854d25d3be9f1c6f25f4ca13f7998b059251 Mon Sep 17 00:00:00 2001 From: maria Date: Tue, 9 Feb 2021 20:08:04 +0100 Subject: [PATCH 04/14] set min_layers_per_trackster to 5 for EM object (5/6 EM layers) --- RecoHGCal/TICL/python/EMStep_cff.py | 3 +-- RecoHGCal/TICL/python/TrkEMStep_cff.py | 20 +++++--------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/RecoHGCal/TICL/python/EMStep_cff.py b/RecoHGCal/TICL/python/EMStep_cff.py index 646b445436c86..be4ee499fddc8 100644 --- a/RecoHGCal/TICL/python/EMStep_cff.py +++ b/RecoHGCal/TICL/python/EMStep_cff.py @@ -67,9 +67,8 @@ time_layerclusters = "hgcalLayerClustersHFNose:timeLayerCluster", itername = "EMn", filter_on_categories = [0, 1], - min_layers_per_trackster = 6, + min_layers_per_trackster = 5, pid_threshold = 0., -# energy_em_over_total_threshold = -1., shower_start_max_layer = 5 ### inclusive ) diff --git a/RecoHGCal/TICL/python/TrkEMStep_cff.py b/RecoHGCal/TICL/python/TrkEMStep_cff.py index b785ca7381e9f..ec0e995b5357f 100644 --- a/RecoHGCal/TICL/python/TrkEMStep_cff.py +++ b/RecoHGCal/TICL/python/TrkEMStep_cff.py @@ -53,7 +53,6 @@ LayerClusters = 'hgcalLayerClustersHFNose', LayerClustersInputMask = cms.InputTag("hgcalLayerClustersHFNose","InitialLayerClustersMask"), min_cluster_size = 2, # inclusive - # max_layerId = 30, # inclusive algo_number = 9, iteration_label = "TrkEMn" ) @@ -65,22 +64,13 @@ original_mask = cms.InputTag("hgcalLayerClustersHFNose","InitialLayerClustersMask"), filtered_mask = cms.InputTag("filteredLayerClustersHFNoseTrkEM", "TrkEMn"), seeding_regions = "ticlSeedingTrkHFNose", + time_layerclusters = "hgcalLayerClustersHFNose:timeLayerCluster", + itername = "TrkEMn", filter_on_categories = [0, 1], + min_layers_per_trackster = 5, pid_threshold = 0., -# energy_em_over_total_threshold = 0.9, -# max_longitudinal_sigmaPCA = 10, - shower_start_max_layer = 5, #inclusive -# max_out_in_hops = 1, -# max_missing_layers_in_trackster = 2, -# skip_layers = 2, - min_layers_per_trackster = 6, -# min_cos_theta = 0.97, # ~14 degrees -# min_cos_pointing = 0.94, # ~20 degrees -# root_doublet_max_distance_from_seed_squared = 2.5e-3, # dR=0.05 -# max_delta_time = 3., - itername = "TrkEMn", -# algo_verbosity = 0, - time_layerclusters = "hgcalLayerClustersHFNose:timeLayerCluster", + shower_start_max_layer = 5 #inclusive + ) ticlHFNoseTrkEMStepTask = cms.Task(ticlSeedingTrkHFNose From 5aba3a1f93c23325170336f98205aa08afbc04a1 Mon Sep 17 00:00:00 2001 From: maria Date: Thu, 25 Feb 2021 14:33:07 +0100 Subject: [PATCH 05/14] re-add caloParticles for HFNose --- .../MixingModule/python/caloTruthProducer_cfi.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/SimGeneral/MixingModule/python/caloTruthProducer_cfi.py b/SimGeneral/MixingModule/python/caloTruthProducer_cfi.py index d257b553e3f92..d7ba0d05cc286 100644 --- a/SimGeneral/MixingModule/python/caloTruthProducer_cfi.py +++ b/SimGeneral/MixingModule/python/caloTruthProducer_cfi.py @@ -35,14 +35,14 @@ from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1 premix_stage1.toModify(caloParticles, premixStage1 = True) -#from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose -#phase2_hfnose.toModify( -# caloParticles, -# simHitCollections = dict( -# hgc = caloParticles.simHitCollections.hgc + [cms.InputTag('g4SimHits','HFNoseHits')], -# hcal = cms.VInputTag(cms.InputTag('g4SimHits','HcalHits')) -# ) -#) +from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose +phase2_hfnose.toModify( + caloParticles, + simHitCollections = dict( + hgc = caloParticles.simHitCollections.hgc + [cms.InputTag('g4SimHits','HFNoseHits')], + hcal = cms.VInputTag(cms.InputTag('g4SimHits','HcalHits')) + ) +) from Configuration.ProcessModifiers.run3_ecalclustering_cff import run3_ecalclustering run3_ecalclustering.toModify( From 6cc9558c944fd036a830ab73c1f19bc10e383b82 Mon Sep 17 00:00:00 2001 From: maria Date: Thu, 25 Feb 2021 17:19:36 +0100 Subject: [PATCH 06/14] add Had (HGCAL standalone) iteration --- .../python/RecoHGCal_EventContent_cff.py | 2 ++ RecoHGCal/TICL/python/HADStep_cff.py | 32 ++++++++++++++++++- RecoHGCal/TICL/python/TrkEMStep_cff.py | 8 ++--- RecoHGCal/TICL/python/iterativeTICL_cff.py | 1 + 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/RecoHGCal/Configuration/python/RecoHGCal_EventContent_cff.py b/RecoHGCal/Configuration/python/RecoHGCal_EventContent_cff.py index 77b647e6ce291..7e0076bb947bb 100644 --- a/RecoHGCal/Configuration/python/RecoHGCal_EventContent_cff.py +++ b/RecoHGCal/Configuration/python/RecoHGCal_EventContent_cff.py @@ -22,8 +22,10 @@ 'keep *_ticlTrackstersTrk_*_*', 'keep *_ticlTrackstersMIP_*_*', 'keep *_ticlTrackstersMerge_*_*', + 'keep *_ticlTrackstersHFNoseTrkEM_*_*', 'keep *_ticlTrackstersHFNoseEM_*_*', 'keep *_ticlTrackstersHFNoseMIP_*_*', + 'keep *_ticlTrackstersHFNoseHAD_*_*', 'keep *_ticlTrackstersHFNoseMerge_*_*', 'keep *_pfTICL_*_*' ) diff --git a/RecoHGCal/TICL/python/HADStep_cff.py b/RecoHGCal/TICL/python/HADStep_cff.py index 72efaebc201ec..c69aee139b352 100644 --- a/RecoHGCal/TICL/python/HADStep_cff.py +++ b/RecoHGCal/TICL/python/HADStep_cff.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoHGCal.TICL.TICLSeedingRegions_cff import ticlSeedingGlobal +from RecoHGCal.TICL.TICLSeedingRegions_cff import ticlSeedingGlobal, ticlSeedingGlobalHFNose, ticlSeedingForHFHFNose from RecoHGCal.TICL.ticlLayerTileProducer_cfi import ticlLayerTileProducer as _ticlLayerTileProducer from RecoHGCal.TICL.trackstersProducer_cfi import trackstersProducer as _trackstersProducer from RecoHGCal.TICL.filteredLayerClustersProducer_cfi import filteredLayerClustersProducer as _filteredLayerClustersProducer @@ -44,3 +44,33 @@ ,ticlTrackstersHAD ,ticlMultiClustersFromTrackstersHAD) +filteredLayerClustersHFNoseHAD = _filteredLayerClustersProducer.clone( + min_cluster_size = 2, # inclusive + algo_number = 9, + iteration_label = "HADn", + LayerClusters = 'hgcalLayerClustersHFNose', + LayerClustersInputMask = "hgcalLayerClustersHFNose:InitialLayerClustersMask" +) + +ticlTrackstersHFNoseHAD = _trackstersProducer.clone( + detector = "HFNose", + layer_clusters = "hgcalLayerClustersHFNose", + layer_clusters_hfnose_tiles = "ticlLayerTileHFNose", + original_mask = "hgcalLayerClustersHFNose:InitialLayerClustersMask", + filtered_mask = "filteredLayerClustersHFNoseHAD:HADn", + seeding_regions = "ticlSeedingGlobalHFNose", + time_layerclusters = "hgcalLayerClustersHFNose:timeLayerCluster", + # For the moment we mask everything w/o requirements since we are last + pid_threshold = 0., + skip_layers = 1, + min_layers_per_trackster = 5, + min_cos_theta = 0.866, # ~30 degrees + min_cos_pointing = 0.819, # ~35 degrees + max_delta_time = -1, + itername = "HADRONIC" + ) + +ticlHFNoseHADStepTask = cms.Task(ticlSeedingGlobalHFNose + ,filteredLayerClustersHFNoseHAD + ,ticlTrackstersHFNoseHAD + ,ticlSeedingForHFHFNose) diff --git a/RecoHGCal/TICL/python/TrkEMStep_cff.py b/RecoHGCal/TICL/python/TrkEMStep_cff.py index ec0e995b5357f..826e194f6f7ff 100644 --- a/RecoHGCal/TICL/python/TrkEMStep_cff.py +++ b/RecoHGCal/TICL/python/TrkEMStep_cff.py @@ -18,7 +18,7 @@ # CA - PATTERN RECOGNITION ticlTrackstersTrkEM = _trackstersProducer.clone( - filtered_mask = cms.InputTag("filteredLayerClustersTrkEM", "TrkEM"), + filtered_mask = "filteredLayerClustersTrkEM:TrkEM", seeding_regions = "ticlSeedingTrk", filter_on_categories = [0, 1], pid_threshold = 0.5, @@ -51,7 +51,7 @@ filteredLayerClustersHFNoseTrkEM = filteredLayerClustersTrkEM.clone( LayerClusters = 'hgcalLayerClustersHFNose', - LayerClustersInputMask = cms.InputTag("hgcalLayerClustersHFNose","InitialLayerClustersMask"), + LayerClustersInputMask = "hgcalLayerClustersHFNose:InitialLayerClustersMask", min_cluster_size = 2, # inclusive algo_number = 9, iteration_label = "TrkEMn" @@ -61,8 +61,8 @@ detector = "HFNose", layer_clusters = "hgcalLayerClustersHFNose", layer_clusters_hfnose_tiles = "ticlLayerTileHFNose", - original_mask = cms.InputTag("hgcalLayerClustersHFNose","InitialLayerClustersMask"), - filtered_mask = cms.InputTag("filteredLayerClustersHFNoseTrkEM", "TrkEMn"), + original_mask = "hgcalLayerClustersHFNose:InitialLayerClustersMask", + filtered_mask = "filteredLayerClustersHFNoseTrkEM:TrkEMn", seeding_regions = "ticlSeedingTrkHFNose", time_layerclusters = "hgcalLayerClustersHFNose:timeLayerCluster", itername = "TrkEMn", diff --git a/RecoHGCal/TICL/python/iterativeTICL_cff.py b/RecoHGCal/TICL/python/iterativeTICL_cff.py index 447af3db28c89..9c961d580d09e 100644 --- a/RecoHGCal/TICL/python/iterativeTICL_cff.py +++ b/RecoHGCal/TICL/python/iterativeTICL_cff.py @@ -40,5 +40,6 @@ iterHFNoseTICLTask = cms.Task(ticlLayerTileHFNoseTask ,ticlHFNoseTrkEMStepTask ,ticlHFNoseEMStepTask + ,ticlHFNoseHADStepTask ,ticlHFNoseMIPStepTask ) From c424110386f9d04d317b1dbd7d8c2ecd2e0e9445 Mon Sep 17 00:00:00 2001 From: maria Date: Thu, 25 Feb 2021 19:30:10 +0100 Subject: [PATCH 07/14] code-format --- RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc | 6 ++++-- RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc | 7 +++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc b/RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc index be6a3eb243fa2..f0e53b379cc83 100644 --- a/RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc +++ b/RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc @@ -246,8 +246,10 @@ void PatternRecognitionbyCA::makeTracksters( tmp.swap(result); } - ticl::assignPCAtoTracksters( - result, input.layerClusters, input.layerClustersTime, rhtools_.getPositionLayer(rhtools_.lastLayerEE(type), type).z()); + ticl::assignPCAtoTracksters(result, + input.layerClusters, + input.layerClustersTime, + rhtools_.getPositionLayer(rhtools_.lastLayerEE(type), type).z()); // run energy regression and ID energyRegressionAndID(input.layerClusters, result); diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc index 5bd0420b9f7ed..cf8bb764ed47f 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc +++ b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc @@ -21,11 +21,10 @@ SeedingRegionByTracks::SeedingRegionByTracks(const edm::ParameterSet &conf, edm: propName_(conf.getParameter("propagator")), bfield_token_(sumes.esConsumes()), propagator_token_(sumes.esConsumes( - edm::ESInputTag("", propName_))) { - - std::string detectorName_ = (detector_ == "HFNose") ? "HGCalHFNoseSensitive": "HGCalEESensitive"; + edm::ESInputTag("", propName_))) { + std::string detectorName_ = (detector_ == "HFNose") ? "HGCalHFNoseSensitive" : "HGCalEESensitive"; hdc_token_ = sumes.esConsumes( - edm::ESInputTag("", detectorName_)); + edm::ESInputTag("", detectorName_)); } SeedingRegionByTracks::~SeedingRegionByTracks() {} From 2d832b0034102ddc0c13877df6e98fe4e06a3c8f Mon Sep 17 00:00:00 2001 From: maria Date: Thu, 25 Feb 2021 20:00:16 +0100 Subject: [PATCH 08/14] remove HF Seeding --- RecoHGCal/TICL/python/HADStep_cff.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/RecoHGCal/TICL/python/HADStep_cff.py b/RecoHGCal/TICL/python/HADStep_cff.py index c69aee139b352..9af07d2e4faf4 100644 --- a/RecoHGCal/TICL/python/HADStep_cff.py +++ b/RecoHGCal/TICL/python/HADStep_cff.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoHGCal.TICL.TICLSeedingRegions_cff import ticlSeedingGlobal, ticlSeedingGlobalHFNose, ticlSeedingForHFHFNose +from RecoHGCal.TICL.TICLSeedingRegions_cff import ticlSeedingGlobal, ticlSeedingGlobalHFNose from RecoHGCal.TICL.ticlLayerTileProducer_cfi import ticlLayerTileProducer as _ticlLayerTileProducer from RecoHGCal.TICL.trackstersProducer_cfi import trackstersProducer as _trackstersProducer from RecoHGCal.TICL.filteredLayerClustersProducer_cfi import filteredLayerClustersProducer as _filteredLayerClustersProducer @@ -72,5 +72,4 @@ ticlHFNoseHADStepTask = cms.Task(ticlSeedingGlobalHFNose ,filteredLayerClustersHFNoseHAD - ,ticlTrackstersHFNoseHAD - ,ticlSeedingForHFHFNose) + ,ticlTrackstersHFNoseHAD) From 732848a8b5667a45c2e8d703ee3d0cbaa5de3bc4 Mon Sep 17 00:00:00 2001 From: maria Date: Sun, 28 Feb 2021 15:37:02 +0100 Subject: [PATCH 09/14] add SeedingRegionByHF --- .../TICL/plugins/SeedingRegionAlgoFactory.cc | 2 + RecoHGCal/TICL/plugins/SeedingRegionByHF.cc | 70 +++++++++++++++++++ RecoHGCal/TICL/plugins/SeedingRegionByHF.h | 54 ++++++++++++++ .../TICL/plugins/TICLSeedingRegionProducer.cc | 3 +- .../TICL/python/TICLSeedingRegions_cff.py | 12 +++- 5 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 RecoHGCal/TICL/plugins/SeedingRegionByHF.cc create mode 100644 RecoHGCal/TICL/plugins/SeedingRegionByHF.h diff --git a/RecoHGCal/TICL/plugins/SeedingRegionAlgoFactory.cc b/RecoHGCal/TICL/plugins/SeedingRegionAlgoFactory.cc index 5da8aa8c9e83a..2092262b79e8b 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionAlgoFactory.cc +++ b/RecoHGCal/TICL/plugins/SeedingRegionAlgoFactory.cc @@ -4,9 +4,11 @@ #include "SeedingRegionByTracks.h" #include "SeedingRegionGlobal.h" #include "SeedingRegionByL1.h" +#include "SeedingRegionByHF.h" EDM_REGISTER_VALIDATED_PLUGINFACTORY(SeedingRegionAlgoFactory, "SeedingRegionAlgoFactory"); DEFINE_EDM_VALIDATED_PLUGIN(SeedingRegionAlgoFactory, ticl::SeedingRegionByTracks, "SeedingRegionByTracks"); DEFINE_EDM_VALIDATED_PLUGIN(SeedingRegionAlgoFactory, ticl::SeedingRegionGlobal, "SeedingRegionGlobal"); DEFINE_EDM_VALIDATED_PLUGIN(SeedingRegionAlgoFactory, ticl::SeedingRegionByL1, "SeedingRegionByL1"); +DEFINE_EDM_VALIDATED_PLUGIN(SeedingRegionAlgoFactory, ticl::SeedingRegionByHF, "SeedingRegionByHF"); diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc b/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc new file mode 100644 index 0000000000000..3219978a84441 --- /dev/null +++ b/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc @@ -0,0 +1,70 @@ +#include +#include +#include + +#include "SeedingRegionByHF.h" + +using namespace ticl; + +SeedingRegionByHF::SeedingRegionByHF(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes) + : SeedingRegionAlgoBase(conf, sumes), + HFhits_token_(sumes.consumes(conf.getParameter("hits"))), + minAbsEta_(conf.getParameter("minAbsEta")), + maxAbsEta_(conf.getParameter("maxAbsEta")), + minEt_(conf.getParameter("minEt")) { + geo_token_ = sumes.esConsumes(); +} + +SeedingRegionByHF::~SeedingRegionByHF() {} + +void SeedingRegionByHF::initialize(const edm::EventSetup &es) { geometry_ = &es.getData(geo_token_); } + +void SeedingRegionByHF::makeRegions(const edm::Event &ev, + const edm::EventSetup &es, + std::vector &result) { + auto recHitHandle = ev.getHandle(HFhits_token_); + + for (const auto &erh : *recHitHandle) { + const HcalDetId &detid = (HcalDetId)erh.detid(); + if (erh.energy() < minEt_) + continue; + + const GlobalPoint &globalPosition = + geometry_->getSubdetectorGeometry(DetId::Hcal, HcalForward)->getGeometry(detid)->getPosition(detid); + auto eta = globalPosition.eta(); + + if (std::abs(eta) < minAbsEta_ || std::abs(eta) > maxAbsEta_) + continue; + + int iSide = int(eta > 0); + int idx = 0; + edm::ProductID hfSeedId = edm::ProductID(detid.rawId()); + + auto phi = globalPosition.phi(); + double theta = 2 * atan(exp(eta)); + double px = erh.energy() * sin(theta) * cos(phi); + double py = erh.energy() * sin(theta) * sin(phi); + double pz = erh.energy() * cos(theta); + + result.emplace_back(globalPosition, GlobalVector(px, py, pz), iSide, idx, hfSeedId); + } + + // sorting seeding region by descending momentum + std::sort(result.begin(), result.end(), [](const TICLSeedingRegion &a, const TICLSeedingRegion &b) { + return a.directionAtOrigin.perp2() > b.directionAtOrigin.perp2(); + }); +} + +void SeedingRegionByHF::fillPSetDescription(edm::ParameterSetDescription &desc) { + desc.add("hits", edm::InputTag("hfreco")); + desc.add("algo_verbosity", 0); + desc.add("minAbsEta", 3.0); + desc.add("maxAbsEta", 4.0); + desc.add("minEt", 5); +} + +edm::ParameterSetDescription SeedingRegionByHF::makePSetDescription() { + edm::ParameterSetDescription desc; + fillPSetDescription(desc); + return desc; +} diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByHF.h b/RecoHGCal/TICL/plugins/SeedingRegionByHF.h new file mode 100644 index 0000000000000..5237983de517b --- /dev/null +++ b/RecoHGCal/TICL/plugins/SeedingRegionByHF.h @@ -0,0 +1,54 @@ +// Author: dalfonso@cern.ch +// Date: 02/2021 + +#ifndef RecoHGCal_TICL_SeedingRegionByHF_h +#define RecoHGCal_TICL_SeedingRegionByHF_h +#include // unique_ptr +#include +#include "RecoHGCal/TICL/plugins/SeedingRegionAlgoBase.h" + +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Frameworkfwd.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" +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "CommonTools/Utils/interface/StringCutObjectSelector.h" +#include "FWCore/Utilities/interface/ESGetToken.h" + +#include "DataFormats/HcalRecHit/interface/HFRecHit.h" +#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" +#include "Geometry/Records/interface/CaloGeometryRecord.h" + +namespace ticl { + class SeedingRegionByHF final : public SeedingRegionAlgoBase { + public: + SeedingRegionByHF(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes); + ~SeedingRegionByHF() override; + + void initialize(const edm::EventSetup& es) override; + + void makeRegions(const edm::Event& ev, const edm::EventSetup& es, std::vector& result) override; + static void fillPSetDescription(edm::ParameterSetDescription& desc); + static edm::ParameterSetDescription makePSetDescription(); + + private: + void buildFirstLayers(); + + edm::EDGetTokenT HFhits_token_; + + int algoVerbosity_ = 0; + + double minAbsEta_; + double maxAbsEta_; + double minEt_; + + edm::ESGetToken geo_token_; + const CaloGeometry* geometry_; + }; +} // namespace ticl +#endif diff --git a/RecoHGCal/TICL/plugins/TICLSeedingRegionProducer.cc b/RecoHGCal/TICL/plugins/TICLSeedingRegionProducer.cc index ca4a80c3784e7..a25a61820c23e 100644 --- a/RecoHGCal/TICL/plugins/TICLSeedingRegionProducer.cc +++ b/RecoHGCal/TICL/plugins/TICLSeedingRegionProducer.cc @@ -15,10 +15,11 @@ #include "FWCore/ParameterSet/interface/PluginDescription.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "RecoHGCal/TICL/plugins/SeedingRegionAlgoBase.h" +#include "SeedingRegionAlgoFactory.h" #include "SeedingRegionByL1.h" #include "SeedingRegionByTracks.h" #include "SeedingRegionGlobal.h" -#include "SeedingRegionAlgoFactory.h" +#include "SeedingRegionByHF.h" using namespace ticl; diff --git a/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py b/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py index 0f2618cb1d230..2a4d1104d5995 100644 --- a/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py +++ b/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py @@ -17,7 +17,13 @@ ) ticlSeedingTrkHFNose = _ticlSeedingRegionProducer.clone( - algoId = 1, - detector = "HFNose", - cutTk = cms.string('3. < abs(eta) < 4. && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5'), + seedingPSet = _ticlSeedingRegionProducer.seedingPSet.clone(type="SeedingRegionByTracks"), +# type = dict ( +# detector = "HFNose", +# cutTk = cms.string('3. < abs(eta) < 4. && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5'), +# ) +) + +ticlSeedingByHFHFNose = _ticlSeedingRegionProducer.clone( + seedingPSet = _ticlSeedingRegionProducer.seedingPSet.clone(type="SeedingRegionByHF") ) From 73811dc86df9b94e6b9ca584761b9de4e378fd08 Mon Sep 17 00:00:00 2001 From: maria Date: Sun, 7 Mar 2021 13:38:54 +0100 Subject: [PATCH 10/14] fix SeedingRegionByTracks --- RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc | 1 + RecoHGCal/TICL/plugins/SeedingRegionByTracks.h | 2 +- RecoHGCal/TICL/python/TICLSeedingRegions_cff.py | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc index cf8bb764ed47f..0be82627ea2a5 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc +++ b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.cc @@ -74,6 +74,7 @@ void SeedingRegionByTracks::fillPSetDescription(edm::ParameterSetDescription &de "1.48 < abs(eta) < 3.0 && pt > 1. && quality(\"highPurity\") && " "hitPattern().numberOfLostHits(\"MISSING_OUTER_HITS\") < 5"); desc.add("propagator", "PropagatorWithMaterial"); + desc.add("detector", "HGCAL"); SeedingRegionAlgoBase::fillPSetDescription(desc); } diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.h b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.h index 5b6be87823176..328a351d482f7 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionByTracks.h +++ b/RecoHGCal/TICL/plugins/SeedingRegionByTracks.h @@ -46,7 +46,7 @@ namespace ticl { std::once_flag initializeGeometry_; const HGCalDDDConstants* hgcons_; const StringCutObjectSelector cutTk_; - std::string detector_; + const std::string detector_; edm::ESHandle propagator_; const std::string propName_; edm::ESHandle bfield_; diff --git a/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py b/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py index 2a4d1104d5995..dd5e6cbf248aa 100644 --- a/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py +++ b/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py @@ -17,11 +17,11 @@ ) ticlSeedingTrkHFNose = _ticlSeedingRegionProducer.clone( - seedingPSet = _ticlSeedingRegionProducer.seedingPSet.clone(type="SeedingRegionByTracks"), -# type = dict ( -# detector = "HFNose", -# cutTk = cms.string('3. < abs(eta) < 4. && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5'), -# ) + seedingPSet = _ticlSeedingRegionProducer.seedingPSet.clone( + type="SeedingRegionByTracks", + cutTk = cms.string('3. < abs(eta) < 4. && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5'), + detector = cms.string("HFNose") + ) ) ticlSeedingByHFHFNose = _ticlSeedingRegionProducer.clone( From 9563b8e9084bee41480c7ea11b81d15a1650d9c4 Mon Sep 17 00:00:00 2001 From: maria Date: Sun, 7 Mar 2021 13:43:15 +0100 Subject: [PATCH 11/14] improve SeedingRegionByHF --- RecoHGCal/TICL/plugins/SeedingRegionByHF.cc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc b/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc index 3219978a84441..eb825a4eb830e 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc +++ b/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc @@ -22,9 +22,9 @@ void SeedingRegionByHF::initialize(const edm::EventSetup &es) { geometry_ = &es. void SeedingRegionByHF::makeRegions(const edm::Event &ev, const edm::EventSetup &es, std::vector &result) { - auto recHitHandle = ev.getHandle(HFhits_token_); + const auto &recHits = ev.get(HFhits_token_); - for (const auto &erh : *recHitHandle) { + for (const auto &erh : recHits) { const HcalDetId &detid = (HcalDetId)erh.detid(); if (erh.energy() < minEt_) continue; @@ -42,11 +42,8 @@ void SeedingRegionByHF::makeRegions(const edm::Event &ev, auto phi = globalPosition.phi(); double theta = 2 * atan(exp(eta)); - double px = erh.energy() * sin(theta) * cos(phi); - double py = erh.energy() * sin(theta) * sin(phi); - double pz = erh.energy() * cos(theta); - - result.emplace_back(globalPosition, GlobalVector(px, py, pz), iSide, idx, hfSeedId); + result.emplace_back( + globalPosition, GlobalVector(GlobalVector::Polar(theta, phi, erh.energy())), iSide, idx, hfSeedId); } // sorting seeding region by descending momentum @@ -61,10 +58,6 @@ void SeedingRegionByHF::fillPSetDescription(edm::ParameterSetDescription &desc) desc.add("minAbsEta", 3.0); desc.add("maxAbsEta", 4.0); desc.add("minEt", 5); + SeedingRegionAlgoBase::fillPSetDescription(desc); } -edm::ParameterSetDescription SeedingRegionByHF::makePSetDescription() { - edm::ParameterSetDescription desc; - fillPSetDescription(desc); - return desc; -} From cf964a2bf865f26d5801b3e42d32b508fe1c9a3a Mon Sep 17 00:00:00 2001 From: maria Date: Mon, 8 Mar 2021 18:07:32 +0100 Subject: [PATCH 12/14] code-format --- RecoHGCal/TICL/plugins/SeedingRegionByHF.cc | 1 - RecoHGCal/TICL/python/TICLSeedingRegions_cff.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc b/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc index eb825a4eb830e..8cd3091e1992e 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc +++ b/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc @@ -60,4 +60,3 @@ void SeedingRegionByHF::fillPSetDescription(edm::ParameterSetDescription &desc) desc.add("minEt", 5); SeedingRegionAlgoBase::fillPSetDescription(desc); } - diff --git a/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py b/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py index dd5e6cbf248aa..0013688c98db3 100644 --- a/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py +++ b/RecoHGCal/TICL/python/TICLSeedingRegions_cff.py @@ -16,6 +16,7 @@ seedingPSet = _ticlSeedingRegionProducer.seedingPSet.clone(type="SeedingRegionGlobal") ) +# fixme: empty seed, need to work on propagator ticlSeedingTrkHFNose = _ticlSeedingRegionProducer.clone( seedingPSet = _ticlSeedingRegionProducer.seedingPSet.clone( type="SeedingRegionByTracks", From f1dfd445142f295cb65e6800c34c615a20f69e87 Mon Sep 17 00:00:00 2001 From: maria Date: Sun, 14 Mar 2021 19:22:39 +0100 Subject: [PATCH 13/14] restrict caloParticle to HFnose; customize the associations --- .../HGCalAssociatorProducers/python/LCToCPAssociation_cfi.py | 4 ++++ .../HGCalAssociatorProducers/python/LCToSCAssociation_cfi.py | 4 ++++ SimGeneral/MixingModule/python/caloTruthProducer_cfi.py | 2 +- Validation/Configuration/python/hgcalSimValid_cff.py | 5 +++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/SimCalorimetry/HGCalAssociatorProducers/python/LCToCPAssociation_cfi.py b/SimCalorimetry/HGCalAssociatorProducers/python/LCToCPAssociation_cfi.py index ca29d5bd8eb10..956ce90365dba 100644 --- a/SimCalorimetry/HGCalAssociatorProducers/python/LCToCPAssociation_cfi.py +++ b/SimCalorimetry/HGCalAssociatorProducers/python/LCToCPAssociation_cfi.py @@ -10,3 +10,7 @@ premix_stage2.toModify(layerClusterCaloParticleAssociation, label_cp = "mixData:MergedCaloTruth" ) + +layerClusterCaloParticleAssociationHFNose = layerClusterCaloParticleAssociation.clone( + label_lc = "hgcalLayerClustersHFNose" +) diff --git a/SimCalorimetry/HGCalAssociatorProducers/python/LCToSCAssociation_cfi.py b/SimCalorimetry/HGCalAssociatorProducers/python/LCToSCAssociation_cfi.py index 4d2515b0e0191..b070e219ce25a 100644 --- a/SimCalorimetry/HGCalAssociatorProducers/python/LCToSCAssociation_cfi.py +++ b/SimCalorimetry/HGCalAssociatorProducers/python/LCToSCAssociation_cfi.py @@ -10,3 +10,7 @@ premix_stage2.toModify(layerClusterSimClusterAssociation, label_scl = "mixData:MergedCaloTruth" ) + +layerClusterSimClusterAssociationHFNose = layerClusterSimClusterAssociation.clone( + label_lcl = "hgcalLayerClustersHFNose" +) diff --git a/SimGeneral/MixingModule/python/caloTruthProducer_cfi.py b/SimGeneral/MixingModule/python/caloTruthProducer_cfi.py index d7ba0d05cc286..0696591ad7b32 100644 --- a/SimGeneral/MixingModule/python/caloTruthProducer_cfi.py +++ b/SimGeneral/MixingModule/python/caloTruthProducer_cfi.py @@ -40,7 +40,7 @@ caloParticles, simHitCollections = dict( hgc = caloParticles.simHitCollections.hgc + [cms.InputTag('g4SimHits','HFNoseHits')], - hcal = cms.VInputTag(cms.InputTag('g4SimHits','HcalHits')) +# hcal = cms.VInputTag(cms.InputTag('g4SimHits','HcalHits')) ) ) diff --git a/Validation/Configuration/python/hgcalSimValid_cff.py b/Validation/Configuration/python/hgcalSimValid_cff.py index 4a3128e97816d..2fc76100faa36 100644 --- a/Validation/Configuration/python/hgcalSimValid_cff.py +++ b/Validation/Configuration/python/hgcalSimValid_cff.py @@ -3,6 +3,8 @@ from SimCalorimetry.HGCalSimProducers.hgcHitAssociation_cfi import lcAssocByEnergyScoreProducer, scAssocByEnergyScoreProducer from SimCalorimetry.HGCalAssociatorProducers.LCToCPAssociation_cfi import layerClusterCaloParticleAssociation as layerClusterCaloParticleAssociationProducer from SimCalorimetry.HGCalAssociatorProducers.LCToSCAssociation_cfi import layerClusterSimClusterAssociation as layerClusterSimClusterAssociationProducer +from SimCalorimetry.HGCalAssociatorProducers.LCToCPAssociation_cfi import layerClusterCaloParticleAssociationHFNose as layerClusterCaloParticleAssociationProducerHFNose +from SimCalorimetry.HGCalAssociatorProducers.LCToSCAssociation_cfi import layerClusterSimClusterAssociationHFNose as layerClusterSimClusterAssociationProducerHFNose from Validation.HGCalValidation.simhitValidation_cff import * from Validation.HGCalValidation.digiValidation_cff import * @@ -37,3 +39,6 @@ + hgcalValidatorSequence + hgcalTiclPFValidation + hgcalPFJetValidation) + +_hfnose_hgcalAssociatorsTask = hgcalAssociators.copy() +_hfnose_hgcalAssociatorsTask.add(layerClusterCaloParticleAssociationProducerHFNose, layerClusterSimClusterAssociationProducerHFNose) From b1df50fc79e474c27e6d5e11fcd5151f5cf69112 Mon Sep 17 00:00:00 2001 From: maria Date: Sun, 14 Mar 2021 19:26:31 +0100 Subject: [PATCH 14/14] fix code style --- RecoHGCal/TICL/plugins/SeedingRegionByHF.cc | 4 ++-- RecoHGCal/TICL/plugins/SeedingRegionByHF.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc b/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc index 8cd3091e1992e..f995a42777118 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc +++ b/RecoHGCal/TICL/plugins/SeedingRegionByHF.cc @@ -8,7 +8,7 @@ using namespace ticl; SeedingRegionByHF::SeedingRegionByHF(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes) : SeedingRegionAlgoBase(conf, sumes), - HFhits_token_(sumes.consumes(conf.getParameter("hits"))), + hfhits_token_(sumes.consumes(conf.getParameter("hits"))), minAbsEta_(conf.getParameter("minAbsEta")), maxAbsEta_(conf.getParameter("maxAbsEta")), minEt_(conf.getParameter("minEt")) { @@ -22,7 +22,7 @@ void SeedingRegionByHF::initialize(const edm::EventSetup &es) { geometry_ = &es. void SeedingRegionByHF::makeRegions(const edm::Event &ev, const edm::EventSetup &es, std::vector &result) { - const auto &recHits = ev.get(HFhits_token_); + const auto &recHits = ev.get(hfhits_token_); for (const auto &erh : recHits) { const HcalDetId &detid = (HcalDetId)erh.detid(); diff --git a/RecoHGCal/TICL/plugins/SeedingRegionByHF.h b/RecoHGCal/TICL/plugins/SeedingRegionByHF.h index 5237983de517b..795299c8b31a1 100644 --- a/RecoHGCal/TICL/plugins/SeedingRegionByHF.h +++ b/RecoHGCal/TICL/plugins/SeedingRegionByHF.h @@ -39,7 +39,7 @@ namespace ticl { private: void buildFirstLayers(); - edm::EDGetTokenT HFhits_token_; + edm::EDGetTokenT hfhits_token_; int algoVerbosity_ = 0;