From e36d89f38b297ad36075f60111437bcff82d0315 Mon Sep 17 00:00:00 2001 From: Andres Vargas Date: Fri, 9 Aug 2019 09:39:26 +0200 Subject: [PATCH 1/2] Fix CutTube constructor --- DetectorDescription/DDCMS/plugins/DDCutTubsFromPoints.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/DetectorDescription/DDCMS/plugins/DDCutTubsFromPoints.cc b/DetectorDescription/DDCMS/plugins/DDCutTubsFromPoints.cc index 78e28bdfb31fb..5ecc4f7efc716 100644 --- a/DetectorDescription/DDCMS/plugins/DDCutTubsFromPoints.cc +++ b/DetectorDescription/DDCMS/plugins/DDCutTubsFromPoints.cc @@ -166,13 +166,10 @@ static long algorithm(dd4hep::Detector& /* description */, n_y_t /= norm; n_z_t /= norm; - // the cuttubs wants a delta phi - double dphi = phi2 - phi1; - - auto seg = dd4hep::CutTube(r_min, r_max, dz, phi1, dphi, n_x_l, n_y_l, n_z_l, n_x_t, n_y_t, n_z_t); + auto seg = dd4hep::CutTube(r_min, r_max, dz, phi1, phi2, n_x_l, n_y_l, n_z_l, n_x_t, n_y_t, n_z_t); edm::LogVerbatim("TrackerGeom") << "DDCutTubsFromPoints: CutTube(" << r_min << "," << r_max << "," << dz << "," - << phi1 << "," << dphi << "," << n_x_l << "," << n_y_l << "," << n_z_l << "," + << phi1 << "," << phi2 << "," << n_x_l << "," << n_y_l << "," << n_z_l << "," << n_x_t << "," << n_y_t << "," << n_z_t << ")"; segments.emplace_back(seg); From 66d099a61759831eb382f7c199fb8480c4b80f6e Mon Sep 17 00:00:00 2001 From: Andres Vargas Date: Fri, 9 Aug 2019 11:18:44 +0200 Subject: [PATCH 2/2] dd4hep::CutTube constructor uses endPhi instead of deltaPhi https://dd4hep.web.cern.ch/dd4hep/reference/classdd4hep_1_1CutTube.html#af8f954fb96cf5ed980726c258f8d5bed --- DetectorDescription/DDCMS/plugins/DDDefinitions2Objects.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DetectorDescription/DDCMS/plugins/DDDefinitions2Objects.cc b/DetectorDescription/DDCMS/plugins/DDDefinitions2Objects.cc index de9b7c8a5bb32..32dc37695b448 100644 --- a/DetectorDescription/DDCMS/plugins/DDDefinitions2Objects.cc +++ b/DetectorDescription/DDCMS/plugins/DDDefinitions2Objects.cc @@ -1334,7 +1334,7 @@ void Converter::operator()(xml_h element) const { rmax, startPhi, deltaPhi); - ns.addSolid(nam, CutTube(rmin, rmax, dz, startPhi, deltaPhi, lx, ly, lz, tx, ty, tz)); + ns.addSolid(nam, CutTube(rmin, rmax, dz, startPhi, startPhi + deltaPhi, lx, ly, lz, tx, ty, tz)); } /// Converter for tags