EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Volume.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Volume.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2016-2018 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include "
Acts/Geometry/GeometryContext.hpp
"
12
#include "
Acts/Geometry/GeometryObject.hpp
"
13
#include "
Acts/Geometry/GeometryStatics.hpp
"
14
#include "
Acts/Utilities/BoundingBox.hpp
"
15
#include "
Acts/Utilities/Definitions.hpp
"
16
17
#include <memory>
18
19
namespace
Acts {
20
21
class
VolumeBounds;
22
using
VolumeBoundsPtr
= std::shared_ptr<const VolumeBounds>;
23
31
32
class
Volume
:
public
virtual
GeometryObject
{
33
public
:
34
using
BoundingBox
=
AxisAlignedBoundingBox<Volume, double, 3>
;
35
42
Volume
(
const
Transform3D
&
transform
,
VolumeBoundsPtr
volbounds);
43
50
Volume
(
const
Volume
& vol,
const
Transform3D
& shift = Transform3D::Identity());
51
52
Volume
() =
delete
;
53
virtual
~Volume
() =
default
;
54
58
Volume
&
operator=
(
const
Volume
& vol);
59
61
const
Transform3D
&
transform
()
const
;
62
64
const
Transform3D
&
itransform
()
const
;
65
67
const
Vector3D
&
center
()
const
;
68
70
const
VolumeBounds
&
volumeBounds
()
const
;
71
75
BoundingBox
boundingBox
(
const
Vector3D
& envelope = {0, 0, 0})
const
;
76
79
const
BoundingBox
&
orientedBoundingBox
()
const
;
80
87
bool
inside
(
const
Vector3D
& gpos,
double
tol = 0.)
const
;
88
96
Vector3D
binningPosition
(
const
GeometryContext
&
gctx
,
97
BinningValue
bValue)
const override
;
98
99
protected
:
100
Transform3D
m_transform
;
101
Transform3D
m_itransform
;
102
Vector3D
m_center
;
103
VolumeBoundsPtr
m_volumeBounds
;
104
BoundingBox
m_orientedBoundingBox
;
105
};
106
107
inline
const
Transform3D
&
Volume::transform
()
const
{
108
return
m_transform
;
109
}
110
111
inline
const
Transform3D
&
Volume::itransform
()
const
{
112
return
m_itransform
;
113
}
114
115
inline
const
Vector3D
&
Volume::center
()
const
{
116
return
m_center
;
117
}
118
119
inline
const
VolumeBounds
&
Volume::volumeBounds
()
const
{
120
return
(*(
m_volumeBounds
.get()));
121
}
122
124
std::ostream&
operator<<
(std::ostream& sl,
const
Volume
& vol);
125
126
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Geometry
Volume.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:23
using
1.8.2 with
EIC GitHub integration