CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CompareHitY_plus Class Reference

#include <CosmicTrajectoryBuilder.h>

Public Member Functions

 CompareHitY_plus (const TrackerGeometry &tracker)
 
 CompareHitY_plus (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 58 of file CosmicTrajectoryBuilder.h.

Constructor & Destructor Documentation

◆ CompareHitY_plus() [1/2]

CompareHitY_plus::CompareHitY_plus ( const TrackerGeometry tracker)
inline

Definition at line 60 of file CosmicTrajectoryBuilder.h.

◆ CompareHitY_plus() [2/2]

CompareHitY_plus::CompareHitY_plus ( const TrackerGeometry tracker)
inline

Definition at line 108 of file CRackTrajectoryBuilder.h.

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 61 of file CosmicTrajectoryBuilder.h.

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

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

◆ operator()() [2/2]

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

Definition at line 109 of file CRackTrajectoryBuilder.h.

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

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

Member Data Documentation

◆ _tracker

const TrackerGeometry & CompareHitY_plus::_tracker
private

Definition at line 65 of file CosmicTrajectoryBuilder.h.

Referenced by operator()().