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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
#ifndef DTGeometryBuilder_DTGeometryParsFromDD_h
#define DTGeometryBuilder_DTGeometryParsFromDD_h
/** \class DTGeometryParsFromDD
*
* Build the RPCGeometry from the DDD and DD4hep description
*
* DD4hep part added to the original old file (DD version) made by Stefano Lacaprara (INFN LNL)
* \author: Sergio Lo Meo (sergio.lo.meo@cern.ch)
* Created: Tue, 26 Jan 2021
*
*/
#include "DataFormats/GeometrySurface/interface/BoundPlane.h"
#include <vector>
class DTGeometry;
class DDCompactView;
class DDFilteredView;
namespace cms { // DD4hep
class DDFilteredView;
class DDCompactView;
} // namespace cms
class DTChamber;
class DTSuperLayer;
class DTLayer;
class Bounds;
class MuonGeometryConstants;
class RecoIdealGeometry;
class DTGeometryParsFromDD {
public:
/// Constructor
DTGeometryParsFromDD();
/// Destructor
virtual ~DTGeometryParsFromDD();
// DD
void build(const DDCompactView* cview, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig);
// DD4hep
void build(const cms::DDCompactView* cview, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rgeo);
enum DTDetTag { DTChamberTag, DTSuperLayerTag, DTLayerTag };
private:
// DD
/// create the chamber
void insertChamber(DDFilteredView& fv,
const std::string& type,
const MuonGeometryConstants& muonConstants,
RecoIdealGeometry& rig) const;
/// create the SL
void insertSuperLayer(DDFilteredView& fv,
const std::string& type,
const MuonGeometryConstants& muonConstants,
RecoIdealGeometry& rig) const;
/// create the layer
void insertLayer(DDFilteredView& fv,
const std::string& type,
const MuonGeometryConstants& muonConstants,
RecoIdealGeometry& rig) const;
/// get parameter also for boolean solid.
std::vector<double> extractParameters(DDFilteredView& fv) const;
typedef std::pair<std::vector<double>, std::vector<double> > PosRotPair;
PosRotPair plane(const DDFilteredView& fv) const;
void buildGeometry(DDFilteredView& fv, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig) const;
// DD4hep
void buildGeometry(cms::DDFilteredView& fv, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig) const;
/// create the chamber
void insertChamber(cms::DDFilteredView& fv, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig) const;
/// create the SL
void insertSuperLayer(cms::DDFilteredView& fv,
const MuonGeometryConstants& muonConstants,
RecoIdealGeometry& rig) const;
/// create the layer
void insertLayer(cms::DDFilteredView& fv, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig) const;
PosRotPair plane(const cms::DDFilteredView& fv) const;
};
#endif
|