src
DetectorDescription
Core
src
EllipticalTube.cc
Go to the documentation of this file.
1
#include "
DetectorDescription/Core/interface/EllipticalTube.h
"
2
#include "
DataFormats/Math/interface/GeantUnits.h
"
3
4
#include <ostream>
5
6
using namespace
geant_units::operators
;
7
8
void
DDI::EllipticalTube::stream
(std::ostream& os)
const
{
9
os <<
" xSemiAxis[cm]="
<<
convertMmToCm
(p_[0]) <<
" ySemiAxis[cm]="
<<
convertMmToCm
(p_[1])
10
<<
" zHeight[cm]="
<<
convertMmToCm
(p_[2]);
11
}
12
13
double
DDI::EllipticalTube::volume
()
const
{
14
double
volume(0.);
15
// who cares major or minor axis? pi * a * b == pi * xhalf * yhalf
16
// area of a slice.
17
// we KNOW they are all cm... CMS uses cm
18
double
area
(1_pi * p_[0] * p_[1]);
19
//volume is z * area. I'm pretty sure :)
20
volume =
area
* p_[2] * 2;
21
return
volume;
22
}
DDI::EllipticalTube::volume
double volume() const override
Not as flexible and possibly less accurate than G4 volume.
Definition:
EllipticalTube.cc:13
custom_jme_cff.area
area
Definition:
custom_jme_cff.py:131
geant_units::operators
Definition:
GeantUnits.h:18
angle_units::operators::convertMmToCm
constexpr NumType convertMmToCm(NumType millimeters)
Definition:
angle_units.h:44
DDI::EllipticalTube::stream
void stream(std::ostream &os) const override
Definition:
EllipticalTube.cc:8
GeantUnits.h
EllipticalTube.h
Generated for CMSSW Reference Manual by
1.8.14