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

Merge branch 'fwinkl_20201126T115501' into 'master'

egammaRec+egammaTools: cmake fixes and enable flake8

See merge request atlas/athena!38625
parents 12114e3b da53058f
No related branches found
No related tags found
No related merge requests found
################################################################################ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Package: egammaRec
################################################################################
# Declare the package name: # Declare the package name:
atlas_subdir( egammaRec ) atlas_subdir( egammaRec )
# Install files from the package: # 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 ) atlas_install_joboptions( share/*.py )
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
# specifies egamma"standard" # specifies egamma"standard"
from AthenaCommon.Logging import logging from AthenaCommon.Logging import logging
from AthenaCommon.SystemOfUnits import *
from AthenaCommon.Constants import *
import traceback import traceback
import EventKernel.ParticleDataType
from egammaRec.egammaRecFlags import jobproperties
from egammaRec import egammaKeys from egammaRec import egammaKeys
from InDetRecExample.InDetKeys import InDetKeys from InDetRecExample.InDetKeys import InDetKeys
from RecExConfig.Configured import Configured from RecExConfig.Configured import Configured
......
################################################################################ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Package: egammaTools
################################################################################
# Declare the package name: # Declare the package name:
atlas_subdir( egammaTools ) atlas_subdir( egammaTools )
# Component(s) in the package:
atlas_add_component( egammaTools atlas_add_component( egammaTools
src/*.cxx src/*.cxx
src/components/*.cxx src/components/*.cxx
INCLUDE_DIRS LINK_LIBRARIES AthenaBaseComps AthenaKernel CaloConditions CaloDetDescrLib CaloEvent CaloIdentifier CaloInterfaceLib CaloRecLib CaloUtilsLib EgammaAnalysisInterfacesLib EventPrimitives FourMom FourMomUtils GaudiKernel GeoPrimitives Identifier LArCablingLib LArRecConditions LumiBlockCompsLib PATCoreAcceptLib SGTools StoreGateLib TrkEventPrimitives egammaInterfacesLib egammaRecEvent egammaUtils xAODCaloEvent xAODEgamma xAODTracking )
LINK_LIBRARIES CaloConditions CaloEvent CaloIdentifier CaloRecLib CaloUtilsLib AthenaBaseComps AthenaKernel
AthContainers StoreGateLib Identifier EventKernel EventPrimitives FourMom FourMomUtils xAODCaloEvent
xAODEgamma xAODTracking xAODTruth GaudiKernel LArRecConditions LArCablingLib LumiBlockCompsLib PATCoreLib
EgammaAnalysisInterfacesLib egammaRecEvent egammaUtils TrkEventPrimitives egammaInterfacesLib )
# Install files from the package: # Install files from the package:
atlas_install_python_modules( python/*.py ) atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
...@@ -6,7 +6,6 @@ __author__ = "Bruno Lenzi" ...@@ -6,7 +6,6 @@ __author__ = "Bruno Lenzi"
from ROOT import egammaPID from ROOT import egammaPID
import cppyy
from ElectronPhotonSelectorTools.ConfiguredAsgForwardElectronIsEMSelectors \ from ElectronPhotonSelectorTools.ConfiguredAsgForwardElectronIsEMSelectors \
import ConfiguredAsgForwardElectronIsEMSelector import ConfiguredAsgForwardElectronIsEMSelector
from .EMPIDBuilderBase import EMPIDBuilderPhotonBase from .EMPIDBuilderBase import EMPIDBuilderPhotonBase
...@@ -22,8 +21,6 @@ from egammaRec import egammaKeys ...@@ -22,8 +21,6 @@ from egammaRec import egammaKeys
# to set jobproperties.egammaRecFlags # to set jobproperties.egammaRecFlags
from egammaRec.egammaRecFlags import jobproperties from egammaRec.egammaRecFlags import jobproperties
import six
_clusterTypes = dict( _clusterTypes = dict(
Ele35='ele35', Ele55='ele55', Ele37='ele37', Ele35='ele35', Ele55='ele55', Ele37='ele37',
...@@ -35,10 +32,7 @@ _clusterTypes = dict( ...@@ -35,10 +32,7 @@ _clusterTypes = dict(
# Configure fixed-size (non-supercell) corrections # Configure fixed-size (non-supercell) corrections
def configureFixedSizeClusterCorrections(swTool): def configureFixedSizeClusterCorrections(swTool):
"Add attributes ClusterCorrectionToolsXX to egammaSwTool object for fixed-size cluster corrections." "Add attributes ClusterCorrectionToolsXX to egammaSwTool object for fixed-size cluster corrections."
from CaloClusterCorrection.CaloSwCorrections import ( from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections
make_CaloSwCorrections, rfac, etaoff_b1, etaoff_e1,
etaoff_b2, etaoff_e2, phioff_b2, phioff_e2, update,
time, listBadChannel)
from CaloRec.CaloRecMakers import _process_tools from CaloRec.CaloRecMakers import _process_tools
for attrName, clName in _clusterTypes.items(): for attrName, clName in _clusterTypes.items():
...@@ -161,6 +155,6 @@ TightForwardElectronSelector = ToolFactory( ...@@ -161,6 +155,6 @@ TightForwardElectronSelector = ToolFactory(
# ------------------------- # -------------------------
# Import the factories that are not defined here # Import the factories that are not defined here
from .EMTrackMatchBuilder import EMTrackMatchBuilder from .EMTrackMatchBuilder import EMTrackMatchBuilder # noqa: F401
from .egammaOQFlagsBuilder import egammaOQFlagsBuilder from .egammaOQFlagsBuilder import egammaOQFlagsBuilder # noqa: F401
from .EMShowerBuilder import EMShowerBuilder from .EMShowerBuilder import EMShowerBuilder # noqa: F401
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <cmath> #include <cmath>
#include <vector> #include <vector>
#include "CLHEP/Units/SystemOfUnits.h" #include "GaudiKernel/SystemOfUnits.h"
#include "CaloConditions/CaloAffectedRegionInfoVec.h" #include "CaloConditions/CaloAffectedRegionInfoVec.h"
#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloCell_ID.h"
#include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArEM_ID.h"
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#include "StoreGate/ReadHandle.h" #include "StoreGate/ReadHandle.h"
#include "StoreGate/StoreGateSvc.h" #include "StoreGate/StoreGateSvc.h"
using CLHEP::GeV;
namespace { namespace {
bool bool
isbadtilecell(CaloCellList& ccl, isbadtilecell(CaloCellList& ccl,
...@@ -194,7 +192,7 @@ egammaOQFlagsBuilder::execute(const EventContext& ctx, ...@@ -194,7 +192,7 @@ egammaOQFlagsBuilder::execute(const EventContext& ctx,
egammaOQFlagsBuilder::findCentralCell(cluster, cellCentrId); egammaOQFlagsBuilder::findCentralCell(cluster, cellCentrId);
// Set timing bit // Set timing bit
const double absEnergyGeV = fabs(cluster->e() * (1. / GeV)); const double absEnergyGeV = fabs(cluster->e() * (1. / Gaudi::Units::GeV));
if (absEnergyGeV != 0 && if (absEnergyGeV != 0 &&
fabs(cluster->time()) > m_TCut + m_TCutVsE / absEnergyGeV) { fabs(cluster->time()) > m_TCut + m_TCutVsE / absEnergyGeV) {
iflag |= (0x1 << xAOD::EgammaParameters::OutTime); iflag |= (0x1 << xAOD::EgammaParameters::OutTime);
......
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