2 #include "CLHEP/Units/GlobalPhysicalConstants.h" 3 #include "CLHEP/Units/GlobalSystemOfUnits.h" 4 #include "CLHEP/Geometry/Point3D.h" 5 #include "CLHEP/Geometry/Plane3D.h" 6 #include "CLHEP/Geometry/Vector3D.h" 7 #include "CLHEP/Geometry/Transform3D.h" 8 #include "CLHEP/Vector/EulerAngles.h" 35 m_corners[3 * icorner - 3] = xsign * front;
39 m_corners[3 * icorner - 3] = xsign * front;
52 m_corners[3 * icorner - 3] = xsign * rear;
56 m_corners[3 * icorner - 3] = xsign * rear;
92 edm::LogWarning(
"EcalGeom") <<
"DDEcalEndcapTrap::rotate(DDTranslation,DDTranslation) - not yet implemented";
105 for (icorner = 1; icorner <= 8; icorner++) {
122 edm::LogVerbatim(
"EcalGeom") <<
"DDEcalEndcapTrap::translate() not yet implemented";
133 for (
int icorner = 1; icorner <= 8; icorner++) {
150 double targetPhi =
polarAngle(frontCentre - rearCentre);
154 edm::LogVerbatim(
"EcalGeom") <<
"moveto: frontCentre " << frontCentre << std::endl
155 <<
"moveto: rearCentre " << rearCentre << std::endl
156 <<
"moveto: X rotation: " << targetTheta <<
" " << currentTheta <<
" " 157 << targetTheta - currentTheta << std::endl
158 <<
"moveto: Y rotation: " << targetPhi <<
" " << currentPhi <<
" " 159 <<
" " << targetPhi - currentPhi;
161 rotateX(targetTheta - currentTheta);
162 rotateY(targetPhi - currentPhi);
165 DDTranslation targetCentre = 0.5 * (frontCentre + rearCentre);
177 const CLHEP::HepRotation
tmp(CLHEP::Hep3Vector(1., 0., 0.),
angle);
186 const CLHEP::HepRotation
tmp(CLHEP::Hep3Vector(0., 1., 0.),
angle);
198 for (ixyz = 0; ixyz < 3; ixyz++) {
204 for (icorner = 1; icorner <= 4; icorner++) {
205 for (ixyz = 0; ixyz < 3; ixyz++) {
210 for (icorner = 5; icorner <= 8; icorner++) {
211 for (ixyz = 0; ixyz < 3; ixyz++) {
229 for (
int ixyz = 0; ixyz < 3; ixyz++) {
230 m_corners[3 * icorner - 3 + ixyz] = (0 == ixyz ? cornerxyz.x() : (1 == ixyz ? cornerxyz.y() : cornerxyz.z()));
260 double sintheta = trans.y() / trans.r();
261 return asin(sintheta);
276 double tanphi = trans.x() / trans.z();
293 for (
int ic = 1; ic <= 8; ic++) {
Log< level::Info, true > LogVerbatim
void rotate(const DDRotationMatrix &rot)
void rotateY(const double angle)
uint32_t cc[maxCellsPerHit]
DDRotationMatrix m_rotation
DDTranslation cornerPos(const int icorner)
void moveto(const DDTranslation &frontCentre, const DDTranslation &rearCentre)
DDTranslation rcentrePos()
DDTranslation fcentrePos()
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
DDTranslation m_translation
Log< level::Warning, false > LogWarning
DDTranslation centrePos()
DDEcalEndcapTrap()=delete
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
void rotateX(const double angle)