ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
MuonIdentification
MuonCombinedEvent
src
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonCombinedEvent/MuonCandidate.h
"
6
7
#include "
MuonSegment/MuonSegment.h
"
8
#include "
TrkParameters/TrackParameters.h
"
9
#include "
TrkTrack/Track.h
"
10
11
namespace
MuonCombined
{
12
13
MuonCandidate::MuonCandidate
(
const
ElementLink<xAOD::TrackParticleContainer>
& trackLink) :
14
m_muonSpectrometerTrackLink
(trackLink),
m_muonSpectrometerTrack
((*
m_muonSpectrometerTrackLink
)->track()) {}
15
MuonCandidate::MuonCandidate
(
const
ElementLink<xAOD::TrackParticleContainer>
& trackLink,
16
const
ElementLink<TrackCollection>
& saTrackLink,
size_t
container_idx) :
17
m_muonSpectrometerTrackLink
(trackLink),
18
m_extrapolatedTrackLink
(saTrackLink),
19
m_muonSpectrometerTrack
((*
m_muonSpectrometerTrackLink
)->track()),
20
m_extContIdx
(container_idx) {}
21
22
MuonCandidate::MuonCandidate
(
const
MuonCandidate
& oldCandidate,
const
ElementLink<xAOD::TrackParticleContainer>
& msoeTrackLink) :
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
} {}
29
30
MuonCandidate::~MuonCandidate
() =
default
;
31
32
std::string
MuonCandidate::toString
()
const
{
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
}
43
44
const
Trk::Track
&
MuonCandidate::muonSpectrometerTrack
()
const
{
return
*
m_muonSpectrometerTrack
; }
45
46
const
ElementLink<xAOD::TrackParticleContainer>
&
MuonCandidate::muonSpectrometerTrackLink
()
const
{
47
return
m_muonSpectrometerTrackLink
;
48
}
49
const
Trk::Track
*
MuonCandidate::extrapolatedTrack
()
const
{
50
return
m_extrapolatedTrackLink
.isValid() ? *
m_extrapolatedTrackLink
:
nullptr
;
51
}
52
const
Trk::Track
*
MuonCandidate::primaryTrack
()
const
{
53
const
Trk::Track
* ext_trk =
extrapolatedTrack
();
54
return
ext_trk ? ext_trk : &
muonSpectrometerTrack
();
55
}
56
57
const
ElementLink<TrackCollection>
&
MuonCandidate::extrapolatedTrackLink
()
const
{
return
m_extrapolatedTrackLink
; }
58
size_t
MuonCandidate::extrapolatedElementID
()
const
{
return
m_extrapolatedTrackLink
.isValid() ?
m_extContIdx
: -1; }
59
60
void
MuonCandidate::setSegments
(std::vector<const Muon::MuonSegment*>&& segments) {
m_assoc_segments
= std::move(segments); }
61
const
std::vector<const Muon::MuonSegment*>&
MuonCandidate::getSegments
()
const
{
return
m_assoc_segments
; }
62
const
ElementLink<xAOD::TrackParticleContainer>
&
MuonCandidate::extrapolatedParticleLink
()
const
{
return
m_extrapolatedParticleLink
; }
63
64
}
// namespace MuonCombined
MuonSegment.h
MuonCandidate.h
TrackParameters.h
Track.h
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:40
MuonCombined::MuonCandidate::m_extContIdx
size_t m_extContIdx
Index of the MSOE track in the output container.
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:85
MuonCombined::MuonCandidate::setSegments
void setSegments(std::vector< const Muon::MuonSegment * > &&segments)
set the vector of associated segments to the candidate
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:60
MuonCombined::MuonCandidate::m_extrapolatedTrackLink
const ElementLink< TrackCollection > m_extrapolatedTrackLink
element link to extrapolated track
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:76
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:74
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:82
MuonCombined::MuonCandidate::m_muonSpectrometerTrackLink
const ElementLink< xAOD::TrackParticleContainer > m_muonSpectrometerTrackLink
element link to spectrometer track
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:72
MuonCombined::MuonCandidate::muonSpectrometerTrack
const Trk::Track & muonSpectrometerTrack() const
access spectrometer track, always there
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:44
MuonCombined::MuonCandidate::~MuonCandidate
~MuonCandidate()
destructor
MuonCombined::MuonCandidate::primaryTrack
const Trk::Track * primaryTrack() const
Returns the extrapolated track otherwise the muonSpectrometer.
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:52
MuonCombined::MuonCandidate::toString
std::string toString() const
print candidate to string
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:32
MuonCombined::MuonCandidate::MuonCandidate
MuonCandidate(const ElementLink< xAOD::TrackParticleContainer > &msTrackLink)
constructor taking an ElementLink to a xAOD::TrackParicle& Users should ensure that the element link ...
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:13
MuonCombined::MuonCandidate::extrapolatedTrackLink
const ElementLink< TrackCollection > & extrapolatedTrackLink() const
access extrapolated track element link
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:57
MuonCombined::MuonCandidate::getSegments
const std::vector< const Muon::MuonSegment * > & getSegments() const
returns the vector of associated muon segments
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:61
MuonCombined::MuonCandidate::muonSpectrometerTrackLink
const ElementLink< xAOD::TrackParticleContainer > & muonSpectrometerTrackLink() const
access spectrometer track, always there
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:46
MuonCombined::MuonCandidate::extrapolatedParticleLink
const ElementLink< xAOD::TrackParticleContainer > & extrapolatedParticleLink() const
access extrapolated track particle element link
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:62
MuonCombined::MuonCandidate::m_muonSpectrometerTrack
const Trk::Track * m_muonSpectrometerTrack
pointer to spectrometer track, not owned
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:79
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:49
MuonCombined::MuonCandidate::extrapolatedElementID
size_t extrapolatedElementID() const
returns the index of the container where the extrapolated track is located
Definition
Reconstruction/MuonIdentification/MuonCombinedEvent/src/MuonCandidate.cxx:58
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
Trk::Track
The ATLAS Track class.
Definition
Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
MuonCombined
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
Definition
IMuonSystemExtensionTool.h:23
Trk::Perigee
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
Definition
Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:33
Generated on
for ATLAS Offline Software by
1.17.0