Skip to content

Conversation

@peter-mckeown
Copy link
Collaborator

@peter-mckeown peter-mckeown commented Jun 3, 2025

(Copied from Original Repo MR! 25
As spotted by Anatolii, there are (rare) edge cases close to a geometrical region excluded from fast sim where secondaries created in a full sim shower can cross the trigger boundary and cause unwanted fast sim triggers inside the calorimeter. This MR proposes a fix for this with two important steps:

  1. Adding a trigger plane to the compact file right at the front of the calorimeter face (and of course adjusting the model.RegionName in scripts/ddsim_steer.py ).
    E.g. for the ECAL Barrel of ILD_l5_o1_v02.xml this would mean creating a local copy of k4geo and modifying SEcal06_hybrid_Barrel.xml accordingly:
diff --git a/ILD/compact/ILD_common_v02/SEcal06_hybrid_Barrel.xml b/ILD/compact/ILD_common_v02/SEcal06_hybrid_Barrel.xml
index 457246d..d66595f 100644
--- a/ILD/compact/ILD_common_v02/SEcal06_hybrid_Barrel.xml
+++ b/ILD/compact/ILD_common_v02/SEcal06_hybrid_Barrel.xml
@@ -5,8 +5,35 @@
     </region>
   </regions>
 
+  <regions>
+    <region name="EcalBarrelFastSimTriggerRegion">
+    </region>
+  </regions>
+
+  <readouts>
+        <readout name="ECalBarrelFaceReadout">
+            <id>system:5,side:2,layer:9,module:8,sensor:8</id>
+        </readout>
+    </readouts>
+
   <detectors>
 
+    <detector name="EcalBarrelFastSimTrigger" type="PolyhedralBarrelSurfaces" region="EcalBarrelFastSimTriggerRegion" readout="ECalBarrelFaceReadout">
+      <comment> EM Calorimeter Fast Sim Trigger Region </comment>
+       
+      <envelope vis="ILD_ECALVis">
+        <shape type="PolyhedraRegular" numsides="Ecal_symmetry"  rmin="Ecal_inner_radius - 3*env_safety" 
+        rmax="Ecal_inner_radius - 2*env_safety" dz="2.*Ecal_half_length + env_safety"  material = "Air" />
+        <rotation x="0*deg" y="0*deg" z="-180*deg/Ecal_symmetry"/>
+      </envelope>
+      
+      <dimensions numsides="Ecal_symmetry" rmin="Ecal_inner_radius - 3*env_safety" 
+      rmax="Ecal_inner_radius - 2*env_safety" zhalf="Ecal_half_length"
+      phi0="-180*deg/Ecal_symmetry" material = "Air" />
+
+  </detector>
+
+
     <detector name="EcalBarrel" type="SEcal06_Barrel" id="ILDDetID_ECAL" readout="EcalBarrelCollection" vis="ILD_BlueVis"
      region="EcalBarrelRegion">
  1. Ensure that backscatter from the calorimeter does not cause model triggers (see changes to src/OctogonalBarrelTrigger.cc)

Validation checks performed so far (with 2025-01-28 key4hep release):

  • particle gun into calo in FastSim region
    position: (0, 0, 0), direction: (0 1 0), particle: gamma, energy: 50 GeV
    Results: Triggers Fast Sim (expected behavior)

  • particle gun inside calo (firing backwards) in FastSim region
    position: (0, 1860, 0), direction: 0 -1 0, particle: gamma, energy: 50 GeV
    Results: Does not trigger Fast Sim (expected behavior)

  • particle gun into calo region excluded from FastSim (corner of barrel)
    position: (0, 0, 0), direction: (-0.4152 1 0), particle: gamma, energy: 50 GeV
    Results: Does not trigger Fast Sim (expected behavior)

@peter-mckeown peter-mckeown requested a review from tmadlener June 3, 2025 09:19
Copy link
Member

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an easy way to check whether this works. Mainly to avoid future regressions?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants