ATLAS Offline Software
Loading...
Searching...
No Matches
MsTrackSeed.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONTRACKEVENT_MSTRACKSEED_H
5#define MUONTRACKEVENT_MSTRACKSEED_H
6
7#include <vector>
8
13
15
16#include "Acts/Utilities/OstreamFormatter.hpp"
20namespace MuonR4{
21
23 public:
25 enum class Location: int8_t{
29 };
30 static std::string toString(const Location loc);
31 friend std::ostream& operator<<(std::ostream& ostr, const Location loc) {
32 return ostr<<toString(loc);
33 }
34 friend std::ostream& operator<<(std::ostream& ostr, const MuonR4::MsTrackSeed& seed) {
35 return seed.print(ostr);
36 }
37
42 explicit MsTrackSeed(const Location loc,
45 std::span<const xAOD::MuonSegment* const> segments() const;
47 std::span<const Muon::MuonStationIndex::StIndex> stations() const;
49 std::vector<const SpacePointBucket*> buckets() const;
51 void addSegment(const xAOD::MuonSegment* seg);
56 void replaceSegment(const xAOD::MuonSegment* exist,
57 const xAOD::MuonSegment* updated);
58
60 const Amg::Vector3D& position() const;
62 void setPosition(Amg::Vector3D&& pos);
64 Location location() const;
66 ExpandedSector sector() const { return m_sector; }
68 std::size_t nStations() const;
70 std::size_t nMeasurements() const;
72 void prepareOverlap(std::shared_ptr<std::uint8_t> marker);
76 bool hasOverlap() const;
77 private:
78 std::ostream& print(std::ostream& ostr) const;
80 float pathLength(const xAOD::MuonSegment& segment) const;
84 ExpandedSector m_sector{static_cast<std::int8_t>(0)};
86 Amg::Vector3D m_pos{Amg::Vector3D::Zero()};
88 std::vector<const xAOD::MuonSegment*> m_segments{};
90 std::size_t m_nMeasurements{0ul};
92 std::vector<Muon::MuonStationIndex::StIndex> m_stations{};
94 std::vector<std::shared_ptr<std::uint8_t>> m_overlapMarker{};
95 };
96 using MsTrackSeedContainer = std::vector<MsTrackSeed>;
97}
99ACTS_OSTREAM_FORMATTER (MuonR4::MsTrackSeed::Location);
100#endif
ACTS_OSTREAM_FORMATTER(MuonR4::CalibratedSpacePoint::State)
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
@ Undefined
ExpandedSector m_sector
The expanded sector of the seed (centre/left/right) + sector.
Definition MsTrackSeed.h:84
bool hasOverlap() const
Returns whether the seed has been marked for overlap.
const Amg::Vector3D & position() const
Returns the seed's position.
void addSegment(const xAOD::MuonSegment *seg)
Append a segment to the seed.
std::size_t nStations() const
Returns the number of stations crossed by the seed.
std::ostream & print(std::ostream &ostr) const
Location m_loc
Location variable.
Definition MsTrackSeed.h:82
MsTrackSeed(const Location loc, const ExpandedSector sector)
Constructor with location defintion.
std::vector< std::shared_ptr< std::uint8_t > > m_overlapMarker
The overlap marker.
Definition MsTrackSeed.h:94
std::vector< const SpacePointBucket * > buckets() const
Returns the list of associated buckets.
std::size_t nMeasurements() const
Returns the number of measurements on the seed.
Location location() const
Returns the location of the seed.
Location
Enum defining whether the seed is made in the endcap / barrel.
Definition MsTrackSeed.h:25
float pathLength(const xAOD::MuonSegment &segment) const
Return the position of the reference segment if exists.
friend std::ostream & operator<<(std::ostream &ostr, const MuonR4::MsTrackSeed &seed)
Definition MsTrackSeed.h:34
void triggerOverlapMarker()
Trigger the overlap marker.
ExpandedSector sector() const
Returns the seed's sector.
Definition MsTrackSeed.h:66
Amg::Vector3D m_pos
Posiion of the seed in the seeding space.
Definition MsTrackSeed.h:86
std::span< const Muon::MuonStationIndex::StIndex > stations() const
The station indices of the associated sements.
static std::string toString(const Location loc)
friend std::ostream & operator<<(std::ostream &ostr, const Location loc)
Definition MsTrackSeed.h:31
std::size_t m_nMeasurements
Number of measurements in the seed.
Definition MsTrackSeed.h:90
std::vector< const xAOD::MuonSegment * > m_segments
List of associated segments.
Definition MsTrackSeed.h:88
std::vector< Muon::MuonStationIndex::StIndex > m_stations
Number of stations.
Definition MsTrackSeed.h:92
void prepareOverlap(std::shared_ptr< std::uint8_t > marker)
Prepare the overlap marker.
std::span< const xAOD::MuonSegment *const > segments() const
Returns the vector of associated segments.
void replaceSegment(const xAOD::MuonSegment *exist, const xAOD::MuonSegment *updated)
Replaces an already added segment in the seed with a better suited one.
void setPosition(Amg::Vector3D &&pos)
set the seed's position
Eigen::Matrix< double, 3, 1 > Vector3D
This header ties the generic definitions in this package.
std::vector< MsTrackSeed > MsTrackSeedContainer
Definition MsTrackSeed.h:96
MuonSegment_v1 MuonSegment
Reference the current persistent version: