GeoModel - GeoModelCore
GeoTorus.cxx
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GeoModelKernel/GeoTorus.h"
6 #include "GeoModelKernel/GeoShapeAction.h"
7 
8 const std::string GeoTorus::s_classType = "Torus";
9 const ShapeType GeoTorus::s_classTypeID = 0x24;
10 
11 GeoTorus::GeoTorus (double Rmin, double Rmax, double Rtor, double SPhi, double DPhi)
12  : m_rMin (Rmin)
13  , m_rMax (Rmax)
14  , m_rTor(Rtor)
15  , m_sPhi (SPhi)
16  , m_dPhi (DPhi)
17 {
18 }
19 
20 
21 GeoTorus::~GeoTorus()
22 {
23 }
24 
25 //## Other Operations (implementation)
26 double GeoTorus::volume () const
27 {
28  return 8.0;
29 }
30 
31 const std::string & GeoTorus::type () const
32 {
33  return s_classType;
34 }
35 
36 ShapeType GeoTorus::typeID () const
37 {
38  return s_classTypeID;
39 }
40 
41 void GeoTorus::exec (GeoShapeAction *action) const
42 {
43  action->handleTorus(this);
44 }
This class is a visitor for shapes. It allows a navigation of the boolean expression tree for shapes...