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

#include <Surface.h>

Inheritance diagram for dd4hep::rec::Surface:
dd4hep::rec::ISurface dd4hep::rec::CylinderSurface dd4hep::rec::ConeSurface

Public Member Functions

virtual ~Surface ()
 
 Surface (DetElement det, VolSurface volSurf)
 
virtual long64 id () const
 The id of this surface - corresponds to DetElement id. More...
 
virtual const SurfaceTypetype () const
 
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
 
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 double innerThickness () const
 
virtual double outerThickness () 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 distance (const Vector3D &point) const
 
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
 
virtual double length_along_u () const
 
virtual double length_along_v () const
 
virtual std::vector< std::pair< Vector3D, Vector3D > > getLines (unsigned nMax=100)
 
- 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

◆ Surface() [1/3]

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

default c'tor etc. removed

◆ Surface() [2/3]

dd4hep::rec::Surface::Surface ( Surface const &  )
protecteddelete

◆ ~Surface()

virtual dd4hep::rec::Surface::~Surface ( )
inlinevirtual

Definition at line 521 of file Surface.h.

◆ Surface() [3/3]

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.

Member Function Documentation

◆ detElement()

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

The DetElement belonging to the surface volume.

Definition at line 543 of file Surface.h.

◆ distance()

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.

◆ getLines()

std::vector< std::pair< Vector3D, Vector3D > > dd4hep::rec::Surface::getLines ( unsigned  nMax = 100)
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.

◆ globalToLocal()

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.

◆ id()

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.

◆ initialize()

void dd4hep::rec::Surface::initialize ( )
protected

Definition at line 719 of file Surface.cpp.

◆ innerMaterial()

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.

◆ innerThickness()

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

Thickness of inner material

Implements dd4hep::rec::ISurface.

Definition at line 619 of file Surface.cpp.

◆ insideBounds()

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.

◆ length_along_u()

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.

◆ length_along_v()

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.

◆ localToGlobal()

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.

◆ normal()

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.

◆ operator=()

Surface& dd4hep::rec::Surface::operator= ( Surface const &  )
protecteddelete

◆ origin()

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.

◆ outerMaterial()

const IMaterial & dd4hep::rec::Surface::outerMaterial ( ) const
virtual

Access to the material in direction of the normal.

Implements dd4hep::rec::ISurface.

Definition at line 645 of file Surface.cpp.

◆ outerThickness()

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

Thickness of outer material

Implements dd4hep::rec::ISurface.

Definition at line 620 of file Surface.cpp.

◆ type()

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.

◆ u()

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.

◆ v()

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.

◆ volSurface()

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

The VolSurface attched to the volume.

Definition at line 540 of file Surface.h.

◆ volume()

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

The volume that has the surface attached.

Definition at line 537 of file Surface.h.

◆ volumeOrigin()

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.

Member Data Documentation

◆ _det

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

Definition at line 502 of file Surface.h.

◆ _id

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

Definition at line 506 of file Surface.h.

◆ _n

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

Definition at line 511 of file Surface.h.

◆ _o

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

Definition at line 512 of file Surface.h.

◆ _type

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

Definition at line 508 of file Surface.h.

◆ _u

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

Definition at line 509 of file Surface.h.

◆ _v

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

Definition at line 510 of file Surface.h.

◆ _volSurf

VolSurface dd4hep::rec::Surface::_volSurf
mutableprotected

Definition at line 503 of file Surface.h.

◆ _wtM

std::unique_ptr<TGeoMatrix> dd4hep::rec::Surface::_wtM
protected

Definition at line 504 of file Surface.h.


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