14 #include "CLHEP/Vector/ThreeVector.h" 15 #include "CLHEP/Vector/Rotation.h" 16 #include "CLHEP/Vector/RotationInterfaces.h" 17 #include "CLHEP/Units/GlobalPhysicalConstants.h" 18 #include "CLHEP/Units/GlobalSystemOfUnits.h" 64 nBlades_ =
static_cast<int>(nArgs[
"Blades"]);
76 rotNS_ = sArgs[
"RotationNS"];
82 <<
" jX|jY|jZ " <<
jX_ <<
":" <<
jY_ <<
":" <<
jZ_ <<
" kX|kY|kZ " <<
kX_ <<
":" <<
kY_ 100 CLHEP::HepRotation rCB(CLHEP::Hep3Vector(1. *
sin(effBladeAngle), 0., 1. *
cos(effBladeAngle)),
deltaPhi);
103 CLHEP::Hep3Vector kC = rCB * (kB + tCB);
106 CLHEP::Hep3Vector jkC = kC - jC;
107 double jkLength = jkC.mag();
109 edm::LogVerbatim(
"PixelGeom") <<
"+++++++++++++++ DDPixFwdRotation: JK Length " << jkLength * CLHEP::mm;
112 CLHEP::Hep3Vector nippleTranslation((kC + jC) / 2. - CLHEP::Hep3Vector(0.,
ancorRadius_, 0.));
113 edm::LogVerbatim(
"PixelGeom") <<
"Child translation : " << nippleTranslation;
116 CLHEP::Hep3Vector vZ(0., 0., 1.);
117 CLHEP::Hep3Vector axis = vZ.cross(jkC);
118 double angleCover = vZ.angle(jkC);
120 CLHEP::HepRotation* rpCN =
new CLHEP::HepRotation(axis, angleCover);
124 std::make_unique<DDRotationMatrix>(
125 rpCN->xx(), rpCN->xy(), rpCN->xz(), rpCN->yx(), rpCN->yy(), rpCN->yz(), rpCN->zx(), rpCN->zy(), rpCN->zz()));
126 CLHEP::HepRotation rpNC(axis, -angleCover);
131 std::make_unique<DDRotationMatrix>(
132 rpNC.xx(), rpNC.xy(), rpNC.xz(), rpNC.yx(), rpNC.yy(), rpNC.yz(), rpNC.zx(), rpNC.zy(), rpNC.zz()));
137 CLHEP::HepRotation rpNB(rpNC * rCB);
139 std::make_unique<DDRotationMatrix>(
140 rpNB.xx(), rpNB.xy(), rpNB.xz(), rpNB.yx(), rpNB.yy(), rpNB.yz(), rpNB.zx(), rpNB.zy(), rpNB.zz()));
143 edm::LogVerbatim(
"PixelGeom") <<
" Angle to body : " << vZ.angle(rpNB * vZ);
~DDPixFwdRotation() override=default
Log< level::Info, true > LogVerbatim
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
Cos< T >::type cos(const T &t)
void execute(DDCompactView &cpv) override
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::string rotNameCoverToNipple_
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::string rotNameNippleToBody_
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> ...
std::string rotNameNippleToCover_