ATLAS Offline Software
InDetCandidate.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iostream>
8 
9 namespace MuonCombined {
10 
11  InDetCandidate::InDetCandidate(const xAOD::TrackParticle& idTrack) : m_idTrackParticle{&idTrack} {}
12 
14 
16 
17  std::string InDetCandidate::toString() const {
18  std::ostringstream sout;
19  sout << " pt: " << indetTrackParticle().pt() * 1.e-3 << " GeV, eta: " << indetTrackParticle().eta()
20  << ", phi: " << indetTrackParticle().phi();
21  sout << ", d0: " << indetTrackParticle().d0() << ", z0: " << indetTrackParticle().z0() << ", q: " << indetTrackParticle().charge()
22  << " ";
23  if (isSiliconAssociated()) sout << " is SAF.";
24  return sout.str();
25  }
26 
29  return **m_idTrackParticleLink;
30  return *m_idTrackParticle;
31  }
32 
34 
36 
38 
39  void InDetCandidate::setExtension(std::unique_ptr<Muon::MuonSystemExtension> extension) { m_extension = std::move(extension); }
40  void InDetCandidate::setExtension(std::unique_ptr<Trk::CaloExtension>& extension) {
41  m_calo_extension = std::move(extension);
43  }
45 
48 
49  bool InDetCandidate::operator==(const InDetCandidate& other) const { return &other.indetTrackParticle() == &indetTrackParticle(); }
50 
51 } // namespace MuonCombined
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
MuonCombined::InDetCandidate::getExtension
const Muon::MuonSystemExtension * getExtension() const
Definition: InDetCandidate.cxx:46
MuonCombined::InDetCandidate::~InDetCandidate
~InDetCandidate()
destructor
Trk::CaloExtension
Tracking class to hold the extrapolation from a particle from the ID to the muon system (or the other...
Definition: CaloExtension.h:18
MuonCombined::InDetCandidate::m_siAssociated
bool m_siAssociated
Was this created using a special far forward indet track.
Definition: InDetCandidate.h:71
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:150
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
MuonCombined::InDetCandidate
Definition: InDetCandidate.h:18
MuonCombined::InDetCandidate::m_extension
std::unique_ptr< Muon::MuonSystemExtension > m_extension
Definition: InDetCandidate.h:73
athena.value
value
Definition: athena.py:124
MuonCombined::InDetCandidate::indetTrackParticleLink
const ElementLink< xAOD::TrackParticleContainer > & indetTrackParticleLink() const
access TrackParticleLink
Definition: InDetCandidate.cxx:33
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
MuonCombined::InDetCandidate::setSiliconAssociated
void setSiliconAssociated(bool)
Pass true if this candiate was created from a special far forward InDet track.
Definition: InDetCandidate.cxx:37
MuonCombined::InDetCandidate::m_idTrackParticle
const xAOD::TrackParticle * m_idTrackParticle
cached pointer to the InDet TrackParticle
Definition: InDetCandidate.h:68
xAOD::idTrackLink
setStrategy setMatchFlag idTrackLink
Definition: L2CombinedMuon_v1.cxx:117
Muon::MuonSystemExtension
Tracking class to hold the extrapolation from a particle from the calo entry to the end of muon syste...
Definition: MuonSystemExtension.h:18
MuonCombined::InDetCandidate::m_idTrackParticleLink
ElementLink< xAOD::TrackParticleContainer > m_idTrackParticleLink
ElementLink to the InDet TrackParticle.
Definition: InDetCandidate.h:65
InDetCandidate.h
MuonCombined::InDetCandidate::toString
std::string toString() const
print candidate to string
Definition: InDetCandidate.cxx:17
MuonCombined::InDetCandidate::getCaloExtension
const Trk::CaloExtension * getCaloExtension() const
Definition: InDetCandidate.cxx:47
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonCombined::InDetCandidate::indetTrackParticle
const xAOD::TrackParticle & indetTrackParticle() const
access TrackParticle
Definition: InDetCandidate.cxx:27
MuonCombined::InDetCandidate::isSiliconAssociated
bool isSiliconAssociated() const
Returns true if this candidate was formed from a special far forward InDet track.
Definition: InDetCandidate.cxx:35
MuonCombined
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
Definition: IMuonSystemExtensionTool.h:23
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
MuonCombined::InDetCandidate::operator==
bool operator==(const InDetCandidate &other) const
Define two InDetCandidates to be equal if they are built from the same track.
Definition: InDetCandidate.cxx:49
MuonCombined::InDetCandidate::InDetCandidate
InDetCandidate(const xAOD::TrackParticle &idTrack)
constructor taking a xAOD::TrackParicle& Users should ensure that the lifetime of the idTrack object ...
Definition: InDetCandidate.cxx:11
MuonCombined::InDetCandidate::m_calo_extension_ptr
const Trk::CaloExtension * m_calo_extension_ptr
Definition: InDetCandidate.h:75
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
MuonCombined::InDetCandidate::m_calo_extension
std::unique_ptr< Trk::CaloExtension > m_calo_extension
Definition: InDetCandidate.h:74
MuonCombined::InDetCandidate::setExtension
void setExtension(std::unique_ptr< Muon::MuonSystemExtension > extension)
Definition: InDetCandidate.cxx:39