CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 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_.

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

Definition at line 24 of file Parallelepiped.h.

24 { }

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_.

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 }
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 18 of file Parallelepiped.cc.

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