CMS 3D CMS Logo

DDI::Torus Class Reference

#include <DetectorDescription/Core/src/Torus.h>

Inheritance diagram for DDI::Torus:

DDI::Solid

List of all members.

Public Member Functions

void stream (std::ostream &) const
 Torus (double pRMin, double pRMax, double pRTor, double pSPhi, double pDPhi)
double volume () const


Detailed Description

Definition at line 9 of file Torus.h.


Constructor & Destructor Documentation

DDI::Torus::Torus ( double  pRMin,
double  pRMax,
double  pRTor,
double  pSPhi,
double  pDPhi 
)

Definition at line 9 of file Torus.cc.

References DDI::Solid::p_.

00015  : Solid(ddtorus) 
00016 {                
00017   p_.push_back(pRMin); // ......... 0
00018   p_.push_back(pRMax); // ......... 1
00019   p_.push_back(pRTor); // ......... 2
00020   p_.push_back(pSPhi); // ......... 3
00021   p_.push_back(pDPhi); // ......... 4
00022 }


Member Function Documentation

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

Reimplemented from DDI::Solid.

Definition at line 25 of file Torus.cc.

References DDI::Solid::p_.

00026 {
00027   os << " rMin=" << p_[0]/cm
00028      << " rMax=" << p_[1]/deg
00029      << " rTor=" << p_[2]/deg
00030      << " sPhi=" << p_[3]/cm
00031      << " dPhi=" << p_[4]/cm;
00032 }

double DDI::Torus::volume (  )  const [virtual]

Reimplemented from DDI::Solid.

Definition at line 34 of file Torus.cc.

References DDI::Solid::p_, and pi.

00035 {
00036   double volume=0;
00037   
00038   /* use notation as described in documentation about geant 4 shapes */
00039   
00040   // From Geant4: { fCubicVolume = fDPhi*pi*fRtor*(fRmax*fRmax-fRmin*fRmin);
00041   
00042   volume = p_[4]*pi*p_[2]*(p_[1]*p_[1]-p_[0]*p_[0]);
00043   
00044   return volume;
00045 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:37:10 2009 for CMSSW by  doxygen 1.5.4