Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DetectorDescription
Core
src
Tubs.cc
Go to the documentation of this file.
1
#include "
DetectorDescription/Core/src/Tubs.h
"
2
3
#include "CLHEP/Units/GlobalSystemOfUnits.h"
4
#include "CLHEP/Units/GlobalPhysicalConstants.h"
5
6
#include <cmath>
7
8
using
std::fabs;
9
10
11
DDI::Tubs::Tubs
(
double
zhalf,
12
double
rIn,
double
rOut,
13
double
startPhi,
14
double
deltaPhi
)
15
:
Solid
(
ddtubs
)
16
{
17
p_
.push_back(zhalf);
18
p_
.push_back(rIn);
19
p_
.push_back(rOut);
20
p_
.push_back(startPhi);
21
p_
.push_back(deltaPhi);
22
}
23
24
25
void
DDI::Tubs::stream
(std::ostream & os)
const
26
{
27
os <<
" zhalf="
<< p_[0]/cm
28
<<
" rIn="
<< p_[1]/cm
29
<<
" rOut="
<< p_[2]/cm
30
<<
" startPhi="
<< p_[3]/deg
31
<<
" deltaPhi="
<< p_[4]/deg;
32
}
33
34
35
double
DDI::Tubs::volume
()
const
36
{
37
double
volume=0;
38
double
z
=2.*p_[0];
39
double
rIn=p_[1];
40
double
rOut=p_[2];
41
double
phi
=p_[4]/rad;
42
43
double
volume1=
pi
*rIn*rIn*
z
;
44
double
volume2=
pi
*rOut*rOut*
z
;
45
46
double
slice=fabs(phi/(2*
pi
));
47
48
volume=slice*(volume2-volume1);
49
50
return
volume;
51
}
52
ddtubs
Definition:
DDSolidShapes.h:7
DDI::Tubs::stream
void stream(std::ostream &) const
Definition:
Tubs.cc:25
DDI::Tubs::Tubs
Tubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
Definition:
Tubs.cc:11
detailsBasic3DVector::z
float float float z
Definition:
extBasic3DVector.h:15
SiPixelRawToDigiRegional_cfi.deltaPhi
tuple deltaPhi
Definition:
SiPixelRawToDigiRegional_cfi.py:9
DDI::Tubs::volume
double volume() const
Definition:
Tubs.cc:35
Tubs.h
DDI::Solid
Definition:
Solid.h:10
DDI::Solid::p_
std::vector< double > p_
Definition:
Solid.h:32
pi
double pi
Definition:
Vx3DHLTAnalyzer.h:68
phi
Definition:
DDAxes.h:10
Generated for CMSSW Reference Manual by
1.8.5