ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCombined::MuonCandidate Class Reference

#include <MuonCandidate.h>

Collaboration diagram for MuonCombined::MuonCandidate:

Public Member Functions

 MuonCandidate (const ElementLink< xAOD::TrackParticleContainer > &msTrackLink)
 constructor taking an ElementLink to a xAOD::TrackParicle& Users should ensure that the element link is valid and the lifetime of the Track object is longer that the MuonCandidate as it internally caches a pointer to it.
 MuonCandidate (const ElementLink< xAOD::TrackParticleContainer > &msTrackLink, const ElementLink< TrackCollection > &saTrackLink, size_t container_idx)
 MuonCandidate (const MuonCandidate &oldCandidate, const ElementLink< xAOD::TrackParticleContainer > &msoeTrackLink)
 ~MuonCandidate ()
 destructor
const Trk::TrackmuonSpectrometerTrack () const
 access spectrometer track, always there
const ElementLink< xAOD::TrackParticleContainer > & muonSpectrometerTrackLink () const
 access spectrometer track, always there
const Trk::TrackextrapolatedTrack () const
 access extrapolated track, can be zero if back extrapolation failed
const Trk::TrackprimaryTrack () const
 Returns the extrapolated track otherwise the muonSpectrometer.
const ElementLink< TrackCollection > & extrapolatedTrackLink () const
 access extrapolated track element link
size_t extrapolatedElementID () const
 returns the index of the container where the extrapolated track is located
const ElementLink< xAOD::TrackParticleContainer > & extrapolatedParticleLink () const
 access extrapolated track particle element link
std::string toString () const
 print candidate to string
void setSegments (std::vector< const Muon::MuonSegment * > &&segments)
 set the vector of associated segments to the candidate
const std::vector< const Muon::MuonSegment * > & getSegments () const
 returns the vector of associated muon segments

Private Attributes

const ElementLink< xAOD::TrackParticleContainerm_muonSpectrometerTrackLink {}
 element link to spectrometer track
const ElementLink< xAOD::TrackParticleContainerm_extrapolatedParticleLink {}
 element link to the extrapolated muon track particle
const ElementLink< TrackCollectionm_extrapolatedTrackLink {}
 element link to extrapolated track
const Trk::Trackm_muonSpectrometerTrack {nullptr}
 pointer to spectrometer track, not owned
std::vector< const Muon::MuonSegment * > m_assoc_segments
 Segments associated with the candidate.
size_t m_extContIdx {0}
 Index of the MSOE track in the output container.

Detailed Description

Constructor & Destructor Documentation

◆ MuonCandidate() [1/3]

MuonCombined::MuonCandidate::MuonCandidate ( const ElementLink< xAOD::TrackParticleContainer > & msTrackLink)

constructor taking an ElementLink to a xAOD::TrackParicle& Users should ensure that the element link is valid and the lifetime of the Track object is longer that the MuonCandidate as it internally caches a pointer to it.

Definition at line 13 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

13 :
14 m_muonSpectrometerTrackLink(trackLink), m_muonSpectrometerTrack((*m_muonSpectrometerTrackLink)->track()) {}
const ElementLink< xAOD::TrackParticleContainer > m_muonSpectrometerTrackLink
element link to spectrometer track

◆ MuonCandidate() [2/3]

MuonCombined::MuonCandidate::MuonCandidate ( const ElementLink< xAOD::TrackParticleContainer > & msTrackLink,
const ElementLink< TrackCollection > & saTrackLink,
size_t container_idx )

Definition at line 15 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

16 :
18 m_extrapolatedTrackLink(saTrackLink),
19 m_muonSpectrometerTrack((*m_muonSpectrometerTrackLink)->track()),
20 m_extContIdx(container_idx) {}
const ElementLink< TrackCollection > m_extrapolatedTrackLink
element link to extrapolated track

◆ MuonCandidate() [3/3]

MuonCombined::MuonCandidate::MuonCandidate ( const MuonCandidate & oldCandidate,
const ElementLink< xAOD::TrackParticleContainer > & msoeTrackLink )

Definition at line 22 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

22 :
23 m_muonSpectrometerTrackLink{oldCandidate.m_muonSpectrometerTrackLink},
24 m_extrapolatedParticleLink{msoeTrackLink},
25 m_extrapolatedTrackLink{(*msoeTrackLink)->trackLink()},
26 m_muonSpectrometerTrack{oldCandidate.m_muonSpectrometerTrack},
27 m_assoc_segments{oldCandidate.m_assoc_segments},
28 m_extContIdx{oldCandidate.m_extContIdx} {}
const ElementLink< xAOD::TrackParticleContainer > m_extrapolatedParticleLink
element link to the extrapolated muon track particle
std::vector< const Muon::MuonSegment * > m_assoc_segments
Segments associated with the candidate.

◆ ~MuonCandidate()

MuonCombined::MuonCandidate::~MuonCandidate ( )
default

