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