00001 #ifndef Geom_Cone_H
00002 #define Geom_Cone_H
00003
00017 #include "DataFormats/GeometrySurface/interface/Surface.h"
00018 #include "boost/intrusive_ptr.hpp"
00019
00020 class Cone : public virtual Surface {
00021 public:
00022 typedef ReferenceCountingPointer<Cone> ConePointer;
00023 typedef ReferenceCountingPointer<Cone> ConstConePointer;
00024
00025
00029 static ConePointer build(const PositionType& pos,
00030 const RotationType& rot,
00031 const PositionType& vert,
00032 Geom::Theta<Scalar> angle) {
00033 return ConePointer(new Cone(pos, rot, vert, angle));
00034 }
00035
00036
00037
00038
00042 Cone( const PositionType& pos, const RotationType& rot,
00043 const PositionType& vert, Geom::Theta<Scalar> angle) :
00044 Surface( pos, rot), theVertex(vert), theAngle(angle) {}
00045
00046
00047
00048
00050 GlobalPoint vertex() const {return theVertex;}
00051
00053 Geom::Theta<float> openingAngle() const {return theAngle;}
00054
00055
00056
00057
00058 virtual Side side( const LocalPoint& p, Scalar tolerance) const {return side( toGlobal(p), tolerance);}
00059 virtual Side side( const GlobalPoint& p, Scalar tolerance) const;
00060
00061
00062 virtual ReferenceCountingPointer<TangentPlane> tangentPlane (const GlobalPoint&) const;
00063
00064 virtual ReferenceCountingPointer<TangentPlane> tangentPlane (const LocalPoint&) const;
00065
00066 protected:
00067
00068 Cone(const PositionType& pos, const RotationType& rot,
00069 const PositionType& vert, Geom::Theta<Scalar> angle,
00070 MediumProperties* mp) :
00071 Surface(pos, rot, mp), theVertex(vert), theAngle(angle) {}
00072
00073 private:
00074
00075 GlobalPoint theVertex;
00076 Geom::Theta<Scalar> theAngle;
00077
00078 };
00079
00080 #endif