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

#include <SortMeasurementsByPosition.h>

Collaboration diagram for Muon::SortMeasurementsByPosition:

Public Member Functions

 SortMeasurementsByPosition (bool hasEndcap=true)
 
bool operator() (const Trk::MeasurementBase *meas1, const Trk::MeasurementBase *meas2)
 

Private Member Functions

const Trk::MeasurementBasegetMeas (const Trk::MeasurementBase *meas) const
 

Private Attributes

bool m_isEndcap
 

Detailed Description

Definition at line 152 of file SortMeasurementsByPosition.h.

Constructor & Destructor Documentation

◆ SortMeasurementsByPosition()

Muon::SortMeasurementsByPosition::SortMeasurementsByPosition ( bool  hasEndcap = true)
inline

Definition at line 154 of file SortMeasurementsByPosition.h.

154 : m_isEndcap(hasEndcap) {}

Member Function Documentation

◆ getMeas()

const Trk::MeasurementBase* Muon::SortMeasurementsByPosition::getMeas ( const Trk::MeasurementBase meas) const
inlineprivate

Definition at line 168 of file SortMeasurementsByPosition.h.

168  {
169  const CompetingMuonClustersOnTrack* cm = dynamic_cast<const CompetingMuonClustersOnTrack*>(meas);
170  if (cm) {
171  if (cm->numberOfContainedROTs() != 0) return &cm->rioOnTrack(cm->indexOfMaxAssignProb());
172  }
173  return meas;
174  }

◆ operator()()

bool Muon::SortMeasurementsByPosition::operator() ( const Trk::MeasurementBase meas1,
const Trk::MeasurementBase meas2 
)
inline

Definition at line 156 of file SortMeasurementsByPosition.h.

156  {
157  const Trk::MeasurementBase* m1 = getMeas(meas1);
158  const Trk::MeasurementBase* m2 = getMeas(meas2);
159 
160  double d1 = m_isEndcap ? std::abs(m1->globalPosition().z()) : std::abs(m1->globalPosition().perp());
161  double d2 = m_isEndcap ? std::abs(m2->globalPosition().z()) : std::abs(m2->globalPosition().perp());
162  bool result = d1 < d2;
163  return result;
164  }

Member Data Documentation

◆ m_isEndcap

bool Muon::SortMeasurementsByPosition::m_isEndcap
private

Definition at line 176 of file SortMeasurementsByPosition.h.


The documentation for this class was generated from the following file:
get_generator_info.result
result
Definition: get_generator_info.py:21
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
Muon::SortMeasurementsByPosition::getMeas
const Trk::MeasurementBase * getMeas(const Trk::MeasurementBase *meas) const
Definition: SortMeasurementsByPosition.h:168
perp
Scalar perp() const
perp method - perpenticular length
Definition: AmgMatrixBasePlugin.h:44
dq_defect_virtual_defect_validation.d1
d1
Definition: dq_defect_virtual_defect_validation.py:79
Muon::SortMeasurementsByPosition::m_isEndcap
bool m_isEndcap
Definition: SortMeasurementsByPosition.h:176
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
python.changerun.m1
m1
Definition: changerun.py:32
Trk::MeasurementBase
Definition: MeasurementBase.h:58
dq_defect_virtual_defect_validation.d2
d2
Definition: dq_defect_virtual_defect_validation.py:81