ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Muon::SortTSOSsByPos Class Reference

#include <SortMeasurementsByPosition.h>

Collaboration diagram for Muon::SortTSOSsByPos:

Public Member Functions

 SortTSOSsByPos (bool isEndcap)
 
double operator() (const Trk::TrackStateOnSurface *tsos1, const Trk::TrackStateOnSurface *tsos2)
 

Private Member Functions

Amg::Vector3D position (const Trk::TrackStateOnSurface &tsos)
 

Private Attributes

bool m_isEndcap
 
Amg::Vector3D m_dummyPosition
 

Detailed Description

Definition at line 33 of file SortMeasurementsByPosition.h.

Constructor & Destructor Documentation

◆ SortTSOSsByPos()

Muon::SortTSOSsByPos::SortTSOSsByPos ( bool  isEndcap)
inline

Definition at line 35 of file SortMeasurementsByPosition.h.

35 : m_isEndcap(isEndcap), m_dummyPosition(0., 0., 0.) {}

Member Function Documentation

◆ operator()()

double Muon::SortTSOSsByPos::operator() ( const Trk::TrackStateOnSurface tsos1,
const Trk::TrackStateOnSurface tsos2 
)
inline

Definition at line 36 of file SortMeasurementsByPosition.h.

36  {
37  if (m_isEndcap)
38  return std::abs(position(*tsos1).z()) < std::abs(position(*tsos2).z());
39  else
40  return position(*tsos1).perp() < position(*tsos2).perp();
41  }

◆ position()

Amg::Vector3D Muon::SortTSOSsByPos::position ( const Trk::TrackStateOnSurface tsos)
inlineprivate

Definition at line 44 of file SortMeasurementsByPosition.h.

44  {
45  if (tsos.trackParameters())
46  return tsos.trackParameters()->position();
47  else if (tsos.measurementOnTrack())
48  return tsos.measurementOnTrack()->globalPosition();
49  return m_dummyPosition;
50  }

Member Data Documentation

◆ m_dummyPosition

Amg::Vector3D Muon::SortTSOSsByPos::m_dummyPosition
private

Definition at line 52 of file SortMeasurementsByPosition.h.

◆ m_isEndcap

bool Muon::SortTSOSsByPos::m_isEndcap
private

Definition at line 51 of file SortMeasurementsByPosition.h.


The documentation for this class was generated from the following file:
Muon::SortTSOSsByPos::m_dummyPosition
Amg::Vector3D m_dummyPosition
Definition: SortMeasurementsByPosition.h:52
Trk::TrackStateOnSurface::trackParameters
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Trk::TrackStateOnSurface::measurementOnTrack
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
Trk::MeasurementBase::globalPosition
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
Muon::SortTSOSsByPos::m_isEndcap
bool m_isEndcap
Definition: SortMeasurementsByPosition.h:51
Muon::SortTSOSsByPos::position
Amg::Vector3D position(const Trk::TrackStateOnSurface &tsos)
Definition: SortMeasurementsByPosition.h:44