11 using namespace geant_units::operators;
14 const std::vector<double>& y,
15 const std::vector<double>& z,
16 const std::vector<double>& zx,
17 const std::vector<double>& zy,
18 const std::vector<double>& zscale)
20 assert(x.size() == y.size());
21 assert(z.size() == zx.size());
22 assert(z.size() == zy.size());
23 assert(z.size() == zscale.size());
25 p_.reserve(x.size() + y.size() + z.size() + zx.size() + zy.size() + zscale.size() + 1);
26 p_.emplace_back(z.size());
27 p_.insert(
p_.end(), x.begin(), x.end());
28 p_.insert(
p_.end(), y.begin(), y.end());
29 p_.insert(
p_.end(), z.begin(), z.end());
30 p_.insert(
p_.end(), zx.begin(), zx.end());
31 p_.insert(
p_.end(), zy.begin(), zy.end());
32 p_.insert(
p_.end(), zscale.begin(), zscale.end());
42 auto xysize = (
unsigned int)((p_.size() - 4 * p_[0]) * 0.5);
43 os <<
" XY Points[cm]=";
44 for (
unsigned int k = 1;
k <= xysize; ++
k)
46 os <<
" with " << p_[0] <<
" Z sections:";
47 unsigned int m0 = p_.size() - 4 * p_[0];
48 for (
unsigned int m = m0;
m < m0 + p_[0]; ++
m) {
52 os <<
", scale[cm]=" <<
convertMmToCm(p_[m + 3 * p_[0]]) <<
";";
void stream(std::ostream &) const override
double volume() const override
constexpr NumType convertMmToCm(NumType millimeters)