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

Implementation of ISurface for a local surface attached to a volume. More...

#include <Surface.h>

+ Inheritance diagram for dd4hep::rec::VolSurfaceBase:

Public Member Functions

virtual ~VolSurfaceBase ()=default
 
 VolSurfaceBase ()=default
 default c'tor More...
 
 VolSurfaceBase (SurfaceType typ, double thickness_inner, double thickness_outer, Vector3D u_val, Vector3D v_val, Vector3D n, Vector3D o, Volume vol, int identifier)
 
 VolSurfaceBase (const VolSurfaceBase &c)
 Copy the from object. More...
 
Volume volume () const
 the volume to which this surface is attached. More...
 
virtual long64 id () const
 The id of this surface. More...
 
virtual const SurfaceTypetype () const
 properties of the surface encoded in Type. 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 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 innerThickness () const
 Thickness of inner material. More...
 
virtual double outerThickness () const
 Thickness of outer material. 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 double distance (const Vector3D &point) const
 Distance to surface. More...
 
virtual bool insideBounds (const Vector3D &point, double epsilon=1e-4) const
 Checks if the given point lies within the surface. More...
 
virtual std::vector< std::pair
< Vector3D, Vector3D > > 
getLines (unsigned nMax=100)
 
void setInnerMaterial (const IMaterial &mat)
 set the inner Material More...
 
void setOuterMaterial (const IMaterial &mat)
 set the outer Materal More...
 
- Public Member Functions inherited from dd4hep::rec::ISurface
virtual ~ISurface ()
 Destructor. More...
 

Protected Member Functions

virtual void setU (const Vector3D &u)
 setter for daughter classes More...
 
virtual void setV (const Vector3D &v)
 setter for daughter classes More...
 
virtual void setNormal (const Vector3D &n)
 setter for daughter classes More...
 
virtual void setOrigin (const Vector3D &o)
 setter for daughter classes More...
 

Protected Attributes

SurfaceType _type {}
 
Vector3D _u {}
 
Vector3D _v {}
 
Vector3D _n {}
 
Vector3D _o {}
 
double _th_i {0}
 
double _th_o {0}
 
MaterialData _innerMat {}
 
MaterialData _outerMat {}
 
Volume _vol {}
 
long64 _id {0}
 
unsigned _refCount {0}
 

Friends

class VolSurface
 

Detailed Description

Implementation of ISurface for a local surface attached to a volume.

Provides default implementations for all methods but distance(). Subclasses for specific surfaces overwrite methods as needed.

Author
F.Gaede, DESY
Date
Sep 11, 2015
Version
$Id$

Definition at line 43 of file Surface.h.

Constructor & Destructor Documentation

virtual dd4hep::rec::VolSurfaceBase::~VolSurfaceBase ( )
virtualdefault
dd4hep::rec::VolSurfaceBase::VolSurfaceBase ( )
default

default c'tor

dd4hep::rec::VolSurfaceBase::VolSurfaceBase ( SurfaceType  typ,
double  thickness_inner,
double  thickness_outer,
Vector3D  u_val,
Vector3D  v_val,
Vector3D  n,
Vector3D  o,
Volume  vol,
int  identifier 
)
inline

Definition at line 78 of file Surface.h.

dd4hep::rec::VolSurfaceBase::VolSurfaceBase ( const VolSurfaceBase c)
inline

Copy the from object.

Definition at line 95 of file Surface.h.

Member Function Documentation

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

Distance to surface.

Implements dd4hep::rec::ISurface.

Reimplemented in dd4hep::rec::VolConeImpl, dd4hep::rec::VolCylinderImpl, and dd4hep::rec::VolPlaneImpl.

Definition at line 205 of file Surface.cpp.

std::vector< std::pair< Vector3D, Vector3D > > dd4hep::rec::VolSurfaceBase::getLines ( unsigned  nMax = 100)
virtual

Reimplemented in dd4hep::rec::VolConeImpl.

Definition at line 238 of file Surface.cpp.

Vector2D dd4hep::rec::VolSurfaceBase::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::VolConeImpl, and dd4hep::rec::VolCylinderImpl.

Definition at line 50 of file Surface.cpp.

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

The id of this surface.

Implements dd4hep::rec::ISurface.

Definition at line 42 of file Surface.cpp.

const IMaterial & dd4hep::rec::VolSurfaceBase::innerMaterial ( ) const
virtual

Access to the material in opposite direction of the normal.

Implements dd4hep::rec::ISurface.

Definition at line 73 of file Surface.cpp.

double dd4hep::rec::VolSurfaceBase::innerThickness ( ) const
virtual

Thickness of inner material.

Implements dd4hep::rec::ISurface.

Definition at line 75 of file Surface.cpp.

bool dd4hep::rec::VolSurfaceBase::insideBounds ( const Vector3D point,
double  epsilon = 1e-4 
) const
virtual

Checks if the given point lies within the surface.

Implements dd4hep::rec::ISurface.

Definition at line 208 of file Surface.cpp.

References dd4hep::rec::Vector3D::const_array(), and std::endl().

double dd4hep::rec::VolSurfaceBase::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 79 of file Surface.cpp.

References dd4hep::rec::Vector3D::array(), and dd4hep::rec::Vector3D::const_array().

