ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::IdentifierSorter Class Reference

Helper struct to establish a sorting of the muon measurements based on their Identifier. More...

#include <IdentifierSorter.h>

Collaboration diagram for MuonR4::IdentifierSorter:

Public Member Functions

 IdentifierSorter ()=default
 default constructor
bool operator() (const xAOD::MuonMeasurement *a, const xAOD::MuonMeasurement *b) const
 Sorting operator.

Detailed Description

Helper struct to establish a sorting of the muon measurements based on their Identifier.

Measurements are first sorted by their associated readout element, then by the measurement layer. Precision measurements are then ordered before the non-precision measurements

Definition at line 14 of file IdentifierSorter.h.

Constructor & Destructor Documentation

◆ IdentifierSorter()

MuonR4::IdentifierSorter::IdentifierSorter ( )
default

default constructor

Member Function Documentation

◆ operator()()

bool MuonR4::IdentifierSorter::operator() ( const xAOD::MuonMeasurement * a,
const xAOD::MuonMeasurement * b ) const

Sorting operator.

Definition at line 10 of file IdentifierSorter.cxx.

10 {
11 if (a->type() != b->type()) {
12 return Acts::toUnderlying(a->type()) < Acts::toUnderlying(b->type());
13 }
14 if (a->identifierHash() != b->identifierHash()) {
15 return a->identifierHash() < b->identifierHash();
16 }
17 if (a->layerHash() < b->layerHash()) {
18 return a->layerHash() < b->layerHash();
19 }
20 if (a->measuresPhi() < b->measuresPhi()) {
21 return b->measuresPhi();
22 }
23 return a->measurementHash() < b->measurementHash();
24}
static Double_t a

The documentation for this class was generated from the following files: