Track Purity DNN for Phase-2 HLT - #251
Conversation
|
@ariostas |
|
Yeah, I'll have it done next week |
|
I added a fork in the LST org https://github.com/SegmentLinking/RecoTracker-FinalTrackSelectors |
|
run-ci: [hlt, checks] |
|
Actually, I never tested |
|
run-ci: [hlt, checks] |
|
There was a problem while building and running with HLT workflow. The logs can be found here. |
|
I guess it makes sense that it failed since the procmodifier doesn't exist in master. Let me add extra options to have different procmodifiers in the PR and target branch. |
|
run-ci: [hlt, checks] |
|
The PR was built and ran successfully with HLT setup running on CPU (procModifiers = ). Here are some plots. HLT General Plots
The full set of validation and comparison plots can be found here. |
slava77
left a comment
There was a problem hiding this comment.
mostly naming/style or simpler syntax comments.
Also, unclear why a non-Alpaka torch classifier is needed
| import FWCore.ParameterSet.Config as cms | ||
|
|
||
| # This modifier sets the use of a deep neural network for high purity track selection | ||
| trackTorchClassifier = cms.Modifier() No newline at end of file |
| firstValid = cms.vuint32(1), | ||
| iovIsRunNotTime = cms.bool(True) | ||
| ) | ||
|
|
| from Configuration.ProcessModifiers.trackTorchClassifier_cff import trackTorchClassifier | ||
| trackTorchClassifier.toModify(hltInitialStepTrackCutClassifier, | ||
| src = cms.InputTag("hltInitialStepTrackTorchClassifierOutput") | ||
| ) No newline at end of file |
| hltPhase2LegacyTracking.toModify(hltInitialStepTrackCutClassifier, | ||
| mva = dict(passThroughForAll=False, passThroughForDisplaced=False) | ||
| ) | ||
|
|
There was a problem hiding this comment.
why is this here? looks duplicate of 10 lines above
|
|
||
| from Configuration.ProcessModifiers.trackTorchClassifier_cff import trackTorchClassifier | ||
| trackTorchClassifier.toModify(hltInitialStepTrackCutClassifier, | ||
| src = cms.InputTag("hltInitialStepTrackTorchClassifierOutput") |
There was a problem hiding this comment.
| src = cms.InputTag("hltInitialStepTrackTorchClassifierOutput") | |
| src = "hltInitialStepTrackTorchClassifierOutput" |
is a safer syntax
| features_token_(consumes(iConfig.getParameter<edm::InputTag>("features"))), | ||
| scores_token_{produces()}, |
There was a problem hiding this comment.
may add Input/Put modifiers in the names for clarity
|
|
||
| #include "DataFormats/SoATemplate/interface/SoALayout.h" | ||
|
|
||
| GENERATE_SOA_LAYOUT(TrackFeaturesSoALayout, |
There was a problem hiding this comment.
| GENERATE_SOA_LAYOUT(TrackFeaturesSoALayout, | |
| GENERATE_SOA_LAYOUT(TrackTorchClassifierFeaturesSoALayout, |
unless the idea is that this is going to be universal
There was a problem hiding this comment.
why is this file/TrackTorchClassifier needed if the Alpaka variant is present?
|
|
||
| // This module consumes the HOST copy of the Alpaka device scores | ||
| // The framework automatically creates host copies of device PortableCollections | ||
| class TrackTorchClassifierAlpakaOutput : public edm::stream::EDProducer<> { |
There was a problem hiding this comment.
| class TrackTorchClassifierAlpakaOutput : public edm::stream::EDProducer<> { | |
| class TrackTorchClassifierFromSoA : public edm::stream::EDProducer<> { |
FromSoA is a more common name modifier for modules reading a SoA and making a "legacy"/non-alpaka collection
| : tracks_token_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("src"))), | ||
| scores_token_(consumes<PortableHostCollection<TrackScoresSoA>>(iConfig.getParameter<edm::InputTag>("scores"))), |
There was a problem hiding this comment.
| : tracks_token_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("src"))), | |
| scores_token_(consumes<PortableHostCollection<TrackScoresSoA>>(iConfig.getParameter<edm::InputTag>("scores"))), | |
| : tracks_token_(consumes(iConfig.getParameter<edm::InputTag>("src"))), | |
| scores_token_(consumes(iConfig.getParameter<edm::InputTag>("scores"))), |
IIRC types are not needed in the consumes call, it's already detectable from the type of the token.
Check other files
|
run-ci: [hlt, checks] |
|
run-ci: hlt |
|
The PR was built and ran successfully with HLT setup running on CPU (procModifiers = ). Here are some plots. HLT General Plots
The full set of validation and comparison plots can be found here. |
slava77
left a comment
There was a problem hiding this comment.
This PR looks almost good to go to CMSSW.
The step to do before doing it is to take out the model file from the commits in this PR and submit it in https://github.com/cms-data/RecoTracker-FinalTrackSelectors
There was a problem hiding this comment.
this file should be removed from the CMSSW PR.
The file will be passed via a PR to https://github.com/cms-data/RecoTracker-FinalTrackSelectors
please remove it from the commit history as well.
d812d8f to
15d938f
Compare
It looks like the model file is gone. |
15d938f to
62883d2
Compare
Just squashed to 2 commits, let me know if you'd prefer a single commit or if this looks fine. |
currently the second commit (62883d2) still about a half redoing/renaming the code from the previous commit. |
|
(in case needed; a diff of the May 1st version wrt the two last two commit variant; git isn't making it easy to find or see anymore: https://github.com/SegmentLinking/cmssw/compare/a229b532955f0693977515bf883ac674c3d4b77f..62883d201c58b60d03f1576d54b67d8925e1e002 |
62883d2 to
4986d26
Compare
|
in CMSSW bot results the Once the bad scaling is confirmed, the CPU time trace from a profiler would also be useful. e.g. with |
93e8c78 to
faccda8
Compare
|
run-ci: all |
mainly to check/confirm that CI is broken |
|
There was a problem while building and running in standalone mode. The logs can be found here. |
|
There was a problem while building and running with CMSSW. The logs can be found here. |
Co-authored-by: Jade Chismar <jchismar@ucsd.edu>
1c6ef29 to
22195b2
Compare


Implementation of a track purity DNN used for high purity selection for HLT tracks. Initial results were presented by Aashay at the tracking POG meeting on 15 Dec 2025. Since then, the model has been retrained with the latest version of LST, and a separate threshold has been implemented for displaced tracks (|dxy| > 0.5) in order to improve displaced track efficiency. This threshold is set at a target recall of 99.5% calculated on tracks with |dxy| > 0.5. For tracks with |dxy|$\le$ 0.5, the threshold is set at a target recall of 99.5% calculated on all tracks. Additionally, the number of input features has been reduced from 29 to 15 with no loss of performance. The DNN is configured to run in the HLTInitialStepSequence after the hltInitialStepTracks step when the trackTorchClassifier procModifier is used. The procModifier is used due to an existing issue with PyTorch GPU memory usage.
The model file is here: SegmentLinking/RecoTracker-FinalTrackSelectors#1
MTV performance on TT+PU=200 is shown below.

