ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
MuonR4::MsTrackSeed Class Reference

#include <MsTrackSeed.h>

Collaboration diagram for MuonR4::MsTrackSeed:

Public Types

enum  Location : int8_t { Location::Undefined =-1, Location::Barrel, Location::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. More...
 
const std::vector< const xAOD::MuonSegment * > & segments () const
 Returns the vector of associated segments. More...
 
std::vector< const Segment * > detailedSegments () const
 Returns the list of detailed segments. More...
 
std::vector< const SpacePointBucket * > buckets () const
 Returns the list of associated buckets. More...
 
void addSegment (const xAOD::MuonSegment *seg)
 Append a segment to the seed. More...
 
void replaceSegment (const xAOD::MuonSegment *exist, const xAOD::MuonSegment *updated)
 Replaces an already added segment in the seed with a better suited one. More...
 
const Amg::Vector3Dposition () const
 Returns the seed's position. More...
 
void setPosition (Amg::Vector3D &&pos)
 set the seed's position More...
 
Location location () const
 Returns the location of the seed. More...
 
int sector () const
 Returns the seed's sector. More...
 

Private Attributes

Location m_loc {Location::Undefined}
 Location variable. More...
 
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 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  };

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 35 of file MsTrackSeed.cxx.

35  :
36  m_loc{loc}, m_sector{sector}{}

Member Function Documentation

◆ addSegment()

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

Append a segment to the seed.

Definition at line 66 of file MsTrackSeed.cxx.

66  {
67  const float r2 = Acts::hypotSquare(seg->x(), seg->y(), seg->z());
68  auto insert_itr = std::ranges::find_if(m_segments,
69  [&r2](const xAOD::MuonSegment* added){
70  return r2 < Acts::hypotSquare(added->x(), added->y(), added->z());
71  });
72  m_segments.insert(insert_itr, seg);
73  }

◆ buckets()

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

Returns the list of associated buckets.

Definition at line 38 of file MsTrackSeed.cxx.

38  {
39  std::vector<const SpacePointBucket*> returnMe{};
40  for (const Segment* seg : detailedSegments()){
41  returnMe.push_back(seg->parent()->parentBucket());
42  }
43  return returnMe;
44  }

◆ detailedSegments()

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

Returns the list of detailed segments.

Definition at line 47 of file MsTrackSeed.cxx.

47  {
48  std::vector<const Segment*> segs{};
49  segs.reserve(segments().size());
50  for (const xAOD::MuonSegment* trfMe : segments()) {
51  if(const Segment* seg = detailedSegment(*trfMe); seg != nullptr){
52  segs.push_back(seg);
53  }
54  }
55  return segs;
56  }

◆ location()

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

Returns the location of the seed.

Definition at line 37 of file MsTrackSeed.cxx.

37 { return m_loc; }

◆ position()

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

Returns the seed's position.

Definition at line 74 of file MsTrackSeed.cxx.

74 { return m_pos; }

◆ 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 57 of file MsTrackSeed.cxx.

58  {
61  if (itr == m_segments.end()){
62  THROW_EXCEPTION("The exisiting segment could not be found");
63  }
64  (*itr) = updated;
65  }

◆ 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 46 of file MsTrackSeed.cxx.

46 { return m_segments; }

◆ setPosition()

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

set the seed's position

Definition at line 75 of file MsTrackSeed.cxx.

75 { 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.

◆ m_sector

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

Definition at line 59 of file MsTrackSeed.h.

◆ m_segments

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

Definition at line 61 of file MsTrackSeed.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Undefined
@ Undefined
Definition: MaterialTypes.h:8
xAOD::MuonSegment_v1::x
float x() const
DetType::Endcap
@ Endcap
Definition: DetType.h:14
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Trk::TrackState::Segment
@ Segment
Definition: TrackStateDefs.h:37
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
MCP::ScaleSmearParam::r2
@ r2
DetType::Barrel
@ Barrel
Definition: DetType.h:14
MuonR4::detailedSegment
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
Definition: TrackingHelpers.cxx:14
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
WriteCellNoiseToCool.exist
exist
Definition: WriteCellNoiseToCool.py:543
MuonR4::MsTrackSeed::detailedSegments
std::vector< const Segment * > detailedSegments() const
Returns the list of detailed segments.
Definition: MsTrackSeed.cxx:47
MuonR4::MsTrackSeed::m_loc
Location m_loc
Location variable.
Definition: MsTrackSeed.h:58
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition: throwExcept.h:10
MuonR4::MsTrackSeed::m_sector
int m_sector
Definition: MsTrackSeed.h:59
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
xAOD::MuonSegment_v1::z
float z() const
Returns the y position.
MuonR4::MsTrackSeed::sector
int sector() const
Returns the seed's sector.
Definition: MsTrackSeed.h:55
xAOD::MuonSegment_v1::y
float y() const
Returns the x position.
MuonR4::MsTrackSeed::m_pos
Amg::Vector3D m_pos
Definition: MsTrackSeed.h:60
MuonR4::MsTrackSeed::m_segments
std::vector< const xAOD::MuonSegment * > m_segments
Definition: MsTrackSeed.h:61
MuonR4::MsTrackSeed::segments
const std::vector< const xAOD::MuonSegment * > & segments() const
Returns the vector of associated segments.
Definition: MsTrackSeed.cxx:46