00001 #ifndef GEOMETRY_ECALGEOMETRYLOADER_H 00002 #define GEOMETRY_ECALGEOMETRYLOADER_H 1 00003 00004 #include "DetectorDescription/Core/interface/DDSolid.h" 00005 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" 00006 00007 #include "DetectorDescription/Core/interface/DDFilter.h" 00008 #include "DetectorDescription/Core/interface/DDFilteredView.h" 00009 00010 #include "CondFormats/Alignment/interface/Alignments.h" 00011 00012 #include "CLHEP/Geometry/Transform3D.h" 00013 #include <string> 00014 #include <vector> 00015 00021 class DDCompactView; 00022 00023 template < class T > 00024 class CaloGeometryLoader 00025 { 00026 public: 00027 00028 typedef std::vector< double > ParmVec ; 00029 00030 typedef boost::shared_ptr< CaloSubdetectorGeometry > PtrType ; 00031 00032 typedef CaloSubdetectorGeometry::ParVec ParVec ; 00033 typedef CaloSubdetectorGeometry::ParVecVec ParVecVec ; 00034 00035 static const double k_ScaleFromDDDtoGeant ; 00036 00037 CaloGeometryLoader< T >() ; 00038 00039 virtual ~CaloGeometryLoader< T >() {} 00040 00041 PtrType load( const DDCompactView* cpv, 00042 const Alignments* alignments = 0 , 00043 const Alignments* globals = 0 ) ; 00044 00045 private: 00046 00047 void makeGeometry( const DDCompactView* cpv , 00048 T* geom , 00049 const Alignments* alignments , 00050 const Alignments* globals ) ; 00051 00052 void fillNamedParams( DDFilteredView fv, 00053 T* geom ) ; 00054 00055 void fillGeom( T* geom , 00056 const ParmVec& pv , 00057 const HepGeom::Transform3D& tr , 00058 const DetId& id ) ; 00059 00060 unsigned int getDetIdForDDDNode( const DDFilteredView& fv ) ; 00061 00062 typename T::NumberingScheme m_scheme; 00063 DDSpecificsFilter m_filter; 00064 }; 00065 00066 #endif