double dd4hep::rec::VolSurfaceBase::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 142 of file Surface.cpp.

References dd4hep::rec::Vector3D::array(), and dd4hep::rec::Vector3D::const_array().

Referenced by dd4hep::rec::VolConeImpl::getLines().

Vector3D dd4hep::rec::VolSurfaceBase::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::VolConeImpl, and dd4hep::rec::VolCylinderImpl.

Definition at line 66 of file Surface.cpp.

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

Access to the normal direction at the given point.

Implements dd4hep::rec::ISurface.

Reimplemented in dd4hep::rec::VolConeImpl, and dd4hep::rec::VolCylinderImpl.

Definition at line 47 of file Surface.cpp.

const Vector3D & dd4hep::rec::VolSurfaceBase::origin ( ) const
virtual
const IMaterial & dd4hep::rec::VolSurfaceBase::outerMaterial ( ) const
virtual

Access to the material in direction of the normal.

Implements dd4hep::rec::ISurface.

Definition at line 74 of file Surface.cpp.

double dd4hep::rec::VolSurfaceBase::outerThickness ( ) const
virtual

Thickness of outer material.

Implements dd4hep::rec::ISurface.

Definition at line 76 of file Surface.cpp.

void dd4hep::rec::VolSurfaceBase::setInnerMaterial ( const IMaterial mat)
inline

set the inner Material

Definition at line 167 of file Surface.h.

References _innerMat.

Referenced by dd4hep::rec::VolSurface::setInnerMaterial().

void dd4hep::rec::VolSurfaceBase::setNormal ( const Vector3D n)
protectedvirtual

setter for daughter classes

Definition at line 39 of file Surface.cpp.

Referenced by dd4hep::rec::VolConeImpl::VolConeImpl(), and dd4hep::rec::VolCylinderImpl::VolCylinderImpl().

void dd4hep::rec::VolSurfaceBase::setOrigin ( const Vector3D o)
protectedvirtual

setter for daughter classes

Definition at line 40 of file Surface.cpp.

Referenced by dd4hep::rec::VolConeImpl::VolConeImpl().

void dd4hep::rec::VolSurfaceBase::setOuterMaterial ( const IMaterial mat)
inline

set the outer Materal

Definition at line 170 of file Surface.h.

References _outerMat.

Referenced by dd4hep::rec::VolSurface::setOuterMaterial().

void dd4hep::rec::VolSurfaceBase::setU ( const Vector3D u)
protectedvirtual

setter for daughter classes

Definition at line 37 of file Surface.cpp.

Referenced by dd4hep::rec::VolConeImpl::VolConeImpl(), and dd4hep::rec::VolCylinderImpl::VolCylinderImpl().

void dd4hep::rec::VolSurfaceBase::setV ( const Vector3D v)
protectedvirtual

setter for daughter classes

Definition at line 38 of file Surface.cpp.

Referenced by dd4hep::rec::VolCylinderImpl::VolCylinderImpl().

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

properties of the surface encoded in Type.

See Also
SurfaceType

Implements dd4hep::rec::ISurface.

Definition at line 44 of file Surface.cpp.

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

First direction of measurement U.

Implements dd4hep::rec::ISurface.

Reimplemented in dd4hep::rec::VolConeImpl, and dd4hep::rec::VolCylinderImpl.

Definition at line 45 of file Surface.cpp.

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

Second direction of measurement V.

Implements dd4hep::rec::ISurface.

Reimplemented in dd4hep::rec::VolConeImpl.

Definition at line 46 of file Surface.cpp.

Referenced by dd4hep::rec::VolCylinderImpl::u().

Volume dd4hep::rec::VolSurfaceBase::volume ( ) const
inline

the volume to which this surface is attached.

Definition at line 103 of file Surface.h.

References _vol.

Referenced by dd4hep::rec::VolSurface::volume().

Friends And Related Function Documentation

friend class VolSurface
friend

Definition at line 45 of file Surface.h.

Member Data Documentation

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

Definition at line 58 of file Surface.h.

MaterialData dd4hep::rec::VolSurfaceBase::_innerMat {}
protected

Definition at line 55 of file Surface.h.

Referenced by setInnerMaterial().

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

Definition at line 51 of file Surface.h.

Referenced by dd4hep::rec::VolConeImpl::normal().

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

Definition at line 52 of file Surface.h.

MaterialData dd4hep::rec::VolSurfaceBase::_outerMat {}
protected

Definition at line 56 of file Surface.h.

Referenced by setOuterMaterial().

unsigned dd4hep::rec::VolSurfaceBase::_refCount {0}
protected
double dd4hep::rec::VolSurfaceBase::_th_i {0}
protected

Definition at line 53 of file Surface.h.

double dd4hep::rec::VolSurfaceBase::_th_o {0}
protected

Definition at line 54 of file Surface.h.

SurfaceType dd4hep::rec::VolSurfaceBase::_type {}
protected
Vector3D dd4hep::rec::VolSurfaceBase::_u {}
protected

Definition at line 49 of file Surface.h.

Vector3D dd4hep::rec::VolSurfaceBase::_v {}
protected
Volume dd4hep::rec::VolSurfaceBase::_vol {}
protected

Definition at line 57 of file Surface.h.

Referenced by volume().


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