DD4hep  01.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dd4hep::rec::Surface Class Reference

Implementation of Surface class holding a local surface attached to a volume and the DetElement holding this surface. More...

#include <Surface.h>

+ Inheritance diagram for dd4hep::rec::Surface:

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 SurfaceTypetype () 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 Vector3Dorigin () 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 IMaterialinnerMaterial () const
 Access to the material in opposite direction of the normal. More...
 
virtual const IMaterialouterMaterial () 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...
 
- Public Member Functions inherited from dd4hep::rec::ISurface
virtual ~ISurface ()
 Destructor. More...
 

Protected Member Functions

 Surface ()=delete
 default c'tor etc. removed More...
 
 Surface (Surface const &)=delete
 
Surfaceoperator= (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 {}
 

Detailed Description

Implementation of Surface class holding a local surface attached to a volume and the DetElement holding this surface.

Author
F.Gaede, DESY
Date
Apr, 7 2014
Version
$Id$

Definition at line 498 of file Surface.h.

Constructor & Destructor Documentation

dd4hep::rec::Surface::Surface ( )
protecteddelete

default c'tor etc. removed

dd4hep::rec::Surface::Surface ( Surface const &  )
protecteddelete
virtual dd4hep::rec::Surface::~Surface ( )
inlinevirtual

Definition at line 521 of file Surface.h.

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().

Member Function Documentation

DetElement dd4hep::rec::Surface::detElement ( ) const
inline

The DetElement belonging to the surface volume.

Definition at line 543 of file Surface.h.

References _det.

double dd4hep::rec::Surface::distance ( const Vector3D point) const
virtual

Distance to surface.

Implements dd4hep::rec::ISurface.

Definition at line 701 of file Surface.cpp.

References _volSurf, _wtM, and dd4hep::rec::VolSurface::distance().

std::vector< std::pair< Vector3D, Vector3D > > dd4hep::rec::Surface::getLines ( unsigned  nMax = 100)
virtual
Vector2D dd4hep::rec::Surface::globalToLocal ( const Vector3D point) const
virtual

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.

References origin(), u(), and v().

long64 dd4hep::rec::Surface::id ( ) const
virtual

The id of this surface - corresponds to DetElement id.

Implements dd4hep::rec::ISurface.

Definition at line 611 of file Surface.cpp.

References _id.

void dd4hep::rec::Surface::initialize ( )
protected
const IMaterial & dd4hep::rec::Surface::innerMaterial ( ) const
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().

double dd4hep::rec::Surface::innerThickness ( ) const
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().

bool dd4hep::rec::Surface::insideBounds ( const Vector3D point,
double  epsilon = 1.e-4 
) const
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().

double dd4hep::rec::Surface::length_along_u ( ) const
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().

double dd4hep::rec::Surface::length_along_v ( ) const
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().

Vector3D dd4hep::rec::Surface::localToGlobal ( const Vector2D point) const
virtual

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.

References origin(), u(), and v().

Vector3D dd4hep::rec::Surface::normal ( const Vector3D point = Vector3D()) const
virtual

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.

Surface& dd4hep::rec::Surface::operator= ( Surface const &  )
protecteddelete
const Vector3D & dd4hep::rec::Surface::origin ( ) const
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().

const IMaterial & dd4hep::rec::Surface::outerMaterial ( ) const
virtual
double dd4hep::rec::Surface::outerThickness ( ) const
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().

const SurfaceType & dd4hep::rec::Surface::type ( ) const
virtual

properties of the surface encoded in Type.

See Also
SurfaceType

Implements dd4hep::rec::ISurface.

Definition at line 613 of file Surface.cpp.

References _type.

Referenced by getLines().

Vector3D dd4hep::rec::Surface::u ( const Vector3D point = Vector3D()) const
virtual

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().

Vector3D dd4hep::rec::Surface::v ( const Vector3D point = Vector3D()) const
virtual

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().

VolSurface dd4hep::rec::Surface::volSurface ( ) const
inline

The VolSurface attched to the volume.

Definition at line 540 of file Surface.h.

References _volSurf.

Volume dd4hep::rec::Surface::volume ( ) const
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().

Vector3D dd4hep::rec::Surface::volumeOrigin ( ) const
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().

Member Data Documentation

DetElement dd4hep::rec::Surface::_det
protected

Definition at line 502 of file Surface.h.

Referenced by detElement(), initialize(), innerMaterial(), and outerMaterial().

long64 dd4hep::rec::Surface::_id {0}
protected

Definition at line 506 of file Surface.h.

Referenced by id(), and initialize().

Vector3D dd4hep::rec::Surface::_n {}
protected

Definition at line 511 of file Surface.h.

Referenced by initialize(), innerMaterial(), normal(), and outerMaterial().

Vector3D dd4hep::rec::Surface::_o {}
protected

Definition at line 512 of file Surface.h.

Referenced by getLines(), initialize(), innerMaterial(), origin(), and outerMaterial().

SurfaceType dd4hep::rec::Surface::_type {}
protected

Definition at line 508 of file Surface.h.

Referenced by initialize(), and type().

Vector3D dd4hep::rec::Surface::_u {}
protected

Definition at line 509 of file Surface.h.

Referenced by initialize(), and u().

Vector3D dd4hep::rec::Surface::_v {}
protected

Definition at line 510 of file Surface.h.

Referenced by initialize(), and v().

VolSurface dd4hep::rec::Surface::_volSurf
mutableprotected
std::unique_ptr<TGeoMatrix> dd4hep::rec::Surface::_wtM
protected

The documentation for this class was generated from the following files: