CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Geometry/CaloEventSetup/interface/CaloGeometryLoader.h

Go to the documentation of this file.
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 
00022 class DDCompactView;
00023 
00024 template < class T >
00025 class CaloGeometryLoader
00026 {
00027    public:
00028 
00029       typedef std::vector< double > ParmVec ;
00030 
00031       typedef boost::shared_ptr< CaloSubdetectorGeometry > PtrType ;
00032 
00033       typedef CaloSubdetectorGeometry::ParVec    ParVec ;
00034       typedef CaloSubdetectorGeometry::ParVecVec ParVecVec ;
00035 
00036       static const double k_ScaleFromDDDtoGeant ;
00037 
00038       CaloGeometryLoader< T >() ;
00039 
00040       virtual ~CaloGeometryLoader< T >() {}
00041  
00042       PtrType load( const DDCompactView* cpv,
00043                     const Alignments*    alignments = 0 ,
00044                     const Alignments*    globals    = 0  ) ;  
00045 
00046    private:
00047 
00048       void makeGeometry( const DDCompactView*  cpv        , 
00049                          T*                    geom       ,
00050                          const Alignments*     alignments ,
00051                          const Alignments*     globals       ) ;
00052       
00053       void fillNamedParams( DDFilteredView fv,
00054                             T*             geom ) ;
00055       
00056       void fillGeom( T*                    geom ,
00057                      const ParmVec&        pv ,
00058                      const HepGeom::Transform3D& tr ,
00059                      const DetId&          id    ) ;
00060 
00061       unsigned int getDetIdForDDDNode( const DDFilteredView& fv ) ;
00062 
00063       typename T::NumberingScheme m_scheme;
00064       DDSpecificsFilter  m_filter;
00065 };
00066 
00067 #endif