9 #include <arich/dbobjects/ARICHGeoMasterVolume.h>
17 TVector3 ARICHGeoMasterVolume::pointToGlobal(
const TVector3& point)
const
19 return (*m_rotation) * point + (*m_translation);
22 TVector3 ARICHGeoMasterVolume::momentumToGlobal(
const TVector3& momentum)
const
24 return (*m_rotation) * momentum;
27 TVector3 ARICHGeoMasterVolume::pointToLocal(
const TVector3& point)
const
29 return (*m_rotationInverse) * (point - (*m_translation));
32 TVector3 ARICHGeoMasterVolume::momentumToLocal(
const TVector3& momentum)
const
34 return (*m_rotationInverse) * momentum;
37 void ARICHGeoMasterVolume::setPlacement(
double x,
double y,
double z,
double rx,
double ry,
double rz)
40 m_x = x; m_y = y; m_z = z; m_rx = rx; m_ry = ry; m_rz = rz;
42 TVector3 translation(x, y, z);
44 m_rotation =
new TRotation();
45 m_rotation->RotateX(rx);
46 m_rotation->RotateY(ry);
47 m_rotation->RotateZ(rz);
49 m_rotationInverse =
new TRotation(m_rotation->Inverse());
50 m_translation =
new TVector3(x, y, z);
56 bool ARICHGeoMasterVolume::isConsistent()
const
58 if (m_innerR > m_outerR)
return false;
59 if (m_length <= 0 || m_innerR < 0)
return false;
60 if (m_material.empty())
return false;
65 void ARICHGeoMasterVolume::print(
const std::string& title)
const
67 ARICHGeoBase::print(title);
69 cout <<
" Tube inner radius: " << getInnerRadius() <<
" " << s_unitName << endl;
70 cout <<
" Tube outer radius: " << getOuterRadius() <<
" " << s_unitName << endl;
71 cout <<
" Tube length: " << getLength() <<
" " << s_unitName << endl;
73 cout <<
"Positioning parameters (in Belle II global frame)" << endl;
74 ARICHGeoBase::printPlacement(m_x, m_y, m_z, m_rx, m_ry, m_rz);
Abstract base class for different kinds of events.