Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:27

0001 #ifndef VolumeSide_H
0002 #define VolumeSide_H
0003 
0004 #include "DataFormats/GeometrySurface/interface/Surface.h"
0005 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0006 
0007 /** Class for delimiding surface of a volume.
0008  *  The additional information with respect to Surface that is needed
0009  *  to define the volume is <BR>
0010  *  a) which side of the Surface the volume is (enumerator Surface::Side) <BR>
0011  *  b) which face of the volume this surface represents (enumerator GlobalFace). 
0012  *     Only 6 possible values for volume face are defined.
0013  */
0014 
0015 class VolumeSide {
0016 public:
0017   typedef SurfaceOrientation::GlobalFace GlobalFace;
0018   typedef SurfaceOrientation::Side Side;
0019 
0020   typedef ReferenceCountingPointer<Surface> SurfacePointer;
0021 
0022   VolumeSide(Surface* surf, GlobalFace gSide, Side sSide)
0023       : theSurface(surf), theGlobalFace(gSide), theSurfaceSide(sSide) {}
0024 
0025   VolumeSide(SurfacePointer surf, GlobalFace gSide, Side sSide)
0026       : theSurface(surf), theGlobalFace(gSide), theSurfaceSide(sSide) {}
0027 
0028   Surface& mutableSurface() const { return *theSurface; }
0029 
0030   const Surface& surface() const { return *theSurface; }
0031 
0032   GlobalFace globalFace() const { return theGlobalFace; }
0033 
0034   Side surfaceSide() const { return theSurfaceSide; }
0035 
0036 private:
0037   SurfacePointer theSurface;
0038   GlobalFace theGlobalFace;
0039   Side theSurfaceSide;
0040 };
0041 
0042 #endif