DD4hep
01.18
|
Implementation of Surface class holding a local surface attached to a volume and the DetElement holding this surface. More...
#include <Surface.h>
Public Member Functions | |
virtual | ~Surface () |
Surface (DetElement det, VolSurface volSurf) | |
Standard c'tor initializes the surface from the parameters of the VolSurface and the transform (placement) of the corresponding volume, if found in DetElement. More... | |
virtual long64 | id () const |
The id of this surface - corresponds to DetElement id. More... | |
virtual const SurfaceType & | type () const |
properties of the surface encoded in Type. More... | |
Volume | volume () const |
The volume that has the surface attached. More... | |
VolSurface | volSurface () const |
The VolSurface attched to the volume. More... | |
DetElement | detElement () const |
The DetElement belonging to the surface volume. More... | |
virtual Vector3D | u (const Vector3D &point=Vector3D()) const |
First direction of measurement U. More... | |
virtual Vector3D | v (const Vector3D &point=Vector3D()) const |
Second direction of measurement V. More... | |
virtual Vector3D | normal (const Vector3D &point=Vector3D()) const |
Access to the normal direction at the given point. More... | |
virtual const Vector3D & | origin () const |
Get Origin of local coordinate system on surface. More... | |
virtual Vector2D | globalToLocal (const Vector3D &point) const |
Convert the global position to the local position (u,v) on the surface. More... | |
virtual Vector3D | localToGlobal (const Vector2D &point) const |
Convert the local position (u,v) on the surface to the global position. More... | |
virtual double | innerThickness () const |
Thickness of inner material. More... | |
virtual double | outerThickness () const |
Thickness of outer material. More... | |
virtual const IMaterial & | innerMaterial () const |
Access to the material in opposite direction of the normal. More... | |
virtual const IMaterial & | outerMaterial () const |
Access to the material in direction of the normal. More... | |
virtual double | distance (const Vector3D &point) const |
Distance to surface. More... | |
virtual bool | insideBounds (const Vector3D &point, double epsilon=1.e-4) const |
Checks if the given point lies within the surface. More... | |
virtual Vector3D | volumeOrigin () const |
Get Origin of local coordinate system of the associated volume. More... | |
virtual double | length_along_u () const |
The length of the surface along direction u at the origin. More... | |
virtual double | length_along_v () const |
The length of the surface along direction v at the origin. More... | |
virtual std::vector< std::pair < Vector3D, Vector3D > > | getLines (unsigned nMax=100) |
Get lines constraining the surface for drawing ( might not be exact boundaries) - at most nMax lines are returned. More... | |
![]() | |
virtual | ~ISurface () |
Destructor. More... | |
Protected Member Functions | |
Surface ()=delete | |
default c'tor etc. removed More... | |
Surface (Surface const &)=delete | |
Surface & | operator= (Surface const &)=delete |
void | initialize () |
Protected Attributes | |
DetElement | _det |
VolSurface | _volSurf |
std::unique_ptr< TGeoMatrix > | _wtM |
long64 | _id {0} |
SurfaceType | _type {} |
Vector3D | _u {} |
Vector3D | _v {} |
Vector3D | _n {} |
Vector3D | _o {} |
Implementation of Surface class holding a local surface attached to a volume and the DetElement holding this surface.
|
protecteddelete |
default c'tor etc. removed
|
protecteddelete |
dd4hep::rec::Surface::Surface | ( | DetElement | det, |
VolSurface | volSurf | ||
) |
Standard c'tor initializes the surface from the parameters of the VolSurface and the transform (placement) of the corresponding volume, if found in DetElement.
Definition at line 605 of file Surface.cpp.
References initialize().
|
inline |
The DetElement belonging to the surface volume.
Definition at line 543 of file Surface.h.
References _det.
|
virtual |
Distance to surface.
Implements dd4hep::rec::ISurface.
Definition at line 701 of file Surface.cpp.
References _volSurf, _wtM, and dd4hep::rec::VolSurface::distance().
|
virtual |
Get lines constraining the surface for drawing ( might not be exact boundaries) - at most nMax lines are returned.
Definition at line 833 of file Surface.cpp.
References _o, _volSurf, _wtM, dd4hep::rec::Vector3D::array(), dd4hep::rec::Vector3D::const_array(), std::vector< T >::emplace_back(), std::fabs(), dd4hep::rec::Vector3D::fill(), dd4hep::rec::VolSurface::getLines(), dd4hep::rec::SurfaceType::isZDisk(), dd4hep::rec::VolSurface::normal(), dd4hep::rec::VolSurface::origin(), std::vector< T >::reserve(), dd4hep::rec::Vector3D::rho(), std::vector< T >::size(), type(), dd4hep::rec::VolSurface::u(), volume(), dd4hep::rec::Vector3D::x(), dd4hep::rec::Vector3D::y(), and dd4hep::rec::Vector3D::z().
Convert the global position to the local position (u,v) on the surface.
Implements dd4hep::rec::ISurface.
Reimplemented in dd4hep::rec::CylinderSurface.
Definition at line 665 of file Surface.cpp.
|
virtual |
The id of this surface - corresponds to DetElement id.
Implements dd4hep::rec::ISurface.
Definition at line 611 of file Surface.cpp.
References _id.
|
protected |
Definition at line 719 of file Surface.cpp.
References _det, _id, _n, _o, _type, _u, _v, _volSurf, _wtM, std::list< T >::begin(), dd4hep::rec::SurfaceType::checkOrthogonalToZ(), dd4hep::rec::SurfaceType::checkParallelToZ(), std::list< T >::end(), std::endl(), dd4hep::rec::Vector3D::fill(), dd4hep::rec::findVolume(), dd4hep::rec::VolSurface::id(), dd4hep::rec::SurfaceType::isCone(), dd4hep::rec::VolSurface::normal(), dd4hep::rec::VolSurface::origin(), std::stringstream::str(), dd4hep::rec::VolSurface::u(), dd4hep::rec::VolSurface::v(), and dd4hep::rec::VolSurface::volume().
Referenced by Surface().
|
virtual |
Access to the material in opposite direction of the normal.
Thickness of outer material.
Implements dd4hep::rec::ISurface.
Definition at line 626 of file Surface.cpp.
References _det, _n, _o, _volSurf, dd4hep::rec::VolSurface::innerMaterial(), innerThickness(), dd4hep::rec::VolSurface::setInnerMaterial(), std::vector< T >::size(), and dd4hep::rec::IMaterial::Z().
|
virtual |
Thickness of inner material.
Implements dd4hep::rec::ISurface.
Definition at line 619 of file Surface.cpp.
References _volSurf, and dd4hep::rec::VolSurface::innerThickness().
Referenced by innerMaterial().
|
virtual |
Checks if the given point lies within the surface.
Implements dd4hep::rec::ISurface.
Definition at line 710 of file Surface.cpp.
References _volSurf, _wtM, and dd4hep::rec::VolSurface::insideBounds().
|
virtual |
The length of the surface along direction u at the origin.
For 'regular' boundaries, like rectangles, this can be used to speed up the computation of inSideBounds.
Implements dd4hep::rec::ISurface.
Definition at line 621 of file Surface.cpp.
References _volSurf, and dd4hep::rec::VolSurface::length_along_u().
|
virtual |
The length of the surface along direction v at the origin.
For 'regular' boundaries, like rectangles, this can be used to speed up the computation of inSideBounds.
Implements dd4hep::rec::ISurface.
Definition at line 622 of file Surface.cpp.
References _volSurf, and dd4hep::rec::VolSurface::length_along_v().
Referenced by dd4hep::rec::ConeSurface::radius0(), dd4hep::rec::ConeSurface::radius1(), dd4hep::rec::ConeSurface::z0(), and dd4hep::rec::ConeSurface::z1().
Convert the local position (u,v) on the surface to the global position.
Implements dd4hep::rec::ISurface.
Reimplemented in dd4hep::rec::CylinderSurface.
Definition at line 682 of file Surface.cpp.
Access to the normal direction at the given point.
Implements dd4hep::rec::ISurface.
Reimplemented in dd4hep::rec::CylinderSurface.
Definition at line 617 of file Surface.cpp.
References _n.
|
virtual |
Get Origin of local coordinate system on surface.
Implements dd4hep::rec::ISurface.
Definition at line 618 of file Surface.cpp.
References _o.
Referenced by globalToLocal(), localToGlobal(), dd4hep::rec::ConeSurface::radius0(), dd4hep::rec::ConeSurface::radius1(), dd4hep::rec::ConeSurface::z0(), and dd4hep::rec::ConeSurface::z1().
|
virtual |
Access to the material in direction of the normal.
Implements dd4hep::rec::ISurface.
Definition at line 645 of file Surface.cpp.
References _det, _n, _o, _volSurf, dd4hep::rec::VolSurface::outerMaterial(), outerThickness(), dd4hep::rec::VolSurface::setOuterMaterial(), std::vector< T >::size(), and dd4hep::rec::IMaterial::Z().
|
virtual |
Thickness of outer material.
Implements dd4hep::rec::ISurface.
Definition at line 620 of file Surface.cpp.
References _volSurf, and dd4hep::rec::VolSurface::outerThickness().
Referenced by outerMaterial().
|
virtual |
properties of the surface encoded in Type.
Implements dd4hep::rec::ISurface.
Definition at line 613 of file Surface.cpp.
References _type.
Referenced by getLines().
First direction of measurement U.
Implements dd4hep::rec::ISurface.
Reimplemented in dd4hep::rec::CylinderSurface.
Definition at line 615 of file Surface.cpp.
References _u.
Referenced by globalToLocal(), and localToGlobal().
Second direction of measurement V.
Implements dd4hep::rec::ISurface.
Reimplemented in dd4hep::rec::CylinderSurface.
Definition at line 616 of file Surface.cpp.
References _v.
Referenced by globalToLocal(), and localToGlobal().
|
inline |
The VolSurface attched to the volume.
Definition at line 540 of file Surface.h.
References _volSurf.
|
inline |
The volume that has the surface attached.
Definition at line 537 of file Surface.h.
References _volSurf, and dd4hep::rec::VolSurface::volume().
Referenced by getLines().
|
virtual |
Get Origin of local coordinate system of the associated volume.
Definition at line 689 of file Surface.cpp.
References _wtM.
Referenced by dd4hep::rec::CylinderSurface::center(), and dd4hep::rec::ConeSurface::center().
|
protected |
Definition at line 502 of file Surface.h.
Referenced by detElement(), initialize(), innerMaterial(), and outerMaterial().
|
protected |
Definition at line 506 of file Surface.h.
Referenced by id(), and initialize().
|
protected |
Definition at line 511 of file Surface.h.
Referenced by initialize(), innerMaterial(), normal(), and outerMaterial().
|
protected |
Definition at line 512 of file Surface.h.
Referenced by getLines(), initialize(), innerMaterial(), origin(), and outerMaterial().
|
protected |
Definition at line 508 of file Surface.h.
Referenced by initialize(), and type().
|
protected |
Definition at line 509 of file Surface.h.
Referenced by initialize(), and u().
|
protected |
Definition at line 510 of file Surface.h.
Referenced by initialize(), and v().
|
mutableprotected |
Definition at line 503 of file Surface.h.
Referenced by distance(), getLines(), dd4hep::rec::CylinderSurface::globalToLocal(), initialize(), innerMaterial(), innerThickness(), insideBounds(), length_along_u(), length_along_v(), dd4hep::rec::CylinderSurface::localToGlobal(), dd4hep::rec::CylinderSurface::normal(), outerMaterial(), outerThickness(), dd4hep::rec::CylinderSurface::radius(), dd4hep::rec::ConeSurface::radius0(), dd4hep::rec::ConeSurface::radius1(), dd4hep::rec::CylinderSurface::u(), dd4hep::rec::CylinderSurface::v(), volSurface(), volume(), dd4hep::rec::ConeSurface::z0(), and dd4hep::rec::ConeSurface::z1().
|
protected |
Definition at line 504 of file Surface.h.
Referenced by distance(), getLines(), dd4hep::rec::CylinderSurface::globalToLocal(), initialize(), insideBounds(), dd4hep::rec::CylinderSurface::localToGlobal(), dd4hep::rec::CylinderSurface::normal(), dd4hep::rec::CylinderSurface::u(), dd4hep::rec::CylinderSurface::v(), and volumeOrigin().