CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SortHitPointersByY Class Reference

#include <RoadSearchHitSorting.h>

Public Member Functions

bool operator() (const TrackingRecHit *rh1, const TrackingRecHit *rh2) const
 
 SortHitPointersByY (const TrackerGeometry &tracker)
 

Private Attributes

const TrackerGeometry_tracker
 

Detailed Description

Definition at line 112 of file RoadSearchHitSorting.h.

Constructor & Destructor Documentation

SortHitPointersByY::SortHitPointersByY ( const TrackerGeometry tracker)
inline

Definition at line 114 of file RoadSearchHitSorting.h.

114 :_tracker(tracker){}
const TrackerGeometry & _tracker

Member Function Documentation

bool SortHitPointersByY::operator() ( const TrackingRecHit rh1,
const TrackingRecHit rh2 
) const
inline

Definition at line 115 of file RoadSearchHitSorting.h.

References _tracker, abs, TrackingRecHit::geographicalId(), TrackerGeometry::idToDet(), TrackingRecHit::localPosition(), query::result, GeomDet::toGlobal(), and detailsBasic3DVector::y.

117  {
118  bool result =
119  static_cast<unsigned int>(std::abs(_tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition()).y()) * 1E7) <
120  static_cast<unsigned int>(std::abs(_tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition()).y()) * 1E7) ;
121  return result;
122  };
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:47
#define abs(x)
Definition: mlp_lapack.h:159
tuple result
Definition: query.py:137
const TrackerGeometry & _tracker
virtual const GeomDet * idToDet(DetId) const
DetId geographicalId() const
virtual LocalPoint localPosition() const =0

Member Data Documentation

const TrackerGeometry& SortHitPointersByY::_tracker
private

Definition at line 122 of file RoadSearchHitSorting.h.

Referenced by operator()().