1 #ifndef DDSurfaces_ISurface_H
2 #define DDSurfaces_ISurface_H
12 namespace DDSurfaces {
16 typedef long long int long64 ;
98 virtual double radius()
const=0 ;
112 virtual double radius0()
const=0 ;
113 virtual double radius1()
const=0 ;
114 virtual double z0()
const=0 ;
115 virtual double z1()
const=0 ;
166 SurfaceType(
unsigned prop0 ,
unsigned prop1 ,
unsigned prop2,
unsigned prop3 ) :
_bits(0) {
174 SurfaceType(
unsigned prop0 ,
unsigned prop1 ,
unsigned prop2,
unsigned prop3,
unsigned prop4 ) :
_bits(0) {
228 unsigned long otherBits = otherType.
_bits.to_ulong() ;
229 unsigned long theseBits =
_bits.to_ulong() ;
231 return ( otherBits & theseBits ) == otherBits ;
283 <<
"] cone[" << t.
isCone()
289 <<
"] zDisk[" << t.
isZDisk() <<
"]" ;
299 os <<
" id: " << std::hex << s.
id() << std::dec <<
" type : " << s.
type() << std::endl
300 <<
" u : " << s.
u() <<
" v : " << s.
v() <<
" normal : " << s.
normal() <<
" origin : " << s.
origin() << std::endl ;
306 os <<
" cylinder radius : " << cyl->
radius() << std::endl ;
308 const ICone* cone =
dynamic_cast< const ICone*
> ( &
s ) ;
310 os <<
" cone radius0: " << cone->
radius0() <<
" cone radius1: " << cone->
radius1() << std::endl ;
virtual Vector3D center() const =0
virtual bool insideBounds(const Vector3D &point, double epsilon=1.e-4) const =0
Checks if the given point lies within the surface.
bool isOrthogonalToZ() const
true if surface is orthogonal to Z
bool isZDisk() const
true if this is a plane orthogonal to Z
virtual double length_along_v() const =0
bool isVisible() const
true if surface is not invisble - for drawing only
virtual const Vector3D & origin() const =0
SurfaceType(unsigned prop0, unsigned prop1, unsigned prop2, unsigned prop3, unsigned prop4)
virtual double z0() const =0
bool isMeasurement1D() const
true if the measurement is only 1D, i.e. the second direction v is not used
bool isParallelToZ() const
true if surface is parallel to Z
bool isZCylinder() const
true if this is a cylinder parallel to Z
SurfaceType(unsigned prop0, unsigned prop1)
SurfaceType()
default c'tor
bool isSensitive() const
true if surface is sensitive
bool isCylinder() const
true if this a cylindrical surface
virtual const IMaterial & outerMaterial() const =0
Access to the material in direction of the normal.
virtual double z1() const =0
virtual Vector2D globalToLocal(const Vector3D &point) const =0
virtual double radius0() const =0
virtual double outerThickness() const =0
bool isZCone() const
true if this is a cone parallel to Z
virtual double radius() const =0
bool isSimilar(const SurfaceType &otherType) const
true if all properties of otherType are also true for this type.
virtual long64 id() const =0
The id of this surface - corresponds to DetElement id ( or'ed with the placement ids ) ...
virtual Vector3D v(const Vector3D &point=Vector3D()) const =0
virtual double radius1() const =0
bool checkParallelToZ(const ISurface &surf, double epsilon=1.e-6) const
bool isHelper() const
true if surface is helper surface for navigation
virtual double length_along_u() const =0
void setProperty(unsigned prop, bool val=true)
set the given peorperty
virtual const IMaterial & innerMaterial() const =0
Access to the material in opposite direction of the normal.
SurfaceType(unsigned prop0, unsigned prop1, unsigned prop2)
virtual Vector3D u(const Vector3D &point=Vector3D()) const =0
std::ostream & operator<<(std::ostream &os, const IMaterial &m)
dump IMaterial operator
virtual double distance(const Vector3D &point) const =0
SurfaceType(unsigned prop0)
SurfaceTypes
enum for defining the bits used to decode the properties
virtual ~ICylinder()
Destructor.
virtual const SurfaceType & type() const =0
properties of the surface encoded in Type.
bool isPlane() const
true if this a planar surface
virtual Vector3D localToGlobal(const Vector2D &point) const =0
virtual ~ICone()
Destructor.
bool checkOrthogonalToZ(const ISurface &surf, double epsilon=1.e-6) const
virtual ~ISurface()
Destructor.
SurfaceType(unsigned prop0, unsigned prop1, unsigned prop2, unsigned prop3)
virtual Vector3D center() const =0
virtual double innerThickness() const =0
bool isCone() const
true if this a conical surface
bool isZPlane() const
true if this is a plane parallel to Z
virtual Vector3D normal(const Vector3D &point=Vector3D()) const =0
Access to the normal direction at the given point.