CMS 3D CMS Logo

Ellipsoid.h
Go to the documentation of this file.
1 #ifndef DDI_Ellipsoid_h
2 #define DDI_Ellipsoid_h
3 
5 #include <iosfwd>
6 #include <vector>
7 
9 #include "Solid.h"
10 
11 namespace DDI {
12 
13  class Ellipsoid : public Solid
14  {
15  public:
16  Ellipsoid(double xSemiAxis,
17  double ySemiAxis,
18  double zSemiAxis,
19  double zBottomCut=0,
20  double zTopCut=0
21  )
23  {
24  p_.emplace_back(xSemiAxis);
25  p_.emplace_back(ySemiAxis);
26  p_.emplace_back(zSemiAxis);
27  p_.emplace_back(zBottomCut);
28  p_.emplace_back(zTopCut);
29  }
30  ~Ellipsoid() override { }
31 
33  double volume() const override ;
34  double halfVol (double dz, double maxz) const;
35  void stream(std::ostream & os) const override;
36  };
37 
38 }
39 #endif // DDI_Ellipsoid_h
void stream(std::ostream &os) const override
Definition: Ellipsoid.cc:11
double halfVol(double dz, double maxz) const
Definition: Ellipsoid.cc:20
~Ellipsoid() override
Definition: Ellipsoid.h:30
Ellipsoid(double xSemiAxis, double ySemiAxis, double zSemiAxis, double zBottomCut=0, double zTopCut=0)
Definition: Ellipsoid.h:16
std::vector< double > p_
Definition: Solid.h:32
double volume() const override
Not as flexible and possibly less accurate than G4 volume.
Definition: Ellipsoid.cc:50