CMS 3D CMS Logo

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 65 of file CRackTrajectoryBuilder.h.

Constructor & Destructor Documentation

CompareDetY_minus::CompareDetY_minus ( const TrackerGeometry tracker)
inline

Definition at line 67 of file CRackTrajectoryBuilder.h.

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

Member Function Documentation

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

Definition at line 68 of file CRackTrajectoryBuilder.h.

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

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

Member Data Documentation

const TrackerGeometry& CompareDetY_minus::_tracker
private

Definition at line 82 of file CRackTrajectoryBuilder.h.