9 #include <arich/dbobjects/ARICHGeoMirrors.h>
18 void ARICHGeoMirrors::initializeDefault()
20 double rmir = m_radius - m_plateThickness / 2.;
21 for (
unsigned i = 0; i < m_nMirrors; i++) {
22 TVector3 norm(cos(i * 2.*M_PI / m_nMirrors + m_startAngle),
23 sin(i * 2.*M_PI / m_nMirrors + m_startAngle), 0);
24 m_normVector.push_back(norm);
25 m_point.push_back(rmir * norm);
26 m_installed.push_back(
true);
30 bool ARICHGeoMirrors::isConsistent()
const
32 if (m_nMirrors == 0) { B2INFO(
"ARICHGeoMirrors: no mirrors will be placed");
return true;}
34 if (m_radius <= 0)
return false;
35 if (m_plateThickness <= 0 || m_plateWidth <= 0 || m_plateLength <= 0)
return false;
36 if (m_plateWidth == 0)
return false;
37 if (m_radius == 0)
return false;
38 if (m_point.size() != m_nMirrors)
return false;
39 if (m_normVector.size() != m_nMirrors)
return false;
40 if (m_installed.size() != m_nMirrors)
return false;
41 if (m_material.empty())
return false;
42 if (!m_surface.hasProperties())
43 B2INFO(
"ARICHGeoMirrors: no optical properties are specified for mirrors! (no photons will be reflected)");
48 void ARICHGeoMirrors::print(
const std::string& title)
const
50 ARICHGeoBase::print(title);
51 cout <<
" mirror plate:" << endl;
52 cout <<
" thickness: " << getPlateThickness() <<
" " << s_unitName <<
", width: " << getPlateWidth() <<
" " << s_unitName <<
54 << getPlateLength() <<
" " << s_unitName << endl;
55 cout <<
" material: " << getMaterial() << endl;
56 cout <<
" number of plates: " << getNMirrors() << endl;
57 cout <<
" nominal phi angle of 1st plate: " << getStartAngle() << endl;
58 cout <<
" nominal radius at which plates are placed: " << getRadius() <<
" " << s_unitName << endl;
59 cout <<
" nominal Z position of plates: " << getZPosition() <<
" " << s_unitName << endl;
61 cout <<
" installed plates " << endl;
64 for (
unsigned imir = 1; imir < getNMirrors() + 1; imir++) {
65 cout << setw(3) << imir <<
" ";
69 for (
unsigned imir = 1; imir < getNMirrors() + 1; imir++) {
70 cout << setw(3) << isInstalled(imir) <<
" ";
74 ARICHGeoBase::printSurface(m_surface);
Abstract base class for different kinds of events.