CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
Plane Class Reference

#include <Plane.h>

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

Public Types

typedef
ReferenceCountingPointer
< Plane
BoundPlanePointer
 
typedef
ConstReferenceCountingPointer
< Plane
ConstBoundPlanePointer
 
typedef
ConstReferenceCountingPointer
< Plane
ConstPlanePointer
 
typedef
ReferenceCountingPointer
< Plane
PlanePointer
 
- Public Types inherited from Surface
typedef GloballyPositioned< float > Base
 
typedef SurfaceOrientation::Side Side
 
- Public Types inherited from GloballyPositioned< float >
typedef Point3DBase< float,
GlobalTag
GlobalPoint
 
typedef Vector3DBase< float,
GlobalTag
GlobalVector
 
typedef Point3DBase< float,
LocalTag
LocalPoint
 
typedef Vector3DBase< float,
LocalTag
LocalVector
 
typedef Point3DBase< float,
GlobalTag
PositionType
 
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...
 
GlobalVector normalVector () const
 
float posPrec () const
 
virtual SurfaceOrientation::Side side (const LocalPoint &p, Scalar toler) const
 
virtual SurfaceOrientation::Side side (const GlobalPoint &p, Scalar toler) const
 
virtual
ReferenceCountingPointer
< TangentPlane
tangentPlane (const GlobalPoint &) const
 tangent plane to surface from global point More...
 
virtual
ReferenceCountingPointer
< TangentPlane
tangentPlane (const LocalPoint &) const
 tangent plane to surface from local point More...
 
 ~Plane ()
 
- 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
 
virtual ~Surface ()
 
- 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 ()
 
- Public Member Functions inherited from BasicReferenceCounted
void addReference () const
 
 BasicReferenceCounted ()
 
 BasicReferenceCounted (const BasicReferenceCounted &iRHS)
 
const BasicReferenceCountedoperator= (const BasicReferenceCounted &)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~BasicReferenceCounted ()
 

Private Member Functions

void setPosPrec ()
 

Private Attributes

Scalar m_posPrec
 

Additional Inherited Members

- Static Public Member Functions inherited from GloballyPositioned< float >
static float iniEta ()
 
static float iniPhi ()
 
- 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)
 
- Protected Attributes inherited from Surface
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 27 of file Plane.h.

Definition at line 28 of file Plane.h.

Definition at line 26 of file Plane.h.

Definition at line 25 of file Plane.h.

Constructor & Destructor Documentation

Plane::~Plane ( )
inline

Definition at line 41 of file Plane.h.

41 {}

Member Function Documentation

void Plane::computeSpan ( )
inline

Definition at line 68 of file Plane.h.

References Bounds::computeSpan(), and Surface::theBounds.

68 { if(theBounds) theBounds->computeSpan(*this);}
void computeSpan(Surface const &plane)
Definition: Bounds.h:74
Bounds * theBounds
Definition: Surface.h:152
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 NavVolume6Faces::computeBounds(), fastProp(), HelixArbitraryPlaneCrossing::notAtSurface(), HelixArbitraryPlaneCrossing::pathLength(), HelixBarrelPlaneCrossingByCircle::pathLength(), HelixArbitraryPlaneCrossing2Order::pathLength(), RKPropagatorInS::propagateParametersOnPlane(), side(), and SETSeedFinder::sortByLayer().

49  {
50  return normalVector().dot(gp-position());
51  }
GlobalVector normalVector() const
Definition: Plane.h:45
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:107
const PositionType & position() const
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().

61  {
62  return normalVector().dot(gv);
63  }
GlobalVector normalVector() const
Definition: Plane.h:45
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:107
GlobalVector Plane::normalVector ( ) const
inline
float Plane::posPrec ( ) const
inline

Definition at line 66 of file Plane.h.

References m_posPrec.

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

Definition at line 91 of file Plane.h.

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

91  {
92 #ifndef CMS_NOCXX11
94  auto p = position();
95  float l = std::max(std::max(std::abs(p.x()),std::abs(p.y())),std::abs(p.z()));
96  m_posPrec = std::abs(l-::nextafterf(l,maxf)); // LSB (can be multiplied by 4 or divided by 4 for safety depending on usage)
97 #endif
98  }
Scalar m_posPrec
Definition: Plane.h:100
#define constexpr
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const PositionType & position() const
virtual SurfaceOrientation::Side Plane::side ( const LocalPoint p,
Scalar  tolerance 
) const
inlinevirtual

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 funct::abs(), SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, AlCaHLTBitMon_ParallelJobs::p, and SurfaceOrientation::positiveSide.

Referenced by NavVolume6Faces::computeBounds().

virtual SurfaceOrientation::Side Plane::side ( const GlobalPoint p,
Scalar  toler 
) const
inlinevirtual
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.

7 {
8  return ReferenceCountingPointer<TangentPlane>(const_cast<Plane*>(this));
9 }
Definition: Plane.h:17
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.

13 {
14  return ReferenceCountingPointer<TangentPlane>(const_cast<Plane*>(this));
15 }
Definition: Plane.h:17

Member Data Documentation

Scalar Plane::m_posPrec
private

Definition at line 100 of file Plane.h.

Referenced by posPrec(), and setPosPrec().