5 #include "GeoModelKernel/GeoPcon.h" 6 #include "GeoModelKernel/GeoShapeAction.h" 10 const std::string GeoPcon::s_classType =
"Pcon";
11 const ShapeType GeoPcon::s_classTypeID = 0x13;
13 GeoPcon::GeoPcon (
double SPhi,
double DPhi)
23 double GeoPcon::volume ()
const 26 throw std::runtime_error (
"Volume requested for incomplete polycone");
28 for (
size_t s = 0; s < getNPlanes () - 1; s++)
30 double fDz = fabs (getZPlane (s + 1) - getZPlane (s)) / 2.0;
31 double fRmin1 = getRMinPlane (s + 1);
32 double fRmin2 = getRMinPlane (s);
33 double fRmax1 = getRMaxPlane (s + 1);
34 double fRmax2 = getRMaxPlane (s);
36 (m_dPhi * (1./3)) * fDz * (fRmax1 * fRmax1 + fRmax2 * fRmax2 +
37 fRmax1 * fRmax2 - fRmin1 * fRmin1 -
38 fRmin2 * fRmin2 - fRmin1 * fRmin2);
43 const std::string & GeoPcon::type ()
const 48 ShapeType GeoPcon::typeID ()
const 53 void GeoPcon::addPlane (
double ZPlane,
double RMinPlane,
double RMaxPlane)
55 m_zPlane.push_back (ZPlane);
56 m_rMinPlane.push_back (RMinPlane);
57 m_rMaxPlane.push_back (RMaxPlane);
62 action->handlePcon(
this);
This class is a visitor for shapes. It allows a navigation of the boolean expression tree for shapes...