Skip to content

feat: muon buckets sector frame + bucket splitting#5229

Open
davidedicroce wants to merge 11 commits intoacts-project:mainfrom
davidedicroce:MuonBuckets
Open

feat: muon buckets sector frame + bucket splitting#5229
davidedicroce wants to merge 11 commits intoacts-project:mainfrom
davidedicroce:MuonBuckets

Conversation

@davidedicroce
Copy link
Copy Markdown
Contributor

@davidedicroce davidedicroce commented Mar 10, 2026

This MR introduces sector-based muon bucketization for the GeoModel mockup workflow and aligns the mockup geometry IDs so digitization can consistently resolve a common sector frame.

1. MuonSpacePointDigitizer:

  • Replaced chamber-frame helper with toSectorFrame() using a representative tracking volume.
  • Grouping changed from chamber-like IDs to sector IDs (volume-level key).
  • Added configurable bucket controls:
    • bucketMaxWindow (max longitudinal extent)
    • bucketNeighborWindow (max inter-point gap before split)
    • bucketOverlapWindow (tail overlap copied to next bucket)
    • minBucketSize (small buckets removed)
  • Implemented bucket split logic in sorted-z order per sector.
  • Added representative-volume resolution and caching per sector.

2. GeoModelMuonMockupBuilder:

  • Introduced sector parsing utilities from chamber names:
    • integer extraction by underscore tokenization
    • sector number extraction
    • eta-side sign extraction
  • Added a SectorKey = (station, sector, etaSide) grouping.
  • Assigned tracking volume IDs per sector key with explicit counter and capacity checks.
  • Assigned layer blocks per chamber/child volume to avoid collisions and preserve sector-consistent IDs.
  • Updated processStation() API to pass station index and shared nextVolumeId.

3. Examples/Scripts/Python/geomodel_G4.py:

  • Added useful CLI knobs: dumpGeoModelDb, nSectors, nEtaStations, disableEndcaps

4. Examples/Detectors/MuonSpectrometerMockupDetector/src/GeoMuonMockupExperiment.cpp:

  • Switched from std::any_cast to std::get and updated exception handling to std::bad_variant_access to match current key type usage.

5. Python/Examples/src/Digitization.cpp:

  • Extended Python digitization binding to pass new bucketization window parameters.
Screenshot 2026-03-10 at 17 06 26

@dimitra97 @junggjo9

@github-actions github-actions bot added the Component - Examples Affects the Examples module label Mar 10, 2026
@github-actions github-actions bot added this to the next milestone Mar 10, 2026
@davidedicroce davidedicroce marked this pull request as draft March 10, 2026 15:45
@davidedicroce davidedicroce changed the title Muon buckets: sector frame + bucket splitting feat: muon buckets sector frame + bucket splitting Mar 10, 2026
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

📊: Physics performance monitoring for 27ca050

Full contents

physmon summary

@davidedicroce davidedicroce marked this pull request as ready for review March 10, 2026 20:29
@andiwand andiwand requested a review from dimitra97 March 16, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component - Examples Affects the Examples module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants