Skip to content
Snippets Groups Projects
Commit 73be345d authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'fwinkl_20201125T125316' into 'master'

LArG4FCAL+LArG4FastSimSvc: cmake cleanup, enable flake8

See merge request !38583
parents ab15b6d8 127d35df
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!38583LArG4FCAL+LArG4FastSimSvc: cmake cleanup, enable flake8
################################################################################
# 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} )
# 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)
################################################################################
# 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 )
# 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
......
# 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
......
# 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 $'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment