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
CompareDetY_plus Class Reference

#include <CRackTrajectoryBuilder.h>

Public Member Functions

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

Private Attributes

const TrackerGeometry_tracker
 

Detailed Description

Definition at line 42 of file CRackTrajectoryBuilder.h.

Constructor & Destructor Documentation

CompareDetY_plus::CompareDetY_plus ( const TrackerGeometry tracker)
inline

Definition at line 44 of file CRackTrajectoryBuilder.h.

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

Member Function Documentation

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

Definition at line 45 of file CRackTrajectoryBuilder.h.

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

47  {
48  const GeomDet* detPos1 = _tracker.idToDet(rh1->geographicalId());
49  const GeomDet* detPos2 = _tracker.idToDet(rh2->geographicalId());
50 
51  GlobalPoint gp1 = detPos1->position();
52  GlobalPoint gp2 = detPos2->position();
53 
54  if (gp1.y()>gp2.y())
55  return true;
56  if (gp1.y()<gp2.y())
57  return false;
58  // if (gp1.y()== gp2.y())
59  //
60  return (rh1->geographicalId() < rh2->geographicalId());
61  };
T y() const
Definition: PV3DBase.h:63
const TrackerGeometry & _tracker
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:48
DetId geographicalId() const
const TrackerGeomDet * idToDet(DetId) const

Member Data Documentation

const TrackerGeometry& CompareDetY_plus::_tracker
private

Definition at line 61 of file CRackTrajectoryBuilder.h.

Referenced by operator()().