CMS 3D CMS Logo

Plane Class Reference

A plane in 3D space. More...

#include <DataFormats/GeometrySurface/interface/Plane.h>

Inheritance diagram for Plane:

Surface GloballyPositioned< float > ReferenceCounted BoundaryPlane BoundPlane TangentPlane BoundDisk BoundDiskSector

List of all members.

Public Types

typedef
ConstReferenceCountingPointer
< Plane
ConstPlanePointer
typedef
ReferenceCountingPointer
< Plane
PlanePointer

Public Member Functions

float localZ (const GlobalVector &gv) const
 Fast access to component perpendicular to plane for a vector.
float localZ (const GlobalPoint &gp) const
 Fast access to distance from plane for a point.
GlobalVector normalVector () const
 Plane (const PositionType &pos, const RotationType &rot, MediumProperties *mp)
 Do not use this constructor directly; use the static build method, which returns a ReferenceCountingPointer.
 Plane (const PositionType &pos, const RotationType &rot)
 Do not use this constructor directly; use the static build method, which returns a ReferenceCountingPointer.
virtual SurfaceOrientation::Side side (const GlobalPoint &p, Scalar toler) const
 Returns the side of the surface on which the point is.
virtual SurfaceOrientation::Side side (const LocalPoint &p, Scalar toler) const
 Returns the side of the surface on which the point is.
virtual
ReferenceCountingPointer
< TangentPlane
tangentPlane (const LocalPoint &) const
 tangent plane to surface from local point
virtual
ReferenceCountingPointer
< TangentPlane
tangentPlane (const GlobalPoint &) const
 tangent plane to surface from global point

Static Public Member Functions

static PlanePointer build (const PositionType &pos, const RotationType &rot, MediumProperties *mp=0)
 Construct a Plane.


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

typedef ConstReferenceCountingPointer<Plane> Plane::ConstPlanePointer

Definition at line 20 of file Plane.h.

typedef ReferenceCountingPointer<Plane> Plane::PlanePointer

Definition at line 19 of file Plane.h.


Constructor & Destructor Documentation

Plane::Plane ( const PositionType pos,
const RotationType rot 
) [inline]

Do not use this constructor directly; use the static build method, which returns a ReferenceCountingPointer.

This constructor will soon become private

Definition at line 36 of file Plane.h.

Referenced by build().

00036                                                            :
00037     Surface( pos, rot) {}

Plane::Plane ( const PositionType pos,
const RotationType rot,
MediumProperties mp 
) [inline]

Do not use this constructor directly; use the static build method, which returns a ReferenceCountingPointer.

This constructor will soon become private

Definition at line 42 of file Plane.h.

00042                                                                                  : 
00043     Surface( pos, rot, mp) {}


Member Function Documentation

static PlanePointer Plane::build ( const PositionType pos,
const RotationType rot,
MediumProperties mp = 0 
) [inline, static]

Construct a Plane.

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

Definition at line 25 of file Plane.h.

References mp, and Plane().

Referenced by EMEnrichingFilterAlgo::applyBFieldCurv(), CosmicGenFilterHelix::CosmicGenFilterHelix(), RectangularEtaPhiTrackingRegion::hits(), PropagateToCal::propagate(), and propagateTrackToCalo().

00027                                                             {
00028     return PlanePointer(new Plane(pos, rot, mp));
00029   }

float Plane::localZ ( const GlobalVector gv  )  const [inline]

Fast access to component perpendicular to plane for a vector.

Definition at line 57 of file Plane.h.

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

00057                                               {
00058     return normalVector().dot(gv);
00059   }

float Plane::localZ ( const GlobalPoint gp  )  const [inline]

Fast access to distance from plane for a point.

Definition at line 52 of file Plane.h.

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

Referenced by NavVolume6Faces::computeBounds(), CachedTrajectory::distance(), HelixArbitraryPlaneCrossing::notAtSurface(), HelixArbitraryPlaneCrossing2Order::pathLength(), HelixBarrelPlaneCrossingByCircle::pathLength(), TrackingRecHitProjector< ResultingHit >::project(), GSRecHitMatcher::projectOnly(), RKPropagatorInS::propagateParametersOnPlane(), AnalyticalPropagator::propagateWithPath(), side(), and TkGluedMeasurementDet::testStrips().

00052                                              {
00053     return normalVector().dot(gp-position());
00054   }

GlobalVector Plane::normalVector (  )  const [inline]

Definition at line 47 of file Plane.h.

References GloballyPositioned< float >::rotation().

Referenced by NavVolume6Faces::computeBounds(), ThreePlaneCrossing::crossing(), localZ(), OuterDetCompatibility::maximalLocalDisplacement(), MaterialEffects::normalVector(), StraightLinePlaneCrossing::pathLength(), HelixArbitraryPlaneCrossing2Order::pathLength(), HelixBarrelPlaneCrossingByCircle::pathLength(), TrackingRecHitProjector< ResultingHit >::project(), GSRecHitMatcher::projectOnly(), NavPropagator::propagateInVolume(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), MagGeoBuilderFromDDD::volumeHandle::setSurface(), and TkGluedMeasurementDet::testStrips().

00047                                     {
00048     return GlobalVector( rotation().zx(), rotation().zy(), rotation().zz());
00049   }

virtual SurfaceOrientation::Side Plane::side ( const GlobalPoint 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 68 of file Plane.h.

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

00068                                                                                  {
00069     Scalar lz = localZ(p);
00070     return (std::abs(lz)<toler ? SurfaceOrientation::onSurface : 
00071             (lz>0 ? SurfaceOrientation::positiveSide : SurfaceOrientation::negativeSide));
00072   }

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 63 of file Plane.h.

References funct::abs(), SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, SurfaceOrientation::positiveSide, and PV3DBase< T, PVType, FrameType >::z().

Referenced by NavVolume6Faces::computeBounds(), and NavPropagator::destinationCrossed().

00063                                                                                 {
00064     return (std::abs(p.z())<toler) ? SurfaceOrientation::onSurface : 
00065         (p.z()>0 ? SurfaceOrientation::positiveSide : SurfaceOrientation::negativeSide);
00066   }

virtual ReferenceCountingPointer<TangentPlane> Plane::tangentPlane ( const LocalPoint  )  const [virtual]

tangent plane to surface from local point

Implements Surface.

ReferenceCountingPointer< TangentPlane > Plane::tangentPlane ( const GlobalPoint  )  const [virtual]

tangent plane to surface from global point

Implements Surface.

Definition at line 9 of file Plane.cc.

References GloballyPositioned< float >::position(), and GloballyPositioned< float >::rotation().

00010 {
00011   return ReferenceCountingPointer<TangentPlane>(new TangentPlane(position(),
00012                                                                  rotation(),
00013                                                                  this));
00014 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:30:09 2009 for CMSSW by  doxygen 1.5.4