11 #include <arich/dbobjects/ARICHGlobalAlignment.h>
19 TVector3 ARICHGlobalAlignment::pointToGlobal(
const TVector3& point)
const
21 if (!m_rotation) setTransformation();
22 return (*m_rotation) * point + (*m_translation);
25 TVector3 ARICHGlobalAlignment::momentumToGlobal(
const TVector3& momentum)
const
27 if (!m_rotation) setTransformation();
28 return (*m_rotation) * momentum;
31 TVector3 ARICHGlobalAlignment::pointToLocal(
const TVector3& point)
const
33 if (!m_translation) setTransformation();
34 return (*m_rotationInverse) * (point - (*m_translation));
37 TVector3 ARICHGlobalAlignment::momentumToLocal(
const TVector3& momentum)
const
39 if (!m_rotationInverse) setTransformation();
40 return (*m_rotationInverse) * momentum;
43 void ARICHGlobalAlignment::setTransformation()
const
45 TRotation Rot = m_alignPars.getRotation();
46 m_rotation =
new TRotation(Rot);
47 m_rotationInverse =
new TRotation(Rot.Inverse());
48 m_translation =
new TVector3(m_alignPars.getTranslation());
51 void ARICHGlobalAlignment::print(
const std::string& title)
const
53 ARICHGeoBase::print(title);