CMS 3D CMS Logo

Public Member Functions | Public Attributes

MuonTrackResidualAnalyzer::RadiusComparatorInOut Struct Reference

List of all members.

Public Member Functions

bool operator() (const PSimHit *a, const PSimHit *b) const
 RadiusComparatorInOut (edm::ESHandle< GlobalTrackingGeometry > tg)

Public Attributes

edm::ESHandle
< GlobalTrackingGeometry
theTG

Detailed Description

Definition at line 121 of file MuonTrackResidualAnalyzer.h.


Constructor & Destructor Documentation

MuonTrackResidualAnalyzer::RadiusComparatorInOut::RadiusComparatorInOut ( edm::ESHandle< GlobalTrackingGeometry tg) [inline]

Definition at line 123 of file MuonTrackResidualAnalyzer.h.

:theTG(tg){}

Member Function Documentation

bool MuonTrackResidualAnalyzer::RadiusComparatorInOut::operator() ( const PSimHit a,
const PSimHit b 
) const [inline]

Definition at line 125 of file MuonTrackResidualAnalyzer.h.

References PSimHit::detUnitId(), PSimHit::localPosition(), mag(), theTG, and GeomDet::toGlobal().

                                           { 
      
      const GeomDet *geomDetA = theTG->idToDet(DetId(a->detUnitId()));
      const GeomDet *geomDetB = theTG->idToDet(DetId(b->detUnitId()));
      
      double distA = geomDetA->toGlobal(a->localPosition()).mag();
      double distB = geomDetB->toGlobal(b->localPosition()).mag();
      
      return distA < distB; 
    }

Member Data Documentation

Definition at line 137 of file MuonTrackResidualAnalyzer.h.

Referenced by operator()().