CMS 3D CMS Logo

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

Constructor & Destructor Documentation

◆ CompareDetY_plus()

CompareDetY_plus::CompareDetY_plus ( const TrackerGeometry tracker)
inline

Definition at line 43 of file CRackTrajectoryBuilder.h.

43 : _tracker(tracker) {}

Member Function Documentation

◆ operator()()

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

Definition at line 44 of file CRackTrajectoryBuilder.h.

44  {
45  const GeomDet* detPos1 = _tracker.idToDet(rh1->geographicalId());
46  const GeomDet* detPos2 = _tracker.idToDet(rh2->geographicalId());
47 
48  const GlobalPoint& gp1 = detPos1->position();
49  const GlobalPoint& gp2 = detPos2->position();
50 
51  if (gp1.y() > gp2.y())
52  return true;
53  if (gp1.y() < gp2.y())
54  return false;
55  // if (gp1.y()== gp2.y())
56  //
57  return (rh1->geographicalId() < rh2->geographicalId());
58  };

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

Member Data Documentation

◆ _tracker

const TrackerGeometry& CompareDetY_plus::_tracker
private

Definition at line 58 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 >
CompareDetY_plus::_tracker
const TrackerGeometry & _tracker
Definition: CRackTrajectoryBuilder.h:58
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
PV3DBase::y
T y() const
Definition: PV3DBase.h:60