3 #include "CLHEP/Units/GlobalSystemOfUnits.h"
16 p_.push_back(innerRadius);
17 p_.push_back(outerRadius);
18 p_.push_back(startPhi);
19 p_.push_back(deltaPhi);
20 p_.push_back(startTheta);
21 p_.push_back(deltaTheta);
27 os <<
" innerRadius=" << p_[0]/cm
28 <<
" outerRadius=" << p_[1]/cm
29 <<
" startPhi=" << p_[2]/deg
30 <<
" deltaPhi=" << p_[3]/deg
31 <<
" startTheta=" << p_[4]/deg
32 <<
" deltaTheta=" << p_[5]/deg;
39 volume = std::fabs((p_[1]*p_[1]*p_[1] - p_[0]*p_[0]*p_[0])/3. * (
std::cos(p_[4]+p_[5]) -
std::cos(p_[4]))*p_[3]);
40 }
else if (std::fabs(p_[3]) <= 2.*
Geom::pi() && std::fabs(p_[5]) >
Geom::pi() ) {
41 volume = std::fabs((p_[1]*p_[1]*p_[1] - p_[0]*p_[0]*p_[0])/3. * (
std::cos(p_[4]+p_[5]-180.*deg) -
std::cos(p_[4]))*p_[3]);
42 }
else if (std::fabs(p_[3]) > 2.*
Geom::pi() && std::fabs(p_[5]) <=
Geom::pi() ) {
43 volume = std::fabs((p_[1]*p_[1]*p_[1] - p_[0]*p_[0]*p_[0])/3. * (
std::cos(p_[4]+p_[5]) -
std::cos(p_[4]))*(p_[3]-p_[2]));
Sphere(double innerRadius, double outerRadius, double startPhi, double deltaPhi, double startZ, double deltaZ)
Cos< T >::type cos(const T &t)
void stream(std::ostream &) const