3 from AthenaConfiguration.ComponentFactory
import CompFactory
4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys
import getTrigEgammaKeys
10 egammaRec = CompFactory.egammaRecBuilder( name = name,
11 InputClusterContainerName = TrigEgammaKeys.precisionCaloTopoCollection,
12 egammaRecContainer = TrigEgammaKeys.precisionCaloEgammaRecCollection,
13 doTrackMatching =
False,
15 TrackMatchBuilderTool =
None,
16 ConversionBuilderTool =
None,
17 doConversions =
False)
18 acc.addEventAlgo(egammaRec)
24 from egammaTools.egammaSwToolConfig
import egammaSwToolCfg
25 from egammaMVACalib.egammaMVACalibConfig
import egammaMVASvcCfg
26 trigMVAfolder = flags.Trigger.egamma.Calib.precCaloMVAVersion
27 TrigEgammaSuperClusterBuilder = CompFactory.egammaSuperClusterBuilder(
29 InputEgammaRecContainerName = TrigEgammaKeys.precisionCaloEgammaRecCollection,
30 SuperClusterCollectionName = superClusterCollectionName,
31 OutputEgammaRecContainerKey = superegammaRecCollectionName,
33 MVACalibSvc = acc.getPrimaryAndMerge(
egammaMVASvcCfg(flags,name=
"trigPrecCaloEgammaMVASvc",folder = trigMVAfolder)),
34 CalibrationType = calibrationType,
35 EtThresholdCut = 1000,
36 LinkToConstituents =
False)
37 acc.addEventAlgo(TrigEgammaSuperClusterBuilder)
44 name =
"TrigCaloClustersInConeToolHI"
46 name =
"TrigCaloClustersInConeTool"
47 tool = CompFactory.xAOD.CaloClustersInConeTool(name = name,
48 CaloClusterLocation = TrigEgammaKeys.precisionTopoClusterContainer)
49 acc.setPrivateTools(tool)
54 tool = CompFactory.CP.IsolationCorrectionTool(name =
"TrigLeakageCorrTool")
55 acc.setPrivateTools(tool)
60 kwargs.setdefault(
"eta_size", 5)
61 kwargs.setdefault(
"phi_size", 7)
62 kwargs.setdefault(
"cells_name",
'CaloCells')
63 result.setPrivateTools(CompFactory.CaloFillRectangularCluster(**kwargs))
68 name =
"TrigCaloIsolationToolHI"
69 from CaloIdentifier
import SUBCALO
70 tool = CompFactory.xAOD.CaloIsolationTool(name = name,
73 FlowElementsInConeTool =
None,
74 ParticleCaloExtensionTool =
None,
76 ParticleCaloCellAssociationTool =
None,
77 saveOnlyRequestedCorrections =
True,
78 InitializeReadHandles =
False,
79 doEnergyDensityCorrection =
True,
81 EMCaloNums = [SUBCALO.LAREM],
82 HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE])
83 acc.setPrivateTools(tool)
88 name =
"TrigCaloIsolationTool"
89 from CaloIdentifier
import SUBCALO
90 tool = CompFactory.xAOD.CaloIsolationTool(name = name,
93 FlowElementsInConeTool =
None,
94 ParticleCaloExtensionTool =
None,
96 ParticleCaloCellAssociationTool =
None,
97 saveOnlyRequestedCorrections =
True,
98 InitializeReadHandles =
True,
99 TopoClusterEDCentralContainer =
'TrigIsoEventShape',
100 TopoClusterEDForwardContainer =
'TrigIsoEventShape',
101 EFlowEDCentralContainer =
'TrigIsoEventShape',
102 EFlowEDForwardContainer =
'TrigIsoEventShape',
103 EMCaloNums = [SUBCALO.LAREM],
104 HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE])
105 acc.setPrivateTools(tool)
113 name =
'TrigPhotonIsolationBuilderHI'
116 name =
'TrigPhotonIsolationBuilder'
119 from xAODPrimitives.xAODIso
import xAODIso
as isoPar
120 TrigPhotonIsolationBuilder = CompFactory.IsolationBuilder(name = name,
121 PhotonCollectionContainerName = TrigEgammaKeys.precisionPhotonContainer,
122 CaloCellIsolationTool =
None,
123 CaloTopoIsolationTool = acc.popToolsAndMerge(TrigCaloIsolationTool),
124 PFlowIsolationTool =
None,
125 TrackIsolationTool =
None,
126 PhIsoTypes = [[isoPar.topoetcone20, isoPar.topoetcone30, isoPar.topoetcone40]],
127 PhCorTypes = [[isoPar.core57cells, isoPar.pileupCorrection]],
128 PhCorTypesExtra = [[]],
130 acc.addEventAlgo(TrigPhotonIsolationBuilder)
137 TrigEgammaPseudoJetAlgBuilder = CompFactory.PseudoJetAlgorithm(name = name,
139 InputContainer =
"HLT_TopoCaloClustersFS",
140 OutputContainer =
"PseudoJetTrigEMTopo",
141 SkipNegativeEnergy =
True)
142 acc.addEventAlgo(TrigEgammaPseudoJetAlgBuilder)
148 kwargs.setdefault(
"JetAlgorithm",
"Kt")
149 kwargs.setdefault(
"JetRadius", 0.5)
150 kwargs.setdefault(
"InputContainer",
"PseudoJetTrigEMTopo")
151 kwargs.setdefault(
"AbsRapidityMin",0.0)
152 kwargs.setdefault(
"AbsRapidityMax",2.0)
153 kwargs.setdefault(
"AreaDefinition",
"Voronoi")
154 kwargs.setdefault(
"VoronoiRfact",0.9)
155 kwargs.setdefault(
"OutputContainer",
'TrigIsoEventShape')
156 acc.setPrivateTools(CompFactory.EventDensityTool(**kwargs))
162 TrigIsoEventShapeAlg = CompFactory.EventDensityAthAlg(name = name,
164 acc.addEventAlgo(TrigIsoEventShapeAlg)
170 from TrigCaloRec.TrigCaloRecConfig
import jetmetTopoClusteringCfg