CMS 3D CMS Logo

CompareDetY_plus Class Reference

#include <RecoTracker/SingleTrackPattern/interface/CRackTrajectoryBuilder.h>

List of all members.

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


Constructor & Destructor Documentation

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

Definition at line 47 of file CRackTrajectoryBuilder.h.

00047 :_tracker(tracker){}


Member Function Documentation

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

Definition at line 48 of file CRackTrajectoryBuilder.h.

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

00050    {
00051      const GeomDet* detPos1 = _tracker.idToDet(rh1->geographicalId());
00052      const GeomDet* detPos2 = _tracker.idToDet(rh2->geographicalId());
00053 
00054      GlobalPoint gp1 = detPos1->position();
00055      GlobalPoint gp2 = detPos2->position();
00056      
00057      if (gp1.y()>gp2.y())
00058        return true;
00059      if (gp1.y()<gp2.y())
00060        return false;
00061      //  if (gp1.y()== gp2.y())
00062      // 
00063      return (rh1->geographicalId() < rh2->geographicalId());
00064    };


Member Data Documentation

const TrackerGeometry& CompareDetY_plus::_tracker [private]

Definition at line 64 of file CRackTrajectoryBuilder.h.

Referenced by operator()().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:16:34 2009 for CMSSW by  doxygen 1.5.4