Belle II Software development
VXDGeoComponentPar.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#pragma once
9
10
11#include <TObject.h>
12#include <string>
13#include <vector>
14#include <vxd/dbobjects/VXDGeoPlacementPar.h>
15
16namespace Belle2 {
26 class VXDGeoComponentPar: public TObject {
27
28 public:
30 VXDGeoComponentPar(const std::string& material = "", const std::string& color = "",
31 double width = 0, double width2 = 0, double length = 0, double height = 0, double angle = 0):
32 m_material(material), m_color(color), m_width(width), m_width2(width2), m_length(length),
33 m_height(height), m_angle(angle)
34 {}
35
39 const std::string& getMaterial() const { return m_material; }
41 void setMaterial(const std::string& material) { m_material = material; }
43 const std::string& getColor() const { return m_color; }
45 void setColor(const std::string& color) {m_color = color; }
47 double getWidth() const { return m_width; }
49 void setWidth(double width) { m_width = width; m_width2 = 0; }
51 double getWidth2() const { return m_width2; }
53 void setWidth2(double width2) {m_width2 = width2; }
55 double getLength() const { return m_length; }
57 void setLength(double length) { m_length = length; }
59 double getHeight() const { return m_height; }
61 double& getHeight() { return m_height; }
63 void setHeight(double height) { m_height = height; }
65 double getAngle() const { return m_angle; }
67 void setAngle(double angle) { m_angle = angle; }
69 const std::vector<VXDGeoPlacementPar>& getSubComponents() const {return m_subComponents;}
71 void setSubComponents(const std::vector<VXDGeoPlacementPar>& components) { m_subComponents = components; }
72
73
74 private:
75
76
78 std::string m_material {""};
80 std::string m_color {""} ;
82 double m_width {0.};
84 double m_width2 {0.};
86 double m_length {0.};
88 double m_height {0.};
90 double m_angle {0.};
92 std::vector<VXDGeoPlacementPar> m_subComponents;
93
96 };
98} // end of namespace Belle2
99
The Class for VXD geometry component.
double getWidth() const
get the width of the component
double getHeight() const
get the height of the component
const std::vector< VXDGeoPlacementPar > & getSubComponents() const
get sub components
std::vector< VXDGeoPlacementPar > m_subComponents
list of subcomponents
std::string m_material
Name of the material of the component.
void setMaterial(const std::string &material)
set the name of the Material for the component
void setAngle(double angle)
set the angle of the component
double m_width2
forward width of the component, 0 for recangular
double m_width
width of the component
double & getHeight()
get the height of the component
void setColor(const std::string &color)
set the name of the color for the component
void setSubComponents(const std::vector< VXDGeoPlacementPar > &components)
set sub components
ClassDef(VXDGeoComponentPar, 5)
ClassDef, must be the last term before the closing {}.
void setLength(double length)
set the length of the component
const std::string & getColor() const
get the name of the color for the component
double getAngle() const
get the angle of the component
double getWidth2() const
get the forward width of the component, 0 for rectangular
std::string m_color
Name of the color of the component.
void setHeight(double height)
set the height of the component
void setWidth(double width)
set the width of the component.
void setWidth2(double width2)
set the width2 of the component
const std::string & getMaterial() const
get the name of the Material for the component
double m_length
length of the component
double m_angle
angle of the component
double m_height
height of the component
double getLength() const
get the length of the component
VXDGeoComponentPar(const std::string &material="", const std::string &color="", double width=0, double width2=0, double length=0, double height=0, double angle=0)
Constructor.
Abstract base class for different kinds of events.