#include <Tubs.h>
List of all members.
Public Member Functions |
void | stream (std::ostream &) const |
| Tubs (double zhalf, double rIn, double rOut, double startPhi, double deltaPhi) |
double | volume () const |
Detailed Description
Definition at line 9 of file Tubs.h.
Constructor & Destructor Documentation
DDI::Tubs::Tubs |
( |
double |
zhalf, |
|
|
double |
rIn, |
|
|
double |
rOut, |
|
|
double |
startPhi, |
|
|
double |
deltaPhi |
|
) |
| |
Member Function Documentation
void DDI::Tubs::stream |
( |
std::ostream & |
os | ) |
const [virtual] |
Reimplemented from DDI::Solid.
Definition at line 25 of file Tubs.cc.
{
os << " zhalf=" << p_[0]/cm
<< " rIn=" << p_[1]/cm
<< " rOut=" << p_[2]/cm
<< " startPhi=" << p_[3]/deg
<< " deltaPhi=" << p_[4]/deg;
}
double DDI::Tubs::volume |
( |
| ) |
const [virtual] |
Reimplemented from DDI::Solid.
Definition at line 35 of file Tubs.cc.
References phi, pi, and z.
{
double volume=0;
double z=2.*p_[0];
double rIn=p_[1];
double rOut=p_[2];
double phi=p_[4]/rad;
double volume1=pi*rIn*rIn*z;
double volume2=pi*rOut*rOut*z;
double slice=fabs(phi/(2*pi));
volume=slice*(volume2-volume1);
return volume;
}