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
namespace
DDI
{
11
12
class
Box
:
public
Solid
{
13
public
:
14
Box
(
double
xHalf,
double
yHalf,
double
zHalf) :
Solid
(
DDSolidShape
::
ddbox
) {
15
p_
.emplace_back(xHalf);
16
p_
.emplace_back(yHalf);
17
p_
.emplace_back(zHalf);
18
}
19
~Box
()
override
{}
20
21
double
volume
()
const override
{
return
8. *
p_
[0] *
p_
[1] *
p_
[2]; }
22
void
stream
(std::ostream& os)
const override
;
23
};
24
25
}
// namespace DDI
26
#endif // DDI_Box_h
DDSolidShapes.h
DDI
Definition:
DDCompactView.h:25
DDSolidShape
DDSolidShape
Definition:
DDSolidShapes.h:6
Solid.h
DDI::Box
Definition:
Box.h:12
DDI::Solid
Definition:
Solid.h:10
DDI::Box::Box
Box(double xHalf, double yHalf, double zHalf)
Definition:
Box.h:14
DDSolidShape::ddbox
DDI::Box::stream
void stream(std::ostream &os) const override
Definition:
Box.cc:8
DDI::Box::volume
double volume() const override
Definition:
Box.h:21
DDI::Box::~Box
~Box() override
Definition:
Box.h:19
DDI::Solid::p_
std::vector< double > p_
Definition:
Solid.h:30
Generated for CMSSW Reference Manual by
1.8.16