#include <DetectorDescription/Core/src/Tubs.h>
Public Member Functions | |
void | stream (std::ostream &) const |
Tubs (double zhalf, double rIn, double rOut, double startPhi, double deltaPhi) | |
double | volume () const |
Definition at line 9 of file Tubs.h.
DDI::Tubs::Tubs | ( | double | zhalf, | |
double | rIn, | |||
double | rOut, | |||
double | startPhi, | |||
double | deltaPhi | |||
) |
void DDI::Tubs::stream | ( | std::ostream & | os | ) | const [virtual] |
Reimplemented from DDI::Solid.
Definition at line 25 of file Tubs.cc.
References DDI::Solid::p_.
00026 { 00027 os << " zhalf=" << p_[0]/cm 00028 << " rIn=" << p_[1]/cm 00029 << " rOut=" << p_[2]/cm 00030 << " startPhi=" << p_[3]/deg 00031 << " deltaPhi=" << p_[4]/deg; 00032 }
double DDI::Tubs::volume | ( | ) | const [virtual] |
Reimplemented from DDI::Solid.
Definition at line 35 of file Tubs.cc.
References DDI::Solid::p_, phi, pi, and z.
00036 { 00037 double volume=0; 00038 double z=2.*p_[0]; 00039 double rIn=p_[1]; 00040 double rOut=p_[2]; 00041 double phi=p_[4]/rad; 00042 00043 double volume1=pi*rIn*rIn*z; 00044 double volume2=pi*rOut*rOut*z; 00045 00046 double slice=fabs(phi/(2*pi)); 00047 00048 volume=slice*(volume2-volume1); 00049 00050 return volume; 00051 }