#include <Cone.h>
Public Types | |
typedef ReferenceCountingPointer< Cone > | ConePointer |
typedef ReferenceCountingPointer< Cone > | ConstConePointer |
Public Member Functions | |
Cone (const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle) | |
Geom::Theta< float > | openingAngle () const |
Angle of the cone. | |
virtual Side | side (const LocalPoint &p, Scalar tolerance) const |
virtual Side | side (const GlobalPoint &p, Scalar tolerance) const |
virtual ReferenceCountingPointer < TangentPlane > | tangentPlane (const GlobalPoint &) const |
virtual ReferenceCountingPointer < TangentPlane > | tangentPlane (const LocalPoint &) const |
GlobalPoint | vertex () const |
Global position of the cone vertex. | |
Static Public Member Functions | |
static ConePointer | build (const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle) |
Protected Member Functions | |
Cone (const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle, MediumProperties *mp) | |
Private Attributes | |
Geom::Theta< Scalar > | theAngle |
GlobalPoint | theVertex |
A Cone.
Cone::Cone | ( | const PositionType & | pos, |
const RotationType & | rot, | ||
const PositionType & | vert, | ||
Geom::Theta< Scalar > | angle | ||
) | [inline] |
Cone::Cone | ( | const PositionType & | pos, |
const RotationType & | rot, | ||
const PositionType & | vert, | ||
Geom::Theta< Scalar > | angle, | ||
MediumProperties * | mp | ||
) | [inline, protected] |
static ConePointer Cone::build | ( | const PositionType & | pos, |
const RotationType & | rot, | ||
const PositionType & | vert, | ||
Geom::Theta< Scalar > | angle | ||
) | [inline, static] |
Geom::Theta<float> Cone::openingAngle | ( | ) | const [inline] |
Angle of the cone.
Definition at line 53 of file Cone.h.
References theAngle.
Referenced by SteppingHelixPropagator::refToMagVolume(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), and side().
{return theAngle;}
virtual Side Cone::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 58 of file Cone.h.
References side(), and Surface::toGlobal().
Referenced by side().
Surface::Side Cone::side | ( | const GlobalPoint & | p, |
Scalar | tolerance | ||
) | const [virtual] |
Reimplemented from Surface.
Definition at line 22 of file Cone.cc.
References delta, SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, openingAngle(), p1, pi, SurfaceOrientation::positiveSide, vertex(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
{ // FIXME: should be done in local coordinates as this is not correct in the case the verstex is not on the (global) Z axis!!!! // tolerance is interpreted as max distance from cone surface. // FIXME: check case when vertex().z()==inf. GlobalPoint p1(p.x(), p.y(), p.z()-vertex().z()); // handle the singularity of p=vertex (i.e. p1.mag() undefined) if (p1.mag()<tolerance) return SurfaceOrientation::onSurface; double delta = double(p1.theta())- double(openingAngle()); if (fabs(delta) < tolerance/p1.mag()) return SurfaceOrientation::onSurface; if (p1.theta() < Geom::pi()/2.) { return (delta>0. ? SurfaceOrientation::positiveSide : SurfaceOrientation::negativeSide); } else { return (delta>0. ? SurfaceOrientation::negativeSide : SurfaceOrientation::positiveSide); } }
ReferenceCountingPointer< TangentPlane > Cone::tangentPlane | ( | const GlobalPoint & | ) | const [virtual] |
Tangent plane to surface from global point. Returns a new plane, tangent to the Surface at a point. The point must be on the surface. The return type is a ReferenceCountingPointer, so the plane will be deleted automatically when no longer needed.
Implements Surface.
Definition at line 8 of file Cone.cc.
References gather_cfg::cout.
{ // FIXME: to be implemented... std::cout << "*** WARNING: Cone::tangentPlane not implemented." <<std::endl; abort(); return ReferenceCountingPointer<TangentPlane>(); }
ReferenceCountingPointer< TangentPlane > Cone::tangentPlane | ( | const LocalPoint & | ) | const [virtual] |
Tangent plane to surface from local point.
Implements Surface.
Definition at line 15 of file Cone.cc.
References gather_cfg::cout.
{ // FIXME: to be implemented... std::cout << "*** WARNING: Cone::tangentPlane not implemented." <<std::endl; abort(); return ReferenceCountingPointer<TangentPlane>(); }
GlobalPoint Cone::vertex | ( | ) | const [inline] |
Global position of the cone vertex.
Definition at line 50 of file Cone.h.
References theVertex.
Referenced by SteppingHelixPropagator::refToMagVolume(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), and side().
{return theVertex;}
Geom::Theta<Scalar> Cone::theAngle [private] |
Definition at line 76 of file Cone.h.
Referenced by openingAngle().
GlobalPoint Cone::theVertex [private] |