11 #include <arich/dbobjects/ARICHGeoMasterVolume.h>
19 TVector3 ARICHGeoMasterVolume::pointToGlobal(
const TVector3& point)
const
21 return (*m_rotation) * point + (*m_translation);
24 TVector3 ARICHGeoMasterVolume::momentumToGlobal(
const TVector3& momentum)
const
26 return (*m_rotation) * momentum;
29 TVector3 ARICHGeoMasterVolume::pointToLocal(
const TVector3& point)
const
31 return (*m_rotationInverse) * (point - (*m_translation));
34 TVector3 ARICHGeoMasterVolume::momentumToLocal(
const TVector3& momentum)
const
36 return (*m_rotationInverse) * momentum;
39 void ARICHGeoMasterVolume::setPlacement(
double x,
double y,
double z,
double rx,
double ry,
double rz)
42 m_x = x; m_y = y; m_z = z; m_rx = rx; m_ry = ry; m_rz = rz;
44 TVector3 translation(x, y, z);
46 m_rotation =
new TRotation();
47 m_rotation->RotateX(rx);
48 m_rotation->RotateY(ry);
49 m_rotation->RotateZ(rz);
51 m_rotationInverse =
new TRotation(m_rotation->Inverse());
52 m_translation =
new TVector3(x, y, z);
58 bool ARICHGeoMasterVolume::isConsistent()
const
60 if (m_innerR > m_outerR)
return false;
61 if (m_length <= 0 || m_innerR < 0)
return false;
62 if (m_material.empty())
return false;
67 void ARICHGeoMasterVolume::print(
const std::string& title)
const
69 ARICHGeoBase::print(title);
71 cout <<
" Tube inner radius: " << getInnerRadius() <<
" " << s_unitName << endl;
72 cout <<
" Tube outer radius: " << getOuterRadius() <<
" " << s_unitName << endl;
73 cout <<
" Tube length: " << getLength() <<
" " << s_unitName << endl;
75 cout <<
"Positioning parameters (in Belle II global frame)" << endl;
76 ARICHGeoBase::printPlacement(m_x, m_y, m_z, m_rx, m_ry, m_rz);