GeoModel - GeoModelCore
GeoTrd.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOTRD_H
6 #define GEOMODELKERNEL_GEOTRD_H
7 
8 #include "GeoModelKernel/GeoShape.h"
9 
10 class GeoTrd : public GeoShape
11 {
12  public:
13  GeoTrd (double XHalfLength1, double XHalfLength2, double YHalfLength1, double YHalfLength2, double ZHalfLength);
14 
15  // Returns the volume of the shape, for mass inventory
16  virtual double volume () const;
17 
18  // Returns the TRD shape type, as a string.
19  virtual const std::string & type () const;
20 
21  // Returns the TRD 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  // Half length in the x-direction at -dz.
34  const double& getXHalfLength1 () const;
35 
36  // Half length in the x-direction at +dz
37  const double& getXHalfLength2 () const;
38 
39  // Half-length in the y direction at +dz.
40  const double& getYHalfLength1 () const;
41 
42  // Half-length in the y direction at -dz
43  const double& getYHalfLength2 () const;
44 
45  // Half-length in the z direction.
46  const double& getZHalfLength () const;
47 
48  protected:
49  virtual ~GeoTrd();
50 
51  private:
52  GeoTrd(const GeoTrd &right);
53  GeoTrd & operator=(const GeoTrd &right);
54 
55  static const std::string s_classType;
56  static const ShapeType s_classTypeID;
57 
58  double m_xHalfLength1;
59  double m_xHalfLength2;
60  double m_yHalfLength1;
61  double m_yHalfLength2;
62  double m_zHalfLength;
63 
64 };
65 
66 inline const std::string& GeoTrd::getClassType ()
67 {
68  return s_classType;
69 }
70 
71 inline ShapeType GeoTrd::getClassTypeID ()
72 {
73  return s_classTypeID;
74 }
75 
76 inline const double& GeoTrd::getXHalfLength1 () const
77 {
78  return m_xHalfLength1;
79 }
80 
81 inline const double& GeoTrd::getXHalfLength2 () const
82 {
83  return m_xHalfLength2;
84 }
85 
86 inline const double& GeoTrd::getYHalfLength1 () const
87 {
88  return m_yHalfLength1;
89 }
90 
91 inline const double& GeoTrd::getYHalfLength2 () const
92 {
93  return m_yHalfLength2;
94 }
95 
96 inline const double& GeoTrd::getZHalfLength () const
97 {
98  return m_zHalfLength;
99 }
100 
101 #endif
Definition: GeoTrd.h:10
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