Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
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/Definitions/Algebra.hpp
"
12
#include "
Acts/Geometry/GeometryContext.hpp
"
13
#include "
Acts/Geometry/GeometryObject.hpp
"
14
#include "
Acts/Utilities/BinningType.hpp
"
15
#include "
Acts/Utilities/BoundingBox.hpp
"
16
17
#include <iosfwd>
18
#include <memory>
19
20
namespace
Acts {
21
22
class
VolumeBounds;
23
using
VolumeBoundsPtr
= std::shared_ptr<const VolumeBounds>;
24
32
33
class
Volume
:
public
virtual
GeometryObject
{
34
public
:
35
using
BoundingBox
=
AxisAlignedBoundingBox<Volume, ActsScalar, 3>
;
36
43
Volume
(
const
Transform3
&
transform
,
VolumeBoundsPtr
volbounds);
44
51
Volume
(
const
Volume
& vol,
const
Transform3
& shift = Transform3::Identity());
52
53
Volume
() =
delete
;
54
virtual
~Volume
() =
default
;
55
59
Volume
&
operator=
(
const
Volume
& vol);
60
62
const
Transform3
&
transform
()
const
;
63
65
const
Transform3
&
itransform
()
const
;
66
68
const
Vector3
&
center
()
const
;
69
71
const
VolumeBounds
&
volumeBounds
()
const
;
72
76
BoundingBox
boundingBox
(
const
Vector3
& envelope = {0, 0, 0})
const
;
77
80
const
BoundingBox
&
orientedBoundingBox
()
const
;
81
88
bool
inside
(
const
Vector3
&
gpos
,
double
tol = 0.)
const
;
89
97
Vector3
binningPosition
(
const
GeometryContext
&
gctx
,
98
BinningValue
bValue)
const override
;
99
100
protected
:
101
Transform3
m_transform
;
102
Transform3
m_itransform
;
103
Vector3
m_center
;
104
VolumeBoundsPtr
m_volumeBounds
;
105
BoundingBox
m_orientedBoundingBox
;
106
};
107
108
inline
const
Transform3
&
Volume::transform
()
const
{
109
return
m_transform
;
110
}
111
112
inline
const
Transform3
&
Volume::itransform
()
const
{
113
return
m_itransform
;
114
}
115
116
inline
const
Vector3
&
Volume::center
()
const
{
117
return
m_center
;
118
}
119
120
inline
const
VolumeBounds
&
Volume::volumeBounds
()
const
{
121
return
(*(
m_volumeBounds
.get()));
122
}
123
125
std::ostream&
operator<<
(std::ostream& sl,
const
Volume
& vol);
126
127
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Geometry
Volume.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:33
using
1.8.2 with
sPHENIX GitHub integration