CMS 3D CMS Logo

Parallelepiped.cc
Go to the documentation of this file.
2 
3 #include <ostream>
4 
5 #include "CLHEP/Units/GlobalSystemOfUnits.h"
6 #include "CLHEP/Units/SystemOfUnits.h"
7 
8 void DDI::Parallelepiped::stream(std::ostream & os) const
9 {
10  os << " xhalf[cm]=" << p_[0]/cm
11  << " yhalf[cm]=" << p_[1]/cm
12  << " zhalf[cm]=" << p_[2]/cm
13  << " alpha[deg]=" << p_[3]/deg
14  << " theta[deg]=" << p_[4]/deg
15  << " phi[deg]=" << p_[5]/deg;
16 }
17 
18 double DDI::Parallelepiped::volume() const {
19  double volume = p_[0]*p_[1]*p_[2]*8.0;
20  return volume;
21 }
void stream(std::ostream &os) const override
std::vector< double > p_
Definition: Solid.h:32
double volume() const override
Not as flexible and possibly less accurate than G4 volume.