![]() |
![]() |
#include <Plane.h>
Public Types | |
typedef ReferenceCountingPointer < Plane > | BoundPlanePointer |
typedef ConstReferenceCountingPointer < Plane > | ConstBoundPlanePointer |
typedef ConstReferenceCountingPointer < Plane > | ConstPlanePointer |
typedef ReferenceCountingPointer < Plane > | PlanePointer |
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. | |
float | localZclamped (const GlobalPoint &gp) const |
GlobalVector | normalVector () const |
template<typename... Args> | |
Plane (Args &&...args) | |
float | posPrec () const |
virtual SurfaceOrientation::Side | side (const LocalPoint &p, Scalar toler) const GCC11_FINAL |
virtual SurfaceOrientation::Side | side (const GlobalPoint &p, Scalar toler) const GCC11_FINAL |
virtual ReferenceCountingPointer < TangentPlane > | tangentPlane (const LocalPoint &) const GCC11_FINAL |
tangent plane to surface from local point | |
virtual ReferenceCountingPointer < TangentPlane > | tangentPlane (const GlobalPoint &) const GCC11_FINAL |
tangent plane to surface from global point | |
~Plane () | |
Static Public Member Functions | |
template<typename... Args> | |
static PlanePointer | build (Args &&...args) |
Private Member Functions | |
void | setPosPrec () |
Private Attributes | |
Scalar | m_posPrec |
A plane in 3D space.
Reimplemented in GCC11_FINAL< T, TOPO >.
Plane::Plane | ( | Args &&... | args | ) | [inline] |
Definition at line 21 of file Plane.h.
References computeSpan(), and setPosPrec().
Referenced by build().
: Surface(std::forward<Args>(args)...){setPosPrec();computeSpan();}
static PlanePointer Plane::build | ( | Args &&... | args | ) | [inline, static] |
Construct a Plane. The reference frame is defined by pos and rot; the plane is orthogonal to the local Z axis.
Reimplemented in GCC11_FINAL< T, TOPO >.
Definition at line 36 of file Plane.h.
References harvestRelVal::args, and Plane().
Referenced by ReferenceTrajectory::construct(), TrackExtrapolator::propagateTrackToVolume(), and KFBasedPixelFitter::run().
{ return PlanePointer(new Plane(std::forward<Args>(args)...)); }
void Plane::computeSpan | ( | ) | [inline] |
float Plane::localZ | ( | const GlobalVector & | gv | ) | const [inline] |
Fast access to component perpendicular to plane for a vector.
Definition at line 61 of file Plane.h.
References Vector3DBase< T, FrameTag >::dot(), and normalVector().
{ return normalVector().dot(gv); }
float Plane::localZ | ( | const GlobalPoint & | gp | ) | const [inline] |
Fast access to distance from plane for a point. return 0 if too close
Definition at line 49 of file Plane.h.
References Vector3DBase< T, FrameTag >::dot(), normalVector(), and GloballyPositioned< float >::position().
Referenced by RPCSeedPattern::extropolateStep(), fastProp(), localZclamped(), side(), and SETSeedFinder::sortByLayer().
{ return normalVector().dot(gp-position()); }
float Plane::localZclamped | ( | const GlobalPoint & | gp | ) | const [inline] |
GlobalVector Plane::normalVector | ( | ) | const [inline] |
Definition at line 45 of file Plane.h.
References GloballyPositioned< float >::rotation(), and z.
Referenced by GlobalTrackerMuonAlignment::analyzeTrackTrack(), GlobalTrackerMuonAlignment::analyzeTrackTrajectory(), DeDxEstimatorProducerPixelTripplet::beginRun(), ThreePlaneCrossing::crossing(), localZ(), StraightLinePlaneCrossing::pathLength(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), and MagGeoBuilderFromDDD::volumeHandle::setSurface().
{ return GlobalVector(rotation().z()); }
float Plane::posPrec | ( | ) | const [inline] |
Definition at line 66 of file Plane.h.
References m_posPrec.
Referenced by localZclamped().
{ return m_posPrec;}
void Plane::setPosPrec | ( | ) | [inline, private] |
Definition at line 91 of file Plane.h.
References abs, constexpr, prof2calltree::l, m_posPrec, max(), AlCaHLTBitMon_ParallelJobs::p, and GloballyPositioned< float >::position().
Referenced by Plane().
{ #ifndef CMS_NOCXX11 constexpr auto maxf = std::numeric_limits<float>::max(); auto p = position(); float l = std::max(std::max(std::abs(p.x()),std::abs(p.y())),std::abs(p.z())); m_posPrec = std::abs(l-::nextafterf(l,maxf)); // LSB (can be multiplied by 4 or divided by 4 for safety depending on usage) #endif }
virtual SurfaceOrientation::Side Plane::side | ( | const LocalPoint & | p, |
Scalar | tolerance | ||
) | const [inline, virtual] |
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 73 of file Plane.h.
References abs, SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, AlCaHLTBitMon_ParallelJobs::p, and SurfaceOrientation::positiveSide.
{ return (std::abs(p.z())<toler) ? SurfaceOrientation::onSurface : (p.z()>0 ? SurfaceOrientation::positiveSide : SurfaceOrientation::negativeSide); }
virtual SurfaceOrientation::Side Plane::side | ( | const GlobalPoint & | p, |
Scalar | toler | ||
) | const [inline, virtual] |
Reimplemented from Surface.
Definition at line 78 of file Plane.h.
References abs, localZ(), SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, AlCaHLTBitMon_ParallelJobs::p, and SurfaceOrientation::positiveSide.
{ Scalar lz = localZ(p); return (std::abs(lz)<toler ? SurfaceOrientation::onSurface : (lz>0 ? SurfaceOrientation::positiveSide : SurfaceOrientation::negativeSide)); }
ReferenceCountingPointer< TangentPlane > Plane::tangentPlane | ( | const GlobalPoint & | ) | const [virtual] |
tangent plane to surface from global point
Implements Surface.
Definition at line 6 of file Plane.cc.
{ return ReferenceCountingPointer<TangentPlane>(const_cast<Plane*>(this)); }
ReferenceCountingPointer< TangentPlane > Plane::tangentPlane | ( | const LocalPoint & | ) | const [virtual] |
tangent plane to surface from local point
Implements Surface.
Definition at line 12 of file Plane.cc.
{ return ReferenceCountingPointer<TangentPlane>(const_cast<Plane*>(this)); }
Scalar Plane::m_posPrec [private] |
Definition at line 100 of file Plane.h.
Referenced by posPrec(), and setPosPrec().