Add truth track fitter module#4315
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds ChangesPHTruthTrackFitter and truth_track_id propagation
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 OpenGrep (1.23.0)offline/packages/trackreco/PHTruthTrackFitter.cc┌──────────────┐ �[32m✔�[39m �[1mOpengrep OSS�[0m [00.12][ERROR]: unable to find a config; path Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 567ecd05-b468-400f-939a-cf7ad780a926
📒 Files selected for processing (5)
offline/packages/trackreco/Makefile.amoffline/packages/trackreco/PHTruthSiliconAssociation.ccoffline/packages/trackreco/PHTruthTrackFitter.ccoffline/packages/trackreco/PHTruthTrackFitter.hoffline/packages/trackreco/PHTruthTrackSeeding.cc
| int PHTruthTrackFitter::process_event(PHCompositeNode* /*topNode*/) | ||
| { | ||
| m_trackMap->Reset(); | ||
|
|
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Avoid clearing a potentially shared SvtxTrackMap by default.
Line 108 unconditionally calls m_trackMap->Reset(). With the default name SvtxTrackMap (from PHTruthTrackFitter.h Line 63), this can erase tracks produced by earlier modules in the same event.
Proposed fix
- m_trackMap->Reset();
+ // Avoid wiping shared production track maps by default.
+ // Prefer configuring a dedicated output map name (e.g. "SvtxTruthTrackMap").
+ m_trackMap->Reset();As per path instructions, **/*.{cc,cpp,cxx,c} should prioritize correctness and safety.
Source: Path instructions
Build & test reportReport for commit 524797a19df088f6e8c015af09c97652daa8ced4:
Automatically generated by sPHENIX Jenkins continuous integration |
Build & test reportReport for commit d42c6871e40ab23b5bb2edfcba88948def95f325:
Automatically generated by sPHENIX Jenkins continuous integration |



Add
PHTruthTrackFittermodule which make SvtxTrack object based on truth information. It should be used together withPHTruthTrackSeedingmodule which I also make a minor change to add truth_track_id for TrackSeed object.No track fitting is done in the
PHTruthTrackFitteractually. Track states are populated from the G4Hit information.Types of changes
What kind of change does this PR introduce? (Bug fix, feature, ...)
TODOs (if applicable)
Links to other PRs in macros and calibration repositories (if applicable)
This PR adds a truth-driven track reconstruction path for simulation studies, enabling downstream workflows to test against “idealized” track content built directly from truth information. It also fixes an underlying issue where truth IDs were not consistently propagated into truth-based seeds.
Key changes:
PHTruthTrackFittersubsystem that constructsSvtxTrackobjects without performing a conventional fit.PHG4Hit-based truth associations (filtered to a consistent truth-track ID)truth_track_id:PHTruthTrackSeeding: setstruth_track_idon createdTrackSeed_FastSim_v2PHTruthSiliconAssociation: setstruth_track_idonTrackSeed_FastSim_v2trackrecobuild system and installed/public header lists.Potential risk areas:
SvtxTrackcontent now depends on truth-ID matching and the specific truth-hit association/deduplication logic used to form states.truth_track_idpresent inTrackSeedobjects (older workflows that lack it could behave differently).Possible future improvements:
AI-generated summaries can make mistakes—please use best judgment when reviewing the changes.