#include <Plane.h>
Public Types | |
typedef ConstReferenceCountingPointer < Plane > | ConstPlanePointer |
typedef ReferenceCountingPointer < Plane > | PlanePointer |
Public Member Functions | |
float | localZ (const GlobalPoint &gp) const |
Fast access to distance from plane for a point. | |
float | localZ (const GlobalVector &gv) const |
Fast access to component perpendicular to plane for a vector. | |
GlobalVector | normalVector () const |
Plane (const PositionType &pos, const RotationType &rot, MediumProperties *mp) | |
Plane (const PositionType &pos, const RotationType &rot) | |
virtual SurfaceOrientation::Side | side (const GlobalPoint &p, Scalar toler) const |
virtual SurfaceOrientation::Side | side (const LocalPoint &p, Scalar toler) const |
virtual ReferenceCountingPointer < TangentPlane > | tangentPlane (const GlobalPoint &) const |
tangent plane to surface from global point | |
virtual ReferenceCountingPointer < TangentPlane > | tangentPlane (const LocalPoint &) const |
tangent plane to surface from local point | |
Static Public Member Functions | |
static PlanePointer | build (const PositionType &pos, const RotationType &rot, MediumProperties *mp=0) |
A plane in 3D space.
Plane::Plane | ( | const PositionType & | pos, |
const RotationType & | rot | ||
) | [inline] |
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
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 Plane().
Referenced by TrackExtrapolator::propagateTrackToVolume().
{ return PlanePointer(new Plane(pos, rot, mp)); }
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().
{ return normalVector().dot(gv); }
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(), RPCSeedPattern::extropolateStep(), HelixArbitraryPlaneCrossing::notAtSurface(), HelixArbitraryPlaneCrossing2Order::pathLength(), HelixBarrelPlaneCrossingByCircle::pathLength(), TrackingRecHitProjector< ResultingHit >::project(), GSRecHitMatcher::projectOnly(), Geant4ePropagator::propagate(), RKPropagatorInS::propagateParametersOnPlane(), AnalyticalPropagator::propagateWithPath(), side(), SETSeedFinder::sortByLayer(), and TkGluedMeasurementDet::testStrips().
{ return normalVector().dot(gp-position()); }
GlobalVector Plane::normalVector | ( | ) | const [inline] |
Definition at line 47 of file Plane.h.
References GloballyPositioned< float >::rotation().
Referenced by GlobalTrackerMuonAlignment::analyzeTrackTrack(), GlobalTrackerMuonAlignment::analyzeTrackTrajectory(), DeDxEstimatorProducerPixelTripplet::beginRun(), 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().
{ return GlobalVector( rotation().zx(), rotation().zy(), rotation().zz()); }
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 abs, SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, SurfaceOrientation::positiveSide, and PV3DBase< T, PVType, FrameType >::z().
Referenced by NavVolume6Faces::computeBounds(), and NavPropagator::destinationCrossed().
{ 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 68 of file Plane.h.
References abs, localZ(), SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, 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 LocalPoint & | ) | const [virtual] |
tangent plane to surface from local point
Implements Surface.
Definition at line 17 of file Plane.cc.
References GloballyPositioned< float >::position(), and GloballyPositioned< float >::rotation().
{ return ReferenceCountingPointer<TangentPlane>(new TangentPlane(position(), rotation(), this)); }
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().
{ return ReferenceCountingPointer<TangentPlane>(new TangentPlane(position(), rotation(), this)); }