Belle II Software  release-05-01-25
VXDGeoComponentPar.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Benjamin Schwenker *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 
13 #include <TObject.h>
14 #include <string>
15 #include <vector>
16 #include <vxd/dbobjects/VXDGeoPlacementPar.h>
17 
18 namespace Belle2 {
28  class VXDGeoComponentPar: public TObject {
29 
30  public:
32  VXDGeoComponentPar(const std::string& material = "", const std::string& color = "",
33  double width = 0, double width2 = 0, double length = 0, double height = 0, double angle = 0):
34  m_material(material), m_color(color), m_width(width), m_width2(width2), m_length(length),
35  m_height(height), m_angle(angle)
36  {}
37 
41  const std::string& getMaterial() const { return m_material; }
43  void setMaterial(const std::string& material) { m_material = material; }
45  const std::string& getColor() const { return m_color; }
47  void setColor(const std::string& color) {m_color = color; }
49  double getWidth() const { return m_width; }
51  void setWidth(double width) { m_width = width; m_width2 = 0; }
53  double getWidth2() const { return m_width2; }
55  void setWidth2(double width2) {m_width2 = width2; }
57  double getLength() const { return m_length; }
59  void setLength(double length) { m_length = length; }
61  double getHeight() const { return m_height; }
63  double& getHeight() { return m_height; }
65  void setHeight(double height) { m_height = height; }
67  double getAngle() const { return m_angle; }
69  void setAngle(double angle) { m_angle = angle; }
71  const std::vector<VXDGeoPlacementPar>& getSubComponents() const {return m_subComponents;}
73  void setSubComponents(const std::vector<VXDGeoPlacementPar>& components) { m_subComponents = components; }
74 
75 
76  private:
77 
78 
80  std::string m_material {""};
82  std::string m_color {""} ;
84  double m_width {0.};
86  double m_width2 {0.};
88  double m_length {0.};
90  double m_height {0.};
92  double m_angle {0.};
94  std::vector<VXDGeoPlacementPar> m_subComponents;
95 
98  };
100 } // end of namespace Belle2
101 
Belle2::VXDGeoComponentPar::setColor
void setColor(const std::string &color)
set the name of the color for the component
Definition: VXDGeoComponentPar.h:55
Belle2::VXDGeoComponentPar::~VXDGeoComponentPar
~VXDGeoComponentPar()
Destructor.
Definition: VXDGeoComponentPar.h:47
Belle2::VXDGeoComponentPar::setWidth2
void setWidth2(double width2)
set the width2 of the component
Definition: VXDGeoComponentPar.h:63
Belle2::VXDGeoComponentPar::setMaterial
void setMaterial(const std::string &material)
set the name of the Material for the component
Definition: VXDGeoComponentPar.h:51
Belle2::VXDGeoComponentPar::getSubComponents
const std::vector< VXDGeoPlacementPar > & getSubComponents() const
get sub components
Definition: VXDGeoComponentPar.h:79
Belle2::VXDGeoComponentPar::m_subComponents
std::vector< VXDGeoPlacementPar > m_subComponents
list of subcomponents
Definition: VXDGeoComponentPar.h:102
Belle2::VXDGeoComponentPar::setLength
void setLength(double length)
set the length of the component
Definition: VXDGeoComponentPar.h:67
Belle2::VXDGeoComponentPar::m_material
std::string m_material
Name of the material of the component.
Definition: VXDGeoComponentPar.h:88
Belle2::VXDGeoComponentPar::m_angle
double m_angle
angle of the component
Definition: VXDGeoComponentPar.h:100
Belle2::VXDGeoComponentPar::ClassDef
ClassDef(VXDGeoComponentPar, 5)
ClassDef, must be the last term before the closing {}.
Belle2::VXDGeoComponentPar::m_width
double m_width
width of the component
Definition: VXDGeoComponentPar.h:92
Belle2::VXDGeoComponentPar::setSubComponents
void setSubComponents(const std::vector< VXDGeoPlacementPar > &components)
set sub components
Definition: VXDGeoComponentPar.h:81
Belle2::VXDGeoComponentPar::getLength
double getLength() const
get the length of the component
Definition: VXDGeoComponentPar.h:65
Belle2::VXDGeoComponentPar::m_color
std::string m_color
Name of the color of the component.
Definition: VXDGeoComponentPar.h:90
Belle2::VXDGeoComponentPar::VXDGeoComponentPar
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.
Definition: VXDGeoComponentPar.h:40
Belle2::VXDGeoComponentPar::getColor
const std::string & getColor() const
get the name of the color for the component
Definition: VXDGeoComponentPar.h:53
Belle2::VXDGeoComponentPar::getMaterial
const std::string & getMaterial() const
get the name of the Material for the component
Definition: VXDGeoComponentPar.h:49
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::VXDGeoComponentPar::getWidth
double getWidth() const
get the width of the component
Definition: VXDGeoComponentPar.h:57
Belle2::VXDGeoComponentPar::getWidth2
double getWidth2() const
get the forward width of the component, 0 for rectangular
Definition: VXDGeoComponentPar.h:61
Belle2::VXDGeoComponentPar::getHeight
double getHeight() const
get the height of the component
Definition: VXDGeoComponentPar.h:69
Belle2::VXDGeoComponentPar::setHeight
void setHeight(double height)
set the height of the component
Definition: VXDGeoComponentPar.h:73
Belle2::VXDGeoComponentPar::m_width2
double m_width2
forward width of the component, 0 for recangular
Definition: VXDGeoComponentPar.h:94
Belle2::VXDGeoComponentPar
The Class for VXD geometry component.
Definition: VXDGeoComponentPar.h:36
Belle2::VXDGeoComponentPar::setWidth
void setWidth(double width)
set the width of the component.
Definition: VXDGeoComponentPar.h:59
Belle2::VXDGeoComponentPar::setAngle
void setAngle(double angle)
set the angle of the component
Definition: VXDGeoComponentPar.h:77
Belle2::VXDGeoComponentPar::getAngle
double getAngle() const
get the angle of the component
Definition: VXDGeoComponentPar.h:75
Belle2::VXDGeoComponentPar::m_length
double m_length
length of the component
Definition: VXDGeoComponentPar.h:96
Belle2::VXDGeoComponentPar::m_height
double m_height
height of the component
Definition: VXDGeoComponentPar.h:98