diff --git a/Calorimeter/CaloG4/EcalG4_SD/CMakeLists.txt b/Calorimeter/CaloG4/EcalG4_SD/CMakeLists.txt index 43b61dd7c56347d1c4c84c431c3ccd44059c43d2..b6c99f3e14ce3a4e826eb9e8e96168bacd427ff4 100644 --- a/Calorimeter/CaloG4/EcalG4_SD/CMakeLists.txt +++ b/Calorimeter/CaloG4/EcalG4_SD/CMakeLists.txt @@ -11,20 +11,13 @@ find_package( Geant4 ) find_package( XercesC ) # Component(s) in the package: -atlas_add_library( EcalG4_SDLib +atlas_add_component( EcalG4_SD src/*.cxx - OBJECT - NO_PUBLIC_HEADERS + src/components/*.cxx INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GaudiKernel FaserCaloSimEvent G4AtlasToolsLib FaserMCTruth ) -atlas_add_library( ECALG4_SD - src/components/*.cxx - OBJECT - NO_PUBLIC_HEADERS - PRIVATE_LINK_LIBRARIES EcalG4_SDLib ) - - # Install files from the package: atlas_install_python_modules( python/*.py ) + diff --git a/Calorimeter/CaloG4/EcalG4_SD/src/components/PreshowerG4_SD_entries.cxx b/Calorimeter/CaloG4/EcalG4_SD/src/components/EcalG4_SD_entries.cxx similarity index 100% rename from Calorimeter/CaloG4/EcalG4_SD/src/components/PreshowerG4_SD_entries.cxx rename to Calorimeter/CaloG4/EcalG4_SD/src/components/EcalG4_SD_entries.cxx diff --git a/Control/CalypsoConfiguration/python/DetectorConfigFlags.py b/Control/CalypsoConfiguration/python/DetectorConfigFlags.py index b2588ba84ef16b18af9084a029cdccbcbe8fae8f..c6daf00311a2c63427816b97bfd04cccb214153a 100644 --- a/Control/CalypsoConfiguration/python/DetectorConfigFlags.py +++ b/Control/CalypsoConfiguration/python/DetectorConfigFlags.py @@ -144,7 +144,7 @@ def setupDetectorsFromList(flags, detectors, toggle_geometry=False, validate_onl status = d in detectors name = f'Detector.Enable{d}' if flags.hasFlag(name): - if flags(name) != status: + if flags[name] != status: changed = True if validate_only: log.warning("Flag '%s' should be %s but is set to %s", name, status, not status) @@ -154,7 +154,7 @@ def setupDetectorsFromList(flags, detectors, toggle_geometry=False, validate_onl if toggle_geometry: name = f'Detector.Geometry{d}' if flags.hasFlag(name): - if flags(name) != status: + if flags[name] != status: changed = True if validate_only: log.warning("Flag '%s' should be %s but is set to %s", name, status, not status) @@ -180,14 +180,14 @@ def enableDetectors(flags, detectors, toggle_geometry=False): for d in detectors: name = f'Detector.Enable{d}' if flags.hasFlag(name): - if flags(name) is not True: + if flags[name] is not True: changed = True log.info("Enabling '%s'", name) flags._set(name, True) if toggle_geometry: name = f'Detector.Geometry{d}' if flags.hasFlag(name): - if flags(name) is not True: + if flags[name] is not True: changed = True log.info("Enabling '%s'", name) flags._set(name, True) @@ -211,14 +211,14 @@ def disableDetectors(flags, detectors, toggle_geometry=False): for d in detectors: name = f'Detector.Enable{d}' if flags.hasFlag(name): - if flags(name) is not False: + if flags[name] is not False: changed = True log.info("Disabling '%s'", name) flags._set(name, False) if toggle_geometry: name = f'Detector.Geometry{d}' if flags.hasFlag(name): - if flags(name) is not False: + if flags[name] is not False: changed = True log.info("Disabling '%s'", name) flags._set(name, False) diff --git a/Control/CalypsoExample/Generation/scripts/faserMDC_foresee.py b/Control/CalypsoExample/Generation/scripts/faserMDC_foresee.py index 28f438cd56d18dc87834fb14aecf0fb72fa71e97..28911a5b0053f5cae295d5481f2f3e1599c71a36 100755 --- a/Control/CalypsoExample/Generation/scripts/faserMDC_foresee.py +++ b/Control/CalypsoExample/Generation/scripts/faserMDC_foresee.py @@ -63,7 +63,7 @@ if __name__ == '__main__': # # Sim configFlags # - configFlags.Sim.Layout = "FASER" + configFlags.GeoModel.Layout = "FASER" configFlags.Sim.PhysicsList = "FTFP_BERT" configFlags.Sim.ReleaseGeoModel = False configFlags.Sim.IncludeParentsInG4Event = True # Controls whether BeamTruthEvent is written to output HITS file diff --git a/Control/CalypsoExample/Generation/scripts/faserMDC_particlegun.py b/Control/CalypsoExample/Generation/scripts/faserMDC_particlegun.py index 1f0c9c37f9360304cb3f6d9cdaef2866cf6b8058..3f22cd3dbd564ce31bc52bc37affb7ea2b23dc8b 100755 --- a/Control/CalypsoExample/Generation/scripts/faserMDC_particlegun.py +++ b/Control/CalypsoExample/Generation/scripts/faserMDC_particlegun.py @@ -63,7 +63,7 @@ if __name__ == '__main__': # # Sim configFlags # - configFlags.Sim.Layout = "FASER" + configFlags.GeoModel.Layout = "FASER" configFlags.Sim.PhysicsList = "FTFP_BERT" configFlags.Sim.ReleaseGeoModel = False configFlags.Sim.IncludeParentsInG4Event = True # Controls whether BeamTruthEvent is written to output HITS file diff --git a/Control/CalypsoExample/Generation/scripts/faser_particlegun.py b/Control/CalypsoExample/Generation/scripts/faser_particlegun.py index 0125cde62a5f8ca3e96106639bcf52c43334fb02..7cf0fdc33b5274129f309fff1d62a805aabce96b 100755 --- a/Control/CalypsoExample/Generation/scripts/faser_particlegun.py +++ b/Control/CalypsoExample/Generation/scripts/faser_particlegun.py @@ -66,7 +66,7 @@ if __name__ == '__main__': # # Sim configFlags # - configFlags.Sim.Layout = "FASER" + configFlags.GeoModel.Layout = "FASER" configFlags.Sim.PhysicsList = "FTFP_BERT" configFlags.Sim.ReleaseGeoModel = False configFlags.Sim.IncludeParentsInG4Event = True # Controls whether BeamTruthEvent is written to output HITS file diff --git a/Control/CalypsoExample/GeoModelTest/python/Faser04TestConfig.py b/Control/CalypsoExample/GeoModelTest/python/Faser04TestConfig.py index afc970b0e9eeb7d38541a8055f9fa180ad382879..d4760e48e384802490de06fd679a3aac49dc0a9e 100644 --- a/Control/CalypsoExample/GeoModelTest/python/Faser04TestConfig.py +++ b/Control/CalypsoExample/GeoModelTest/python/Faser04TestConfig.py @@ -30,12 +30,12 @@ if __name__ == "__main__": from AthenaCommon.Configurable import Configurable from CalypsoConfiguration.AllConfigFlags import initConfigFlags - # Configurable.configurableRun3Behavior = True + # # Configurable.configurableRun3Behavior = True - print("CACfg = ", isComponentAccumulatorCfg()) + # print("CACfg = ", isComponentAccumulatorCfg()) - print("AthenaCommon.Include", "AthenaCommon.Include" in sys.modules) - print("Configurable._useGlobalInstances", Configurable._useGlobalInstances) + # print("AthenaCommon.Include", "AthenaCommon.Include" in sys.modules) + # print("Configurable._useGlobalInstances", Configurable._useGlobalInstances) # Flags for this job configFlags = initConfigFlags() diff --git a/Control/CalypsoExample/Simulation/scripts/faserMDC_simulate.py b/Control/CalypsoExample/Simulation/scripts/faserMDC_simulate.py index 21ec781d19b8436e38e7529f97aa653c8a667d98..9fb68f723e59b0a027b7fca0368662f77c92fcb0 100755 --- a/Control/CalypsoExample/Simulation/scripts/faserMDC_simulate.py +++ b/Control/CalypsoExample/Simulation/scripts/faserMDC_simulate.py @@ -136,7 +136,7 @@ if __name__ == '__main__': # # Sim configFlags # - configFlags.Sim.Layout = "FASER" + configFlags.GeoModel.Layout = "FASER" configFlags.Sim.PhysicsList = "FTFP_BERT" configFlags.Sim.ReleaseGeoModel = False configFlags.Sim.IncludeParentsInG4Event = True # Controls whether BeamTruthEvent is written to output HITS file diff --git a/Control/CalypsoExample/Simulation/scripts/faser_simulate.py b/Control/CalypsoExample/Simulation/scripts/faser_simulate.py index 4247e9beeb43d6a6512531ce008b32df680695bd..ef8b6cc81e9912b0d03cdcb2d0a085a3b70ba8ea 100755 --- a/Control/CalypsoExample/Simulation/scripts/faser_simulate.py +++ b/Control/CalypsoExample/Simulation/scripts/faser_simulate.py @@ -144,7 +144,7 @@ if __name__ == '__main__': # # Sim configFlags # - configFlags.Sim.Layout = "FASER" + configFlags.GeoModel.Layout = "FASER" configFlags.Sim.PhysicsList = args.G4_phys configFlags.Sim.ReleaseGeoModel = False configFlags.Sim.IncludeParentsInG4Event = True # Controls whether BeamTruthEvent is written to output HITS file diff --git a/Generators/FaserParticleGun/python/FaserParticleGunConfig.py b/Generators/FaserParticleGun/python/FaserParticleGunConfig.py index f75fabf921090eb0988b950189362a4d465cc1e0..1342693c87e788795bc4274c8340b570bee84c0f 100644 --- a/Generators/FaserParticleGun/python/FaserParticleGunConfig.py +++ b/Generators/FaserParticleGun/python/FaserParticleGunConfig.py @@ -3,7 +3,7 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # import sys -from AthenaConfiguration.MainServicesConfig import AthSequencer +from AthenaCommon.AlgSequence import AthSequencer import ParticleGun as PG from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator diff --git a/Generators/GeneratorUtils/python/ShiftLOSConfig.py b/Generators/GeneratorUtils/python/ShiftLOSConfig.py index ffc5c79b926b1674ac43d9e8947bfbbe1750da16..917f2741ecb8db387c4936186b2e3095eae8834c 100644 --- a/Generators/GeneratorUtils/python/ShiftLOSConfig.py +++ b/Generators/GeneratorUtils/python/ShiftLOSConfig.py @@ -3,7 +3,7 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # import sys -from AthenaConfiguration.MainServicesConfig import AthSequencer +from AthenaCommon.AlgSequence import AthSequencer from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator, ConfigurationError from AthenaConfiguration.ComponentFactory import CompFactory diff --git a/Generators/HEPMCReader/python/HepMCReaderConfig.py b/Generators/HEPMCReader/python/HepMCReaderConfig.py index affee04ea519250ba08f5c32c4b6596a3422fab6..1f710f9eebd618f4f218f618c63b93bfe2e935cc 100644 --- a/Generators/HEPMCReader/python/HepMCReaderConfig.py +++ b/Generators/HEPMCReader/python/HepMCReaderConfig.py @@ -3,7 +3,7 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration import sys, tempfile, pathlib -from AthenaConfiguration.MainServicesConfig import AthSequencer +from AthenaCommon.AlgSequence import AthSequencer from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory diff --git a/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py b/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py index e4b9721c03c8d697e101de48f9e279022051d7fb..73799f5988b854ff417de025b892d66d5bf191c7 100644 --- a/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py +++ b/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py @@ -36,9 +36,9 @@ def G4FaserAlgBasicCfg(ConfigFlags, name="G4FaserAlg", **kwargs): ## default true kwargs.setdefault("KillAbortedEvents", ConfigFlags.Sim.KillAbortedEvents) - from RngComps.RandomServices import RNG - result.merge(RNG(ConfigFlags.Random.Engine, name="AthRNGSvc")) - kwargs.setdefault("AtRndmGenSvc", result.getService("AthRNGSvc")) + from RngComps.RngCompsConfig import AthRNGSvcCfg + kwargs.setdefault("AtRndmGenSvc", + result.getPrimaryAndMerge(AthRNGSvcCfg(ConfigFlags)).name) kwargs.setdefault("RandomGenerator", "athena") diff --git a/Simulation/G4Faser/G4FaserAlg/test/G4FaserAlgConfigNew_Test.py b/Simulation/G4Faser/G4FaserAlg/test/G4FaserAlgConfigNew_Test.py index 4f81e04ee41b14abdd9a057ceb59ff2917cfb6aa..201775807ff70e9ecbd4d30da8c84bb18ab294d1 100755 --- a/Simulation/G4Faser/G4FaserAlg/test/G4FaserAlgConfigNew_Test.py +++ b/Simulation/G4Faser/G4FaserAlg/test/G4FaserAlgConfigNew_Test.py @@ -14,6 +14,7 @@ if __name__ == '__main__': from AthenaCommon.Logging import log from AthenaCommon.Constants import DEBUG, VERBOSE from AthenaCommon.Configurable import Configurable + from Campaigns.Utils import Campaign log.setLevel(DEBUG) Configurable.configurableRun3Behavior = 1 # @@ -28,10 +29,11 @@ if __name__ == '__main__': # # All these must be specified to avoid auto-configuration # - configFlags.Input.RunNumber = [12345] #Isn't updating - todo: investigate + configFlags.Input.RunNumbers = [12345] #Isn't updating - todo: investigate configFlags.Input.OverrideRunNumber = True - configFlags.Input.LumiBlockNumber = [1] + configFlags.Input.LumiBlockNumbers = [1] configFlags.Input.isMC = True + configFlags.Input.MCCampaign = Campaign.Unknown # # Output file name # @@ -39,7 +41,7 @@ if __name__ == '__main__': # # Sim configFlags # - configFlags.Sim.Layout = "FASER" + configFlags.GeoModel.Layout = "FASER" configFlags.Sim.PhysicsList = "FTFP_BERT" configFlags.Sim.ReleaseGeoModel = False configFlags.Sim.IncludeParentsInG4Event = True # Controls whether BeamTruthEvent is written to output HITS file diff --git a/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py b/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py index 1b17627a2ccf83cce04907f5784633b597497d50..b564f070ffabdb6669f68d72e3fdeaf37a4c35a5 100644 --- a/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py +++ b/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py @@ -5,7 +5,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator DetectorGeometrySvc, G4AtlasSvc, G4GeometryNotifierSvc, PhysicsListSvc=CompFactory.getComps("DetectorGeometrySvc","G4AtlasSvc","G4GeometryNotifierSvc","PhysicsListSvc",) from G4FaserTools.G4GeometryToolConfig import G4AtlasDetectorConstructionToolCfg -from G4StepLimitation.G4StepLimitationConfigNew import G4StepLimitationToolCfg +from G4StepLimitation.G4StepLimitationConfig import G4StepLimitationToolCfg from Pythia8Decayer.Pythia8DecayerConfigNew import Pythia8DecayerPhysicsToolCfg def DetectorGeometrySvcCfg(ConfigFlags, name="DetectorGeometrySvc", **kwargs): diff --git a/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py index 42016881857b3de6bd2aee6c3f682419b52fe2de..4e7daf4a5849f1f90beff6862b86849c910c0f90 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py @@ -38,8 +38,8 @@ def EcalPhysicsRegionToolCfg(ConfigFlags, name='EcalPhysicsRegionTool', **kwargs volumeList = ['Ecal::Ecal'] kwargs.setdefault("VolumeList", volumeList) rangeEMB = 0.03 - from G4AtlasApps.SimFlags import simFlags - if '_EMV' not in simFlags.PhysicsList() and '_EMX' not in simFlags.PhysicsList(): + # from G4AtlasApps.SimFlags import simFlags + if '_EMV' not in ConfigFlags.Sim.PhysicsList and '_EMX' not in ConfigFlags.Sim.PhysicsList: rangeEMB = 0.1 kwargs.setdefault("ElectronCut", rangeEMB) kwargs.setdefault("PositronCut", rangeEMB) diff --git a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py index ecac4c267d074dc6326b14275f4096eab7e7898b..aebed446504d9f66d85176acdb6752f2729ed6c6 100644 --- a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py +++ b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py @@ -16,7 +16,7 @@ def AthenaStackingActionToolCfg(ConfigFlags, name='G4UA::AthenaStackingActionToo result = ComponentAccumulator() ## Killing neutrinos - if "FASER" in ConfigFlags.Sim.Layout: + if "FASER" in ConfigFlags.GeoModel.Layout: kwargs.setdefault('KillAllNeutrinos', True) ## Neutron Russian Roulette #need to check if it exists? diff --git a/Simulation/G4Utilities/G4UserActions/python/__init__.py b/Simulation/G4Utilities/G4UserActions/python/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py b/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py index 829b0df04de5615d1509b7dbe741c410ef6b41df..b1a6a7f92f261a1624aaddbf3f53380b31258ba1 100644 --- a/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py +++ b/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py @@ -8,8 +8,8 @@ KG Tan, 17/06/2012 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory -from BarcodeServices.BarcodeServicesConfigNew import MC15aPlusBarcodeSvcCfg -from ISF_HepMC_Tools.ISF_HepMC_ToolsConfigNew import ParticleFinalStateFilterCfg, GenParticleInteractingFilterCfg +from BarcodeServices.BarcodeServicesConfig import BarcodeSvcCfg +from ISF_HepMC_Tools.ISF_HepMC_ToolsConfig import ParticleFinalStateFilterCfg, GenParticleInteractingFilterCfg # from FaserISF_HepMC_Tools.FaserISF_HepMC_ToolsConfigNew import FaserTruthStrategyCfg, FaserDipoleTruthStrategyCfg from FaserISF_HepMC_Tools.FaserISF_HepMC_ToolsConfigNew import TruthStrategyGroupCfg, TrenchStrategyGroupCfg @@ -43,8 +43,8 @@ def FaserInputConverterCfg(ConfigFlags, name="ISF_FaserInputConverter", **kwargs #just use this barcodeSvc for now. TODO - make configurable #from G4AtlasApps.SimFlags import simFlags #kwargs.setdefault('BarcodeSvc', simFlags.TruthStrategy.BarcodeServiceName()) - result = MC15aPlusBarcodeSvcCfg(ConfigFlags) - kwargs.setdefault('BarcodeSvc', result.getService("Barcode_MC15aPlusBarcodeSvc") ) + result = ComponentAccumulator() + # kwargs.setdefault('BarcodeSvc', result.getPrimaryAndMerge(BarcodeSvcCfg(ConfigFlags)).name) kwargs.setdefault("UseGeneratedParticleMass", False) @@ -58,8 +58,8 @@ def FaserInputConverterCfg(ConfigFlags, name="ISF_FaserInputConverter", **kwargs # Generic Truth Service Configurations # def FaserTruthServiceCfg(ConfigFlags, name="FaserISF_TruthService", **kwargs): - result = MC15aPlusBarcodeSvcCfg(ConfigFlags) - kwargs.setdefault('BarcodeSvc', result.getService("Barcode_MC15aPlusBarcodeSvc") ) + result = ComponentAccumulator() + kwargs.setdefault('BarcodeSvc', result.getPrimaryAndMerge(BarcodeSvcCfg(ConfigFlags)).name) # acc = FaserTruthStrategyCfg(ConfigFlags) # acc2= FaserDipoleTruthStrategyCfg(ConfigFlags) diff --git a/package_filters.txt b/package_filters.txt index 7dbd00e5f493aa30f05eb4af467f4630931aeeb0..0563674b7490b21c71452fa994a695b0131b8eb1 100644 --- a/package_filters.txt +++ b/package_filters.txt @@ -42,7 +42,7 @@ +Event/FaserEventStorage -Event/.* +FaserGeometryCommon/.* --Generators/.* ++Generators/.* +LHCData/LHCDataAlgs +LHCData/LHCDataTools #-LHCData/.*