Commit 5488923e authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

Super cluster position corrections, use the newly provided named list from Scott Snyder

parent 63ff3490
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# =======================================================================
# File: egammaRec/python/egammaRecFlags.py
......@@ -133,6 +133,15 @@ class clusterCorrectionVersion (JobProperty):
StoredValue = 'v12phiflip_noecorrnogap'
class superClusterCorrectionVersion (JobProperty):
"""Version of calo cluster corrections used for
super cluster position correction.
"""
statusOn = True
allowedTypes = ['str', 'None']
StoredValue = 'v12phiflip_supercluster'
class calibMVAVersion (JobProperty):
"""Version of calo cluster corrections used for calibration.
"""
......@@ -154,7 +163,8 @@ jobproperties.add_Container(egammaRecFlags)
_list_Egamma = [Enabled, doEgammaCaloSeeded, doEgammaForwardSeeded,
doBremFinding, doVertexBuilding, doConversions,
cellContainerName, doEgammaTruthAssociation,
clusterCorrectionVersion, calibMVAVersion, doSuperclusters,
clusterCorrectionVersion, superClusterCorrectionVersion,
calibMVAVersion, doSuperclusters,
inputTopoClusterCollection, egammaTopoClusterCollection]
for j in _list_Egamma:
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
__doc__ = """ToolFactories to instantiate
all egammaTools with default configuration"""
......@@ -31,7 +31,8 @@ _clusterTypes = dict(
# Configure fixed-size (non-supercell) corrections
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 make_CaloSwCorrections
from CaloRec.CaloRecMakers import _process_tools
......@@ -49,11 +50,9 @@ def configureFixedSizeClusterCorrections(swTool):
# Configure corrections for superclusters.
def configureSuperClusterCorrections(swTool):
"Add attributes ClusterCorrectionToolsXX to egammaSwTool object for corrections for superclusters."
from CaloClusterCorrection.CaloSwCorrections import (
make_CaloSwCorrections, rfac, etaoff_b1, etaoff_e1,
etaoff_b2, etaoff_e2, phioff_b2, phioff_e2, update,
time, listBadChannel)
"""Add attributes ClusterCorrectionToolsXX to egammaSwTool
object for corrections for superclusters."""
from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections
from CaloRec.CaloRecMakers import _process_tools
for attrName, clName in _clusterTypes.items():
......@@ -66,22 +65,10 @@ def configureSuperClusterCorrections(swTool):
make_CaloSwCorrections(
clName,
suffix='EGSuperCluster',
version=jobproperties.egammaRecFlags.clusterCorrectionVersion(),
corrlist=[
[rfac, 'v5'],
[etaoff_b1, 'v5'],
[etaoff_e1, 'v5'],
[etaoff_b2, 'v5'],
[etaoff_e2, 'v5'],
[phioff_b2, 'v5data'],
[phioff_e2, 'v5data'],
[update],
[time],
[listBadChannel]],
version=jobproperties.egammaRecFlags.superClusterCorrectionVersion(),
cells_name=egammaKeys.caloCellKey())))
def configureClusterCorrections(swTool):
"Add attributes ClusterCorrectionToolsXX to egammaSwTool object"
configureFixedSizeClusterCorrections(swTool)
......@@ -93,8 +80,9 @@ egammaSwTool = ToolFactory(egammaToolsConf.egammaSwTool,
postInit=[configureClusterCorrections])
egammaSwSuperClusterTool = ToolFactory(egammaToolsConf.egammaSwTool,
postInit=[configureSuperClusterCorrections])
egammaSwSuperClusterTool = ToolFactory(
egammaToolsConf.egammaSwTool,
postInit=[configureSuperClusterCorrections])
EMClusterTool = ToolFactory(
......@@ -129,7 +117,7 @@ egammaLargeFWDClusterMakerTool = ToolFactory(
name="egammaLCFWDMakerTool",
InputClusterCollection=egammaKeys.FwdClusterKey(),
CellsName=egammaKeys.caloCellKey(),
doFWDelesurraundingWindows = True
doFWDelesurraundingWindows=True
)
# Electron Selectors
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment