146 def runUFOReconstruction(flags, constits, caloClusterName="CaloCalTopoClusters", detectorEtaName = "default", assocPostfix="UFO", inputFEcontainerkey=""):
148 """Create a UFO collection from PFlow and tracks (PFO retrieved from PFOPrefix and tracks directly from trackParticleName).
149 This functions schedules 2 UFO specific algs :
150 * a TrackCaloClusterInfoUFOAlg to build the TrackCaloClusterInfo object
151 * a TrackCaloClusterAlg to build the UFO
153 from JetRecConfig.JetDefinition
import JetDefinition
154 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
157 if isinstance(constits, JetDefinition):
159 constits = jdef.inputdef
160 trackParticleName = jdef._contextDic[
'Tracks']
162 trackParticleName =
"InDetTrackParticles"
164 pfoVariant= constits.label.split(
"PFlow")[-1]
171 setupTrackCaloAssoc(flags, caloClusterName, detectorEtaName, trackParticleName, assocPostfix, onlyPV0Tracks=
False)
175 from TrackVertexAssociationTool.TrackVertexAssociationToolConfig
import TTVAToolCfg
177 TrackVertexAssoTool = components.popToolsAndMerge(
178 TTVAToolCfg(flags,
"tvaTool",WorkingPoint=
"Nonprompt_All_MaxWeight")),
179 AssoClustersDecor=decorKey(
"AssoClusters"),
183 inputFEcontainerkey = inputFEcontainerkey
or constits.containername
186 UFOInfoAlg = CompFactory.TrackCaloClusterInfoUFOAlg(f
"UFOInfoAlg{pfoVariant}",
187 TCCInfoName = pfoVariant+
"UFOInfo",
188 InputTracks = trackParticleName,
189 InputClusters = caloClusterName,
190 VertexContainer =
"PrimaryVertices",
191 InputPFO=inputFEcontainerkey,
192 OriginPFO=
'originalObjectLink',
198 components.addEventAlgo( UFOInfoAlg)
200 tccUFO = CompFactory.UFOTool(f
"UFOtool{pfoVariant}",
201 ClusterECut = UFOInfoAlg.ClusterECut,
202 InputPFO=inputFEcontainerkey,
203 OriginPFO=
'originalObjectLink',
207 UFOAlg = CompFactory.TrackCaloClusterAlg(name = f
"TrackCaloClusterAlgUFO{pfoVariant}",
208 OutputTCCName = f
"UFO{pfoVariant}",
209 TCCInfo = UFOInfoAlg.TCCInfoName ,
210 TCCTools = [tccUFO,],
215 components.addEventAlgo( UFOAlg)