323 CLHEP::Hep3Vector jC;
324 CLHEP::Hep3Vector kB;
325 string rotNameNippleToCover;
326 string rotNameCoverToNipple;
327 string rotNameNippleToBody;
332 rotNameNippleToCover =
"NippleToCoverZPlus";
333 rotNameCoverToNipple =
"CoverToNippleZPlus";
334 rotNameNippleToBody =
"NippleToBodyZPlus";
338 rotNameNippleToCover =
"NippleToCoverZMinus";
339 rotNameCoverToNipple =
"CoverToNippleZMinus";
340 rotNameNippleToBody =
"NippleToBodyZMinus";
350 CLHEP::HepRotation rCB(CLHEP::Hep3Vector(1. *
sin(effBladeAngle), 0., 1. *
cos(effBladeAngle)),
deltaPhi);
354 CLHEP::Hep3Vector kC = rCB * (kB + tCB);
358 CLHEP::Hep3Vector jkC = kC - jC;
359 double jkLength = jkC.mag();
361 LogDebug(
"PixelGeom") <<
"+++++++++++++++ DDPixFwdBlades: "
362 <<
"JK Length " << jkLength * CLHEP::mm;
366 CLHEP::Hep3Vector nippleTranslation((kC + jC) / 2. - CLHEP::Hep3Vector(0.,
ancorRadius, 0.));
372 LogDebug(
"PixelGeom") <<
"Child translation : " << nippleTranslation;
376 CLHEP::Hep3Vector vZ(0., 0., 1.);
377 CLHEP::Hep3Vector axis = vZ.cross(jkC);
378 double angleCover = vZ.angle(jkC);
379 LogDebug(
"PixelGeom") <<
" Angle to Cover: " << angleCover;
380 CLHEP::HepRotation* rpCN =
new CLHEP::HepRotation(axis, angleCover);
389 DDName(rotNameCoverToNipple,
"pixfwdNipple"),
390 make_unique<DDRotationMatrix>(
391 rpCN->xx(), rpCN->xy(), rpCN->xz(), rpCN->yx(), rpCN->yy(), rpCN->yz(), rpCN->zx(), rpCN->zy(), rpCN->zz()));
392 CLHEP::HepRotation rpNC(axis, -angleCover);
394 DDrot(
DDName(rotNameNippleToCover,
"pixfwdNipple"),
395 make_unique<DDRotationMatrix>(
396 rpNC.xx(), rpNC.xy(), rpNC.xz(), rpNC.yx(), rpNC.yy(), rpNC.yz(), rpNC.zx(), rpNC.zy(), rpNC.zz()));
400 CLHEP::HepRotation rpNB(rpNC * rCB);
403 make_unique<DDRotationMatrix>(
404 rpNB.xx(), rpNB.xy(), rpNB.xz(), rpNB.yx(), rpNB.yy(), rpNB.yz(), rpNB.zx(), rpNB.zy(), rpNB.zz()));
405 double angleBody = vZ.angle(rpNB * vZ);
406 LogDebug(
"PixelGeom") <<
" Angle to body : " << angleBody;