CMS 3D CMS Logo

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

#include <SimpleCylinderBounds.h>

Inheritance diagram for SimpleCylinderBounds:
Bounds

Public Member Functions

virtual Boundsclone () const
 
virtual bool inside (const Local3DPoint &p) const
 Determine if the point is inside the bounds. More...
 
virtual bool inside (const Local3DPoint &p, const LocalError &err, float scale) const
 Determine if a point is inside the bounds, taking error into account. More...
 
virtual bool inside (const Local2DPoint &p, const LocalError &err) const
 
virtual float length () const
 Lenght of the cylinder. More...
 
 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. More...
 
virtual float width () const
 Outer diameter of the cylinder. More...
 
- Public Member Functions inherited from Bounds
virtual bool inside (const Local2DPoint &p) const
 
virtual bool inside (const Local2DPoint &p, const LocalError &err, float scale=1.f) const
 Determine if a 2D point is inside the bounds, taking error into account. More...
 
virtual float widthAtHalfLength () const
 Width at half length. Useful for e.g. pitch definition. More...
 
virtual ~Bounds ()
 

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().

5  :
6  theRmin(rmin), theRmax(rmax), theZmin(zmin), theZmax(zmax) {
9 }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)

Member Function Documentation

Bounds * SimpleCylinderBounds::clone ( void  ) const
virtual

Implements Bounds.

Definition at line 29 of file SimpleCylinderBounds.cc.

References SimpleCylinderBounds().

29  {
30  return new SimpleCylinderBounds(*this);
31 }
SimpleCylinderBounds(float rmin, float rmax, float zmin, float zmax)
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().

11  {
12  return p.z() > theZmin && p.z() < theZmax &&
13  p.perp() > theRmin && p.perp() < theRmax;
14 }
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(), mathSSE::sqrt(), theRmax, theRmin, theZmax, theZmin, tmp, and LocalError::yy().

16  {
17 
19  theZmin - sqrt(err.yy())*scale,
20  theZmax + sqrt(err.yy())*scale);
21 
22  return tmp.inside(p);
23  }
T sqrt(T t)
Definition: SSEVec.h:28
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool SimpleCylinderBounds::inside ( const Local2DPoint p,
const LocalError err 
) const
virtual

Definition at line 25 of file SimpleCylinderBounds.cc.

References Bounds::inside().

25  {
26  return Bounds::inside(p,err);
27 }
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
virtual float SimpleCylinderBounds::length ( ) const
inlinevirtual
virtual float SimpleCylinderBounds::thickness ( ) const
inlinevirtual

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.

virtual float SimpleCylinderBounds::width ( ) const
inlinevirtual

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().