2 #include "CLHEP/Geometry/Transform3D.h" 28 m_corners[3 * icorner - 3] = xsign * front;
32 m_corners[3 * icorner - 3] = xsign * front;
45 m_corners[3 * icorner - 3] = xsign * rear;
49 m_corners[3 * icorner - 3] = xsign * rear;
84 for (icorner = 1; icorner <= 8; icorner++) {
101 edm::LogVerbatim(
"EcalGeom") <<
"DDEcalEndcapTrapX::translate() not yet implemented";
112 for (
int icorner = 1; icorner <= 8; icorner++) {
129 double targetPhi =
polarAngle(frontCentre - rearCentre);
133 edm::LogVerbatim(
"EcalGeom") <<
"moveto: frontCentre " << frontCentre << std::endl
134 <<
"moveto: rearCentre " << rearCentre << std::endl
135 <<
"moveto: X rotation: " << targetTheta <<
" " << currentTheta <<
" " 136 << targetTheta - currentTheta << std::endl
137 <<
"moveto: Y rotation: " << targetPhi <<
" " << currentPhi <<
" " 138 <<
" " << targetPhi - currentPhi << std::endl;
140 rotateX(targetTheta - currentTheta);
141 rotateY(targetPhi - currentPhi);
144 DDTranslation targetCentre = 0.5 * (frontCentre + rearCentre);
156 const CLHEP::HepRotation
tmp(CLHEP::Hep3Vector(1., 0., 0.),
angle);
165 const CLHEP::HepRotation
tmp(CLHEP::Hep3Vector(0., 1., 0.),
angle);
177 for (ixyz = 0; ixyz < 3; ixyz++) {
183 for (icorner = 1; icorner <= 4; icorner++) {
184 for (ixyz = 0; ixyz < 3; ixyz++) {
189 for (icorner = 5; icorner <= 8; icorner++) {
190 for (ixyz = 0; ixyz < 3; ixyz++) {
208 for (
int ixyz = 0; ixyz < 3; ixyz++) {
209 m_corners[3 * icorner - 3 + ixyz] = (0 == ixyz ? cornerxyz.x() : (1 == ixyz ? cornerxyz.y() : cornerxyz.z()));
239 double sintheta = trans.y() / trans.r();
240 return asin(sintheta);
255 double tanphi = trans.x() / trans.z();
272 for (
int ic = 1; ic <= 8; ic++) {
DDRotationMatrix m_rotation
Log< level::Info, true > LogVerbatim
DDTranslation centrePos()
uint32_t cc[maxCellsPerHit]
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
DDTranslation fcentrePos()
void rotateX(const double angle)
void rotate(const DDRotationMatrix &rot)
DDTranslation m_translation
DDTranslation cornerPos(const int icorner)
DDTranslation rcentrePos()
void rotateY(const double angle)
DDEcalEndcapTrapX()=delete
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
void moveto(const DDTranslation &frontCentre, const DDTranslation &rearCentre)
T angle(T x1, T y1, T z1, T x2, T y2, T z2)