File indexing completed on 2024-04-06 12:14:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "CSCGeometryBuilderFromDDD.h"
0015 #include "CSCGeometryBuilder.h"
0016 #include "Geometry/CSCGeometryBuilder/interface/CSCGeometryParsFromDD.h"
0017 #include "CondFormats/GeometryObjects/interface/RecoIdealGeometry.h"
0018 #include "CondFormats/GeometryObjects/interface/CSCRecoDigiParameters.h"
0019 #include "DetectorDescription/DDCMS/interface/DDFilteredView.h"
0020 #include "DetectorDescription/DDCMS/interface/DDCompactView.h"
0021 #include "FWCore/Utilities/interface/Exception.h"
0022 #include <utility>
0023
0024 CSCGeometryBuilderFromDDD::CSCGeometryBuilderFromDDD() : myName("CSCGeometryBuilderFromDDD") {}
0025
0026 CSCGeometryBuilderFromDDD::~CSCGeometryBuilderFromDDD() {}
0027
0028 void CSCGeometryBuilderFromDDD::build(CSCGeometry& geom,
0029 const DDCompactView* cview,
0030 const MuonGeometryConstants& muonConstants) {
0031 RecoIdealGeometry rig;
0032 CSCRecoDigiParameters rdp;
0033
0034
0035
0036 CSCGeometryParsFromDD cscp;
0037 if (!cscp.build(cview, muonConstants, rig, rdp)) {
0038 throw cms::Exception("CSCGeometryBuilderFromDDD", "Failed to build the necessary objects from the DDD");
0039 }
0040 CSCGeometryBuilder realbuilder;
0041 realbuilder.build(geom, rig, rdp);
0042 }
0043
0044
0045
0046 void CSCGeometryBuilderFromDDD::build(CSCGeometry& geom,
0047 const cms::DDCompactView* cview,
0048 const MuonGeometryConstants& muonConstants) {
0049 RecoIdealGeometry rig;
0050 CSCRecoDigiParameters rdp;
0051
0052 CSCGeometryParsFromDD cscp;
0053 if (!cscp.build(cview, muonConstants, rig, rdp)) {
0054 throw cms::Exception("CSCGeometryBuilderFromDDD", "Failed to build the necessary objects from the DD4hep");
0055 }
0056
0057 CSCGeometryBuilder realbuilder;
0058 realbuilder.build(geom, rig, rdp);
0059 }