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
CompareDetY_minus Class Reference

#include <CRackTrajectoryBuilder.h>

Public Member Functions

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

Private Attributes

const TrackerGeometry_tracker
 

Detailed Description

Definition at line 67 of file CRackTrajectoryBuilder.h.

Constructor & Destructor Documentation

CompareDetY_minus::CompareDetY_minus ( const TrackerGeometry tracker)
inline

Definition at line 69 of file CRackTrajectoryBuilder.h.

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

Member Function Documentation

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

Definition at line 70 of file CRackTrajectoryBuilder.h.

References _tracker, TrackingRecHit::geographicalId(), TrackerGeometry::idToDet(), GeomDet::position(), and PV3DBase< T, PVType, FrameType >::y().

72  {
73  const GeomDet* detPos1 = _tracker.idToDet(rh1->geographicalId());
74  const GeomDet* detPos2 = _tracker.idToDet(rh2->geographicalId());
75 
76  GlobalPoint gp1 = detPos1->position();
77  GlobalPoint gp2 = detPos2->position();
78 
79  if (gp1.y()<gp2.y())
80  return true;
81  if (gp1.y()>gp2.y())
82  return false;
83  // if (gp1.y()== gp2.y())
84  //
85  return (rh1->geographicalId() < rh2->geographicalId());
86  };
T y() const
Definition: PV3DBase.h:63
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:46
DetId geographicalId() const
const TrackerGeometry & _tracker
virtual const TrackerGeomDet * idToDet(DetId) const

Member Data Documentation

const TrackerGeometry& CompareDetY_minus::_tracker
private

Definition at line 86 of file CRackTrajectoryBuilder.h.

Referenced by operator()().