From 938d3d52819e3bae2e06d9b3ae63e81a5a18ba22 Mon Sep 17 00:00:00 2001 From: Duncan Wilmot Date: Thu, 9 Jul 2026 09:44:42 -0500 Subject: [PATCH 1/5] Test version of v16 geometry with new trackers --- .../data/ldmx-det-v16-8gev/constants.gdml | 503 + .../data/ldmx-det-v16-8gev/detector.gdml | 155 + Detectors/data/ldmx-det-v16-8gev/ecal.gdml | 962 ++ .../ecal_motherboard5_assembly.gdml | 288 + .../ecal_motherboard6_assembly.gdml | 374 + .../ldmx-det-v16-8gev/ecal_support_box.gdml | 1493 +++ Detectors/data/ldmx-det-v16-8gev/hcal.gdml | 352 + Detectors/data/ldmx-det-v16-8gev/magnet.gdml | 10328 ++++++++++++++++ .../ldmx-det-v16-8gev/makeTSassemblyfiles.py | 239 + Detectors/data/ldmx-det-v16-8gev/recoil.gdml | 162 + .../ldmx-det-v16-8gev/scoring_planes.gdml | 354 + Detectors/data/ldmx-det-v16-8gev/tagger.gdml | 102 + Detectors/data/ldmx-det-v16-8gev/target.gdml | 62 + .../data/ldmx-det-v16-8gev/trig_scint.gdml | 70 + .../ldmx-det-v16-8gev/tspad1_assembly.gdml | 170 + .../ldmx-det-v16-8gev/tspad2_assembly.gdml | 170 + .../ldmx-det-v16-8gev/tspad3_assembly.gdml | 170 + 17 files changed, 15954 insertions(+) create mode 100644 Detectors/data/ldmx-det-v16-8gev/constants.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/detector.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/ecal.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/hcal.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/magnet.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py create mode 100644 Detectors/data/ldmx-det-v16-8gev/recoil.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/tagger.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/target.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml diff --git a/Detectors/data/ldmx-det-v16-8gev/constants.gdml b/Detectors/data/ldmx-det-v16-8gev/constants.gdml new file mode 100644 index 000000000..8423858a4 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/constants.gdml @@ -0,0 +1,503 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/detector.gdml b/Detectors/data/ldmx-det-v16-8gev/detector.gdml new file mode 100644 index 000000000..7b2924eb4 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/detector.gdml @@ -0,0 +1,155 @@ + + + + +]> + + + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + &materials; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + &visattributes; + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal.gdml new file mode 100644 index 000000000..b4e05a421 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/ecal.gdml @@ -0,0 +1,962 @@ + + +]> + + + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml new file mode 100644 index 000000000..98d23328c --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml new file mode 100644 index 000000000..82a51906a --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml new file mode 100644 index 000000000..15a4dc7b8 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml @@ -0,0 +1,1493 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/hcal.gdml b/Detectors/data/ldmx-det-v16-8gev/hcal.gdml new file mode 100644 index 000000000..7f83df27c --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/hcal.gdml @@ -0,0 +1,352 @@ + + +]> + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/magnet.gdml b/Detectors/data/ldmx-det-v16-8gev/magnet.gdml new file mode 100644 index 000000000..bab3ea5a4 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/magnet.gdml @@ -0,0 +1,10328 @@ + + +]> + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py b/Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py new file mode 100644 index 000000000..a0b811130 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py @@ -0,0 +1,239 @@ +import os +import sys + + +abspath = os.path.abspath(__file__) +dname = os.path.dirname(abspath) +os.chdir(dname) + +""" + +Author: CJ Barton / Lund University group +Added to ldmx-sw Feb 2026 +Github PR 1888 +Github issues 1760 & 1761 + +Script which automatically generates GDML files for the TS pads and their +associated instruments. Currently, 'associated instruments' are the SiPMs and +the light pipes. + +This script exists because of an incompatibility between the ldmx-sw design +and Geant4/GDML. + +In ldmx-sw, although the geometries are identical for the TS pads, the 3 TS +pads in the baseline are considered distinct entities (TSPad1, TSPad2, TSPad3). +These entities have their own hit collections, processors etc. and are +hard-coded with distinct names in sensitive_detectors.py. +The geometry implementation is done in 3 loops across 2 files (trig_scint.gdml +for TSPad1/2 and target.gdml for TSPad3). This means that any time a change +needs to be made to the dimensions or components of the TSPads, it must be +changed 3 times. + +Originally, this was envisioned as solvable by the object in GDML. +However, assemblies are intended to only define physical volume configurations, +and don't account for things like material etc. naturally. In addition, they +aren't intended to have their own envelopes. For these reasons, a 'module' +approach is taken instead, much like in detector.gdml. There's no problem with +having nested modules, so long as the nested module is contained entirely +within the parent. + +This script is a compromise, to collect all of the parameters relevant to the +TSPads in one location while maintaining the distinct definitions for the +logical volumes in each pad. Three submodules will be generated, which are +then imported into their respective modules. + +It should be noted that this script is only concerned with differentiating +TSPads+instruments. External factors, like where to place them in the world or +the definitions of the materials, should still be defined elsewhere, for +example in the constants.gdml or materials.gdml files. +""" + +# Material variable names (material definitions should be found in materials.gdml) +scintillator_mat = "Polyvinyltoluene" +lightpipe_mat = "AcrylicPMMA" +sipm_mat = "Silicon" + +# To streamline TargetDarkBremFilter.cxx, TSPad3 and its components are +# considered part of the 'target' G4Region, whereas TSPad1/2 are in the +#'trig_scint' region. +region_name = ["trig_scint", "trig_scint", "target"] + +for i in range(3): + # Variables that must change between iterations + filename = f"tspad{i + 1}_assembly.gdml" + scintillator_lvname = f"trigger_pad{i + 1}_bar_volume" + lightpipe_lvname = f"tspad{i + 1}_lightpipe_volume" + sipm_lvname = f"tspad{i + 1}_sipm_volume" + + with open(filename, "w") as f: + f.write(f''' + +]> + + + + + + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +''') diff --git a/Detectors/data/ldmx-det-v16-8gev/recoil.gdml b/Detectors/data/ldmx-det-v16-8gev/recoil.gdml new file mode 100644 index 000000000..a254ed67f --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/recoil.gdml @@ -0,0 +1,162 @@ + + +]> + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml b/Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml new file mode 100644 index 000000000..160ff92cf --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml @@ -0,0 +1,354 @@ + + +]> + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/tagger.gdml b/Detectors/data/ldmx-det-v16-8gev/tagger.gdml new file mode 100644 index 000000000..7c116d374 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/tagger.gdml @@ -0,0 +1,102 @@ + + + +]> + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/target.gdml b/Detectors/data/ldmx-det-v16-8gev/target.gdml new file mode 100644 index 000000000..01157d7e9 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/target.gdml @@ -0,0 +1,62 @@ + + +]> + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml b/Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml new file mode 100644 index 000000000..fb996f726 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml @@ -0,0 +1,70 @@ + + +]> + + + + + + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml new file mode 100644 index 000000000..ef04b8b1d --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml @@ -0,0 +1,170 @@ + + +]> + + + + + + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml new file mode 100644 index 000000000..688378820 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml @@ -0,0 +1,170 @@ + + +]> + + + + + + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml new file mode 100644 index 000000000..583ee5a19 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml @@ -0,0 +1,170 @@ + + +]> + + + + + + + + + + &constants; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 0b3c3641f2a9dfd89016cd8c3fe2fadfe94b5e0c Mon Sep 17 00:00:00 2001 From: Duncan Wilmot Date: Wed, 15 Jul 2026 16:35:05 -0500 Subject: [PATCH 2/5] add v16 to Ecal/Hcal geom & Ecal digi --- DetDescr/python/ecal_geometry.py | 1 + DetDescr/python/hcal_geometry.py | 1 + Ecal/python/digi.py | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/DetDescr/python/ecal_geometry.py b/DetDescr/python/ecal_geometry.py index 8f55aa813..ff55026d6 100644 --- a/DetDescr/python/ecal_geometry.py +++ b/DetDescr/python/ecal_geometry.py @@ -243,6 +243,7 @@ def v15(): "ldmx-ti-v15-8gev.*", "ldmx-al-v15-8gev", "ldmx-al-v15-8gev.*", + "ldmx-det-v16-8gev" ], gap=1.5, si_thickness=0.4, diff --git a/DetDescr/python/hcal_geometry.py b/DetDescr/python/hcal_geometry.py index a9ad2fbb2..5d2e57857 100644 --- a/DetDescr/python/hcal_geometry.py +++ b/DetDescr/python/hcal_geometry.py @@ -503,6 +503,7 @@ def make_v14(): "ldmx-ti-v15-8gev.*", "ldmx-al-v15-8gev", "ldmx-al-v15-8gev.*", + "ldmx-det-v16-8gev" ] return HcalReadoutGeometry( num_sections=num_sections, diff --git a/Ecal/python/digi.py b/Ecal/python/digi.py index 2838e9cb1..cbf9bbe29 100644 --- a/Ecal/python/digi.py +++ b/Ecal/python/digi.py @@ -427,6 +427,24 @@ def v15(**kwargs): **kwargs, ) + @staticmethod + def v16(**kwargs): + """Generated for the v16 geometry (Ecal is same as v15) + + The secondOrderEnergyCorrection is deteremined by generating 1M single + 4GeV or 8GeV electron events shot directly into the front of the ECal from + immediately upstream. The mean of the resulting total recon energy is found + by fitting a two-sided normal distribution (one mean, a low and high deviation) + to the histogram. + """ + return EcalRecProducer( + second_order_energy_correction=latest_second_order_energy_correction, + # these layer weights were the 'dE' column of the table output by + # Detectors/util/ecal_layer_stack.py + layer_weights=latest_layer_weights, + **kwargs, + ) + @staticmethod def reduced_v2(**kwargs): """Generated for the reduced v2 geometry From 64524f53ab532cb9772c59f1e8390b366385b9d2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Aug 2026 16:52:56 +0000 Subject: [PATCH 3/5] apply ruff formatting and linting --- .github/actions/validate/compare.py | 97 ++++++----- .../validation_samples/eat_signal/config.py | 6 +- .../validation_samples/it_pileup/gen_main.py | 14 +- .../exampleConfigs/target_db_with_tracking.py | 102 +++++++---- Biasing/python/target.py | 2 +- Biasing/python/util.py | 1 - ComparePlots/_differ.py | 87 +++++----- ComparePlots/_plotter.py | 3 +- ComparePlots/dark_brem.py | 55 +++--- ComparePlots/ecal.py | 164 +++++++++--------- ComparePlots/hcal.py | 63 +++---- ComparePlots/performance.py | 15 +- ComparePlots/simparticles.py | 101 ++++++----- ComparePlots/trigscint.py | 84 ++++----- DQM/python/dqm.py | 52 ++++-- DetDescr/python/ecal_geometry.py | 2 +- DetDescr/python/hcal_geometry.py | 2 +- Ecal/python/vetos.py | 12 +- Framework/exampleConfig/dumpRunHeaderConf.py | 9 +- Framework/test/config_python_test_config.py | 26 ++- .../test/standalone/standalone_config.py | 6 +- Hcal/test/hcal_digi_pipeline_test_config.py | 20 +-- Packing/python/rawio.py | 10 +- Recon/python/dictionary.py | 2 +- Recon/python/fiducial_flag.py | 1 - SimCore/python/fcp_physics.py | 5 +- SimCore/python/photonuclear_models.py | 4 +- SimCore/test/config_fcp.py | 2 +- Tools/python/hgcroc_emulator.py | 7 +- Tracking/exampleConfigs/reco.py | 2 +- Tracking/python/dqm.py | 10 +- Tracking/python/full_tracking_sequence.py | 19 +- Tracking/python/rawdecoder.py | 12 +- Tracking/python/tracking.py | 14 +- TrigScint/exampleConfigs/runTSvert.py | 57 +++--- TrigScint/python/trig_scint.py | 5 +- TrigScint/util/writeChannelMap.py | 73 ++++---- TrigScint/util/writeToyChannelMap.py | 48 ++--- Trigger/Algo/python/dump_file_writer.py | 1 - Trigger/Algo/python/trigger_energy_sums.py | 1 - docs/sphinx.conf/conf.py | 24 +-- 41 files changed, 655 insertions(+), 565 deletions(-) diff --git a/.github/actions/validate/compare.py b/.github/actions/validate/compare.py index 9f27a6557..30d2ba0b5 100644 --- a/.github/actions/validate/compare.py +++ b/.github/actions/validate/compare.py @@ -12,7 +12,8 @@ ROOT.gROOT.SetBatch(1) ROOT.gStyle.SetOptStat(0) -def flatten(list) : + +def flatten(list): """Get list of all (non-directory) objects in ROOT file with the full path to their location in the file. @@ -38,24 +39,25 @@ def flatten(list) : rf = ROOT.TFile('my_file.root') full_list = flatten(rf.GetListOfKeys()) """ - flat_l = [ ] - for k in list : - if k.IsFolder() : + flat_l = [] + for k in list: + if k.IsFolder(): # recurse into subdirectory d = k.GetFile().GetDirectory(k.GetName()) flat_l.extend(flatten(d.GetListOfKeys())) - else : + else: # get full path of object relative to file fp = k.GetName() m = k.GetMotherDir() - while m != k.GetFile() : - fp = m.GetName() + '/' + fp + while m != k.GetFile(): + fp = m.GetName() + "/" + fp m = m.GetMotherDir() flat_l.append(fp) return flat_l -class HistogramFile : + +class HistogramFile: """A root file with histograms that we want to be styled in same way This class is not very complicated and is simply here to do two things. @@ -75,13 +77,13 @@ class HistogramFile : Should these histograms be filled? (Yes == True) """ - def __init__(self, f, name, color, fill) : + def __init__(self, f, name, color, fill): self.__file = ROOT.TFile.Open(f) self.__name = name self.__color = color self.__fill = fill - def list_histograms(self) : + def list_histograms(self): """List all of the histograms in this file. We use flatten here, so technically this lists all @@ -91,7 +93,7 @@ def list_histograms(self) : return flatten(self.__file.GetListOfKeys()) - def get(self, hist_key) : + def get(self, hist_key): """Get a histogram from this file After retrieving the histogram @@ -104,23 +106,26 @@ def get(self, hist_key) : """ h = self.__file.Get(hist_key) - if 'TH' not in h.__class__.__name__ : + if "TH" not in h.__class__.__name__: raise AttributeError( - f'{hist_key} does not exist in {self.__file.GetName()}') - h.SetTitle(f'{self.__name}') + f"{hist_key} does not exist in {self.__file.GetName()}" + ) + h.SetTitle(f"{self.__name}") h.SetLineColor(self.__color) h.SetLineWidth(2) h.SetMarkerColor(self.__color) - if self.__fill : + if self.__fill: h.SetFillColor(self.__color) return h -def print_error(msg) : + +def print_error(msg): """Use GitHub workflow command to print errors so that they don't get lost in the logs""" - print('::error::',msg) + print("::error::", msg) -def compare(gold_f, gold_label, test_f, test_label) : + +def compare(gold_f, gold_label, test_f, test_label): """Compare two histogram files This is the main function of this script. @@ -156,61 +161,61 @@ def compare(gold_f, gold_label, test_f, test_label) : The label used in the histogram legends for the test histograms """ - gold = HistogramFile(gold_f,gold_label,ROOT.kRed ,False ) - test = HistogramFile(test_f,test_label,ROOT.kBlue,False) + gold = HistogramFile(gold_f, gold_label, ROOT.kRed, False) + test = HistogramFile(test_f, test_label, ROOT.kBlue, False) c = ROOT.TCanvas() - os.makedirs('plots/pass',exist_ok=True) - os.makedirs('plots/fail',exist_ok=True) + os.makedirs("plots/pass", exist_ok=True) + os.makedirs("plots/fail", exist_ok=True) - for key in gold.list_histograms() : - try : + for key in gold.list_histograms(): + try: gold_h = gold.get(key) test_h = test.get(key) except AttributeError as e: print_error(e) continue - empty_gold = (gold_h.GetEntries() == 0) - empty_test = (test_h.GetEntries() == 0) + empty_gold = gold_h.GetEntries() == 0 + empty_test = test_h.GetEntries() == 0 - sub_dir = 'pass' - if empty_gold and empty_test : + sub_dir = "pass" + if empty_gold and empty_test: # both empty, call this a pass - sub_dir = 'pass' - elif not empty_gold and not empty_test : + sub_dir = "pass" + elif not empty_gold and not empty_test: # both non-empty, check KS test - sub_dir = ('fail' - if gold_h.KolmogorovTest(test_h, 'UO') < 0.99 - else 'pass') - else : + sub_dir = "fail" if gold_h.KolmogorovTest(test_h, "UO") < 0.99 else "pass" + else: # one empty and other non-empty - sub_dir = 'fail' + sub_dir = "fail" - if (gold_h.ClassName() == "TH2F") : + if gold_h.ClassName() == "TH2F": # Make the yield-axis log scale c.SetLogz(1) # Plot the 2D plots as a scatter plot - gold_h.Draw('SCAT') - test_h.Draw('SCAT SAME') - else : + gold_h.Draw("SCAT") + test_h.Draw("SCAT SAME") + else: # Make the yield-axis log scale c.SetLogy(1) # Normalize the 1D plots to unit area - if gold_h.Integral() > 0 : - gold_h.Scale(1/gold_h.Integral()) - if test_h.Integral() > 0 : - test_h.Scale(1/test_h.Integral()) + if gold_h.Integral() > 0: + gold_h.Scale(1 / gold_h.Integral()) + if test_h.Integral() > 0: + test_h.Scale(1 / test_h.Integral()) # Plot the 1D plots with their uncertainty gold_h.Draw("E") - test_h.Draw('ESAME') + test_h.Draw("ESAME") legend = c.BuildLegend() legend.SetFillStyle(0) legend.SetBorderSize(0) - c.SaveAs(f'plots/{sub_dir}/{key.replace("/","_").replace(":","_")}.pdf') + c.SaveAs(f"plots/{sub_dir}/{key.replace('/', '_').replace(':', '_')}.pdf") + -if __name__ == '__main__' : +if __name__ == "__main__": import sys + compare(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]) diff --git a/.github/validation_samples/eat_signal/config.py b/.github/validation_samples/eat_signal/config.py index e89aee984..eccbb5d1a 100644 --- a/.github/validation_samples/eat_signal/config.py +++ b/.github/validation_samples/eat_signal/config.py @@ -41,9 +41,7 @@ import LDMX.Tracking.geo -ecal_veto = ecal_vetos.EcalVetoProcessor( - recoil_from_tracking = False -) +ecal_veto = ecal_vetos.EcalVetoProcessor(recoil_from_tracking=False) ecal_tracking = ecal_vetos.EcalTrackFinderProcessor() import LDMX.Hcal.digi as hcal_digi @@ -82,7 +80,7 @@ trigger.thresholds = [3160.0] p.logger.term_level = 2 -p.logger.custom(dqm.DarkBremInteraction(), level = 0) +p.logger.custom(dqm.DarkBremInteraction(), level=0) p.sequence.extend( [ diff --git a/.github/validation_samples/it_pileup/gen_main.py b/.github/validation_samples/it_pileup/gen_main.py index dcf78c0ca..201f76432 100644 --- a/.github/validation_samples/it_pileup/gen_main.py +++ b/.github/validation_samples/it_pileup/gen_main.py @@ -1,14 +1,14 @@ from LDMX.Framework import ldmxcfg -p = ldmxcfg.Process('ecal_pn') +p = ldmxcfg.Process("ecal_pn") import os p.max_tries_per_event = 1000 -p.run = int(os.environ['LDMX_RUN_NUMBER']) -p.max_events = int(os.environ['LDMX_NUM_EVENTS']) // 2 +p.run = int(os.environ["LDMX_RUN_NUMBER"]) +p.max_events = int(os.environ["LDMX_NUM_EVENTS"]) // 2 p.logger.term_level = 4 @@ -16,13 +16,13 @@ from LDMX.SimCore import generators as gen -my_sim = ecal.photo_nuclear('ldmx-det-v15-8gev',gen.single_8gev_e_upstream_tagger()) -my_sim.description = 'ECal PN Test Simulation' +my_sim = ecal.photo_nuclear("ldmx-det-v15-8gev", gen.single_8gev_e_upstream_tagger()) +my_sim.description = "ECal PN Test Simulation" -p.sequence = [ my_sim ] +p.sequence = [my_sim] import LDMX.Ecal.ecal_geometry import LDMX.Hcal.hcal_geometry -p.output_files = ['ecal_pn.root'] +p.output_files = ["ecal_pn.root"] diff --git a/Biasing/exampleConfigs/target_db_with_tracking.py b/Biasing/exampleConfigs/target_db_with_tracking.py index 8eb48a853..4343631b6 100644 --- a/Biasing/exampleConfigs/target_db_with_tracking.py +++ b/Biasing/exampleConfigs/target_db_with_tracking.py @@ -2,44 +2,70 @@ import os parser = argparse.ArgumentParser( - description = "An ldmx-sw config file for simulating dark brem ineractions \ + description="An ldmx-sw config file for simulating dark brem ineractions \ in the LDMX tungsten target. \ Includes full tracking for both tagger and recoil trackers. \ Includes optional correction to forward-only energy scaling \ to approximate expected lepton backscattering.", - epilog = "This config will work with default db-lib-gen output libraries \ + epilog="This config will work with default db-lib-gen output libraries \ if no arguments are given and no changes are made. \ If db-lib-gen parameters are customized, \ the user should change the 'db_lib' variable in this script accordingly. \ Supplying arguments is useful to correct forward only scaling \ - and/or produce many root files concurrently." - ) -parser.add_argument('--correct-forward', action='store_true', default=False, - help='apply backscatter estimation to forward only scaling') -parser.add_argument('-r', '--run', type=int, default=3000, - help='run number of the input db library (Default: 3000)') -parser.add_argument('-n', '--nevents', type=int, default=1000, - help='maximum number of events to simulate (Default: 1000)') -parser.add_argument('-m', '--apmass', type=float, default=100., - help='mass of A prime in MeV (Default: 100)') -parser.add_argument('-l', '--aprime-lhe', type=int, default=1023, - help='A prime lhe id (Default: 1023)') -parser.add_argument('-d', '--data-dir', type=str, default='', - help='directory with input db libraries') -parser.add_argument('-o', '--out-dir', type=str, default='', - help='directory to save output root file(s)') + and/or produce many root files concurrently.", +) +parser.add_argument( + "--correct-forward", + action="store_true", + default=False, + help="apply backscatter estimation to forward only scaling", +) +parser.add_argument( + "-r", + "--run", + type=int, + default=3000, + help="run number of the input db library (Default: 3000)", +) +parser.add_argument( + "-n", + "--nevents", + type=int, + default=1000, + help="maximum number of events to simulate (Default: 1000)", +) +parser.add_argument( + "-m", + "--apmass", + type=float, + default=100.0, + help="mass of A prime in MeV (Default: 100)", +) +parser.add_argument( + "-l", "--aprime-lhe", type=int, default=1023, help="A prime lhe id (Default: 1023)" +) +parser.add_argument( + "-d", "--data-dir", type=str, default="", help="directory with input db libraries" +) +parser.add_argument( + "-o", + "--out-dir", + type=str, + default="", + help="directory to save output root file(s)", +) args = parser.parse_args() from LDMX.Framework import ldmxcfg -p = ldmxcfg.Process('tdb') +p = ldmxcfg.Process("tdb") p.run = args.run import LDMX.Ecal.ecal_geometry import LDMX.Hcal.hcal_geometry from LDMX.Biasing import target from LDMX.SimCore import generators -detector = 'ldmx-det-v15-8gev' # name of geometry to use +detector = "ldmx-det-v15-8gev" # name of geometry to use # Probably easiest to change 'db_lib' by hand instead of passing numerous arguments. # This specifies the input db library. @@ -47,25 +73,24 @@ # Use the following syntax and insert whichever parameters you supplied to db-lib-gen # {lepton}_{target}_MaxE_{max_energy}_MinE_{min_energy}_RelEStep_{rel_step} # _UndecayedAP_mA_{apmass}_run_{run} -apmass_gev = args.apmass / 1000. -db_lib = f'electron_tungsten_MaxE_8.0_MinE_4.0_RelEStep_0.1 \ - _UndecayedAP_mA_{apmass_gev}_run_{args.run}' +apmass_gev = args.apmass / 1000.0 +db_lib = f"electron_tungsten_MaxE_8.0_MinE_4.0_RelEStep_0.1 \ + _UndecayedAP_mA_{apmass_gev}_run_{args.run}" target_ap_sim = target.dark_brem( - args.apmass, #MeV - mass of A' (default 100) - db_lib if not args.data_dir else os.path.join(args.data_dir, db_lib), - detector, - generators.single_8gev_e_upstream_tagger(), # electron gun - correct_forward = args.correct_forward, # apply correction or not - aprime_lhe_id = args.aprime_lhe # may need to change to e.g., 622 - ) + args.apmass, # MeV - mass of A' (default 100) + db_lib if not args.data_dir else os.path.join(args.data_dir, db_lib), + detector, + generators.single_8gev_e_upstream_tagger(), # electron gun + correct_forward=args.correct_forward, # apply correction or not + aprime_lhe_id=args.aprime_lhe, # may need to change to e.g., 622 +) # Add target dark brem to the process sequence -p.sequence = [ - target_ap_sim - ] +p.sequence = [target_ap_sim] from LDMX.Tracking import tracking from LDMX.Tracking import geo + # Load the full tracking sequence from LDMX.Tracking.full_tracking_sequence import full_tracking_sequence @@ -78,16 +103,17 @@ # Add DQM for dark brem interaction # Uses sim particles to analyze kinematics of dark brem interaction from LDMX.DQM import dqm + p.sequence.extend([dqm.DarkBremInteraction()]) p.max_events = args.nevents p.max_tries_per_event = 1000 if args.out_dir: - out = os.path.join(args.out_dir, f'tdb_{args.run}.root') - hist_out = os.path.join(args.out_dir, f'dqmMonitoringFile_{args.run}.root') - p.output_files = [ out ] + out = os.path.join(args.out_dir, f"tdb_{args.run}.root") + hist_out = os.path.join(args.out_dir, f"dqmMonitoringFile_{args.run}.root") + p.output_files = [out] p.histogram_file = hist_out else: - p.output_files = [ 'tdb.root' ] - p.histogram_file = 'dqmMonitoringFile.root' + p.output_files = ["tdb.root"] + p.histogram_file = "dqmMonitoringFile.root" diff --git a/Biasing/python/target.py b/Biasing/python/target.py index a011ee6da..dbf00b7c8 100644 --- a/Biasing/python/target.py +++ b/Biasing/python/target.py @@ -217,7 +217,7 @@ def dark_brem( ap_tau=-1.0, dist_decay_min=0.0, dist_decay_max=1.0, - aprime_lhe_id=1023 + aprime_lhe_id=1023, ): """Example configuration for producing dark brem interactions in the target. diff --git a/Biasing/python/util.py b/Biasing/python/util.py index 5a2918705..89705678c 100644 --- a/Biasing/python/util.py +++ b/Biasing/python/util.py @@ -120,7 +120,6 @@ def gamma_mumu(): """ return TrackProcessFilter("GammaToMuPair") - def aprime_to_fcp(): """Configuration used to tag all A' --> fcp+ fcp- tracks to persist them to the event. diff --git a/ComparePlots/_differ.py b/ComparePlots/_differ.py index 75e5e3d41..ca22ea988 100644 --- a/ComparePlots/_differ.py +++ b/ComparePlots/_differ.py @@ -16,7 +16,7 @@ from ._file import File -class Differ : +class Differ: """Differ allowing easy comparison of "similar" files The basic requirement of all files passed is that the columns @@ -53,39 +53,39 @@ class Differ : """ - def __init__(self, grp_name, output_type, *args) : - def open_file(arg) : - if isinstance(arg, (list,tuple)) : + def __init__(self, grp_name, output_type, *args): + def open_file(arg): + if isinstance(arg, (list, tuple)): return File(*arg) - elif isinstance(arg, File) : + elif isinstance(arg, File): return arg - else : + else: raise KeyError( - f'Argument provided {arg} is not a' - ' ComparePlots.File or a tuple of' - ' arguments for its constructor' + f"Argument provided {arg} is not a" + " ComparePlots.File or a tuple of" + " arguments for its constructor" ) self.grp_name = grp_name self.files = list(map(open_file, args)) self.output_type = output_type - def __repr__(self) : + def __repr__(self): """Short form representation of a Differ""" - return f'Differ ({self.grp_name}) {self.files}' + return f"Differ ({self.grp_name}) {self.files}" def plot1d( self, histname, xlabel, - ylabel = 'Count', - yscale = 'log', - ylim = (None,None), - out_dir = None, - file_name = None, - legend_kw = None, - rebin = 1, - **hist_kwargs + ylabel="Count", + yscale="log", + ylim=(None, None), + out_dir=None, + file_name=None, + legend_kw=None, + rebin=1, + **hist_kwargs, ): """Plot a 1D histogram, overlaying the File entries @@ -122,24 +122,17 @@ def plot1d( """ if legend_kw is None: legend_kw = {} - fig = matplotlib.pyplot.figure('differ',figsize=(11,8)) + fig = matplotlib.pyplot.figure("differ", figsize=(11, 8)) raw_ax, ratio_ax = fig.subplots( - nrows = 2, - sharex = 'col', - height_ratios = [2, 1], - gridspec_kw = { - 'hspace': 0.05 - } + nrows=2, sharex="col", height_ratios=[2, 1], gridspec_kw={"hspace": 0.05} ) raw_histograms = [] - for f in self.files : + for f in self.files: try: h = f.get(histname) art = h[hist.rebin(rebin)].plot1d( - ax=raw_ax, - **f.hist_kwargs, - **hist_kwargs + ax=raw_ax, **f.hist_kwargs, **hist_kwargs ) raw_histograms.append((h, art)) except uproot.KeyInFileError: @@ -151,8 +144,8 @@ def plot1d( raw_ax.set_yscale(yscale) raw_ax.set_ylim(*ylim) - if 'title' not in legend_kw : - legend_kw['title'] = self.grp_name + if "title" not in legend_kw: + legend_kw["title"] = self.grp_name raw_ax.legend(**legend_kw) @@ -166,28 +159,26 @@ def plot1d( ratio = num_h.values() / den_h.values() mplhep.histplot( ratio, - bins = bins, - ax = ratio_ax, - yerr = hist.intervals.ratio_uncertainty( - num = num_h.values(), - denom = den_h.values(), - uncertainty_type = 'poisson-ratio' + bins=bins, + ax=ratio_ax, + yerr=hist.intervals.ratio_uncertainty( + num=num_h.values(), + denom=den_h.values(), + uncertainty_type="poisson-ratio", ), - histtype='errorbar', - color = num_art[0].stairs.get_edgecolor() + histtype="errorbar", + color=num_art[0].stairs.get_edgecolor(), ) - ratio_ax.set_ylabel('Ratio') + ratio_ax.set_ylabel("Ratio") ratio_ax.set_xlabel(xlabel) - if out_dir is None : + if out_dir is None: matplotlib.pyplot.show() - else : - if file_name is None : - file_name = re.sub(r'^.*/','',histname) + else: + if file_name is None: + file_name = re.sub(r"^.*/", "", histname) fig.savefig( - os.path.join(out_dir, file_name) - + self.output_type, - bbox_inches='tight' + os.path.join(out_dir, file_name) + self.output_type, bbox_inches="tight" ) fig.clf() diff --git a/ComparePlots/_plotter.py b/ComparePlots/_plotter.py index dae2d87bb..65977fa0b 100644 --- a/ComparePlots/_plotter.py +++ b/ComparePlots/_plotter.py @@ -11,6 +11,7 @@ 2. to be decorated by the 'plotter' decorator below. """ + def plotter(func): """decorator for registering plotters @@ -27,7 +28,7 @@ def my_hist_plotter(d, out_dir = None) : __registry__ : dict Dictionary of registered plotters """ - func_name = func.__module__.replace('ComparePlots.','')+'.'+func.__name__ + func_name = func.__module__.replace("ComparePlots.", "") + "." + func.__name__ plotter.__registry__[func_name] = func return func diff --git a/ComparePlots/dark_brem.py b/ComparePlots/dark_brem.py index 0477c334c..28031b5c0 100644 --- a/ComparePlots/dark_brem.py +++ b/ComparePlots/dark_brem.py @@ -6,10 +6,11 @@ from ._plotter import plotter -log = logging.getLogger('dark_brem') +log = logging.getLogger("dark_brem") + @plotter -def kinematics(d : Differ, out_dir = None) : +def kinematics(d: Differ, out_dir=None): """Plot Dark Brem interaction histograms Parameters @@ -19,38 +20,40 @@ def kinematics(d : Differ, out_dir = None) : """ features = [ - ('aprime_energy', 'Dark Photon Energy [MeV]'), - ('aprime_pt', 'Dark Photon $p_T$ [MeV]'), - ('aprime_theta', 'Dark Photon $\\theta$ [degree]'), - ('recoil_energy', 'Recoil Energy [MeV]'), - ('recoil_pt', 'Recoil $p_T$ [MeV]'), - ('recoil_theta', 'Recoil $\\theta$ [degree]'), - ('incident_energy', 'Incident Energy [MeV]'), - ('incident_pt', 'Incident $p_T$ [MeV]'), - ('dark_brem_z', 'Dark Brem Z Location [mm]'), + ("aprime_energy", "Dark Photon Energy [MeV]"), + ("aprime_pt", "Dark Photon $p_T$ [MeV]"), + ("aprime_theta", "Dark Photon $\\theta$ [degree]"), + ("recoil_energy", "Recoil Energy [MeV]"), + ("recoil_pt", "Recoil $p_T$ [MeV]"), + ("recoil_theta", "Recoil $\\theta$ [degree]"), + ("incident_energy", "Incident Energy [MeV]"), + ("incident_pt", "Incident $p_T$ [MeV]"), + ("dark_brem_z", "Dark Brem Z Location [mm]"), ] - for h, name in features : - log.info(f'plotting {h}') + for h, name in features: + log.info(f"plotting {h}") d.plot1d( - f'DarkBremDQM/{h}', name, - out_dir=out_dir, density=True, - ylabel='Weighted Fraction' + f"DarkBremDQM/{h}", + name, + out_dir=out_dir, + density=True, + ylabel="Weighted Fraction", ) - log.info('plotting dark_brem_element') + log.info("plotting dark_brem_element") d.plot1d( - 'DarkBremDQM/dark_brem_element', - 'Element in which Dark Brem Occurred', - out_dir = out_dir, + "DarkBremDQM/dark_brem_element", + "Element in which Dark Brem Occurred", + out_dir=out_dir, density=True, - ylabel='Weighted Fraction' + ylabel="Weighted Fraction", ) - log.info('plotting dark_brem_material') + log.info("plotting dark_brem_material") d.plot1d( - 'DarkBremDQM/dark_brem_material', - 'Material in which Dark Brem Occurred', - out_dir = out_dir, + "DarkBremDQM/dark_brem_material", + "Material in which Dark Brem Occurred", + out_dir=out_dir, density=True, - ylabel='Weighted Fraction' + ylabel="Weighted Fraction", ) diff --git a/ComparePlots/ecal.py b/ComparePlots/ecal.py index ed36285f7..7f8a77262 100644 --- a/ComparePlots/ecal.py +++ b/ComparePlots/ecal.py @@ -6,10 +6,11 @@ from ._plotter import plotter -log = logging.getLogger('ecal') +log = logging.getLogger("ecal") + @plotter -def digi_verify(d : Differ, out_dir = None) : +def digi_verify(d: Differ, out_dir=None): """Plot ECal digi verify variables from the already created DQM histograms Parameters @@ -18,28 +19,24 @@ def digi_verify(d : Differ, out_dir = None) : Differ containing files that are not event files (presumably histogram files) """ - col = 'EcalDigiVerify/num_sim_hits_per_cell' - name = ( - 'Number of SimHits per ECal Cell' - ' (excluding empty rec cells)' - ) - log.info(f'plotting {col}') - d.plot1d(col, name, out_dir = out_dir, legend_kw = {'loc': 'upper left'}) + col = "EcalDigiVerify/num_sim_hits_per_cell" + name = "Number of SimHits per ECal Cell (excluding empty rec cells)" + log.info(f"plotting {col}") + d.plot1d(col, name, out_dir=out_dir, legend_kw={"loc": "upper left"}) features = [ - ('EcalDigiVerify/num_rec_hits', 'Number of RecHits'), - ('EcalDigiVerify/num_noise_hits', 'Number of noisy RecHits'), - ('EcalDigiVerify/total_rec_energy', 'Total Reconstructed Energy in ECal [MeV]'), + ("EcalDigiVerify/num_rec_hits", "Number of RecHits"), + ("EcalDigiVerify/num_noise_hits", "Number of noisy RecHits"), + ("EcalDigiVerify/total_rec_energy", "Total Reconstructed Energy in ECal [MeV]"), ] - for col, name in features : - log.info(f'plotting {col}') - rebin = 10 if 'total_rec_energy' in col else 1 - d.plot1d( - col, name, out_dir=out_dir, rebin=rebin - ) + for col, name in features: + log.info(f"plotting {col}") + rebin = 10 if "total_rec_energy" in col else 1 + d.plot1d(col, name, out_dir=out_dir, rebin=rebin) + @plotter -def shower_feats(d : Differ, out_dir = None) : +def shower_feats(d: Differ, out_dir=None): """Plot ECal shower features from the already created DQM histograms Parameters @@ -48,28 +45,29 @@ def shower_feats(d : Differ, out_dir = None) : Differ containing files that are not event files (presumably histogram files) """ - col, name = 'EcalShowerFeatures/deepest_layer_hit', 'Deepest Layer Hit' - log.info(f'plotting {col}') - d.plot1d(col, name, out_dir = out_dir, legend_kw = {'loc': 'upper left'}) + col, name = "EcalShowerFeatures/deepest_layer_hit", "Deepest Layer Hit" + log.info(f"plotting {col}") + d.plot1d(col, name, out_dir=out_dir, legend_kw={"loc": "upper left"}) features = [ - ('EcalShowerFeatures/num_readout_hits', 'N Readout Hits'), - ('EcalShowerFeatures/summed_det', 'Total Rec Energy [MeV]'), - ('EcalShowerFeatures/summed_iso', 'Total Isolated Energy [MeV]'), - ('EcalShowerFeatures/summed_back', 'Total Back Energy [MeV]'), - ('EcalShowerFeatures/max_cell_dep', 'Max Cell Dep [MeV]'), - ('EcalShowerFeatures/shower_rms', 'Shower RMS [mm]'), - ('EcalShowerFeatures/x_std', 'X Standard Deviation [mm]'), - ('EcalShowerFeatures/y_std', 'Y Standard Deviation [mm]'), - ('EcalShowerFeatures/avg_layer_hit', 'Avg Layer Hit'), - ('EcalShowerFeatures/std_layer_hit', 'Std Dev Layer Hit') + ("EcalShowerFeatures/num_readout_hits", "N Readout Hits"), + ("EcalShowerFeatures/summed_det", "Total Rec Energy [MeV]"), + ("EcalShowerFeatures/summed_iso", "Total Isolated Energy [MeV]"), + ("EcalShowerFeatures/summed_back", "Total Back Energy [MeV]"), + ("EcalShowerFeatures/max_cell_dep", "Max Cell Dep [MeV]"), + ("EcalShowerFeatures/shower_rms", "Shower RMS [mm]"), + ("EcalShowerFeatures/x_std", "X Standard Deviation [mm]"), + ("EcalShowerFeatures/y_std", "Y Standard Deviation [mm]"), + ("EcalShowerFeatures/avg_layer_hit", "Avg Layer Hit"), + ("EcalShowerFeatures/std_layer_hit", "Std Dev Layer Hit"), ] - for col, name in features : - log.info(f'plotting {col}') - d.plot1d(col, name, out_dir = out_dir) + for col, name in features: + log.info(f"plotting {col}") + d.plot1d(col, name, out_dir=out_dir) + @plotter -def mip_tracking(d : Differ, out_dir = None) : +def mip_tracking(d: Differ, out_dir=None): """Plot ECal MIP tracking features from the already created DQM histograms Parameters @@ -78,28 +76,30 @@ def mip_tracking(d : Differ, out_dir = None) : Differ containing files that are not event files (presumably histogram files) """ - col, name = 'EcalMipTrackingFeatures/n_straight_tracks', 'Number of Straight Tracks' - log.info(f'plotting {col}') - d.plot1d(col, name, out_dir = out_dir, legend_kw = {'loc': 'upper left'}) + col, name = "EcalMipTrackingFeatures/n_straight_tracks", "Number of Straight Tracks" + log.info(f"plotting {col}") + d.plot1d(col, name, out_dir=out_dir, legend_kw={"loc": "upper left"}) features = [ - ('EcalMipTrackingFeatures/n_linreg_segments', - 'Number of Linear Regression Segments'), - ('EcalMipTrackingFeatures/first_near_photon_layer', 'First Near Photon Layer'), - ('EcalMipTrackingFeatures/ep_ang', 'Electron Photon Angle [degree]'), - ('EcalMipTrackingFeatures/ep_sep', 'Electron Photon Separation'), - ('EcalMipTrackingFeatures/recoil_pz', 'Recoil electron pz [MeV]'), - ('EcalMipTrackingFeatures/recoil_pt', 'Recoil electron pT [MeV]'), - ('EcalMipTrackingFeatures/recoil_x', 'Recoil electron x[mm]'), - ('EcalMipTrackingFeatures/recoil_y', 'Recoil electron y [mm]'), + ( + "EcalMipTrackingFeatures/n_linreg_segments", + "Number of Linear Regression Segments", + ), + ("EcalMipTrackingFeatures/first_near_photon_layer", "First Near Photon Layer"), + ("EcalMipTrackingFeatures/ep_ang", "Electron Photon Angle [degree]"), + ("EcalMipTrackingFeatures/ep_sep", "Electron Photon Separation"), + ("EcalMipTrackingFeatures/recoil_pz", "Recoil electron pz [MeV]"), + ("EcalMipTrackingFeatures/recoil_pt", "Recoil electron pT [MeV]"), + ("EcalMipTrackingFeatures/recoil_x", "Recoil electron x[mm]"), + ("EcalMipTrackingFeatures/recoil_y", "Recoil electron y [mm]"), ] - for col, name in features : - log.info(f'plotting {col}') - d.plot1d(col, name, out_dir = out_dir) + for col, name in features: + log.info(f"plotting {col}") + d.plot1d(col, name, out_dir=out_dir) @plotter -def veto_results(d : Differ, out_dir = None) : +def veto_results(d: Differ, out_dir=None): """Plot ECAL veto results from the already created DQM histograms Parameters @@ -108,20 +108,21 @@ def veto_results(d : Differ, out_dir = None) : Differ containing files that are not event files (presumably histogram files) """ - col, name = 'EcalVetoResults/bdt_disc', 'BDT discriminating score' - log.info(f'plotting {col}') - d.plot1d(col, name, out_dir = out_dir, legend_kw = {'loc': 'upper left'}) + col, name = "EcalVetoResults/bdt_disc", "BDT discriminating score" + log.info(f"plotting {col}") + d.plot1d(col, name, out_dir=out_dir, legend_kw={"loc": "upper left"}) features = [ - ('EcalVetoResults/bdt_disc_log', '-log(1-BDT discriminating score)'), - ('EcalVetoResults/fiducial', 'Recoil eletron fiducial') + ("EcalVetoResults/bdt_disc_log", "-log(1-BDT discriminating score)"), + ("EcalVetoResults/fiducial", "Recoil eletron fiducial"), ] - for col, name in features : - log.info(f'plotting {col}') - d.plot1d(col, name, out_dir = out_dir) + for col, name in features: + log.info(f"plotting {col}") + d.plot1d(col, name, out_dir=out_dir) + @plotter -def clue_cluster(d : Differ, out_dir = None) : +def clue_cluster(d: Differ, out_dir=None): """ Plot ECal CLUE cluster features from the already created DQM histograms Parameters @@ -131,21 +132,28 @@ def clue_cluster(d : Differ, out_dir = None) : """ features = [ - ('EcalClusterAnalyzer/number_of_clusters_first_layer', - 'Number of CLUE clusters on the first layer'), - ('EcalClusterAnalyzer/number_of_clusters_per_layer', - 'Number of CLUE clusters per layer'), - ('EcalClusterAnalyzer/number_of_clusters', 'Total number of CLUE clusters'), - ('EcalClusterAnalyzer/energy_percentage', 'Percentage of energy in cluster'), - ('EcalClusterAnalyzer/clusterless_hits_percentage', - 'Percentage of hits not in a cluster'), - ('EcalClusterAnalyzer/sp_clue_distance', - 'CLUE centroid to SP ele distance' - ' in xy-plane [mm]'), - ('EcalClusterAnalyzer/sp_clue_x_residual', 'CLUE centroid X - SP ele X [mm]'), - ('EcalClusterAnalyzer/sp_clue_y_residual', 'CLUE centroid Y - SP ele Y [mm]'), - ('EcalClusterAnalyzer/correctly_predicted_events', ''), + ( + "EcalClusterAnalyzer/number_of_clusters_first_layer", + "Number of CLUE clusters on the first layer", + ), + ( + "EcalClusterAnalyzer/number_of_clusters_per_layer", + "Number of CLUE clusters per layer", + ), + ("EcalClusterAnalyzer/number_of_clusters", "Total number of CLUE clusters"), + ("EcalClusterAnalyzer/energy_percentage", "Percentage of energy in cluster"), + ( + "EcalClusterAnalyzer/clusterless_hits_percentage", + "Percentage of hits not in a cluster", + ), + ( + "EcalClusterAnalyzer/sp_clue_distance", + "CLUE centroid to SP ele distance in xy-plane [mm]", + ), + ("EcalClusterAnalyzer/sp_clue_x_residual", "CLUE centroid X - SP ele X [mm]"), + ("EcalClusterAnalyzer/sp_clue_y_residual", "CLUE centroid Y - SP ele Y [mm]"), + ("EcalClusterAnalyzer/correctly_predicted_events", ""), ] - for col, name in features : - log.info(f'plotting {col}') - d.plot1d(col, name, out_dir = out_dir) + for col, name in features: + log.info(f"plotting {col}") + d.plot1d(col, name, out_dir=out_dir) diff --git a/ComparePlots/hcal.py b/ComparePlots/hcal.py index c58cb5713..fadbd94ac 100644 --- a/ComparePlots/hcal.py +++ b/ComparePlots/hcal.py @@ -1,20 +1,20 @@ - import logging from ._differ import Differ from ._plotter import plotter -log = logging.getLogger('hcal') +log = logging.getLogger("hcal") + @plotter def dqm(d: Differ, out_dir=None): - sections = ['back', 'top', 'bottom', 'left', 'right'] - histogram_name_format = 'hcal_dqm_{0}/hcal_dqm_{0}_{1}' + sections = ["back", "top", "bottom", "left", "right"] + histogram_name_format = "hcal_dqm_{0}/hcal_dqm_{0}_{1}" histograms = [ - ('pe', 'Reconstructed PE per hit ({})'), - ('hit_time', 'HCal hit time ({}) [ns]'), - ('sim_hit_time', 'HCal hit time ({}) [ns]'), + ("pe", "Reconstructed PE per hit ({})"), + ("hit_time", "HCal hit time ({}) [ns]"), + ("sim_hit_time", "HCal hit time ({}) [ns]"), ("layer", "Layer number ({})"), ("sim_layer", "Layer number ({})"), ("energy", "Reconstructed hit energy in the HCal ({})"), @@ -23,40 +23,43 @@ def dqm(d: Differ, out_dir=None): ("sim_energy_per_bar", "Total energy deposited per bar in the HCal ({}) [MeV]"), ("sim_total_energy", "Total energy deposited in the HCal ({}) [MeV]"), ("total_pe", "Total photoelectrons in the HCal ({})"), - ('max_pe', "Maximum photoelectrons in any HCal bar ({})"), + ("max_pe", "Maximum photoelectrons in any HCal bar ({})"), ("hit_multiplicity", "HCal hit multiplicity ({})"), ("sim_hit_multiplicity", "HCal hit multiplicity ({})"), ("sim_num_bars_hit", "HCal hit multiplicity ({})"), ("vetoable_hit_multiplicity", "Multiplicity of vetoable hits (> 8PE) ({})"), - ('max_pe_time', "Max PE hit time ({}) [ns]",), - ('along_x', 'Reconstructed hit position along horizontal bars [mm]'), - ('along_y', 'Reconstructed hit position along vertical bars [mm]' ), - ('along_z', 'Reconstructed hit position along z-oriented bars [mm]'), - ('sim_along_x', 'Reconstructed hit position along horizontal bars [mm]'), - ('sim_along_y', 'Reconstructed hit position along vertical bars [mm]' ), - ('sim_along_z', 'Reconstructed hit position along z-oriented bars [mm]'), + ( + "max_pe_time", + "Max PE hit time ({}) [ns]", + ), + ("along_x", "Reconstructed hit position along horizontal bars [mm]"), + ("along_y", "Reconstructed hit position along vertical bars [mm]"), + ("along_z", "Reconstructed hit position along z-oriented bars [mm]"), + ("sim_along_x", "Reconstructed hit position along horizontal bars [mm]"), + ("sim_along_y", "Reconstructed hit position along vertical bars [mm]"), + ("sim_along_z", "Reconstructed hit position along z-oriented bars [mm]"), ] log.info("Making the efficiency histogram...") - d.plot1d('HcalInefficiencyAnalyzer/efficiency', - 'Hcal part involved in veto', - 'Efficiency', - out_dir=out_dir, - yscale='linear', -) + d.plot1d( + "HcalInefficiencyAnalyzer/efficiency", + "Hcal part involved in veto", + "Efficiency", + out_dir=out_dir, + yscale="linear", + ) for section in sections: for histogram, title in histograms: name = histogram_name_format.format(section, histogram) title = title.format(section.capitalize()) log.info(f"Making the {name} histogram...") - d.plot1d(name, title, out_dir=out_dir, density=True, ylabel='Event rate') + d.plot1d(name, title, out_dir=out_dir, density=True, ylabel="Event rate") log.info(f"Making the inefficiency figure for {section}") - d.plot1d(f'HcalInefficiencyAnalyzer/inefficiency_{section}', - 'Layer', - 'Inefficiency (8PE)', - out_dir=out_dir, - density=True) - - - + d.plot1d( + f"HcalInefficiencyAnalyzer/inefficiency_{section}", + "Layer", + "Inefficiency (8PE)", + out_dir=out_dir, + density=True, + ) diff --git a/ComparePlots/performance.py b/ComparePlots/performance.py index f5b786ed4..1ba870f75 100644 --- a/ComparePlots/performance.py +++ b/ComparePlots/performance.py @@ -6,10 +6,11 @@ from ._plotter import plotter -log = logging.getLogger('performance') +log = logging.getLogger("performance") + @plotter -def event_timing(d : Differ, out_dir = None) : +def event_timing(d: Differ, out_dir=None): """Plot time it took to process events Parameters @@ -21,12 +22,12 @@ def event_timing(d : Differ, out_dir = None) : # just plotting the __ALL__ branch which represents all processors in the sequence, # however, if we introduce some introspection into the Differ class, we could deduce # the other branch names and plot the duration of different processors specifically - for processor in ['__ALL__']: - branch = f'performance/by_event/{processor}./{processor}.duration_' - log.info(f'plotting event time for {processor}') + for processor in ["__ALL__"]: + branch = f"performance/by_event/{processor}./{processor}.duration_" + log.info(f"plotting event time for {processor}") d.plot1d( branch, - f'{processor} Event Time [s]', + f"{processor} Event Time [s]", out_dir=out_dir, - legend_kw={'loc': 'upper right'} + legend_kw={"loc": "upper right"}, ) diff --git a/ComparePlots/simparticles.py b/ComparePlots/simparticles.py index 8584d4660..21dc8c1f8 100644 --- a/ComparePlots/simparticles.py +++ b/ComparePlots/simparticles.py @@ -4,73 +4,90 @@ from ._plotter import plotter -log = logging.getLogger('8GeV') +log = logging.getLogger("8GeV") + @plotter def sample_validation(d: Differ, out_dir=None): - d.plot1d("SampleValidation/primaries_pdgid", "PDG ID, primaries", - out_dir=out_dir, - density=True) + d.plot1d( + "SampleValidation/primaries_pdgid", + "PDG ID, primaries", + out_dir=out_dir, + density=True, + ) - d.plot1d("SampleValidation/primaries_energy", "Energy of primaries [MeV]", - out_dir=out_dir, - density=True) + d.plot1d( + "SampleValidation/primaries_energy", + "Energy of primaries [MeV]", + out_dir=out_dir, + density=True, + ) - d.plot1d("SampleValidation/primarydaughters_pdgid", "PDG ID, primary daughters", - out_dir=out_dir, - density=True) + d.plot1d( + "SampleValidation/primarydaughters_pdgid", + "PDG ID, primary daughters", + out_dir=out_dir, + density=True, + ) d.plot1d( "SampleValidation/daughterphoton_energy", - "Energy spectrum of all photons" - " from primary [MeV]", - out_dir=out_dir, - density=True) + "Energy spectrum of all photons from primary [MeV]", + out_dir=out_dir, + density=True, + ) - d.plot1d("SampleValidation/harddaughters_pdgid", "PDG ID of hard primary daughter", - out_dir=out_dir, - density=True) + d.plot1d( + "SampleValidation/harddaughters_pdgid", + "PDG ID of hard primary daughter", + out_dir=out_dir, + density=True, + ) d.plot1d( "SampleValidation/harddaughters_startZ", - "Start z position of hard" - " primary daughter [mm]", - out_dir=out_dir, - density=True) + "Start z position of hard primary daughter [mm]", + out_dir=out_dir, + density=True, + ) d.plot1d( "SampleValidation/harddaughters_endZ", - "End z position of hard" - " primary daughter [mm]", - out_dir=out_dir, - density=True) + "End z position of hard primary daughter [mm]", + out_dir=out_dir, + density=True, + ) d.plot1d( "SampleValidation/harddaughters_energy", - "Energy spectrum of hard" - " primary daughter [MeV]", - out_dir=out_dir, - density=True) + "Energy spectrum of hard primary daughter [MeV]", + out_dir=out_dir, + density=True, + ) - d.plot1d("SampleValidation/hardbremdaughters_pdgid", "PDG ID, hard brem daughters", - out_dir=out_dir, - density=True) + d.plot1d( + "SampleValidation/hardbremdaughters_pdgid", + "PDG ID, hard brem daughters", + out_dir=out_dir, + density=True, + ) d.plot1d( "SampleValidation/hardbremdaughters_startZ", - "Start z position of hard" - " brem daughters [mm]", - out_dir=out_dir, - density=True) + "Start z position of hard brem daughters [mm]", + out_dir=out_dir, + density=True, + ) d.plot1d( "SampleValidation/hardbremdaughters_endZ", - "End z position of hard" - " brem daughters [mm]", - out_dir=out_dir, - density=True) + "End z position of hard brem daughters [mm]", + out_dir=out_dir, + density=True, + ) d.plot1d( "SampleValidation/hardbremdaughters_energy", "Energy of hard brem daughters [MeV]", - out_dir=out_dir, - density=True) + out_dir=out_dir, + density=True, + ) diff --git a/ComparePlots/trigscint.py b/ComparePlots/trigscint.py index a8c05e46c..bc6654ce2 100644 --- a/ComparePlots/trigscint.py +++ b/ComparePlots/trigscint.py @@ -5,7 +5,7 @@ @plotter -def dqm(d : Differ, out_dir = None) : +def dqm(d: Differ, out_dir=None): """Plot TrigScint-related validation plots Parameters @@ -14,48 +14,52 @@ def dqm(d : Differ, out_dir = None) : Differ containing files that are not event files (presumably histogram files) """ - collections=["Sim", "Digi", "Cluster"] + collections = ["Sim", "Digi", "Cluster"] pads = ["Pad1", "Pad2", "Pad3"] - t_coll="TrigScintTracks" + t_coll = "TrigScintTracks" track_hists = [ - ('centroid', 'Track centroid [in channel nb]'), - ('n_tracks', 'Track multiplicity'), - ('n_clusters', 'Track cluster multiplicity'), - ('beamEfrac', 'Beam electron energy fraction'), - ('residual', 'Track residual [in channel nb]'), - ('x', 'Track x [mm]'), - ('y', 'Track y [mm]') - ] - for member, name in track_hists : - d.plot1d(f'{t_coll}/{t_coll}_{member}', name, out_dir = out_dir) + ("centroid", "Track centroid [in channel nb]"), + ("n_tracks", "Track multiplicity"), + ("n_clusters", "Track cluster multiplicity"), + ("beamEfrac", "Beam electron energy fraction"), + ("residual", "Track residual [in channel nb]"), + ("x", "Track x [mm]"), + ("y", "Track y [mm]"), + ] + for member, name in track_hists: + d.plot1d(f"{t_coll}/{t_coll}_{member}", name, out_dir=out_dir) - for pad in pads : - for coll in collections : - shared_members = [ ('x', 'x [mm]'), ('y', 'y [mm]'), ('z', 'z [mm]'), - ('n_hits', 'Hit multiplicity') ] - for member, name in shared_members : - d.plot1d(f'TrigScint{coll}{pad}/{member}', f'{coll} {name}', - out_dir = out_dir) + for pad in pads: + for coll in collections: + shared_members = [ + ("x", "x [mm]"), + ("y", "y [mm]"), + ("z", "z [mm]"), + ("n_hits", "Hit multiplicity"), + ] + for member, name in shared_members: + d.plot1d( + f"TrigScint{coll}{pad}/{member}", f"{coll} {name}", out_dir=out_dir + ) special_members = [ - (f'TrigScintSim{pad}/hit_time', 'Simhit time [ns]'), - (f'TrigScintDigi{pad}/_total_pe', 'Total PE in event'), - (f'TrigScintDigi{pad}/_pe', 'Total PE in bars'), - (f'TrigScintSim{pad}/id', 'Channel ID'), - (f'TrigScintDigi{pad}/_id', 'Channel ID'), - (f'TrigScintDigi{pad}/_hit_time', 'Digi hit time [ns]'), - (f'TrigScintDigi{pad}/_id_noise', 'ID of noise hits'), - (f'TrigScintDigi{pad}/_pe_noise', 'PE in noise hits'), - (f'TrigScintDigi{pad}/_n_hits_noise', 'Number of noise hits'), - (f'TrigScintCluster{pad}/_centroid', 'Cluster centroid [in channel nb]'), - (f'TrigScintCluster{pad}/_total_pe', 'Cluster total PE in event'), - (f'TrigScintCluster{pad}/_n_clusters', 'Cluster multiplicity'), - (f'TrigScintCluster{pad}/_seed', 'Cluster seed [in channel nb]'), - (f'TrigScintCluster{pad}/_cluster_time', 'Cluster time [ns]'), - (f'TrigScintCluster{pad}/_beamEfrac', 'Beam electron energy fraction') + (f"TrigScintSim{pad}/hit_time", "Simhit time [ns]"), + (f"TrigScintDigi{pad}/_total_pe", "Total PE in event"), + (f"TrigScintDigi{pad}/_pe", "Total PE in bars"), + (f"TrigScintSim{pad}/id", "Channel ID"), + (f"TrigScintDigi{pad}/_id", "Channel ID"), + (f"TrigScintDigi{pad}/_hit_time", "Digi hit time [ns]"), + (f"TrigScintDigi{pad}/_id_noise", "ID of noise hits"), + (f"TrigScintDigi{pad}/_pe_noise", "PE in noise hits"), + (f"TrigScintDigi{pad}/_n_hits_noise", "Number of noise hits"), + (f"TrigScintCluster{pad}/_centroid", "Cluster centroid [in channel nb]"), + (f"TrigScintCluster{pad}/_total_pe", "Cluster total PE in event"), + (f"TrigScintCluster{pad}/_n_clusters", "Cluster multiplicity"), + (f"TrigScintCluster{pad}/_seed", "Cluster seed [in channel nb]"), + (f"TrigScintCluster{pad}/_cluster_time", "Cluster time [ns]"), + (f"TrigScintCluster{pad}/_beamEfrac", "Beam electron energy fraction"), # not implemented but should be - #(f'TrigScintDigi{pad}/_beamEfrac', 'Beam electron energy fraction') - ] - for member, name in special_members : - d.plot1d(member, name, out_dir = out_dir) - + # (f'TrigScintDigi{pad}/_beamEfrac', 'Beam electron energy fraction') + ] + for member, name in special_members: + d.plot1d(member, name, out_dir=out_dir) diff --git a/DQM/python/dqm.py b/DQM/python/dqm.py index efce27ec9..c5a927230 100644 --- a/DQM/python/dqm.py +++ b/DQM/python/dqm.py @@ -2369,12 +2369,16 @@ def __post_init__(self): self.histogram( "track_p_multitracks", "Track p (multi-track events) [MeV]", - 100, 0, 5000, + 100, + 0, + 5000, ) self.histogram( "track_separation", "Track angular separation [rad]", - 100, 0, 3.2, + 100, + 0, + 3.2, ) self.histogram( "track_xy", @@ -2498,20 +2502,48 @@ def __post_init__(self): # 2D correlations self.histogram( - "sp_x_vs_trk_x", "SP x [mm]", 100, -200, 200, - "Track x [mm]", 100, -200, 200, + "sp_x_vs_trk_x", + "SP x [mm]", + 100, + -200, + 200, + "Track x [mm]", + 100, + -200, + 200, ) self.histogram( - "sp_y_vs_trk_y", "SP y [mm]", 100, -200, 200, - "Track y [mm]", 100, -200, 200, + "sp_y_vs_trk_y", + "SP y [mm]", + 100, + -200, + 200, + "Track y [mm]", + 100, + -200, + 200, ) self.histogram( - "sp_p_vs_trk_p", "SP p [MeV]", 100, 0, 5000, - "Track p [MeV]", 100, 0, 5000, + "sp_p_vs_trk_p", + "SP p [MeV]", + 100, + 0, + 5000, + "Track p [MeV]", + 100, + 0, + 5000, ) self.histogram( - "sp_theta_vs_trk_theta", "SP theta [rad]", 100, 0, 0.5, - "Track theta [rad]", 100, 0, 0.5, + "sp_theta_vs_trk_theta", + "SP theta [rad]", + 100, + 0, + 0.5, + "Track theta [rad]", + 100, + 0, + 0.5, ) diff --git a/DetDescr/python/ecal_geometry.py b/DetDescr/python/ecal_geometry.py index ff55026d6..c52f205fb 100644 --- a/DetDescr/python/ecal_geometry.py +++ b/DetDescr/python/ecal_geometry.py @@ -243,7 +243,7 @@ def v15(): "ldmx-ti-v15-8gev.*", "ldmx-al-v15-8gev", "ldmx-al-v15-8gev.*", - "ldmx-det-v16-8gev" + "ldmx-det-v16-8gev", ], gap=1.5, si_thickness=0.4, diff --git a/DetDescr/python/hcal_geometry.py b/DetDescr/python/hcal_geometry.py index 5d2e57857..5a3715767 100644 --- a/DetDescr/python/hcal_geometry.py +++ b/DetDescr/python/hcal_geometry.py @@ -503,7 +503,7 @@ def make_v14(): "ldmx-ti-v15-8gev.*", "ldmx-al-v15-8gev", "ldmx-al-v15-8gev.*", - "ldmx-det-v16-8gev" + "ldmx-det-v16-8gev", ] return HcalReadoutGeometry( num_sections=num_sections, diff --git a/Ecal/python/vetos.py b/Ecal/python/vetos.py index 0bf2fcf7a..08aaaa1ad 100644 --- a/Ecal/python/vetos.py +++ b/Ecal/python/vetos.py @@ -83,6 +83,7 @@ class EcalTrackFinderProcessor(Processor): class EcalRecoilRemovalProcessor(Processor): """Configuration for the ECal processor which removes hits likely associated with the recoil electron.""" + beam_energy: float = 8000.0 num_ecal_layers: int = 32 rem_dist_file: str = make_roc_path("RoC_v14_8gev_95") @@ -97,11 +98,12 @@ class EcalRecoilRemovalProcessor(Processor): track_pass_name: str = "" n_electrons: int = 1 + recrem_ecalveto = EcalVetoProcessor( - bdt_file = make_bdt_path( "2e_wab_vs_signal10mev_v15_1RoC_68_recrem" ), - bdt_feature_config = "wab_recrem", - disc_cut = 0.9913983, - rec_coll_name = "EcalRecHitsInc", - collection_name = "EcalVetoInc", + bdt_file=make_bdt_path("2e_wab_vs_signal10mev_v15_1RoC_68_recrem"), + bdt_feature_config="wab_recrem", + disc_cut=0.9913983, + rec_coll_name="EcalRecHitsInc", + collection_name="EcalVetoInc", ) recrem_processing = [EcalRecoilRemovalProcessor(), recrem_ecalveto] diff --git a/Framework/exampleConfig/dumpRunHeaderConf.py b/Framework/exampleConfig/dumpRunHeaderConf.py index 33f2df55f..acca44483 100644 --- a/Framework/exampleConfig/dumpRunHeaderConf.py +++ b/Framework/exampleConfig/dumpRunHeaderConf.py @@ -3,21 +3,18 @@ file_in = sys.argv[1:] -file_name = " ".join(sys.argv[1:]) +file_name = " ".join(sys.argv[1:]) from LDMX.Framework import ldmxcfg -p = ldmxcfg.Process('myAna') +p = ldmxcfg.Process("myAna") dump_run_header = ldmxcfg.RunHeaderAna() p.max_events = -1 p.run = 2 -p.input_files = file_in +p.input_files = file_in print(p.input_files) p.sequence = [dump_run_header] - - - diff --git a/Framework/test/config_python_test_config.py b/Framework/test/config_python_test_config.py index e8f2e83b5..0a57da66a 100644 --- a/Framework/test/config_python_test_config.py +++ b/Framework/test/config_python_test_config.py @@ -1,4 +1,3 @@ - from LDMX.Framework import ldmxcfg @@ -13,30 +12,29 @@ class TestProcessor(ldmxcfg.Processor): test_int: int = 9 test_double: float = 7.7 test_string: str = "Yay!" - test_int_vec: list[int] = [ 1 , 2 , 3 ] + test_int_vec: list[int] = [1, 2, 3] test_dict: MyParameters = MyParameters() - test_double_vec: list[float] = [ 0.1 , 0.2 , 0.3 ] - test_string_vec: list[str] = [ 'first' , 'second' , 'third' ] - test_2dlist: list[int,int] = [ [ 11, 12, 13], [21, 22], [31,32,33,34]] - test_collection_passname: str = '' - test_object_passname: str = '' - veto_test_object_passname: str = '' - tenth_event_passname: str = '' - event_index_passname: str = '' - + test_double_vec: list[float] = [0.1, 0.2, 0.3] + test_string_vec: list[str] = ["first", "second", "third"] + test_2dlist: list[int, int] = [[11, 12, 13], [21, 22], [31, 32, 33, 34]] + test_collection_passname: str = "" + test_object_passname: str = "" + veto_test_object_passname: str = "" + tenth_event_passname: str = "" + event_index_passname: str = "" def __post_init__(self): self.instance_name = "test_instance" # Create a process -p = ldmxcfg.Process( 'test' ) +p = ldmxcfg.Process("test") # Specify the input files -p.input_files = [ 'input1' , 'input2' ] +p.input_files = ["input1", "input2"] # Specify whether events should be kept by default p.skim_default_is_keep = False # But the processor pipeline -p.sequence = [ TestProcessor() ] +p.sequence = [TestProcessor()] diff --git a/Framework/test/standalone/standalone_config.py b/Framework/test/standalone/standalone_config.py index f085acabd..b813813e6 100644 --- a/Framework/test/standalone/standalone_config.py +++ b/Framework/test/standalone/standalone_config.py @@ -3,8 +3,6 @@ p = ldmxcfg.Process("test") p.max_events = 10 -p.sequence = [ - ldmxcfg.processor_from_file("Standalone.cxx") -] -p.output_files = [ '/dev/null' ] +p.sequence = [ldmxcfg.processor_from_file("Standalone.cxx")] +p.output_files = ["/dev/null"] p.histogram_file = "standalone_histogram.root" diff --git a/Hcal/test/hcal_digi_pipeline_test_config.py b/Hcal/test/hcal_digi_pipeline_test_config.py index 84ef77638..5d828df18 100644 --- a/Hcal/test/hcal_digi_pipeline_test_config.py +++ b/Hcal/test/hcal_digi_pipeline_test_config.py @@ -1,22 +1,21 @@ - from LDMX.Framework import ldmxcfg # Create a process -p = ldmxcfg.Process( 'test_hcal_digis' ) +p = ldmxcfg.Process("test_hcal_digis") # Set the maximum number of events -p.max_events = 1000 # should be the same as NUM_TEST_SIM_HITS +p.max_events = 1000 # should be the same as NUM_TEST_SIM_HITS # Import the Hcal conditions from LDMX.Hcal import digi, hcal_hardcoded_conditions # Set the output file name -p.output_files = ['hcal_digi_pipeline_test.root'] +p.output_files = ["hcal_digi_pipeline_test.root"] # The the histogram file name -p.histogram_file = 'hcal_digi_pipeline_test_histo.root' +p.histogram_file = "hcal_digi_pipeline_test_histo.root" # Geometry provider import LDMX.Hcal.hcal_geometry @@ -24,17 +23,18 @@ # HCal digi hcal_digis = digi.HcalDigiProducer() -hcal_digis.input_coll_name = 'HcalFakeSimHits' +hcal_digis.input_coll_name = "HcalFakeSimHits" # Turn off noise hits hcal_digis.hgcroc.noise = False hcal_rec = digi.HcalRecProducer() -hcal_rec.sim_hit_coll_name = 'HcalFakeSimHits' +hcal_rec.sim_hit_coll_name = "HcalFakeSimHits" p.sequence = [ - ldmxcfg.make_processor('fakeSimHits','hcal::test::HcalFakeSimHits','Hcal'), + ldmxcfg.make_processor("fakeSimHits", "hcal::test::HcalFakeSimHits", "Hcal"), hcal_digis, digi.HcalRecProducer(), - ldmxcfg.make_processor('checkHcalHits','hcal::test::HcalCheckReconstruction','Hcal'), + ldmxcfg.make_processor( + "checkHcalHits", "hcal::test::HcalCheckReconstruction", "Hcal" + ), ] - diff --git a/Packing/python/rawio.py b/Packing/python/rawio.py index 4e4653dce..a5018870b 100644 --- a/Packing/python/rawio.py +++ b/Packing/python/rawio.py @@ -48,13 +48,15 @@ class RawIO(Processor): @staticmethod def source(file_name): - return RawIO(raw_file=RawDataFile.source(file_name), - instance_name=f'IO_{file_name}') + return RawIO( + raw_file=RawDataFile.source(file_name), instance_name=f"IO_{file_name}" + ) @staticmethod def destination(file_name): - return RawIO(raw_file=RawDataFile.destination(file_name), - instance_name=f'IO_{file_name}') + return RawIO( + raw_file=RawDataFile.destination(file_name), instance_name=f"IO_{file_name}" + ) @processor("packing::SingleSubsystemUnpacker", "Packing") diff --git a/Recon/python/dictionary.py b/Recon/python/dictionary.py index b30469a87..7a41de935 100644 --- a/Recon/python/dictionary.py +++ b/Recon/python/dictionary.py @@ -12,4 +12,4 @@ import ROOT -ROOT.gSystem.Load( '@CMAKE_INSTALL_PREFIX@/lib/libRecon.so' ) +ROOT.gSystem.Load("@CMAKE_INSTALL_PREFIX@/lib/libRecon.so") diff --git a/Recon/python/fiducial_flag.py b/Recon/python/fiducial_flag.py index 175281d58..a6c2368a6 100644 --- a/Recon/python/fiducial_flag.py +++ b/Recon/python/fiducial_flag.py @@ -24,7 +24,6 @@ @processor("recon::RecoilFiducialityProcessor", "Recon") class RecoilFiducialityProcessor(Processor): - min_p_mag: float = 50.0 min_tracker_hits: int = 5 input_pass_name: str = "" diff --git a/SimCore/python/fcp_physics.py b/SimCore/python/fcp_physics.py index 9b6396262..4ddc3d961 100644 --- a/SimCore/python/fcp_physics.py +++ b/SimCore/python/fcp_physics.py @@ -4,6 +4,7 @@ gamma -> fcp+ fcp- conversion on SM photons. """ + class FCPPhysics: """Parameters for the FCP physics constructor @@ -21,8 +22,8 @@ class FCPPhysics: def __init__(self): self.enable = False - self.fcp_mass = 0. # MeV - self.fcp_charge = 0.1 # units of e + self.fcp_mass = 0.0 # MeV + self.fcp_charge = 0.1 # units of e self.fcp_pdg_id = 17 def activate(self, fcp_mass, fcp_charge=0.1): diff --git a/SimCore/python/photonuclear_models.py b/SimCore/python/photonuclear_models.py index 244295410..249f9f2a2 100644 --- a/SimCore/python/photonuclear_models.py +++ b/SimCore/python/photonuclear_models.py @@ -191,9 +191,7 @@ class NoPhotoNuclearModel(PhotoNuclearModel): pass -@photo_nuclear_model( - "simcore::bertini::BertiniWithHistoryModel", "SimCore_Bertini" -) +@photo_nuclear_model("simcore::bertini::BertiniWithHistoryModel", "SimCore_Bertini") class BertiniWithHistoryModel(PhotoNuclearModel): """Bertini cascade with internal history recording. diff --git a/SimCore/test/config_fcp.py b/SimCore/test/config_fcp.py index af9a3fdcf..45cc29850 100644 --- a/SimCore/test/config_fcp.py +++ b/SimCore/test/config_fcp.py @@ -43,7 +43,7 @@ p.max_events = 10 # int(os.environ['LDMX_NUM_EVENTS']) -p.run = 1 #int(os.environ["LDMX_RUN_NUMBER"]) +p.run = 1 # int(os.environ["LDMX_RUN_NUMBER"]) p.histogram_file = "hist.root" p.output_files = ["events.root"] diff --git a/Tools/python/hgcroc_emulator.py b/Tools/python/hgcroc_emulator.py index ef4f54b25..3de70d0df 100644 --- a/Tools/python/hgcroc_emulator.py +++ b/Tools/python/hgcroc_emulator.py @@ -4,7 +4,7 @@ @parameter_set -class HgcrocEmulator : +class HgcrocEmulator: """Configuration for HGCROC Emulator The parameters in this configuration class @@ -42,9 +42,8 @@ class HgcrocEmulator : rate_dn_slope: float = 0.140068 time_dn_slope: float = 87.7649 time_peak: float = 77.732 - clock_cycle: float = 25.0 #ns - timing_jitter: float = 25.0 / 100. #ns - pretty arbitrarily chosen + clock_cycle: float = 25.0 # ns + timing_jitter: float = 25.0 / 100.0 # ns - pretty arbitrarily chosen n_adcs: int = 10 i_soi: int = 2 noise: bool = True - diff --git a/Tracking/exampleConfigs/reco.py b/Tracking/exampleConfigs/reco.py index 9c44e5a7e..47e15dcb6 100644 --- a/Tracking/exampleConfigs/reco.py +++ b/Tracking/exampleConfigs/reco.py @@ -50,7 +50,7 @@ p.output_files = ["test_8gev_electrons_withTracking.root"] # lower log level so 'info' and above messages can be printed -#p.term_log_level = 1 +# p.term_log_level = 1 # Number of events p.max_events = n_evts diff --git a/Tracking/python/dqm.py b/Tracking/python/dqm.py index 009ba6773..5cdf3ffa9 100644 --- a/Tracking/python/dqm.py +++ b/Tracking/python/dqm.py @@ -428,12 +428,16 @@ def __post_init__(self): self.histogram( f"unbiased_res_u_l{i}", f"Unbiased U residual layer {i} (mm)", - 200, -0.3, 0.3, + 200, + -0.3, + 0.3, ) self.histogram( f"unbiased_pull_u_l{i}", f"Unbiased U pull layer {i}", - 100, -5.0, 5.0, + 100, + -5.0, + 5.0, ) if self.do_truth: @@ -706,7 +710,6 @@ def __post_init__(self): ) - @processor("tracking::dqm::DigiDQM", "Tracking") class DigiDQM(Processor): """DQM for silicon-strip digitization and clustering. @@ -750,6 +753,7 @@ def __post_init__(self): f"sim_cluster_du_s{s}", "Sim U #minus Cluster U (mm)", 100, -0.1, 0.1 ) + @processor("tracking::dqm::StraightTracksDQM", "Tracking") class StraightTracksDQM(Processor): """DQM analyzer for straight tracks. diff --git a/Tracking/python/full_tracking_sequence.py b/Tracking/python/full_tracking_sequence.py index 132fde89e..c15281e81 100644 --- a/Tracking/python/full_tracking_sequence.py +++ b/Tracking/python/full_tracking_sequence.py @@ -220,9 +220,12 @@ def tagged(name): tagger_meas_collection = cluster_tagger.out_collection recoil_meas_collection = cluster_recoil.out_collection digi_sequence = [ - digi_tagger, digi_recoil, - fit_tagger, fit_recoil, - cluster_tagger, cluster_recoil, + digi_tagger, + digi_recoil, + fit_tagger, + fit_recoil, + cluster_tagger, + cluster_recoil, ] charge_digi_processors = { "fit_tagger": fit_tagger, @@ -537,8 +540,9 @@ def recoil_sequence( full.dqm_digi_recoil, ] - processors = {k: v for k, v in vars(full).items() - if k not in ("sequence", "dqm_sequence")} + processors = { + k: v for k, v in vars(full).items() if k not in ("sequence", "dqm_sequence") + } return TrackingSequence(sequence, dqm_sequence, **processors) @@ -594,8 +598,9 @@ def tagger_sequence( full.dqm_digi_tagger, ] - processors = {k: v for k, v in vars(full).items() - if k not in ("sequence", "dqm_sequence")} + processors = { + k: v for k, v in vars(full).items() if k not in ("sequence", "dqm_sequence") + } return TrackingSequence(sequence, dqm_sequence, **processors) diff --git a/Tracking/python/rawdecoder.py b/Tracking/python/rawdecoder.py index 773a720d1..b21580a8c 100644 --- a/Tracking/python/rawdecoder.py +++ b/Tracking/python/rawdecoder.py @@ -16,9 +16,9 @@ class RawTrackerDecoder(Producer): ADC samples per hit (always 3 for APV25). """ - def __init__(self, name='raw_tracker_decoder'): - super().__init__(name, 'tracking::reco::RawTrackerDecoder', 'Tracking') - self.input_collection = 'TrackerRawData' - self.input_pass_name = '' - self.output_collection = 'RawSiStripHits' - self.n_samples = 3 + def __init__(self, name="raw_tracker_decoder"): + super().__init__(name, "tracking::reco::RawTrackerDecoder", "Tracking") + self.input_collection = "TrackerRawData" + self.input_pass_name = "" + self.output_collection = "RawSiStripHits" + self.n_samples = 3 diff --git a/Tracking/python/tracking.py b/Tracking/python/tracking.py index b902172ad..0afce8608 100644 --- a/Tracking/python/tracking.py +++ b/Tracking/python/tracking.py @@ -473,6 +473,7 @@ class TrackerVetoProcessor(Processor): sim_particles_passname: str = "" input_collection_events_passname: str = "" + @processor("tracking::reco::StripFitProcessor", "Tracking") class StripFitProcessor(Processor): """Fits a pulse shape to each RawSiStripHit to extract amplitude and time. @@ -499,9 +500,9 @@ class StripFitProcessor(Processor): If > 0, discard fits with chi2/ndf above this value (default -1 = off). """ - in_collection: str = 'SimSiStripHits' - in_pass: str = '' - out_collection: str = 'FittedSiStripHits' + in_collection: str = "SimSiStripHits" + in_pass: str = "" + out_collection: str = "FittedSiStripHits" t_scan_min_ns: float = -50.0 t_scan_max_ns: float = 150.0 t_scan_step_ns: float = 1.0 @@ -594,9 +595,9 @@ class StripClusterProcessor(Processor): Max chi2/ndf for a fitted hit to be used; <= 0 disables (default -1). """ - in_collection: str = 'FittedSiStripHits' - in_pass: str = '' - out_collection: str = 'StripMeasurements' + in_collection: str = "FittedSiStripHits" + in_pass: str = "" + out_collection: str = "StripMeasurements" seed_threshold: float = 4.0 neighbor_threshold: float = 3.0 cluster_threshold: float = 4.0 @@ -604,4 +605,3 @@ class StripClusterProcessor(Processor): time_window_ns: float = -1.0 neighbor_delta_t_ns: float = -1.0 max_chi2_ndf: float = -1.0 - diff --git a/TrigScint/exampleConfigs/runTSvert.py b/TrigScint/exampleConfigs/runTSvert.py index be92bd3f2..cb116d71b 100644 --- a/TrigScint/exampleConfigs/runTSvert.py +++ b/TrigScint/exampleConfigs/runTSvert.py @@ -1,29 +1,29 @@ -#Ricardo,05-26 +# Ricardo,05-26 from LDMX.Framework import ldmxcfg -p = ldmxcfg.Process('test') +p = ldmxcfg.Process("test") from LDMX.SimCore import simulator as sim -my_sim = sim.Simulator( "my_sim" ) -det = 'ldmx-vertTS-v14-8gev' -my_sim.set_detector(det, include_scoring_planes_minimal = True ) +my_sim = sim.Simulator("my_sim") +det = "ldmx-vertTS-v14-8gev" +my_sim.set_detector(det, include_scoring_planes_minimal=True) from LDMX.SimCore import generators as gen -my_sim.generators.append( gen.single_8gev_e_upstream_tagger() ) -my_sim.description = 'Basic test Simulation' +my_sim.generators.append(gen.single_8gev_e_upstream_tagger()) +my_sim.description = "Basic test Simulation" -p.sequence = [ my_sim ] +p.sequence = [my_sim] import os import sys p.run = int(sys.argv[1]) p.max_events = int(sys.argv[2]) -p.output_files = ['events.root'] +p.output_files = ["events.root"] -p.histogram_file = 'hist.root' +p.histogram_file = "hist.root" # Load the full tracking sequence import LDMX.Ecal.digi as ecal_digi @@ -41,27 +41,27 @@ # Load the TS modules from LDMX.TrigScint.trig_scint import ( - TrigScintClusterProducer, - TrigScintDigiProducer, - trig_scint_track + TrigScintClusterProducer, + TrigScintDigiProducer, + trig_scint_track, ) ts_digis = [ - TrigScintDigiProducer.pad1(), - TrigScintDigiProducer.pad2(), - TrigScintDigiProducer.pad3(), - ] + TrigScintDigiProducer.pad1(), + TrigScintDigiProducer.pad2(), + TrigScintDigiProducer.pad3(), +] ts_clusters = [ - TrigScintClusterProducer.pad1(), - TrigScintClusterProducer.pad2(), - TrigScintClusterProducer.pad3(), - ] - -trig_scint_track.delta_vert_max=1. #0 or 1 -#0 creates tracks with the same centroid -#1 allows for tracks with a deviation in the last pad + TrigScintClusterProducer.pad1(), + TrigScintClusterProducer.pad2(), + TrigScintClusterProducer.pad3(), +] + +trig_scint_track.delta_vert_max = 1.0 # 0 or 1 +# 0 creates tracks with the same centroid +# 1 allows for tracks with a deviation in the last pad # one centroid to the left or to the right # In order to run this geometry, one have @@ -78,7 +78,6 @@ from LDMX.Recon.electron_counter import ElectronCounter - count = ElectronCounter( simulated_electron_number=1, instance_name="ElectronCounter", @@ -87,9 +86,11 @@ p.logger.term_level = 0 -p.sequence.extend([ +p.sequence.extend( + [ *ts_digis, *ts_clusters, trig_scint_track, count, - ]) + ] +) diff --git a/TrigScint/python/trig_scint.py b/TrigScint/python/trig_scint.py index a5b5ed7bb..30fd222f0 100644 --- a/TrigScint/python/trig_scint.py +++ b/TrigScint/python/trig_scint.py @@ -371,9 +371,10 @@ def target(**kwargs): @processor("trigscint::TrigScintTrackProducer", "TrigScint") class TrigScintTrackProducer(Processor): """Configuration for track producer for Trigger Scintillators""" - horizontal_bar_length: float = 30. + + horizontal_bar_length: float = 30.0 delta_max: float = 0.75 - delta_vert_max: float = 0. + delta_vert_max: float = 0.0 tracking_threshold: float = 0.0 seeding_collection: str = "TriggerPad1Clusters" further_input_collections: list[str] = [ diff --git a/TrigScint/util/writeChannelMap.py b/TrigScint/util/writeChannelMap.py index 85c1e487b..13014360c 100644 --- a/TrigScint/util/writeChannelMap.py +++ b/TrigScint/util/writeChannelMap.py @@ -2,66 +2,65 @@ # define numbers and names we will use -n_lanes=14 -n_chan=6 -n_modules=4 -map_file_name=f"../data/channelMap_{n_modules}modules_{n_lanes}lanes.txt" +n_lanes = 14 +n_chan = 6 +n_modules = 4 +map_file_name = f"../data/channelMap_{n_modules}modules_{n_lanes}lanes.txt" # start calculating useful stuff -#n_chan_total=n_lanes*n_chan +# n_chan_total=n_lanes*n_chan # two lanes are for LYSO. discard those. knowing that there are # three TS modules (pads), get the number of bars per TS module -n_bars_per_module=(n_lanes-2)*n_chan/3 +n_bars_per_module = (n_lanes - 2) * n_chan / 3 -BAR_NUMBERS = np.array([ - [10, 0, 8, 6, 4, 2], # Lane 0 - [3, 11, 9, 5, 7, 1], - [22, 12, 20, 18, 16, 14], - [15, 23, 21, 17, 19, 13], - - [10, 0, 8, 6, 4, 2], # Lane 4 - [3, 11, 9, 5, 7, 1], - [22, 12, 20, 18, 16, 14], - [15, 23, 21, 17, 19, 13], - - [10, 0, 8, 6, 4, 2], # Lane 8 - [3, 11, 9, 5, 7, 1], - [22, 12, 20, 18, 16, 14], - [15, 23, 21, 17, 19, 13], - - [9, 7, 11, 3, 1, 5], # Lane 12 - [15, 23, 21, 17, 19, 13] -]) +BAR_NUMBERS = np.array( + [ + [10, 0, 8, 6, 4, 2], # Lane 0 + [3, 11, 9, 5, 7, 1], + [22, 12, 20, 18, 16, 14], + [15, 23, 21, 17, 19, 13], + [10, 0, 8, 6, 4, 2], # Lane 4 + [3, 11, 9, 5, 7, 1], + [22, 12, 20, 18, 16, 14], + [15, 23, 21, 17, 19, 13], + [10, 0, 8, 6, 4, 2], # Lane 8 + [3, 11, 9, 5, 7, 1], + [22, 12, 20, 18, 16, 14], + [15, 23, 21, 17, 19, 13], + [9, 7, 11, 3, 1, 5], # Lane 12 + [15, 23, 21, 17, 19, 13], + ] +) # make an explicit mapping of lanes to physical modules. # this code supports a chaotic cabling, as reality may dictate. # incidentally, in ESA tests, cabled in order! -lane_to_module_map = [ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3] +lane_to_module_map = [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3] -#n_elec_ids = n_lanes*n_chan +# n_elec_ids = n_lanes*n_chan # open the file with open(map_file_name, "w", encoding="utf-8") as f: # create the elec_id from lane, module and chanNb - bar_counter=[0]*n_modules - for lane in range(n_lanes) : + bar_counter = [0] * n_modules + for lane in range(n_lanes): module = lane_to_module_map[lane] print(f"At lane {lane}, module {module}") - for i_c in range(n_chan) : - #print(f"At channel {i_c}, bar_counter {bar_counter}") - elec_id = 100*lane+10*module+i_c + for i_c in range(n_chan): + # print(f"At channel {i_c}, bar_counter {bar_counter}") + elec_id = 100 * lane + 10 * module + i_c bar_id = BAR_NUMBERS[lane][i_c] - #print(f"-- elec_id={elec_id}, bar_id {bar_id}") + # print(f"-- elec_id={elec_id}, bar_id {bar_id}") f.write(f"{elec_id}\t{bar_id}\n") # highlight when we reach the number of bars - bar_counter[module]+=1 - if bar_counter[module] == n_bars_per_module : + bar_counter[module] += 1 + if bar_counter[module] == n_bars_per_module: print(f"\t--- hitting end of module {module}") f.close() -module_map_file_name=map_file_name.replace("channel", "module") +module_map_file_name = map_file_name.replace("channel", "module") with open(module_map_file_name, "w", encoding="utf-8") as f: - for i_l in range(n_lanes) : + for i_l in range(n_lanes): f.write(f"{i_l}\t{lane_to_module_map[i_l]}\n") f.close() diff --git a/TrigScint/util/writeToyChannelMap.py b/TrigScint/util/writeToyChannelMap.py index 2f489bd34..7a6bd57cd 100644 --- a/TrigScint/util/writeToyChannelMap.py +++ b/TrigScint/util/writeToyChannelMap.py @@ -2,16 +2,16 @@ # define numbers and names we will use -n_lanes=14 -n_chan=6 -n_modules=4 -map_file_name=f"../data/toyChannelMap_{n_modules}modules_{n_lanes}lanes.txt" +n_lanes = 14 +n_chan = 6 +n_modules = 4 +map_file_name = f"../data/toyChannelMap_{n_modules}modules_{n_lanes}lanes.txt" # start calculating useful stuff -n_chan_total=n_lanes*n_chan +n_chan_total = n_lanes * n_chan # two lanes are for LYSO. discard those. knowing that there are # three TS modules (pads), get the number of bars per TS module -n_bars_per_module=(n_lanes-2)*n_chan/3 +n_bars_per_module = (n_lanes - 2) * n_chan / 3 # note that we are not treating LYSO differently here even though # it has fewer instrumented bars -- not making sure we get @@ -19,45 +19,45 @@ # if one wanted to, here's a place to start # nChanInLYSO=2*n_chan -#make a sorted list of possible bar IDs -bar_ids= list(range(int(n_bars_per_module))) -print(f'Made bar_id list {bar_ids}') +# make a sorted list of possible bar IDs +bar_ids = list(range(int(n_bars_per_module))) +print(f"Made bar_id list {bar_ids}") -map_list = [None]*n_modules -for i in range(n_modules) : +map_list = [None] * n_modules +for i in range(n_modules): # this shuffles the original array but that's fine, we only # want four different versions - new_order=np.random.permutation(bar_ids) + new_order = np.random.permutation(bar_ids) map_list[i] = new_order print(f"module {i}: {map_list[i]}") # make up some mapping of lanes to physical modules -lane_to_module_map = [ 0, 2, 1, 2, 0, 1, 0, 2, 2, 1, 1, 0, 3, 3] +lane_to_module_map = [0, 2, 1, 2, 0, 1, 0, 2, 2, 1, 1, 0, 3, 3] -n_elec_ids = n_lanes*n_chan +n_elec_ids = n_lanes * n_chan # open the file with open(map_file_name, "w", encoding="utf-8") as f: # create the elec_id from lane, module and chanNb - bar_counter=[0]*n_modules - for i_l in range(n_lanes) : + bar_counter = [0] * n_modules + for i_l in range(n_lanes): lane = i_l module = lane_to_module_map[lane] print(f"At lane {lane}, module {module}") - for i_c in range(n_chan) : - #print(f"At channel {i_c}, bar_counter {bar_counter}") - elec_id = 100*lane+10*module+i_c + for i_c in range(n_chan): + # print(f"At channel {i_c}, bar_counter {bar_counter}") + elec_id = 100 * lane + 10 * module + i_c bar_id = map_list[module][bar_counter[module]] - #print(f"-- elec_id={elec_id}, bar_id {bar_id}") + # print(f"-- elec_id={elec_id}, bar_id {bar_id}") f.write(f"{elec_id}\t{bar_id}\n") # highlight when we reach the number of bars - bar_counter[module]+=1 - if bar_counter[module] == n_bars_per_module : + bar_counter[module] += 1 + if bar_counter[module] == n_bars_per_module: print(f"\t--- hitting end of module {module}") f.close() -module_map_file_name=map_file_name.replace("Channel", "Module") +module_map_file_name = map_file_name.replace("Channel", "Module") with open(module_map_file_name, "w", encoding="utf-8") as f: - for i_l in range(n_lanes) : + for i_l in range(n_lanes): f.write(f"{i_l}\t{lane_to_module_map[i_l]}\n") f.close() diff --git a/Trigger/Algo/python/dump_file_writer.py b/Trigger/Algo/python/dump_file_writer.py index c901dc3f1..deaabbd33 100644 --- a/Trigger/Algo/python/dump_file_writer.py +++ b/Trigger/Algo/python/dump_file_writer.py @@ -1,4 +1,3 @@ - from LDMX.Framework import Processor, processor diff --git a/Trigger/Algo/python/trigger_energy_sums.py b/Trigger/Algo/python/trigger_energy_sums.py index 770a614a6..7f40acf8d 100644 --- a/Trigger/Algo/python/trigger_energy_sums.py +++ b/Trigger/Algo/python/trigger_energy_sums.py @@ -122,4 +122,3 @@ class PropagationMapWriter(Processor): target_scoring_plane_passname: str = "" target_sp_hits_events_passname: str = "" ecal_sp_hits_events_passname: str = "" - diff --git a/docs/sphinx.conf/conf.py b/docs/sphinx.conf/conf.py index e819641d4..e5f1268ee 100644 --- a/docs/sphinx.conf/conf.py +++ b/docs/sphinx.conf/conf.py @@ -14,20 +14,20 @@ import sys -sys.path.insert(0, os.path.abspath('../../install/python/')) +sys.path.insert(0, os.path.abspath("../../install/python/")) # -- Project information ----------------------------------------------------- -project = 'ldmx-sw' -copyright = 'LDMX Collaboration' -author = 'LDMX Collaboration' +project = "ldmx-sw" +copyright = "LDMX Collaboration" +author = "LDMX Collaboration" # the tag next to the package name at in the header # the GitHub action for building the docs overrides this setting # with the git tag that trigger the doc build so this value is # only used if the docs are built locally -release = 'local' +release = "local" # -- General configuration --------------------------------------------------- @@ -35,17 +35,17 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', # generate docs from docstrings - 'sphinx.ext.napoleon' # support for NumPy-style docstrings - ] + "sphinx.ext.autodoc", # generate docs from docstrings + "sphinx.ext.napoleon", # support for NumPy-style docstrings +] # Add any paths that contain templates here, relative to this directory. -#templates_path = ['_templates'] +# templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. -#exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +# exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # put at the beginning of each rst file rst_prolog = """ @@ -58,9 +58,9 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'bizstyle' +html_theme = "bizstyle" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] +# html_static_path = ['_static'] From 3d624f23a34e82d1788acf2182a5c71214203ed9 Mon Sep 17 00:00:00 2001 From: Duncan Wilmot Date: Wed, 2 Sep 2026 11:48:28 -0500 Subject: [PATCH 4/5] Add symlinks and diff files for v16 detector gdmls --- .../data/ldmx-det-v16-8gev/constants_diff.txt | 74 + .../data/ldmx-det-v16-8gev/detector_diff.txt | 32 + Detectors/data/ldmx-det-v16-8gev/ecal.gdml | 963 +- .../ecal_motherboard5_assembly.gdml | 289 +- .../ecal_motherboard6_assembly.gdml | 375 +- .../ldmx-det-v16-8gev/ecal_support_box.gdml | 1494 +-- Detectors/data/ldmx-det-v16-8gev/hcal.gdml | 353 +- Detectors/data/ldmx-det-v16-8gev/magnet.gdml | 10329 +--------------- .../ldmx-det-v16-8gev/makeTSassemblyfiles.py | 240 +- .../data/ldmx-det-v16-8gev/recoil_diff.txt | 56 + .../ldmx-det-v16-8gev/scoring_planes.gdml | 355 +- .../data/ldmx-det-v16-8gev/tagger_diff.txt | 0 Detectors/data/ldmx-det-v16-8gev/target.gdml | 63 +- .../ldmx-det-v16-8gev/tspad1_assembly.gdml | 171 +- .../ldmx-det-v16-8gev/tspad2_assembly.gdml | 171 +- .../ldmx-det-v16-8gev/tspad3_assembly.gdml | 171 +- 16 files changed, 174 insertions(+), 14962 deletions(-) create mode 100644 Detectors/data/ldmx-det-v16-8gev/constants_diff.txt create mode 100644 Detectors/data/ldmx-det-v16-8gev/detector_diff.txt mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/ecal.gdml mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/hcal.gdml mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/magnet.gdml mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py create mode 100644 Detectors/data/ldmx-det-v16-8gev/recoil_diff.txt mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml create mode 100644 Detectors/data/ldmx-det-v16-8gev/tagger_diff.txt mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/target.gdml mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml diff --git a/Detectors/data/ldmx-det-v16-8gev/constants_diff.txt b/Detectors/data/ldmx-det-v16-8gev/constants_diff.txt new file mode 100644 index 000000000..d558a7761 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/constants_diff.txt @@ -0,0 +1,74 @@ +--- ldmx-det-v15-8gev/constants.gdml 2026-07-07 10:30:03.143885411 -0500 ++++ ldmx-det-v16-8gev/constants.gdml 2026-07-07 13:59:44.647896263 -0500 +@@ -105,18 +105,19 @@ + + + +- ++ + +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ + + ++ + +- +- ++ ++ + + + +@@ -158,7 +163,7 @@ + + + + + ++ value="-11.5 -tagger_envelope_dz -trig_scint_area_envelope_z/2 - clearance - 200" /> + diff --git a/Detectors/data/ldmx-det-v16-8gev/detector_diff.txt b/Detectors/data/ldmx-det-v16-8gev/detector_diff.txt new file mode 100644 index 000000000..109fdc1de --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/detector_diff.txt @@ -0,0 +1,32 @@ +--- ldmx-det-v15-8gev/detector.gdml 2026-07-07 10:30:03.144434844 -0500 ++++ ldmx-det-v16-8gev/detector.gdml 2026-07-15 16:10:32.975787237 -0500 +@@ -14,11 +14,11 @@ + + +- +- ++ ++ + + + +@@ -110,10 +110,10 @@ + + + +- +- ++ ++ + ++ auxvalue="The 2025 Design Report Geometry."/> + + + diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal.gdml deleted file mode 100644 index b4e05a421..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/ecal.gdml +++ /dev/null @@ -1,962 +0,0 @@ - - -]> - - - - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal.gdml new file mode 120000 index 000000000..6b3c80682 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/ecal.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/ecal.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml deleted file mode 100644 index 98d23328c..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml new file mode 120000 index 000000000..76f601e31 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard5_assembly.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/ecal_motherboard5_assembly.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml deleted file mode 100644 index 82a51906a..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml new file mode 120000 index 000000000..a477507c7 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/ecal_motherboard6_assembly.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/ecal_motherboard6_assembly.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml deleted file mode 100644 index 15a4dc7b8..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml +++ /dev/null @@ -1,1493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml b/Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml new file mode 120000 index 000000000..ad9cccc31 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/ecal_support_box.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/ecal_support_box.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/hcal.gdml b/Detectors/data/ldmx-det-v16-8gev/hcal.gdml deleted file mode 100644 index 7f83df27c..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/hcal.gdml +++ /dev/null @@ -1,352 +0,0 @@ - - -]> - - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/hcal.gdml b/Detectors/data/ldmx-det-v16-8gev/hcal.gdml new file mode 120000 index 000000000..cd80f111e --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/hcal.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/hcal.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/magnet.gdml b/Detectors/data/ldmx-det-v16-8gev/magnet.gdml deleted file mode 100644 index bab3ea5a4..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/magnet.gdml +++ /dev/null @@ -1,10328 +0,0 @@ - - -]> - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/magnet.gdml b/Detectors/data/ldmx-det-v16-8gev/magnet.gdml new file mode 120000 index 000000000..87c7ae379 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/magnet.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/magnet.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py b/Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py deleted file mode 100644 index a0b811130..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py +++ /dev/null @@ -1,239 +0,0 @@ -import os -import sys - - -abspath = os.path.abspath(__file__) -dname = os.path.dirname(abspath) -os.chdir(dname) - -""" - -Author: CJ Barton / Lund University group -Added to ldmx-sw Feb 2026 -Github PR 1888 -Github issues 1760 & 1761 - -Script which automatically generates GDML files for the TS pads and their -associated instruments. Currently, 'associated instruments' are the SiPMs and -the light pipes. - -This script exists because of an incompatibility between the ldmx-sw design -and Geant4/GDML. - -In ldmx-sw, although the geometries are identical for the TS pads, the 3 TS -pads in the baseline are considered distinct entities (TSPad1, TSPad2, TSPad3). -These entities have their own hit collections, processors etc. and are -hard-coded with distinct names in sensitive_detectors.py. -The geometry implementation is done in 3 loops across 2 files (trig_scint.gdml -for TSPad1/2 and target.gdml for TSPad3). This means that any time a change -needs to be made to the dimensions or components of the TSPads, it must be -changed 3 times. - -Originally, this was envisioned as solvable by the object in GDML. -However, assemblies are intended to only define physical volume configurations, -and don't account for things like material etc. naturally. In addition, they -aren't intended to have their own envelopes. For these reasons, a 'module' -approach is taken instead, much like in detector.gdml. There's no problem with -having nested modules, so long as the nested module is contained entirely -within the parent. - -This script is a compromise, to collect all of the parameters relevant to the -TSPads in one location while maintaining the distinct definitions for the -logical volumes in each pad. Three submodules will be generated, which are -then imported into their respective modules. - -It should be noted that this script is only concerned with differentiating -TSPads+instruments. External factors, like where to place them in the world or -the definitions of the materials, should still be defined elsewhere, for -example in the constants.gdml or materials.gdml files. -""" - -# Material variable names (material definitions should be found in materials.gdml) -scintillator_mat = "Polyvinyltoluene" -lightpipe_mat = "AcrylicPMMA" -sipm_mat = "Silicon" - -# To streamline TargetDarkBremFilter.cxx, TSPad3 and its components are -# considered part of the 'target' G4Region, whereas TSPad1/2 are in the -#'trig_scint' region. -region_name = ["trig_scint", "trig_scint", "target"] - -for i in range(3): - # Variables that must change between iterations - filename = f"tspad{i + 1}_assembly.gdml" - scintillator_lvname = f"trigger_pad{i + 1}_bar_volume" - lightpipe_lvname = f"tspad{i + 1}_lightpipe_volume" - sipm_lvname = f"tspad{i + 1}_sipm_volume" - - with open(filename, "w") as f: - f.write(f''' - -]> - - - - - - - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -''') diff --git a/Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py b/Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py new file mode 120000 index 000000000..515c68050 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/makeTSassemblyfiles.py @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/makeTSassemblyfiles.py \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/recoil_diff.txt b/Detectors/data/ldmx-det-v16-8gev/recoil_diff.txt new file mode 100644 index 000000000..4f4b0d298 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/recoil_diff.txt @@ -0,0 +1,56 @@ +--- ldmx-det-v15-8gev/recoil.gdml 2026-07-07 10:30:03.144434844 -0500 ++++ ldmx-det-v16-8gev/recoil.gdml 2026-07-07 14:32:01.552426909 -0500 +@@ -48,16 +48,25 @@ + recoil_l6_mid_z-recoil_l56_sensor_sep + recoil_l6_mid_z+recoil_l56_sensor_sep" /> + +- ++ ++ + + ++ x="si_active_sensor_dx" y="si_active_sensor_dy" z="si_sensor_thickness"/> + ++ x="si_sensor_dx" y="si_sensor_dy" z="si_sensor_thickness"/> + ++ x="si_active_sensor_dx" y="si_active_sensor_dy" z="si_sensor_thickness"/> + ++ x="si_sensor_dx" y="si_sensor_dy" z="si_sensor_thickness"/> + + diff --git a/Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml b/Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml deleted file mode 100644 index 160ff92cf..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml +++ /dev/null @@ -1,354 +0,0 @@ - - -]> - - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml b/Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml new file mode 120000 index 000000000..13b8d3b4c --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/scoring_planes.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/scoring_planes.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/tagger_diff.txt b/Detectors/data/ldmx-det-v16-8gev/tagger_diff.txt new file mode 100644 index 000000000..e69de29bb diff --git a/Detectors/data/ldmx-det-v16-8gev/target.gdml b/Detectors/data/ldmx-det-v16-8gev/target.gdml deleted file mode 100644 index 01157d7e9..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/target.gdml +++ /dev/null @@ -1,62 +0,0 @@ - - -]> - - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/target.gdml b/Detectors/data/ldmx-det-v16-8gev/target.gdml new file mode 120000 index 000000000..1159dedb6 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/target.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/target.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml deleted file mode 100644 index ef04b8b1d..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml +++ /dev/null @@ -1,170 +0,0 @@ - - -]> - - - - - - - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml new file mode 120000 index 000000000..d6345d5e4 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/tspad1_assembly.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/tspad1_assembly.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml deleted file mode 100644 index 688378820..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml +++ /dev/null @@ -1,170 +0,0 @@ - - -]> - - - - - - - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml new file mode 120000 index 000000000..e8b3624e5 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/tspad2_assembly.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/tspad2_assembly.gdml \ No newline at end of file diff --git a/Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml deleted file mode 100644 index 583ee5a19..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml +++ /dev/null @@ -1,170 +0,0 @@ - - -]> - - - - - - - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml b/Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml new file mode 120000 index 000000000..6c0b9fa40 --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/tspad3_assembly.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/tspad3_assembly.gdml \ No newline at end of file From bf59d64e3529afb618d44493bef71de7003b2664 Mon Sep 17 00:00:00 2001 From: Duncan Wilmot Date: Wed, 2 Sep 2026 13:04:50 -0500 Subject: [PATCH 5/5] Use v16 geom for ecal pn validation --- .github/validation_samples/ecal_pn/config.py | 2 +- .../data/ldmx-det-v16-8gev/trig_scint.gdml | 71 +------------------ 2 files changed, 2 insertions(+), 71 deletions(-) mode change 100644 => 120000 Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml diff --git a/.github/validation_samples/ecal_pn/config.py b/.github/validation_samples/ecal_pn/config.py index f3a7b28b0..c25e24566 100644 --- a/.github/validation_samples/ecal_pn/config.py +++ b/.github/validation_samples/ecal_pn/config.py @@ -10,7 +10,7 @@ from LDMX.SimCore.user_actions import PhotonuclearTracker -det = "ldmx-det-v15-8gev" +det = "ldmx-det-v16-8gev" my_sim = ecal.photo_nuclear(det, gen.single_8gev_e_upstream_tagger()) my_sim.description = "ECal PN Test Simulation" diff --git a/Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml b/Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml deleted file mode 100644 index fb996f726..000000000 --- a/Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml +++ /dev/null @@ -1,70 +0,0 @@ - - -]> - - - - - - - - - - &constants; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml b/Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml new file mode 120000 index 000000000..5c194637c --- /dev/null +++ b/Detectors/data/ldmx-det-v16-8gev/trig_scint.gdml @@ -0,0 +1 @@ +../ldmx-det-v15-8gev/trig_scint.gdml \ No newline at end of file