21 std::vector<const xAOD::MuonSegment*> segments;
22 std::vector<const xAOD::MuonSegment*> anchors;
31 return StatusCode::SUCCESS;
35 const EventContext& ctx,
36 std::vector<MsTrackSeed>& outSeeds)
const {
45 return StatusCode::SUCCESS;
48 std::map<unsigned int, MlComponent> components;
51 if (!segment)
continue;
52 const std::vector<unsigned int>& payload = componentAcc(*segment);
53 if (payload.size() != 2 || payload[0] == 0)
continue;
54 MlComponent& component = components[payload[0]];
55 component.segments.push_back(segment);
56 if (payload[1] != 0) component.anchors.push_back(segment);
59 std::size_t acceptedComponents = 0;
60 std::size_t constructedSeeds = 0;
61 for (
const auto& [componentId, component] : components) {
63 component.anchors.empty()) {
75 seed.addSegment(segment);
77 seed.setPosition(anchor->
position());
78 outSeeds.push_back(std::move(seed));
82 <<
" seed(s) from ML component " << componentId
83 <<
" with " << component.segments.size()
87 ATH_MSG_DEBUG(
"Constructed " << constructedSeeds <<
" seed(s) from "
88 << acceptedComponents <<
"/" << components.size()
89 <<
" decorated ML component(s)");
90 return StatusCode::SUCCESS;
93Acts::Result<Acts::BoundTrackParameters>
95 const EventContext& ctx,
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_VERBOSE(x,...)
Handle class for reading a decoration on an object.
Handle class for reading from StoreGate.
StatusCode initialize() override final
StatusCode findTrackSeeds(const EventContext &ctx, std::vector< MsTrackSeed > &outSeeds) const override final
Retrieves the segment container from StoreGate and constructs TrackSeeds from them.
Gaudi::Property< unsigned int > m_minSegmentsPerCandidate
Acts::Result< Acts::BoundTrackParameters > estimateStartParameters(const EventContext &ctx, const MsTrackSeed &seed) const override final
Estimate the start track parameters for a given track seed.
ToolHandle< ITrackSeedingTool > m_seedParameterEstimator
SG::ReadDecorHandleKey< xAOD::MuonSegmentContainer > m_candidateDecorKey
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKey
Location
Enum defining whether the seed is made in the endcap / barrel.
Handle class for reading a decoration on an object.
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
Amg::Vector3D position() const
Returns the position as Amg::Vector.
This header ties the generic definitions in this package.
bool isBarrel(const ChIndex index)
Returns true if the chamber index points to a barrel chamber.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
MuonSegment_v1 MuonSegment
Reference the current persistent version: