diff --git a/Geometry/MTDNumberingBuilder/interface/GeometricTimingDet.h b/Geometry/MTDNumberingBuilder/interface/GeometricTimingDet.h index fa2b34b12ae6f..981093dda1354 100644 --- a/Geometry/MTDNumberingBuilder/interface/GeometricTimingDet.h +++ b/Geometry/MTDNumberingBuilder/interface/GeometricTimingDet.h @@ -2,7 +2,7 @@ #define Geometry_MTDNumberingBuilder_GeometricTimingDet_H #include "CondFormats/GeometryObjects/interface/PGeometricTimingDet.h" -#include "DetectorDescription/Core/interface/DDSolidShapes.h" +#include "DetectorDescription/DDCMS/interface/DDSolidShapes.h" #include "DataFormats/GeometrySurface/interface/Surface.h" #include "DataFormats/GeometrySurface/interface/Bounds.h" #include "DataFormats/DetId/interface/DetId.h" @@ -99,7 +99,8 @@ class GeometricTimingDet { double phi() const { return phi_; } double rho() const { return rho_; } - DDSolidShape const& shape() const { return shape_; } + LegacySolidShape shape() const { return cms::dd::value(cms::LegacySolidShapeMap, shape_); } + cms::DDSolidShape shape_dd4hep() const { return shape_; } GeometricTimingEnumType type() const { return type_; } std::string const& name() const { return ddname_; } // internal representaion @@ -169,7 +170,7 @@ class GeometricTimingDet { double phi_; double rho_; RotationMatrix rot_; - DDSolidShape shape_; + cms::DDSolidShape shape_; nav_type ddd_; std::string ddname_; GeometricTimingEnumType type_; diff --git a/Geometry/MTDNumberingBuilder/src/GeometricTimingDet.cc b/Geometry/MTDNumberingBuilder/src/GeometricTimingDet.cc index 1f10b358d647a..176c240fba052 100644 --- a/Geometry/MTDNumberingBuilder/src/GeometricTimingDet.cc +++ b/Geometry/MTDNumberingBuilder/src/GeometricTimingDet.cc @@ -74,7 +74,7 @@ GeometricTimingDet::GeometricTimingDet(DDFilteredView* fv, GeometricTimingEnumTy phi_(trans_.Phi()), rho_(trans_.Rho()), rot_(fv->rotation()), - shape_(fv->shape()), + shape_(cms::dd::name_from_value(cms::LegacySolidShapeMap, fv->shape())), ddname_(fv->name()), type_(type), params_(fv->parameters()), @@ -95,7 +95,7 @@ using namespace geant_units::operators; GeometricTimingDet::GeometricTimingDet(cms::DDFilteredView* fv, GeometricTimingEnumType type) : trans_(fv->translation()), rot_(fv->rotation()), - shape_(DDSolidShape(static_cast(fv->shape()))), + shape_(fv->shape()), ddname_(fv->name()), type_(type), params_(fv->parameters()), @@ -137,7 +137,7 @@ GeometricTimingDet::GeometricTimingDet(const PGeometricTimingDet::Item& onePGD, onePGD.a31_, onePGD.a32_, onePGD.a33_), - shape_(static_cast(onePGD.shape_)), + shape_(cms::dd::name_from_value(cms::LegacySolidShapeMap, static_cast(onePGD.shape_))), ddd_(), ddname_(onePGD.name_), //, "fromdb"); type_(type), @@ -257,6 +257,5 @@ GeometricTimingDet::Rotation GeometricTimingDet::rotationBounds() const { std::unique_ptr GeometricTimingDet::bounds() const { const std::vector& par = params_; TrackerShapeToBounds shapeToBounds; - return std::unique_ptr( - shapeToBounds.buildBounds(cms::dd::name_from_value(cms::LegacySolidShapeMap, shape_), par)); + return std::unique_ptr(shapeToBounds.buildBounds(shape_, par)); }