CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Plane Class Reference

#include <Plane.h>

Inheritance diagram for Plane:
Surface BasicReferenceCounted GloballyPositioned< float > BoundaryPlane BoundDiskSector Disk

Public Types

using BoundPlanePointer = ReferenceCountingPointer< Plane >
 
using ConstBoundPlanePointer = ConstReferenceCountingPointer< Plane >
 
using ConstPlanePointer = ConstReferenceCountingPointer< Plane >
 
using PlanePointer = ReferenceCountingPointer< Plane >
 
- Public Types inherited from Surface
using Base = GloballyPositioned< float >
 
using Side = SurfaceOrientation::Side
 
- Public Types inherited from GloballyPositioned< float >
typedef Point3DBase< float, GlobalTagGlobalPoint
 
typedef Vector3DBase< float, GlobalTagGlobalVector
 
typedef Point3DBase< float, LocalTagLocalPoint
 
typedef Vector3DBase< float, LocalTagLocalVector
 
typedef Point3DBase< float, GlobalTagPositionType
 
typedef TkRotation< float > RotationType
 
typedef float Scalar
 

Public Member Functions

void computeSpan ()
 
float localZ (const GlobalPoint &gp) const
 
float localZ (const GlobalVector &gv) const
 Fast access to component perpendicular to plane for a vector. More...
 
float localZclamped (const GlobalPoint &gp) const
 
GlobalVector normalVector () const
 
template<typename... Args>
 Plane (Args &&...args)
 
float posPrec () const
 
SurfaceOrientation::Side side (const LocalPoint &p, Scalar toler) const final
 
SurfaceOrientation::Side side (const GlobalPoint &p, Scalar toler) const final
 
ConstReferenceCountingPointer< TangentPlanetangentPlane (const GlobalPoint &) const final
 tangent plane to surface from global point More...
 
ConstReferenceCountingPointer< TangentPlanetangentPlane (const LocalPoint &) const final
 tangent plane to surface from local point More...
 
 ~Plane () override
 
- Public Member Functions inherited from Surface
const Boundsbounds () const
 
const MediumPropertiesmediumProperties () const
 
std::pair< float, float > const & phiSpan () const
 
std::pair< float, float > const & rSpan () const
 
void setMediumProperties (const MediumProperties &mp)
 
GlobalPoint toGlobal (const Point2DBase< Scalar, LocalTag > lp) const
 
std::pair< float, float > const & zSpan () const
 
 ~Surface () override
 
- Public Member Functions inherited from BasicReferenceCounted
void addReference () const
 
 BasicReferenceCounted ()
 
 BasicReferenceCounted (const BasicReferenceCounted &)
 
 BasicReferenceCounted (BasicReferenceCounted &&)=default
 
BasicReferenceCountedoperator= (BasicReferenceCounted &&)=default
 
BasicReferenceCountedoperator= (const BasicReferenceCounted &)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~BasicReferenceCounted ()
 
- Public Member Functions inherited from GloballyPositioned< float >
float eta () const
 
 GloballyPositioned ()
 
 GloballyPositioned (const PositionType &pos, const RotationType &rot)
 
void move (const GlobalVector &displacement)
 
float phi () const
 
const PositionTypeposition () const
 
void rotate (const RotationType &rotation)
 
const RotationTyperotation () const
 
GlobalPoint toGlobal (const LocalPoint &lp) const
 
Point3DBase< U, GlobalTagtoGlobal (const Point3DBase< U, LocalTag > &lp) const
 
GlobalVector toGlobal (const LocalVector &lv) const
 
Vector3DBase< U, GlobalTagtoGlobal (const Vector3DBase< U, LocalTag > &lv) const
 
LocalPoint toLocal (const GlobalPoint &gp) const
 
Point3DBase< U, LocalTagtoLocal (const Point3DBase< U, GlobalTag > &gp) const
 
LocalVector toLocal (const GlobalVector &gv) const
 
Vector3DBase< U, LocalTagtoLocal (const Vector3DBase< U, GlobalTag > &gv) const
 
virtual ~GloballyPositioned ()
 

Static Public Member Functions

template<typename... Args>
static PlanePointer build (Args &&...args)
 
- Static Public Member Functions inherited from GloballyPositioned< float >
static float iniEta ()
 
static float iniPhi ()
 

Private Member Functions

void setPosPrec ()
 

Private Attributes

Scalar m_posPrec
 

Additional Inherited Members

- Protected Member Functions inherited from Surface
 Surface ()
 
 Surface (const PositionType &pos, const RotationType &rot)
 
 Surface (const PositionType &pos, const RotationType &rot, Bounds *bounds)
 
 Surface (const PositionType &pos, const RotationType &rot, MediumProperties mp)
 
 Surface (const PositionType &pos, const RotationType &rot, MediumProperties mp, Bounds *bounds)
 
 Surface (const Surface &iSurface)
 
 Surface (Surface &&iSurface)
 
- Protected Attributes inherited from Surface
extstd::clone_ptr< BoundstheBounds
 
MediumProperties theMediumProperties
 

Detailed Description

A plane in 3D space.

Warning
Surfaces are reference counted, so only ReferenceCountingPointer should be used to point to them. For this reason, they should be using the static build() method. (The normal constructor will become private in the future).

Definition at line 17 of file Plane.h.

Member Typedef Documentation

Definition at line 25 of file Plane.h.

Definition at line 26 of file Plane.h.

Definition at line 24 of file Plane.h.

Definition at line 23 of file Plane.h.

Constructor & Destructor Documentation

template<typename... Args>
Plane::Plane ( Args &&...  args)
inline

Definition at line 20 of file Plane.h.

References computeSpan(), and setPosPrec().

