Solid

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#ifndef DDI_Solid_h
#define DDI_Solid_h

#include <iosfwd>
#include <vector>
#include "DetectorDescription/Core/interface/DDSolidShapes.h"

namespace DDI {

  class Solid {
  public:
    Solid() : shape_(DDSolidShape::dd_not_init) {}

    Solid(DDSolidShape shape) : shape_(shape) {}

    virtual ~Solid() {}

    const std::vector<double> &parameters() const { return p_; }

    virtual double volume() const { return 0; }

    DDSolidShape shape() const { return shape_; }

    virtual void stream(std::ostream &) const;

    void setParameters(std::vector<double> const &p) { p_ = p; }

  protected:
    DDSolidShape shape_;
    std::vector<double> p_;
  };
}  // namespace DDI

#endif  // DDI_Solid_h