ATLAS Offline Software
Loading...
Searching...
No Matches
MuonML::InferenceUtils::SegmentQualityOrder Struct Reference

Common quality ordering for segment representatives. More...

#include <InferenceUtils.h>

Collaboration diagram for MuonML::InferenceUtils::SegmentQualityOrder:

Public Member Functions

bool operator() (const xAOD::MuonSegment *first, const xAOD::MuonSegment *second) const

Detailed Description

Common quality ordering for segment representatives.

Higher hit/layer counts are preferred, followed by lower reduced chi2 and finally the stable container index. Keeping this comparator here prevents graph construction and component ranking from acquiring different tie-break rules.

Definition at line 66 of file InferenceUtils.h.

Member Function Documentation

◆ operator()()

bool MuonML::InferenceUtils::SegmentQualityOrder::operator() ( const xAOD::MuonSegment * first,
const xAOD::MuonSegment * second ) const
inline

Definition at line 67 of file InferenceUtils.h.

68 {
69 if (first->nPrecisionHits() != second->nPrecisionHits()) {
70 return first->nPrecisionHits() > second->nPrecisionHits();
71 }
72 if (first->nPhiLayers() != second->nPhiLayers()) {
73 return first->nPhiLayers() > second->nPhiLayers();
74 }
75 if (first->nTrigEtaLayers() != second->nTrigEtaLayers()) {
76 return first->nTrigEtaLayers() > second->nTrigEtaLayers();
77 }
78 const int chi2Order = compareFloat(reducedChi2(*first),
79 reducedChi2(*second));
80 if (chi2Order != 0) return chi2Order < 0;
81 return first->index() < second->index();
82 }
bool first
Definition DeMoScan.py:534
int compareFloat(float first, float second)
Three-way float comparison which orders NaN after all numeric values.
float reducedChi2(const xAOD::MuonSegment &segment)

The documentation for this struct was generated from the following file: