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

FastSiDigitization: cmake and flake8 fixes

Cleanup link dependencies, enable flake8 and fix code.
parent dc839658
No related branches found
No related tags found
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,!38591InDetDigitization: cmake cleanup, enable flake8
################################################################################
# Package: FastSiDigitization
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( FastSiDigitization )
# External dependencies:
find_package( CLHEP )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
find_package( ROOT COMPONENTS Core Tree RIO )
# Component(s) in the package:
atlas_add_component( FastSiDigitization
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel PileUpToolsLib EventPrimitives xAODEventInfo GaudiKernel InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry InDetSimData InDetPrepRawData SiClusterizationToolLib InDetSimEvent HitManagement ISF_FatrasDetDescrModel ISF_FatrasEvent TrkTruthData StoreGateLib SGtests Identifier GeneratorObjects InDetIdentifier TrkDetDescrInterfaces TrkDigEvent TrkDigInterfaces TrkGeometry TrkSurfaces TrkExUtils )
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel PileUpToolsLib EventPrimitives xAODEventInfo GaudiKernel GeoPrimitives InDetReadoutGeometry PixelCablingLib PixelConditionsData PixelReadoutGeometry SCT_ReadoutGeometry InDetCondTools InDetSimData InDetPrepRawData SiClusterizationToolLib InDetSimEvent HitManagement ISF_FatrasDetDescrModel ISF_FatrasEvent TrkTruthData StoreGateLib Identifier GeneratorObjects InDetIdentifier TrkDetDescrInterfaces TrkDigEvent TrkDigInterfaces TrkGeometry TrkSurfaces TrkExUtils )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
......@@ -35,6 +35,7 @@ def FastClusterMakerTool(name="FastClusterMakerTool", **kwargs):
# Config pixel conditions setup #
#################################
from IOVDbSvc.CondDB import conddb
from AthenaCommon.AppMgr import ToolSvc
from AthenaCommon.AlgSequence import AthSequencer
condSeq = AthSequencer("AthCondSeq")
#################
......@@ -45,7 +46,8 @@ def FastClusterMakerTool(name="FastClusterMakerTool", **kwargs):
if not hasattr(condSeq, "PixelConfigCondAlg"):
from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelConfigCondAlg
from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags
from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags
IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_2016.dat"
# ITk:
if geoFlags.isSLHC():
......@@ -58,12 +60,12 @@ def FastClusterMakerTool(name="FastClusterMakerTool", **kwargs):
IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl4.dat"
elif "BrlExt3.2_ref" == commonGeoFlags.GeoType():
IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl32.dat"
elif (geoFlags.isIBL() == False):
elif (geoFlags.isIBL() is False):
IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping.dat"
else:
# Planar IBL
if (geoFlags.IBLLayout() == "planar"):
if (geoFlags.isDBM() == True):
if (geoFlags.isDBM() is True):
IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_inclIBL_DBM.dat"
else:
IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_inclIBL.dat"
......@@ -81,7 +83,7 @@ def FastClusterMakerTool(name="FastClusterMakerTool", **kwargs):
condSeq += PixelDeadMapCondAlg(name="PixelDeadMapCondAlg",ReadKey="")
#FIXME: at some point we should move away from being dependent on the experimentalDigi flags.
if 'doFastSCT_Digi' in digitizationFlags.experimentalDigi() and not 'doFastPixelDigi' in digitizationFlags.experimentalDigi():
if 'doFastSCT_Digi' in digitizationFlags.experimentalDigi() and 'doFastPixelDigi' not in digitizationFlags.experimentalDigi():
# Set empty Folder
if not useNewChargeFormat:
if not hasattr(condSeq, 'PixelChargeCalibCondAlg'):
......@@ -112,7 +114,7 @@ def FastClusterMakerTool(name="FastClusterMakerTool", **kwargs):
#####################
# Cabling map Setup #
#####################
if (conddb.dbmc=="OFLP200" and geoFlags.isIBL()==True) and not conddb.folderRequested("/PIXEL/HitDiscCnfg"):
if (conddb.dbmc=="OFLP200" and geoFlags.isIBL() is True) and not conddb.folderRequested("/PIXEL/HitDiscCnfg"):
conddb.addFolderSplitMC("PIXEL","/PIXEL/HitDiscCnfg","/PIXEL/HitDiscCnfg", className="AthenaAttributeList")
if not hasattr(condSeq, 'PixelHitDiscCnfgAlg'):
......@@ -146,7 +148,7 @@ def FastClusterMakerTool(name="FastClusterMakerTool", **kwargs):
if not hasattr(ToolSvc, "PixelLorentzAngleTool"):
from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup
pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup()
ToolSvc += PixelLorentzAngleToolSetup()
if not hasattr(condSeq, 'PixelDistortionAlg'):
from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDistortionAlg
......@@ -157,7 +159,6 @@ def FastClusterMakerTool(name="FastClusterMakerTool", **kwargs):
condSeq += PixeldEdxAlg(name="PixeldEdxAlg")
PixeldEdxAlg.ReadFromCOOL = True
from AthenaCommon.AppMgr import ToolSvc
if not hasattr(ToolSvc, "PixelRecoDbTool"):
from PixelConditionsTools.PixelConditionsToolsConf import PixelRecoDbTool
ToolSvc += PixelRecoDbTool()
......@@ -187,7 +188,7 @@ def commonPixelFastDigitizationConfig(name,**kwargs):
from AthenaCommon.AppMgr import ToolSvc
if not hasattr(ToolSvc, "PixelLorentzAngleTool"):
from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup
pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup()
ToolSvc += PixelLorentzAngleToolSetup()
kwargs.setdefault("LorentzAngleTool", ToolSvc.PixelLorentzAngleTool)
from AthenaCommon import CfgMgr
......@@ -227,7 +228,6 @@ def commonSCT_FastDigitizationConfig(name,**kwargs):
sct_SiPropertiesToolSetup.setup()
# SiLorentzAngleTool for SCT_FastDigitizationTool
from AthenaCommon.AppMgr import ToolSvc
from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup
sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup()
kwargs.setdefault("LorentzAngleTool", sctLorentzAngleToolSetup.SCTLorentzAngleTool)
......
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