GeoModel - GeoModelCore
GeoTubs.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOTUBS_H
6 #define GEOMODELKERNEL_GEOTUBS_H
7 
8 #include "GeoModelKernel/GeoShape.h"
9 
10 class GeoTubs : public GeoShape
11 {
12  public:
13  GeoTubs (double RMin, double RMax, double ZHalfLength, double SPhi, double DPhi);
14 
15  // Returns the volume of the shape, for mass inventory
16  virtual double volume () const;
17 
18  // Returns the TUBS shape type, as a string.
19  virtual const std::string & type () const;
20 
21  // Returns the TUBS shape type, as a coded integer.
22  virtual ShapeType typeID () const;
23 
24  // Executes a GeoShapeAction
25  virtual void exec (GeoShapeAction *action) const;
26 
27  // For type identification.
28  static const std::string& getClassType ();
29 
30  // For type identification.
31  static ShapeType getClassTypeID ();
32 
33  // Minimum (inner) tube section radius.
34  const double& getRMin () const;
35 
36  // Maximum (outer) tube section radius.
37  const double& getRMax () const;
38 
39  // Tube section half-length in the z direction.
40  const double& getZHalfLength () const;
41 
42  // Starting angle of the tube section in radians.
43  const double& getSPhi () const;
44 
45  // Delta angle of the tube section in radians.
46  const double& getDPhi () const;
47 
48  protected:
49  virtual ~GeoTubs();
50 
51  private:
52  GeoTubs(const GeoTubs &right);
53  GeoTubs & operator=(const GeoTubs &right);
54 
55  static const std::string s_classType;
56  static const ShapeType s_classTypeID;
57 
58  double m_rMin;
59  double m_rMax;
60  double m_zHalfLength;
61  double m_sPhi;
62  double m_dPhi;
63 
64 };
65 
66 inline const std::string& GeoTubs::getClassType ()
67 {
68  return s_classType;
69 }
70 
71 inline ShapeType GeoTubs::getClassTypeID ()
72 {
73  return s_classTypeID;
74 }
75 
76 inline const double& GeoTubs::getRMin () const
77 {
78  return m_rMin;
79 }
80 
81 inline const double& GeoTubs::getRMax () const
82 {
83  return m_rMax;
84 }
85 
86 inline const double& GeoTubs::getZHalfLength () const
87 {
88  return m_zHalfLength;
89 }
90 
91 inline const double& GeoTubs::getSPhi () const
92 {
93  return m_sPhi;
94 }
95 
96 inline const double& GeoTubs::getDPhi () const
97 {
98  return m_dPhi;
99 }
100 
101 #endif
This class is a visitor for shapes. It allows a navigation of the boolean expression tree for shapes...
This class describes a Shape. Shapes will be able to do the following things:
Definition: GeoShape.h:38