Belle II Software development
TOPGeoPrismEnclosure.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <top/dbobjects/TOPGeoPrismEnclosure.h>
10#include <framework/gearbox/Unit.h>
11#include <iostream>
12
13using namespace std;
14
15namespace Belle2 {
22 {
23 if (m_length <= 0) return false;
24 if (m_height <= 0) return false;
25 if (m_bottomThickness <= 0) return false;
26 if (m_sideThickness <= 0) return false;
27 if (m_backThickness <= 0) return false;
28 if (m_frontThickness <= 0) return false;
29 if (m_extensionThickness <= 0) return false;
30 if (m_material.empty()) return false;
31 return true;
32 }
33
34
35 void TOPGeoPrismEnclosure::print(const std::string& title) const
36 {
37 TOPGeoBase::print(title);
38
39 cout << " length = " << getLength() << " " << s_unitName;
40 cout << ", height = " << getHeight() << " " << s_unitName;
41 cout << ", angle = " << getAngle() / Unit::deg << " deg";
42 cout << ", material = " << getMaterial() << endl;
43
44 cout << " thicknesses: bottom = " << getBottomThickness() << " " << s_unitName;
45 cout << ", side = " << getSideThickness() << " " << s_unitName;
46 cout << ", back = " << getBackThickness() << " " << s_unitName;
47 cout << ", front = " << getFrontThickness() << " " << s_unitName;
48 cout << ", extension plate = " << getExtensionThickness() << " " << s_unitName << endl;
49 }
50
52} // end Belle2 namespace
double getHeight() const
Returns height up to the side rails.
std::string m_material
material name
float m_extensionThickness
extension plate thickness
double getBackThickness() const
Returns back wall thickness.
float m_backThickness
back wall thickness
double getAngle() const
Returns angle of side wall.
float m_frontThickness
front wall thickness
const std::string & getMaterial() const
Returns material name.
float m_bottomThickness
bottom thickness
double getBottomThickness() const
Returns bottom thickness.
double getExtensionThickness() const
Returns extension plate thickness.
float m_height
height up to the side rails
double getFrontThickness() const
Returns front wall thickness.
double getSideThickness() const
Returns side wall thickness.
float m_sideThickness
side wall thickness
double getLength() const
Returns full length.
static const double deg
degree to radians
Definition: Unit.h:109
bool isConsistent() const override
Check for consistency of data members.
virtual void print(const std::string &title="QBB prism enclosure geometry parameters") const override
Print the content of the class.
virtual void print(const std::string &title) const
Print the content of the class.
Definition: TOPGeoBase.cc:28
static std::string s_unitName
conversion unit name
Definition: TOPGeoBase.h:87
Abstract base class for different kinds of events.
STL namespace.