test
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
SimpleDiskBounds Class Referencefinal

#include <SimpleDiskBounds.h>

Inheritance diagram for SimpleDiskBounds:
Bounds

Public Member Functions

virtual Boundsclone () const
 
float innerRadius () const
 Extension of the Bounds interface. More...
 
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
 
float maxZ () const
 
float minZ () const
 
float outerRadius () const
 
 SimpleDiskBounds (float rmin, float rmax, float zmin, float zmax)
 Construct the bounds from min and max R and Z in LOCAL coordinates. More...
 
virtual float thickness () const
 
virtual float width () const
 
- Public Member Functions inherited from Bounds
void computeSpan (Surface const &plane)
 
virtual bool inside (const Local2DPoint &p) const
 
virtual bool inside (const Local2DPoint &p, float tollerance) const
 Determine if a point is inside the bounds, taking a tollerance into account. More...
 
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...
 
std::pair< float, float > const & phiSpan () const
 
std::pair< float, float > const & rSpan () const
 
virtual float widthAtHalfLength () const
 Width at half length. Useful for e.g. pitch definition. More...
 
std::pair< float, float > const & zSpan () const
 
virtual ~Bounds ()
 

Private Attributes

float theRmax
 
float theRmin
 
float theZmax
 
float theZmin
 

Detailed Description

Plane bounds that define a disk with a concentric hole in the middle.

Definition at line 13 of file SimpleDiskBounds.h.

Constructor & Destructor Documentation

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

Construct the bounds from min and max R and Z in LOCAL coordinates.

Definition at line 8 of file SimpleDiskBounds.cc.

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

Referenced by clone().

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

Member Function Documentation

Bounds * SimpleDiskBounds::clone ( void  ) const
virtual

Implements Bounds.

Definition at line 19 of file SimpleDiskBounds.cc.

References SimpleDiskBounds().

19  {
20  return new SimpleDiskBounds(*this);
21 }
SimpleDiskBounds(float rmin, float rmax, float zmin, float zmax)
Construct the bounds from min and max R and Z in LOCAL coordinates.
float SimpleDiskBounds::innerRadius ( ) const
inline

Extension of the Bounds interface.

Definition at line 37 of file SimpleDiskBounds.h.

References theRmin.

Referenced by ThirdHitRZPredictionBase::initLayer().

37 {return theRmin;}
virtual bool SimpleDiskBounds::inside ( const Local3DPoint ) const
inlinevirtual

Determine if the point is inside the bounds.

Implements Bounds.

Definition at line 23 of file SimpleDiskBounds.h.

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

Referenced by MuRingForwardDoubleLayer::compatible().

23  {
24  return ((p.z() > theZmin) & (p.z() < theZmax)) &&
25  ( (p.perp2() > theRmin*theRmin) & (p.perp2() < theRmax*theRmax) );
26  }
bool SimpleDiskBounds::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 25 of file SimpleDiskBounds.cc.

References deltaR(), f, bookConverter::max, perp(), PV3DBase< T, PVType, FrameType >::perp2(), perp2(), mathSSE::sqrt(), theRmax, theRmin, theZmax, theZmin, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

26 {
27  if (p.z() < theZmin || p.z() > theZmax) return false; // check the easy part first
28 
29  double perp2 = p.perp2();
30  double perp = sqrt(perp2);
31  if (perp2 == 0) return scale*scale*(err.xx() + err.xy()) > theRmin*theRmin;
32 
33  // rotated error along p.x(),p.y()
34  // equivalent to (but faster than) err.rotate(p.x(),p.y()).xx()
35  // since we don't need all matrix elements
36  float deltaR = scale * sqrt( p.x()*p.x()/perp2 * err.xx() -
37  2*p.x()*p.y()/perp2 * err.xy() +
38  p.y()*p.y()/perp2 * err.yy());
39  return perp > std::max(theRmin-deltaR, 0.f) && perp < theRmax+deltaR;
40 }
T sqrt(T t)
Definition: SSEVec.h:18
double f[11][100]
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
T perp2() const
Squared magnitude of transverse component.
T perp() const
Magnitude of transverse component.
bool SimpleDiskBounds::inside ( const Local2DPoint p,
const LocalError err 
) const
virtual

Definition at line 15 of file SimpleDiskBounds.cc.

References Bounds::inside().

15  {
16  return Bounds::inside(p,err);
17 }
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
virtual float SimpleDiskBounds::length ( ) const
inlinevirtual

"Lenght" of the bounded volume; refer to the concrete class documentation for the specific definition.

Implements Bounds.

Definition at line 19 of file SimpleDiskBounds.h.

References theZmax, and theZmin.

Referenced by Vispa.Views.LineDecayView.DecayLine::arrowBoundingRect(), Vispa.Views.LineDecayView.DecayLine::labelBoundingRect(), and Vispa.Views.LineDecayView.DecayLine::paint().

19 { return theZmax - theZmin;}
float SimpleDiskBounds::maxZ ( ) const
inline

Definition at line 41 of file SimpleDiskBounds.h.

References theZmax.

41 { return theZmax;}
float SimpleDiskBounds::minZ ( ) const
inline

Definition at line 40 of file SimpleDiskBounds.h.

References theZmin.

40 { return theZmin;}
float SimpleDiskBounds::outerRadius ( ) const
inline

Definition at line 38 of file SimpleDiskBounds.h.

References theRmax.

Referenced by ThirdHitRZPredictionBase::initLayer().

38 {return theRmax;}
virtual float SimpleDiskBounds::thickness ( ) const
inlinevirtual

"Thickness" of the bound around the surface; refer to the concrete class documentation for the specific definition.

Implements Bounds.

Definition at line 21 of file SimpleDiskBounds.h.

References theZmax, and theZmin.

Referenced by ForwardDetLayer::zmax(), and ForwardDetLayer::zmin().

virtual float SimpleDiskBounds::width ( ) const
inlinevirtual

Member Data Documentation

float SimpleDiskBounds::theRmax
private

Definition at line 45 of file SimpleDiskBounds.h.

Referenced by inside(), outerRadius(), SimpleDiskBounds(), and width().

float SimpleDiskBounds::theRmin
private

Definition at line 44 of file SimpleDiskBounds.h.

Referenced by innerRadius(), inside(), and SimpleDiskBounds().

float SimpleDiskBounds::theZmax
private

Definition at line 47 of file SimpleDiskBounds.h.

Referenced by inside(), length(), maxZ(), SimpleDiskBounds(), and thickness().

float SimpleDiskBounds::theZmin
private

Definition at line 46 of file SimpleDiskBounds.h.

Referenced by inside(), length(), minZ(), SimpleDiskBounds(), and thickness().