CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Parallelepiped.cc
Go to the documentation of this file.
2 #include "CLHEP/Units/GlobalSystemOfUnits.h"
3 
4 #include <ostream>
5 #include <cmath>
6 
7 void DDI::Parallelepiped::stream(std::ostream & os) const
8 {
9  os << " xhalf[cm]=" << p_[0]/cm
10  << " yhalf[cm]=" << p_[1]/cm
11  << " zhalf[cm]=" << p_[2]/cm
12  << " alpha[deg]=" << p_[3]/deg
13  << " theta[deg]=" << p_[4]/deg
14  << " phi[deg]=" << p_[5]/deg;
15 
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
std::vector< double > p_
Definition: Solid.h:32
double volume() const
Not as flexible and possibly less accurate than G4 volume.