6#include "GeoModelKernel/GeoVFullPhysVol.h"
7#include "GeoModelKernel/GeoPcon.h"
14 ,
double projectivityDisplacement)
15 : GeoVDetectorElement(physVol)
35 return Amg::Vector3D(clhepPoint.x(), clhepPoint.y(), clhepPoint.z());
39 const GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
41 ? fullPhysVol->getCachedAbsoluteTransform(alignStore)
42 : fullPhysVol->getAbsoluteTransform();
47 const GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
49 ? fullPhysVol->getCachedDefAbsoluteTransform(alignStore)
50 : fullPhysVol->getDefAbsoluteTransform();
56 return Amg::Vector3D(clhepPoint.x(), clhepPoint.y(), clhepPoint.z());
65 const GeoVFullPhysVol *physVol = getMaterialGeom();
66 const GeoLogVol *logVol = physVol->getLogVol();
67 const GeoShape *shape = logVol->getShape();
68 if (shape->typeID()!=GeoPcon::getClassTypeID()) {
69 throw std::runtime_error (
"HECDetectorRegion cannot compute absolute position of reference plane");
71 const GeoPcon *pcon =
static_cast<const GeoPcon *
> (shape);
72 HepGeom::Point3D<double> center(0,0,pcon->getZPlane(0));
81 HepGeom::Point3D<double> focalPos = hec2 ?
82 HepGeom::Point3D<double>(0,0,sgn*
m_descriptor->getManager()->getFocalToRef2()):
83 HepGeom::Point3D<double>(0,0,sgn*
m_descriptor->getManager()->getFocalToRef1());
84 return zRef - focalPos;
GeoIntrusivePtr< const HECCell > HECCellConstLink
@Class: HECCellConstLink
Ensure that the extensions for the Vector3D are properly loaded.
A cell of the hadronic endcap calorimeter readout geometry.
Descriptor for regions of the hadronic endcap calorimeter.
HECCellConstLink getHECCell(unsigned int ieta, unsigned int iphi) const
Retrieve a cell with eta index and phi index.
~HECDetectorRegion()
Destructor.
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the HEC.
HECDetectorRegion::DetectorSide m_endcapIndex
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
double m_projectivityDisplacement
GeoIntrusivePtr< const HECDetDescr > m_descriptor
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Amg::Vector3D getFocalPointPosAmg() const
Returns the position of the focal point of the HEC.
HECDetectorRegion(const GeoVFullPhysVol *physVol, const HECDetDescr *hecDescriptor, DetectorSide endcap, double projectivityDisplacement=4 *Gaudi::Units::cm)
Constructor.
HepGeom::Point3D< double > getRefPlanePos() const
Returns the position of the center of the reference plane of the HEC (front face of the HEC volume).
Amg::Vector3D getRefPlanePosAmg() const
Returns the position of the center of the reference plane of the HEC (front face of the HEC volume).
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D