#include <DetDesc/SolidSphere.h>
Inheritance diagram for SolidSphere:
Public Types | ||||
typedef double | Tick | |||
useful type definition for dealing with intersections of the solid and the line | ||||
typedef StaticArray< Tick, 64 > | Ticks | |||
SUCCESS | ||||
NO_INTERFACE | ||||
VERSMISMATCH | ||||
LAST_ERROR | ||||
enum | Status | |||
Public Member Functions | ||||
SolidSphere (const std::string &name, const double OuterRadius, const double InsideRadius=0.0, const double StartPhiAngle=0.0 *Gaudi::Units::degree, const double DeltaPhiAngle=360.0 *Gaudi::Units::degree, const double StartThetaAngle=0.0 *Gaudi::Units::degree, const double DeltaThetaAngle=180.0 *Gaudi::Units::degree, const int CoverModel=0) | ||||
constructor | ||||
virtual | ~SolidSphere () | |||
std::string | typeName () const | |||
| ||||
bool | isInside (const Gaudi::XYZPoint &point) const | |||
| ||||
bool | isInside (const Gaudi::Polar3DPoint &point) const | |||
bool | isInside (const Gaudi::RhoZPhiPoint &point) const | |||
const ISolid * | cover () const | |||
| ||||
virtual std::ostream & | printOut (std::ostream &os=std::cout) const | |||
| ||||
virtual MsgStream & | printOut (MsgStream &os) const | |||
| ||||
virtual unsigned int | intersectionTicks (const Gaudi::XYZPoint &Point, const Gaudi::XYZVector &Vector, ISolid::Ticks &ticks) const | |||
| ||||
virtual unsigned int | intersectionTicks (const Gaudi::Polar3DPoint &Point, const Gaudi::Polar3DVector &Vector, ISolid::Ticks &ticks) const | |||
virtual unsigned int | intersectionTicks (const Gaudi::RhoZPhiPoint &Point, const Gaudi::RhoZPhiVector &Vector, ISolid::Ticks &ticks) const | |||
double | insideRadius () const | |||
return the inner radius of sphere segment | ||||
double | insideR2 () const | |||
return the squared inner radius of sphere segment | ||||
double | outerRadius () const | |||
return the outer radius of sphere segment | ||||
double | outerR2 () const | |||
return the squared outer radius of sphere segment | ||||
double | startPhiAngle () const | |||
return the start of phi angle of sphere segment | ||||
double | deltaPhiAngle () const | |||
return the delta of phi angle of sphere segment | ||||
double | startThetaAngle () const | |||
return the start of theta angle of sphere segment | ||||
double | deltaThetaAngle () const | |||
return the delta of theta angle of sphere segment | ||||
double | insideDiameter () const | |||
return the inner diameter of sphere segment | ||||
double | outerDiameter () const | |||
return the outer diameter of sphere segment | ||||
double | endPhiAngle () const | |||
return the end of phi angle of sphere segment | ||||
double | endThetaAngle () const | |||
return the end of theta angle of sphere segment | ||||
Ticks::size_type | maxNumberOfTicks () const | |||
Calculate the maximum number of ticks that a straight line could make with this solid. | ||||
virtual const std::string & | name () const | |||
| ||||
virtual ISolid * | reset () | |||
| ||||
virtual unsigned int | intersectionTicks (const Gaudi::XYZPoint &Point, const Gaudi::XYZVector &Vector, const ISolid::Tick &tickMin, const ISolid::Tick &tickMax, ISolid::Ticks &ticks) const | |||
| ||||
virtual unsigned int | intersectionTicks (const Gaudi::Polar3DPoint &Point, const Gaudi::Polar3DVector &Vector, const ISolid::Tick &tickMin, const ISolid::Tick &tickMax, ISolid::Ticks &ticks) const | |||
virtual unsigned int | intersectionTicks (const Gaudi::RhoZPhiPoint &Point, const Gaudi::RhoZPhiVector &Vector, const ISolid::Tick &tickMin, const ISolid::Tick &tickMax, ISolid::Ticks &ticks) const | |||
virtual StatusCode | queryInterface (const InterfaceID &ID, void **ppI) | |||
| ||||
virtual unsigned long | addRef () | |||
| ||||
virtual unsigned long | release () | |||
| ||||
virtual const ISolid * | coverTop () const | |||
| ||||
double | xMin () const | |||
accessor to "minimal x" value of the solid ("bounding box") | ||||
double | xMax () const | |||
accessor to "maximal x" value of the solid ("bounding box") | ||||
double | yMin () const | |||
accessor to "minimal y" value of the solid ("bounding box") | ||||
double | yMax () const | |||
accessor to "maximal y" value of the solid ("bounding box") | ||||
double | zMin () const | |||
accessor to "minimal z" value of the solid ("bounding box") | ||||
double | zMax () const | |||
accessor to "maximal z" value of the solid ("bounding box") | ||||
double | rMax () const | |||
accessor to "maximal r" value of the solid ("bounding sphere") | ||||
double | rhoMax () const | |||
accessor to "maximal rho" value of the solid ("bounding sphere") | ||||
Static Public Member Functions | ||||
static const InterfaceID & | interfaceID () | |||
retrieve the uninque interface identifier | ||||
Public Attributes | ||||
SUCCESS | ||||
NO_INTERFACE | ||||
VERSMISMATCH | ||||
LAST_ERROR | ||||
Protected Member Functions | ||||
bool | noPhiGap () const | |||
gap in phi ? | ||||
bool | noThetaGap () const | |||
gap in theta ? | ||||
template<class aPoint> | ||||
bool | insideR (const aPoint &point) const | |||
check for R | ||||
template<class aPoint> | ||||
bool | insidePhi (const aPoint &point) const | |||
check for phi | ||||
template<class aPoint> | ||||
bool | insideTheta (const aPoint &point) const | |||
check for theta | ||||
SolidSphere (const std::string &name="Anonymous Sphere") | ||||
protected constructor | ||||
void | setBP () | |||
set bounding parameters | ||||
template<class aPoint> | ||||
bool | isOutBBox (const aPoint &point, const double tolerance) const | |||
Fast check if the point is outside the bounding box of the solid. | ||||
template<class aPoint> | ||||
bool | isOutBBox (const aPoint &point) const | |||
Fast check if the point is outside the bounding box of the solid. | ||||
template<class aPointA, class aPointB> | ||||
bool | isOutBBox (const aPointA &p1, const aPointB &p2, const double tolerance) const | |||
Fast check if the segment of the line between two points is outside the bounding box. | ||||
template<class aPointA, class aPointB> | ||||
bool | isOutBBox (const aPointA &p1, const aPointB &p2) const | |||
Fast check if the segment of the line between two points is outside the bounding box. | ||||
template<class aPoint, class aVector> | ||||
bool | isOutBBox (const aPoint &p, const aVector &v, const ISolid::Tick &tmin, const ISolid::Tick &tmax, const double tolerance) const | |||
Fast check if the segment of the line between two points is outside the bounding box. | ||||
template<class aPoint, class aVector> | ||||
bool | isOutBBox (const aPoint &p, const aVector &v, const ISolid::Tick &tmin, const ISolid::Tick &tmax) const | |||
Fast check if the segment of the line between two points is outside the bounding box. | ||||
template<class aPoint> | ||||
bool | isOutBSphere (const aPoint &point, const double tolerance) const | |||
Fast check if the point is outside the bounding sphere of the solid. | ||||
template<class aPoint> | ||||
bool | isOutBSphere (const aPoint &point) const | |||
Fast check if the point is outside the bounding sphere of the solid. | ||||
template<class aPoint> | ||||
bool | isOutBCylinder (const aPoint &point, const double tolerance) const | |||
Fast check if the point is outside the bounding cylinder of the solid. | ||||
template<class aPoint> | ||||
bool | isOutBCylinder (const aPoint &point) const | |||
Fast check if the point is outside the bounding cylinder of the solid. | ||||
template<class aPoint, class aVector> | ||||
bool | crossBSphere (const aPoint &p, const aVector &v, const double tolerance=0) const | |||
Fast check if the line cross the bounding sphere. | ||||
template<class aPoint, class aVector> | ||||
bool | crossBCylinder (const aPoint &p, const aVector &v, const double tolerance=0) const | |||
Fast check if the line cross the surface of bounding cylinder. | ||||
void | setXMin (const double value) | |||
set "minimal x" for the solid | ||||
void | setXMax (const double value) | |||
set "maximal x" for the solid | ||||
void | setYMin (const double value) | |||
set "minimal y" for the solid | ||||
void | setYMax (const double value) | |||
set "maximal y" for the solid | ||||
void | setZMin (const double value) | |||
set "minimal z" for the solid | ||||
void | setZMax (const double value) | |||
set "maximal z" for the solid | ||||
void | setRMax (const double value) | |||
set "maximal r" for the solid | ||||
void | setRhoMax (const double value) | |||
set "maximal r" for the solid | ||||
void | checkBP () const | |||
check bounding parameters
| ||||
IMessageSvc * | msgSvc () const | |||
accessor to massage service | ||||
Protected Attributes | ||||
std::string | m_name | |||
name of the solid | ||||
ISolid * | m_cover | |||
pointer to cover | ||||
double | m_xmin | |||
double | m_ymin | |||
double | m_zmin | |||
double | m_xmax | |||
double | m_ymax | |||
double | m_zmax | |||
double | m_rmax | |||
double | m_rhomax | |||
DetDesc::Services * | m_services | |||
reference to services | ||||
Private Member Functions | ||||
SolidSphere (const SolidSphere &) | ||||
SolidSphere & | operator= (const SolidSphere &) | |||
template<class aPoint> | ||||
bool | isInsideImpl (const aPoint &point) const | |||
implementation of isInside | ||||
template<class aPoint, class aVector> | ||||
unsigned int | intersectionTicksImpl (const aPoint &Point, const aVector &Vector, ISolid::Ticks &ticks) const | |||
Private Attributes | ||||
double | m_sphere_outerR2 | |||
sphere segment parameters | ||||
double | m_sphere_insideR2 | |||
double | m_sphere_startPhiAngle | |||
double | m_sphere_deltaPhiAngle | |||
double | m_sphere_startThetaAngle | |||
double | m_sphere_deltaThetaAngle | |||
int | m_sphere_coverModel | |||
cover model | ||||
double | m_sphere_outerR | |||
double | m_sphere_insideR | |||
bool | m_noPhiGap | |||
bool | m_noThetaGap | |||
Friends | ||||
class | SolidFactory< SolidSphere > | |||
friend factory fo instantiation |
Definition at line 21 of file SolidSphere.h.
typedef double ISolid::Tick [inherited] |
typedef StaticArray<Tick,64> ISolid::Ticks [inherited] |
SolidSphere::SolidSphere | ( | const std::string & | name, | |
const double | OuterRadius, | |||
const double | InsideRadius = 0.0 , |
|||
const double | StartPhiAngle = 0.0 *Gaudi::Units::degree , |
|||
const double | DeltaPhiAngle = 360.0 *Gaudi::Units::degree , |
|||
const double | StartThetaAngle = 0.0 *Gaudi::Units::degree , |
|||
const double | DeltaThetaAngle = 180.0 *Gaudi::Units::degree , |
|||
const int | CoverModel = 0 | |||
) |
constructor
name | name of sphere segment | |
OuterRadius | outer radius of sphere segement | |
InsideRadius | inner radius of sphere segement | |
StartPhiAngle | start phi angle | |
DeltaPhiAngle | delta phi angle | |
StartThetaAngle | start theta angle | |
DeltaThetaAngle | delta theta angle | |
CoverModel | covering model |
virtual SolidSphere::~SolidSphere | ( | ) | [virtual] |
SolidSphere::SolidSphere | ( | const std::string & | name = "Anonymous Sphere" |
) | [protected] |
protected constructor
name | name of the sphere segment \ |
SolidSphere::SolidSphere | ( | const SolidSphere & | ) | [private] |
std::string SolidSphere::typeName | ( | ) | const [inline, virtual] |
Implements ISolid.
Definition at line 55 of file SolidSphere.h.
bool SolidSphere::isInside | ( | const Gaudi::XYZPoint & | point | ) | const [virtual] |
bool SolidSphere::isInside | ( | const Gaudi::Polar3DPoint & | point | ) | const [virtual] |
Implements ISolid.
bool SolidSphere::isInside | ( | const Gaudi::RhoZPhiPoint & | point | ) | const [virtual] |
Implements ISolid.
const ISolid* SolidSphere::cover | ( | ) | const [virtual] |
Implements ISolid.
virtual std::ostream& SolidSphere::printOut | ( | std::ostream & | os = std::cout |
) | const [virtual] |
virtual unsigned int SolidSphere::intersectionTicks | ( | const Gaudi::XYZPoint & | Point, | |
const Gaudi::XYZVector & | Vector, | |||
ISolid::Ticks & | ticks | |||
) | const [virtual] |
Point | initial point for the line | |
Vector | vector along the line | |
ticks | output container of "Ticks" |
Reimplemented from SolidBase.
virtual unsigned int SolidSphere::intersectionTicks | ( | const Gaudi::Polar3DPoint & | Point, | |
const Gaudi::Polar3DVector & | Vector, | |||
ISolid::Ticks & | ticks | |||
) | const [virtual] |
Reimplemented from SolidBase.
virtual unsigned int SolidSphere::intersectionTicks | ( | const Gaudi::RhoZPhiPoint & | Point, | |
const Gaudi::RhoZPhiVector & | Vector, | |||
ISolid::Ticks & | ticks | |||
) | const [virtual] |
Reimplemented from SolidBase.
double SolidSphere::insideRadius | ( | ) | const [inline] |
return the inner radius of sphere segment
Definition at line 150 of file SolidSphere.h.
00151 { return m_sphere_insideR ; };
double SolidSphere::insideR2 | ( | ) | const [inline] |
return the squared inner radius of sphere segment
Definition at line 156 of file SolidSphere.h.
00157 { return m_sphere_insideR2 ; };
double SolidSphere::outerRadius | ( | ) | const [inline] |
return the outer radius of sphere segment
Definition at line 162 of file SolidSphere.h.
00163 { return m_sphere_outerR ; };
double SolidSphere::outerR2 | ( | ) | const [inline] |
return the squared outer radius of sphere segment
Definition at line 168 of file SolidSphere.h.
00169 { return m_sphere_outerR2 ; };
double SolidSphere::startPhiAngle | ( | ) | const [inline] |
return the start of phi angle of sphere segment
Definition at line 174 of file SolidSphere.h.
00175 { return m_sphere_startPhiAngle ; };
double SolidSphere::deltaPhiAngle | ( | ) | const [inline] |
return the delta of phi angle of sphere segment
Definition at line 180 of file SolidSphere.h.
00181 { return m_sphere_deltaPhiAngle ; };
double SolidSphere::startThetaAngle | ( | ) | const [inline] |
return the start of theta angle of sphere segment
Definition at line 186 of file SolidSphere.h.
00187 { return m_sphere_startThetaAngle; };
double SolidSphere::deltaThetaAngle | ( | ) | const [inline] |
return the delta of theta angle of sphere segment
Definition at line 192 of file SolidSphere.h.
00193 { return m_sphere_deltaThetaAngle; };
double SolidSphere::insideDiameter | ( | ) | const [inline] |
return the inner diameter of sphere segment
Definition at line 198 of file SolidSphere.h.
00199 { return insideRadius() * 2 ; };
double SolidSphere::outerDiameter | ( | ) | const [inline] |
return the outer diameter of sphere segment
Definition at line 204 of file SolidSphere.h.
00205 { return outerRadius() * 2 ; };
double SolidSphere::endPhiAngle | ( | ) | const [inline] |
return the end of phi angle of sphere segment
Definition at line 210 of file SolidSphere.h.
00211 { return m_sphere_startPhiAngle + m_sphere_deltaPhiAngle ; };
double SolidSphere::endThetaAngle | ( | ) | const [inline] |
return the end of theta angle of sphere segment
Definition at line 216 of file SolidSphere.h.
00217 { return m_sphere_startThetaAngle + m_sphere_deltaThetaAngle ; };
Ticks::size_type SolidSphere::maxNumberOfTicks | ( | ) | const [inline, virtual] |
Calculate the maximum number of ticks that a straight line could make with this solid.
Implements ISolid.
Definition at line 223 of file SolidSphere.h.
bool SolidSphere::noPhiGap | ( | ) | const [inline, protected] |
bool SolidSphere::noThetaGap | ( | ) | const [inline, protected] |
bool SolidSphere::insideR | ( | const aPoint & | point | ) | const [inline, protected] |
check for R
point | to be checked |
Definition at line 312 of file SolidSphere.h.
00313 { 00314 const double r2 = point.mag2(); 00315 if( r2 > outerR2 () ) { return false ; } 00316 if( r2 < insideR2 () ) { return false ; } 00317 // inside! 00318 return true ; 00319 };
bool SolidSphere::insidePhi | ( | const aPoint & | point | ) | const [inline, protected] |
check for phi
point | to be checked |
Definition at line 329 of file SolidSphere.h.
00330 { 00331 if( noPhiGap() ) { return true ; } 00332 double phi = point.phi() ; // [-180,180] 00333 if( startPhiAngle () <= phi && 00334 startPhiAngle () + deltaPhiAngle() >= phi ) { return true ; } 00335 phi += 360 * Gaudi::Units::degree ; 00336 if( startPhiAngle () <= phi && 00337 startPhiAngle () + deltaPhiAngle() >= phi ) { return true ; } 00338 // 00339 return false ; 00340 };
bool SolidSphere::insideTheta | ( | const aPoint & | point | ) | const [inline, protected] |
check for theta
point | to be checked |
Definition at line 350 of file SolidSphere.h.
00351 { 00352 if( noThetaGap() ) { return true ; } 00353 const double theta = point.theta() ; 00354 if( startThetaAngle () <= theta && 00355 startThetaAngle () + deltaThetaAngle() >= theta ) { return true ; } 00356 // 00357 return false ; 00358 };
void SolidSphere::setBP | ( | ) | [protected] |
set bounding parameters
SolidSphere& SolidSphere::operator= | ( | const SolidSphere & | ) | [private] |
bool SolidSphere::isInsideImpl | ( | const aPoint & | point | ) | const [private] |
implementation of isInside
point | reference to any kind of point with x(), y(), z() |
unsigned int SolidSphere::intersectionTicksImpl | ( | const aPoint & | Point, | |
const aVector & | Vector, | |||
ISolid::Ticks & | ticks | |||
) | const [private] |
virtual const std::string& SolidBase::name | ( | ) | const [inline, virtual, inherited] |
virtual ISolid* SolidBase::reset | ( | ) | [virtual, inherited] |
Implements ISolid.
Reimplemented in SolidBoolean, and SolidChild.
virtual unsigned int SolidBase::intersectionTicks | ( | const Gaudi::XYZPoint & | Point, | |
const Gaudi::XYZVector & | Vector, | |||
const ISolid::Tick & | tickMin, | |||
const ISolid::Tick & | tickMax, | |||
ISolid::Ticks & | ticks | |||
) | const [virtual, inherited] |
Point | initial point for the line | |
Vector | vector along the line | |
tickMin | minimum value of Tick | |
tickMax | maximu value of Tick | |
ticks | output container of "Ticks" |
Implements ISolid.
Reimplemented in SolidBoolean, SolidBox, SolidCons, and SolidTubs.
virtual unsigned int SolidBase::intersectionTicks | ( | const Gaudi::Polar3DPoint & | Point, | |
const Gaudi::Polar3DVector & | Vector, | |||
const ISolid::Tick & | tickMin, | |||
const ISolid::Tick & | tickMax, | |||
ISolid::Ticks & | ticks | |||
) | const [virtual, inherited] |
virtual unsigned int SolidBase::intersectionTicks | ( | const Gaudi::RhoZPhiPoint & | Point, | |
const Gaudi::RhoZPhiVector & | Vector, | |||
const ISolid::Tick & | tickMin, | |||
const ISolid::Tick & | tickMax, | |||
ISolid::Ticks & | ticks | |||
) | const [virtual, inherited] |
virtual StatusCode SolidBase::queryInterface | ( | const InterfaceID & | ID, | |
void ** | ppI | |||
) | [virtual, inherited] |
ID | unique interafce identifier | |
ppI | placeholder for returned interface |
Implements IInterface.
virtual unsigned long SolidBase::addRef | ( | ) | [virtual, inherited] |
Implements IInterface.
virtual unsigned long SolidBase::release | ( | ) | [virtual, inherited] |
Implements IInterface.
virtual const ISolid* SolidBase::coverTop | ( | ) | const [virtual, inherited] |
Implements ISolid.
Reimplemented in SolidBoolean, SolidBox, SolidChild, and SolidUnion.
double SolidBase::xMin | ( | ) | const [inline, inherited] |
accessor to "minimal x" value of the solid ("bounding box")
Definition at line 161 of file SolidBase.h.
00161 { return m_xmin ; }
double SolidBase::xMax | ( | ) | const [inline, inherited] |
accessor to "maximal x" value of the solid ("bounding box")
Definition at line 163 of file SolidBase.h.
00163 { return m_xmax ; }
double SolidBase::yMin | ( | ) | const [inline, inherited] |
accessor to "minimal y" value of the solid ("bounding box")
Definition at line 166 of file SolidBase.h.
00166 { return m_ymin ; }
double SolidBase::yMax | ( | ) | const [inline, inherited] |
accessor to "maximal y" value of the solid ("bounding box")
Definition at line 168 of file SolidBase.h.
00168 { return m_ymax ; }
double SolidBase::zMin | ( | ) | const [inline, inherited] |
accessor to "minimal z" value of the solid ("bounding box")
Definition at line 171 of file SolidBase.h.
00171 { return m_zmin ; }
double SolidBase::zMax | ( | ) | const [inline, inherited] |
accessor to "maximal z" value of the solid ("bounding box")
Definition at line 173 of file SolidBase.h.
00173 { return m_zmax ; }
double SolidBase::rMax | ( | ) | const [inline, inherited] |
accessor to "maximal r" value of the solid ("bounding sphere")
Definition at line 176 of file SolidBase.h.
00176 { return m_rmax ; }
double SolidBase::rhoMax | ( | ) | const [inline, inherited] |
accessor to "maximal rho" value of the solid ("bounding sphere")
Definition at line 179 of file SolidBase.h.
00179 { return m_rhomax ; }
bool SolidBase::isOutBBox | ( | const aPoint & | point, | |
const double | tolerance | |||
) | const [inline, protected, inherited] |
Fast check if the point is outside the bounding box of the solid.
point | point to be checked | |
tolerance | tolerance parameter |
Definition at line 190 of file SolidBase.h.
00192 { 00193 return 00194 point.z () < zMin () - tolerance || 00195 point.z () > zMax () + tolerance || 00196 point.x () < xMin () - tolerance || 00197 point.x () > xMax () + tolerance || 00198 point.y () < yMin () - tolerance || 00199 point.y () > yMax () + tolerance ; 00200 };
bool SolidBase::isOutBBox | ( | const aPoint & | point | ) | const [inline, protected, inherited] |
Fast check if the point is outside the bounding box of the solid.
point | point to be checked |
Definition at line 207 of file SolidBase.h.
00208 { 00209 return 00210 point.z () < zMin () || 00211 point.z () > zMax () || 00212 point.x () < xMin () || 00213 point.x () > xMax () || 00214 point.y () < yMin () || 00215 point.y () > yMax () ; 00216 };
bool SolidBase::isOutBBox | ( | const aPointA & | p1, | |
const aPointB & | p2, | |||
const double | tolerance | |||
) | const [inline, protected, inherited] |
Fast check if the segment of the line between two points is outside the bounding box.
p1 | first point of the segment | |
p2 | second point of the segment | |
tolerance | tolerance parameter |
Definition at line 283 of file SolidBase.h.
00286 { 00287 return 00288 ( (p1.z() < zMin()-tolerance && p2.z() < zMin()-tolerance) || 00289 (p1.z() > zMax()+tolerance && p2.z() > zMax()+tolerance) || 00290 (p1.x() < xMin()-tolerance && p2.x() < xMin()-tolerance) || 00291 (p1.x() > xMax()+tolerance && p2.x() > xMax()+tolerance) || 00292 (p1.y() < yMin()-tolerance && p2.y() < yMin()-tolerance) || 00293 (p1.y() > yMax()+tolerance && p2.y() > yMax()+tolerance) ); 00294 };
bool SolidBase::isOutBBox | ( | const aPointA & | p1, | |
const aPointB & | p2 | |||
) | const [inline, protected, inherited] |
Fast check if the segment of the line between two points is outside the bounding box.
p1 | first point of the segment | |
p2 | second point of the segment |
Definition at line 304 of file SolidBase.h.
00306 { 00307 return 00308 ( p1.z() < zMin() && p2.z() < zMin() ) || 00309 ( p1.z() > zMax() && p2.z() > zMax() ) || 00310 ( p1.x() < xMin() && p2.x() < xMin() ) || 00311 ( p1.x() > xMax() && p2.x() > xMax() ) || 00312 ( p1.y() < yMin() && p2.y() < yMin() ) || 00313 ( p1.y() > yMax() && p2.y() > yMax() ) ; 00314 };
bool SolidBase::isOutBBox | ( | const aPoint & | p, | |
const aVector & | v, | |||
const ISolid::Tick & | tmin, | |||
const ISolid::Tick & | tmax, | |||
const double | tolerance | |||
) | const [inline, protected, inherited] |
Fast check if the segment of the line between two points is outside the bounding box.
p | first point of the segment | |
v | vector along the line | |
tmin | "minimal value of tick" | |
tmax | "maximal value of tick" | |
tolerance | tolerance parameter |
Definition at line 327 of file SolidBase.h.
bool SolidBase::isOutBBox | ( | const aPoint & | p, | |
const aVector & | v, | |||
const ISolid::Tick & | tmin, | |||
const ISolid::Tick & | tmax | |||
) | const [inline, protected, inherited] |
Fast check if the segment of the line between two points is outside the bounding box.
p | first point of the segment | |
v | vector along the line | |
tmin | "minimal value of tick" | |
tmax | "maximal value of tick" |
Definition at line 346 of file SolidBase.h.
bool SolidBase::isOutBSphere | ( | const aPoint & | point, | |
const double | tolerance | |||
) | const [inline, protected, inherited] |
Fast check if the point is outside the bounding sphere of the solid.
point | point to be checked | |
tolerance | tolerance parameter |
Definition at line 225 of file SolidBase.h.
00227 { 00228 const double rmax = rMax() + tolerance ; 00229 return rmax <= 0 || point.mag2() > rmax * rmax ; 00230 };
bool SolidBase::isOutBSphere | ( | const aPoint & | point | ) | const [inline, protected, inherited] |
Fast check if the point is outside the bounding sphere of the solid.
point | point to be checked |
Definition at line 237 of file SolidBase.h.
bool SolidBase::isOutBCylinder | ( | const aPoint & | point, | |
const double | tolerance | |||
) | const [inline, protected, inherited] |
Fast check if the point is outside the bounding cylinder of the solid.
point | point to be checked | |
tolerance | tolerance parameter |
Definition at line 250 of file SolidBase.h.
00252 { 00253 const double rhomax = rhoMax() + tolerance ; 00254 return rhomax <= 0 ? true : 00255 point.z () < zMin () - tolerance ? true : 00256 point.z () > zMax () + tolerance ? true : 00257 point.perp2 () > rhomax * rhomax ? true : false ; 00258 };
bool SolidBase::isOutBCylinder | ( | const aPoint & | point | ) | const [inline, protected, inherited] |
Fast check if the point is outside the bounding cylinder of the solid.
point | point to be checked |
Definition at line 266 of file SolidBase.h.
00267 { 00268 return 00269 point.z () < zMin () || 00270 point.z () > zMax () || 00271 point.perp2 () > rhoMax () * rhoMax () ; 00272 };
bool SolidBase::crossBSphere | ( | const aPoint & | p, | |
const aVector & | v, | |||
const double | tolerance = 0 | |||
) | const [inline, protected, inherited] |
Fast check if the line cross the bounding sphere.
p | first point on the line | |
v | vector along the line | |
tolerance | tolerance parameter |
Definition at line 362 of file SolidBase.h.
00365 { 00366 const double pp = p.mag2 () ; 00367 const double vv = v.mag2 () ; 00368 const double pv = p.Dot ( v ) ; 00369 const double rmax = rMax() + tolerance ; 00370 const double dd = rmax * rmax ; 00371 return ( rmax > 0 && 00372 !(0 == vv && pp > dd) && 00373 !( (vv*pp) - (pv*pv) > vv*dd ) ); 00374 };
bool SolidBase::crossBCylinder | ( | const aPoint & | p, | |
const aVector & | v, | |||
const double | tolerance = 0 | |||
) | const [inline, protected, inherited] |
Fast check if the line cross the surface of bounding cylinder.
p | first point on the line | |
v | vector along the line | |
tolerance | tolerance parameter |
Definition at line 384 of file SolidBase.h.
00387 { 00388 const double pp = p.perp2 () ; 00389 const double vv = v.perp2 () ; 00390 const double pv = p.Dot ( v ) - p.z() * v.z() ; 00391 const double rhomax = rhoMax() + tolerance ; 00392 const double dd = rhomax * rhomax ; 00393 return ( rhomax > 0 && 00394 !( 0 == vv && pp > dd ) && 00395 !( (vv*pp) - (pv*pv) > vv*dd ) ); 00396 };
void SolidBase::setXMin | ( | const double | value | ) | [inline, protected, inherited] |
void SolidBase::setXMax | ( | const double | value | ) | [inline, protected, inherited] |
void SolidBase::setYMin | ( | const double | value | ) | [inline, protected, inherited] |
void SolidBase::setYMax | ( | const double | value | ) | [inline, protected, inherited] |
void SolidBase::setZMin | ( | const double | value | ) | [inline, protected, inherited] |
void SolidBase::setZMax | ( | const double | value | ) | [inline, protected, inherited] |
void SolidBase::setRMax | ( | const double | value | ) | [inline, protected, inherited] |
void SolidBase::setRhoMax | ( | const double | value | ) | [inline, protected, inherited] |
set "maximal r" for the solid
Definition at line 418 of file SolidBase.h.
00418 { m_rhomax = value ; }
void SolidBase::checkBP | ( | ) | const [protected, inherited] |
IMessageSvc* SolidBase::msgSvc | ( | ) | const [protected, inherited] |
accessor to massage service
static const InterfaceID& ISolid::interfaceID | ( | ) | [inline, static, inherited] |
retrieve the uninque interface identifier
Reimplemented from IInterface.
Definition at line 44 of file ISolid.h.
00044 { return IID_ISolid; }
friend class SolidFactory< SolidSphere > [friend] |
double SolidSphere::m_sphere_outerR2 [private] |
double SolidSphere::m_sphere_insideR2 [private] |
Definition at line 287 of file SolidSphere.h.
double SolidSphere::m_sphere_startPhiAngle [private] |
Definition at line 288 of file SolidSphere.h.
double SolidSphere::m_sphere_deltaPhiAngle [private] |
Definition at line 289 of file SolidSphere.h.
double SolidSphere::m_sphere_startThetaAngle [private] |
Definition at line 290 of file SolidSphere.h.
double SolidSphere::m_sphere_deltaThetaAngle [private] |
Definition at line 291 of file SolidSphere.h.
int SolidSphere::m_sphere_coverModel [private] |
double SolidSphere::m_sphere_outerR [private] |
Definition at line 295 of file SolidSphere.h.
double SolidSphere::m_sphere_insideR [private] |
Definition at line 296 of file SolidSphere.h.
bool SolidSphere::m_noPhiGap [private] |
Definition at line 298 of file SolidSphere.h.
bool SolidSphere::m_noThetaGap [private] |
Definition at line 299 of file SolidSphere.h.
std::string SolidBase::m_name [protected, inherited] |
ISolid* SolidBase::m_cover [mutable, protected, inherited] |
double SolidBase::m_xmin [protected, inherited] |
Definition at line 463 of file SolidBase.h.
double SolidBase::m_ymin [protected, inherited] |
Definition at line 464 of file SolidBase.h.
double SolidBase::m_zmin [protected, inherited] |
Definition at line 465 of file SolidBase.h.
double SolidBase::m_xmax [protected, inherited] |
Definition at line 467 of file SolidBase.h.
double SolidBase::m_ymax [protected, inherited] |
Definition at line 468 of file SolidBase.h.
double SolidBase::m_zmax [protected, inherited] |
Definition at line 469 of file SolidBase.h.
double SolidBase::m_rmax [protected, inherited] |
Definition at line 471 of file SolidBase.h.
double SolidBase::m_rhomax [protected, inherited] |
Definition at line 472 of file SolidBase.h.
DetDesc::Services* SolidBase::m_services [protected, inherited] |