Repository navigation
[Tools,PWGJE] Implemented full inference of GNN b-jet tagger - #18682
Open
choich08365 wants to merge 7 commits into
Open
choich08365 wants to merge 7 commits into
choich08365 wants to merge 7 commits into
Conversation
added 6 commits
October 30, 2026 13:54
|
O2 linter results: ❌ 0 errors, |
choich08365
marked this pull request as ready for review
November 10, 2026 12:06
choich08365
requested review from
alibuild,
fcatalan92,
fjonasALICE,
fmazzasc,
jaimenorman,
mhemmer-cern and
nzardosh
as code owners
November 10, 2026 12:06
nzardosh
approved these changes
Nov 10, 2026
Collaborator
|
Error while checking build/O2Physics/o2 for ba59bea at 2026-11-10 16:45: Full log here. |
Collaborator
|
Error while checking build/O2Physics/code-check for ba59bea at 2026-11-10 17:11: Full log here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dear @fcatalan92, @nzardosh, and all concerned,
Could you please take a look at this PR when you have time? I apologise for the large number of changes, and really appreciate your time and effort in reviewing them.
Thank you in advance.
This update extends the GNN b-jet tagger infrastructure to support its track-origin and vertex prediction outputs, enabling future applications such as selecting tracks from b-hadron decays. The current implementation stores jet-tagging and track-origin prediction scores and provides aligned MC truth labels for track origins and vertex indices. Edge-based vertex prediction storage remains deferred.
Tools/ML/model.h,Tools/ML/MlResponse.hevalModelFullto the model interface andgetModelOutputstoMlResponse, returning one vector per output tensor in the ONNX model's output order.getModelOutputexposes only the last output tensor. The new interface provides access to all three GNN outputs—edge predictions, track-origin predictions, and jet-flavour predictions—from a single model evaluation.PWGJE/DataModel/JetTagging.h*denotesChargedorChargedMCDetectorLevel.*JetGnnTracks(jet, track)pair, containing the jet index, theJTracksindex, and the track's node index in the GNN input.*JetGnnTrackIds*JetGnnTracks, accessible throughtracksGnn_as<T>().ChargedMCDetectorLevelJetTrackOriginDefChargedMCDetectorLevelJetVertexIndexDef*JetGnnTrackOriginTagsscoreML, per GNN input track.-1for unassigned tracks,0for the primary vertex, and positive values for secondary vertices.*JetGnnTracks, allowing them to be joined and accessed together throughtracksGnn_as<soa::Join<...>>().*JetGnnTrackIdspreserves one row per input jet, including an empty array for jets without selected GNN tracks.PWGJE/TableProducer/jetGnnDefinition.cxx*JetGnnTracksand*JetGnnTrackIds.ChargedMCDetectorLevelJetTrackOriginDefandChargedMCDetectorLevelJetVertexIndexDefusingvertexClustering, projecting the full constituent labels onto the selected GNN tracks.jet-gnn-definitioninPWGJE/TableProducer/CMakeLists.txt.PWGJE/TableProducer/jetGnnInference.cxxprocessGnnTagfills the existing jet-tagging tables.processGnnFulladditionally fills the track-origin prediction tables using the input-track mapping produced byjet-gnn-definition.processAlgorithmGNNinjetTaggerHF.cxx. A separate task accommodates the additional GNN outputs and their table dependencies.-999while preserving table alignment.PWGJE/Tasks/bjetTreeCreator.cxxjet-gnn-definition, replacing its localvertexClusteringcall.processMCJetsForGNNExtrb. The standardprocessMCJetsForGNNuses derived track tables without subscribing to the originalaod::Trackstables.PWGJE/Tasks/bjetTaggingGnn.cxxPWGJE/Core/JetTaggingUtilities.hExtended
analyzeJetTrackInfo4GNNwith an optional constituent-index mapping that follows the exact model-node order after track selection and truncation.Added
getTrackDbas a provisional discriminant for b-decay track selection. Using softmax probabilities for the five track-origin categories, it computes: