GeoModel - GeoModelCore
GeoPara.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOPARA_H
6 #define GEOMODELKERNEL_GEOPARA_H
7 
8 #include "GeoModelKernel/GeoShape.h"
9 
10 class GeoPara : public GeoShape
11 {
12  public:
13  // Constructor for the BOX.
14  GeoPara (double XHalfLength, double YHalfLength, double ZHalfLength, double Alpha, double Theta, double Phi);
15 
16  // Returns the volume of the shape, for mass inventory
17  virtual double volume () const;
18 
19  // Returns the PARA shape type, as a string.
20  virtual const std::string & type () const;
21 
22  // Returns the PARA shape type, as a coded integer.
23  virtual ShapeType typeID () const;
24 
25  // Executes a GeoShapeAction
26  virtual void exec (GeoShapeAction *action) const;
27 
28  // For type identification.
29  static const std::string& getClassType ();
30 
31  // For type identification.
32  static ShapeType getClassTypeID ();
33 
34  // Half length in the x-direction.
35  const double& getXHalfLength () const;
36 
37  // Half-length in the y direction.
38  const double& getYHalfLength () const;
39 
40  // Half-length in the z direction.
41  const double& getZHalfLength () const;
42 
43  // Polar (theta) angle.
44  const double& getTheta () const;
45 
46  // The angle alpha...between the two sides of the top face
47  // of the parallelapiped.
48  const double& getAlpha () const;
49 
50  // Azimuthal (phi) angle.
51  const double& getPhi () const;
52 
53  protected:
54  virtual ~GeoPara();
55 
56  private:
57  GeoPara(const GeoPara &right);
58  GeoPara & operator=(const GeoPara &right);
59 
60  static const std::string s_classType;
61  static const ShapeType s_classTypeID;
62 
63  double m_xHalfLength;
64  double m_yHalfLength;
65  double m_zHalfLength;
66  double m_theta;
67  double m_alpha;
68  double m_phi;
69 };
70 
71 inline const std::string& GeoPara::getClassType ()
72 {
73  return s_classType;
74 }
75 
76 inline ShapeType GeoPara::getClassTypeID ()
77 {
78  return s_classTypeID;
79 }
80 
81 inline const double& GeoPara::getXHalfLength () const
82 {
83  return m_xHalfLength;
84 }
85 
86 inline const double& GeoPara::getYHalfLength () const
87 {
88  return m_yHalfLength;
89 }
90 
91 inline const double& GeoPara::getZHalfLength () const
92 {
93  return m_zHalfLength;
94 }
95 
96 inline const double& GeoPara::getTheta () const
97 {
98  return m_theta;
99 }
100 
101 inline const double& GeoPara::getAlpha () const
102 {
103  return m_alpha;
104 }
105 
106 inline const double& GeoPara::getPhi () const
107 {
108  return m_phi;
109 }
110 
111 #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