CMS 3D CMS Logo

Orb.h
Go to the documentation of this file.
1 #ifndef DDI_Orb_h
2 #define DDI_Orb_h
3 
5 #include <iosfwd>
6 #include <vector>
7 
9 #include "Solid.h"
10 
11 namespace DDI {
12 
13  class Orb : public Solid
14  {
15  public:
16  Orb(double rMax)
17  : Solid(ddorb)
18  {
19  p_.emplace_back(rMax);
20  }
21  ~Orb() override { }
22 
23  double volume() const override { return (4.*Geom::pi()*p_[0]*p_[0]*p_[0])/3.; }
24  void stream(std::ostream & os) const override;
25  };
26 
27 }
28 #endif // DDI_Orb_h
void stream(std::ostream &os) const override
Definition: Orb.cc:8
Definition: Orb.h:13
Orb(double rMax)
Definition: Orb.h:16
std::vector< double > p_
Definition: Solid.h:32
double volume() const override
Definition: Orb.h:23
constexpr double pi()
Definition: Pi.h:31
~Orb() override
Definition: Orb.h:21