CMS 3D CMS Logo

ME0GeometryBuilder.h
Go to the documentation of this file.
1 #ifndef Geometry_GEMGeometry_ME0GeometryBuilder_H
2 #define Geometry_GEMGeometry_ME0GeometryBuilder_H
3 /*
4 //\class ME0GeometryBuilder
5 
6  Description: ME0 Geometry builder for DD4hep
7  DD4hep part added to the original old file (DD version) made by M. Maggi (INFN Bari)
8 //
9 // Author: Sergio Lo Meo (sergio.lo.meo@cern.ch) following what Ianna Osborne made for DTs (DD4hep migration)
10 // Created: 29 Apr 2019
11 */
12 
15 #include "DD4hep/DD4hepUnits.h"
16 #include <string>
17 #include <map>
18 #include <vector>
19 
20 class DDCompactView;
21 class DDFilteredView;
22 namespace cms {
23  class DDFilteredView;
24  class DDCompactView;
25 } // namespace cms
26 class ME0Geometry;
27 class ME0Chamber;
28 class ME0Layer;
29 class ME0EtaPartition;
31 
33 public:
35 
37 
38  ME0Geometry* build(const DDCompactView* cview, const MuonGeometryConstants& muonConstants);
39  //dd4hep
40  ME0Geometry* build(const cms::DDCompactView* cview, const MuonGeometryConstants& muonConstants);
41 
42 private:
43  ME0Geometry* buildGeometry(DDFilteredView& fview, const MuonGeometryConstants& muonConstants);
44  std::map<ME0DetId, std::vector<ME0DetId>> chids;
45 
47 
48  ME0BoundPlane boundPlane(const DDFilteredView& fv, Bounds* bounds, bool isOddChamber) const;
49 
51 
52  ME0Layer* buildLayer(DDFilteredView& fv, ME0DetId detId) const;
53 
55  //dd4hep
57 
58  ME0BoundPlane boundPlane(const cms::DDFilteredView& fv, Bounds* bounds, bool isOddChamber) const;
59 
61 
63 
65 
66  static constexpr double k_ScaleFromDD4hep = (1.0 / dd4hep::cm);
67 };
68 
69 #endif
static constexpr double k_ScaleFromDD4hep
ME0Geometry * build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
std::map< ME0DetId, std::vector< ME0DetId > > chids
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
ReferenceCountingPointer< BoundPlane > ME0BoundPlane
ME0Layer * buildLayer(DDFilteredView &fv, ME0DetId detId) const
ME0BoundPlane boundPlane(const DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const
Namespace of DDCMS conversion namespace.
ME0Geometry * buildGeometry(DDFilteredView &fview, const MuonGeometryConstants &muonConstants)
ME0Chamber * buildChamber(DDFilteredView &fv, ME0DetId detId) const
Definition: Bounds.h:18
ME0EtaPartition * buildEtaPartition(DDFilteredView &fv, ME0DetId detId) const