#include <SimpleDiskBounds.h>
Public Member Functions | |
virtual Bounds * | clone () const |
float | innerRadius () const |
Extension of the Bounds interface. | |
virtual bool | inside (const Local3DPoint &p) const |
Determine if the point is inside the bounds. | |
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 Local2DPoint &p, const LocalError &err) const |
virtual float | length () 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. | |
virtual float | thickness () const |
virtual float | width () const |
Private Attributes | |
float | theRmax |
float | theRmin |
float | theZmax |
float | theZmin |
Plane bounds that define a disk with a concentric hole in the middle.
Definition at line 13 of file SimpleDiskBounds.h.
SimpleDiskBounds::SimpleDiskBounds | ( | float | rmin, |
float | rmax, | ||
float | zmin, | ||
float | zmax | ||
) |
Bounds * SimpleDiskBounds::clone | ( | void | ) | const [virtual] |
Implements Bounds.
Definition at line 23 of file SimpleDiskBounds.cc.
References SimpleDiskBounds().
{ return new SimpleDiskBounds(*this); }
float SimpleDiskBounds::innerRadius | ( | ) | const [inline] |
Extension of the Bounds interface.
Definition at line 32 of file SimpleDiskBounds.h.
References theRmin.
Referenced by ThirdHitRZPredictionBase::initLayer(), and MuonRoadTrajectoryBuilder::makeTrajectories_0().
{return theRmin;}
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 29 of file SimpleDiskBounds.cc.
References deltaR(), f, 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().
{ if (p.z() < theZmin || p.z() > theZmax) return false; // check the easy part first double perp2 = p.perp2(); double perp = sqrt(perp2); if (perp2 == 0) return scale*scale*(err.xx() + err.xy()) > theRmin*theRmin; // rotated error along p.x(),p.y() // equivalent to (but faster than) err.rotate(p.x(),p.y()).xx() // since we don't need all matrix elements float deltaR = scale * sqrt( p.x()*p.x()/perp2 * err.xx() - 2*p.x()*p.y()/perp2 * err.xy() + p.y()*p.y()/perp2 * err.yy()); return perp > std::max(theRmin-deltaR, 0.f) && perp < theRmax+deltaR; }
bool SimpleDiskBounds::inside | ( | const Local2DPoint & | p, |
const LocalError & | err | ||
) | const [virtual] |
Definition at line 19 of file SimpleDiskBounds.cc.
References inside().
{ return Bounds::inside(p,err); }
bool SimpleDiskBounds::inside | ( | const Local3DPoint & | ) | const [virtual] |
Determine if the point is inside the bounds.
Implements Bounds.
Definition at line 14 of file SimpleDiskBounds.cc.
References PV3DBase< T, PVType, FrameType >::perp(), theRmax, theRmin, theZmax, theZmin, and PV3DBase< T, PVType, FrameType >::z().
Referenced by MuRingForwardDoubleLayer::compatible(), ForwardDetLayer::compatible(), and inside().
virtual float SimpleDiskBounds::length | ( | ) | const [inline, virtual] |
float SimpleDiskBounds::outerRadius | ( | ) | const [inline] |
Definition at line 33 of file SimpleDiskBounds.h.
References theRmax.
Referenced by ThirdHitRZPredictionBase::initLayer(), and MuonRoadTrajectoryBuilder::makeTrajectories_0().
{return theRmax;}
virtual float SimpleDiskBounds::thickness | ( | ) | const [inline, virtual] |
virtual float SimpleDiskBounds::width | ( | ) | const [inline, virtual] |
"width" of the bounds; refer to the concrete class documentation for the specific definition.
Implements Bounds.
Definition at line 20 of file SimpleDiskBounds.h.
References theRmax.
{ return 2*theRmax;}
float SimpleDiskBounds::theRmax [private] |
Definition at line 37 of file SimpleDiskBounds.h.
Referenced by inside(), outerRadius(), SimpleDiskBounds(), and width().
float SimpleDiskBounds::theRmin [private] |
Definition at line 36 of file SimpleDiskBounds.h.
Referenced by innerRadius(), inside(), and SimpleDiskBounds().
float SimpleDiskBounds::theZmax [private] |
Definition at line 39 of file SimpleDiskBounds.h.
Referenced by inside(), length(), SimpleDiskBounds(), and thickness().
float SimpleDiskBounds::theZmin [private] |
Definition at line 38 of file SimpleDiskBounds.h.
Referenced by inside(), length(), SimpleDiskBounds(), and thickness().