Belle II Software  release-05-01-25
TOPGeoHoneycombPanel.h
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 #pragma once
12 
13 #include <top/dbobjects/TOPGeoBase.h>
14 #include <string>
15 #include <vector>
16 #include <utility>
17 
18 namespace Belle2 {
27  class TOPGeoHoneycombPanel: public TOPGeoBase {
28  public:
29 
34  {}
35 
50  TOPGeoHoneycombPanel(double width,
51  double length,
52  double minThickness,
53  double maxThickness,
54  double radius,
55  double edgeWidth,
56  double y,
57  int N,
58  const std::string& material,
59  const std::string& edgeMaterial,
60  const std::string& name = "TOPHoneycombPanel"): TOPGeoBase(name),
61  m_width(width), m_length(length), m_minThickness(minThickness),
62  m_maxThickness(maxThickness), m_radius(radius), m_edgeWidth(edgeWidth),
63  m_y(y), m_N(N), m_material(material), m_edgeMaterial(edgeMaterial)
64  {}
65 
70  double getWidth() const {return m_width / s_unit;}
71 
76  double getLength() const {return m_length / s_unit;}
77 
82  double getMinThickness() const {return m_minThickness / s_unit;}
83 
88  double getMaxThickness() const {return m_maxThickness / s_unit;}
89 
94  double getRadius() const {return m_radius / s_unit;}
95 
100  double getEdgeWidth() const {return m_edgeWidth / s_unit;}
101 
106  double getY() const {return m_y / s_unit;}
107 
112  const std::string& getMaterial() const {return m_material;}
113 
118  const std::string& getEdgeMaterial() const {return m_edgeMaterial;}
119 
120 
127  void appendContour(std::vector<std::pair<double, double> >& contour,
128  double y0,
129  bool fromLeftToRight) const;
130 
135  bool isConsistent() const override;
136 
141  virtual void print(const std::string& title = "QBB honeycomb panel geometry parameters") const override;
142 
143  private:
144 
145  float m_width = 0;
146  float m_length = 0;
147  float m_minThickness = 0;
148  float m_maxThickness = 0;
149  float m_radius = 0;
150  float m_edgeWidth = 0;
151  float m_y = 0;
152  int m_N = 0;
153  std::string m_material;
154  std::string m_edgeMaterial;
158  };
159 
160 
162 } // end namespace Belle2
163 
Belle2::TOPGeoHoneycombPanel::m_maxThickness
float m_maxThickness
maximal thickness
Definition: TOPGeoHoneycombPanel.h:156
Belle2::TOPGeoHoneycombPanel::getWidth
double getWidth() const
Returns panel width.
Definition: TOPGeoHoneycombPanel.h:78
Belle2::TOPGeoBase
Base class for geometry parameters.
Definition: TOPGeoBase.h:35
Belle2::TOPGeoHoneycombPanel::m_edgeMaterial
std::string m_edgeMaterial
material name of reinforced edge
Definition: TOPGeoHoneycombPanel.h:162
Belle2::TOPGeoHoneycombPanel::getLength
double getLength() const
Returns panel length.
Definition: TOPGeoHoneycombPanel.h:84
Belle2::TOPGeoHoneycombPanel::getRadius
double getRadius() const
Returns radius of curved surface.
Definition: TOPGeoHoneycombPanel.h:102
Belle2::TOPGeoHoneycombPanel::TOPGeoHoneycombPanel
TOPGeoHoneycombPanel()
Default constructor.
Definition: TOPGeoHoneycombPanel.h:41
Belle2::TOPGeoHoneycombPanel::m_width
float m_width
width
Definition: TOPGeoHoneycombPanel.h:153
Belle2::TOPGeoHoneycombPanel::m_minThickness
float m_minThickness
minimal thickness
Definition: TOPGeoHoneycombPanel.h:155
Belle2::TOPGeoHoneycombPanel::m_y
float m_y
y position of the flat surface in local (bar) frame
Definition: TOPGeoHoneycombPanel.h:159
Belle2::TOPGeoHoneycombPanel
Geometry parameters of honeycomb panel.
Definition: TOPGeoHoneycombPanel.h:35
Belle2::TOPGeoHoneycombPanel::getMaterial
const std::string & getMaterial() const
Returns material name.
Definition: TOPGeoHoneycombPanel.h:120
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPGeoBase::s_unit
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:96
Belle2::TOPGeoHoneycombPanel::getMinThickness
double getMinThickness() const
Returns panel minimal thickness.
Definition: TOPGeoHoneycombPanel.h:90
Belle2::TOPGeoHoneycombPanel::isConsistent
bool isConsistent() const override
Check for consistency of data members.
Definition: TOPGeoHoneycombPanel.cc:48
Belle2::TOPGeoHoneycombPanel::m_material
std::string m_material
material name
Definition: TOPGeoHoneycombPanel.h:161
Belle2::TOPGeoHoneycombPanel::print
virtual void print(const std::string &title="QBB honeycomb panel geometry parameters") const override
Print the content of the class.
Definition: TOPGeoHoneycombPanel.cc:62
Belle2::TOPGeoHoneycombPanel::getEdgeWidth
double getEdgeWidth() const
Returns width of the reinforced edge.
Definition: TOPGeoHoneycombPanel.h:108
Belle2::TOPGeoHoneycombPanel::ClassDefOverride
ClassDefOverride(TOPGeoHoneycombPanel, 1)
ClassDef.
Belle2::TOPGeoHoneycombPanel::appendContour
void appendContour(std::vector< std::pair< double, double > > &contour, double y0, bool fromLeftToRight) const
Appends curved surface to contour.
Definition: TOPGeoHoneycombPanel.cc:23
Belle2::TOPGeoHoneycombPanel::getMaxThickness
double getMaxThickness() const
Returns panel maximal thickness.
Definition: TOPGeoHoneycombPanel.h:96
Belle2::TOPGeoHoneycombPanel::getY
double getY() const
Returns y position of the flat surface in local (bar) frame.
Definition: TOPGeoHoneycombPanel.h:114
Belle2::TOPGeoHoneycombPanel::getEdgeMaterial
const std::string & getEdgeMaterial() const
Returns material name of reinforced edge.
Definition: TOPGeoHoneycombPanel.h:126
Belle2::TOPGeoHoneycombPanel::m_N
int m_N
number of flat surfaces to approximate curved surface
Definition: TOPGeoHoneycombPanel.h:160
Belle2::TOPGeoHoneycombPanel::m_edgeWidth
float m_edgeWidth
width of the reinforced edge
Definition: TOPGeoHoneycombPanel.h:158
Belle2::TOPGeoHoneycombPanel::m_radius
float m_radius
radius of curved surface
Definition: TOPGeoHoneycombPanel.h:157
Belle2::TOPGeoHoneycombPanel::m_length
float m_length
length
Definition: TOPGeoHoneycombPanel.h:154