3from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory
import CompFactory
5from OutputStreamAthenaPool.OutputStreamConfig
import addToAOD, addToESD
8 """Configures HoughVtxFinderTool"""
9 acc = ComponentAccumulator()
11 from BeamSpotConditions.BeamSpotConditionsConfig
import BeamSpotCondAlgCfg
12 acc.merge(BeamSpotCondAlgCfg(flags))
13 kwargs.setdefault(
"BeamSpotKey",
"BeamSpotData")
15 acc.setPrivateTools(CompFactory.ActsTrk.HoughVtxFinderTool(name, **kwargs))
19 """Configures HoughVtxFinder"""
20 acc = ComponentAccumulator()
22 if "HoughVtxFinderTool" not in kwargs:
23 houghVtxFinderTool = acc.popToolsAndMerge(HoughVtxFinderToolCfg(flags, name = "HoughVtxFinderTool"))
24 kwargs.setdefault("HoughVtxFinderTool", houghVtxFinderTool)
26 kwargs.setdefault("inputPixelSpacePoints", "PixelSpacePoints")
27 kwargs.setdefault("outputHoughVtx", "HoughVertices")
29 acc.addEventAlgo(CompFactory.HoughVtxFinder(name, **kwargs))
32def HoughVtxCfg(flags):
33 """Configures HoughVtxFinder and output containers """
34 acc = ComponentAccumulator()
36 acc.merge(HoughVtxFinderCfg(flags))
37 output = [ "xAOD::VertexContainer#HoughVertices", "xAOD::VertexAuxContainer#HoughVerticesAux."]
39 acc.merge(addToESD(flags, output))
40 acc.merge(addToAOD(flags, output))
45if __name__ == "__main__":
46 from AthenaConfiguration.AllConfigFlags import initConfigFlags
47 from AthenaConfiguration.TestDefaults import defaultConditionsTags, defaultGeometryTags, defaultTestFiles
48 flags = initConfigFlags()
50 flags.Input.Files = defaultTestFiles.RAW_RUN3_DATA24_HI
51 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_DATA24
52 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
54 flags.Exec.MaxEvents=20
55 flags.Concurrency.NumThreads=1
57 flags.Output.doWriteAOD = True
58 flags.Output.AODFileName = "myAOD.pool.root"
59 flags.Output.doWriteESD = True
60 flags.Output.ESDFileName = "myESD.pool.root"
62 # enable to pass flags from command line, e.g.:
63 ## python -m InDetPriVxFinder.HoughVtxFinderConfig Exec.FPE=100
68 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
69 acc = MainServicesCfg(flags)
70 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
71 acc.merge(ByteStreamReadCfg(flags))
74 from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoBeamSpotDecoratorAlgCfg
75 acc.merge(EventInfoBeamSpotDecoratorAlgCfg(flags))
77 # add standard track-based vertex, needs calorimeter first
78 from CaloRec.CaloRecoConfig import CaloRecoCfg
79 acc.merge(CaloRecoCfg(flags))
80 from InDetConfig.TrackRecoConfig import InDetTrackRecoCfg
81 acc.merge(InDetTrackRecoCfg(flags))
83 # need PixelSpacePoints first
84 from InDetConfig.InDetPrepRawDataFormationConfig import PixelClusterizationCfg, SCTClusterizationCfg
85 acc.merge(PixelClusterizationCfg(flags))
86 acc.merge(SCTClusterizationCfg(flags))
87 from InDetConfig.SiSpacePointFormationConfig import InDetSiTrackerSpacePointFinderCfg, IDInDetToXAODSpacePointConversionCfg
88 acc.merge(InDetSiTrackerSpacePointFinderCfg(flags))
89 acc.merge(IDInDetToXAODSpacePointConversionCfg(flags))
92 acc.merge(HoughVtxCfg(flags))
95 from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
96 acc.merge(PoolWriteCfg(flags))
99 from AthenaCommon.Constants import DEBUG
100 acc.foreach_component("*Hough*").OutputLevel=DEBUG
102 acc.printConfig(withDetails=True, summariseProps=True)
106 sys.exit(acc.run().isFailure())
HoughVtxFinderToolCfg(flags, name="HoughVtxFinderTool", **kwargs)
HoughVtxFinderCfg(flags, name="HoughVtxFinder", **kwargs)