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