ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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. More...
 
 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 More...
 
const Trk::TrackmuonSpectrometerTrack () const
 access spectrometer track, always there More...
 
const ElementLink< xAOD::TrackParticleContainer > & muonSpectrometerTrackLink () const
 access spectrometer track, always there More...
 
const Trk::TrackextrapolatedTrack () const
 access extrapolated track, can be zero if back extrapolation failed More...
 
const Trk::TrackprimaryTrack () const
 Returns the extrapolated track otherwise the muonSpectrometer. More...
 
const ElementLink< TrackCollection > & extrapolatedTrackLink () const
 access extrapolated track element link More...
 
size_t extrapolatedElementID () const
 returns the index of the container where the extrapolated track is located More...
 
const ElementLink< xAOD::TrackParticleContainer > & extrapolatedParticleLink () const
 access extrapolated track particle element link More...
 
std::string toString () const
 print candidate to string More...
 
void setCommissioning (bool b)
 Sets ths comissioning flag. More...
 
bool isCommissioning () const
 Returns whether the muon belongs to the comissioning chain. More...
 
void setSegments (std::vector< const Muon::MuonSegment * > &&segments)
 set the vector of associated segments to the candidate More...
 
const std::vector< const Muon::MuonSegment * > & getSegments () const
 returns the vector of associated muon segments More...
 

Private Attributes

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

Detailed Description

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

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()) {}

◆ 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  :
17  m_muonSpectrometerTrackLink(trackLink),
18  m_extrapolatedTrackLink(saTrackLink),
19  m_muonSpectrometerTrack((*m_muonSpectrometerTrackLink)->track()),
20  m_extContIdx(container_idx) {}

◆ 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} {}

◆ ~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  {
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.

58 { return m_extrapolatedTrackLink; }

◆ 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  }

◆ setCommissioning()

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

Sets ths comissioning flag.

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

60 { m_isCommissioning = 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  }

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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.


The documentation for this class was generated from the following files:
MuonCombined::MuonCandidate::m_extrapolatedParticleLink
const ElementLink< xAOD::TrackParticleContainer > m_extrapolatedParticleLink
element link to the extrapolated muon track particle
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:79
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
MuonCombined::MuonCandidate::primaryTrack
const Trk::Track * primaryTrack() const
Returns the extrapolated track otherwise the muonSpectrometer.
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:53
MuonCombined::MuonCandidate::m_muonSpectrometerTrack
const Trk::Track * m_muonSpectrometerTrack
pointer to spectrometer track, not owned
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:84
MuonCombined::MuonCandidate::m_muonSpectrometerTrackLink
const ElementLink< xAOD::TrackParticleContainer > m_muonSpectrometerTrackLink
element link to spectrometer track
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:77
MuonCombined::MuonCandidate::m_assoc_segments
std::vector< const Muon::MuonSegment * > m_assoc_segments
Segments associated with the candidate.
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:90
MuonCombined::MuonCandidate::m_extrapolatedTrackLink
const ElementLink< TrackCollection > m_extrapolatedTrackLink
element link to extrapolated track
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:81
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
MuonCombined::MuonCandidate::extrapolatedTrack
const Trk::Track * extrapolatedTrack() const
access extrapolated track, can be zero if back extrapolation failed
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:50
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
MuonCombined::MuonCandidate::muonSpectrometerTrack
const Trk::Track & muonSpectrometerTrack() const
access spectrometer track, always there
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:45
MuonCombined::MuonCandidate::m_isCommissioning
bool m_isCommissioning
flag whether the track belongs to the comissioning stream
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:87
MuonCombined::MuonCandidate::m_extContIdx
size_t m_extContIdx
Index of the MSOE track in the output container.
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:93