GeoModel - GeoModelCore
GeoTrap.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOTRAP_H
6 #define GEOMODELKERNEL_GEOTRAP_H
7 
14 #include "GeoModelKernel/GeoShape.h"
15 
16 class GeoTrap : public GeoShape
17 {
18  public:
19  GeoTrap (double ZHalfLength, double Theta, double Phi, double Dydzn, double Dxdyndzn, double Dxdypdzn, double Angleydzn, double Dydzp, double Dxdyndzp, double Dxdypdzp, double Angleydzp);
20 
21  // Returns the volume of the shape, for mass inventory
22  virtual double volume () const;
23 
24  // Returns the TRAP shape type, as a string.
25  virtual const std::string & type () const;
26 
27  // Returns the TRAP shape type, as a coded integer.
28  virtual ShapeType typeID () const;
29 
30  // Executes a GeoShapeAction
31  virtual void exec (GeoShapeAction *action) const;
32 
33  // For type identification.
34  static const std::string& getClassType ();
35 
36  // For type identification.
37  static ShapeType getClassTypeID ();
38 
39  // Z half length.
40  const double& getZHalfLength () const;
41 
42  // Polar (theta) angle.
43  const double& getTheta () const;
44 
45  // Azimuthal (phi) angle.
46  const double& getPhi () const;
47 
48  // Y half length at -z.
49  const double& getDydzn () const;
50 
51  // X half length at -z, -y.
52  const double& getDxdyndzn () const;
53 
54  // X half length at -z, +y
55  const double& getDxdypdzn () const;
56 
57  const double& getAngleydzn () const;
58 
59  // Y half length at +z.
60  const double& getDydzp () const;
61 
62  // X half length at +z, -y
63  const double& getDxdyndzp () const;
64 
65  // X half length at +z, +y
66  const double& getDxdypdzp () const;
67 
68  const double& getAngleydzp () const;
69 
70  protected:
71  virtual ~GeoTrap();
72 
73  private:
74  GeoTrap(const GeoTrap &right);
75  GeoTrap & operator=(const GeoTrap &right);
76 
77  static const std::string s_classType;
78  static const ShapeType s_classTypeID;
79 
80  double m_zHalfLength;
81  double m_theta;
82  double m_phi;
83  double m_dydzn;
84  double m_dxdyndzn;
85  double m_dxdypdzn;
86  double m_angleydzn;
87  double m_dydzp;
88  double m_dxdyndzp;
89  double m_dxdypdzp;
90  double m_angleydzp;
91 
92 };
93 
94 inline const std::string& GeoTrap::getClassType ()
95 {
96  return s_classType;
97 }
98 
99 inline ShapeType GeoTrap::getClassTypeID ()
100 {
101  return s_classTypeID;
102 }
103 
104 inline const double& GeoTrap::getZHalfLength () const
105 {
106  return m_zHalfLength;
107 }
108 
109 inline const double& GeoTrap::getTheta () const
110 {
111  return m_theta;
112 }
113 
114 inline const double& GeoTrap::getPhi () const
115 {
116  return m_phi;
117 }
118 
119 inline const double& GeoTrap::getDydzn () const
120 {
121  return m_dydzn;
122 }
123 
124 inline const double& GeoTrap::getDxdyndzn () const
125 {
126  return m_dxdyndzn;
127 }
128 
129 inline const double& GeoTrap::getDxdypdzn () const
130 {
131  return m_dxdypdzn;
132 }
133 
134 inline const double& GeoTrap::getAngleydzn () const
135 {
136  return m_angleydzn;
137 }
138 
139 inline const double& GeoTrap::getDydzp () const
140 {
141  return m_dydzp;
142 }
143 
144 inline const double& GeoTrap::getDxdyndzp () const
145 {
146  return m_dxdyndzp;
147 }
148 
149 inline const double& GeoTrap::getDxdypdzp () const
150 {
151  return m_dxdypdzp;
152 }
153 
154 inline const double& GeoTrap::getAngleydzp () const
155 {
156  return m_angleydzp;
157 }
158 
159 #endif
This shape represents a very general trapezoid.
Definition: GeoTrap.h:16
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