CMS 3D CMS Logo

SimpleCylinderBounds Class Reference

Cylinder bounds. More...

#include <DataFormats/GeometrySurface/interface/SimpleCylinderBounds.h>

Inheritance diagram for SimpleCylinderBounds:

Bounds

List of all members.

Public Member Functions

virtual Boundsclone () const
virtual bool inside (const Local2DPoint &p, const LocalError &err) const
virtual bool inside (const Local3DPoint &p, const LocalError &err, float scale) const
 Determine if a point is inside the bounds, taking error into account.
virtual bool inside (const Local3DPoint &p) const
 Determine if the point is inside the bounds.
virtual float length () const
 Lenght of the cylinder.
 SimpleCylinderBounds (float rmin, float rmax, float zmin, float zmax)
virtual float thickness () const
 Thikness of the "pipe", i.e. difference between outer and inner radius.
virtual float width () const
 Outer diameter of the cylinder.

Private Attributes

float theRmax
float theRmin
float theZmax
float theZmin


Detailed Description

Cylinder bounds.

The cylinder axis coincides with the Z axis. The bounds limit the length at constant Z, and allow finite thickness. The cylinder bound in this way looks like a pipe cut perpendicularily to it's axis. Width is intended as the (outer) diameter of the pipe and thickness as the thickness of the pipe, i.e. difference between outer and inner radius

Definition at line 20 of file SimpleCylinderBounds.h.


Constructor & Destructor Documentation

SimpleCylinderBounds::SimpleCylinderBounds ( float  rmin,
float  rmax,
float  zmin,
float  zmax 
)

Definition at line 5 of file SimpleCylinderBounds.cc.

References std::swap(), theRmax, theRmin, theZmax, and theZmin.

Referenced by clone().

00005                                                                                           : 
00006   theRmin(rmin), theRmax(rmax), theZmin(zmin), theZmax(zmax) {
00007   if ( theRmin > theRmax) std::swap( theRmin, theRmax);
00008   if ( theZmin > theZmax) std::swap( theZmin, theZmax);
00009 }


Member Function Documentation

Bounds * SimpleCylinderBounds::clone ( void   )  const [virtual]

Implements Bounds.

Definition at line 29 of file SimpleCylinderBounds.cc.

References SimpleCylinderBounds().

00029                                           { 
00030   return new SimpleCylinderBounds(*this);
00031 }

bool SimpleCylinderBounds::inside ( const Local2DPoint p,
const LocalError err 
) const [virtual]

Definition at line 25 of file SimpleCylinderBounds.cc.

References Bounds::inside().

00025                                                                                      {
00026   return Bounds::inside(p,err);
00027 }

bool SimpleCylinderBounds::inside ( const Local3DPoint ,
const LocalError ,
float  scale 
) const [virtual]

Determine if a point is inside the bounds, taking error into account.

Implements Bounds.

Definition at line 16 of file SimpleCylinderBounds.cc.

References inside(), funct::sqrt(), theRmax, theRmin, theZmax, theZmin, tmp, and LocalError::yy().

00016                                                                                                  {
00017 
00018     SimpleCylinderBounds tmp( theRmin, theRmax,
00019                               theZmin - sqrt(err.yy())*scale,
00020                               theZmax + sqrt(err.yy())*scale);
00021     
00022     return tmp.inside(p);
00023   }

bool SimpleCylinderBounds::inside ( const Local3DPoint  )  const [virtual]

Determine if the point is inside the bounds.

Implements Bounds.

Definition at line 11 of file SimpleCylinderBounds.cc.

References PV3DBase< T, PVType, FrameType >::perp(), theRmax, theRmin, theZmax, theZmin, and PV3DBase< T, PVType, FrameType >::z().

Referenced by inside().

00011                                                               {
00012   return p.z()    > theZmin && p.z()    < theZmax &&
00013     p.perp() > theRmin && p.perp() < theRmax;
00014 }

virtual float SimpleCylinderBounds::length (  )  const [inline, virtual]

Lenght of the cylinder.

Implements Bounds.

Definition at line 26 of file SimpleCylinderBounds.h.

References theZmax, and theZmin.

00026 { return theZmax - theZmin;}

virtual float SimpleCylinderBounds::thickness (  )  const [inline, virtual]

Thikness of the "pipe", i.e. difference between outer and inner radius.

Implements Bounds.

Definition at line 30 of file SimpleCylinderBounds.h.

References theRmax, and theRmin.

00030 { return theRmax-theRmin;}

virtual float SimpleCylinderBounds::width (  )  const [inline, virtual]

Outer diameter of the cylinder.

Implements Bounds.

Definition at line 28 of file SimpleCylinderBounds.h.

References theRmax.

00028 { return 2*theRmax;}


Member Data Documentation

float SimpleCylinderBounds::theRmax [private]

Definition at line 44 of file SimpleCylinderBounds.h.

Referenced by inside(), SimpleCylinderBounds(), thickness(), and width().

float SimpleCylinderBounds::theRmin [private]

Definition at line 43 of file SimpleCylinderBounds.h.

Referenced by inside(), SimpleCylinderBounds(), and thickness().

float SimpleCylinderBounds::theZmax [private]

Definition at line 46 of file SimpleCylinderBounds.h.

Referenced by inside(), length(), and SimpleCylinderBounds().

float SimpleCylinderBounds::theZmin [private]

Definition at line 45 of file SimpleCylinderBounds.h.

Referenced by inside(), length(), and SimpleCylinderBounds().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:38 2009 for CMSSW by  doxygen 1.5.4