ATLAS Offline Software
Public Member Functions | List of all members
MuonHough::SortHitsPerLayer Struct Reference

struct to sort the hits More...

#include <Hit.h>

Collaboration diagram for MuonHough::SortHitsPerLayer:

Public Member Functions

bool operator() (const Hit &hit1, const Hit &hit2) const
 
bool operator() (const PhiHit &hit1, const PhiHit &hit2) const
 
bool compare (float val1, float val2, int lay1, int lay2, const HitDebugInfo *db1, const HitDebugInfo *db2) const
 
bool operator() (const Hit *hit1, const Hit *hit2) const
 
bool operator() (const PhiHit *hit1, const PhiHit *hit2) const
 
bool operator() (const std::shared_ptr< Hit > &hit1, const std::shared_ptr< Hit > &hit2) const
 
bool operator() (const std::shared_ptr< PhiHit > &hit1, const std::shared_ptr< PhiHit > &hit2) const
 

Detailed Description

struct to sort the hits

Definition at line 173 of file MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h.

Member Function Documentation

◆ compare()

bool MuonHough::SortHitsPerLayer::compare ( float  val1,
float  val2,
int  lay1,
int  lay2,
const HitDebugInfo db1,
const HitDebugInfo db2 
) const
inline

Definition at line 182 of file MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h.

182  {
183  if (db1 && db2) {
184  if (db1->sector != db2->sector) return db1->sector < db2->sector;
185  if (db1->region != db2->region) return db1->region < db2->region;
186  if (db1->type != db2->type) return db1->type < db2->type;
187  if (db1->layer != db2->layer) return db1->layer < db2->layer;
188  if (db1->sublayer != db2->sublayer) return db1->sublayer < db2->sublayer;
189  } else {
190  if (lay1 != lay2) return lay1 < lay2;
191  }
192  return CxxUtils::fpcompare::less(val1, val2);
193  }

◆ operator()() [1/6]

bool MuonHough::SortHitsPerLayer::operator() ( const Hit hit1,
const Hit hit2 
) const
inline

Definition at line 174 of file MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h.

174  {
175  return compare(hit1.ymin, hit2.ymin, hit1.layer, hit2.layer, hit1.debugInfo(), hit2.debugInfo());
176  }

◆ operator()() [2/6]

bool MuonHough::SortHitsPerLayer::operator() ( const Hit hit1,
const Hit hit2 
) const
inline

◆ operator()() [3/6]

bool MuonHough::SortHitsPerLayer::operator() ( const PhiHit hit1,
const PhiHit hit2 
) const
inline

Definition at line 178 of file MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h.

178  {
179  return compare(hit1.phimin, hit2.phimin, hit1.layer, hit2.layer, hit1.debugInfo(), hit2.debugInfo());
180  }

◆ operator()() [4/6]

bool MuonHough::SortHitsPerLayer::operator() ( const PhiHit hit1,
const PhiHit hit2 
) const
inline

◆ operator()() [5/6]

bool MuonHough::SortHitsPerLayer::operator() ( const std::shared_ptr< Hit > &  hit1,
const std::shared_ptr< Hit > &  hit2 
) const
inline

◆ operator()() [6/6]

bool MuonHough::SortHitsPerLayer::operator() ( const std::shared_ptr< PhiHit > &  hit1,
const std::shared_ptr< PhiHit > &  hit2 
) const
inline

The documentation for this struct was generated from the following file:
MuonHough::SortHitsPerLayer::operator()
bool operator()(const Hit &hit1, const Hit &hit2) const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:174
bsCompare.db1
int db1
Definition: bsCompare.py:40
DeMoUpdate.db2
string db2
Definition: DeMoUpdate.py:1032
CxxUtils::fpcompare::less
bool less(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:166
MuonHough::SortHitsPerLayer::compare
bool compare(float val1, float val2, int lay1, int lay2, const HitDebugInfo *db1, const HitDebugInfo *db2) const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:182