Repository navigation
Fix DC straight-track NDF reporting - #1587
Merged
Merged
Conversation
The straight fitter records ordinary NDF but leaves NDFDAF unset. The bank writer then substitutes 999 for TBTracks.ndf, which is propagated to REC::Track.NDF and makes downstream reduced-chi2 cuts too loose. Populate the shared output field from the straight fitter's ordinary NDF. Keep the field-on weighted-NDF assignment unchanged.
yugotra
marked this pull request as ready for review
November 12, 2026 16:14
yugotra
requested review from
hauenst,
tongtongcao and
zieglerv
as code owners
November 12, 2026 16:14
tongtongcao
approved these changes
Nov 12, 2026
tongtongcao
left a comment
Collaborator
There was a problem hiding this comment.
Good finding. When update tracking with DAF, we updated NDF for non-straight case, but missed to do the same update for straight case.
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.
Successful straight DC fits currently publish
TimeBasedTrkg::TBTracks.ndf = 999, which propagates toREC::Track.NDF. A downstreamchi2/NDFselection therefore uses an artificially large denominator even though the ordinary fit NDF is available inTBTracks.ndf0. In run 20039, all 1,573,939 inspected exported DC seeds had this incorrect reported value; ordinary NDF ranged from 9 to 65.This change publishes the straight fitter's ordinary NDF through the existing shared output field. It corrects reported fit quality; it is not a track-recovery or resolution-improvement change.
Defect and fix
The successful straight-fit branch of
DCTBEnginecallsset_FitNDF(kFZRef.NDF)but leaves_NDFDAFat its default zero.RecoBankWriterinitializes the published DAF NDF to 999 and replaces it only for positive or negative_NDFDAF.DetectorDatathen copiesTBTracks.ndfinto the REC track.Add the following next to the ordinary-NDF assignment in the straight-fit branch only:
For valid positive ordinary NDF, the existing writer now publishes
ndf == ndf0. The field-on branch continues to usekFZRef.getNDFDAF(). The writer's treatment of invalid/zero NDF is unchanged.Controlled validation
Paired CLARA reconstructions with 12 threads, identical input events and frozen conditions. The data comparison used the released 14.2.0 runtime; the patched DC JAR replaced only
DCTBEngine.class.Both samples cover all six sectors. The field-on sample includes 1,074 tracks whose weighted NDF differs from ordinary NDF. Exact event/timestamp coverage, metadata counts and decoded DC TDC/FMT ADC payloads pass. In the zero-field comparison, every other compared bank value is unchanged, including track counts, fitted coordinates, covariance and chi-square. Runtime
COAT::configis excluded from the bank comparison.The modified current-development class also compiles with Java 21 against the farm 14.2.0 classpath.
git diff --checkpasses. A full current-development Maven build has not been run locally; the data regression above should not be mistaken for a full 14.2.4-SNAPSHOT reconstruction comparison.Separate full-bank comparison discrepancy
The field-on comparison differs in one event, 661032: the
idof one unassociated FTOF hit is 42 versus 41 inFTOF::hbhitsandFTOF::rawhits. All other hit fields and all other compared banks are identical. Both affected banks are written by FTOFHB before DCTB; the writer preserves the existing rawhits bank during the TB pass.One repeat of the same 500-event baseline reproduces the original baseline exactly, so the cause of the ID difference remains unconfirmed. The strict full-bank comparison is therefore not claimed to pass. The targeted straight-NDF correction and field-on DC/NDF checks do pass; the FTOF difference is retained as a separate finding.