CMS 3D CMS Logo

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

#include <CRackTrajectoryBuilder.h>

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

Constructor & Destructor Documentation

◆ CompareDetY_minus()

CompareDetY_minus::CompareDetY_minus ( const TrackerGeometry tracker)
inline

Definition at line 67 of file CRackTrajectoryBuilder.h.

67 : _tracker(tracker) {}

Member Function Documentation

◆ operator()()

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

Definition at line 68 of file CRackTrajectoryBuilder.h.

68  {
69  const GeomDet* detPos1 = _tracker.idToDet(rh1->geographicalId());
70  const GeomDet* detPos2 = _tracker.idToDet(rh2->geographicalId());
71 
72  const GlobalPoint& gp1 = detPos1->position();
73  const GlobalPoint& gp2 = detPos2->position();
74 
75  if (gp1.y() < gp2.y())
76  return true;
77  if (gp1.y() > gp2.y())
78  return false;
79  // if (gp1.y()== gp2.y())
80  //
81  return (rh1->geographicalId() < rh2->geographicalId());
82  };

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

Member Data Documentation

◆ _tracker

const TrackerGeometry& CompareDetY_minus::_tracker
private

Definition at line 82 of file CRackTrajectoryBuilder.h.

Referenced by operator()().

GeomDet::position
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
GeomDet
Definition: GeomDet.h:27
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
Point3DBase< float, GlobalTag >
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
CompareDetY_minus::_tracker
const TrackerGeometry & _tracker
Definition: CRackTrajectoryBuilder.h:82
PV3DBase::y
T y() const
Definition: PV3DBase.h:60