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" 33 m_corners[3 * icorner - 3] = xsign * front;
37 m_corners[3 * icorner - 3] = xsign * front;
50 m_corners[3 * icorner - 3] = xsign * rear;
54 m_corners[3 * icorner - 3] = xsign * rear;
90 edm::LogInfo(
"EcalGeom") <<
"DDEcalEndcapTrap::rotate(DDTranslation,DDTranslation) - not yet implemented" 102 for (icorner = 1; icorner <= 8; icorner++) {
124 for (
int icorner = 1; icorner <= 8; icorner++) {
141 double targetPhi =
polarAngle(frontCentre - rearCentre);
148 rotateX(targetTheta - currentTheta);
149 rotateY(targetPhi - currentPhi);
152 DDTranslation targetCentre = 0.5 * (frontCentre + rearCentre);
162 const CLHEP::HepRotation
tmp(CLHEP::Hep3Vector(1., 0., 0.), angle);
164 rotate(
DDRotationMatrix(tmp.xx(), tmp.xy(), tmp.xz(), tmp.yx(), tmp.yy(), tmp.yz(), tmp.zx(), tmp.zy(), tmp.zz()));
171 const CLHEP::HepRotation
tmp(CLHEP::Hep3Vector(0., 1., 0.), angle);
173 rotate(
DDRotationMatrix(tmp.xx(), tmp.xy(), tmp.xz(), tmp.yx(), tmp.yy(), tmp.yz(), tmp.zx(), tmp.zy(), tmp.zz()));
183 for (ixyz = 0; ixyz < 3; ixyz++) {
189 for (icorner = 1; icorner <= 4; icorner++) {
190 for (ixyz = 0; ixyz < 3; ixyz++) {
195 for (icorner = 5; icorner <= 8; icorner++) {
196 for (ixyz = 0; ixyz < 3; ixyz++) {
214 for (
int ixyz = 0; ixyz < 3; ixyz++) {
215 m_corners[3 * icorner - 3 + ixyz] = (0 == ixyz ? cornerxyz.x() : (1 == ixyz ? cornerxyz.y() : cornerxyz.z()));
245 double sintheta = trans.y() / trans.r();
246 return asin(sintheta);
261 double tanphi = trans.x() / trans.z();
277 edm::LogInfo(
"EcalGeom") <<
"Endcap supercrystal" << std::endl;
278 for (
int ic = 1; ic <= 8; ic++) {
280 edm::LogInfo(
"EcalGeom") <<
"Corner " << ic <<
" " << cc << std::endl;
void rotate(const DDRotationMatrix &rot)
void rotateY(const double angle)
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
DDRotationMatrix m_rotation
DDTranslation cornerPos(const int icorner)
void moveto(const DDTranslation &frontCentre, const DDTranslation &rearCentre)
DDTranslation rcentrePos()
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
DDTranslation fcentrePos()
DDTranslation m_translation
DDTranslation centrePos()
DDEcalEndcapTrap()=delete
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
void rotateX(const double angle)