5 #include "GeoModelKernel/GeoVFullPhysVol.h"
8 #include "GeoModelKernel/GeoPcon.h"
15 ,
double projectivityDisplacement)
16 : GeoVDetectorElement(physVol)
17 , m_descriptor(emecDescriptor)
18 , m_endcapIndex(endcap)
19 , m_projectivityDisplacement(projectivityDisplacement)
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();