@@ -449,11 +449,6 @@ namespace {
449449 return ns.rotation (ns.prepend (nam));
450450 }
451451
452- const Rotation3D& myrot (cms::DDNamespace& ns, const string& nam, const Rotation3D& r) {
453- ns.addRotation (nam, r);
454- return ns.rotation (ns.prepend (nam));
455- }
456-
457452 Solid mytrap (const std::string& nam, const EcalTrapezoidParameters& t) {
458453#ifdef EDM_ML_DEBUG
459454 edm::LogVerbatim (" EBGeom" ) << nam << " Trap " << convertRadToDeg (t.theta ()) << " :" << convertRadToDeg (t.phi ())
@@ -1174,12 +1169,10 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
11741169 const double yy (radius * sin (phi));
11751170 const double xx (radius * cos (phi));
11761171 ++ptmCopy;
1177- xilyLog.placeVolume (ilyPTMLog,
1178- ptmCopy,
1179- Transform3D (myrot (ns,
1180- std::string (ilyPTMLog.name ()) + " _rot" + std::to_string (ptmCopy),
1181- Rotation3D (RotationZ (phi))),
1182- Position (xx, yy, ily.vecIlyPTMZ [ilyPTM] - ilyLengthHalf)));
1172+ xilyLog.placeVolume (
1173+ ilyPTMLog,
1174+ ptmCopy,
1175+ Transform3D (RotationZ (phi), Position (xx, yy, ily.vecIlyPTMZ [ilyPTM] - ilyLengthHalf)));
11831176#ifdef EDM_ML_DEBUG
11841177 edm::LogVerbatim (" EBGeomX" )
11851178 << ilyPTMLog.name () << " :" << ptmCopy << " positioned in " << xilyLog.name () << " at ("
@@ -1196,13 +1189,10 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
11961189 const double yy (radius * sin (phi));
11971190 const double xx (radius * cos (phi));
11981191 ++fanOutCopy;
1199- xilyLog.placeVolume (
1200- ilyFanOutLog,
1201- fanOutCopy,
1202- Transform3D (myrot (ns,
1203- std::string (ilyFanOutLog.name ()) + " _rot" + std::to_string (fanOutCopy),
1204- RotationZ (phi) * RotationY (180 ._deg )),
1205- Position (xx, yy, ily.vecIlyFanOutZ [ilyFO] - ilyLengthHalf)));
1192+ xilyLog.placeVolume (ilyFanOutLog,
1193+ fanOutCopy,
1194+ Transform3D (RotationZ (phi) * RotationY (180 ._deg ),
1195+ Position (xx, yy, ily.vecIlyFanOutZ [ilyFO] - ilyLengthHalf)));
12061196#ifdef EDM_ML_DEBUG
12071197 edm::LogVerbatim (" EBGeomX" )
12081198 << ilyFanOutLog.name () << " :" << fanOutCopy << " positioned in " << xilyLog.name () << " at ("
@@ -1217,12 +1207,10 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
12171207 const double yy (radius * sin (phi));
12181208 const double xx (radius * cos (phi));
12191209 ++femCopy;
1220- xilyLog.placeVolume (ilyFEMLog,
1221- femCopy,
1222- Transform3D (myrot (ns,
1223- std::string (ilyFEMLog.name ()) + " _rot" + std::to_string (femCopy),
1224- Rotation3D (RotationZ (phi))),
1225- Position (xx, yy, ily.vecIlyFEMZ [ilyFEM] - ilyLengthHalf)));
1210+ xilyLog.placeVolume (
1211+ ilyFEMLog,
1212+ femCopy,
1213+ Transform3D (RotationZ (phi), Position (xx, yy, ily.vecIlyFEMZ [ilyFEM] - ilyLengthHalf)));
12261214#ifdef EDM_ML_DEBUG
12271215 edm::LogVerbatim (" EBGeomX" )
12281216 << ilyFEMLog.name () << " :" << femCopy << " positioned in " << xilyLog.name () << " at ("
@@ -1254,11 +1242,8 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
12541242 xilyLog.placeVolume (
12551243 ilyPipeLog[type],
12561244 copyNum[type],
1257- Transform3D (
1258- myrot (ns,
1259- std::string (ilyPipeLog[type].name ()) + " _rot" + std::to_string (ly),
1260- Rotation3D (ROOT::Math::AxisAngle (ROOT::Math::AxisAngle::XYZVector (xx, yy, 0 ), 90 ._deg ))),
1261- Position (xx, yy, zz)));
1245+ Transform3D (Rotation3D (ROOT::Math::AxisAngle (ROOT::Math::AxisAngle::XYZVector (xx, yy, 0 ), 90 ._deg )),
1246+ Position (xx, yy, zz)));
12621247#ifdef EDM_ML_DEBUG
12631248 edm::LogVerbatim (" EBGeomX" ) << ilyPipeLog[type].name () << " :" << copyNum[type] << " positioned in "
12641249 << xilyLog.name () << " at (" << cms::convert2mm (xx) << " ,"
@@ -1405,7 +1390,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
14051390
14061391 Solid fawSolid = SubtractionSolid (fawSolid1,
14071392 fawCutBox,
1408- Transform3D (myrot (ns, fawCutName + " _rot " , fawCutForm.getRotation ()),
1393+ Transform3D (myrot (ns, fawCutName + " R " , fawCutForm.getRotation ()),
14091394 Position (fawCutForm.getTranslation ().x (),
14101395 fawCutForm.getTranslation ().y (),
14111396 fawCutForm.getTranslation ().z ())));
@@ -1428,7 +1413,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
14281413 ns.assembly (alvWedge.hawRName ),
14291414 copyOne,
14301415 Transform3D (
1431- myrot (ns, alvWedge.hawRName + " _rot " , hawRform.getRotation ()),
1416+ myrot (ns, alvWedge.hawRName + " R " , hawRform.getRotation ()),
14321417 Position (hawRform.getTranslation ().x (), hawRform.getTranslation ().y (), hawRform.getTranslation ().z ())));
14331418#ifdef EDM_ML_DEBUG
14341419 edm::LogVerbatim (" EBGeomX" ) << ns.assembly (alvWedge.hawRName ).name () << " :" << copyOne << " positioned in "
@@ -1441,10 +1426,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
14411426 ns.assembly (alvWedge.hawRName ),
14421427 copyTwo,
14431428 Transform3D (
1444- myrot (
1445- ns,
1446- alvWedge.hawRName + " R2" ,
1447- Rotation3D (1 ., 0 ., 0 ., 0 ., 1 ., 0 ., 0 ., 0 ., -1 .) * RotationY (M_PI)), // rotate about Y after refl thru Z
1429+ Rotation3D (1 ., 0 ., 0 ., 0 ., 1 ., 0 ., 0 ., 0 ., -1 .) * RotationY (M_PI), // rotate about Y after refl thru Z
14481430 Position (-hawRform.getTranslation ().x (), -hawRform.getTranslation ().y (), -hawRform.getTranslation ().z ())));
14491431#ifdef EDM_ML_DEBUG
14501432 edm::LogVerbatim (" EBGeomX" ) << ns.assembly (alvWedge.hawRName ).name () << " :" << copyTwo << " positioned in "
@@ -1507,7 +1489,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
15071489 ns.assembly (alvWedge.hawRName )
15081490 .placeVolume (gridLog,
15091491 copyOne,
1510- Transform3D (myrot (ns, grid.name + " _rot " , gridForm.getRotation ()),
1492+ Transform3D (myrot (ns, grid.name + " R " , gridForm.getRotation ()),
15111493 Position (gridForm.getTranslation ().x (),
15121494 gridForm.getTranslation ().y (),
15131495 gridForm.getTranslation ().z ())));
0 commit comments