CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
Cylinder Class Reference

#include <Cylinder.h>

Inheritance diagram for Cylinder:
Surface GloballyPositioned< float > BasicReferenceCounted BoundCylinder

Public Types

typedef
ConstReferenceCountingPointer
< Cylinder
ConstCylinderPointer
 
typedef
ReferenceCountingPointer
< Cylinder
CylinderPointer
 
- Public Types inherited from Surface
typedef GloballyPositioned< float > Base
 
typedef SurfaceOrientation::Side Side
 
- Public Types inherited from GloballyPositioned< float >
typedef Point3DBase< float,
GlobalTag
GlobalPoint
 
typedef Vector3DBase< float,
GlobalTag
GlobalVector
 
typedef Point3DBase< float,
LocalTag
LocalPoint
 
typedef Vector3DBase< float,
LocalTag
LocalVector
 
typedef Point3DBase< float,
GlobalTag
PositionType
 
typedef TkRotation< float > RotationType
 
typedef float Scalar
 

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 More...
 
Plane fastTangent (const LocalPoint &aPoint) const
 tangent plane to surface from local point More...
 
Scalar radius () const
 Radius of the cylinder. More...
 
virtual Side side (const LocalPoint &p, Scalar toler) const
 
virtual
ReferenceCountingPointer
< TangentPlane
tangentPlane (const GlobalPoint &) const
 tangent plane to surface from global point More...
 
virtual
ReferenceCountingPointer
< TangentPlane
tangentPlane (const LocalPoint &) const
 tangent plane to surface from local point More...
 
- Public Member Functions inherited from Surface
const MediumPropertiesmediumProperties () const
 
void setMediumProperties (const MediumProperties &mp)
 
void setMediumProperties (MediumProperties *mp)
 
virtual Side side (const GlobalPoint &p, Scalar tolerance=0) const
 
 Surface (const PositionType &pos, const RotationType &rot)
 
 Surface (const PositionType &pos, const RotationType &rot, MediumProperties *mp)
 
 Surface (const PositionType &pos, const RotationType &rot, MediumProperties mp)
 
 Surface (const Surface &iSurface)
 
GlobalPoint toGlobal (const Point2DBase< Scalar, LocalTag > lp) const
 
virtual ~Surface ()=0
 
- Public Member Functions inherited from GloballyPositioned< float >
float eta () const
 
 GloballyPositioned (const PositionType &pos, const RotationType &rot)
 
void move (const GlobalVector &displacement)
 
float phi () const
 
const PositionTypeposition () const
 
void rotate (const RotationType &rotation)
 
const RotationTyperotation () const
 
GlobalPoint toGlobal (const LocalPoint &lp) const
 
Point3DBase< U, GlobalTagtoGlobal (const Point3DBase< U, LocalTag > &lp) const
 
GlobalVector toGlobal (const LocalVector &lv) const
 
Vector3DBase< U, GlobalTagtoGlobal (const Vector3DBase< U, LocalTag > &lv) const
 
LocalPoint toLocal (const GlobalPoint &gp) const
 
Point3DBase< U, LocalTagtoLocal (const Point3DBase< U, GlobalTag > &gp) const
 
LocalVector toLocal (const GlobalVector &gv) const
 
Vector3DBase< U, LocalTagtoLocal (const Vector3DBase< U, GlobalTag > &gv) const
 
virtual ~GloballyPositioned ()
 
- Public Member Functions inherited from BasicReferenceCounted
void addReference () const
 
 BasicReferenceCounted ()
 
 BasicReferenceCounted (const BasicReferenceCounted &iRHS)
 
const BasicReferenceCountedoperator= (const BasicReferenceCounted &)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~BasicReferenceCounted ()
 

Static Public Member Functions

static CylinderPointer build (const PositionType &pos, const RotationType &rot, Scalar radius, MediumProperties *mp=0)
 
- Static Public Member Functions inherited from GloballyPositioned< float >
static float iniEta ()
 
