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 180 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 189 of file MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h.

189  {
190  if (db1 && db2) {
191  if (db1->sector != db2->sector) return db1->sector < db2->sector;
192  if (db1->region != db2->region) return db1->region < db2->region;
193  if (db1->type != db2->type) return db1->type < db2->type;
194  if (db1->layer != db2->layer) return db1->layer < db2->layer;
195  if (db1->sublayer != db2->sublayer) return db1->sublayer < db2->sublayer;
196  } else {
197  if (lay1 != lay2) return lay1 < lay2;
198  }
199  return CxxUtils::fpcompare::less(val1, val2);
200  }

◆ operator()() [1/6]

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

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

181  {
182  return compare(hit1.ymin, hit2.ymin, hit1.layer, hit2.layer, hit1.debugInfo(), hit2.debugInfo());
183  }

◆ 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 185 of file MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h.

185  {
186  return compare(hit1.phimin, hit2.phimin, hit1.layer, hit2.layer, hit1.debugInfo(), hit2.debugInfo());
187  }

◆ 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:181
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:189