14 #include "GaudiKernel/MsgStream.h"
34 , m_associatedDetElement(&detelement)
42 , m_associatedDetElement(&detelement)
43 , m_associatedDetElementId(
id)
59 , m_associatedLayer(
sf.m_associatedLayer)
60 , m_materialLayer(
sf.m_materialLayer)
77 if (
sf.m_transforms) {
79 shift *
sf.m_transforms->transform, shift *
sf.m_transforms->center);
94 m_transforms = std::make_unique<Transforms>(
sf.transform());
95 m_associatedDetElement =
nullptr;
97 m_associatedLayer =
sf.m_associatedLayer;
98 m_materialLayer =
sf.m_materialLayer;
105 std::optional<Amg::Vector2D>
111 std::optional<Amg::Vector2D> posOnSurface =
globalToLocal(glopo, tol1);
115 if (posOnSurface && insideBounds(*posOnSurface, tol1, tol2)){
128 std::optional<Amg::Vector2D> posOnSurface =
129 positionOnSurface(glopo, bchk, tol1, tol2);
130 return static_cast<bool>(posOnSurface);
144 if (rot.cols() != lin.cols() || rot.rows() != lin.rows())
return false;
146 for (
unsigned int col_i=0; col_i<rot.cols(); ++col_i){
147 for (
unsigned int row_i=0; row_i<rot.rows(); ++row_i){
148 ret &= (std::abs( rot(row_i,col_i) - lin(row_i,col_i))<1
e-5);
159 sl << std::setiosflags(std::ios::fixed);
160 sl << std::setprecision(4);
161 sl <<
name() << std::endl;
162 if (associatedDetectorElement()!=
nullptr){
163 sl<<
" Detector Type = "<<associatedDetectorElement()->detectorTypeString()<<std::endl;
165 sl <<
" Center position (x, y, z) = (" << center().x() <<
", " << center().y() <<
", " << center().z() <<
")"
171 sl << std::setprecision(6);
172 sl <<
" Rotation: colX = (" << rotX(0) <<
", " << rotX(1) <<
", " << rotX(2) <<
")" << std::endl;
173 sl <<
" colY = (" << rotY(0) <<
", " << rotY(1) <<
", " << rotY(2) <<
")" << std::endl;
174 sl <<
" colZ = (" << rotZ(0) <<
", " << rotZ(1) <<
", " << rotZ(2) <<
")" << std::endl;
175 sl <<
" Bounds : " << bounds();
176 if (!checkTransform(*
this)) {
177 sl << std::endl <<
" NOT a strict rotation matrix." << std::endl;
179 sl << std::setprecision(-1);
187 sl << std::setiosflags(std::ios::fixed);
188 sl << std::setprecision(4);
189 sl <<
name() << std::endl;
190 if (associatedDetectorElement()!=
nullptr){
191 sl<<
" Detector Type = "<<associatedDetectorElement()->detectorTypeString()<<std::endl;
193 sl <<
" Center position (x, y, z) = (" << center().x() <<
", " << center().y() <<
", " << center().z() <<
")"
199 sl << std::setprecision(6);
200 sl <<
" Rotation: colX = (" << rotX(0) <<
", " << rotX(1) <<
", " << rotX(2) <<
")" << std::endl;
201 sl <<
" colY = (" << rotY(0) <<
", " << rotY(1) <<
", " << rotY(2) <<
")" << std::endl;
202 sl <<
" colZ = (" << rotZ(0) <<
", " << rotZ(1) <<
", " << rotZ(2) <<
")" << std::endl;
203 sl <<
" Bounds : " << bounds();
204 if (!checkTransform(*
this)) {
205 sl << std::endl <<
" NOT a strict rotation matrix." << std::endl;
207 sl << std::setprecision(-1);