static float iniPhi ()
 

Private Attributes

Scalar theRadius
 

Detailed Description

A Cylinder.

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() methods. (The normal constructor will become private in the future).
Date:
2010/12/22 10:46:28
Revision:
1.5

Definition at line 20 of file Cylinder.h.

Member Typedef Documentation

Definition at line 23 of file Cylinder.h.

Definition at line 22 of file Cylinder.h.

Constructor & Destructor Documentation

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 42 of file Cylinder.h.

Referenced by build().

42  :
43  Surface( pos, rot), theRadius(radius) {}
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
Scalar theRadius
Definition: Cylinder.h:81
Surface(const PositionType &pos, const RotationType &rot)
Definition: Surface.h:40
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 48 of file Cylinder.h.

49  :
50  Surface( pos, rot, mp), theRadius(radius) {}
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
Scalar theRadius
Definition: Cylinder.h:81
Surface(const PositionType &pos, const RotationType &rot)
Definition: Surface.h:40

Member Function Documentation

static CylinderPointer Cylinder::build ( const PositionType pos,
const RotationType rot,
Scalar  radius,
MediumProperties mp = 0 
)
inlinestatic

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 EMEnrichingFilterAlgo::applyBFieldCurv(), doubleEMEnrichingFilterAlgo::applyBFieldCurv(), CosmicGenFilterHelix::CosmicGenFilterHelix(), ResidualRefitting::cylExtrapTrkSam(), CachedTrajectory::getTrajectory(), HLTMuonPointingFilter::HLTMuonPointingFilter(), PlotRecTracks::printRecTracks(), EcalShowerProperties::processTrack(), PropagateToCal::propagate(), spr::propagateCalo(), cms::MuonTCMETValueMapProducer::propagateTrack(), TCMETAlgo::propagateTrack(), spr::propagateTrackerEnd(), TrackExtrapolator::propagateTrackToVolume(), and TrackEfficiencyMonitor::trackerAcceptance().

32  {
33  return CylinderPointer(new Cylinder(pos, rot, radius, mp));
34  }
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
Cylinder(const PositionType &pos, const RotationType &rot, Scalar radius)
Definition: Cylinder.h:42
ReferenceCountingPointer< Cylinder > CylinderPointer
Definition: Cylinder.h:22
Plane Cylinder::fastTangent ( const GlobalPoint aPoint) const
inline

tangent plane to surface from global point

Definition at line 68 of file Cylinder.h.

References Vector3DBase< T, FrameTag >::cross(), GloballyPositioned< float >::position(), GloballyPositioned< float >::rotation(), and detailsBasic3DVector::z.

Referenced by fastTangent().

68  {
69  GlobalVector yPlane(rotation().z());
70  GlobalVector xPlane(yPlane.cross(aPoint-position()));
71  return Plane(aPoint,RotationType(xPlane, yPlane));
72  }
Definition: Plane.h:17
double double double z
TkRotation< float > RotationType
const RotationType & rotation() const
const PositionType & position() const
Plane Cylinder::fastTangent ( const LocalPoint aPoint) const
inline

tangent plane to surface from local point

Definition at line 75 of file Cylinder.h.

References fastTangent(), and Surface::toGlobal().

75  {
76  return fastTangent(toGlobal(aPoint));
77  }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
Plane fastTangent(const GlobalPoint &aPoint) const
tangent plane to surface from global point
Definition: Cylinder.h:68
Scalar Cylinder::radius ( ) const
inline

Radius of the cylinder.

Definition at line 55 of file Cylinder.h.

References theRadius.

