Skip to content

Add PTB trigger fields to SRTrigger for SBND#180

Open
hbjamin wants to merge 4 commits intodevelopfrom
feature/hbjamin_PTBTriggerInfoToCAFs_v10_06_00_02
Open

Add PTB trigger fields to SRTrigger for SBND#180
hbjamin wants to merge 4 commits intodevelopfrom
feature/hbjamin_PTBTriggerInfoToCAFs_v10_06_00_02

Conversation

@hbjamin
Copy link
Copy Markdown

@hbjamin hbjamin commented Dec 4, 2025

Description

This PR adds PTB trigger information fields to the SRTrigger class in the StandardRecord structure, which is required for SBND trigger efficiency studies using zero bias data. HLT and LLT decoded bits and timestamps are stored in separate vectors for easier analysis.

  • Have you run git fetch and pulled the latest changes from the branch you're basing your PR against?
  • If you're adding new classes, have you added them to classes_def.xml in the relevant directory?
  • Have you added a checksum in classes_def.xml to any and all new classes you're implementing, and rebuilt?
  • If you're updating classes, have you incremented the ClassVersion by one compared to develop in classes_def.xml?

@fjnicolas
Copy link
Copy Markdown
Contributor

fjnicolas commented Jan 5, 2026

Thanks for the PR @hbjamin!

My only comment is whether we can reduce the CAF footprint by declaring ptb_hlt_bit and ptb_llt_bit as unsigned short int instead of uint64_t. We are saving "decoded" HLT/LLLs IDs to the CAFs, and we only have a handful of them (<34).

Copy link
Copy Markdown
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.

Please confirm that double precision is indeed not losing needed precision in the timestamps.

I have also left a suggestion on the documentation format.

@hbjamin
Copy link
Copy Markdown
Author

hbjamin commented Jan 9, 2026

Thank you for the very important catch. I've update the timestamps to be uint64_t with units of UTC ns since epoch, and updated all sbncode accordingly.

@kjplows kjplows moved this from Open pull requests to Partially reviewed in SBN software development Jan 15, 2026
@kjplows
Copy link
Copy Markdown
Contributor

kjplows commented Jan 15, 2026

Hi @PetrilloAtWork , it looks like @hbjamin has addressed changes -- do they look good? Thanks!

@fjnicolas
Copy link
Copy Markdown
Contributor

Hi @kjplows @PetrilloAtWork! Any updates on this? When do you think it can make it to a release? Thanks!

@kjplows kjplows moved this from Todo to In Progress in PR archaeology Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress
Status: Partially reviewed

Development

Successfully merging this pull request may close these issues.

5 participants