CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/DataFormats/GeometrySurface/interface/Cone.h

Go to the documentation of this file.
00001 #ifndef Geom_Cone_H
00002 #define Geom_Cone_H
00003 
00017 #include "DataFormats/GeometrySurface/interface/Surface.h"
00018 
00019 class Cone  GCC11_FINAL  : public Surface {
00020 public:
00021 
00022   template<typename... Args>
00023   Cone(const PositionType& vert,
00024        Geom::Theta<Scalar> angle, 
00025        Args&& ... args) :
00026     Surface(std::forward<Args>(args)...), 
00027     theVertex(vert), theAngle(angle) {}
00028 
00029   typedef ReferenceCountingPointer<Cone> ConePointer;
00030   typedef ReferenceCountingPointer<Cone> ConstConePointer;
00031 
00032 
00036   static ConePointer build(const PositionType& pos,
00037                            const RotationType& rot,
00038                            const PositionType& vert,
00039                            Geom::Theta<Scalar> angle) {
00040     return ConePointer(new Cone(vert, angle, pos, rot));
00041   }
00042 
00043 
00044   // -- DEPRECATED CONSTRUCTOR
00045 
00049   Cone( const PositionType& pos, const RotationType& rot, 
00050         const PositionType& vert, Geom::Theta<Scalar> angle) :
00051     Surface( pos, rot), theVertex(vert), theAngle(angle) {}
00052 
00053 
00054   // -- Extension of Surface interface for cone
00055 
00057   GlobalPoint vertex() const {return theVertex;}
00058 
00060   Geom::Theta<float> openingAngle() const {return theAngle;}
00061 
00062 
00063   // -- Implementation of Surface interface    
00064 
00065   virtual Side side( const LocalPoint& p, Scalar tolerance) const {return side( toGlobal(p), tolerance);}
00066   virtual Side side( const GlobalPoint& p, Scalar tolerance) const;
00067 
00068   // Tangent plane to surface from global point
00069   virtual ReferenceCountingPointer<TangentPlane> tangentPlane (const GlobalPoint&) const;
00070   // Tangent plane to surface from local point
00071   virtual ReferenceCountingPointer<TangentPlane> tangentPlane (const LocalPoint&) const;
00072 
00073 
00074 private:
00075 
00076   GlobalPoint             theVertex;
00077   Geom::Theta<Scalar>     theAngle;
00078 
00079 };
00080 
00081 #endif