GeoModel - GeoModelCore
GeoTube.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOTUBE_H
6 #define GEOMODELKERNEL_GEOTUBE_H
7 
8 #include "GeoModelKernel/GeoShape.h"
9 
10 class GeoTube : public GeoShape
11 {
12  public:
13  GeoTube (double RMin, double RMax, double ZHalfLength);
14 
15  // Returns the volume of the shape, for mass inventory
16  virtual double volume () const;
17 
18  // Returns the TUBE shape type, as a string.
19  virtual const std::string & type () const;
20 
21  // Returns the TUBE 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 radius.
34  const double& getRMin () const;
35 
36  // Maximum (outer) tube radius.
37  const double& getRMax () const;
38 
39  // Tube half-length in the z direction.
40  const double& getZHalfLength () const;
41 
42  protected:
43  //## Destructor (generated)
44  virtual ~GeoTube();
45 
46  private:
47  GeoTube(const GeoTube &right);
48  GeoTube & operator=(const GeoTube &right);
49 
50  static const std::string s_classType;
51  static const ShapeType s_classTypeID;
52 
53  double m_rMin;
54  double m_rMax;
55  double m_zHalfLength;
56 
57 };
58 
59 inline const std::string& GeoTube::getClassType ()
60 {
61  return s_classType;
62 }
63 
64 inline ShapeType GeoTube::getClassTypeID ()
65 {
66  return s_classTypeID;
67 }
68 
69 inline const double& GeoTube::getRMin () const
70 {
71  return m_rMin;
72 }
73 
74 inline const double& GeoTube::getRMax () const
75 {
76  return m_rMax;
77 }
78 
79 inline const double& GeoTube::getZHalfLength () const
80 {
81  return m_zHalfLength;
82 }
83 
84 #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