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
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
CaloGeometryLoader::makeGeometry
void makeGeometry(const DDCompactView *cpv, T *geom, const Alignments *alignments, const Alignments *globals)
Alignments.h
cms::DDFilteredView
Definition: DDFilteredView.h:70
CaloGeometryLoader::m_scheme
T::NumberingScheme m_scheme
Definition: CaloGeometryLoader.h:53
CaloGeometryLoader::k_ScaleFromDDD
static constexpr double k_ScaleFromDDD
Definition: CaloGeometryLoader.h:29
EZArrayFL
Definition: EZArrayFL.h:20
CaloGeometryLoader
Definition: CaloGeometryLoader.h:22
DDCompactView.h
ParmVec
std::vector< float > ParmVec
Definition: FastTimeGeometry.cc:13
DetId
Definition: DetId.h:17
DDFilteredView.h
CaloGeometryLoader::load
PtrType load(const DDCompactView *cpv, const Alignments *alignments=nullptr, const Alignments *globals=nullptr)
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
DDFilteredView.h
DDCompactView.h
CaloSubdetectorGeometry::ParVec
CaloCellGeometry::ParVec ParVec
Definition: CaloSubdetectorGeometry.h:30
CaloSubdetectorGeometry.h
CaloGeometryLoader::PtrType
std::unique_ptr< CaloSubdetectorGeometry > PtrType
Definition: CaloGeometryLoader.h:25
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
CaloGeometryLoader::getDetIdForDD4HepNode
unsigned int getDetIdForDD4HepNode(const cms::DDFilteredView &fv)
CaloGeometryLoader::fillGeom
void fillGeom(T *geom, const ParmVec &pv, const HepGeom::Transform3D &tr, const DetId &id, const double &scale)
CaloSubdetectorGeometry::ParVecVec
CaloCellGeometry::ParVecVec ParVecVec
Definition: CaloSubdetectorGeometry.h:31
T
long double T
Definition: Basic3DVectorLD.h:48
CaloGeometryLoader::ParmVec
std::vector< double > ParmVec
Definition: CaloGeometryLoader.h:24
cms::DDCompactView
Definition: DDCompactView.h:31
CaloGeometryLoader::ParVecVec
CaloSubdetectorGeometry::ParVecVec ParVecVec
Definition: CaloGeometryLoader.h:27
CaloGeometryLoader< T >
CaloGeometryLoader::fillNamedParams
void fillNamedParams(const DDFilteredView &fv, T *geom)
DDFilteredView
Definition: DDFilteredView.h:20
CaloGeometryLoader::getDetIdForDDDNode
unsigned int getDetIdForDDDNode(const DDFilteredView &fv)
CaloGeometryLoader::k_ScaleFromDD4Hep
static constexpr double k_ScaleFromDD4Hep
Definition: CaloGeometryLoader.h:30
Alignments
Definition: Alignments.h:10