Skip to content

[PWGJE] bjetTreeCreator: Adding detector- and truth-level tables for b-jet EEC - #19128

Open
nambrath wants to merge 4 commits into
AliceO2Group:masterfrom
nambrath:bjet-tree-creator-eec
Open

nambrath wants to merge 4 commits into
AliceO2Group:masterfrom
nambrath:bjet-tree-creator-eec

Conversation

@nambrath

@nambrath nambrath commented Dec 4, 2026

Copy link
Copy Markdown

This PR extends bjetTreeCreator to produce the inputs for a b-jet EEC analysis. In addition to the GNN training input, this code now also produces: detector-level trees on the rest of the MC sample, truth-level trees (for detector effects and unfolding), and matching information between the two. All pre-existing workflows continue to work as before.

Specifically, the changes introduced are:

  • Processing non-training events: a new configurable useEvaluationSample has been introduced. If trainingDatasetRatioParam is N, this keeps events with collisionId % N != 0 so that the complement of the training dataset (which uses collisionId % N == 0) can be processed.
  • Jet matching: The function processMCJetsForGNN now also reads in the jet matching tables. The matched truth-level jet ID is saved to the table bjetParamsExtra in the column MatchedMCPJetID (-1 if no match).
  • Detector tracks: bjetTracksParamsExtra has two new columns, IsGlobalTrack and MCParticleID. The first flags whether a track passes the global track selection cuts, so that we can compare using all quality-track jet constituents with using only global-track constituents (the jets themselves are unchanged). The second allows us to do track-level matching between detector- and truth-level (using JMcTrackLbs), which will be important for the EEC analysis.
  • Truth-level processing: A new function processMCTruthJetsForEEC has been introduced, to write two new tables. First is bjetTruthJets, which saves the jet ID (for matching), pT, eta, phi, jet radius, flavor (from jet-hf-definition), # of tracks, event weight, event pt-hat, and vz. It also saves whether the truth-level event has a corresponding detector-level event that passes selection cuts, or an outlier detector-level event, and whether that event is in the training sample. The other table is bjetTruthTracks, which saves the jet index in bjetTruthJets, MC particle ID (for track matching), pT, eta, phi, and PDG code. All truth-level events with |vz|<vertexZCut are kept, but MB gap events and truth-level outliers are omitted. The existing processMCTruthJets is unchanged.

Anjali Nambrath and others added 4 commits November 18, 2026 16:52
Keeps the complement of the training sample (collisionId % N != 0).
Added matched particle-level jet ID to bjetparamsextra table in
bjetTreeCreator.
Added global-track flag and MC ID (for track matching later) to
bjetTracksParamsExtra. Also declared truth-level tables.
Created new function processMCTruthJetsForEEC. Filling truth-level jet
and track tables there (no conflict with previous truth jet function).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant