Skip to content

Commit

Permalink
Merge pull request #43094 from mmusich/attemptAtPhase2HLTValidation
Browse files Browse the repository at this point in the history
Introduce tracking and vertexing HLT validation (w.r.t TPs) for Phase 2
  • Loading branch information
cmsbuild authored Oct 27, 2023
2 parents 3c7ac38 + f1633ae commit 3df8fcb
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 6 deletions.
4 changes: 1 addition & 3 deletions HLTriggerOffline/Common/python/HLTValidation_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@

# Temporary Phase-2 config
from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
phase2_common.toReplaceWith(hltassociation, hltassociation.copyAndExclude([hltMultiTrackValidation,
hltMultiPVValidation,
egammaSelectors,
phase2_common.toReplaceWith(hltassociation, hltassociation.copyAndExclude([egammaSelectors,
ExoticaValidationProdSeq,
hltMultiTrackValidationGsfTracks,
hltMultiTrackValidationMuonTracks])
Expand Down
6 changes: 6 additions & 0 deletions Validation/RecoTrack/python/HLTmultiTrackValidator_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ def _modifyForRun3(trackvalidator):

from Configuration.Eras.Modifier_run3_common_cff import run3_common
run3_common.toModify(hltTrackValidator, _modifyForRun3)

def _modifyForPhase2(trackvalidator):
trackvalidator.label = ["generalTracks::HLT","hltPhase2PixelTracks"]

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(hltTrackValidator, _modifyForPhase2)
10 changes: 9 additions & 1 deletion Validation/RecoTrack/python/associators_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
stripClusterSrc = "hltSiStripRawToClustersFacility",
)

def _modifyForPhase2(tpClusterProducer):
tpClusterProducer.pixelClusterSrc = "siPixelClusters::HLT"
tpClusterProducer.phase2OTClusterSrc = "siPhase2Clusters::HLT"

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(hltTPClusterProducer, _modifyForPhase2)

hltTrackAssociatorByHits = SimTracker.TrackAssociatorProducers.quickTrackAssociatorByHits_cfi.quickTrackAssociatorByHits.clone()
hltTrackAssociatorByHits.cluster2TPSrc = cms.InputTag("hltTPClusterProducer")
hltTrackAssociatorByHits.UseGrouped = cms.bool( False )
Expand All @@ -24,7 +31,6 @@
hltTrackAssociatorByDeltaR.QCut = cms.double(0.5)
hltTrackAssociatorByDeltaR.ConsiderAllSimHits = cms.bool(True)


# Note: the TrackAssociatorEDProducers defined below, and
# tpToHLTtracksAssociationSequence sequence, are not currently needed
# to run MTV for HLT, as it is configured to produce the
Expand All @@ -36,6 +42,8 @@
ignoremissingtrackcollection = cms.untracked.bool(True)
)

phase2_tracker.toModify(tpToHLTpixelTrackAssociation, label_tr = "hltPhase2PixelTracks")

tpToHLTiter0tracksAssociation = tpToHLTpixelTrackAssociation.clone(
label_tr = cms.InputTag("hltIter0PFlowCtfWithMaterialTracks"),
# associator = cms.InputTag('hltTrackAssociatorByDeltaR'),
Expand Down
25 changes: 23 additions & 2 deletions Validation/RecoVertex/python/HLTmultiPVvalidator_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
trackAssociation = "tpToHLTpfMuonMergingTrackAssociation"
)


hltPixelPVanalysis = hltMultiPVanalysis.clone(
do_generic_sim_plots = True,
trackAssociatorMap = "tpToHLTpixelTrackAssociation",
Expand All @@ -33,6 +32,11 @@
)
)

def _modifyPixelPVanalysisForPhase2(pvanalysis):
pvanalysis.vertexRecoCollections = ["hltPhase2PixelVertices"]

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(hltPixelPVanalysis, _modifyPixelPVanalysisForPhase2)

hltPVanalysis = hltMultiPVanalysis.clone(
trackAssociatorMap = "tpToHLTpfMuonMergingTrackAssociation",
Expand All @@ -42,12 +46,29 @@
#"hltFastPVPixelVertices"
)
)

tpToHLTphase2TrackAssociation = tpToHLTpixelTrackAssociation.clone(
label_tr = "generalTracks::HLT"
)
vertexAssociatorByPositionAndTracks4phase2HLTTracks = _VertexAssociatorByPositionAndTracks.clone(
trackAssociation = "tpToHLTphase2TrackAssociation"
)

def _modifyFullPVanalysisForPhase2(pvanalysis):
pvanalysis.vertexRecoCollections = ["offlinePrimaryVertices::HLT"]
pvanalysis.trackAssociatorMap = "tpToHLTphase2TrackAssociation"
pvanalysis.vertexAssociator = "vertexAssociatorByPositionAndTracks4phase2HLTTracks"

phase2_tracker.toModify(hltPVanalysis, _modifyFullPVanalysisForPhase2)

hltMultiPVAssociations = cms.Task(
hltTrackAssociatorByHits,
tpToHLTpixelTrackAssociation,
vertexAssociatorByPositionAndTracks4pixelTracks,
tpToHLTpfMuonMergingTrackAssociation,
vertexAssociatorByPositionAndTracks4pfMuonMergingTracks
vertexAssociatorByPositionAndTracks4pfMuonMergingTracks,
tpToHLTphase2TrackAssociation,
vertexAssociatorByPositionAndTracks4phase2HLTTracks
)

hltMultiPVValidation = cms.Sequence(
Expand Down

0 comments on commit 3df8fcb

Please sign in to comment.