Commit 7ddd7fe7 authored by Jovan Mitrevski's avatar Jovan Mitrevski Committed by Walter Lampl
Browse files

Do a separate extrapolator for the e/gamma calo extensions as the egamma one...

Do a separate extrapolator for the e/gamma calo extensions as the egamma one seems to be used in many other places
parent 8315bc1b
......@@ -8,46 +8,80 @@ from egammaRec.Factories import FcnWrapper, ToolFactory, PublicToolFactory
# Tools for extrapolating to the calo
def configureExtrapolator( egammaExtrapolator ):
from AthenaCommon.AppMgr import ToolSvc
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
egammaMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'egammaMaterialEffectsUpdator')
egammaNoElossMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'egammaNoElossMaterialEffectsUpdator')
egammaNoElossMaterialEffectsUpdator.EnergyLoss = False
if not hasattr(ToolSvc,'AtlasMaterialEffectsUpdator'):
ToolSvc += AtlasMaterialEffectsUpdator
if not hasattr(ToolSvc,'NoElossMaterialEffectsUpdator'):
ToolSvc += NoElossMaterialEffectsUpdator
if not hasattr(ToolSvc,'egammaMaterialEffectsUpdator'):
ToolSvc += egammaMaterialEffectsUpdator
if not hasattr(ToolSvc,'egammaNoElossMaterialEffectsUpdator'):
ToolSvc += egammaNoElossMaterialEffectsUpdator
MyUpdators = []
MyUpdators += [AtlasMaterialEffectsUpdator]
MyUpdators += [NoElossMaterialEffectsUpdator]
MyUpdators += [egammaMaterialEffectsUpdator]
MyUpdators += [egammaNoElossMaterialEffectsUpdator]
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
MySubUpdators += [ egammaMaterialEffectsUpdator.name() ] # for Global
MySubUpdators += [ egammaMaterialEffectsUpdator.name() ] # for ID
MySubUpdators += [ egammaMaterialEffectsUpdator.name() ] # for BeamPipe
MySubUpdators += [ egammaNoElossMaterialEffectsUpdator.name() ] # for Calo
MySubUpdators += [ egammaNoElossMaterialEffectsUpdator.name() ] # for muon spectrometer
MySubUpdators += [ egammaMaterialEffectsUpdator.name() ] # for cavern
#egamma RungeKutta Propagator
from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as RkPropagator
egammaRungeKuttaPropagator = RkPropagator(name = 'egammaRungeKuttaPropagator')
#egamma STEP_Propagator with no material effects
from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as STEP_Propagator
egammaNoMatSTEP_Propagator = STEP_Propagator(name = 'egammaNoMatSTEP_Propagator')
egammaNoMatSTEP_Propagator.MaterialEffects=False
if not hasattr(ToolSvc,'egammaRungeKuttaPropagator'):
ToolSvc += egammaRungeKuttaPropagator
if not hasattr(ToolSvc,'egammaNoMatSTEP_Propagator'):
ToolSvc += egammaNoMatSTEP_Propagator
myPropagators = []
myPropagators += [egammaRungeKuttaPropagator]
myPropagators += [egammaNoMatSTEP_Propagator]
MySubPropagators = []
MySubPropagators += [ egammaRungeKuttaPropagator.name() ] # for Global
MySubPropagators += [ egammaRungeKuttaPropagator.name() ] # for ID
MySubPropagators += [ egammaRungeKuttaPropagator.name()] # for BeamPipe
MySubPropagators += [ egammaRungeKuttaPropagator.name() ] # for Calo
MySubPropagators += [ egammaNoMatSTEP_Propagator.name() ] # for MS
MySubPropagators += [ egammaRungeKuttaPropagator.name() ] # for cavern
egammaExtrapolator.MaterialEffectsUpdators = MyUpdators
egammaExtrapolator.SubMEUpdators = MySubUpdators
egammaExtrapolator.Propagators = myPropagators
egammaExtrapolator.SubPropagators = MySubPropagators
#egamma STEP with no eloss for calo intersections
egammaExtrapolator.STEP_Propagator=egammaNoMatSTEP_Propagator
###############
#egammaExtrapolator
from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
#The general use extrapolator now same as ATLAS default
egammaExtrapolator = ToolFactory(AtlasExtrapolator,
postInit=[configureExtrapolator],
name = 'egammaExtrapolator')
#Specialized for e/gamma calo extrapolations i.e ignore material effect
#that are not that relevant in the calo side
egammaCaloExtrapolator = ToolFactory(AtlasExtrapolator,
postInit=[configureExtrapolator],
name = 'egammaCaloExtrapolator')
#################################################################
# egamma InDet summary tool to be used conversion finding
#
......
......@@ -5,17 +5,17 @@ __author__ = "Bruno Lenzi , Christos Anastopoulos"
from egammaRec.Factories import FcnWrapper, ToolFactory
import egammaTrackToolsConf
from egammaRec import egammaKeys
from egammaTools.InDetTools import egammaExtrapolator
from egammaTools.InDetTools import egammaCaloExtrapolator,egammaExtrapolator
import AthenaCommon.CfgMgr as CfgMgr
EMLastCaloExtensionTool = ToolFactory (CfgMgr.Trk__ParticleCaloExtensionTool,
name="EMLastCaloExtensionTool",
Extrapolator = egammaExtrapolator,
Extrapolator = egammaCaloExtrapolator,
ParticleType = "electron")
EMParticleCaloExtensionTool = ToolFactory (CfgMgr.Trk__ParticleCaloExtensionTool,
name="EMParticleCaloExtensionTool",
Extrapolator = egammaExtrapolator,
Extrapolator = egammaCaloExtrapolator,
ParticleType="electron",
StartFromPerigee = True)
......
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