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

#include <MuonCandidateTrackBuilderTool.h>

Collaboration diagram for Muon::SortMeas:

Public Member Functions

bool operator() (const Trk::MeasurementBase *mst1, const Trk::MeasurementBase *mst2) const
 
 SortMeas (const IMuonEDMHelperSvc *h, const IMuonIdHelperSvc *idh, bool end)
 

Public Attributes

const IMuonEDMHelperSvcm_edmHelperSvc
 
const IMuonIdHelperSvcm_idHelperSvc
 
bool isEndcap
 

Detailed Description

Definition at line 24 of file MuonCandidateTrackBuilderTool.h.

Constructor & Destructor Documentation

◆ SortMeas()

Muon::SortMeas::SortMeas ( const IMuonEDMHelperSvc h,
const IMuonIdHelperSvc idh,
bool  end 
)
inline

Definition at line 68 of file MuonCandidateTrackBuilderTool.h.

68  :

Member Function Documentation

◆ operator()()

bool Muon::SortMeas::operator() ( const Trk::MeasurementBase mst1,
const Trk::MeasurementBase mst2 
) const
inline

Definition at line 26 of file MuonCandidateTrackBuilderTool.h.

26  {
27  if (isEndcap) {
28  return std::abs(mst1->globalPosition().z()) < std::abs(mst2->globalPosition().z());
29  } else {
32  // for pseudomeasurements
33  if (!id1.is_valid() || !id2.is_valid())
34  return std::abs(mst1->globalPosition().perp()) < std::abs(mst2->globalPosition().perp());
35  // use r value if both are mdts or if they belong to different chambers
36  // for the case where it's rpc and mdt from the same chamber, use the doublet R
37  if ((m_idHelperSvc->isMdt(id1) && m_idHelperSvc->isMdt(id2)) ||
39  return mst1->globalPosition().perp() < mst2->globalPosition().perp();
40  else if (m_idHelperSvc->isRpc(id1) && m_idHelperSvc->isMdt(id2)) {
41  if (m_idHelperSvc->rpcIdHelper().doubletR(id1) == 1) {
42  if (m_idHelperSvc->stationIndex(id2) == MuonStationIndex::StIndex::BM || m_idHelperSvc->isSmallChamber(id2))
43  return true;
44  else
45  return false;
46  } else
47  return false;
48  } else if (m_idHelperSvc->isRpc(id2) && m_idHelperSvc->isMdt(id1)) {
49  if (m_idHelperSvc->rpcIdHelper().doubletR(id2) == 1) {
50  if (m_idHelperSvc->stationIndex(id1) == MuonStationIndex::StIndex::BM || m_idHelperSvc->isSmallChamber(id1))
51  return false;
52  else
53  return true;
54  } else
55  return true;
56  } else {
63  } else
64  return mst1->globalPosition().perp() < mst2->globalPosition().perp();
65  }
66  }
67  }

Member Data Documentation

◆ isEndcap

bool Muon::SortMeas::isEndcap

Definition at line 73 of file MuonCandidateTrackBuilderTool.h.

◆ m_edmHelperSvc

const IMuonEDMHelperSvc* Muon::SortMeas::m_edmHelperSvc

Definition at line 71 of file MuonCandidateTrackBuilderTool.h.

◆ m_idHelperSvc

const IMuonIdHelperSvc* Muon::SortMeas::m_idHelperSvc

Definition at line 72 of file MuonCandidateTrackBuilderTool.h.


The documentation for this class was generated from the following file:
Muon::IMuonEDMHelperSvc::getIdentifier
virtual Identifier getIdentifier(const Trk::MeasurementBase &meas) const =0
tries to get Identifier for measurement, if not possible it will return Identifier()
Muon::IMuonIdHelperSvc::stationIndex
virtual MuonStationIndex::StIndex stationIndex(const Identifier &id) const =0
calculate station index from Identifier
RpcIdHelper::doubletZ
int doubletZ(const Identifier &id) const
Definition: RpcIdHelper.cxx:1062
Muon::SortMeas::m_idHelperSvc
const IMuonIdHelperSvc * m_idHelperSvc
Definition: MuonCandidateTrackBuilderTool.h:72
Muon::IMuonIdHelperSvc::isRpc
virtual bool isRpc(const Identifier &id) const =0
returns whether this is a RPC Identifier or not
Identifier::is_valid
bool is_valid() const
Check if id is in a valid state.
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
id2
HWIdentifier id2
Definition: LArRodBlockPhysicsV0.cxx:564
RpcIdHelper::doubletR
int doubletR(const Identifier &id) const
Definition: RpcIdHelper.cxx:1060
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
Muon::IMuonIdHelperSvc::chamberIndex
virtual MuonStationIndex::ChIndex chamberIndex(const Identifier &id) const =0
calculate chamber index from Identifier
Muon::IMuonIdHelperSvc::isMdt
virtual bool isMdt(const Identifier &id) const =0
returns whether this is a MDT Identifier or not
Muon::IMuonIdHelperSvc::isSmallChamber
virtual bool isSmallChamber(const Identifier &id) const =0
returns whether this is a small chamber, always returns true for TGCs
Trk::MeasurementBase::globalPosition
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
Muon::SortMeas::isEndcap
bool isEndcap
Definition: MuonCandidateTrackBuilderTool.h:73
Muon::SortMeas::m_edmHelperSvc
const IMuonEDMHelperSvc * m_edmHelperSvc
Definition: MuonCandidateTrackBuilderTool.h:71
h
Muon::IMuonIdHelperSvc::rpcIdHelper
virtual const RpcIdHelper & rpcIdHelper() const =0
access to RpcIdHelper
RpcIdHelper::doubletPhi
int doubletPhi(const Identifier &id) const
Definition: RpcIdHelper.cxx:1064