Draft (WIP): Cyber3DPFA — 3D calorimeter reconstruction for glass scintillator ECAL and HCAL
Summary
Introduce Cyber3DPFA, a new reconstruction package for the glass scintillator calorimeter. It replaces the bar-geometry CyberPFA with a 3D
small-cell approach. The pipeline converts EDM4hep hits into transient objects, runs a configurable chain of sub-algorithms, and persists
intermediate results via Monitors with ROOT output.
This is the first upstream MR for this package.
Package structure
Reconstruction/RecPFACyber3D/
├── CMakeLists.txt # Cyber3DPFALib + Cyber3DPFA Gaudi module
├── include/ & src/
│ ├── Cyber3DPFAlg.{h,cpp} # Top-level GaudiAlgorithm
│ ├── CyberDataCol.{h,cpp} # Event-local transient data container
│ ├── Algorithm/ # Sub-algorithms
│ │ ├── CaloHitClusteringAlg
│ │ ├── LocalMaxFindingAlg
│ │ └── HoughAxisFindingAlg
│ ├── Monitor/ # Read-only monitors (log + ROOT trees)
│ │ ├── MonitorCaloHitClustering
│ │ ├── MonitorLocalMaxFinding
│ │ └── MonitorHoughAxisFinding
│ ├── Objects/
│ │ ├── CaloHit # Lightweight 3D hit
│ │ ├── Calo3DCluster # 3D cluster with named local-max & axis maps
│ │ └── ShowerAxis # Reusable shower axis candidate
│ └── Tools/
│ ├── Algorithm # Abstract base (ReadSettings→Init→Run→Clear)
│ ├── AlgorithmManager # Factory registry + execution sequencing
│ ├── CaloHitsCreator # EDM4hep → Cyber3D hit converter
│ └── Settings # Typed key-value parameter store
└── script/3_reconstruction.py # Python Gaudi configuration
Data flow
EDM4hep CalorimeterHit → CaloHitsCreator → CaloHit/Calo3DCluster
↓
CaloHitClusteringAlg (3D neighbor merge)
↓
LocalMaxFindingAlg (same-layer 3D search)
↓
HoughAxisFindingAlg (sparse 4D Hough transform)
Key components
- CaloHitClusteringAlg — simplified 3D connected-hit clustering; processes ECAL/HCAL independently
- LocalMaxFindingAlg — clean 3D rewrite (does not inherit old bar/HalfCluster logic); per-layer nearest-neighbor comparison with separate
ECAL/HCAL distances - HoughAxisFindingAlg — sparse 4D Hough transform over line parameters (θ, φ, offset); finds up to MaxAxesPerCluster shower axis candidates per cluster; refined with energy-weighted PCA fit
- ShowerAxis — reusable transient object for axis candidates; shared across algorithms rather than re-declared per algorithm
- Monitors — each produces per-event log summaries + ROOT trees for offline analysis (cluster properties, local-max diagnostics, Hough axis
parameters)
Configuration
Sub-algorithm chain and parameters are fully configured from Python:
Cyber3DPFAlg.AlgList = ["CaloHitClusteringAlg", "LocalMaxFindingAlg", "HoughAxisFindingAlg"]
Cyber3DPFAlg.AlgParNames = [...] # per-algorithm parameter names
Cyber3DPFAlg.AlgParTypes = [...] # per-algorithm parameter types
Cyber3DPFAlg.AlgParValues = [...] # per-algorithm parameter values
Other changes
- HCAL barrel half-length: 3230 mm → 3330 mm
- geomsvc.fastinit = False during development for correct layer decoding
Validation
- 10-event 10 GeV gamma sample: end-to-end clean, no ERROR/FATAL
- Hit/energy conservation verified through clustering
- Local-max consistency counters all zero
- Three Monitor ROOT files with correct tree entries
- 17 files changed, ~1500 insertions, confined to RecPFACyber3D/ + 1 HCAL XML line