Referenced by MuonNavigationSchool::addBarrelLayer(), MuonTkNavigationSchool::addBarrelLayer(), DirectMuonNavigation::checkCompatible(), DirectTrackerNavigation::checkCompatible(), MuRodBarrelLayer::compatibleDets(), PixelHitMatcher::compatibleHits(), MuonShowerInformationFiller::crossingPoint(), TIBLayer::cylinder(), MultipleScatteringGeometry::detLayers(), MuonPatternRecoDumper::dumpLayer(), RectangularEtaPhiTrackingRegion::estimator(), PropagateToMuon::extrapolate(), cms::HICTkOuterStartingLayerFinder::findBarrelLayers(), HelixBarrelCylinderCrossing::HelixBarrelCylinderCrossing(), PixelTripletNoTipGenerator::hitTriplets(), InnerDeltaPhi::initBarrelLayer(), ConvBremSeedProducer::initializeLayerMap(), TrajectoryManager::initializeLayerMap(), ThirdHitRZPredictionBase::initLayer(), ThirdHitPrediction::initLayer(), TkLayerLess::insideOutLess(), TkLayerLess::insideOutLessSigned(), SmartPropagator::insideTkVol(), SimpleNavigationSchool::linkNextForwardLayer(), MagCylinder::MagCylinder(), OutInConversionSeedFinder::makeEstimator(), MSLayer::MSLayer(), MuRodBarrelLayer::MuRodBarrelLayer(), MuonDetLayerComp::operator()(), PropagationDirectionChooser::operator()(), ExtractBarrelDetLayerR::operator()(), StraightLineCylinderCrossing::pathLength(), StraightLineBarrelCylinderCrossing::pathLength(), MuonNavigationPrinter::printLayers(), L2MuonSeedGenerator::produce(), cms::HICMuonPropagator::propagate(), RKPropagatorInR::propagate(), cms::FastMuPropagator::propagate(), Geant4ePropagator::propagate(), SteppingHelixPropagator::propagate(), RKPropagatorInS::propagateParametersOnCylinder(), StraightLinePropagator::propagateParametersOnCylinder(), SteppingHelixPropagator::refToMagVolume(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), side(), TIBLayer::TIBLayer(), TOBLayer::TOBLayer(), and whatIsTheNextStep().

55 {return theRadius;}
Scalar theRadius
Definition: Cylinder.h:81
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().

Referenced by Geant4ePropagator::propagate().

10 {
11  Scalar lz = p.perp() - radius();
12  return (fabs(lz)<toler ? SurfaceOrientation::onSurface :
14 }
T perp() const
Definition: PV3DBase.h:66
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
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 detailsBasic3DVector::z.

Referenced by AnalyticalPropagator::propagateWithPath(), and tangentPlane().

24 {
25  //
26  // Tangent plane at specified point. In order to avoid
27  // possible numerical problems currently no attempt is made
28  // to verify, if the point is actually on the cylinder.
29  //
30  // local y parallel to axis
31  GlobalVector yPlane(rotation().z());
32  // local x normal to y and a vector linking the specified
33  // point with the axis
34  GlobalVector xPlane(yPlane.cross(aPoint-position()));
35  Scalar size = std::max(std::max(std::abs(xPlane.x()),std::abs(xPlane.y())), std::abs(xPlane.z()));
36  if ( size<FLT_MIN )
37  throw GeometryError("Attempt to construct TangentPlane on cylinder axis");
38 // // local z defined by x and y (should point outwards from axis)
39 // GlobalVector zPlane(xPlane.cross(yPlane));
40  // rotation constructor will normalize...
42  RotationType(xPlane,
43  yPlane),
44  this));
45 }
#define abs(x)
Definition: mlp_lapack.h:159
double double double z
const T & max(const T &a, const T &b)
TkRotation< float > RotationType
const RotationType & rotation() const
const PositionType & position() const
tuple size
Write out results.
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().

18 {
19  return tangentPlane(toGlobal(aPoint));
20 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
virtual ReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const
tangent plane to surface from global point
Definition: Cylinder.cc:23

Member Data Documentation

Scalar Cylinder::theRadius
private

Definition at line 81 of file Cylinder.h.

Referenced by radius().