diff --git a/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py b/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py index 762637beb584a97140da9744b928465348d267f1..61d8e07ce6bc992e2bdb13144fd1fdf06c1a37b0 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py +++ b/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py @@ -5,28 +5,22 @@ Tools configurations for ISF KG Tan, 17/06/2012 """ -from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,\ - getService,getServiceClone,getAlgorithm,getAlgorithmClone +from AthenaCommon import CfgMgr from AthenaCommon.Constants import * # FATAL,ERROR etc. from AthenaCommon.SystemOfUnits import * -from AthenaCommon.DetFlags import DetFlags - -from ISF_Config.ISF_jobProperties import ISF_Flags # IMPORTANT: Flags must be set before tools are retrieved - def getParticleBrokerSvcNoOrdering(name="ISF_ParticleBrokerSvcNoOrdering", **kwargs): kwargs.setdefault('StackFiller' , 'ISF_StackFiller' ) kwargs.setdefault('EntryLayerTool' , 'ISF_EntryLayerTool' ) kwargs.setdefault('GeoIDSvc' , 'ISF_GeoIDSvc' ) kwargs.setdefault('AlwaysUseGeoIDSvc' , False ) + from ISF_Config.ISF_jobProperties import ISF_Flags kwargs.setdefault('ValidateGeoIDs' , ISF_Flags.ValidationMode() ) kwargs.setdefault('ValidationOutput' , ISF_Flags.ValidationMode() ) kwargs.setdefault('ValidationStreamName' , "ParticleBroker" ) kwargs.setdefault('BarcodeService' , ISF_Flags.BarcodeService() ) - - from ISF_Services.ISF_ServicesConf import ISF__ParticleBrokerDynamicOnReadIn - return ISF__ParticleBrokerDynamicOnReadIn(name, **kwargs) + return CfgMgr.ISF__ParticleBrokerDynamicOnReadIn(name, **kwargs) def getParticleBrokerSvc(name="ISF_ParticleBrokerSvc", **kwargs): #kwargs.setdefault('ParticleOrderingTool' , 'ISF_InToOutSubDetOrderingTool' ) @@ -42,10 +36,9 @@ def getAFIIParticleBrokerSvc(name="ISF_AFIIParticleBrokerSvc", **kwargs): return getParticleBrokerSvc(name, **kwargs) def getSimHitService(name="ISF_SimHitService", **kwargs): + from ISF_Config.ISF_jobProperties import ISF_Flags kwargs.setdefault('ValidationOutput' , ISF_Flags.ValidationMode() ) - - from ISF_Services.ISF_ServicesConf import ISF__SimHitSvc - return ISF__SimHitSvc(name, **kwargs) + return CfgMgr.ISF__SimHitSvc(name, **kwargs) def getNoG4SimHitService(name="ISF_NoG4SimHitService", **kwargs): kwargs.setdefault("SensitiveDetectorMasterTool","EmptySensitiveDetectorMasterTool") @@ -59,28 +52,26 @@ def getPileupSimHitService(name="ISF_PileupSimHitService", **kwargs): def getISFEnvelopeDefSvc(name="ISF_ISFEnvelopeDefSvc", **kwargs): # ATLAS common envlope definitions kwargs.setdefault("ATLASEnvelopeDefSvc" , "AtlasGeometry_EnvelopeDefSvc") - - from ISF_Services.ISF_ServicesConf import ISF__ISFEnvelopeDefSvc - return ISF__ISFEnvelopeDefSvc(name, **kwargs) + return CfgMgr.ISF__ISFEnvelopeDefSvc(name, **kwargs) def getAFIIEnvelopeDefSvc(name="ISF_AFIIEnvelopeDefSvc", **kwargs): from AthenaCommon.SystemOfUnits import mm # ATLAS common envlope definitions kwargs.setdefault("ISFEnvelopeDefSvc" , "ISF_ISFEnvelopeDefSvc" ) kwargs.setdefault("InDetMaxExtentZ" , 3549.5*mm ) - - from ISF_Services.ISF_ServicesConf import ISF__AFIIEnvelopeDefSvc - return ISF__AFIIEnvelopeDefSvc(name, **kwargs) + return CfgMgr.ISF__AFIIEnvelopeDefSvc(name, **kwargs) def getGeoIDSvc(name="ISF_GeoIDSvc", **kwargs): # with ISF volume definitions kwargs.setdefault("EnvelopeDefSvc" , "ISF_ISFEnvelopeDefSvc" ) - - from ISF_Services.ISF_ServicesConf import ISF__GeoIDSvc - return ISF__GeoIDSvc(name, **kwargs) + return CfgMgr.ISF__GeoIDSvc(name, **kwargs) def getAFIIGeoIDSvc(name="ISF_AFIIGeoIDSvc", **kwargs): kwargs.setdefault("EnvelopeDefSvc" , "ISF_AFIIEnvelopeDefSvc" ) return getGeoIDSvc(name, **kwargs) + +def getParticleKillerSvc(name="ISF_ParticleKillerSvc", **kwargs): + kwargs.setdefault('Identifier', "ParticleKiller") + return CfgMgr.ISF__ParticleKillerSimSvc(name, **kwargs) diff --git a/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfigDb.py b/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfigDb.py index 1c395388bc240f3322127bff640f46a4fd92787f..7e1a333128bbd7dcd11600f9301371f8fdc0f88d 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfigDb.py +++ b/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfigDb.py @@ -5,14 +5,7 @@ Configuration database for ISF_Services Elmar Ritsch, 16/12/2014 """ -from AthenaCommon.CfgGetter import addTool, addToolClone, addService, addAlgorithm, \ - addTypesToExcludeIfDefaultValue, addNamesToExcludeIfDefaultValue, addFullNamesToExcludeIfDefaultValue, \ - addPropertiesToExcludeIfDefault, \ - addTypesToSkipIfNotAvailable, addNamesToSkipIfNotAvailable, addFullNamesToSkipIfNotAvailable, \ - addTypesOnlyToSkip - -from AthenaCommon.Constants import * # FATAL,ERROR etc. -import AthenaCommon.SystemOfUnits as Units +from AthenaCommon.CfgGetter import addService # Common tools, services and algorithms used by jobs addService("ISF_Services.ISF_ServicesConfig.getISFEnvelopeDefSvc" , "ISF_ISFEnvelopeDefSvc" ) @@ -26,3 +19,4 @@ addService("ISF_Services.ISF_ServicesConfig.getAFIIParticleBrokerSvc" , "I addService("ISF_Services.ISF_ServicesConfig.getSimHitService" , "ISF_SimHitService" ) addService("ISF_Services.ISF_ServicesConfig.getNoG4SimHitService" , "ISF_NoG4SimHitService" ) addService("ISF_Services.ISF_ServicesConfig.getPileupSimHitService" , "ISF_PileupSimHitService" ) +addService("ISF_Services.ISF_ServicesConfig.getParticleKillerSvc" , "ISF_ParticleKillerSvc" )