CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GEMGeometryBuilder.h
Go to the documentation of this file.
1 #ifndef Geometry_GEMGeometry_GEMGeometryBuilder_H
2 #define Geometry_GEMGeometry_GEMGeometryBuilder_H
3 
5 /*
6 //\class GEMGeometryBuilder
7 
8  Description: GEM Geometry builder from DD & DD4hep
9  DD4hep part added to the original old file (DD version) made by M. Maggi (INFN Bari)
10 //
11 // Author: Sergio Lo Meo (sergio.lo.meo@cern.ch) following what Ianna Osburne made for DTs (DD4hep migration)
12 // Created: 27 Jan 2020
13 */
14 #include <string>
15 #include <map>
16 #include <vector>
18 #include "DD4hep/DD4hepUnits.h"
19 
20 class DDCompactView;
21 class DDFilteredView;
22 namespace cms {
23  class DDFilteredView;
24  class DDCompactView;
25  class MuonNumbering;
26 } // namespace cms
27 class GEMGeometry;
28 class GEMSuperChamber;
29 class GEMChamber;
30 class GEMEtaPartition;
32 
34 public:
36 
38 
39  // for DDD
40  void build(GEMGeometry& theGeometry, const DDCompactView* cview, const MuonGeometryConstants& muonConstants);
41  // for DD4hep
42  void build(GEMGeometry& theGeometry, const cms::DDCompactView* cview, const MuonGeometryConstants& muonConstants);
43 
44 private:
45  std::map<GEMDetId, std::vector<GEMDetId>> chids;
46 
47  // for DDD
49 
50  RCPBoundPlane boundPlane(const DDFilteredView& fv, Bounds* bounds, bool isOddChamber) const;
51 
53 
55 
57 
58  // for DD4hep
59 
60  RCPBoundPlane boundPlane(const cms::DDFilteredView& fv, Bounds* bounds, bool isOddChamber) const;
61 
63 
65 
67 
68  // Common
69  void buildRegions(GEMGeometry&, const std::vector<GEMSuperChamber*>&, bool demonstratorGeometry);
70 
71  static constexpr double k_ScaleFromDD4hep = (1.0 / dd4hep::cm);
72 };
73 
74 #endif
GEMEtaPartition * buildEtaPartition(DDFilteredView &fv, GEMDetId detId) const
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
ReferenceCountingPointer< BoundPlane > RCPBoundPlane
std::map< GEMDetId, std::vector< GEMDetId > > chids
RCPBoundPlane boundPlane(const DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const
void build(GEMGeometry &theGeometry, const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
GEMChamber * buildChamber(DDFilteredView &fv, GEMDetId detId) const
void buildRegions(GEMGeometry &, const std::vector< GEMSuperChamber * > &, bool demonstratorGeometry)
GEMSuperChamber * buildSuperChamber(DDFilteredView &fv, GEMDetId detId) const
Definition: Bounds.h:18
static constexpr double k_ScaleFromDD4hep