test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
DetectorDescription
Core
src
EllipticalTube.cc
Go to the documentation of this file.
1
#include "
DetectorDescription/Core/src/EllipticalTube.h
"
2
#include "CLHEP/Units/GlobalSystemOfUnits.h"
3
#include <ostream>
4
5
void
DDI::EllipticalTube::stream
(std::ostream & os)
const
6
{
7
os <<
" xSemiAxis[cm]="
<<
p_
[0]/cm
8
<<
" ySemiAxis[cm]="
<<
p_
[1]/cm
9
<<
" zHeight[cm]="
<<
p_
[2]/cm;
10
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(
Geom::pi
()*p_[0]*p_[1]);
19
//volume is z * area. I'm pretty sure :)
20
volume = area * p_[2] * 2;
21
return
volume;
22
23
}
DDI::EllipticalTube::stream
void stream(std::ostream &os) const
Definition:
EllipticalTube.cc:5
DDI::EllipticalTube::volume
double volume() const
Not as flexible and possibly less accurate than G4 volume.
Definition:
EllipticalTube.cc:13
EllipticalTube.h
Geom::pi
double pi()
Definition:
Pi.h:31
DDI::Solid::p_
std::vector< double > p_
Definition:
Solid.h:32
Generated for CMSSW Reference Manual by
1.8.5