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
double
DDI::EllipticalTube::volume
()
const
{
17
double
volume
(0.);
18
// who cares major or minor axis? pi * a * b == pi * xhalf * yhalf
19
// area of a slice.
20
// we KNOW they are all cm... CMS uses cm
21
double
area
(
Geom::pi
()*
p_
[0]*
p_
[1]);
22
//volume is z * area. I'm pretty sure :)
23
volume = area * p_[2] * 2;
24
return
volume
;
25
26
}
DDI::EllipticalTube::stream
void stream(std::ostream &os) const override
Definition:
EllipticalTube.cc:9
DDI::EllipticalTube::volume
double volume() const override
Not as flexible and possibly less accurate than G4 volume.
Definition:
EllipticalTube.cc:16
Pi.h
EllipticalTube.h
DDI::Solid::p_
std::vector< double > p_
Definition:
Solid.h:32
jets_cff.area
area
Definition:
jets_cff.py:185
Geom::pi
constexpr double pi()
Definition:
Pi.h:31
Generated for CMSSW Reference Manual by
1.8.11