27 This is a test configuration for the TrkVertexWeightCalculator. It is not meant to be run in production.
28 It produces a ROOT file with a tree containing relevant information to check the performance of the tool.
31 from AthenaCommon.Logging
import logging
33 mlog = logging.getLogger(
"TrkVertexWeightCalculatorBDTDebugCfg")
35 "This is a test algorithm, it is not meant to be run in production."
41 "Setting the output level of BuildVertexPointingAlg, DecorateVertexScoreAlg, DecorateVertexScoreAlg/VertexSelectionTool to DEBUG"
43 acc.getEventAlgo(
"BuildVertexPointingAlg").OutputLevel = DEBUG
44 acc.getEventAlgo(
"DecorateVertexScoreAlg").OutputLevel = DEBUG
46 "DecorateVertexScoreAlg"
47 ).VertexWeightCalculator.OutputLevel = DEBUG
49 from TrkConfig.TrkVertexWeightCalculatorsConfig
import (
50 SumPt2VertexWeightCalculatorCfg,
57 "DecorateVertexScoreAlgSumPt2",
58 VertexWeightCalculator=tool_pt2,
59 VertexScoreDecor=
"score_sumpt2",
62 acc.getEventAlgo(
"DecorateVertexScoreAlgSumPt2").OutputLevel = DEBUG
64 tool = CompFactory.Trk.TrueVertexDistanceWeightCalculator()
68 "DecorateVertexScoreAlgTrueVertexDistance",
69 VertexWeightCalculator=tool,
70 VertexScoreDecor=
"score_true_vertex_distance",
73 acc.getEventAlgo(
"DecorateVertexScoreAlgTrueVertexDistance").OutputLevel = DEBUG
75 sysService = CompFactory.CP.SystematicsSvc(
"SystematicsSvc", sigmaRecommended=0)
76 acc.addService(sysService)
78 histoSvc = CompFactory.THistSvc(
80 f
"ANALYSIS DATAFILE='{flags.Output.HISTFileName}' TYPE='ROOT' OPT='RECREATE'"
83 acc.addService(histoSvc)
84 acc.setAppProperty(
"HistogramPersistency",
"ROOT")
87 CompFactory.CP.TreeMakerAlg(
"TreeMaker", TreeName=flags.Output.TreeName)
90 "EventInfo.runNumber -> runNumber",
91 "EventInfo.eventNumber -> eventNumber",
92 "EventInfo.actualInteractionsPerCrossing -> actualInteractionsPerCrossing",
93 "EventInfo.averageInteractionsPerCrossing -> averageInteractionsPerCrossing",
94 "PrimaryVertices.x -> vtx_x",
95 "PrimaryVertices.y -> vtx_y",
96 "PrimaryVertices.z -> vtx_z",
97 "PrimaryVertices.score -> vtx_score",
98 "PhotonPointingVertices.z -> z_common",
99 "PhotonPointingVertices.nphotons_good -> nphotons_good",
100 "PrimaryVertices.score_sumpt2 -> vtx_score_sumpt2",
101 "PrimaryVertices.score_true_vertex_distance -> vtx_score_true_vertex_distance",
104 CompFactory.CP.AsgxAODNTupleMakerAlg(
105 "NTupleMaker", TreeName=flags.Output.TreeName, Branches=branches
109 CompFactory.CP.TreeFillerAlg(
"TreeFiller", TreeName=flags.Output.TreeName)