CMS 3D CMS Logo

Public Member Functions | Private Attributes

CompareDetY_minus Class Reference

#include <CRackTrajectoryBuilder.h>

List of all members.

Public Member Functions

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

Private Attributes

const TrackerGeometry_tracker

Detailed Description

Definition at line 70 of file CRackTrajectoryBuilder.h.


Constructor & Destructor Documentation

CompareDetY_minus::CompareDetY_minus ( const TrackerGeometry tracker) [inline]

Definition at line 72 of file CRackTrajectoryBuilder.h.

:_tracker(tracker){}

Member Function Documentation

bool CompareDetY_minus::operator() ( const TrackingRecHit rh1,
const TrackingRecHit rh2 
) [inline]

Definition at line 73 of file CRackTrajectoryBuilder.h.

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

   {
     const GeomDet* detPos1 = _tracker.idToDet(rh1->geographicalId());
     const GeomDet* detPos2 = _tracker.idToDet(rh2->geographicalId());

     GlobalPoint gp1 = detPos1->position();
     GlobalPoint gp2 = detPos2->position();
     
     if (gp1.y()<gp2.y())
       return true;
     if (gp1.y()>gp2.y())
       return false;
     //  if (gp1.y()== gp2.y())
     // 
     return (rh1->geographicalId() < rh2->geographicalId());
   };

Member Data Documentation

Definition at line 89 of file CRackTrajectoryBuilder.h.

Referenced by operator()().