CMS 3D CMS Logo

List of all members | Public Member Functions
MTDDetLayerComp Class Reference

#include <MTDDetLayerMap.h>

Public Member Functions

bool operator() (const BarrelDetLayer *l1, const BarrelDetLayer *l2) const
 
bool operator() (const ForwardDetLayer *l1, const ForwardDetLayer *l2) const
 

Detailed Description

Sort the of BarrelDetLayers by radius, ForwardDetLayer by |Z|.

Author
: L. Gray

Adapted from MuonDetLayerComp

Definition at line 21 of file MTDDetLayerMap.h.

Member Function Documentation

◆ operator()() [1/2]

bool MTDDetLayerComp::operator() ( const BarrelDetLayer l1,
const BarrelDetLayer l2 
) const
inline

Definition at line 22 of file MTDDetLayerMap.h.

22  {
23  if (l1->specificSurface().radius() < l2->specificSurface().radius())
24  return true;
25  return false;
26  }

References BarrelDetLayer::specificSurface().

◆ operator()() [2/2]

bool MTDDetLayerComp::operator() ( const ForwardDetLayer l1,
const ForwardDetLayer l2 
) const
inline

Definition at line 28 of file MTDDetLayerMap.h.

28  {
29  if (fabs(l1->surface().position().z()) < fabs(l2->surface().position().z()))
30  return true;
31  return false;
32  }

References GloballyPositioned< T >::position(), ForwardDetLayer::surface(), and PV3DBase< T, PVType, FrameType >::z().

ForwardDetLayer::surface
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
Definition: ForwardDetLayer.h:29
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
BarrelDetLayer::specificSurface
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
Definition: BarrelDetLayer.h:39