12   return Vector3D(tMatrix(0, 3), tMatrix(1, 3), tMatrix(2, 3));
 
   22   if (m_associatedDetElement != 
nullptr) {
 
   23     return m_associatedDetElement->transform(gctx);
 
   28 inline bool Surface::insideBounds(
const Vector2D& lposition,
 
   30   return bounds().inside(lposition, bcheck);
 
   36   return transform(gctx).matrix().block<3, 3>(0, 0);
 
   50   const double x = direction(0);  
 
   51   const double y = direction(1);  
 
   52   const double z = direction(2);  
 
   55   const double cos_theta = 
z;
 
   56   const double sin_theta = sqrt(x * x + y * y);
 
   57   const double inv_sin_theta = 1. / sin_theta;
 
   58   const double cos_phi = x * inv_sin_theta;
 
   59   const double sin_phi = y * inv_sin_theta;
 
   61   const auto rframe = referenceFrame(gctx, position, direction);
 
   63   jacobian.topLeftCorner<3, 2>() = rframe.topLeftCorner<3, 2>();
 
   67   jacobian(4, 
eBoundPhi) = (-sin_theta) * sin_phi;
 
   69   jacobian(5, 
eBoundPhi) = sin_theta * cos_phi;
 
   79   const double x = direction(0);  
 
   80   const double y = direction(1);  
 
   81   const double z = direction(2);  
 
   83   const double cosTheta = 
z;
 
   84   const double sinTheta = sqrt(x * x + y * y);
 
   85   const double invSinTheta = 1. / sinTheta;
 
   86   const double cosPhi = x * invSinTheta;
 
   87   const double sinPhi = y * invSinTheta;
 
   90       referenceFrame(gctx, position, direction).transpose();
 
   92   jacobian.block<2, 3>(0, 0) = rframeT.block<2, 3>(0, 0);
 
   96   jacobian(
eBoundPhi, 4) = -sinPhi * invSinTheta;
 
   97   jacobian(
eBoundPhi, 5) = cosPhi * invSinTheta;
 
  112   norm_vec /= (norm_vec * direction);
 
  114   return (norm_vec * jacobian.topLeftCorner<3, 
eBoundSize>());
 
  118   return m_associatedDetElement;
 
  121 inline const Layer* Surface::associatedLayer()
 const {
 
  122   return (m_associatedLayer);
 
  126   return m_surfaceMaterial.get();
 
  129 inline const std::shared_ptr<const ISurfaceMaterial>&
 
  130 Surface::surfaceMaterialSharedPtr()
 const {
 
  131   return m_surfaceMaterial;
 
  134 inline void Surface::assignSurfaceMaterial(
 
  135     std::shared_ptr<const ISurfaceMaterial> 
material) {
 
  136   m_surfaceMaterial = std::move(material);
 
  139 inline void Surface::associateLayer(
const Layer& lay) {
 
  140   m_associatedLayer = (&lay);