Belle II Software development
TOPGeoPrismEnclosure.h
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#pragma once
10
11#include <top/dbobjects/TOPGeoBase.h>
12#include <string>
13
14namespace Belle2 {
24 public:
25
30 {}
31
45 TOPGeoPrismEnclosure(double length,
46 double height,
47 double angle,
48 double bottomThickness,
49 double sideThickness,
50 double backThickness,
51 double frontThickness,
52 double extensionThickness,
53 const std::string& material,
54 const std::string& name = "TOPPrismEnclosure"): TOPGeoBase(name),
55 m_length(length), m_height(height), m_angle(angle),
56 m_bottomThickness(bottomThickness), m_sideThickness(sideThickness),
57 m_backThickness(backThickness), m_frontThickness(frontThickness),
58 m_extensionThickness(extensionThickness),
59 m_material(material)
60 {}
61
66 double getLength() const {return m_length / s_unit;}
67
72 double getBodyLength() const
73 {
75 }
76
81 double getHeight() const {return m_height / s_unit;}
82
87 double getAngle() const {return m_angle;}
88
93 double getBottomThickness() const {return m_bottomThickness / s_unit;}
94
99 double getSideThickness() const {return m_sideThickness / s_unit;}
100
105 double getBackThickness() const {return m_backThickness / s_unit;}
106
111 double getFrontThickness() const {return m_frontThickness / s_unit;}
112
118
123 const std::string& getMaterial() const {return m_material;}
124
129 bool isConsistent() const override;
130
135 virtual void print(const std::string& title = "QBB prism enclosure geometry parameters") const override;
136
137 private:
138
139 float m_length = 0;
140 float m_height = 0;
141 float m_angle = 0;
143 float m_sideThickness = 0;
144 float m_backThickness = 0;
147 std::string m_material;
151 };
152
154} // namespace Belle2
Base class for geometry parameters.
Definition: TOPGeoBase.h:25
Geometry parameters of prism enclosure (simplified)
float m_angle
angle of side wall
double getHeight() const
Returns height up to the side rails.
TOPGeoPrismEnclosure(double length, double height, double angle, double bottomThickness, double sideThickness, double backThickness, double frontThickness, double extensionThickness, const std::string &material, const std::string &name="TOPPrismEnclosure")
Full constructor.
std::string m_material
material name
float m_extensionThickness
extension plate thickness
ClassDefOverride(TOPGeoPrismEnclosure, 1)
ClassDef.
double getBackThickness() const
Returns back wall thickness.
float m_backThickness
back wall thickness
double getAngle() const
Returns angle of side wall.
double getBodyLength() const
Returns length w/o back and front plates.
float m_frontThickness
front wall thickness
TOPGeoPrismEnclosure()
Default constructor.
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.
bool isConsistent() const override
Check for consistency of data members.
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:86
virtual void print(const std::string &title="QBB prism enclosure geometry parameters") const override
Print the content of the class.
Abstract base class for different kinds of events.