CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DataFormats/GeometrySurface/interface/BoundDisk.h

Go to the documentation of this file.
00001 #ifndef Geom_BoundDisk_H
00002 #define Geom_BoundDisk_H
00003 
00004 #include "DataFormats/GeometrySurface/interface/BoundPlane.h"
00005 #include "DataFormats/GeometrySurface/interface/SimpleDiskBounds.h"
00006 
00021 class BoundDisk : public BoundPlane {
00022 public:
00023 
00024   typedef ReferenceCountingPointer<BoundDisk> BoundDiskPointer;
00025   typedef ConstReferenceCountingPointer<BoundDisk> ConstBoundDiskPointer;
00026 
00027 
00030   static BoundDiskPointer build(const PositionType& pos, 
00031                                 const RotationType& rot, 
00032                                 Bounds* bounds,
00033                                 MediumProperties* mp=0) {
00034     return BoundDiskPointer(new BoundDisk(pos, rot, bounds, mp));
00035   }
00036   
00037 
00040   static BoundDiskPointer build(const PositionType& pos, 
00041                                 const RotationType& rot, 
00042                                 Bounds& bounds,
00043                                 MediumProperties* mp=0) {
00044     return BoundDiskPointer(new BoundDisk(pos, rot, &bounds, mp));
00045   }
00046 
00047   virtual ~BoundDisk() {}
00048 
00049 
00050   // -- DEPRECATED CONSTRUCTORS
00051 
00055   BoundDisk(const PositionType& pos, 
00056             const RotationType& rot, 
00057             Bounds* bounds) :
00058     Surface(pos,rot), BoundPlane( pos, rot, bounds) {}
00059 
00063   BoundDisk(const PositionType& pos, 
00064             const RotationType& rot, 
00065             const Bounds& bounds) :
00066     Surface(pos,rot), BoundPlane( pos, rot, bounds) {}
00067 
00068 
00069   // -- Extension of the Surface interface for disk
00070 
00072   float innerRadius() const { return static_cast<const SimpleDiskBounds&>(bounds()).innerRadius();}
00073 
00075   float outerRadius() const  { return static_cast<const SimpleDiskBounds&>(bounds()).outerRadius();}
00076 
00077  protected:
00078   // Private constructor - use build() instead
00079   BoundDisk(const PositionType& pos, 
00080             const RotationType& rot, 
00081             Bounds* bounds,
00082             MediumProperties* mp=0) :
00083     Surface(pos, rot, mp), BoundPlane(pos, rot, bounds, mp) {}
00084 
00085 };
00086 
00087 
00088 #endif // Geom_BoundDisk_H