From bf6887425e9fbfbc42f9e65fb8a0d819f7b83252 Mon Sep 17 00:00:00 2001
From: John Chapman <John.Chapman@cern.ch>
Date: Tue, 11 Feb 2025 14:59:10 +0100
Subject: [PATCH] Fix FastCaloSim run as a G4FastSimulationModel

---
 .../G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py
index c5eeadfc83f..b7343fc0423 100644
--- a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py
+++ b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py
@@ -305,6 +305,10 @@ def SimHitContainerListCfg(flags):
             writtenContainers += SimHitContainerListCfg(flags)
     if flags.Detector.GeometryLAr:
         if flags.Sim.LArParameterization is LArParameterization.FastCaloSim:
+            writtenContainers += [("LArHitContainer" , "LArHitHEC_FastCaloSim")]
+            writtenContainers += [("LArHitContainer" , "LArHitFCAL_FastCaloSim")]
+            writtenContainers += [("LArHitContainer" , "LArHitEMEC_FastCaloSim")]
+            writtenContainers += [("LArHitContainer" , "LArHitEMB_FastCaloSim")]
             writtenContainers += [("LArHitContainer", "LArHitEMB_G4")]
             writtenContainers += [("LArHitContainer", "LArHitEMEC_G4")]
             writtenContainers += [("LArHitContainer", "LArHitFCAL_G4")]
@@ -316,6 +320,8 @@ def SimHitContainerListCfg(flags):
             writtenContainers += [("LArHitContainer", "LArHitHEC")]
     if flags.Detector.GeometryTile:
         if flags.Sim.LArParameterization is LArParameterization.FastCaloSim:
+            writtenContainers += [("TileHitVector" , "TileHitVec_FastCaloSim")]
+            writtenContainers += [("TileHitVector" , "MBTSHits_FastCaloSim")]
             writtenContainers += [("TileHitVector", "MBTSHits_G4")]
             writtenContainers += [("TileHitVector", "TileHitVec_G4")]
         else:
@@ -331,7 +337,7 @@ def SimHitContainerListCfg(flags):
     if flags.Detector.EnableSCT:
        writtenContainers += [("SiHitCollection", "SCT_Hits")]
     from SimulationConfig.SimEnums import CalibrationRun
-    if flags.Sim.CalibrationRun in [CalibrationRun.LAr, CalibrationRun.LArTile]:
+    if flags.Sim.CalibrationRun in [CalibrationRun.LAr, CalibrationRun.LArTile, CalibrationRun.LArTileZDC]:
         # Needed to ensure that DeadMaterialCalibrationHitsMerger is scheduled correctly.
         writtenContainers += [
             ( 'CaloCalibrationHitContainer' , 'StoreGateSvc+LArCalibrationHitActive_DEAD' ),
@@ -429,4 +435,4 @@ def EmptySensitiveDetectorMasterToolCfg(name="EmptySensitiveDetectorMasterTool",
     result = ComponentAccumulator()
     tool = result.popToolsAndMerge(CompFactory.SensitiveDetectorMasterTool(name, **kwargs))
     result.setPrivateTools(tool)
-    return result
\ No newline at end of file
+    return result
-- 
GitLab