CMS 3D CMS Logo

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

#include <CosmicTrajectoryBuilder.h>

Public Member Functions

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

Private Attributes

const TrackerGeometry_tracker
 

Detailed Description

Definition at line 44 of file CosmicTrajectoryBuilder.h.

Constructor & Destructor Documentation

CompareHitY::CompareHitY ( const TrackerGeometry tracker)
inline

Definition at line 46 of file CosmicTrajectoryBuilder.h.

46 : _tracker(tracker) {}
const TrackerGeometry & _tracker
CompareHitY::CompareHitY ( const TrackerGeometry tracker)
inline

Definition at line 94 of file CRackTrajectoryBuilder.h.

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

Member Function Documentation

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

Definition at line 47 of file CosmicTrajectoryBuilder.h.

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

47  {
48  GlobalPoint gp1 = _tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
49  GlobalPoint gp2 = _tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
50  return gp1.y() < gp2.y();
51  };
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
T y() const
Definition: PV3DBase.h:60
const TrackerGeometry & _tracker
const TrackerGeomDet * idToDet(DetId) const override
DetId geographicalId() const
virtual LocalPoint localPosition() const =0
bool CompareHitY::operator() ( const TrackingRecHit rh1,
const TrackingRecHit rh2 
)
inline

Definition at line 95 of file CRackTrajectoryBuilder.h.

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

95  {
96  GlobalPoint gp1 = _tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
97  GlobalPoint gp2 = _tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
98  return gp1.y() < gp2.y();
99  };
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
T y() const
Definition: PV3DBase.h:60
const TrackerGeometry & _tracker
const TrackerGeomDet * idToDet(DetId) const override
DetId geographicalId() const
virtual LocalPoint localPosition() const =0

Member Data Documentation

const TrackerGeometry & CompareHitY::_tracker
private

Definition at line 51 of file CosmicTrajectoryBuilder.h.

Referenced by operator()().