DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
dd4hep::rec::VolSurfaceBase Class Reference

#include <Surface.h>

Inheritance diagram for dd4hep::rec::VolSurfaceBase:
dd4hep::rec::ISurface dd4hep::rec::VolConeImpl dd4hep::rec::VolCylinderImpl dd4hep::rec::VolPlaneImpl SimpleCylinderImpl

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
 
virtual Vector3D u (const Vector3D &point=Vector3D()) const
 
virtual Vector3D v (const Vector3D &point=Vector3D()) const
 
virtual Vector3D normal (const Vector3D &point=Vector3D()) const
 Access to the normal direction at the given point. More...
 
virtual const Vector3Dorigin () const
 
virtual Vector2D globalToLocal (const Vector3D &point) const
 
virtual Vector3D localToGlobal (const Vector2D &point) const
 
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
 
virtual double outerThickness () const
 
virtual double length_along_u () const
 
virtual double length_along_v () const
 
virtual double distance (const Vector3D &point) const
 
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

◆ ~VolSurfaceBase()

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

◆ VolSurfaceBase() [1/3]

dd4hep::rec::VolSurfaceBase::VolSurfaceBase ( )
default

default c'tor

◆ VolSurfaceBase() [2/3]

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.

◆ VolSurfaceBase() [3/3]

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

Copy the from object.

Definition at line 95 of file Surface.h.

Member Function Documentation

◆ distance()

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.

◆ getLines()

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

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

Definition at line 238 of file Surface.cpp.

◆ globalToLocal()

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.

◆ id()

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

The id of this surface.

Implements dd4hep::rec::ISurface.

Definition at line 42 of file Surface.cpp.

◆ innerMaterial()

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.

◆ innerThickness()

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

Thickness of inner material

Implements dd4hep::rec::ISurface.

Definition at line 75 of file Surface.cpp.

◆ insideBounds()

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.

Reimplemented in SimpleCylinderImpl.

Definition at line 208 of file Surface.cpp.

◆ length_along_u()

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.

◆ length_along_v()

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.

◆ localToGlobal()

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.

◆ normal()

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.

◆ origin()

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

Get Origin of local coordinate system on surface

Implements dd4hep::rec::ISurface.

Definition at line 48 of file Surface.cpp.

◆ outerMaterial()

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.

◆ outerThickness()

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

Thickness of outer material

Implements dd4hep::rec::ISurface.

Definition at line 76 of file Surface.cpp.

◆ setInnerMaterial()

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

set the inner Material

Definition at line 167 of file Surface.h.

◆ setNormal()

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

setter for daughter classes

Definition at line 39 of file Surface.cpp.

◆ setOrigin()

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

setter for daughter classes

Definition at line 40 of file Surface.cpp.

◆ setOuterMaterial()

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

set the outer Materal

Definition at line 170 of file Surface.h.

◆ setU()

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

setter for daughter classes

Definition at line 37 of file Surface.cpp.

◆ setV()

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

setter for daughter classes

Definition at line 38 of file Surface.cpp.

◆ type()

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.

◆ u()

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.

◆ v()

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.

◆ volume()

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

the volume to which this surface is attached.

Definition at line 103 of file Surface.h.

Friends And Related Function Documentation

◆ VolSurface

friend class VolSurface
friend

Definition at line 45 of file Surface.h.

Member Data Documentation

◆ _id

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

Definition at line 58 of file Surface.h.

◆ _innerMat

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

Definition at line 55 of file Surface.h.

◆ _n

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

Definition at line 51 of file Surface.h.

◆ _o

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

Definition at line 52 of file Surface.h.

◆ _outerMat

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

Definition at line 56 of file Surface.h.

◆ _refCount

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

Definition at line 59 of file Surface.h.

◆ _th_i

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

Definition at line 53 of file Surface.h.

◆ _th_o

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

Definition at line 54 of file Surface.h.

◆ _type

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

Definition at line 48 of file Surface.h.

◆ _u

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

Definition at line 49 of file Surface.h.

◆ _v

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

Definition at line 50 of file Surface.h.

◆ _vol

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

Definition at line 57 of file Surface.h.


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