Skip to content

Commit 5e9bb88

Browse files
committed
Restore namespace to names
1 parent 989ff6c commit 5e9bb88

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Geometry/TrackerCommonData/plugins/dd4hep/DDCutTubsFromPoints.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
2525
float r_max = args.value<float>("rMax");
2626
float z_pos = args.value<float>("zPos");
2727

28-
const std::string solidOutput = args.value<std::string>("SolidName");
28+
std::string solidOutput = args.value<std::string>("SolidName");
2929
const std::string material = args.value<std::string>("Material");
3030

3131
auto phis = ns.vecFloat(args.str("Phi"));
@@ -49,6 +49,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
4949
// non-zero phi distance. Sections with zero phi distance can be used to
5050
// create sharp jumps.
5151

52+
solidOutput = ns.prepend(solidOutput);
5253
edm::LogVerbatim("TrackerGeom") << "DDCutTubsFromPoints debug: Parent " << args.parentName() << "\tSolid "
5354
<< solidOutput << " NameSpace " << ns.name() << "\tnumber of sections "
5455
<< sections.size();
@@ -106,8 +107,8 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
106107
float P3_z_l = (P1_z_l + P2_z_l) / 2;
107108
float P3_z_t = (P1_z_t + P2_z_t) / 2;
108109

110+
std::string segname(solidOutput + "_seg_" + std::to_string(segment));
109111
edm::LogVerbatim("TrackerGeom").log([&](auto& log) {
110-
std::string segname(solidOutput + "_seg_" + std::to_string(segment));
111112
log << "DDCutTubsFromPoints: P1 l: " << segname << P1_x_l << " , " << P1_y_l << " , " << P1_z_l;
112113
log << "DDCutTubsFromPoints: P1 t: " << segname << P1_x_t << " , " << P1_y_t << " , " << P1_z_t;
113114
log << "DDCutTubsFromPoints: P2 l: " << segname << P2_x_l << " , " << P2_y_l << " , " << P2_z_l;
@@ -159,7 +160,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
159160
n_y_t /= norm;
160161
n_z_t /= norm;
161162

162-
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);
163+
auto seg = dd4hep::CutTube(segname, 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);
163164

164165
edm::LogVerbatim("TrackerGeom") << "DDCutTubsFromPoints: CutTube(" << r_min << "," << r_max << "," << dz << ","
165166
<< phi1 << "," << phi2 << "," << n_x_l << "," << n_y_l << "," << n_z_l << ","
@@ -181,7 +182,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
181182

182183
for (unsigned i = 1; i < segments.size() - 1; i++) {
183184
solid = dd4hep::UnionSolid(
184-
solidOutput + "_uni" + std::to_string(i + 1), solid, segments[i], dd4hep::Position(0., 0., offsets[i] - shift));
185+
solidOutput + "_uni_" + std::to_string(i + 1), solid, segments[i], dd4hep::Position(0., 0., offsets[i] - shift));
185186
}
186187

187188
solid = dd4hep::UnionSolid(solidOutput,

Geometry/TrackerCommonData/plugins/dd4hep/DDTECModuleAlgo.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ static long algorithm(Detector& /* description */, cms::DDParsingContext& ctxt,
404404
}
405405
//Pitch Adapter
406406
name = idName + "PA";
407+
name = ns.prepend(name);
407408
if (!isStereo) {
408409
dx = 0.5 * pitchWidth;
409410
dy = 0.5 * pitchThick;

0 commit comments

Comments
 (0)