14#include "GaudiKernel/PhysicalConstants.h"
15#include "GaudiKernel/MsgStream.h"
20Trk::JacobianLocalToCurvilinear::JacobianLocalToCurvilinear(
const Trk::CurvilinearUVT& curvUVT,
29 (*this)(0,0) = curvUVT.
curvU().dot(locX);
30 (*this)(0,1) = curvUVT.
curvU().dot(locY);
31 (*this)(1,0) = curvUVT.
curvV().dot(locX);
32 (*this)(1,1) = curvUVT.
curvV().dot(locY);
35Trk::JacobianLocalToCurvilinear::JacobianLocalToCurvilinear(
const Amg::Vector3D& bfield,
49 (*this)(0,0) = curvUVT.
curvU().dot(locX);
50 (*this)(0,1) = curvUVT.
curvU().dot(locY);
51 (*this)(1,0) = curvUVT.
curvV().dot(locX);
52 (*this)(1,1) = curvUVT.
curvV().dot(locY);
58 double B = bfield.mag();
61 double Q = -
B * Gaudi::Units::c_light * qOp;
64 double tlx = curvUVT.
curvT().dot(locX);
65 double tly = curvUVT.
curvT().dot(locY);
66 double nu =
n.dot(curvUVT.
curvU());
67 double nv =
n.dot(curvUVT.
curvV());
69 double oneOverSinTheta = (sinTheta != 0.)? 1./sinTheta: 1.e20;
72 (*this)(2,0) = -alpha*Q*oneOverSinTheta*nu*tlx;
73 (*this)(2,1) = - alpha*Q*oneOverSinTheta*nu*tly;
75 (*this)(3,0) = alpha*Q*nv*tlx;
76 (*this)(3,1) = alpha*Q*nv*tly;
82MsgStream&
Trk::operator << ( MsgStream& sl,
const Trk::JacobianLocalToCurvilinear& jac)
84 sl << std::setiosflags(std::ios::fixed);
85 sl << std::setprecision(6);
86 sl << MSG::DEBUG <<
"Trk::JacobianLocalToCurvilinear" << std::endl;
87 sl <<
"______________________________________________________________________" << std::endl;
88 for (
int irow = 0; irow<5; irow++){
90 sl << (jac)(irow,icol);
91 if (irow < 4 || icol < 4 ) { sl <<
" ";}
95 sl <<
"______________________________________________________________________";
99std::ostream&
Trk::operator << ( std::ostream& sl,
const Trk::JacobianLocalToCurvilinear& jac)
101 sl << std::setiosflags(std::ios::fixed);
102 sl << std::setprecision(7);
103 sl <<
"Trk::JacobianLocalToCurvilinear " << std::endl;
104 sl <<
"______________________________________________________________________" << std::endl;
105 for (
int irow = 0; irow<5; irow++){
107 sl << (jac)(irow,icol);
108 if (irow < 4 || icol < 4 ) { sl <<
" "; }
112 sl <<
"______________________________________________________________________";
#define AmgMatrix(rows, cols)
Header file for AthHistogramAlgorithm.
simple class that constructs the curvilinear vectors curvU and curvV from a given momentum direction ...
const Amg::Vector3D & curvU() const
Access methods.
const Amg::Vector3D & curvT() const
const Amg::Vector3D & curvV() const
Eigen::Matrix< double, 3, 1 > Vector3D
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output