CMS 3D CMS Logo

Cylinder.cc
Go to the documentation of this file.
1 
2 
6 
7 #include <cfloat>
8 
10  Scalar lz = p.perp() - radius();
11  return (fabs(lz) < toler ? SurfaceOrientation::onSurface
13 }
14 
16  return tangentPlane(toGlobal(aPoint));
17 }
18 
20  //
21  // Tangent plane at specified point. In order to avoid
22  // possible numerical problems currently no attempt is made
23  // to verify, if the point is actually on the cylinder.
24  //
25  // local y parallel to axis
26  GlobalVector yPlane(rotation().z());
27  // local x normal to y and a vector linking the specified
28  // point with the axis
29  GlobalVector xPlane(yPlane.cross(aPoint - position()));
30  Scalar size = std::max(std::max(std::abs(xPlane.x()), std::abs(xPlane.y())), std::abs(xPlane.z()));
31  if (size < FLT_MIN)
32  throw GeometryError("Attempt to construct TangentPlane on cylinder axis");
33  // // local z defined by x and y (should point outwards from axis)
34  // GlobalVector zPlane(xPlane.cross(yPlane));
35  // rotation constructor will normalize...
36  return ConstReferenceCountingPointer<TangentPlane>(new TangentPlane(aPoint, RotationType(xPlane, yPlane)));
37 }
Vector3DBase
Definition: Vector3DBase.h:8
SurfaceOrientation::onSurface
Definition: Surface.h:18
Cylinder.h
Cylinder::radius
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:64
Cylinder::side
Side side(const LocalPoint &p, Scalar toler) const override
Definition: Cylinder.cc:9
ConstReferenceCountingPointer
Definition: ReferenceCounted.h:67
GloballyPositioned< float >::RotationType
TkRotation< float > RotationType
Definition: GloballyPositioned.h:22
align::Scalar
double Scalar
Definition: Definitions.h:25
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
DDAxes::z
TangentPlane
Plane TangentPlane
Definition: Surface.h:25
Point3DBase< float, LocalTag >
GeomExceptions.h
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Cylinder::tangentPlane
ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const override
tangent plane to surface from global point
Definition: Cylinder.cc:19
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
Vector3DBase::cross
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:110
SurfaceOrientation::negativeSide
Definition: Surface.h:18
SurfaceOrientation::Side
Side
Definition: Surface.h:18
TangentPlane.h
GloballyPositioned< float >::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
GeometryError
Definition: GeomExceptions.h:18
SurfaceOrientation::positiveSide
Definition: Surface.h:18
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GloballyPositioned< float >::rotation
const RotationType & rotation() const
Definition: GloballyPositioned.h:38
GloballyPositioned< float >::Scalar
float Scalar
Definition: GloballyPositioned.h:20
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443