15def TTVAToolCfg(flags, name, addDecoAlg=True, VertexContName="PrimaryVertices", **kwargs):
16 """Create a component accumulator containing a TTVA tool
17
18 If addDecoAlg is True, also adds an algorithm for decorating the 'used-in-fit' information
19 """
20
21 acc = ComponentAccumulator()
22
23
24 if not flags.Tracking.doVertexFinding:
25 return acc
26
27 kwargs.setdefault("TrackContName", "InDetTrackParticles")
28 kwargs.setdefault("AMVFVerticesDeco", "TTVA_AMVFVertices_forReco")
29 kwargs.setdefault("AMVFWeightsDeco", "TTVA_AMVFWeights_forReco")
30
31 acc.setPrivateTools(getTTVAToolForReco(name, **kwargs))
32
33 if addDecoAlg:
34 from InDetUsedInFitTrackDecoratorTool.UsedInVertexFitTrackDecoratorConfig import (
35 UsedInVertexFitTrackDecoratorCfg)
36 acc.merge(UsedInVertexFitTrackDecoratorCfg(
37 flags, trackCont=kwargs["TrackContName"], vtxCont=VertexContName,
38 vertexDeco=kwargs["AMVFVerticesDeco"], weightDeco=kwargs["AMVFWeightsDeco"]))
39
40 return acc
41
42