Skip to content

Conversation

@hbjamin
Copy link

@hbjamin hbjamin commented Dec 4, 2025

Description

This PR adds PTB information to CAF files for real SBND data, which is required for trigger efficiency studies using zero bias data. The implementation extracts all HLT (High Level Trigger) and LLT (Low Level Trigger) information from PTB fragments, decodes trigger words into individual bits, and stores them separately in the CAF structure. This PR requires merging SBNSoftware/sbnanaobj#180

  • Have you added a label? (bug/enhancement/physics etc.)
  • Have you assigned at least 1 reviewer?
  • Is this PR related to an open issue / project?
  • Does this PR affect CAF data format? If so, please assign a CAF maintainer as additional reviewer.
  • Does this PR require merging another PR in a different repository (such as sbnanobj/sbnobj etc.)? If so, please link it in the description.
  • Are you submitting this PR on behalf of someone else who made the code changes? If so, please mention them in the description.

@hbjamin hbjamin requested review from kjplows and lynnt20 December 4, 2025 18:16
@hbjamin hbjamin added the enhancement New feature or request label Dec 4, 2025
@hbjamin hbjamin requested review from fjnicolas and terezakroupa and removed request for lynnt20 December 4, 2025 18:46
@kjplows kjplows moved this to Open pull requests in SBN software development Dec 14, 2025
Copy link
Contributor

@fjnicolas fjnicolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @hbjamin! See comment in SBNSoftware/sbnanaobj#180 about uint64_t for the decoded HLT/LLT IDs

Copy link

@terezakroupa terezakroupa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ben, looks great!

Copy link
Member

@PetrilloAtWork PetrilloAtWork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have dropped a few technical suggestions.
But more importantly I would like the author to deeply think about the real need for a catch(...) in the code.

@hbjamin
Copy link
Author

hbjamin commented Jan 9, 2026

Thank you for the good suggestions. There was no reason for me to use a catch statement. It was leftover from my initial debugging of extractAllPTBInfo. I've also included several changes that result from making the timestamps a uint64_t that stores nanoseconds since UTC epoch instead of a double that stores seconds since UTC epoch to avoid rounding jumps occurring at 256 and 512 ns

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

Labels

enhancement New feature or request

Projects

Status: Open pull requests

Development

Successfully merging this pull request may close these issues.

6 participants