CMS 3D CMS Logo

Public Member Functions

DDI::EllipticalTube Class Reference

#include <EllipticalTube.h>

Inheritance diagram for DDI::EllipticalTube:
DDI::Solid

List of all members.

Public Member Functions

 EllipticalTube (double xSemiAxis, double ySemiAxis, double zHeight)
void stream (std::ostream &os) const
double volume () const
 Not as flexible and possibly less accurate than G4 volume.
 ~EllipticalTube ()

Detailed Description

Definition at line 10 of file EllipticalTube.h.


Constructor & Destructor Documentation

DDI::EllipticalTube::EllipticalTube ( double  xSemiAxis,
double  ySemiAxis,
double  zHeight 
) [inline]

Definition at line 13 of file EllipticalTube.h.

References DDI::Solid::p_.

     : Solid(ddellipticaltube)
    { 
      p_.push_back(xSemiAxis);
      p_.push_back(ySemiAxis);
      p_.push_back(zHeight);
    }  
DDI::EllipticalTube::~EllipticalTube ( ) [inline]

Definition at line 20 of file EllipticalTube.h.

{ }

Member Function Documentation

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

Reimplemented from DDI::Solid.

Definition at line 5 of file EllipticalTube.cc.

References DDI::Solid::p_.

{
   os << " xSemiAxis[cm]=" << p_[0]/cm
      << " ySemiAxis[cm]=" << p_[1]/cm
      << " zHeight[cm]=" << p_[2]/cm;

}
double DDI::EllipticalTube::volume ( void  ) const [virtual]

Not as flexible and possibly less accurate than G4 volume.

Reimplemented from DDI::Solid.

Definition at line 13 of file EllipticalTube.cc.

References Geom::pi().

                                       { 
  double volume(0.);
  // who cares major or minor axis? pi * a * b == pi * xhalf * yhalf
  // area of a slice.
  // we KNOW they are all cm... CMS uses cm
  double area(Geom::pi()*p_[0]*p_[1]);
  //volume is z * area.  I'm pretty sure :)
  volume = area * p_[2] * 2;
  return volume; 

}