Skip to content

Add per-raw-hit calibration fields, separate clean offset, and update TDC bin comment#11

Open
wooyeonkwon wants to merge 3 commits into
mainfrom
codex/investigate-offset-assignment-issue
Open

Add per-raw-hit calibration fields, separate clean offset, and update TDC bin comment#11
wooyeonkwon wants to merge 3 commits into
mainfrom
codex/investigate-offset-assignment-issue

Conversation

@wooyeonkwon

Copy link
Copy Markdown
Owner

Motivation

  • Preserve and expose per-raw-hit calibration so downstream code can access the channel Gaussian mean and a calibrated raw time for every hit.
  • Keep the clean-hit offset separate from the per-raw-hit stored offset and reflect the updated TDC binning policy in the header comment.

Description

  • Added offset and tdc_cali_raw vectors to EventBuffers and created corresponding output branches offset and tdc_cali_raw to store per-raw-hit Gaussian mean and calibrated raw time (computed as rec.tdc - offset).
  • Renamed the previously shared offset vector for clean hits to offset_clean to avoid reusing the same container for raw and clean values, and created the offset_clean branch.
  • Moved computation of the per-hit offset and tdc_cali_raw earlier so every raw hit gets a stored calibration value regardless of clean selection, and retained the clean-selection logic that fills ch, tdc, and clean_rawIndex using offset_clean.
  • Updated header comment to reflect the TDC raw binning change from 1000 to 20000 units and adjusted bounds checks for channel mapping against calibration.offsets.

Testing

  • Built the binary with g++ -O2 -std=c++17 main_mRPC.cc \\root-config --cflags --libs`` and the build completed successfully.
  • Ran the repacker on a representative test input and verified the output ROOT Events tree contains the new offset, tdc_cali_raw, and offset_clean branches and that execution completed without errors.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant