Run 1B: Calo cluster-based time clustering#1733
Conversation
|
Hi @michaelmackenzie,
which require these tests: build. @Mu2e/write have access to CI actions on Run1B. ⌛ The following tests have been triggered for bd8c81a: build (Build queue - API unavailable) |
|
I'll review this pull request by first loading the PR details and its changes.Let me get the actual diff/files changed in this PR.Here's my review of PR #1733. This PR adds a new 🔴 Bugs / Correctness Issues1. Missing
|
| Severity | Issue | Location |
|---|---|---|
| 🔴 Bug | stopping_target_radius_ not initialized from config |
Constructor (L119-128) |
| 🔴 Bug | Spatial cone projection math is incorrect for off-axis seeds | findTimePeakInCluster (L237-239) |
| 🔴 Bug | Possible division by zero in finalizeTimeCluster |
finalizeTimeCluster (L308) |
| 🔴 Bug | std::sqrt of potentially negative value → NaN |
finalizeTimeCluster (L321) |
| 🟡 Cleanup | Unused hit_indices variable |
findTimePeakInCluster (L216) |
| 🟡 Cleanup | Unused event_ member pointer |
Class member |
| 🟡 Cleanup | Unnecessary forward declarations | L39-41 |
| 🟡 Design | Greedy hit assignment is order-dependent | findTimePeakInCluster / produce |
| 🟡 Physics | TOF uses exact c instead of βc |
findTimePeakInCluster (L228) |
| ⚪ Typo | "defiend" in comment | L117 |
The most critical issue is #1 — stopping_target_radius_ is never initialized, meaning the cone-based spatial selection will use garbage values and produce incorrect results.
|
☔ The build tests failed for bd8c81a.
N.B. These results were obtained from a build of this Pull Request at bd8c81a after being merged into the base branch at b55e0e5. For more information, please check the job page here. |
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for 5fbd4cb: build (Build queue - API unavailable) |
|
☀️ The build tests passed at 5fbd4cb.
N.B. These results were obtained from a build of this Pull Request at 5fbd4cb after being merged into the base branch at b55e0e5. For more information, please check the job page here. |
|
I'll review this pull request by first loading the PR details and its changes.Now let me get the actual file diffs to do a thorough independent review:Now I have the full diff. Let me analyze the actual code carefully. I note from the comments that you previously posted a review, and that the author has since pushed updates (the second build at Code Review: PR #1733 — Calo cluster-based time clusteringThis PR adds a new 🔴 Bugs / Correctness Issues1. Division by zero when
|
| Severity | Issue | Location |
|---|---|---|
| 🔴 Bug | Division by zero when seed_dir.z() ≈ 0 |
findTimePeakInCluster (L233) |
| 🔴 Bug | Cone accepts hits behind calo cluster (std::abs on dz) |
findTimePeakInCluster (L243) |
| 🔴 Bug | Same hits can be assigned to multiple time clusters (no dedup) | produce / findTimePeakInCluster |
| 🟡 Cleanup | tracker_ fetched but never used |
beginRun (L152) |
| 🟡 Cleanup | Unused using HepVector, includes (Helicity, iostream, set, DetectorSystem) |
Top of file |
| 🟡 Cleanup | Empty beginJob()/endJob() |
L148, L333 |
| 🟡 Style | printf instead of art message facility |
Throughout |
| 🟡 Robustness | No validation of cl.diskID() |
L211 |
| ⚪ Typo | Comment has leftover false{ |
L218 |
| Trigger test failing | Build #2940 |
The most critical issue is #1 — the potential division by zero in the trajectory parameterization when seed_dir.z() is small. Issue #2 (cone geometry accepting wrong-side hits) can silently add incorrect hits to time clusters and degrade reconstruction quality.
|
I addressed a few of the last minor suggestions. Most of the major ones are not real concerns (e.g. the dz to the target will never be very small, the calo cluster disk ID won't be > 1, we're not worried about tracker hits behind the calo, etc.). I'm allowing each calo cluster to form an independent time cluster, so hits can be duplicated for in-time and in-space calo clusters (as is done with TZClusterFinder). |
Run 1B: Calo cluster-based time clustering
Cherry-pick PR #1733: Calo cluster-based line time clustering
Cluster tracker hits using the stopping target location and a calorimeter cluster. This uses a simple cone from the cluster to select hits consistent in time/space with the calo cluster, using the configured trajectory direction.