Referenced by build().

20  :
21  Surface(std::forward<Args>(args)...){setPosPrec();computeSpan();}
void computeSpan()
Definition: Plane.h:62
void setPosPrec()
Definition: Plane.h:85
Surface()
Definition: Surface.h:53
Plane::~Plane ( )
inlineoverride

Definition at line 37 of file Plane.h.

37 {}

Member Function Documentation

template<typename... Args>
static PlanePointer Plane::build ( Args &&...  args)
inlinestatic

Construct a Plane. The reference frame is defined by pos and rot; the plane is orthogonal to the local Z axis.

Definition at line 33 of file Plane.h.

References createfilelist::args, and Plane().

Referenced by EMEnrichingFilterAlgo::applyBFieldCurv(), doubleEMEnrichingFilterAlgo::applyBFieldCurv(), CSCGeometryBuilder::buildChamber(), ReferenceTrajectory::construct(), CosmicGenFilterHelix::CosmicGenFilterHelix(), CaloDetIdAssociator::crossedElement(), TrajectoryExtrapolatorToLine::extrapolate(), CachedTrajectory::getTrajectory(), RectangularEtaPhiTrackingRegion::hits(), CosmicTrackingRegion::hits_(), HLTMuonPointingFilter::HLTMuonPointingFilter(), TSGForOI::produce(), ME0SegmentMatcher::produce(), PropagateToCal::propagate(), spr::propagateCalo(), CachedTrajectory::propagateForward(), spr::propagateHCAL(), TrackKinematicStatePropagator::propagateToTheTransversePCA(), cms::MuonTCMETValueMapProducer::propagateTrack(), spr::propagateTrackerEnd(), TCMETAlgo::propagateTrackToCalorimeterFace(), TrackExtrapolator::propagateTrackToVolume(), KFBasedPixelFitter::run(), psClasses.BuildThread::run(), CSCPairResidualsConstraint::setZplane(), MuonGmtPair::surfExtrapTrkSam(), and L1MuonRecoTreeProducer::surfExtrapTrkSam().

33  {
34  return PlanePointer(new Plane(std::forward<Args>(args)...));
35  }
ReferenceCountingPointer< Plane > PlanePointer
Definition: Plane.h:23
Plane(Args &&...args)
Definition: Plane.h:20
void Plane::computeSpan ( )
inline

Definition at line 62 of file Plane.h.

References Surface::theBounds.

Referenced by Plane().

62 { if(theBounds) theBounds->computeSpan(*this);}
extstd::clone_ptr< Bounds > theBounds
Definition: Surface.h:141
float Plane::localZ ( const GlobalPoint gp) const
inline
float Plane::localZ ( const GlobalVector gv) const
inline

Fast access to component perpendicular to plane for a vector.

Definition at line 55 of file Plane.h.

References Vector3DBase< T, FrameTag >::dot(), and normalVector().

55  {
56  return normalVector().dot(gv);
57  }
GlobalVector normalVector() const
Definition: Plane.h:41
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:107
float Plane::localZclamped ( const GlobalPoint gp) const
inline

Definition at line 49 of file Plane.h.

References funct::abs(), edmIntegrityCheck::d, localZ(), and posPrec().

49  {
50  auto d = localZ(gp);
51  return std::abs(d) > posPrec() ? d : 0;
52  }
float localZ(const GlobalPoint &gp) const
Definition: Plane.h:45
float posPrec() const
Definition: Plane.h:60
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GlobalVector Plane::normalVector ( ) const
inline
float Plane::posPrec ( ) const
inline

Definition at line 60 of file Plane.h.

References m_posPrec.

Referenced by localZclamped().

60 { return m_posPrec;}
Scalar m_posPrec
Definition: Plane.h:92
void Plane::setPosPrec ( )
inlineprivate

Definition at line 85 of file Plane.h.

References funct::abs(), constexpr, checklumidiff::l, m_posPrec, SiStripPI::max, AlCaHLTBitMon_ParallelJobs::p, and GloballyPositioned< float >::position().

Referenced by Plane().

85  {
87  auto p = position();
88  float l = std::max(std::max(std::abs(p.x()),std::abs(p.y())),std::abs(p.z()));
89  m_posPrec = std::abs(l-::nextafterf(l,maxf)); // LSB (can be multiplied by 4 or divided by 4 for safety depending on usage)
90  }
Scalar m_posPrec
Definition: Plane.h:92
#define constexpr
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const PositionType & position() const
SurfaceOrientation::Side Plane::side ( const LocalPoint p,
Scalar  tolerance 
) const
inlinefinalvirtual

Returns the side of the surface on which the point is. Not defined for 1-sided surfaces (Moebius leaf etc.) For normal 2-sided surfaces the meaning of side is surface type dependent.

Implements Surface.

Definition at line 67 of file Plane.h.

References funct::abs(), SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, AlCaHLTBitMon_ParallelJobs::p, and SurfaceOrientation::positiveSide.

SurfaceOrientation::Side Plane::side ( const GlobalPoint p,
Scalar  toler 
) const
inlinefinalvirtual
ConstReferenceCountingPointer< TangentPlane > Plane::tangentPlane ( const GlobalPoint ) const
finalvirtual

tangent plane to surface from global point

Implements Surface.

Definition at line 6 of file Plane.cc.

Referenced by side().

ConstReferenceCountingPointer< TangentPlane > Plane::tangentPlane ( const LocalPoint ) const
finalvirtual

tangent plane to surface from local point

Implements Surface.

Definition at line 12 of file Plane.cc.

Member Data Documentation

Scalar Plane::m_posPrec
private

Definition at line 92 of file Plane.h.

Referenced by posPrec(), and setPosPrec().