#include <DiskSectorBounds.h>
Public Member Functions | |
virtual Bounds * | clone () const |
DiskSectorBounds (float rmin, float rmax, float zmin, float zmax, float phiExt) | |
float | innerRadius () const |
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 |
float | phiExtension () const |
virtual float | thickness () const |
virtual float | width () const |
Private Attributes | |
float | theOffset |
float | thePhiExt |
float | theRmax |
float | theRmin |
float | theZmax |
float | theZmin |
Definition at line 13 of file DiskSectorBounds.h.
DiskSectorBounds::DiskSectorBounds | ( | float | rmin, |
float | rmax, | ||
float | zmin, | ||
float | zmax, | ||
float | phiExt | ||
) | [inline] |
virtual Bounds* DiskSectorBounds::clone | ( | void | ) | const [inline, virtual] |
Implements Bounds.
Definition at line 35 of file DiskSectorBounds.h.
References DiskSectorBounds().
{ return new DiskSectorBounds(*this); }
float DiskSectorBounds::innerRadius | ( | void | ) | const [inline] |
Definition at line 39 of file DiskSectorBounds.h.
References theRmin.
Referenced by BoundDiskSector::innerRadius().
{return theRmin;}
bool DiskSectorBounds::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 17 of file DiskSectorBounds.cc.
References Geom::deltaPhi(), deltaR(), f, max(), perp(), perp2(), LocalError::rotate(), mathSSE::sqrt(), tmp, 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; Local3DPoint tmp( p.x(), p.y()+ theOffset, p.z()); double perp2 = tmp.perp2(); double perp = sqrt(perp2); // this is not really correct, should consider also the angle of the error ellipse if (perp2 == 0) return scale*scale*err.yy() > theRmin*theRmin; LocalError tmpErr( err.xx(), err.xy(), err.yy()); LocalError rotatedErr = tmpErr.rotate(tmp.x(), tmp.y()); // x direction in this system is now r, phi is y float deltaR = scale*sqrt(rotatedErr.xx()); float deltaPhi = atan( scale*sqrt(rotatedErr.yy())/perp); float tmpPhi = acos( tmp.y() / perp); return perp >= max(theRmin-deltaR, 0.f) && perp <= theRmax+deltaR && tmpPhi <= thePhiExt + deltaPhi ; }
bool DiskSectorBounds::inside | ( | const Local3DPoint & | ) | const [virtual] |
Determine if the point is inside the bounds.
Implements Bounds.
Definition at line 5 of file DiskSectorBounds.cc.
References tmp, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by inside().
virtual bool DiskSectorBounds::inside | ( | const Local2DPoint & | p, |
const LocalError & | err | ||
) | const [inline, virtual] |
Definition at line 31 of file DiskSectorBounds.h.
References inside().
{ return Bounds::inside(p,err); }
virtual float DiskSectorBounds::length | ( | ) | const [inline, virtual] |
float DiskSectorBounds::outerRadius | ( | void | ) | const [inline] |
Definition at line 40 of file DiskSectorBounds.h.
References theRmax.
Referenced by BoundDiskSector::outerRadius().
{return theRmax;}
float DiskSectorBounds::phiExtension | ( | ) | const [inline] |
Definition at line 41 of file DiskSectorBounds.h.
References thePhiExt.
Referenced by BoundDiskSector::phiExtension().
{return thePhiExt;}
virtual float DiskSectorBounds::thickness | ( | ) | const [inline, virtual] |
"Thickness" of the bound around the surface; refer to the concrete class documentation for the specific definition.
Implements Bounds.
Definition at line 25 of file DiskSectorBounds.h.
References theZmax, and theZmin.
Referenced by CompositeTECPetal::overlap().
virtual float DiskSectorBounds::width | ( | ) | const [inline, virtual] |
"width" of the bounds; refer to the concrete class documentation for the specific definition.
Implements Bounds.
Definition at line 24 of file DiskSectorBounds.h.
References funct::sin(), thePhiExt, and theRmax.
float DiskSectorBounds::theOffset [private] |
Definition at line 49 of file DiskSectorBounds.h.
Referenced by DiskSectorBounds().
float DiskSectorBounds::thePhiExt [private] |
Definition at line 48 of file DiskSectorBounds.h.
Referenced by length(), phiExtension(), and width().
float DiskSectorBounds::theRmax [private] |
Definition at line 45 of file DiskSectorBounds.h.
Referenced by DiskSectorBounds(), length(), outerRadius(), and width().
float DiskSectorBounds::theRmin [private] |
Definition at line 44 of file DiskSectorBounds.h.
Referenced by DiskSectorBounds(), innerRadius(), and length().
float DiskSectorBounds::theZmax [private] |
Definition at line 47 of file DiskSectorBounds.h.
Referenced by DiskSectorBounds(), and thickness().
float DiskSectorBounds::theZmin [private] |
Definition at line 46 of file DiskSectorBounds.h.
Referenced by DiskSectorBounds(), and thickness().