CMS 3D CMS Logo

Public Member Functions

DDI::Parallelepiped Class Reference

#include <Parallelepiped.h>

Inheritance diagram for DDI::Parallelepiped:
DDI::Solid

List of all members.

Public Member Functions

 Parallelepiped (double xHalf, double yHalf, double zHalf, double alpha, double theta, double phi)
void stream (std::ostream &os) const
double volume () const
 Not as flexible and possibly less accurate than G4 volume.
 ~Parallelepiped ()

Detailed Description

Definition at line 10 of file Parallelepiped.h.


Constructor & Destructor Documentation

DDI::Parallelepiped::Parallelepiped ( double  xHalf,
double  yHalf,
double  zHalf,
double  alpha,
double  theta,
double  phi 
) [inline]

Definition at line 13 of file Parallelepiped.h.

References DDI::Solid::p_.

     : Solid(ddparallelepiped)
    { 
      p_.push_back(xHalf);
      p_.push_back(yHalf);
      p_.push_back(zHalf);
      p_.push_back(alpha);
      p_.push_back(theta);
      p_.push_back(phi);
    }  
DDI::Parallelepiped::~Parallelepiped ( ) [inline]

Definition at line 24 of file Parallelepiped.h.

{ }

Member Function Documentation

void DDI::Parallelepiped::stream ( std::ostream &  os) const [virtual]

Reimplemented from DDI::Solid.

Definition at line 7 of file Parallelepiped.cc.

References DDI::Solid::p_.

{
   os << " xhalf[cm]=" << p_[0]/cm
      << " yhalf[cm]=" << p_[1]/cm
      << " zhalf[cm]=" << p_[2]/cm
      << " alpha[deg]=" << p_[3]/deg
      << " theta[deg]=" << p_[4]/deg
      << " phi[deg]=" << p_[5]/deg;

}
double DDI::Parallelepiped::volume ( ) const [virtual]

Not as flexible and possibly less accurate than G4 volume.

Reimplemented from DDI::Solid.

Definition at line 18 of file Parallelepiped.cc.

                                       { 
  double volume = p_[0]*p_[1]*p_[2]*8.0;
  return volume; 
}