#include <Cylinder.h>
Public Types | |
typedef ConstReferenceCountingPointer < Cylinder > | ConstCylinderPointer |
typedef ReferenceCountingPointer < Cylinder > | CylinderPointer |
Public Member Functions | |
Cylinder (const PositionType &pos, const RotationType &rot, Scalar radius) | |
Cylinder (const PositionType &pos, const RotationType &rot, Scalar radius, MediumProperties *mp) | |
Plane | fastTangent (const GlobalPoint &aPoint) const |
tangent plane to surface from global point | |
Plane | fastTangent (const LocalPoint &aPoint) const |
tangent plane to surface from local point | |
Scalar | radius () const |
Radius of the cylinder. | |
virtual Side | side (const LocalPoint &p, Scalar toler) const |
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 | |
~Cylinder () | |
Static Public Member Functions | |
static CylinderPointer | build (const PositionType &pos, const RotationType &rot, Scalar radius, MediumProperties *mp=0) |
Private Attributes | |
Scalar | theRadius |
A Cylinder.
Definition at line 20 of file Cylinder.h.
Definition at line 23 of file Cylinder.h.
Definition at line 22 of file Cylinder.h.
Cylinder::~Cylinder | ( | ) | [inline] |
Definition at line 37 of file Cylinder.h.
{}
Cylinder::Cylinder | ( | const PositionType & | pos, |
const RotationType & | rot, | ||
Scalar | radius | ||
) | [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 44 of file Cylinder.h.
Referenced by build().
Cylinder::Cylinder | ( | const PositionType & | pos, |
const RotationType & | rot, | ||
Scalar | radius, | ||
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 50 of file Cylinder.h.
static CylinderPointer Cylinder::build | ( | const PositionType & | pos, |
const RotationType & | rot, | ||
Scalar | radius, | ||
MediumProperties * | mp = 0 |
||
) | [inline, static] |
Construct a cylinder with the specified radius. The reference frame is defined by pos and rot; the cylinder axis is parallel to the local Z axis.
Definition at line 29 of file Cylinder.h.
References Cylinder().
Referenced by TrackExtrapolator::propagateTrackToVolume().
{ return CylinderPointer(new Cylinder(pos, rot, radius, mp)); }
Plane Cylinder::fastTangent | ( | const LocalPoint & | aPoint | ) | const [inline] |
tangent plane to surface from local point
Definition at line 77 of file Cylinder.h.
References fastTangent(), and Surface::toGlobal().
{ return fastTangent(toGlobal(aPoint)); }
Plane Cylinder::fastTangent | ( | const GlobalPoint & | aPoint | ) | const [inline] |
tangent plane to surface from global point
Definition at line 70 of file Cylinder.h.
References Vector3DBase< T, FrameTag >::cross(), GloballyPositioned< float >::position(), GloballyPositioned< float >::rotation(), and z.
Referenced by fastTangent().
{ GlobalVector yPlane(rotation().z()); GlobalVector xPlane(yPlane.cross(aPoint-position())); return Plane(aPoint,RotationType(xPlane, yPlane)); }
Scalar Cylinder::radius | ( | ) | const [inline] |
Radius of the cylinder.
Reimplemented in GCC11_FINAL< T >.
Definition at line 57 of file Cylinder.h.
References theRadius.
Referenced by MuonShowerInformationFiller::crossingPoint(), HelixBarrelCylinderCrossing::HelixBarrelCylinderCrossing(), MagCylinder::MagCylinder(), PropagationDirectionChooser::operator()(), StraightLineBarrelCylinderCrossing::pathLength(), StraightLineCylinderCrossing::pathLength(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), and side().
{return theRadius;}
Surface::Side Cylinder::side | ( | const LocalPoint & | p, |
Scalar | tolerance | ||
) | const [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 9 of file Cylinder.cc.
References SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, PV3DBase< T, PVType, FrameType >::perp(), SurfaceOrientation::positiveSide, and radius().
{ Scalar lz = p.perp() - radius(); return (fabs(lz)<toler ? SurfaceOrientation::onSurface : (lz>0 ? SurfaceOrientation::positiveSide : SurfaceOrientation::negativeSide)); }
ReferenceCountingPointer< TangentPlane > Cylinder::tangentPlane | ( | const GlobalPoint & | aPoint | ) | const [virtual] |
tangent plane to surface from global point
Implements Surface.
Definition at line 23 of file Cylinder.cc.
References abs, Vector3DBase< T, FrameTag >::cross(), max(), GloballyPositioned< float >::position(), GloballyPositioned< float >::rotation(), findQualityFiles::size, and z.
Referenced by tangentPlane().
{ // // Tangent plane at specified point. In order to avoid // possible numerical problems currently no attempt is made // to verify, if the point is actually on the cylinder. // // local y parallel to axis GlobalVector yPlane(rotation().z()); // local x normal to y and a vector linking the specified // point with the axis GlobalVector xPlane(yPlane.cross(aPoint-position())); Scalar size = std::max(std::max(std::abs(xPlane.x()),std::abs(xPlane.y())), std::abs(xPlane.z())); if ( size<FLT_MIN ) throw GeometryError("Attempt to construct TangentPlane on cylinder axis"); // // local z defined by x and y (should point outwards from axis) // GlobalVector zPlane(xPlane.cross(yPlane)); // rotation constructor will normalize... return ReferenceCountingPointer<TangentPlane>(new TangentPlane(aPoint, RotationType(xPlane, yPlane), this)); }
ReferenceCountingPointer< TangentPlane > Cylinder::tangentPlane | ( | const LocalPoint & | aPoint | ) | const [virtual] |
tangent plane to surface from local point
Implements Surface.
Definition at line 17 of file Cylinder.cc.
References tangentPlane(), and Surface::toGlobal().
{ return tangentPlane(toGlobal(aPoint)); }
Scalar Cylinder::theRadius [private] |
Definition at line 83 of file Cylinder.h.
Referenced by radius().