ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::MsTrackSeed Class Reference

#include <MsTrackSeed.h>

Collaboration diagram for MuonR4::MsTrackSeed:

Public Types

enum class  Location : int8_t { Undefined =-1 , Barrel , Endcap }
 Enum defining whether the seed is made in the endcap / barrel. More...

Public Member Functions

 MsTrackSeed (const Location loc, const int sector)
 Constructor with location defintion.
const std::vector< const xAOD::MuonSegment * > & segments () const
 Returns the vector of associated segments.
std::vector< const Segment * > detailedSegments () const
 Returns the list of detailed segments.
std::vector< const SpacePointBucket * > buckets () const
 Returns the list of associated buckets.
void addSegment (const xAOD::MuonSegment *seg)
 Append a segment to the seed.
void replaceSegment (const xAOD::MuonSegment *exist, const xAOD::MuonSegment *updated)
 Replaces an already added segment in the seed with a better suited one.
const Amg::Vector3Dposition () const
 Returns the seed's position.
void setPosition (Amg::Vector3D &&pos)
 set the seed's position
Location location () const
 Returns the location of the seed.
int sector () const
 Returns the seed's sector.

Private Attributes

Location m_loc {Location::Undefined}
 Location variable.
int m_sector {0}
Amg::Vector3D m_pos {Amg::Vector3D::Zero()}
std::vector< const xAOD::MuonSegment * > m_segments {}

Detailed Description

Definition at line 18 of file MsTrackSeed.h.

Member Enumeration Documentation

◆ Location

enum class MuonR4::MsTrackSeed::Location : int8_t
strong

Enum defining whether the seed is made in the endcap / barrel.

Enumerator
Undefined 
Barrel 
Endcap 

Definition at line 21 of file MsTrackSeed.h.

21 : int8_t{
22 Undefined =-1,
23 Barrel,
24 Endcap
25 };
@ Undefined
@ Endcap
Definition DetType.h:14
@ Barrel
Definition DetType.h:14

Constructor & Destructor Documentation

◆ MsTrackSeed()

MuonR4::MsTrackSeed::MsTrackSeed ( const Location loc,
const int sector )

Constructor with location defintion.

Parameters
locLocaltion definition whether the seed is constructed on the barrel or on the endcap surface
sectorIn which tree sector is the seed constructed: sector: 2*MS-sector +- Overlap

Definition at line 32 of file MsTrackSeed.cxx.

32 :
33 m_loc{loc}, m_sector{sector}{}
int sector() const
Returns the seed's sector.
Definition MsTrackSeed.h:55
Location m_loc
Location variable.
Definition MsTrackSeed.h:58

Member Function Documentation

◆ addSegment()

void MuonR4::MsTrackSeed::addSegment ( const xAOD::MuonSegment * seg)

Append a segment to the seed.

Definition at line 63 of file MsTrackSeed.cxx.

63 {
64 const float r2 = Acts::hypotSquare(seg->x(), seg->y(), seg->z());
65 auto insert_itr = std::ranges::find_if(m_segments,
66 [&r2](const xAOD::MuonSegment* added){
67 return r2 < Acts::hypotSquare(added->x(), added->y(), added->z());
68 });
69 m_segments.insert(insert_itr, seg);
70 }
std::vector< const xAOD::MuonSegment * > m_segments
Definition MsTrackSeed.h:61
float y() const
Returns the x position.
float z() const
Returns the y position.
MuonSegment_v1 MuonSegment
Reference the current persistent version:

◆ buckets()

std::vector< const SpacePointBucket * > MuonR4::MsTrackSeed::buckets ( ) const

Returns the list of associated buckets.

Definition at line 35 of file MsTrackSeed.cxx.

35 {
36 std::vector<const SpacePointBucket*> returnMe{};
37 for (const Segment* seg : detailedSegments()){
38 returnMe.push_back(seg->parent()->parentBucket());
39 }
40 return returnMe;
41 }
std::vector< const Segment * > detailedSegments() const
Returns the list of detailed segments.

◆ detailedSegments()

std::vector< const Segment * > MuonR4::MsTrackSeed::detailedSegments ( ) const

Returns the list of detailed segments.

Definition at line 44 of file MsTrackSeed.cxx.

44 {
45 std::vector<const Segment*> segs{};
46 segs.reserve(segments().size());
47 for (const xAOD::MuonSegment* trfMe : segments()) {
48 if(const Segment* seg = detailedSegment(*trfMe); seg != nullptr){
49 segs.push_back(seg);
50 }
51 }
52 return segs;
53 }
const std::vector< const xAOD::MuonSegment * > & segments() const
Returns the vector of associated segments.
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.

◆ location()

MsTrackSeed::Location MuonR4::MsTrackSeed::location ( ) const

Returns the location of the seed.

Definition at line 34 of file MsTrackSeed.cxx.

34{ return m_loc; }

◆ position()

const Amg::Vector3D & MuonR4::MsTrackSeed::position ( ) const

Returns the seed's position.

Definition at line 71 of file MsTrackSeed.cxx.

71{ return m_pos; }
Amg::Vector3D m_pos
Definition MsTrackSeed.h:60

◆ replaceSegment()

void MuonR4::MsTrackSeed::replaceSegment ( const xAOD::MuonSegment * exist,
const xAOD::MuonSegment * updated )

Replaces an already added segment in the seed with a better suited one.

Parameters
existPointer to the segment that is already part of the seed (Exception is thrown if not)
updatedPointer to the segment with which the segment is replaced with

Definition at line 54 of file MsTrackSeed.cxx.

55 {
56 std::vector<const xAOD::MuonSegment*>::iterator itr =
57 std::ranges::find(m_segments, exist);
58 if (itr == m_segments.end()){
59 THROW_EXCEPTION("The exisiting segment could not be found");
60 }
61 (*itr) = updated;
62 }
#define THROW_EXCEPTION(MESSAGE)
Definition throwExcept.h:10

◆ sector()

int MuonR4::MsTrackSeed::sector ( ) const
inline

Returns the seed's sector.

Definition at line 55 of file MsTrackSeed.h.

55{ return m_sector; }

◆ segments()

const std::vector< const xAOD::MuonSegment * > & MuonR4::MsTrackSeed::segments ( ) const

Returns the vector of associated segments.

Definition at line 43 of file MsTrackSeed.cxx.

43{ return m_segments; }

◆ setPosition()

void MuonR4::MsTrackSeed::setPosition ( Amg::Vector3D && pos)

set the seed's position

Definition at line 72 of file MsTrackSeed.cxx.

72{ m_pos = std::move(pos); }

Member Data Documentation

◆ m_loc

Location MuonR4::MsTrackSeed::m_loc {Location::Undefined}
private

Location variable.

Definition at line 58 of file MsTrackSeed.h.

◆ m_pos

Amg::Vector3D MuonR4::MsTrackSeed::m_pos {Amg::Vector3D::Zero()}
private

Definition at line 60 of file MsTrackSeed.h.

60{Amg::Vector3D::Zero()};

◆ m_sector

int MuonR4::MsTrackSeed::m_sector {0}
private

Definition at line 59 of file MsTrackSeed.h.

59{0};

◆ m_segments

std::vector<const xAOD::MuonSegment*> MuonR4::MsTrackSeed::m_segments {}
private

Definition at line 61 of file MsTrackSeed.h.

61{};

The documentation for this class was generated from the following files: