5#include "GeoModelKernel/GeoVFullPhysVol.h"
8#include "GeoModelKernel/GeoPcon.h"
15 ,
double projectivityDisplacement)
16 : GeoVDetectorElement(physVol)
33 const GeoVFullPhysVol *physVol = getMaterialGeom();
34 const GeoLogVol *logVol = physVol->getLogVol();
35 const GeoShape *shape = logVol->getShape();
36 if (shape->typeID()!=GeoPcon::getClassTypeID()) {
37 throw std::runtime_error (
"EMECDetectorRegion cannot compute absolute position of reference plane");
39 const GeoPcon *pcon =
static_cast<const GeoPcon *
> (shape);
40 HepGeom::Point3D<double> center(0,0,pcon->getZPlane(0)-
m_descriptor->getManager()->getRefToActive());
48 HepGeom::Point3D<double> focalPos = HepGeom::Point3D<double>(0,0,sgn*
m_descriptor->getManager()->getFocalToRef());
49 return zRef - focalPos;
54 const GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
56 ? fullPhysVol->getCachedAbsoluteTransform(alignStore)
57 : fullPhysVol->getAbsoluteTransform();
62 const GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
64 ? fullPhysVol->getCachedDefAbsoluteTransform(alignStore)
65 : fullPhysVol->getDefAbsoluteTransform();
Smart Pointer to EMEC Cells.
A Cell of the electromagnetic endcap calorimeter readout geometry This class represents a single EMEC...
Descriptor for regions of the electromagnetic endcap calorimeter.
~EMECDetectorRegion()
Destructor.
Amg::Vector3D getFocalPointPosAmg() const
Returns the position of the focal point of the EMEC.
double m_projectivityDisplacement
EMECCellConstLink getEMECCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
HepGeom::Point3D< double > getRefPlanePos() const
Returns the position of the center of the reference plane of the EMEC (back of front tranverse bars).
EMECDetectorRegion::DetectorSide m_endcapIndex
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
EMECDetectorRegion(const GeoVFullPhysVol *physVol, const EMECDetDescr *emecDescriptor, DetectorSide endcap, double projectivityDisplacement=4 *Gaudi::Units::cm)
Constructor.
GeoIntrusivePtr< const EMECDetDescr > m_descriptor
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the EMEC.
Amg::Vector3D getRefPlanePosAmg() const
Returns the position of the center of the reference plane of the EMEC (back of front tranverse bars).
Ensure that the extensions for the Vector3D are properly loaded.
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