13 #ifndef DDREC_ISURFACE_H
14 #define DDREC_ISURFACE_H
24 namespace dd4hep {
namespace rec {
28 typedef long long int long64 ;
110 virtual double radius()
const=0 ;
124 virtual double radius0()
const=0 ;
125 virtual double radius1()
const=0 ;
126 virtual double z0()
const=0 ;
127 virtual double z1()
const=0 ;
179 SurfaceType(
unsigned prop0 ,
unsigned prop1 ,
unsigned prop2,
unsigned prop3 ) :
_bits(0) {
187 SurfaceType(
unsigned prop0 ,
unsigned prop1 ,
unsigned prop2,
unsigned prop3,
unsigned prop4 ) :
_bits(0) {
247 return ( otherBits & theseBits ) == otherBits ;
299 <<
"] cone[" << t.
isCone()
318 <<
" u : " << s.
u() <<
" v : " << s.
v() <<
" normal : " << s.
normal() <<
" origin : " << s.
origin() <<
std::endl ;
326 const ICone* cone =
dynamic_cast< const ICone*
> ( &s ) ;
338 #endif // DDREC_ISURFACE_H
SurfaceType(unsigned prop0, unsigned prop1, unsigned prop2, unsigned prop3, unsigned prop4)
void setProperty(unsigned prop, bool val=true)
set the given peorperty
bool isCylinder() const
true if this a cylindrical surface
virtual double outerThickness() const =0
Thickness of outer material.
SurfaceType()
default c'tor
SurfaceType(unsigned prop0)
Interface for tracking surfaces.
bool isUnbounded() const
true if the surface is unbounded ( ISurface::insideBounds() does not check volume boundaries) ...
bool isSensitive() const
true if surface is sensitive
bool isZCone() const
true if this is a cone parallel to Z
virtual double z0() const =0
std::ostream & operator<<(std::ostream &io, const FixedPadSizeTPCData &d)
virtual Vector3D u(const Vector3D &point=Vector3D()) const =0
First direction of measurement U.
SurfaceType(unsigned prop0, unsigned prop1)
Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coo...
bool isVisible() const
true if surface is not invisble - for drawing only
bool isParallelToZ() const
true if surface is parallel to Z
virtual double innerThickness() const =0
Thickness of inner material.
bool isOrthogonalToZ() const
true if surface is orthogonal to Z
Minimal interface to provide acces to radius of cylinder surfaces.
bool checkOrthogonalToZ(const ISurface &surf, double epsilon=1.e-6) const
True if surface is orthogonal to Z with accuracy epsilon - result is cached in bit SurfaceType::Ortho...
virtual double radius1() const =0
virtual double radius() const =0
bool isCone() const
true if this a conical surface
virtual double z1() const =0
bool isZPlane() const
true if this is a plane parallel to Z
virtual ~ICylinder()
Destructor.
SurfaceTypes
enum for defining the bits used to decode the properties
virtual const IMaterial & outerMaterial() const =0
Access to the material in direction of the normal.
virtual long64 id() const =0
The id of this surface - corresponds to DetElement id ( or'ed with the placement ids ) ...
virtual Vector3D normal(const Vector3D &point=Vector3D()) const =0
Access to the normal direction at the given point.
Helper class for describing surface properties.
SurfaceType(unsigned prop0, unsigned prop1, unsigned prop2, unsigned prop3)
virtual double length_along_v() const =0
The length of the surface along direction v at the origin.
virtual bool insideBounds(const Vector3D &point, double epsilon=1.e-4) const =0
Checks if the given point lies within the surface.
bool isZCylinder() const
true if this is a cylinder parallel to Z
virtual ~ISurface()
Destructor.
SurfaceType(unsigned prop0, unsigned prop1, unsigned prop2)
Simple 2D vector helper class; moved out of ISurface definition.
virtual const Vector3D & origin() const =0
Get Origin of local coordinate system on surface.
bool isSimilar(const SurfaceType &otherType) const
true if all properties of otherType are also true for this type.
bool isHelper() const
true if surface is helper surface for navigation
virtual const SurfaceType & type() const =0
properties of the surface encoded in Type.
virtual const IMaterial & innerMaterial() const =0
Access to the material in opposite direction of the normal.
virtual double distance(const Vector3D &point) const =0
Distance to surface.
bool isPlane() const
true if this a planar surface
virtual Vector3D localToGlobal(const Vector2D &point) const =0
Convert the local position (u,v) on the surface to the global position.
virtual ~ICone()
Destructor.
bool checkParallelToZ(const ISurface &surf, double epsilon=1.e-6) const
True if surface is parallel to Z with accuracy epsilon - result is cached in bit SurfaceType::Paralle...
bool isMeasurement1D() const
true if the measurement is only 1D, i.e. the second direction v is not used
virtual double radius0() const =0
virtual double length_along_u() const =0
The length of the surface along direction u at the origin.
Minimal interface to provide acces to radii of conical surfaces.
virtual Vector3D center() const =0
virtual Vector2D globalToLocal(const Vector3D &point) const =0
Convert the global position to the local position (u,v) on the surface.
virtual Vector3D center() const =0
virtual Vector3D v(const Vector3D &point=Vector3D()) const =0
Second direction of measurement V.
Interface for material description for tracking.
bool isZDisk() const
true if this is a plane orthogonal to Z