Main Page
Namespaces
Classes
Package Documentation
DetectorDescription
Core
src
EllipticalTube.cc
Go to the documentation of this file.
1
#include "
DetectorDescription/Core/src/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
{
10
os <<
" xSemiAxis[cm]="
<<
convertMmToCm
( p_[0] )
11
<<
" ySemiAxis[cm]="
<<
convertMmToCm
( p_[1] )
12
<<
" zHeight[cm]="
<<
convertMmToCm
( p_[2] );
13
}
14
15
double
DDI::EllipticalTube::volume
()
const
{
16
double
volume(0.);
17
// who cares major or minor axis? pi * a * b == pi * xhalf * yhalf
18
// area of a slice.
19
// we KNOW they are all cm... CMS uses cm
20
double
area
(1_pi*p_[0]*p_[1]);
21
//volume is z * area. I'm pretty sure :)
22
volume = area * p_[2] * 2;
23
return
volume;
24
}
DDI::EllipticalTube::stream
void stream(std::ostream &os) const override
Definition:
EllipticalTube.cc:8
DDI::EllipticalTube::volume
double volume() const override
Not as flexible and possibly less accurate than G4 volume.
Definition:
EllipticalTube.cc:15
custom_jme_cff.area
area
Definition:
custom_jme_cff.py:134
geant_units::operators
Definition:
GeantUnits.h:21
GeantUnits.h
EllipticalTube.h
geant_units::operators::convertMmToCm
constexpr NumType convertMmToCm(NumType millimeters)
Definition:
GeantUnits.h:110
Generated for CMSSW Reference Manual by
1.8.11