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 
19 double DDI::Parallelepiped::volume() const {
20  double volume = p_[0]*p_[1]*p_[2]*8.0;
21  return volume;
22 }
void stream(std::ostream &os) const
std::vector< double > p_
Definition: Solid.h:32
double volume() const
Not as flexible and possibly less accurate than G4 volume.