Skip to content

Update LAPPD ID handling to support LAPPD INCOM IDs#381

Merged
marc1uk merged 4 commits intoANNIEsoft:Applicationfrom
anuj-guptta:test-pr
Apr 13, 2026
Merged

Update LAPPD ID handling to support LAPPD INCOM IDs#381
marc1uk merged 4 commits intoANNIEsoft:Applicationfrom
anuj-guptta:test-pr

Conversation

@anuj-guptta
Copy link
Copy Markdown
Contributor

Describe your changes

Checklist before submitting your PR

  • This PR implements a single change (one new/modified Tool, or a set of changes to implement one new/modified feature)
  • This PR alters the minimum number of files to affect this change
  • If this PR includes a new Tool, a README and minimal demonstration ToolChain is provided
  • If a new Tool/ToolChain requires model or configuration files, their paths are not hard-coded, and means of generating those files is described in the readme, with examples provided on /pnfs/annie/persistent
  • For every new usage, there is a reason the data must be on the heap
  • For every new there is a delete, unless I explicitly know why (e.g. ROOT or a BoostStore takes ownership)

Additional Material

Attach any validation or demonstration files here. You may also link to relavant docdb articles.

Motivation:
Newer runs use Manufacturer (Incom) IDs instead of ACC IDs, which breaks
compatibility with existing downstream tools expecting ACC IDs.

Changes:
- Added a structure in DataModel/PsecData.h to store LAPPD ID mapping
  information loaded from configfiles/LAPPDProcessedAna/LAPPDIDConfig.csv in UserTools/LAPPDLoadStore/LAPPDLoadStore.cpp.
- Implemented lookup logic to retrieve the appropriate mapping for a given
  run number and ACC ID, returning the corresponding Manufacturer ID and position.
- Added reverse mapping function to convert Manufacturer IDs back to ACC IDs
  for compatibility with downstream tools.
- Removed redundant structure previously defined in ANNIEEventTreeMaker.h including some fixes.

Heuristic:
- If LAPPD_ID > 20, it is treated as a Manufacturer (Incom) ID
  (based on current detector configuration assumptions).

Notes / Limitations:
- Current implementation relies on a heuristic (ID > 20) to distinguish ID types.
- This assumption is based on current detector configuration and observed ID ranges.
- Planned improvement: replace heuristic with run-dependent or database-driven mapping.
- Mapping file (LAPPDIDConfig.csv) must be updated as detector configuration evolves.

Validation:
- Basic functionality verified (toolchain runs end-to-end).
- Detailed validation of Event Building + data processing before-and-after is pending.
- Update ID mapping logic for consistent handling across the toolchain.
- Store Pulse IDs and Hit IDs as INCOM IDs.
@S81D S81D self-assigned this Apr 6, 2026
Comment thread UserTools/ANNIEEventTreeMaker/ANNIEEventTreeMaker.cpp
Comment thread UserTools/LAPPDLoadStore/LAPPDLoadStore.cpp
@S81D
Copy link
Copy Markdown
Collaborator

S81D commented Apr 6, 2026

This is great to see you've added the LAPPD ID and position mapping, this will be super helpful!

I also appreciate the detailed description on the individual commits, the validation testing, and the note on limitations / future work. For future PRs and ease of readability I would recommend just adding those comments to the main PR and also filling out the checklist.

No obvious problems stand out to me. You note that the "detailed validation of Event Building + data processing before-and-after is pending" - once that is verified I think its good to go and I will give my stamp of approval.

@anuj-guptta
Copy link
Copy Markdown
Contributor Author

Thanks, Steven, for reviewing this. I don’t want to take credit for the original work, most of it was done by Yue last year but wasn’t merged into the latest ToolAnalysis release. I’ve applied a minimal version of his changes along with few modifications to get a working EventBuildingV2 and associated toolchains.

For validation of all data processing steps, I’ve tested three part-files, and everything works as expected. The LAPPD data before and after these changes remains unchanged.

Let me know if this is enough for the approval.

@anuj-guptta anuj-guptta closed this Apr 6, 2026
@anuj-guptta anuj-guptta reopened this Apr 6, 2026
@S81D
Copy link
Copy Markdown
Collaborator

S81D commented Apr 6, 2026

Great! I will mark it as ready for level 0 review and merging.

Comment thread UserTools/ANNIEEventTreeMaker/ANNIEEventTreeMaker.cpp Outdated
@marc1uk
Copy link
Copy Markdown
Collaborator

marc1uk commented Apr 13, 2026

Looks good, thanks Anuj.

@marc1uk marc1uk merged commit 49eca14 into ANNIEsoft:Application Apr 13, 2026
@anuj-guptta anuj-guptta deleted the test-pr branch April 13, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants