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 setCommissioning (bool b)
 Sets ths comissioning flag.
bool isCommissioning () const
 Returns whether the muon belongs to the comissioning chain.
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
bool m_isCommissioning {false}
 flag whether the track belongs to the comissioning stream
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_isCommissioning{oldCandidate.m_isCommissioning},
28 m_assoc_segments{oldCandidate.m_assoc_segments},
29 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.
bool m_isCommissioning
flag whether the track belongs to the comissioning stream

◆ ~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 59 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

59{ 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 65 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 50 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

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

◆ extrapolatedTrackLink()

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

access extrapolated track element link

Definition at line 58 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 64 of file Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx.

64{ return m_assoc_segments; }

◆ isCommissioning()

bool MuonCombined::MuonCandidate::isCommissioning ( ) const

Returns whether the muon belongs to the comissioning chain.

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

61{ return m_isCommissioning; }

◆ muonSpectrometerTrack()

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

access spectrometer track, always there

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

45{ return *m_muonSpectrometerTrack; }

◆ muonSpectrometerTrackLink()

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

access spectrometer track, always there

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

47 {
49 }

◆ primaryTrack()

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

Returns the extrapolated track otherwise the muonSpectrometer.

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

53 {
54 const Trk::Track* ext_trk = extrapolatedTrack();
55 return ext_trk ? ext_trk : &muonSpectrometerTrack();
56 }
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

◆ setCommissioning()

void MuonCombined::MuonCandidate::setCommissioning ( bool b)

◆ setSegments()

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

set the vector of associated segments to the candidate

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

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

◆ toString()

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

print candidate to string

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

33 {
34 const Trk::Track* track = primaryTrack();
35 const Trk::Perigee* perigee = track->perigeeParameters();
36 std::ostringstream sout;
37 if (!perigee)
38 sout << " Track has no perigee parameters!";
39 else
40 sout << " pt " << perigee->momentum().perp() << " eta " << perigee->momentum().eta() << " phi " << perigee->momentum().phi();
41 sout << " hasExtrapolatedTrack " << (extrapolatedTrack() ? "yes" : "no") << std::endl;
42 return sout.str();
43 }
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 90 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 93 of file Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h.

93{0};

◆ m_extrapolatedParticleLink

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

element link to the extrapolated muon track particle

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

79{};

◆ m_extrapolatedTrackLink

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

element link to extrapolated track

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

81{};

◆ m_isCommissioning

bool MuonCombined::MuonCandidate::m_isCommissioning {false}
private

flag whether the track belongs to the comissioning stream

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

87{false};

◆ m_muonSpectrometerTrack

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

pointer to spectrometer track, not owned

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

84{nullptr};

◆ m_muonSpectrometerTrackLink

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

element link to spectrometer track

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

77{};

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