From d53d961ae3e309980101fa8a92ac09a451e0facd Mon Sep 17 00:00:00 2001
From: Rachid Mazini <rachid.mazini@cern.ch>
Date: Thu, 13 Aug 2020 05:41:39 +0000
Subject: [PATCH] Merge branch 'CollectionMergingUpdate_21.0' into '21.0'

Decide whether SimHit Collections should be created per simulator on a per region-basis

See merge request atlas/athena!35250
---
 .../BCM_G4_SD/python/BCM_G4_SDConfig.py       |  6 +-
 .../BLM_G4_SD/python/BLM_G4_SDConfig.py       |  6 +-
 .../PixelG4_SD/python/PixelG4_SDConfig.py     |  6 +-
 .../SCT_G4_SD/python/SCT_G4_SDConfig.py       |  6 +-
 .../TRT_G4_SD/python/TRT_G4_SDConfig.py       |  6 +-
 .../LArG4/LArG4SD/python/LArG4SDConfig.py     | 18 ++++--
 .../MuonG4/MuonG4SD/python/MuonG4SDConfig.py  | 34 ++++++++---
 .../ISF/ISF_Config/python/FlagSetters.py      | 13 ++++-
 .../ISF_Config/python/ISF_jobProperties.py    | 11 +++-
 .../ISF_Config/share/ISF_ConfigJobInclude.py  |  2 +-
 .../test/test_Sim_tf_configuration.py         | 18 +++---
 .../python/collection_merger_helpers.py       |  5 +-
 .../test/test_collection_merger_helpers.py    | 56 +++++++++++++------
 .../python/AdditionalConfig.py                | 18 ++++--
 .../python/ISF_FatrasServicesConfig.py        | 25 ++++++---
 .../python/MinBiasScintillatorConfig.py       |  6 +-
 .../TileGeoG4SD/python/TileGeoG4SDConfig.py   |  6 +-
 .../share/FastChainSkeleton.EVGENtoRDO.py     |  2 +-
 18 files changed, 170 insertions(+), 74 deletions(-)

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 ca581ae91a1..c4e84b01448 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/BLM_G4_SD/python/BLM_G4_SDConfig.py b/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDConfig.py
index f4f5488b2ab..79b99735924 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/PixelG4_SD/python/PixelG4_SDConfig.py b/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDConfig.py
index 2348cf5c91c..161d2683335 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/SCT_G4_SD/python/SCT_G4_SDConfig.py b/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDConfig.py
index 12e86c04d13..1055b364626 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/TRT_G4_SD/python/TRT_G4_SDConfig.py b/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDConfig.py
index d8c4d674ba6..d14cdc54176 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/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py
index 3a8e8aa9407..428ad2f7398 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/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py b/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py
index 8951047a9e4..5bbb723dc02 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/Simulation/ISF/ISF_Config/python/FlagSetters.py b/Simulation/ISF/ISF_Config/python/FlagSetters.py
index b3922c80ef8..348a9d8109c 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 1dd7c0fb9c9..5878594eb54 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 6ad25b64c2c..053b60a529b 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 71b59344e23..c2f2f9c6cc7 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 7335385ccf1..7f558ad10f2 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/test/test_collection_merger_helpers.py b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/test/test_collection_merger_helpers.py
index c7c2a069759..41854bf88ef 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 965d5cf9833..b3377782370 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_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py
index 88d3c195bc7..e705869167e 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 ad1193366c7..5701f69bd18 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/TileGeoG4SD/python/TileGeoG4SDConfig.py b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfig.py
index 9f53ee840cd..6fcc691780e 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/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
index 95c9dfcea82..6967fe25bc8 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
 
 #--------------------------------------------------------------
-- 
GitLab