CMS 3D CMS Logo

List of all members | Public Member Functions
DDI::Parallelepiped Class Reference

#include <Parallelepiped.h>

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

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. More...
 
 ~Parallelepiped ()
 
- Public Member Functions inherited from DDI::Solid
const std::vector< double > & parameters () const
 
void setParameters (std::vector< double > const &p)
 
DDSolidShape shape () const
 
 Solid ()
 
 Solid (DDSolidShape shape)
 
virtual ~Solid ()
 

Additional Inherited Members

- Protected Attributes inherited from DDI::Solid
std::vector< double > p_
 
DDSolidShape shape_
 

Detailed Description

Definition at line 13 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 16 of file Parallelepiped.h.

References DDI::Solid::p_.

19  {
20  p_.push_back(xHalf);
21  p_.push_back(yHalf);
22  p_.push_back(zHalf);
23  p_.push_back(alpha);
24  p_.push_back(theta);
25  p_.push_back(phi);
26  }
float alpha
Definition: AMPTWrapper.h:95
Geom::Theta< T > theta() const
Solid()
Definition: Solid.h:14
std::vector< double > p_
Definition: Solid.h:32
DDI::Parallelepiped::~Parallelepiped ( )
inline

Definition at line 27 of file Parallelepiped.h.

References stream(), and volume().

27 { }

Member Function Documentation

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

Reimplemented from DDI::Solid.

Definition at line 8 of file Parallelepiped.cc.

References DDI::Solid::p_.

Referenced by ~Parallelepiped().

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 }
std::vector< double > p_
Definition: Solid.h:32
double DDI::Parallelepiped::volume ( void  ) const
virtual

Not as flexible and possibly less accurate than G4 volume.

Reimplemented from DDI::Solid.

Definition at line 19 of file Parallelepiped.cc.

References DDI::Solid::p_.

Referenced by ~Parallelepiped().

19  {
20  double volume = p_[0]*p_[1]*p_[2]*8.0;
21  return volume;
22 }
std::vector< double > p_
Definition: Solid.h:32
double volume() const
Not as flexible and possibly less accurate than G4 volume.