From 8d28a783a74b2e3dcb483480c35ef889949594fa Mon Sep 17 00:00:00 2001 From: AuroraPerego Date: Mon, 22 Jul 2024 21:09:25 +0200 Subject: [PATCH 1/3] add procModifier for TICLv5 at HLT --- .../modules/HGCalUncalibRecHitL1Seeded_cfi.py | 3 + .../modules/HGCalUncalibRecHit_cfi.py | 2 + ...hltFilteredLayerClustersPassThrough_cfi.py | 14 +++ .../HLT_75e33/modules/hltTiclCandidate_cfi.py | 30 ++++++ .../modules/hltTiclTracksterLinks_cfi.py | 34 +++++++ .../hltTiclTrackstersPassthrough_cfi.py | 91 +++++++++++++++++++ .../modules/particleFlowClusterHGCal_cfi.py | 3 + .../python/HLT_75e33/modules/pfTICL_cfi.py | 3 + .../ticlTrackstersCLUE3DHighL1Seeded_cfi.py | 6 +- .../modules/ticlTrackstersCLUE3DHigh_cfi.py | 6 +- .../sequences/HLTTiclCandidateSequence_cfi.py | 5 + .../HLTTiclTracksterLinksSequence_cfi.py | 5 + ...LTTiclTrackstersPassthroughSequence_cfi.py | 6 ++ .../sequences/iterTICLSequence_cfi.py | 6 ++ .../TICL/plugins/TICLCandidateProducer.cc | 1 - 15 files changed, 212 insertions(+), 3 deletions(-) create mode 100644 HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersPassThrough_cfi.py create mode 100644 HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py create mode 100644 HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinks_cfi.py create mode 100644 HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersPassthrough_cfi.py create mode 100644 HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclCandidateSequence_cfi.py create mode 100644 HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclTracksterLinksSequence_cfi.py create mode 100644 HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclTrackstersPassthroughSequence_cfi.py diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/HGCalUncalibRecHitL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/HGCalUncalibRecHitL1Seeded_cfi.py index 2d3970191a213..7d36dfe28201a 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/HGCalUncalibRecHitL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/HGCalUncalibRecHitL1Seeded_cfi.py @@ -57,3 +57,6 @@ computeLocalTime = cms.bool(False), algo = cms.string('HGCalUncalibRecHitWorkerWeights') ) + +from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 +ticl_v5.toModify(HGCalUncalibRecHitL1Seeded, computeLocalTime = cms.bool(True)) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/HGCalUncalibRecHit_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/HGCalUncalibRecHit_cfi.py index 49e42633a9d32..f8d8f1adb41bd 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/HGCalUncalibRecHit_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/HGCalUncalibRecHit_cfi.py @@ -59,3 +59,5 @@ algo = cms.string('HGCalUncalibRecHitWorkerWeights') ) +from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 +ticl_v5.toModify(HGCalUncalibRecHit, computeLocalTime = cms.bool(True)) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersPassThrough_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersPassThrough_cfi.py new file mode 100644 index 0000000000000..21c51448f74cd --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltFilteredLayerClustersPassThrough_cfi.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms + +hltFilteredLayerClustersPassthrough = cms.EDProducer("FilteredLayerClustersProducer", + LayerClusters = cms.InputTag("hgcalMergeLayerClusters"), + LayerClustersInputMask = cms.InputTag("ticlTrackstersCLUE3DHigh"), + algo_number = cms.vint32(6, 7, 8), + clusterFilter = cms.string('ClusterFilterBySize'), + iteration_label = cms.string('Passthrough'), + max_cluster_size = cms.int32(9999), + max_layerId = cms.int32(9999), + mightGet = cms.optional.untracked.vstring, + min_cluster_size = cms.int32(2), + min_layerId = cms.int32(0) +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py new file mode 100644 index 0000000000000..b9951d537f43a --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py @@ -0,0 +1,30 @@ +import FWCore.ParameterSet.Config as cms + +hltTiclCandidate = cms.EDProducer("TICLCandidateProducer", + cutTk = cms.string('1.48 < abs(eta) < 3.0 && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5'), + detector = cms.string('HGCAL'), + egamma_tracksterlinks_collections = cms.VInputTag("hltTiclTracksterLinks"), + egamma_tracksters_collections = cms.VInputTag("hltTiclTracksterLinks"), + general_tracksterlinks_collections = cms.VInputTag("hltTiclTracksterLinks"), + general_tracksters_collections = cms.VInputTag("hltTiclTracksterLinks"), + interpretationDescPSet = 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'), + delta_tk_ts_interface = cms.double(0.03), + delta_tk_ts_layer1 = cms.double(0.02), + timing_quality_threshold = cms.double(0.5), + type = cms.string('General') + ), + layer_clusters = cms.InputTag("hgcalMergeLayerClusters"), + layer_clustersTime = cms.InputTag("hgcalMergeLayerClusters","timeLayerCluster"), + mightGet = cms.optional.untracked.vstring, + muons = cms.InputTag("hltPhase2L3Muons"), + original_masks = cms.VInputTag("hgcalMergeLayerClusters:InitialLayerClustersMask"), + propagator = cms.string('PropagatorWithMaterial'), + timingQualityThreshold = cms.double(0.5), + timingSoA = cms.InputTag("mtdSoA"), + tracks = cms.InputTag("generalTracks"), + useMTDTiming = cms.bool(False), + useTimingAverage = cms.bool(False) +) + diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinks_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinks_cfi.py new file mode 100644 index 0000000000000..4580d5be3a468 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTracksterLinks_cfi.py @@ -0,0 +1,34 @@ +import FWCore.ParameterSet.Config as cms + +hltTiclTracksterLinks = cms.EDProducer("TracksterLinksProducer", + detector = cms.string('HGCAL'), + eid_input_name = cms.string('input'), + eid_min_cluster_energy = cms.double(2.5), + eid_n_clusters = cms.int32(10), + eid_n_layers = cms.int32(50), + eid_output_name_energy = cms.string('output/regressed_energy'), + eid_output_name_id = cms.string('output/id_probabilities'), + layer_clusters = cms.InputTag("hgcalMergeLayerClusters"), + layer_clustersTime = cms.InputTag("hgcalMergeLayerClusters","timeLayerCluster"), + linkingPSet = cms.PSet( + algo_verbosity = cms.int32(0), + cylinder_radius_sqr = cms.vdouble(9, 9), + dot_prod_th = cms.double(0.97), + max_distance_projective_sqr = cms.vdouble(60, 60), + max_distance_projective_sqr_closest_points = cms.vdouble(60, 60), + max_z_distance_closest_points = cms.vdouble(35, 35), + min_distance_z = cms.vdouble(30, 30), + min_num_lcs = cms.uint32(7), + min_trackster_energy = cms.double(10), + pca_quality_th = cms.double(0.85), + track_time_quality_threshold = cms.double(0.5), + type = cms.string('Skeletons'), + wind = cms.double(0.036) + ), + mightGet = cms.optional.untracked.vstring, + original_masks = cms.VInputTag("hgcalMergeLayerClusters:InitialLayerClustersMask"), + propagator = cms.string('PropagatorWithMaterial'), + regressionAndPid = cms.bool(True), + tfDnnLabel = cms.string('tracksterSelectionTf'), + tracksters_collections = cms.VInputTag("ticlTrackstersCLUE3DHigh", "hltTiclTrackstersPassthrough") +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersPassthrough_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersPassthrough_cfi.py new file mode 100644 index 0000000000000..5c2d5c379031a --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclTrackstersPassthrough_cfi.py @@ -0,0 +1,91 @@ +import FWCore.ParameterSet.Config as cms + +hltTiclTrackstersPassthrough = cms.EDProducer("TrackstersProducer", + detector = cms.string('HGCAL'), + filtered_mask = cms.InputTag("hltFilteredLayerClustersPassthrough","Passthrough"), + itername = cms.string('PassThrough'), + layer_clusters = cms.InputTag("hgcalMergeLayerClusters"), + layer_clusters_hfnose_tiles = cms.InputTag("ticlLayerTileHFNose"), + layer_clusters_tiles = cms.InputTag("ticlLayerTileProducer"), + mightGet = cms.optional.untracked.vstring, + original_mask = cms.InputTag("ticlTrackstersCLUE3DHigh"), + patternRecognitionBy = cms.string('Passthrough'), + pluginPatternRecognitionByCA = cms.PSet( + algo_verbosity = cms.int32(0), + computeLocalTime = cms.bool(True), + eid_input_name = cms.string('input'), + eid_min_cluster_energy = cms.double(1), + eid_n_clusters = cms.int32(10), + eid_n_layers = cms.int32(50), + eid_output_name_energy = cms.string('output/regressed_energy'), + eid_output_name_id = cms.string('output/id_probabilities'), + energy_em_over_total_threshold = cms.double(-1), + etaLimitIncreaseWindow = cms.double(2.1), + filter_on_categories = cms.vint32(0), + max_delta_time = cms.double(3), + max_longitudinal_sigmaPCA = cms.double(9999), + max_missing_layers_in_trackster = cms.int32(9999), + max_out_in_hops = cms.int32(10), + min_cos_pointing = cms.double(-1), + min_cos_theta = cms.double(0.915), + min_layers_per_trackster = cms.int32(10), + oneTracksterPerTrackSeed = cms.bool(False), + out_in_dfs = cms.bool(True), + pid_threshold = cms.double(0), + promoteEmptyRegionToTrackster = cms.bool(False), + root_doublet_max_distance_from_seed_squared = cms.double(9999), + shower_start_max_layer = cms.int32(9999), + siblings_maxRSquared = cms.vdouble(0.0006, 0.0006, 0.0006), + skip_layers = cms.int32(0), + type = cms.string('CA') + ), + pluginPatternRecognitionByCLUE3D = cms.PSet( + algo_verbosity = cms.int32(0), + computeLocalTime = cms.bool(True), + criticalDensity = cms.vdouble(4, 4, 4), + criticalEtaPhiDistance = cms.vdouble(0.025, 0.025, 0.025), + criticalSelfDensity = cms.vdouble(0.15, 0.15, 0.15), + criticalXYDistance = cms.vdouble(1.8, 1.8, 1.8), + criticalZDistanceLyr = cms.vint32(5, 5, 5), + cutHadProb = cms.double(0.5), + densityEtaPhiDistanceSqr = cms.vdouble(0.0008, 0.0008, 0.0008), + densityOnSameLayer = cms.bool(False), + densitySiblingLayers = cms.vint32(3, 3, 3), + densityXYDistanceSqr = cms.vdouble(3.24, 3.24, 3.24), + doPidCut = cms.bool(False), + eid_input_name = cms.string('input'), + eid_min_cluster_energy = cms.double(1), + eid_n_clusters = cms.int32(10), + eid_n_layers = cms.int32(50), + eid_output_name_energy = cms.string('output/regressed_energy'), + eid_output_name_id = cms.string('output/id_probabilities'), + kernelDensityFactor = cms.vdouble(0.2, 0.2, 0.2), + minNumLayerCluster = cms.vint32(2, 2, 2), + nearestHigherOnSameLayer = cms.bool(False), + outlierMultiplier = cms.vdouble(2, 2, 2), + rescaleDensityByZ = cms.bool(False), + type = cms.string('CLUE3D'), + useAbsoluteProjectiveScale = cms.bool(True), + useClusterDimensionXY = cms.bool(False) + ), + pluginPatternRecognitionByFastJet = cms.PSet( + algo_verbosity = cms.int32(0), + antikt_radius = cms.double(0.09), + computeLocalTime = cms.bool(True), + eid_input_name = cms.string('input'), + eid_min_cluster_energy = cms.double(1), + eid_n_clusters = cms.int32(10), + eid_n_layers = cms.int32(50), + eid_output_name_energy = cms.string('output/regressed_energy'), + eid_output_name_id = cms.string('output/id_probabilities'), + minNumLayerCluster = cms.int32(5), + type = cms.string('FastJet') + ), + pluginPatternRecognitionByPassthrough = cms.PSet( + algo_verbosity = cms.int32(0), + type = cms.string('Passthrough') + ), + seeding_regions = cms.InputTag("ticlSeedingGlobal"), + tfDnnLabel = cms.string('tracksterSelectionTf'), + time_layerclusters = cms.InputTag("hgcalMergeLayerClusters","timeLayerCluster") +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/particleFlowClusterHGCal_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/particleFlowClusterHGCal_cfi.py index a37a2261101c1..4f13541d2748e 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/particleFlowClusterHGCal_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/particleFlowClusterHGCal_cfi.py @@ -33,3 +33,6 @@ ), usePFThresholdsFromDB = cms.bool(False) ) + +from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 +ticl_v5.toModify(particleFlowClusterHGCal.initialClusteringStep, tracksterSrc = "hltTiclCandidate") diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/pfTICL_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/pfTICL_cfi.py index 56b16d169d4cd..5160548f54fd3 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/pfTICL_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/pfTICL_cfi.py @@ -32,3 +32,6 @@ useMTDTiming = cms.bool(False), useTimingAverage = cms.bool(False) ) + +from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 +ticl_v5.toModify(pfTICL, ticlCandidateSrc = cms.InputTag('hltTiclCandidate'), isTICLv5 = cms.bool(True)) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/ticlTrackstersCLUE3DHighL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/ticlTrackstersCLUE3DHighL1Seeded_cfi.py index 2d5e06aef40de..b27f0bb29b271 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/ticlTrackstersCLUE3DHighL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/ticlTrackstersCLUE3DHighL1Seeded_cfi.py @@ -106,10 +106,11 @@ eid_min_cluster_energy = cms.double(1), eid_n_layers = cms.int32(50), eid_n_clusters = cms.int32(10), + computeLocalTime = cms.bool(False), doPidCut = cms.bool(True), cutHadProb = cms.double(999.), type = cms.string('CLUE3D') - + ), pluginPatternRecognitionByFastJet = cms.PSet( algo_verbosity = cms.int32(0), @@ -127,3 +128,6 @@ tfDnnLabel = cms.string('tracksterSelectionTf'), time_layerclusters = cms.InputTag("hgcalMergeLayerClustersL1Seeded","timeLayerCluster") ) + +from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 +ticl_v5.toModify(ticlTrackstersCLUE3DHighL1Seeded.pluginPatternRecognitionByCLUE3D, computeLocalTime = cms.bool(True), doPidCut = cms.bool(False)) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/ticlTrackstersCLUE3DHigh_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/ticlTrackstersCLUE3DHigh_cfi.py index 3bbe16747ec47..18337be675dfd 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/ticlTrackstersCLUE3DHigh_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/ticlTrackstersCLUE3DHigh_cfi.py @@ -106,10 +106,11 @@ eid_min_cluster_energy = cms.double(1), eid_n_layers = cms.int32(50), eid_n_clusters = cms.int32(10), + computeLocalTime = cms.bool(False), doPidCut = cms.bool(True), cutHadProb = cms.double(999.), type = cms.string('CLUE3D') - + ), pluginPatternRecognitionByFastJet = cms.PSet( algo_verbosity = cms.int32(0), @@ -127,3 +128,6 @@ tfDnnLabel = cms.string('tracksterSelectionTf'), time_layerclusters = cms.InputTag("hgcalMergeLayerClusters","timeLayerCluster") ) + +from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 +ticl_v5.toModify(ticlTrackstersCLUE3DHigh.pluginPatternRecognitionByCLUE3D, computeLocalTime = cms.bool(True), doPidCut = cms.bool(False)) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclCandidateSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclCandidateSequence_cfi.py new file mode 100644 index 0000000000000..17d6346353362 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclCandidateSequence_cfi.py @@ -0,0 +1,5 @@ +import FWCore.ParameterSet.Config as cms + +from ..modules.hltTiclCandidate_cfi import * + +HLTTiclCandidateSequence = cms.Sequence(hltTiclCandidate) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclTracksterLinksSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclTracksterLinksSequence_cfi.py new file mode 100644 index 0000000000000..b4f98980f6563 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclTracksterLinksSequence_cfi.py @@ -0,0 +1,5 @@ +import FWCore.ParameterSet.Config as cms + +from ..modules.hltTiclTracksterLinks_cfi import * + +HLTTiclTracksterLinksSequence = cms.Sequence(hltTiclTracksterLinks) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclTrackstersPassthroughSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclTrackstersPassthroughSequence_cfi.py new file mode 100644 index 0000000000000..f17b7fe16e0a5 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTiclTrackstersPassthroughSequence_cfi.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +from ..modules.hltFilteredLayerClustersPassThrough_cfi import * +from ..modules.hltTiclTrackstersPassthrough_cfi import * + +HLTTiclTrackstersPassthroughSequence = cms.Sequence(hltFilteredLayerClustersPassthrough+hltTiclTrackstersPassthrough) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/iterTICLSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/iterTICLSequence_cfi.py index b2ddde7269c79..4607f7662eebd 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/iterTICLSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/iterTICLSequence_cfi.py @@ -4,5 +4,11 @@ from ..sequences.ticlPFSequence_cfi import * from ..sequences.ticlTracksterMergeSequence_cfi import * from ..sequences.ticlTrackstersCLUE3DHighStepSequence_cfi import * +from ..sequences.HLTTiclTrackstersPassthroughSequence_cfi import * +from ..sequences.HLTTiclTracksterLinksSequence_cfi import * +from ..sequences.HLTTiclCandidateSequence_cfi import * iterTICLSequence = cms.Sequence(ticlLayerTileSequence+ticlTrackstersCLUE3DHighStepSequence+ticlTracksterMergeSequence+ticlPFSequence) + +from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 +ticl_v5.toReplaceWith(iterTICLSequence, cms.Sequence(ticlLayerTileSequence+ticlTrackstersCLUE3DHighStepSequence+HLTTiclTrackstersPassthroughSequence+HLTTiclTracksterLinksSequence+HLTTiclCandidateSequence+ticlPFSequence)) diff --git a/RecoHGCal/TICL/plugins/TICLCandidateProducer.cc b/RecoHGCal/TICL/plugins/TICLCandidateProducer.cc index 1d9cfb6f7e0c6..5268a88b2bb18 100644 --- a/RecoHGCal/TICL/plugins/TICLCandidateProducer.cc +++ b/RecoHGCal/TICL/plugins/TICLCandidateProducer.cc @@ -118,7 +118,6 @@ TICLCandidateProducer::TICLCandidateProducer(const edm::ParameterSet &ps) clustersTime_token_( consumes>>(ps.getParameter("layer_clustersTime"))), tracks_token_(consumes>(ps.getParameter("tracks"))), - inputTimingToken_(consumes(ps.getParameter("timingSoA"))), muons_token_(consumes>(ps.getParameter("muons"))), useMTDTiming_(ps.getParameter("useMTDTiming")), useTimingAverage_(ps.getParameter("useTimingAverage")), From f22f0d22f713fc78c1addeb4c54bc24cec815cf4 Mon Sep 17 00:00:00 2001 From: AuroraPerego Date: Wed, 17 Jul 2024 17:47:40 +0200 Subject: [PATCH 2/3] run TICLv5 at HLT in .203 wfs --- .../python/upgradeWorkflowComponents.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 4f5431808e1ff..2f84c94e85b81 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -697,24 +697,32 @@ def condition(self, fragment, stepList, key, hasHarvest): class UpgradeWorkflow_ticl_v5(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 (fragment=="TTbar_14TeV" or 'CloseByP' in fragment or 'Eta1p7_2p7' in fragment) and '2026' in key + upgradeWFs['ticl_v5'] = UpgradeWorkflow_ticl_v5( steps = [ + 'HLTOnly', + 'DigiTrigger', 'RecoGlobal', 'HARVESTGlobal' ], PU = [ + 'HLTOnly', + 'DigiTrigger', 'RecoGlobal', 'HARVESTGlobal' ], suffix = '_ticl_v5', offset = 0.203, ) +upgradeWFs['ticl_v5'].step2 = {'--procModifiers': 'ticl_v5'} upgradeWFs['ticl_v5'].step3 = {'--procModifiers': 'ticl_v5'} upgradeWFs['ticl_v5'].step4 = {'--procModifiers': 'ticl_v5'} From 6633fcf7ecacd555db6e06937b028f74b06bbd4d Mon Sep 17 00:00:00 2001 From: AuroraPerego Date: Sat, 20 Jul 2024 00:05:47 +0200 Subject: [PATCH 3/3] use debug level and ifdef in the TICLCandidateProducer --- .../TICL/plugins/TICLCandidateProducer.cc | 79 ++++++++++--------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/RecoHGCal/TICL/plugins/TICLCandidateProducer.cc b/RecoHGCal/TICL/plugins/TICLCandidateProducer.cc index 5268a88b2bb18..00557cc011605 100644 --- a/RecoHGCal/TICL/plugins/TICLCandidateProducer.cc +++ b/RecoHGCal/TICL/plugins/TICLCandidateProducer.cc @@ -346,45 +346,48 @@ void TICLCandidateProducer::produce(edm::Event &evt, const edm::EventSetup &es) } } - auto getPathLength = [&](const reco::Track &track, float zVal) { - const auto &fts_inn = trajectoryStateTransform::innerFreeState(track, bFieldProd); - const auto &fts_out = trajectoryStateTransform::outerFreeState(track, bFieldProd); - const auto &surf_inn = trajectoryStateTransform::innerStateOnSurface(track, *trackingGeometry_, bFieldProd); - const auto &surf_out = trajectoryStateTransform::outerStateOnSurface(track, *trackingGeometry_, bFieldProd); - - Basic3DVector pos(track.referencePoint()); - Basic3DVector mom(track.momentum()); - FreeTrajectoryState stateAtBeamspot{GlobalPoint(pos), GlobalVector(mom), track.charge(), bFieldProd}; - - float pathlength = propagator->propagateWithPath(stateAtBeamspot, surf_inn.surface()).second; - - if (pathlength) { - const auto &t_inn_out = propagator->propagateWithPath(fts_inn, surf_out.surface()); - - if (t_inn_out.first.isValid()) { - pathlength += t_inn_out.second; - - std::pair rMinMax = hgcons_->rangeR(zVal, true); - - int iSide = int(track.eta() > 0); - float zSide = (iSide == 0) ? (-1. * zVal) : zVal; - const auto &disk = std::make_unique( - Disk::build(Disk::PositionType(0, 0, zSide), - Disk::RotationType(), - SimpleDiskBounds(rMinMax.first, rMinMax.second, zSide - 0.5, zSide + 0.5)) - .get()); - const auto &tsos = propagator->propagateWithPath(fts_out, disk->surface()); - - if (tsos.first.isValid()) { - pathlength += tsos.second; - return pathlength; + auto getPathLength = + [&](const reco::Track &track, float zVal) { + const auto &fts_inn = trajectoryStateTransform::innerFreeState(track, bFieldProd); + const auto &fts_out = trajectoryStateTransform::outerFreeState(track, bFieldProd); + const auto &surf_inn = trajectoryStateTransform::innerStateOnSurface(track, *trackingGeometry_, bFieldProd); + const auto &surf_out = trajectoryStateTransform::outerStateOnSurface(track, *trackingGeometry_, bFieldProd); + + Basic3DVector pos(track.referencePoint()); + Basic3DVector mom(track.momentum()); + FreeTrajectoryState stateAtBeamspot{GlobalPoint(pos), GlobalVector(mom), track.charge(), bFieldProd}; + + float pathlength = propagator->propagateWithPath(stateAtBeamspot, surf_inn.surface()).second; + + if (pathlength) { + const auto &t_inn_out = propagator->propagateWithPath(fts_inn, surf_out.surface()); + + if (t_inn_out.first.isValid()) { + pathlength += t_inn_out.second; + + std::pair rMinMax = hgcons_->rangeR(zVal, true); + + int iSide = int(track.eta() > 0); + float zSide = (iSide == 0) ? (-1. * zVal) : zVal; + const auto &disk = std::make_unique( + Disk::build(Disk::PositionType(0, 0, zSide), + Disk::RotationType(), + SimpleDiskBounds(rMinMax.first, rMinMax.second, zSide - 0.5, zSide + 0.5)) + .get()); + const auto &tsos = propagator->propagateWithPath(fts_out, disk->surface()); + + if (tsos.first.isValid()) { + pathlength += tsos.second; + return pathlength; + } + } } - } - } - edm::LogWarning("TICLCandidateProducer") - << "Not able to use the track to compute the path length. A straight line will be used instead."; - return 0.f; - }; +#ifdef EDM_ML_DEBUG + LogDebug("TICLCandidateProducer") + << "Not able to use the track to compute the path length. A straight line will be used instead."; +#endif + return 0.f; + }; assignTimeToCandidates(*resultCandidates, tracks_h, inputTimingView, getPathLength);