diff --git a/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt index 0a12952cf7a9502139c7c79c9fb42ab86767a99c..a98afbb40b3aba24851d79ac3b9e91bb57b34aef 100644 --- a/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt @@ -1,25 +1,16 @@ -################################################################################ -# Package: LArG4FCAL -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( LArG4FCAL ) # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) -find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Geant4 ) -find_package( XercesC ) # Component(s) in the package: atlas_add_component( LArG4FCAL src/*.cc src/components/*.cxx - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES LArG4Code LArReadoutGeometry CaloG4SimLib StoreGateLib SGtests CxxUtils - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel LArG4RunControl PathResolver GeoModelInterfaces RDBAccessSvcLib LArHV ) - -atlas_install_python_modules( python/*.py ) + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} AthenaKernel CaloG4SimLib CxxUtils GaudiKernel GeoModelInterfaces LArG4Code LArHV LArReadoutGeometry PathResolver RDBAccessSvcLib StoreGateLib ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py b/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py index 110707247fd667f1943cf6191386e4ba139d5aad..243f79cf850458e0eed5d0d307d1b925631d302b 100644 --- a/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py +++ b/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.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 AthenaCommon.SystemOfUnits import mm,deg,ns @@ -10,37 +10,37 @@ def getFCALCalculatorBase(name="FCALCalculatorBase", **kwargs): def getFCAL1Calculator(name="FCAL1Calculator", **kwargs): - kwargs.setdefault("FCALSampling",1); + kwargs.setdefault("FCALSampling",1) return getFCALCalculatorBase(name, **kwargs) def getFCAL2Calculator(name="FCAL2Calculator", **kwargs): - kwargs.setdefault("FCALSampling",2); + kwargs.setdefault("FCALSampling",2) return getFCALCalculatorBase(name, **kwargs) def getFCAL3Calculator(name="FCAL3Calculator", **kwargs): - kwargs.setdefault("FCALSampling",3); + kwargs.setdefault("FCALSampling",3) return getFCALCalculatorBase(name, **kwargs) def getFCAL1CalibCalculator(name="FCAL1CalibCalculator", **kwargs): - kwargs.setdefault("FCALdeltaX",7.5*mm); - kwargs.setdefault("FCALdeltaY",7.5*mm*math.sin(60*deg)); - kwargs.setdefault("FCALSampling",1); + kwargs.setdefault("FCALdeltaX",7.5*mm) + kwargs.setdefault("FCALdeltaY",7.5*mm*math.sin(60*deg)) + kwargs.setdefault("FCALSampling",1) return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs) def getFCAL2CalibCalculator(name="FCAL2CalibCalculator", **kwargs): - kwargs.setdefault("FCALdeltaX",8.179*mm); - kwargs.setdefault("FCALdeltaY",8.179*mm*math.sin(60*deg)); - kwargs.setdefault("FCALSampling",2); + kwargs.setdefault("FCALdeltaX",8.179*mm) + kwargs.setdefault("FCALdeltaY",8.179*mm*math.sin(60*deg)) + kwargs.setdefault("FCALSampling",2) return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs) def getFCAL3CalibCalculator(name="FCAL3CalibCalculator", **kwargs): - kwargs.setdefault("FCALdeltaX",9.0*mm); - kwargs.setdefault("FCALdeltaY",9.0*mm*math.sin(60*deg)); - kwargs.setdefault("FCALSampling",3); + kwargs.setdefault("FCALdeltaX",9.0*mm) + kwargs.setdefault("FCALdeltaY",9.0*mm*math.sin(60*deg)) + kwargs.setdefault("FCALSampling",3) return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs) diff --git a/LArCalorimeter/LArG4/LArG4FastSimSvc/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4FastSimSvc/CMakeLists.txt index 0b8cc9f1688762da0463e17b7a589884cd126ce7..48055b764b9d453e769f98d56b5ff9d640e12433 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimSvc/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4FastSimSvc/CMakeLists.txt @@ -1,6 +1,4 @@ -################################################################################ -# Package: LArG4FastSimSvc -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( LArG4FastSimSvc ) @@ -8,17 +6,15 @@ atlas_subdir( LArG4FastSimSvc ) # External dependencies: find_package( CLHEP ) find_package( Geant4 ) -find_package( XercesC ) # Component(s) in the package: atlas_add_component( LArG4FastSimSvc src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps ) + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel ) # Install files from the package: -atlas_install_headers( LArG4FastSimSvc ) -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) diff --git a/LArCalorimeter/LArG4/LArG4FastSimSvc/python/LArG4FastSimSvcConfig.py b/LArCalorimeter/LArG4/LArG4FastSimSvc/python/LArG4FastSimSvcConfig.py index 4c6fc8565eef50f6680a8c38f4804d8aef0e94db..31454aac515ba927cdf97c202b6a50b886e0bc54 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimSvc/python/LArG4FastSimSvcConfig.py +++ b/LArCalorimeter/LArG4/LArG4FastSimSvc/python/LArG4FastSimSvcConfig.py @@ -1,25 +1,25 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from LArG4FastSimSvc.LArG4FastSimSvcConf import LArG4FastSimSvc from AthenaCommon.SystemOfUnits import GeV +from AthenaCommon.Logging import logging class DefaultLArG4FastSimSvc(LArG4FastSimSvc): __slots__ = [] + log = logging.getLogger( 'LArG4FastSimSvc' ) def __init__(self, name = "DefaultLArG4FastSimSvc"): super( DefaultLArG4FastSimSvc, self ).__init__( name ) - from AthenaCommon.Logging import logging - log = logging.getLogger( 'LArG4FastSimSvc' ) - # get parametrisation level from G4AtlasApps.SimFlags import simFlags if not hasattr(simFlags, 'LArParameterization'): - log.warning("JobProperty LArParameterization is not defined! Can not set up fast simulation!"); + self.log.warning("JobProperty LArParameterization is not defined! Can not set up fast simulation!") return if simFlags.LArParameterization() == 0: - log.warning("JobProperty LArParameterization is zero! No fast simulation requested!"); + self.log.warning("JobProperty LArParameterization is zero! No fast simulation requested!") return def setDefaults(cls, handle): @@ -32,7 +32,7 @@ class LArG4EMBFastSimSvc(DefaultLArG4FastSimSvc): super( DefaultLArG4FastSimSvc, self ).__init__( name ) from AthenaCommon.Logging import logging - log = logging.getLogger( 'LArG4EMBFastSimSvc' ) + self.log = logging.getLogger( 'LArG4EMBFastSimSvc' ) # set defaults self.EFlagToShowerLib=True @@ -64,7 +64,7 @@ class LArG4EMBFastSimSvc(DefaultLArG4FastSimSvc): from AthenaCommon.AppMgr import ServiceMgr if not hasattr( ServiceMgr, 'LArG4ShowerLibSvc' ): - log.warning("ShowerLibSvc not setup") + cls.log.warning("ShowerLibSvc not setup") if handle.EFlagToShowerLib: ServiceMgr.LArG4ShowerLibSvc.FileNameList+=["LArG4ShowerLib.EMB.11.root"] @@ -77,13 +77,11 @@ class LArG4EMBFastSimSvc(DefaultLArG4FastSimSvc): class LArG4EMECFastSimSvc(DefaultLArG4FastSimSvc): __slots__ = [] + log = logging.getLogger( 'LArG4EMECFastSimSvc' ) def __init__(self, name = "LArG4EMECFastSimSvc"): super( DefaultLArG4FastSimSvc, self ).__init__( name ) - from AthenaCommon.Logging import logging - log = logging.getLogger( 'LArG4EMECFastSimSvc' ) - # set defaults self.EFlagToShowerLib=True self.GFlagToShowerLib=True @@ -113,7 +111,7 @@ class LArG4EMECFastSimSvc(DefaultLArG4FastSimSvc): from AthenaCommon.AppMgr import ServiceMgr if not hasattr( ServiceMgr, 'LArG4ShowerLibSvc' ): - log.warning("ShowerLibSvc not setup") + cls.log.warning("ShowerLibSvc not setup") if handle.EFlagToShowerLib: ServiceMgr.LArG4ShowerLibSvc.FileNameList+=["LArG4ShowerLib.EMEC.11.root"] @@ -127,13 +125,11 @@ class LArG4EMECFastSimSvc(DefaultLArG4FastSimSvc): class LArG4FCALFastSimSvc(DefaultLArG4FastSimSvc): __slots__ = [] + log = logging.getLogger( 'LArG4FCALFastSimSvc' ) def __init__(self, name = "LArG4FCALFastSimSvc"): super( DefaultLArG4FastSimSvc, self ).__init__( name ) - from AthenaCommon.Logging import logging - log = logging.getLogger( 'LArG4FCALFastSimSvc' ) - # set defaults self.EFlagToShowerLib=True self.GFlagToShowerLib=True @@ -158,7 +154,7 @@ class LArG4FCALFastSimSvc(DefaultLArG4FastSimSvc): from AthenaCommon.AppMgr import ServiceMgr if not hasattr( ServiceMgr, 'LArG4ShowerLibSvc' ): - log.warning("ShowerLibSvc not setup") + cls.log.warning("ShowerLibSvc not setup") if handle.EFlagToShowerLib: ServiceMgr.LArG4ShowerLibSvc.FileNameList+=["LArG4ShowerLib.FCAL1.11.root"] @@ -172,13 +168,11 @@ class LArG4FCALFastSimSvc(DefaultLArG4FastSimSvc): class LArG4FCAL2FastSimSvc(DefaultLArG4FastSimSvc): __slots__ = [] + log = logging.getLogger( 'LArG4FCAL2FastSimSvc' ) def __init__(self, name = "LArG4FCAL2FastSimSvc"): super( DefaultLArG4FastSimSvc, self ).__init__( name ) - from AthenaCommon.Logging import logging - log = logging.getLogger( 'LArG4FCAL2FastSimSvc' ) - # set defaults self.EFlagToShowerLib=True self.GFlagToShowerLib=True @@ -203,7 +197,7 @@ class LArG4FCAL2FastSimSvc(DefaultLArG4FastSimSvc): from AthenaCommon.AppMgr import ServiceMgr if not hasattr( ServiceMgr, 'LArG4ShowerLibSvc' ): - log.warning("ShowerLibSvc not setup") + cls.log.warning("ShowerLibSvc not setup") if handle.EFlagToShowerLib: ServiceMgr.LArG4ShowerLibSvc.FileNameList+=["LArG4ShowerLib.FCAL2.11.root"] @@ -217,13 +211,11 @@ class LArG4FCAL2FastSimSvc(DefaultLArG4FastSimSvc): class DeadMaterialFastSimSvc(DefaultLArG4FastSimSvc): __slots__ = [] + log = logging.getLogger( 'DeadMaterialFastSimSvc' ) def __init__(self, name = "DeadMaterialFastSimSvc"): super( DefaultLArG4FastSimSvc, self ).__init__( name ) - from AthenaCommon.Logging import logging - log = logging.getLogger( 'DeadMaterialFastSimSvc' ) - self.EMinEneShowerLib = 0.*GeV # electrons with this or lower energy will be killed on sight self.EMaxEneShowerLib = 1000.*GeV # particles with energy higher than this will be left alive self.GMaxEneShowerLib = 5698. # particles with Z coord this or more will be killed diff --git a/LArCalorimeter/LArG4/LArG4FastSimSvc/python/LArG4FastSimSvcInit.py b/LArCalorimeter/LArG4/LArG4FastSimSvc/python/LArG4FastSimSvcInit.py index fba6f92432c80249bd1ec0f7ed968ea13eca7985..37131512d4cc9643244652987ac319890562e183 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimSvc/python/LArG4FastSimSvcInit.py +++ b/LArCalorimeter/LArG4/LArG4FastSimSvc/python/LArG4FastSimSvcInit.py @@ -1,3 +1,5 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + def LArG4FastSimSvcInit(): from AthenaCommon.Logging import logging @@ -7,11 +9,11 @@ def LArG4FastSimSvcInit(): from G4AtlasApps.SimFlags import simFlags if not hasattr(simFlags, 'LArParameterization'): - log.warning("JobProperty LArParameterization is not defined! Can not set up fast simulation!"); + log.warning("JobProperty LArParameterization is not defined! Can not set up fast simulation!") return if simFlags.LArParameterization() == 0: - log.warning("JobProperty LArParameterization is zero! No fast simulation requested!"); + log.warning("JobProperty LArParameterization is zero! No fast simulation requested!") return # get service manager diff --git a/LArCalorimeter/LArG4/LArG4FastSimSvc/python/__init__.py b/LArCalorimeter/LArG4/LArG4FastSimSvc/python/__init__.py index c33da32420c22665493391b81eb3e1e73ba20bd5..2cd30841d022fba5d68a828da128a25e698f9b29 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimSvc/python/__init__.py +++ b/LArCalorimeter/LArG4/LArG4FastSimSvc/python/__init__.py @@ -1,4 +1,4 @@ -# File: $Id: __init__.py 448398 2011-07-12 18:38:02Z gsedov $ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration __author__ = 'Zach Marshall (zmarshal@caltech.edu), Wolfgang Ehrenfeld (wolfgang.ehrenfeld@desy.de)' __version__ = '$Revision: 448398 $'