File indexing completed on 2023-10-25 09:49:08
0001 #ifndef ModifiedSurfaceGenerator_h_
0002 #define ModifiedSurfaceGenerator_h_
0003
0004 #include "DataFormats/GeometrySurface/interface/Surface.h"
0005
0006
0007
0008
0009 template <class T>
0010 class ConstReferenceCountingPointer;
0011 template <class T>
0012 class ReferenceCountingPointer;
0013 class MediumProperties;
0014
0015 template <class T>
0016 class ModifiedSurfaceGenerator {
0017 private:
0018 typedef ReferenceCountingPointer<T> SurfacePointer;
0019
0020 public:
0021
0022 ModifiedSurfaceGenerator(const T* surface) : theSurface(surface) {}
0023
0024 ModifiedSurfaceGenerator(const SurfacePointer surface) : theSurface(surface.get()) {}
0025
0026
0027 SurfacePointer atNewPosition(const Surface::PositionType& position, const Surface::RotationType& rotation) const {
0028 const MediumProperties& mp = theSurface->mediumProperties();
0029 SurfacePointer newSurface(new T(position, rotation, mp, theSurface->bounds().clone()));
0030 return newSurface;
0031 }
0032
0033 private:
0034
0035 ConstReferenceCountingPointer<T> theSurface;
0036 };
0037
0038 #endif