destructor

Member Function Documentation

◆ extrapolatedElementID()

size_t MuonCombined::MuonCandidate::extrapolatedElementID ( ) const

returns the index of the container where the extrapolated track is located

Definition at line 58 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

58{ return m_extrapolatedTrackLink.isValid() ? m_extContIdx : -1; }

◆ extrapolatedParticleLink()

const ElementLink< xAOD::TrackParticleContainer > & MuonCombined::MuonCandidate::extrapolatedParticleLink ( ) const

access extrapolated track particle element link

Definition at line 62 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

◆ extrapolatedTrack()

const Trk::Track * MuonCombined::MuonCandidate::extrapolatedTrack ( ) const

access extrapolated track, can be zero if back extrapolation failed

Definition at line 49 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

49 {
50 return m_extrapolatedTrackLink.isValid() ? *m_extrapolatedTrackLink : nullptr;
51 }

◆ extrapolatedTrackLink()

const ElementLink< TrackCollection > & MuonCombined::MuonCandidate::extrapolatedTrackLink ( ) const

access extrapolated track element link

Definition at line 57 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

◆ getSegments()

const std::vector< const Muon::MuonSegment * > & MuonCombined::MuonCandidate::getSegments ( ) const

returns the vector of associated muon segments

Definition at line 61 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

61{ return m_assoc_segments; }

◆ muonSpectrometerTrack()

const Trk::Track & MuonCombined::MuonCandidate::muonSpectrometerTrack ( ) const

access spectrometer track, always there

Definition at line 44 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

44{ return *m_muonSpectrometerTrack; }

◆ muonSpectrometerTrackLink()

const ElementLink< xAOD::TrackParticleContainer > & MuonCombined::MuonCandidate::muonSpectrometerTrackLink ( ) const

access spectrometer track, always there

Definition at line 46 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

46 {
48 }

◆ primaryTrack()

const Trk::Track * MuonCombined::MuonCandidate::primaryTrack ( ) const

Returns the extrapolated track otherwise the muonSpectrometer.

Definition at line 52 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

52 {
53 const Trk::Track* ext_trk = extrapolatedTrack();
54 return ext_trk ? ext_trk : &muonSpectrometerTrack();
55 }
const Trk::Track & muonSpectrometerTrack() const
access spectrometer track, always there
const Trk::Track * extrapolatedTrack() const
access extrapolated track, can be zero if back extrapolation failed

◆ setSegments()

void MuonCombined::MuonCandidate::setSegments ( std::vector< const Muon::MuonSegment * > && segments)

set the vector of associated segments to the candidate

Definition at line 60 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

60{ m_assoc_segments = std::move(segments); }

◆ toString()

std::string MuonCombined::MuonCandidate::toString ( ) const

print candidate to string

Definition at line 32 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

32 {
33 const Trk::Track* track = primaryTrack();
34 const Trk::Perigee* perigee = track->perigeeParameters();
35 std::ostringstream sout;
36 if (!perigee)
37 sout << " Track has no perigee parameters!";
38 else
39 sout << " pt " << perigee->momentum().perp() << " eta " << perigee->momentum().eta() << " phi " << perigee->momentum().phi();
40 sout << " hasExtrapolatedTrack " << (extrapolatedTrack() ? "yes" : "no") << std::endl;
41 return sout.str();
42 }
const Trk::Track * primaryTrack() const
Returns the extrapolated track otherwise the muonSpectrometer.
const Amg::Vector3D & momentum() const
Access method for the momentum.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee

Member Data Documentation

◆ m_assoc_segments

std::vector<const Muon::MuonSegment*> MuonCombined::MuonCandidate::m_assoc_segments
private

Segments associated with the candidate.

Definition at line 82 of file Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h.

◆ m_extContIdx

size_t MuonCombined::MuonCandidate::m_extContIdx {0}
private

Index of the MSOE track in the output container.

Definition at line 85 of file Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h.

85{0};

◆ m_extrapolatedParticleLink

const ElementLink<xAOD::TrackParticleContainer> MuonCombined::MuonCandidate::m_extrapolatedParticleLink {}
private

element link to the extrapolated muon track particle

Definition at line 74 of file Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h.

74{};

◆ m_extrapolatedTrackLink

const ElementLink<TrackCollection> MuonCombined::MuonCandidate::m_extrapolatedTrackLink {}
private

element link to extrapolated track

Definition at line 76 of file Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h.

76{};

◆ m_muonSpectrometerTrack

const Trk::Track* MuonCombined::MuonCandidate::m_muonSpectrometerTrack {nullptr}
private

pointer to spectrometer track, not owned

Definition at line 79 of file Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h.

79{nullptr};

◆ m_muonSpectrometerTrackLink

const ElementLink<xAOD::TrackParticleContainer> MuonCombined::MuonCandidate::m_muonSpectrometerTrackLink {}
private

element link to spectrometer track

Definition at line 72 of file Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h.

72{};

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