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);
171 const CLHEP::HepRotation
tmp(CLHEP::Hep3Vector(0., 1., 0.),
angle);
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;