Commit b130f4d2 authored by Jovan Mitrevski's avatar Jovan Mitrevski
Browse files

Go back to no material effects in egamma extrapolator

parent 8229da02
......@@ -5,15 +5,85 @@ __author__ = "Bruno Lenzi"
from egammaRec.Factories import FcnWrapper, ToolFactory, PublicToolFactory
# Tools for extrapolating to the calo
def configureExtrapolator( egammaExtrapolator ):
from AthenaCommon.AppMgr import ToolSvc
# this turns off dynamic calculation of eloss in calorimeters
egammaExtrapolator.DoCaloDynamic = False
# all left to MaterialEffects/EnergyLossUpdators
from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator as MaterialEffectsUpdator
AtlasMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'AtlasMaterialEffectsUpdator')
NoElossMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'NoElossMaterialEffectsUpdator')
NoElossMaterialEffectsUpdator.EnergyLoss = False
if not hasattr(ToolSvc,'AtlasMaterialEffectsUpdator'):
ToolSvc += AtlasMaterialEffectsUpdator
if not hasattr(ToolSvc,'NoElossMaterialEffectsUpdator'):
ToolSvc += NoElossMaterialEffectsUpdator
MyUpdators = []
MyUpdators += [AtlasMaterialEffectsUpdator]
MyUpdators += [NoElossMaterialEffectsUpdator]
MySubUpdators = []
MySubUpdators += [ AtlasMaterialEffectsUpdator.name() ] # for Global
MySubUpdators += [ AtlasMaterialEffectsUpdator.name() ] # for ID
MySubUpdators += [ AtlasMaterialEffectsUpdator.name() ] # for BeamPipe
MySubUpdators += [ NoElossMaterialEffectsUpdator.name() ] # for Calo
MySubUpdators += [ NoElossMaterialEffectsUpdator.name() ] # for muon spectrometer
MySubUpdators += [ AtlasMaterialEffectsUpdator.name() ] # for cavern
egammaExtrapolator.MaterialEffectsUpdators = MyUpdators
egammaExtrapolator.SubMEUpdators = MySubUpdators
###############
#egammaExtrapolator: just use the AtlasExtrapolator, making a tool factory
#egammaExtrapolator
from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
egammaExtrapolator = ToolFactory(AtlasExtrapolator,
name = 'AtlasExtrapolator')
postInit=[configureExtrapolator],
name = 'egammaExtrapolator')
#################################################################
# egamma InDet summary tool to be used conversion finding
#
# load association tool from Inner Detector to handle pixel ganged
# ambiguities
from InDetAssociationTools.InDetAssociationToolsConf import InDet__InDetPRD_AssociationToolGangedPixels
egammaInDetPrdAssociationTool = PublicToolFactory( InDet__InDetPRD_AssociationToolGangedPixels,
name = "egammaInDetPrdAssociationTool",
PixelClusterAmbiguitiesMapName = 'PixelClusterAmbiguitiesMap')
# Loading Configurable HoleSearchTool
#
from InDetTrackHoleSearch.InDetTrackHoleSearchConf import InDet__InDetTrackHoleSearchTool
egammaInDetHoleSearchTool = PublicToolFactory( InDet__InDetTrackHoleSearchTool,
name = "egammaInDetHoleSearchTool",
Extrapolator = egammaExtrapolator)
#
# Load the InDetTrackSummaryHelperTool
#
from AthenaCommon.DetFlags import DetFlags
from InDetTrackSummaryHelperTool.InDetTrackSummaryHelperToolConf import InDet__InDetTrackSummaryHelperTool
egammaInDetTrackSummaryHelperTool = PublicToolFactory( InDet__InDetTrackSummaryHelperTool,
name = "egammaInDetSummaryHelper",
AssoTool = egammaInDetPrdAssociationTool,
DoSharedHits = False,
HoleSearch = egammaInDetHoleSearchTool,
usePixel = DetFlags.haveRIO.pixel_on(),
useSCT = DetFlags.haveRIO.SCT_on(),
useTRT = DetFlags.haveRIO.TRT_on())
#egammaInDetTrackSummaryTool: just use the AtlasTrackSummaryTool, making a tool factory
from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
egammaInDetTrackSummaryTool = PublicToolFactory( AtlasTrackSummaryTool,
name = "AtlasTrackSummaryTool")
#
from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool
egammaInDetTrackSummaryTool = PublicToolFactory( Trk__TrackSummaryTool,
name = "egammaInDetTrackSummaryTool",
InDetSummaryHelperTool = egammaInDetTrackSummaryHelperTool,
doSharedHits = False,
InDetHoleSearchTool = egammaInDetHoleSearchTool)
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