Main Page
Namespaces
Classes
Package Documentation
DetectorDescription
Core
src
Box.h
Go to the documentation of this file.
1
#ifndef DDI_Box_h
2
#define DDI_Box_h
3
4
#include <iosfwd>
5
#include <vector>
6
7
#include "
DetectorDescription/Core/interface/DDSolidShapes.h
"
8
#include "
Solid.h
"
9
10
11
namespace
DDI
{
12
13
class
Box
:
public
Solid
14
{
15
public
:
16
Box
(
double
xHalf,
double
yHalf,
double
zHalf)
17
:
Solid
(
ddbox
)
18
{
19
p_
.emplace_back(xHalf);
20
p_
.emplace_back(yHalf);
21
p_
.emplace_back(zHalf);
22
}
23
~Box
()
override
{ }
24
25
double
volume
()
const override
{
return
8.*
p_
[0]*
p_
[1]*
p_
[2]; }
26
void
stream
(std::ostream & os)
const override
;
27
};
28
29
}
30
#endif // DDI_Box_h
ddbox
Definition:
DDSolidShapes.h:7
DDI::Box::Box
Box(double xHalf, double yHalf, double zHalf)
Definition:
Box.h:16
DDI::Box::stream
void stream(std::ostream &os) const override
Definition:
Box.cc:8
DDSolidShapes.h
Solid.h
DDI::Box::~Box
~Box() override
Definition:
Box.h:23
DDI::Box::volume
double volume() const override
Definition:
Box.h:25
DDI
Definition:
DDCompactView.h:26
DDI::Solid
Definition:
Solid.h:10
DDI::Solid::p_
std::vector< double > p_
Definition:
Solid.h:32
DDI::Box
Definition:
Box.h:13
Generated for CMSSW Reference Manual by
1.8.11