CMS 3D CMS Logo

CaloGeometryLoader.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_ECALGEOMETRYLOADER_H
2 #define GEOMETRY_ECALGEOMETRYLOADER_H
3 
10 
11 #include "DD4hep/DD4hepUnits.h"
12 #include "CLHEP/Geometry/Transform3D.h"
13 #include <string>
14 #include <vector>
15 
21 template <class T>
23 public:
24  using ParmVec = std::vector<double>;
25  using PtrType = std::unique_ptr<CaloSubdetectorGeometry>;
28 
29  static constexpr double k_ScaleFromDDD = 0.1;
30  static constexpr double k_ScaleFromDD4hep = (1.0 / dd4hep::cm);
31 
33 
34  virtual ~CaloGeometryLoader<T>() = default;
35 
36  PtrType load(const DDCompactView* cpv, const Alignments* alignments = nullptr, const Alignments* globals = nullptr);
37  PtrType load(const cms::DDCompactView* cpv,
38  const Alignments* alignments = nullptr,
39  const Alignments* globals = nullptr);
40 
41 private:
42  void makeGeometry(const DDCompactView* cpv, T* geom, const Alignments* alignments, const Alignments* globals);
43  void makeGeometry(const cms::DDCompactView* cpv, T* geom, const Alignments* alignments, const Alignments* globals);
44 
45  void fillNamedParams(const DDFilteredView& fv, T* geom);
46  void fillNamedParams(const cms::DDFilteredView& fv, T* geom);
47 
48  void fillGeom(T* geom, const ParmVec& pv, const HepGeom::Transform3D& tr, const DetId& id, const double& scale);
49 
50  unsigned int getDetIdForDDDNode(const DDFilteredView& fv);
51  unsigned int getDetIdForDD4hepNode(const cms::DDFilteredView& fv);
52 
53  typename T::NumberingScheme m_scheme;
54 };
55 
56 #endif
std::unique_ptr< CaloSubdetectorGeometry > PtrType
PtrType load(const DDCompactView *cpv, const Alignments *alignments=nullptr, const Alignments *globals=nullptr)
static constexpr double k_ScaleFromDD4hep
std::vector< float > ParmVec
unsigned int getDetIdForDDDNode(const DDFilteredView &fv)
CaloSubdetectorGeometry::ParVecVec ParVecVec
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
void fillGeom(T *geom, const ParmVec &pv, const HepGeom::Transform3D &tr, const DetId &id, const double &scale)
std::vector< double > ParmVec
def pv(vc)
Definition: MetAnalyzer.py:7
T::NumberingScheme m_scheme
CaloCellGeometry::ParVec ParVec
static constexpr double k_ScaleFromDDD
Definition: DetId.h:17
CaloCellGeometry::ParVecVec ParVecVec
void fillNamedParams(const DDFilteredView &fv, T *geom)
void makeGeometry(const DDCompactView *cpv, T *geom, const Alignments *alignments, const Alignments *globals)
long double T
unsigned int getDetIdForDD4hepNode(const cms::DDFilteredView &fv)