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

97 :_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(), and GeomDet::toGlobal().

49  {
50  GlobalPoint gp1=_tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
51  GlobalPoint gp2=_tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
52  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:54
T y() const
Definition: PV3DBase.h:63
const TrackerGeometry & _tracker
DetId geographicalId() const
virtual LocalPoint localPosition() const =0
const TrackerGeomDet * idToDet(DetId) const
bool CompareHitY::operator() ( const TrackingRecHit rh1,
const TrackingRecHit rh2 
)
inline

Definition at line 98 of file CRackTrajectoryBuilder.h.

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

100  {
101  GlobalPoint gp1=_tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
102  GlobalPoint gp2=_tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
103  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:54
T y() const
Definition: PV3DBase.h:63
const TrackerGeometry & _tracker
DetId geographicalId() const
virtual LocalPoint localPosition() const =0
const TrackerGeomDet * idToDet(DetId) const

Member Data Documentation

const TrackerGeometry & CompareHitY::_tracker
private

Definition at line 52 of file CosmicTrajectoryBuilder.h.

Referenced by operator()().