diff --git a/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDConfig.py b/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDConfig.py index ca581ae91a121233df2eab41367f5bbd8e47472d..c4e84b014481f7aedeccd591dbdbe90500efa5cf 100644 --- a/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDConfig.py +++ b/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr from G4AtlasApps.SimFlags import simFlags @@ -10,9 +10,11 @@ def getBCMSensorSD(name="BCMSensorSD", **kwargs): bare_collection_name = "BCMHits" mergeable_collection_suffix = "_G4" merger_input_property = "BCMHits" + region = "ID" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Pixel::bcmDiamondLog"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.BCMSensorSDTool(name, **kwargs) diff --git a/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDToolConfig.py b/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDToolConfig.py index 5bcf6ddf9b1ff36d94bd59c5ee1a49050b0eb613..4da290d67b23d83d80c134239b2624ae61339fd4 100644 --- a/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDToolConfig.py +++ b/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDToolConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -12,9 +12,12 @@ def BCMSensorSDCfg(ConfigFlags, name="BCMSensorSD", **kwargs): bare_collection_name = "BCMHits" mergeable_collection_suffix = "_G4" merger_input_property = "BCMHits" - acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "ID" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Pixel::bcmDiamondLog"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) diff --git a/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDConfig.py b/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDConfig.py index f4f5488b2ab4da173e8a0f0b3955037d9e426e49..79b99735924da032f1ae26151555c343cda4b824 100644 --- a/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDConfig.py +++ b/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr from G4AtlasApps.SimFlags import simFlags @@ -10,9 +10,11 @@ def getBLMSensorSD(name="BLMSensorSD", **kwargs): bare_collection_name = "BLMHits" mergeable_collection_suffix = "_G4" merger_input_property = "BLMHits" + region = "ID" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Pixel::blmDiamondLog"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.BLMSensorSDTool(name, **kwargs) diff --git a/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDToolConfig.py b/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDToolConfig.py index f816bda346ce349c4496a5332adcba7a0914fc32..f9aa423cde5342a88f890d73ceddcd44a4cd6c36 100644 --- a/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDToolConfig.py +++ b/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDToolConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -8,14 +8,17 @@ BLMSensorSDTool=CompFactory.BLMSensorSDTool def BLMSensorSDCfg(ConfigFlags, name="BLMSensorSD", **kwargs): - + result = ComponentAccumulator() bare_collection_name = "BLMHits" mergeable_collection_suffix = "_G4" merger_input_property = "BLMHits" - acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "ID" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Pixel::blmDiamondLog"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) diff --git a/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDConfig.py b/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDConfig.py index 2348cf5c91cba77749d92c44b581be9b0489f7f7..161d2683335e946429427c6dda5edc3b0fb1ea0f 100644 --- a/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDConfig.py +++ b/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr from G4AtlasApps.SimFlags import simFlags @@ -10,9 +10,11 @@ def getPixelSensorSD(name="PixelSensorSD", **kwargs): bare_collection_name = "PixelHits" mergeable_collection_suffix = "_G4" merger_input_property = "PixelHits" + region = "ID" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Pixel::siBLayLog","Pixel::siLog","Pixel::dbmDiamondLog"]) #kwargs.setdefault("LogicalVolumeNames", ["Pixel::siBLayLog","Pixel::siLog"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) diff --git a/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDToolConfig.py b/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDToolConfig.py index bfe0d3c14a5f7f4d8081a9e00f578d2ced8eb05e..6f7b6b7896155dd96b9ae7f54def567970fc177e 100644 --- a/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDToolConfig.py +++ b/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDToolConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -13,11 +13,13 @@ def PixelSensorSDCfg(ConfigFlags, name="PixelSensorSD", **kwargs): bare_collection_name = "PixelHits" mergeable_collection_suffix = "_G4" merger_input_property = "PixelHits" - acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "ID" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Pixel::siBLayLog","Pixel::siLog","Pixel::dbmDiamondLog"]) - #kwargs.setdefault("LogicalVolumeNames", ["Pixel::siBLayLog","Pixel::siLog"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) result.merge(acc) diff --git a/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDConfig.py b/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDConfig.py index 12e86c04d138a5e61e172bda4fc6591d6125f65b..1055b364626458fd88e2fc7bbc50c05841895b39 100644 --- a/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDConfig.py +++ b/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr from G4AtlasApps.SimFlags import simFlags @@ -10,9 +10,11 @@ def getSctSensorSD(name="SctSensorSD", **kwargs): bare_collection_name = "SCT_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "SCTHits" + region = "ID" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["SCT::BRLSensor","SCT::ECSensor0","SCT::ECSensor1", "SCT::ECSensor2","SCT::ECSensor3"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) diff --git a/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDToolConfig.py b/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDToolConfig.py index d3af78ebff43ee7e34f083a19bcb6b1932e6b67e..e222d82afde4fd0924955e3cf47f126ccfafb624 100644 --- a/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDToolConfig.py +++ b/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDToolConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -14,8 +14,12 @@ def SctSensorSDCfg(ConfigFlags, name="SctSensorSD", **kwargs): bare_collection_name = "SCT_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "SCTHits" - - acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, mergeable_collection_suffix, merger_input_property) + region = "ID" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["SCT::BRLSensor","SCT::ECSensor0","SCT::ECSensor1", "SCT::ECSensor2","SCT::ECSensor3"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) @@ -41,4 +45,3 @@ def SctSensor_CTBCfg(name="SctSensor_CTB", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["SCT::ECSensor0"]) kwargs.setdefault("OutputCollectionNames", ["SCT_Hits"]) return SctSensor_CTBTool(name, **kwargs) - diff --git a/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDConfig.py b/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDConfig.py index d8c4d674ba650585e29eef3982ac1217bae95255..d14cdc5417644177ca2a4002c59c2a0895ce4400 100644 --- a/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDConfig.py +++ b/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr from G4AtlasApps.SimFlags import simFlags @@ -10,9 +10,11 @@ def getTRTSensitiveDetector(name="TRTSensitiveDetector", **kwargs): bare_collection_name = "TRTUncompressedHits" mergeable_collection_suffix = "_G4" merger_input_property = "TRTUncompressedHits" + region = "ID" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) logicalVolumeNames = ["TRT::Gas","TRT::GasMA"] from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as geoFlags if ( geoFlags.Run() in ["RUN2", "RUN3"] ) : diff --git a/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDToolConfig.py b/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDToolConfig.py index 365eada3388cd23f4ed1802ade79154cf7e03020..f641e92c5225e657dca183166af9591768c23551 100644 --- a/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDToolConfig.py +++ b/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDToolConfig.py @@ -1,11 +1,11 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from ISF_Algorithms.collection_merger_helpersNew import CollectionMergerCfg -TRTSensitiveDetectorTool =CompFactory.TRTSensitiveDetectorTool +TRTSensitiveDetectorTool =CompFactory.TRTSensitiveDetectorTool def TRTSensitiveDetectorCfg(ConfigFlags, name="TRTSensitiveDetector", **kwargs): @@ -13,9 +13,12 @@ def TRTSensitiveDetectorCfg(ConfigFlags, name="TRTSensitiveDetector", **kwargs): bare_collection_name = "TRTUncompressedHits" mergeable_collection_suffix = "_G4" merger_input_property = "TRTUncompressedHits" - acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "ID" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) result.merge(acc) logicalVolumeNames = ["TRT::Gas","TRT::GasMA"] diff --git a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py index 3a8e8aa94076239b65a4241a3690c3c6ccc35eb4..428ad2f7398ee187a15209feb4d6c9b2c9fd2a33 100644 --- a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py +++ b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr @@ -127,9 +127,11 @@ def getLArEMBSensitiveDetector(name="LArEMBSensitiveDetector", **kwargs): bare_collection_name = "LArHitEMB" mergeable_collection_suffix = "_G4" merger_input_property = "LArEMBHits" + region = "CALO" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) ## Main configuration kwargs.setdefault("StacVolumes",["LArMgr::LAr::EMB::STAC"]) kwargs.setdefault("PresamplerVolumes",["LArMgr::LAr::Barrel::Presampler::Module"]) @@ -144,9 +146,11 @@ def getLArEMECSensitiveDetector(name="LArEMECSensitiveDetector", **kwargs): bare_collection_name = "LArHitEMEC" mergeable_collection_suffix = "_G4" merger_input_property = "LArEMECHits" + region = "CALO" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) from G4AtlasApps.SimFlags import simFlags if simFlags.SimLayout.get_Value() not in ["tb_LArH6_2002","tb_LArH6EC_2002"]: kwargs.setdefault("NegIWVolumes",["LArMgr::LAr::EMEC::Neg::InnerWheel"]) @@ -167,9 +171,11 @@ def getLArFCALSensitiveDetector(name="LArFCALSensitiveDetector", **kwargs): bare_collection_name = "LArHitFCAL" mergeable_collection_suffix = "_G4" merger_input_property = "LArFCALHits" + region = "CALO" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::Gap"]) kwargs.setdefault("FCAL2Volumes",["LArMgr::LAr::FCAL::Module2::Gap"]) kwargs.setdefault("FCAL3Volumes",["LArMgr::LAr::FCAL::Module3::Gap"]) @@ -184,9 +190,11 @@ def getLArHECSensitiveDetector(name="LArHECSensitiveDetector", **kwargs): bare_collection_name = "LArHitHEC" mergeable_collection_suffix = "_G4" merger_input_property = "LArHECHits" + region = "CALO" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) #kwargs.setdefault("SliceVolumes",["LAr::HEC::Module::Depth::Slice"]) #kwargs.setdefault("LocalVolumes",["LAr::HEC::Module::Depth::Slice::Local"]) kwargs.setdefault("WheelVolumes",["LArMgr::LAr::HEC::Module::Depth::Slice"]) diff --git a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py index 9a32083059e755c63f25388a296284dbd84f1931..9aa1dbdd5fc0035fc1740d03d81906e14f27e6cd 100644 --- a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py +++ b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py @@ -176,9 +176,12 @@ def LArEMBSensitiveDetectorCfg(ConfigFlags,name="LArEMBSensitiveDetector", **kwa bare_collection_name = "LArHitEMB" mergeable_collection_suffix = "_G4" merger_input_property = "LArEMBHits" - acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "CALO" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) result.merge(acc) ## Main configuration @@ -195,7 +198,7 @@ def LArEMBSensitiveDetectorCfg(ConfigFlags,name="LArEMBSensitiveDetector", **kwa result.merge(EMBCalculatorCfg(ConfigFlags)) kwargs.setdefault("EMBCalculator", result.getService("EMBCalculator")) - + result.setPrivateTools( LArG4__EMBSDTool(name, **kwargs) ) return result @@ -204,9 +207,12 @@ def LArEMECSensitiveDetectorCfg(ConfigFlags, name="LArEMECSensitiveDetector", ** bare_collection_name = "LArHitEMEC" mergeable_collection_suffix = "_G4" merger_input_property = "LArEMECHits" - acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "CALO" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) result.merge(acc) if ConfigFlags.GeoModel.AtlasVersion not in ["tb_LArH6_2002","tb_LArH6EC_2002"]: @@ -254,9 +260,12 @@ def LArFCALSensitiveDetectorCfg(ConfigFlags, name="LArFCALSensitiveDetector", ** bare_collection_name = "LArHitFCAL" mergeable_collection_suffix = "_G4" merger_input_property = "LArFCALHits" - acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "CALO" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) result.merge(acc) kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::Gap"]) @@ -287,9 +296,12 @@ def LArHECSensitiveDetectorCfg(ConfigFlags, name="LArHECSensitiveDetector", **kw bare_collection_name = "LArHitHEC" mergeable_collection_suffix = "_G4" merger_input_property = "LArHECHits" - acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "CALO" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) result.merge(acc) kwargs.setdefault("WheelVolumes",["LArMgr::LAr::HEC::Module::Depth::Slice"]) diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py b/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py index 8951047a9e4644f24c55ef8df7570c4f9b34183e..5bbb723dc026b7770be259892cf9f47c05add321 100644 --- a/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py +++ b/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr @@ -9,9 +9,11 @@ def getCSCSensitiveDetectorCosmics(name="CSCSensitiveDetectorCosmics", **kwargs) bare_collection_name = "CSC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "CSCHits" + region = "MUON" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::CscArCO2"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.CSCSensitiveDetectorCosmicsTool(name, **kwargs) @@ -21,9 +23,11 @@ def getCSCSensitiveDetector(name="CSCSensitiveDetector", **kwargs): bare_collection_name = "CSC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "CSCHits" + region = "MUON" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::CscArCO2"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.CSCSensitiveDetectorTool(name, **kwargs) @@ -39,9 +43,11 @@ def getMDTSensitiveDetectorCosmics(name="MDTSensitiveDetectorCosmics", **kwargs) bare_collection_name = "MDT_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "MDTHits" + region = "MUON" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::SensitiveGas"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.MDTSensitiveDetectorCosmicsTool(name, **kwargs) @@ -51,9 +57,11 @@ def getMDTSensitiveDetector(name="MDTSensitiveDetector", **kwargs): bare_collection_name = "MDT_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "MDTHits" + region = "MUON" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::SensitiveGas"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.MDTSensitiveDetectorTool(name, **kwargs) @@ -69,9 +77,11 @@ def getRPCSensitiveDetectorCosmics(name="RPCSensitiveDetectorCosmics", **kwargs) bare_collection_name = "RPC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "RPCHits" + region = "MUON" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::gazGap"]) kwargs.setdefault("OutputCollectionNames", [bare_collection_name]) return CfgMgr.RPCSensitiveDetectorCosmicsTool(name, **kwargs) @@ -81,9 +91,11 @@ def getRPCSensitiveDetector(name="RPCSensitiveDetector", **kwargs): bare_collection_name = "RPC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "RPCHits" + region = "MUON" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::gazGap"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.RPCSensitiveDetectorTool(name, **kwargs) @@ -93,9 +105,11 @@ def getTGCSensitiveDetectorCosmics(name="TGCSensitiveDetectorCosmics", **kwargs) bare_collection_name = "TGC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "TGCHits" + region = "MUON" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::muo::TGCGas"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.TGCSensitiveDetectorCosmicsTool(name, **kwargs) @@ -105,9 +119,11 @@ def getTGCSensitiveDetector(name="TGCSensitiveDetector", **kwargs): bare_collection_name = "TGC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "TGCHits" + region = "MUON" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::muo::TGCGas"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.TGCSensitiveDetectorTool(name, **kwargs) diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDToolConfig.py b/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDToolConfig.py index 2141f9f5f5c2293ee242798d1c49384991a21911..e89eaea0c28c6266829398100f6db6619608e5db 100644 --- a/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDToolConfig.py +++ b/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDToolConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from ISF_Algorithms.collection_merger_helpersNew import CollectionMergerCfg from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -9,9 +9,12 @@ def CSCSensitiveDetectorCosmicsCfg(ConfigFlags, name="CSCSensitiveDetectorCosmic bare_collection_name = "CSC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "CSCHits" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "MUON" + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::CscArCO2"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) @@ -21,9 +24,12 @@ def CSCSensitiveDetectorCfg(ConfigFlags, name="CSCSensitiveDetector", **kwargs): bare_collection_name = "CSC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "CSCHits" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "MUON" + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::CscArCO2"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) @@ -43,9 +49,12 @@ def MDTSensitiveDetectorCosmicsCfg(ConfigFlags, name="MDTSensitiveDetectorCosmic bare_collection_name = "MDT_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "MDTHits" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "MUON" + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::SensitiveGas"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) @@ -57,9 +66,12 @@ def MDTSensitiveDetectorCfg(ConfigFlags, name="MDTSensitiveDetector", **kwargs): bare_collection_name = "MDT_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "MDTHits" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "MUON" + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::SensitiveGas"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) @@ -69,7 +81,8 @@ def MDTSensitiveDetectorCfg(ConfigFlags, name="MDTSensitiveDetector", **kwargs): def MicromegasSensitiveDetectorCfg(ConfigFlags, name="MicromegasSensitiveDetector", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["Muon::MM_Sensitive"]) - kwargs.setdefault("OutputCollectionNames", ["MicromegasSensitiveDetector"]) # need ISF_Collection merger in acc? + kwargs.setdefault("OutputCollectionNames", ["MicromegasSensitiveDetector"]) + # TODO add support for Micromegas to ISF_CollectionMerger result=ComponentAccumulator() result.setPrivateTools( MicromegasSensitiveDetectorTool(name, **kwargs) ) return result @@ -79,9 +92,12 @@ def RPCSensitiveDetectorCosmicsCfg(ConfigFlags, name="RPCSensitiveDetectorCosmic bare_collection_name = "RPC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "RPCHits" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "MUON" + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::gazGap"]) kwargs.setdefault("OutputCollectionNames", [bare_collection_name]) #is this correct? @@ -93,9 +109,12 @@ def RPCSensitiveDetectorCfg(ConfigFlags, name="RPCSensitiveDetector", **kwargs): bare_collection_name = "RPC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "RPCHits" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "MUON" + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::gazGap"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) @@ -107,9 +126,12 @@ def TGCSensitiveDetectorCosmicsCfg(ConfigFlags, name="TGCSensitiveDetectorCosmic bare_collection_name = "TGC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "TGCHits" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "MUON" + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::muo::TGCGas"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) @@ -121,9 +143,12 @@ def TGCSensitiveDetectorCfg(ConfigFlags, name="TGCSensitiveDetector", **kwargs): bare_collection_name = "TGC_Hits" mergeable_collection_suffix = "_G4" merger_input_property = "TGCHits" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + region = "MUON" + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Muon::muo::TGCGas"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) @@ -134,7 +159,7 @@ def TGCSensitiveDetectorCfg(ConfigFlags, name="TGCSensitiveDetector", **kwargs): def sTGCSensitiveDetectorCfg(ConfigFlags, name="sTGCSensitiveDetector", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["Muon::sTGC_Sensitive"]) kwargs.setdefault("OutputCollectionNames", ["sTGCSensitiveDetector"]) - + # TODO add support for Micromegas to ISF_CollectionMerger result=ComponentAccumulator() result.setPrivateTools( sTGCSensitiveDetectorTool(name, **kwargs) ) return result diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py index 8155a366e6b12aa2c8031d04fca86d7787bf7ea4..2e6e1e4f2b3e1bd63aedb1fec557c813941b30da 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py @@ -77,7 +77,7 @@ def createSimConfigFlags(): # For ISF scf.addFlag("Sim.ISFRun",False) - scf.addFlag("Sim.ISF.HITSMergingRequired", True) + scf.addFlag("Sim.ISF.HITSMergingRequired", {'ID':True, 'CALO':True, 'MUON':True}) scf.addFlag("Sim.ISF.Simulator", "ATLFASTII") scf.addFlag("Sim.ISF.DoTimeMonitoring", True) # bool: run time monitoring scf.addFlag("Sim.ISF.DoMemoryMonitoring", True) # bool: run time monitoring diff --git a/Simulation/ISF/ISF_Config/python/FlagSetters.py b/Simulation/ISF/ISF_Config/python/FlagSetters.py index b3922c80ef86d013f4fd46961b7d91b99f669650..348a9d8109c3cc6e9466b490c236e99f8e5cc0f0 100644 --- a/Simulation/ISF/ISF_Config/python/FlagSetters.py +++ b/Simulation/ISF/ISF_Config/python/FlagSetters.py @@ -46,7 +46,8 @@ def configureFlagsBase(): def configureFlagsFullG4(): from G4AtlasApps.SimFlags import simFlags simFlags.SimulationFlavour = "FullG4" - ISF_Flags.HITSMergingRequired = False + mergeDict = {'ID':False, 'CALO':False, 'MUON':False} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) ISF_Flags.ParticleBroker = "ISF_ParticleBrokerSvcNoOrdering" return @@ -126,6 +127,8 @@ def configureFlagsATLFASTII(): simFlags.SimulationFlavour = "AtlfastII" # TODO: can we rename this to "ATLFASTII" ? from ISF_Config.ISF_jobProperties import ISF_Flags ISF_Flags.UsingGeant4 = True + mergeDict = {'ID':False, 'CALO':True, 'MUON':False} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) ISF_Flags.ParticleBroker = "ISF_AFIIParticleBrokerSvc" return @@ -179,6 +182,9 @@ def configureFlagsATLFASTIIF(): from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags TrkDetFlags.MaterialVersion=21 TrkDetFlags.TRT_BuildStrawLayers=True + from ISF_Config.ISF_jobProperties import ISF_Flags + mergeDict = {'ID':True, 'CALO':True, 'MUON':True} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) return def configureFlagsATLFASTIIFMT(): @@ -212,6 +218,9 @@ def configureFlagsG4HS_FastPileup(): from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags TrkDetFlags.MaterialVersion=21 TrkDetFlags.TRT_BuildStrawLayers=True + from ISF_Config.ISF_jobProperties import ISF_Flags + mergeDict = {'ID':True, 'CALO':True, 'MUON':True} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) return def configureFlagsATLFASTIIF_IDOnly(): @@ -244,6 +253,8 @@ def configureFlagsATLFASTIIF_G4MS(): def configureFlagsMultiSimTest(): from ISF_Config.ISF_jobProperties import ISF_Flags ISF_Flags.UsingGeant4 = True + mergeDict = {'ID':True, 'CALO':True, 'MUON':True} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) return def configureFlagsG4GammaCones(): diff --git a/Simulation/ISF/ISF_Config/python/ISF_jobProperties.py b/Simulation/ISF/ISF_Config/python/ISF_jobProperties.py index 1dd7c0fb9c9481c45fd0f67e73139d26bae26ac2..5878594eb542d7ea8febca1018377b2541e7fdef 100644 --- a/Simulation/ISF/ISF_Config/python/ISF_jobProperties.py +++ b/Simulation/ISF/ISF_Config/python/ISF_jobProperties.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ## @file ISF_Config/python/ISF_jobProperties.py ## @brief Python module to hold common flags to configure JobOptions @@ -109,8 +109,13 @@ class Simulator(JobProperty): class HITSMergingRequired(JobProperty): """The configured set of simulators requires merging of HITS collections""" statusOn = True - allowedTypes = ['bool'] - StoredValue = True + allowedTypes = ['dict'] + StoredValue = {'ID':True, 'CALO':True, 'MUON':True} + def anyOn(self): + if self.statusOn: + return (True in self.StoredValue.values()) + else: + return False class UsingGeant4(JobProperty): """Will this job be using Geant4?""" diff --git a/Simulation/ISF/ISF_Config/share/ISF_ConfigJobInclude.py b/Simulation/ISF/ISF_Config/share/ISF_ConfigJobInclude.py index 6ad25b64c2cea50038562810c651915b1b0f77bc..053b60a529b3974e9f9ad4804058e9cb6445497f 100644 --- a/Simulation/ISF/ISF_Config/share/ISF_ConfigJobInclude.py +++ b/Simulation/ISF/ISF_Config/share/ISF_ConfigJobInclude.py @@ -168,7 +168,7 @@ from ISF_Example.ISF_Metadata import createSimulationParametersMetadata, configu createSimulationParametersMetadata() configureRunNumberOverrides() -if ISF_Flags.HITSMergingRequired(): +if ISF_Flags.HITSMergingRequired.anyOn(): topSequence += collection_merger_alg #-------------------------------------------------------------- diff --git a/Simulation/ISF/ISF_Config/test/test_Sim_tf_configuration.py b/Simulation/ISF/ISF_Config/test/test_Sim_tf_configuration.py index 71b59344e23ac403d75e670d0a7314323a37a17e..c2f2f9c6cc71411071939061b268533c0a321a60 100755 --- a/Simulation/ISF/ISF_Config/test/test_Sim_tf_configuration.py +++ b/Simulation/ISF/ISF_Config/test/test_Sim_tf_configuration.py @@ -65,19 +65,19 @@ class TestATLFASTII(unittest.TestCase): actual_last_ath_alg_sequence_entry) def test___ISF_Collection_merger_InputBCMHits_contains_only_G4_collection(self): - expected_input_hits = ['BCMHits_G4'] + expected_input_hits = [] self._assert_ISF_CollectionMerger_property_unordered_equal( 'InputBCMHits', expected_input_hits) def test___ISF_Collection_merger_InputBLMHits_contains_only_G4_collection(self): - expected_input_hits = ['BLMHits_G4'] + expected_input_hits = [] self._assert_ISF_CollectionMerger_property_unordered_equal( 'InputBLMHits', expected_input_hits) def test___ISF_Collection_merger_InputCSCHits_contains_only_G4_collection(self): - expected_input_hits = ['CSC_Hits_G4'] + expected_input_hits = [] self._assert_ISF_CollectionMerger_property_unordered_equal( 'InputCSCHits', expected_input_hits) @@ -113,37 +113,37 @@ class TestATLFASTII(unittest.TestCase): expected_input_hits) def test___ISF_Collection_merger_InputMDTHits_contains_only_G4_collection(self): - expected_input_hits = ['MDT_Hits_G4'] + expected_input_hits = [] self._assert_ISF_CollectionMerger_property_unordered_equal( 'InputMDTHits', expected_input_hits) def test___ISF_Collection_merger_InputPixelHits_contains_only_G4_collection(self): - expected_input_hits = ['PixelHits_G4'] + expected_input_hits = [] self._assert_ISF_CollectionMerger_property_unordered_equal( 'InputPixelHits', expected_input_hits) def test___ISF_Collection_merger_InputRPCHits_contains_only_G4_collection(self): - expected_input_hits = ['RPC_Hits_G4'] + expected_input_hits = [] self._assert_ISF_CollectionMerger_property_unordered_equal( 'InputRPCHits', expected_input_hits) def test___ISF_Collection_merger_InputSCTHits_contains_only_G4_collection(self): - expected_input_hits = ['SCT_Hits_G4'] + expected_input_hits = [] self._assert_ISF_CollectionMerger_property_unordered_equal( 'InputSCTHits', expected_input_hits) def test___ISF_Collection_merger_InputTGCHits_contains_only_G4_collection(self): - expected_input_hits = ['TGC_Hits_G4'] + expected_input_hits = [] self._assert_ISF_CollectionMerger_property_unordered_equal( 'InputTGCHits', expected_input_hits) def test___ISF_Collection_merger_InputTRTUncompressedHits_contains_only_G4_collection(self): - expected_input_hits = ['TRTUncompressedHits_G4'] + expected_input_hits = [] self._assert_ISF_CollectionMerger_property_unordered_equal( 'InputTRTUncompressedHits', expected_input_hits) diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpers.py b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpers.py index 7335385ccf145dc2a9579644c607a35cc0e2a929..7f558ad10f2bb69c09b9eae8f7b7263e7feb2dd9 100644 --- a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpers.py +++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpers.py @@ -6,7 +6,8 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags def generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property): + merger_input_property, + region): """ Generates and returns a collection name that is also registered to the ISF CollectionMerger algorithm. @@ -19,7 +20,7 @@ def generate_mergeable_collection_name(bare_collection_name, CollectionMerger algorithm to add the mergeable collection to. """ hardscatterSG = "OriginalEvent_SG+" - if simFlags.ISFRun() and ISF_Flags.HITSMergingRequired(): + if simFlags.ISFRun() and ISF_Flags.HITSMergingRequired.get_Value().get(region,True): mergeable_collection = '{bare}{suffix}'.format( bare=bare_collection_name, suffix=mergeable_collection_suffix diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpersNew.py b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpersNew.py index 3756a6a0de370a7592b09fabeeea74a3eed66b57..c9934f5f5621b168a6230130e6a2181de908bf80 100644 --- a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpersNew.py +++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpersNew.py @@ -1,15 +1,17 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from __future__ import print_function from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -def CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property): +def CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region): """Generates and returns a collection name that is also registered to the ISF CollectionMerger algorithm. - + :param bare_collection_name: name of the collection if no merging is taking place. :param mergeable_collection_suffix: suffix to the collection in @@ -18,18 +20,18 @@ def CollectionMergerCfg(ConfigFlags, bare_collection_name, CollectionMerger algorithm to add the mergeable collection to.""" result = ComponentAccumulator() - if ConfigFlags.Sim.ISFRun and ConfigFlags.Sim.ISF.HITSMergingRequired: + if ConfigFlags.Sim.ISFRun and ConfigFlags.Sim.ISF.HITSMergingRequired.get(region,True): mergeable_collection = '{bare}{suffix}'.format( bare=bare_collection_name, suffix=mergeable_collection_suffix) - + from ISF_Algorithms.CollectionMergerConfig import ISFCollectionMergerCfg algo=ISFCollectionMergerCfg(ConfigFlags) result.addEventAlgo(algo) input_attribute_name = 'Input{merger_input_property}'.format( merger_input_property=merger_input_property) - + merger_input_collections = getattr(algo,input_attribute_name) #empty list always? merger_input_collections.append(mergeable_collection) diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/test/test_collection_merger_helpers.py b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/test/test_collection_merger_helpers.py index c7c2a069759840ad5f36892d205e940594b087d2..41854bf88efab457a1b28fb5aa08f3398abe3f9e 100755 --- a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/test/test_collection_merger_helpers.py +++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/test/test_collection_merger_helpers.py @@ -22,28 +22,34 @@ class Test_generate_mergeable_collection_name(unittest.TestCase): def test_isISFRunAndHITSMergingRequired_expectBareNameWithSuffixReturned(self): simFlags.ISFRun.set_Value(True) - ISF_Flags.HITSMergingRequired.set_Value(True) + mergeDict = {'ID':True, 'CALO':True, 'MUON':True} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' + region = 'ID' actual_collection_name = generate_mergeable_collection_name(bare_collection_name, collection_suffix, - merger_input_property) + merger_input_property, + region) expected_collection_name = 'aTestCollection_TESTSUFFIX' self.assertEqual(expected_collection_name, actual_collection_name) def test_isISFRunAndHITSMergingRequiredWithEmptyCollectionMergerAlgorithm_expectCollectionAddedToCollectionMergerAlgorithm(self): simFlags.ISFRun.set_Value(True) - ISF_Flags.HITSMergingRequired.set_Value(True) + mergeDict = {'ID':True, 'CALO':True, 'MUON':True} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' + region = 'ID' actual_collection_name = generate_mergeable_collection_name(bare_collection_name, collection_suffix, - merger_input_property) + merger_input_property, + region) collection_merger = getAlgorithm('ISF_CollectionMerger') actual_collection_merger_input = collection_merger.InputPixelHits @@ -54,28 +60,34 @@ class Test_generate_mergeable_collection_name(unittest.TestCase): def test_isISFRunAndNoHITSMergingRequired_expectBareCollectionNameReturned(self): simFlags.ISFRun.set_Value(True) - ISF_Flags.HITSMergingRequired.set_Value(False) + mergeDict = {'ID':False, 'CALO':True, 'MUON':False} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' + region = 'ID' actual_collection_name = generate_mergeable_collection_name(bare_collection_name, collection_suffix, - merger_input_property) + merger_input_property, + region) expected_collection_name = 'aTestCollection' self.assertEqual(expected_collection_name, actual_collection_name) def test_isISFRunAndNoHITSMergingRequiredWithEmptyCollectionMergerAlgorithm_expectCollectionMergerAlgorithmUntouched(self): simFlags.ISFRun.set_Value(True) - ISF_Flags.HITSMergingRequired.set_Value(False) + mergeDict = {'ID':False, 'CALO':True, 'MUON':False} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' + region = 'ID' actual_collection_name = generate_mergeable_collection_name(bare_collection_name, collection_suffix, - merger_input_property) + merger_input_property, + region) collection_merger = getAlgorithm('ISF_CollectionMerger') actual_collection_merger_input = collection_merger.InputPixelHits @@ -86,42 +98,51 @@ class Test_generate_mergeable_collection_name(unittest.TestCase): def test_isNotISFRunAndNoHITSMergingRequired_expectBareCollectioNameReturned(self): simFlags.ISFRun.set_Value(False) - ISF_Flags.HITSMergingRequired.set_Value(False) + mergeDict = {'ID':False, 'CALO':True, 'MUON':False} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' + region = 'ID' actual_collection_name = generate_mergeable_collection_name(bare_collection_name, collection_suffix, - merger_input_property) + merger_input_property, + region) expected_collection_name = 'aTestCollection' self.assertEqual(expected_collection_name, actual_collection_name) def test_isNotISFRunAndHITSMergingRequired_expectBareCollectioNameReturned(self): simFlags.ISFRun.set_Value(False) - ISF_Flags.HITSMergingRequired.set_Value(True) + mergeDict = {'ID':True, 'CALO':True, 'MUON':True} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' + region = 'ID' actual_collection_name = generate_mergeable_collection_name(bare_collection_name, collection_suffix, - merger_input_property) + merger_input_property, + region) expected_collection_name = 'aTestCollection' self.assertEqual(expected_collection_name, actual_collection_name) def test_isNotISFRunAndNoHITSMergingRequired_expectCollectionMergerAlgorithmUntouched(self): simFlags.ISFRun.set_Value(False) - ISF_Flags.HITSMergingRequired.set_Value(False) + mergeDict = {'ID':True, 'CALO':True, 'MUON':True} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' + region = 'ID' actual_collection_name = generate_mergeable_collection_name(bare_collection_name, collection_suffix, - merger_input_property) + merger_input_property, + region) collection_merger = getAlgorithm('ISF_CollectionMerger') actual_collection_merger_input = collection_merger.InputPixelHits @@ -132,14 +153,17 @@ class Test_generate_mergeable_collection_name(unittest.TestCase): def test_isNotISFRunAndHITSMergingRequired_expectCollectionMergerAlgorithmUntouched(self): simFlags.ISFRun.set_Value(False) - ISF_Flags.HITSMergingRequired.set_Value(True) + mergeDict = {'ID':True, 'CALO':True, 'MUON':True} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' + region = 'ID' actual_collection_name = generate_mergeable_collection_name(bare_collection_name, collection_suffix, - merger_input_property) + merger_input_property, + region) collection_merger = getAlgorithm('ISF_CollectionMerger') actual_collection_merger_input = collection_merger.InputPixelHits diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py index 965d5cf9833a3259fa3bb23b2fa4e25524ae468f..b3377782370c9d963c60001b53ebbdf96b8dc58b 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration """ Tools configurations for ISF_FastCaloSimServices @@ -801,41 +801,47 @@ def getPileupFastShowerCellBuilderTool(name="ISF_PileupFastShowerCellBuilderTool def getFastHitConvertTool(name="ISF_FastHitConvertTool", **kwargs): mergeable_collection_suffix = "_FastCaloSim" + region = "CALO" EMB_hits_bare_collection_name = "LArHitEMB" EMB_hits_merger_input_property = "LArEMBHits" EMB_hits_collection_name = generate_mergeable_collection_name( EMB_hits_bare_collection_name, mergeable_collection_suffix, - EMB_hits_merger_input_property) + EMB_hits_merger_input_property, + region) EMEC_hits_bare_collection_name = "LArHitEMEC" EMEC_hits_merger_input_property = "LArEMECHits" EMEC_hits_collection_name = generate_mergeable_collection_name( EMEC_hits_bare_collection_name, mergeable_collection_suffix, - EMEC_hits_merger_input_property) + EMEC_hits_merger_input_property, + region) FCAL_hits_bare_collection_name = "LArHitFCAL" FCAL_hits_merger_input_property = "LArFCALHits" FCAL_hits_collection_name = generate_mergeable_collection_name( FCAL_hits_bare_collection_name, mergeable_collection_suffix, - FCAL_hits_merger_input_property) + FCAL_hits_merger_input_property, + region) HEC_hits_bare_collection_name = "LArHitHEC" HEC_hits_merger_input_property = "LArHECHits" HEC_hits_collection_name = generate_mergeable_collection_name( HEC_hits_bare_collection_name, mergeable_collection_suffix, - HEC_hits_merger_input_property) + HEC_hits_merger_input_property, + region) tile_hits_bare_collection_name = "TileHitVec" tile_hits_merger_input_property = "TileHits" tile_hits_collection_name = generate_mergeable_collection_name( tile_hits_bare_collection_name, mergeable_collection_suffix, - tile_hits_merger_input_property) + tile_hits_merger_input_property, + region) kwargs.setdefault('embHitContainername', EMB_hits_collection_name) kwargs.setdefault('emecHitContainername', EMEC_hits_collection_name) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesConfigNew.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesConfigNew.py index a7b7b92c50daa7b38c6713c3e83536925d575f4d..f4ae1166ab9bc980e076dddd7ca66daa5875874c 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesConfigNew.py +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesConfigNew.py @@ -111,6 +111,7 @@ def FastHitConvertToolCfg(flags, name="ISF_FastHitConvertTool", **kwargs): acc = ComponentAccumulator() mergeable_collection_suffix = "_FastCaloSim" + region = "CALO" EMB_hits_bare_collection_name = "LArHitEMB" EMB_hits_merger_input_property = "LArEMBHits" @@ -118,7 +119,8 @@ def FastHitConvertToolCfg(flags, name="ISF_FastHitConvertTool", **kwargs): flags, EMB_hits_bare_collection_name, mergeable_collection_suffix, - EMB_hits_merger_input_property) + EMB_hits_merger_input_property, + region) acc.merge(acc1) EMEC_hits_bare_collection_name = "LArHitEMEC" @@ -127,7 +129,8 @@ def FastHitConvertToolCfg(flags, name="ISF_FastHitConvertTool", **kwargs): flags, EMEC_hits_bare_collection_name, mergeable_collection_suffix, - EMEC_hits_merger_input_property) + EMEC_hits_merger_input_property, + region) acc.merge(acc2) FCAL_hits_bare_collection_name = "LArHitFCAL" @@ -136,7 +139,8 @@ def FastHitConvertToolCfg(flags, name="ISF_FastHitConvertTool", **kwargs): flags, FCAL_hits_bare_collection_name, mergeable_collection_suffix, - FCAL_hits_merger_input_property) + FCAL_hits_merger_input_property, + region) acc.merge(acc3) HEC_hits_bare_collection_name = "LArHitHEC" @@ -145,7 +149,8 @@ def FastHitConvertToolCfg(flags, name="ISF_FastHitConvertTool", **kwargs): flags, HEC_hits_bare_collection_name, mergeable_collection_suffix, - HEC_hits_merger_input_property) + HEC_hits_merger_input_property, + region) acc.merge(acc4) tile_hits_bare_collection_name = "TileHitVec" @@ -154,7 +159,8 @@ def FastHitConvertToolCfg(flags, name="ISF_FastHitConvertTool", **kwargs): flags, tile_hits_bare_collection_name, mergeable_collection_suffix, - tile_hits_merger_input_property) + tile_hits_merger_input_property, + region) acc.merge(acc5) kwargs.setdefault("embHitContainername", EMB_hits_collection_name) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py index 88d3c195bc7c78979b699a1ec3cfadd93947bc40..e705869167ef6917e505012318933df652a12edb 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py @@ -530,9 +530,11 @@ def getFatrasHitCreatorPixel(name="ISF_FatrasHitCreatorPixel", **kwargs): bare_collection_name = "PixelHits" mergeable_collection_suffix = "_Fatras" merger_input_property = "PixelHits" + region = 'ID' hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) from G4AtlasApps.SimFlags import simFlags kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) @@ -549,9 +551,11 @@ def getFatrasHitCreatorSCT(name="ISF_FatrasHitCreatorSCT", **kwargs): bare_collection_name = "SCT_Hits" mergeable_collection_suffix = "_Fatras" merger_input_property = "SCTHits" + region = 'ID' hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) from G4AtlasApps.SimFlags import simFlags kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) @@ -566,9 +570,11 @@ def getFatrasHitCreatorTRT(name="ISF_FatrasHitCreatorTRT", **kwargs): bare_collection_name = "TRTUncompressedHits" mergeable_collection_suffix = "_Fatras" merger_input_property = "TRTUncompressedHits" + region = 'ID' hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) from G4AtlasApps.SimFlags import simFlags kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) @@ -609,27 +615,32 @@ def getFatrasPileupSimHitCreatorID(name="ISF_FatrasPileupSimHitCreatorID", **kwa def getFatrasSimHitCreatorMS(name="ISF_FatrasSimHitCreatorMS", **kwargs): mergeable_collection_suffix = "_Fatras" + region = 'MUON' mdt_bare_collection_name = "MDT_Hits" mdt_merger_input_property = "MDTHits" mdt_hits_collection_name = generate_mergeable_collection_name(mdt_bare_collection_name, mergeable_collection_suffix, - mdt_merger_input_property) + mdt_merger_input_property, + region) rpc_bare_collection_name = "RPC_Hits" rpc_merger_input_property = "RPCHits" rpc_hits_collection_name = generate_mergeable_collection_name(rpc_bare_collection_name, mergeable_collection_suffix, - rpc_merger_input_property) + rpc_merger_input_property, + region) tgc_bare_collection_name = "TGC_Hits" tgc_merger_input_property = "TGCHits" tgc_hits_collection_name = generate_mergeable_collection_name(tgc_bare_collection_name, mergeable_collection_suffix, - tgc_merger_input_property) + tgc_merger_input_property, + region) csc_bare_collection_name = "CSC_Hits" csc_merger_input_property = "CSCHits" csc_hits_collection_name = generate_mergeable_collection_name(csc_bare_collection_name, mergeable_collection_suffix, - csc_merger_input_property) + csc_merger_input_property, + region) from G4AtlasApps.SimFlags import simFlags kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) diff --git a/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorConfig.py b/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorConfig.py index ad1193366c7515a9eccc907a2ceb3f79d01a4d7f..5701f69bd18fdd2e6fdbec1a711ff55a9b1e560c 100644 --- a/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorConfig.py +++ b/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr @@ -9,9 +9,11 @@ def getMinBiasScintillatorSD(name="MinBiasScintillatorSD", **kwargs): bare_collection_name = "MBTSHits" mergeable_collection_suffix = "_G4" merger_input_property = "MBTSHits" + region = "CALO" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["LArMgr::MBTS1", "LArMgr::MBTS2"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) from G4AtlasApps.SimFlags import simFlags diff --git a/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorToolConfig.py b/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorToolConfig.py index eff199174cf5f14e6795d01c110d7538fd0e3a21..def341b6f0a31aa02be9a41b9b72ead2b9d30505 100644 --- a/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorToolConfig.py +++ b/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorToolConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from ISF_Algorithms.collection_merger_helpersNew import CollectionMergerCfg from AthenaConfiguration.ComponentFactory import CompFactory @@ -9,10 +9,13 @@ def MinBiasScintillatorSDCfg(ConfigFlags, name="MinBiasScintillatorSD", **kwargs bare_collection_name = "MBTSHits" mergeable_collection_suffix = "_G4" merger_input_property = "MBTSHits" + region = "CALO" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, - mergeable_collection_suffix, - merger_input_property) + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, + bare_collection_name, + mergeable_collection_suffix, + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["LArMgr::MBTS1", "LArMgr::MBTS2"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) @@ -20,6 +23,6 @@ def MinBiasScintillatorSDCfg(ConfigFlags, name="MinBiasScintillatorSD", **kwargs kwargs.setdefault("DeltaTHit", [1]) kwargs.setdefault("DoTOFCorrection", False) - result.setPrivateTools( MinBiasScintillatorSDTool(name, **kwargs) ) + result.setPrivateTools( MinBiasScintillatorSDTool(name, **kwargs) ) return result diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfig.py b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfig.py index 9f53ee840cdeee5d3fd02d8ac8543b2777f4d2a8..6fcc691780e44629fb9180f162efba3133e60721 100644 --- a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfig.py +++ b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr @@ -9,9 +9,11 @@ def getTileGeoG4SD(name="TileGeoG4SD", **kwargs): bare_collection_name = "TileHitVec" mergeable_collection_suffix = "_G4" merger_input_property = "TileHits" + region = "CALO" hits_collection_name = generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, - merger_input_property) + merger_input_property, + region) kwargs.setdefault("LogicalVolumeNames", ["Tile::Scintillator"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) return CfgMgr.TileGeoG4SDTool(name, **kwargs) diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDToolConfig.py b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDToolConfig.py index 95a634d93bfadc6bcf092d1f5385b8579db07a38..44a5949671bd7a0a2914de93053baaf2e15d515d 100644 --- a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDToolConfig.py +++ b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDToolConfig.py @@ -10,11 +10,15 @@ def TileGeoG4SDCfg(ConfigFlags, name="TileGeoG4SD", **kwargs): bare_collection_name = "TileHitVec" mergeable_collection_suffix = "_G4" merger_input_property = "TileHits" + region = "CALO" - result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, mergeable_collection_suffix, merger_input_property) + result, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, mergeable_collection_suffix, merger_input_property, region) kwargs.setdefault("LogicalVolumeNames", ["Tile::Scintillator"]) kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) + result.merge(TileGeoG4SDCalcCfg(ConfigFlags)) + kwargs.setdefault("TileCalculator", result.getService("TileGeoG4SDCalc") ) + result.setPrivateTools( TileGeoG4SDTool(name, **kwargs) ) return result @@ -23,7 +27,7 @@ def TileCTBGeoG4SDCfg(ConfigFlags, name="TileCTBGeoG4SD", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["Tile::Scintillator"]) kwargs.setdefault("OutputCollectionNames", ["TileHitVec"]) - result = TileGeoG4SDCalcCfg(ConfigFlags) + result = TileCTBGeoG4SDCalcCfg(ConfigFlags) kwargs.setdefault("TileCalculator", result.getService("TileCTBGeoG4SDCalc") ) result.setPrivateTools( TileGeoG4SDTool(name, **kwargs) ) diff --git a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py index 95c9dfcea82efc97fc3a814627e06e82ecb3cc58..6967fe25bc837d94634ec513a3f63773369b93f7 100644 --- a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py +++ b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py @@ -831,7 +831,7 @@ collection_merger_alg = CfgGetter.getAlgorithm('ISF_CollectionMerger') SimKernel = CfgGetter.getAlgorithm(ISF_Flags.Simulator.KernelName()) -if ISF_Flags.HITSMergingRequired(): +if ISF_Flags.HITSMergingRequired.anyOn(): topSequence += collection_merger_alg #--------------------------------------------------------------