3 __doc__ =
"""Tool configuration to instantiate all
4 isolationTools with default configuration"""
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.Enums
import BeamType
13 if 'TrackSelectionTool' not in kwargs:
14 from InDetConfig.InDetTrackSelectionToolConfig
import isoTrackSelectionToolCfg
16 if 'TTVATool' not in kwargs:
17 from TrackVertexAssociationTool.TrackVertexAssociationToolConfig
import isoTTVAToolCfg
19 if flags.Beam.Type
is BeamType.Cosmics:
20 kwargs[
'VertexLocation'] =
''
22 acc.setPrivateTools(CompFactory.xAOD.TrackIsolationTool(**kwargs))
28 if 'IsoLeakCorrectionTool' not in kwargs:
29 kwargs[
'IsoLeakCorrectionTool'] = CompFactory.CP.IsolationCorrectionTool(
30 name =
'LeakageCorrTool')
32 if 'ClustersInConeTool' not in kwargs:
33 kwargs[
'ClustersInConeTool'] = CompFactory.xAOD.CaloClustersInConeTool(
34 name =
'MyCaloClustersInConeTool',
35 CaloClusterLocation =
"CaloCalTopoClusters")
37 if 'ParticleCaloExtensionTool' not in kwargs:
38 from TrackToCalo.TrackToCaloConfig
import ParticleCaloExtensionToolCfg
39 kwargs[
'ParticleCaloExtensionTool'] = acc.popToolsAndMerge(
42 kwargs.setdefault(
'name',
'CaloIsolationTool')
43 kwargs.setdefault(
'ParticleCaloExtensionTool',
None)
44 kwargs.setdefault(
'ParticleCaloCellAssociationTool',
None)
45 kwargs.setdefault(
'isMC',flags.Input.isMC)
47 acc.setPrivateTools(CompFactory.xAOD.CaloIsolationTool(**kwargs))
51 kwargs.setdefault(
'name',
'ElectronTrackIsolationTool')
52 kwargs.setdefault(
'CoreTrackEtaRange',0.01)
58 if 'IsoLeakCorrectionTool' not in kwargs:
59 kwargs[
'IsoLeakCorrectionTool'] = CompFactory.CP.IsolationCorrectionTool(
60 name =
'LeakageCorrTool',
61 LogLogFitForLeakage =
True)
63 if 'CaloFillRectangularClusterTool' not in kwargs:
64 kwargs[
'CaloFillRectangularClusterTool'] = CompFactory.CaloFillRectangularCluster(
65 name=
"egamma_CaloFillRectangularCluster",
68 cells_name=flags.Egamma.Keys.Input.CaloCells)
72 if flags.HeavyIon.Egamma.doSubtractedClusters:
73 kwargs[
'ClustersInConeTool'] = CompFactory.xAOD.CaloClustersInConeTool(
74 name=
"topoiso_CaloClustersInConeTool",
75 CaloClusterLocation=flags.Egamma.Keys.Input.TopoClusters)
77 kwargs[
'InitializeReadHandles'] =
False
78 kwargs[
'saveOnlyRequestedCorrections'] =
True
80 kwargs.setdefault(
'name',
'egCaloIsolationTool')
81 kwargs.setdefault(
'ParticleCaloExtensionTool',
None)
82 kwargs.setdefault(
'ParticleCaloCellAssociationTool',
None)
83 kwargs.setdefault(
'isMC',flags.Input.isMC)
85 acc.setPrivateTools(CompFactory.xAOD.CaloIsolationTool(**kwargs))
91 if 'ParticleCaloExtensionTool' not in kwargs:
92 from TrackToCalo.TrackToCaloConfig
import ParticleCaloExtensionToolCfg
93 kwargs[
'ParticleCaloExtensionTool'] = acc.popToolsAndMerge(
95 if 'FlowElementsInConeTool' not in kwargs
and flags.Reco.EnablePFlow:
96 kwargs[
'FlowElementsInConeTool'] = CompFactory.xAOD.FlowElementsInConeTool(
97 name=
'FlowElementsInConeTool')
101 if flags.HeavyIon.Egamma.doSubtractedClusters:
102 ccict = CompFactory.xAOD.CaloClustersInConeTool(
103 name=
"topoiso_CaloClustersInConeTool",
104 CaloClusterLocation=flags.Egamma.Keys.Input.TopoClusters)
105 kwargs[
'ClustersInConeTool'] = ccict
107 kwargs[
'InitializeReadHandles'] =
False
108 kwargs[
'saveOnlyRequestedCorrections'] =
True
110 kwargs.setdefault(
'ParticleCaloCellAssociationTool',
None)
111 kwargs.setdefault(
'UseEtaDepPUCorr',
False)
112 kwargs.setdefault(
'name',
'muonCaloIsolationTool')
114 acc.setPrivateTools(CompFactory.xAOD.CaloIsolationTool(**kwargs))