Belle II Software  release-08-01-10
TOPGeoQBB.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 <top/dbobjects/TOPGeoHoneycombPanel.h>
13 #include <top/dbobjects/TOPGeoSideRails.h>
14 #include <top/dbobjects/TOPGeoEndPlate.h>
15 #include <top/dbobjects/TOPGeoPrismEnclosure.h>
16 #include <top/dbobjects/TOPGeoColdPlate.h>
17 #include <string>
18 #include <vector>
19 #include <utility>
20 
21 namespace Belle2 {
30  class TOPGeoQBB: public TOPGeoBase {
31  public:
32 
37  {}
38 
47  TOPGeoQBB(double width, double length, double prismPosition,
48  const std::string& material,
49  const std::string& name = "TOPQBB"): TOPGeoBase(name),
50  m_width(width), m_length(length), m_prismPosition(prismPosition), m_material(material)
51  {}
52 
57  void setInnerPanel(const TOPGeoHoneycombPanel& innerPanel)
58  {
59  m_innerPanel = innerPanel;
60  }
61 
66  void setOuterPanel(const TOPGeoHoneycombPanel& outerPanel)
67  {
68  m_outerPanel = outerPanel;
69  }
70 
75  void setSideRails(const TOPGeoSideRails& sideRails) {m_sideRails = sideRails;}
76 
81  void setPrismEnclosure(const TOPGeoPrismEnclosure& prismEnclosure)
82  {
83  m_prismEnclosure = prismEnclosure;
84  }
85 
90  void setEndPlate(const TOPGeoEndPlate& endPlate) {m_endPlate = endPlate;}
91 
96  void setColdPlate(const TOPGeoColdPlate& coldPlate) {m_coldPlate = coldPlate;}
97 
102  double getWidth() const {return m_width / s_unit;}
103 
108  double getPanelWidth() const
109  {
110  return getWidth() - 2 * m_sideRails.getThickness();
111  }
112 
117  double getLength() const {return m_length / s_unit;}
118 
123  double getSideRailsLength() const
124  {
126  }
127 
132  double getPrismPosition() const {return m_prismPosition / s_unit;}
133 
138  const std::string& getMaterial() const {return m_material;}
139 
145 
151 
156  const TOPGeoSideRails& getSideRails() const {return m_sideRails;}
157 
163 
169 
174  const TOPGeoColdPlate& getColdPlate() const {return m_coldPlate;}
175 
180  std::vector<std::pair<double, double> > getForwardContour() const;
181 
186  std::vector<std::pair<double, double> > getInnerPanelContour() const;
187 
192  std::vector<std::pair<double, double> > getOuterPanelContour() const;
193 
198  std::vector<std::pair<double, double> > getBackwardContour() const;
199 
204  std::vector<std::pair<double, double> > getPrismEnclosureContour() const;
205 
210  std::vector<std::pair<double, double> > getBackPlateContour() const;
211 
216  std::vector<std::pair<double, double> > getFrontPlateContour() const;
217 
222  bool isConsistent() const override;
223 
228  virtual void print(const std::string& title = "QBB geometry parameters") const override;
229 
233  void printForwardContour() const;
234 
238  void printInnerPanelContour() const;
239 
243  void printOuterPanelContour() const;
244 
248  void printBackwardContour() const;
249 
253  void printPrismEnclosureContour() const;
254 
258  void printBackPlateContour() const;
259 
263  void printFrontPlateContour() const;
264 
265  private:
266 
267  float m_width = 0;
268  float m_length = 0;
269  float m_prismPosition = 0;
270  std::string m_material;
280  };
281 
283 } // end namespace Belle2
Base class for geometry parameters.
Definition: TOPGeoBase.h:25
Geometry parameters of cold plate (simplified)
Geometry parameters of forward end plate (simplified)
double getThickness() const
Returns thickness.
Geometry parameters of honeycomb panel.
Geometry parameters of prism enclosure (simplified)
double getBackThickness() const
Returns back wall thickness.
Geometry parameters of Quartz Bar Box (mother class)
Definition: TOPGeoQBB.h:30
double getWidth() const
Returns full width.
Definition: TOPGeoQBB.h:102
TOPGeoPrismEnclosure m_prismEnclosure
prism enclosure
Definition: TOPGeoQBB.h:274
TOPGeoQBB(double width, double length, double prismPosition, const std::string &material, const std::string &name="TOPQBB")
Useful constructor.
Definition: TOPGeoQBB.h:47
std::string m_material
material inside QBB
Definition: TOPGeoQBB.h:270
ClassDefOverride(TOPGeoQBB, 2)
ClassDef.
const TOPGeoPrismEnclosure & getPrismEnclosure() const
Returns prism enclosure.
Definition: TOPGeoQBB.h:162
TOPGeoHoneycombPanel m_outerPanel
outer honeycomb panel
Definition: TOPGeoQBB.h:272
const TOPGeoEndPlate & getForwardEndPlate() const
Returns forward end plate.
Definition: TOPGeoQBB.h:168
void setOuterPanel(const TOPGeoHoneycombPanel &outerPanel)
Sets outer honeycomb panel.
Definition: TOPGeoQBB.h:66
TOPGeoSideRails m_sideRails
side rails
Definition: TOPGeoQBB.h:273
const TOPGeoSideRails & getSideRails() const
Returns side rails.
Definition: TOPGeoQBB.h:156
void setColdPlate(const TOPGeoColdPlate &coldPlate)
Sets forward cold plate.
Definition: TOPGeoQBB.h:96
void setPrismEnclosure(const TOPGeoPrismEnclosure &prismEnclosure)
Sets prism enclosure.
Definition: TOPGeoQBB.h:81
const TOPGeoColdPlate & getColdPlate() const
Returns cold plate.
Definition: TOPGeoQBB.h:174
double getSideRailsLength() const
Returns side rails length.
Definition: TOPGeoQBB.h:123
void setSideRails(const TOPGeoSideRails &sideRails)
Sets side rails.
Definition: TOPGeoQBB.h:75
float m_prismPosition
position of prism-bar joint wrt QBB back
Definition: TOPGeoQBB.h:269
const TOPGeoHoneycombPanel & getInnerPanel() const
Returns inner honeycomb panel.
Definition: TOPGeoQBB.h:144
TOPGeoHoneycombPanel m_innerPanel
inner honeycomb panel
Definition: TOPGeoQBB.h:271
const TOPGeoHoneycombPanel & getOuterPanel() const
Returns outer honeycomb panel.
Definition: TOPGeoQBB.h:150
TOPGeoEndPlate m_endPlate
forward end plate
Definition: TOPGeoQBB.h:275
double getPrismPosition() const
Returns the position of prism-bar joint wrt QBB back.
Definition: TOPGeoQBB.h:132
TOPGeoColdPlate m_coldPlate
cold plate
Definition: TOPGeoQBB.h:276
const std::string & getMaterial() const
Returns the name of material inside QBB.
Definition: TOPGeoQBB.h:138
TOPGeoQBB()
Default constructor.
Definition: TOPGeoQBB.h:36
void setInnerPanel(const TOPGeoHoneycombPanel &innerPanel)
Sets inner honeycomb panel.
Definition: TOPGeoQBB.h:57
void setEndPlate(const TOPGeoEndPlate &endPlate)
Sets forward end plate.
Definition: TOPGeoQBB.h:90
float m_length
full length
Definition: TOPGeoQBB.h:268
double getLength() const
Returns full length.
Definition: TOPGeoQBB.h:117
float m_width
full width
Definition: TOPGeoQBB.h:267
double getPanelWidth() const
Returns panel width used in x-y contours of honeycomb panels.
Definition: TOPGeoQBB.h:108
Geometry parameters of side rails (simplified)
double getThickness() const
Returns thickness.
void printPrismEnclosureContour() const
Print prism enclosure contour (polygon) - for debugging.
Definition: TOPGeoQBB.cc:165
std::vector< std::pair< double, double > > getBackPlateContour() const
Returns prism enclosure back plate x-y contour.
Definition: TOPGeoQBB.cc:174
bool isConsistent() const override
Check for consistency of data members.
Definition: TOPGeoQBB.cc:230
std::vector< std::pair< double, double > > getPrismEnclosureContour() const
Returns prism enclosure wall x-y contour.
Definition: TOPGeoQBB.cc:139
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:86
void printInnerPanelContour() const
Print inner honeycomb panel contour (polygon) - for debugging.
Definition: TOPGeoQBB.cc:71
void printBackwardContour() const
Print backward contour (polygon) - for debugging.
Definition: TOPGeoQBB.cc:130
void printOuterPanelContour() const
Print outer honeycomb panel contour (polygon) - for debugging.
Definition: TOPGeoQBB.cc:97
virtual void print(const std::string &title="QBB geometry parameters") const override
Print the content of the class.
Definition: TOPGeoQBB.cc:246
std::vector< std::pair< double, double > > getFrontPlateContour() const
Returns prism enclosure front plate x-y contour.
Definition: TOPGeoQBB.cc:203
void printFrontPlateContour() const
Print prism enclosure front plate contour (polygon) - for debugging.
Definition: TOPGeoQBB.cc:221
std::vector< std::pair< double, double > > getOuterPanelContour() const
Returns outer honeycomb panel x-y contour.
Definition: TOPGeoQBB.cc:80
void printForwardContour() const
Print forward contour (polygon) - for debugging.
Definition: TOPGeoQBB.cc:45
std::vector< std::pair< double, double > > getForwardContour() const
Returns forward x-y contour.
Definition: TOPGeoQBB.cc:21
std::vector< std::pair< double, double > > getBackwardContour() const
Returns backward x-y contour.
Definition: TOPGeoQBB.cc:106
std::vector< std::pair< double, double > > getInnerPanelContour() const
Returns inner honeycomb panel x-y contour.
Definition: TOPGeoQBB.cc:54
void printBackPlateContour() const
Print prism enclosure back plate contour (polygon) - for debugging.
Definition: TOPGeoQBB.cc:194
Abstract base class for different kinds of events.