Skip to content

Structural Update to EventBuilderV2 for LAPPDs - #393

Open
anuj-guptta wants to merge 5 commits into
ANNIEsoft:Applicationfrom
anuj-guptta:dual-ACDC_EBV2
Open

anuj-guptta wants to merge 5 commits into
ANNIEsoft:Applicationfrom
anuj-guptta:dual-ACDC_EBV2

Conversation

@anuj-guptta

Copy link
Copy Markdown
Contributor

Describe your changes

Limitations of existing framework

  • Metadata read from both ACDCs in LAPPDLoadStore.cpp, but beamgate and timestamp were constructed out of ACDC 0 metadata only.
  • This resulted in incorrect beamgate alignment in the offsetFit_MultipleLAPPD.cpp, such that only the ACDC 0 fit was correctly aligned.
  • Consequently, only ACDC 0 offsets and corrections were propagated to downstream tools for event matching.
  • The existing framework therefore did not recover as many LAPPD events as expected, despite moving towards a PPS pre-scale of 5.

Updates to the EventBuilderV2 framework

  • Updated the event-building chain to support the dual-ACDC architecture.
  • Restructured ACDC-dependent variables so that quantities associated with the two ACDCs are explicitly separated into ACDC 0 and ACDC 1 variables.
  • This version is now dual-ACDC EBV2.
  • Updated the tools to accommodate both ACDCs throughout the event-building chain:
    • LAPPDLoadStore, LAPPDTreeMaker, EBLAPPD, EBSaver, ProcessedLAPPDFilter and ANNIEEventTreeMaker.
    • Other tools include PrintDQ and PhaseIITreeMaker.
    • Updated the matching logic in EBLAPPD to use an OR condition between the corrected timestamps from the two ACDCs, allowing LAPPD events associated with either ACDC to be recovered.
  • Updated LAPPDLoadStore to support legacy single-board data files that do not contain explicit ACDC board identifiers.
    • Implemented fallback logic to identify and process legacy single-board data.
    • Legacy data are safely routed to downstream tools.
    • ACDC 1 variables are set to zero by default when no ACDC 1 information is available.
  • Added LAPPD-related metric to PrintDQ tool.
    • Implemented OR logic for the PPS-missing check when both ACDCs are present.
    • Backward compatibility for legacy single-board data was dropped, since these data quality checks are primarily intended for newly acquired data.

Additional updates

  • Cleaned up verbose logging and aligned the verbosity variable name with the tool name in LAPPDLoadStoreConfig.
  • Cleaned up ANNIEEventTreeMakerConfig.

Validation

  • The updated framework was validated using both beam and laser data.
  • Validation was performed on both GPVMs and grid submissions.
  • LAPPDTreeMaker and PhaseIITreeMaker tools have limited testing since they are not directly related to data processing stages.

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.

Limitations of existing framework
- Metadata read from both ACDCs in 'LAPPDLoadStore.cpp', but beamgate and timestamps are constructed out of ACDC 0 metadata only.
- This led to wrong beamgate alignment in the 'offsetFit_MultipleLAPPD.cpp', causing only ACDC 0 fit to be right.
- Later only ACDC 0 offsets and corrections were propagated to downstream tools for matching during EventBuilding.
- Not able to recover as much LAPPD events as expected despite moving towards a PPS pre-scale of 5.

Updations to code
- The structural changes are made to code such that all ACDC related variables are split into '0/1'.
- This version is now dual-ACDC EBV2.
- The tools are modified to accomodate both ACDCs for all chains of the event building stages.
  - Updated tools are 'LAPPDLoadStore', 'LAPPDTreeMaker', 'EBLAPPD', 'EBSaver', 'ProcessedLAPPDFilter' and 'ANNIEEventTreeMaker'.
- Updated the matching logic in 'EBLAPPD' to use an OR condition between corrected timestamps from both ACDCs to maximize LAPPD event recovery.
- The changes are validated over both beam data and laser data, in gpvms and grid submissions as well.
- Other fixes include memory leak and code readability.
- Cleaned up verbose logging and aligned verbose name with tool name in 'LAPPDLoadStoreConfig'.
- Cleaned up 'ANNIEEventTreeMakerConfig'.

Issues
- With these changes, the existing processed data will not be able to run through 'BeamClusterAnalysis'.

Pending
- Update downstream analysis and support tools (outside of EBV2) to fully accommodate the new dual-ACDC architecture:
  - 'PrintDQ', 'LAPPDTreeMaker' (only relevant part was updated) and 'PhaseIITreeMaker'.
- Implemented fallback logic to support older data files that lack explicit ACDC board identifiers.
- Safely routes legacy single-board data to downstream tools.
- ACDC 1 variables will be set to zero as default in such cases.
- Refactored tree making tools to fully support the new dual-ACDC data configurations.
- Note: These are tools used outside the primary data processing chain, so they currently have limited test coverage.
- Implemented OR-logic for the PPS missing check in dual-board configurations.
- Dropped backward compatibility for legacy single-board data, as data quality checks are primarily run on new data acquisitions.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant