Belle II Software  release-05-01-25
TOPGeoPrismEnclosure.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <top/dbobjects/TOPGeoPrismEnclosure.h>
12 #include <framework/gearbox/Unit.h>
13 #include <iostream>
14 
15 using namespace std;
16 
17 namespace Belle2 {
23  bool TOPGeoPrismEnclosure::isConsistent() const
24  {
25  if (m_length <= 0) return false;
26  if (m_height <= 0) return false;
27  if (m_bottomThickness <= 0) return false;
28  if (m_sideThickness <= 0) return false;
29  if (m_backThickness <= 0) return false;
30  if (m_frontThickness <= 0) return false;
31  if (m_extensionThickness <= 0) return false;
32  if (m_material.empty()) return false;
33  return true;
34  }
35 
36 
37  void TOPGeoPrismEnclosure::print(const std::string& title) const
38  {
39  TOPGeoBase::print(title);
40 
41  cout << " length = " << getLength() << " " << s_unitName;
42  cout << ", height = " << getHeight() << " " << s_unitName;
43  cout << ", angle = " << getAngle() / Unit::deg << " deg";
44  cout << ", material = " << getMaterial() << endl;
45 
46  cout << " thicknesses: bottom = " << getBottomThickness() << " " << s_unitName;
47  cout << ", side = " << getSideThickness() << " " << s_unitName;
48  cout << ", back = " << getBackThickness() << " " << s_unitName;
49  cout << ", front = " << getFrontThickness() << " " << s_unitName;
50  cout << ", extension plate = " << getExtensionThickness() << " " << s_unitName << endl;
51  }
52 
54 } // end Belle2 namespace
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19