Belle II Software  release-05-01-25
GeoOpticalSurface.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <TObject.h>
14 #include <vector>
15 #include <geometry/dbobjects/GeoMaterialProperty.h>
16 
17 namespace Belle2 {
23  class GeoOpticalSurface: public TObject {
24  public:
26  GeoOpticalSurface() = default;
28  GeoOpticalSurface(const std::string& name, int model, int finish, int type, double value): TObject(), m_name(name), m_model(model),
29  m_finish(finish), m_type(type), m_value(value) {}
31  void setName(const std::string& name) { m_name = name; }
33  void setModel(int model) { m_model = model; }
35  void setFinish(int finish) { m_finish = finish; }
37  void setType(int type) { m_type = type; }
39  void setValue(double value) { m_value = value; }
41  void addProperty(const GeoMaterialProperty& property) { m_properties.emplace_back(property); }
43  const std::string& getName() const { return m_name; }
45  int getModel() const { return m_model; }
47  int getFinish() const { return m_finish; }
49  int getType() const { return m_type; }
51  double getValue() const { return m_value; }
53  const std::vector<GeoMaterialProperty>& getProperties() const { return m_properties; }
56  bool hasProperties() const { return m_properties.size() > 0; }
57  private:
59  std::string m_name;
61  int m_model;
63  int m_finish;
65  int m_type;
67  double m_value;
69  std::vector<GeoMaterialProperty> m_properties;
72  };
74 }; // Belle2 namespace
Belle2::GeoOpticalSurface::m_properties
std::vector< GeoMaterialProperty > m_properties
properties of this material
Definition: GeoOpticalSurface.h:77
Belle2::GeoOpticalSurface::getProperties
const std::vector< GeoMaterialProperty > & getProperties() const
get all properties
Definition: GeoOpticalSurface.h:61
Belle2::GeoOpticalSurface::m_type
int m_type
type of the surface
Definition: GeoOpticalSurface.h:73
Belle2::GeoOpticalSurface::m_model
int m_model
model for the surface
Definition: GeoOpticalSurface.h:69
Belle2::GeoOpticalSurface::getName
const std::string & getName() const
get name of the optical surface
Definition: GeoOpticalSurface.h:51
Belle2::GeoOpticalSurface::addProperty
void addProperty(const GeoMaterialProperty &property)
add a property to the material
Definition: GeoOpticalSurface.h:49
Belle2::GeoOpticalSurface::m_value
double m_value
value for the surface condition
Definition: GeoOpticalSurface.h:75
Belle2::GeoMaterialProperty
Property of a material.
Definition: GeoMaterialProperty.h:29
Belle2::GeoOpticalSurface::setValue
void setValue(double value)
set value for the surface condition
Definition: GeoOpticalSurface.h:47
Belle2::GeoOpticalSurface::setName
void setName(const std::string &name)
set name of the optical surface
Definition: GeoOpticalSurface.h:39
Belle2::GeoOpticalSurface::ClassDef
ClassDef(GeoOpticalSurface, 1)
Add ROOT reflection info.
Belle2::GeoOpticalSurface::hasProperties
bool hasProperties() const
check if the material has at least one property
Definition: GeoOpticalSurface.h:64
Belle2::GeoOpticalSurface
Represent an optical finish of a surface.
Definition: GeoOpticalSurface.h:31
Belle2::GeoOpticalSurface::m_finish
int m_finish
finish of the surface
Definition: GeoOpticalSurface.h:71
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::GeoOpticalSurface::setType
void setType(int type)
set type of the surface
Definition: GeoOpticalSurface.h:45
Belle2::GeoOpticalSurface::setModel
void setModel(int model)
set model for the surface
Definition: GeoOpticalSurface.h:41
Belle2::GeoOpticalSurface::GeoOpticalSurface
GeoOpticalSurface()=default
empty constructor for ROOT
Belle2::GeoOpticalSurface::getValue
double getValue() const
get value for the surface condition
Definition: GeoOpticalSurface.h:59
Belle2::GeoOpticalSurface::m_name
std::string m_name
name of the optical surface
Definition: GeoOpticalSurface.h:67
Belle2::GeoOpticalSurface::getModel
int getModel() const
get model for the surface
Definition: GeoOpticalSurface.h:53
Belle2::GeoOpticalSurface::getFinish
int getFinish() const
get finish of the surface
Definition: GeoOpticalSurface.h:55
Belle2::GeoOpticalSurface::getType
int getType() const
get type of the surface
Definition: GeoOpticalSurface.h:57
Belle2::GeoOpticalSurface::setFinish
void setFinish(int finish)
set finish of the surface
Definition: GeoOpticalSurface.h:43