/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Geometry/CommonTopologies/interface/ModifiedSurfaceGenerator.h
38 строк
1 KB
Shahzad Malik Muzaffar
merge CommonDetUnit in to CommonTopologies
29 ноя 2019, 10:08
29 ноя 2019, 10:08
adfed4f
Код
Авторство
О чём код?
#ifndef ModifiedSurfaceGenerator_h_ #define ModifiedSurfaceGenerator_h_ #include "DataFormats/GeometrySurface/interface/Surface.h" /** Creates a new instance of a BoundSurface at * a new location (using the copy constructor). */ template <class T> class ConstReferenceCountingPointer; template <class T> class ReferenceCountingPointer; class MediumProperties; template <class T> class ModifiedSurfaceGenerator { private: typedef ReferenceCountingPointer<T> SurfacePointer; public: /// constructor from pointer ModifiedSurfaceGenerator(const T* surface) : theSurface(surface) {} /// constructor from ReferenceCountingPointer ModifiedSurfaceGenerator(const SurfacePointer surface) : theSurface(surface.get()) {} /** creation of a new surface at a different position, but with * identical Bounds and MediumProperties */ SurfacePointer atNewPosition(const Surface::PositionType& position, const Surface::RotationType& rotation) const { const MediumProperties& mp = theSurface->mediumProperties(); SurfacePointer newSurface(new T(position, rotation, mp, theSurface->bounds().clone())); return newSurface; } private: /// original surface ConstReferenceCountingPointer<T> theSurface; }; #endif