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
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 43 of file CosmicTrajectoryBuilder.h.

Constructor & Destructor Documentation

CompareHitY::CompareHitY ( const TrackerGeometry tracker)
inline

Definition at line 45 of file CosmicTrajectoryBuilder.h.

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

Definition at line 100 of file CRackTrajectoryBuilder.h.

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

Member Function Documentation

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

Definition at line 46 of file CosmicTrajectoryBuilder.h.

References _tracker, TrackingRecHit::geographicalId(), TrackerGeometry::idToDet(), TrackingRecHit::localPosition(), and GeomDet::toGlobal().

48  {
49  GlobalPoint gp1=_tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
50  GlobalPoint gp2=_tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
51  return gp1.y()<gp2.y();};
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:57
const TrackerGeometry & _tracker
virtual const GeomDet * idToDet(DetId) const
DetId geographicalId() const
virtual LocalPoint localPosition() const =0
bool CompareHitY::operator() ( const TrackingRecHit rh1,
const TrackingRecHit rh2 
)
inline

Definition at line 101 of file CRackTrajectoryBuilder.h.

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

103  {
104  GlobalPoint gp1=_tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
105  GlobalPoint gp2=_tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
106  return gp1.y()<gp2.y();};
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:57
const TrackerGeometry & _tracker
virtual const GeomDet * idToDet(DetId) const
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()().