Belle II Software  release-08-01-10
ARICHGeoBase.cc
1 
2 /**************************************************************************
3  * basf2 (Belle II Analysis Software Framework) *
4  * Author: The Belle II Collaboration *
5  * *
6  * See git log for contributors and copyright holders. *
7  * This file is licensed under LGPL-3.0, see LICENSE.md. *
8  **************************************************************************/
9 
10 #include <arich/dbobjects/ARICHGeoBase.h>
11 #include <framework/gearbox/Unit.h>
12 #include <iostream>
13 
14 using namespace std;
15 using namespace Belle2;
16 
17 double ARICHGeoBase::s_unit = Unit::cm;
18 std::string ARICHGeoBase::s_unitName("cm");
19 
20 void ARICHGeoBase::print(const std::string& title) const
21 {
22  cout << title << ":" << endl;
23 }
24 
25 void ARICHGeoBase::printPlacement(double x, double y, double z, double rx, double ry, double rz) const
26 {
27 // cout << "Volume positioning information (inside local ARICH frame)" << endl;
28  cout << " Center position; x: " << x << " " << s_unitName << ", y: " << y << " " << s_unitName << ", z: " << z << " " << s_unitName
29  << endl;
30  cout << " Rotations; x-axis: " << rx << " y-axis: " << ry << " z-axis: " << rz << " (in rad)" << endl;
31 }
32 void ARICHGeoBase::printSurface(const GeoOpticalSurface& surface) const
33 {
34  cout << " Optical surface: ";
35  if (surface.getName().empty() and !surface.hasProperties()) {
36  cout << "not defined" << endl;
37  return;
38  }
39  cout << surface.getName();
40  cout << ", model: " << surface.getModel();
41  cout << ", finish: " << surface.getFinish();
42  cout << ", type: " << surface.getType();
43  cout << ", value: " << surface.getValue();
44  cout << endl;
45  if (surface.hasProperties()) {
46  for (const auto& property : surface.getProperties()) {
47  cout << " - property: ";
48  cout << property.getName() << " [";
49  for (const auto& value : property.getValues()) cout << value << ", ";
50  cout << "], @[";
51  for (const auto& value : property.getEnergies()) cout << value / Unit::eV << ", ";
52  cout << "] eV" << endl;
53  }
54  } else {
55  cout << " - properties: None" << endl;
56  }
57 
58 }
59 
Represent an optical finish of a surface.
int getFinish() const
get finish of the surface
const std::string & getName() const
get name of the optical surface
double getValue() const
get value for the surface condition
const std::vector< GeoMaterialProperty > & getProperties() const
get all properties
int getType() const
get type of the surface
bool hasProperties() const
check if the material has at least one property
int getModel() const
get model for the surface
Abstract base class for different kinds of events.