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
3
#include <ostream>
4
5
#include "CLHEP/Units/GlobalSystemOfUnits.h"
6
#include "CLHEP/Units/SystemOfUnits.h"
7
#include "
DataFormats/GeometryVector/interface/Pi.h
"
8
9
void
DDI::EllipticalTube::stream
(std::ostream & os)
const
10
{
11
os <<
" xSemiAxis[cm]="
<<
p_
[0]/cm
12
<<
" ySemiAxis[cm]="
<<
p_
[1]/cm
13
<<
" zHeight[cm]="
<<
p_
[2]/cm;
14
15
}
16
17
double
DDI::EllipticalTube::volume
()
const
{
18
double
volume
(0.);
19
// who cares major or minor axis? pi * a * b == pi * xhalf * yhalf
20
// area of a slice.
21
// we KNOW they are all cm... CMS uses cm
22
double
area(
Geom::pi
()*
p_
[0]*
p_
[1]);
23
//volume is z * area. I'm pretty sure :)
24
volume = area * p_[2] * 2;
25
return
volume
;
26
27
}
DDI::EllipticalTube::stream
void stream(std::ostream &os) const
Definition:
EllipticalTube.cc:9
DDI::EllipticalTube::volume
double volume() const
Not as flexible and possibly less accurate than G4 volume.
Definition:
EllipticalTube.cc:17
Pi.h
EllipticalTube.h
DDI::Solid::p_
std::vector< double > p_
Definition:
Solid.h:32
Geom::pi
constexpr double pi()
Definition:
Pi.h:31
Generated for CMSSW Reference Manual by
1.8.11