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
GeometryObject.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file GeometryObject.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2016-2020 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/GeometryIdentifier.hpp
"
14
#include "
Acts/Geometry/Polyhedron.hpp
"
15
#include "
Acts/Utilities/BinningType.hpp
"
16
#include "
Acts/Utilities/VectorHelpers.hpp
"
17
18
namespace
Acts {
19
26
class
GeometryObject
{
27
public
:
29
GeometryObject
() =
default
;
30
32
GeometryObject
(
const
GeometryObject
&) =
default
;
33
37
GeometryObject
(
const
GeometryIdentifier
&
geometryId
)
38
:
m_geometryId
(geometryId) {}
39
43
GeometryObject
&
operator=
(
const
GeometryObject
&
geometryId
) {
44
if
(&geometryId !=
this
) {
45
m_geometryId
= geometryId.
m_geometryId
;
46
}
47
return
*
this
;
48
}
49
51
const
GeometryIdentifier
&
geometryId
()
const
;
52
59
virtual
Vector3
binningPosition
(
const
GeometryContext
&
gctx
,
60
BinningValue
bValue)
const
= 0;
61
68
virtual
double
binningPositionValue
(
const
GeometryContext
&
gctx
,
69
BinningValue
bValue)
const
;
70
74
void
assignGeometryId
(
const
GeometryIdentifier
&
geometryId
);
75
76
protected
:
77
GeometryIdentifier
m_geometryId
;
78
};
79
80
inline
const
GeometryIdentifier
&
GeometryObject::geometryId
()
const
{
81
return
m_geometryId
;
82
}
83
84
inline
void
GeometryObject::assignGeometryId
(
85
const
GeometryIdentifier
& geometryId) {
86
m_geometryId
=
geometryId
;
87
}
88
89
inline
double
GeometryObject::binningPositionValue
(
const
GeometryContext
&
gctx
,
90
BinningValue
bValue)
const
{
91
return
VectorHelpers::cast
(
binningPosition
(gctx, bValue), bValue);
92
}
93
94
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Geometry
GeometryObject.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:33
using
1.8.2 with
sPHENIX GitHub integration