Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
include
Acts
AmbiguityResolution
Clusterization
Definitions
Detector
Digitization
EventData
Geometry
MagneticField
Material
Navigation
Propagator
Seeding
SpacePointFormation
Surfaces
detail
AnnulusBounds.hpp
BoundaryCheck.hpp
ConeBounds.hpp
ConeSurface.hpp
ConvexPolygonBounds.hpp
ConvexPolygonBounds.ipp
CylinderBounds.hpp
CylinderSurface.hpp
DiamondBounds.hpp
DiscBounds.hpp
DiscSurface.hpp
DiscTrapezoidBounds.hpp
EllipseBounds.hpp
InfiniteBounds.hpp
LineBounds.hpp
LineSurface.hpp
PerigeeSurface.hpp
PlanarBounds.hpp
PlaneSurface.hpp
RadialBounds.hpp
RectangleBounds.hpp
StrawSurface.hpp
Surface.hpp
SurfaceArray.hpp
SurfaceBounds.hpp
SurfaceError.hpp
TrapezoidBounds.hpp
TrackFinding
TrackFitting
Utilities
Vertexing
Visualization
scripts
src
docs
Examples
Fatras
Plugins
Tests
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RadialBounds.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RadialBounds.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/Definitions/TrackParametrization.hpp
"
13
#include "
Acts/Surfaces/BoundaryCheck.hpp
"
14
#include "
Acts/Surfaces/DiscBounds.hpp
"
15
#include "
Acts/Surfaces/SurfaceBounds.hpp
"
16
#include "
Acts/Utilities/detail/periodic.hpp
"
17
18
#include <array>
19
#include <cmath>
20
#include <iosfwd>
21
#include <stdexcept>
22
#include <vector>
23
24
namespace
Acts {
25
32
class
RadialBounds
:
public
DiscBounds
{
33
public
:
34
enum
BoundValues
{
35
eMinR
= 0,
36
eMaxR
= 1,
37
eHalfPhiSector
= 2,
38
eAveragePhi
= 3,
39
eSize
= 4
40
};
41
42
RadialBounds
() =
delete
;
43
50
RadialBounds
(
double
minR
,
double
maxR
,
double
halfPhi = M_PI,
51
double
avgPhi = 0.) noexcept(
false
)
52
:
m_values
({
minR
,
maxR
, halfPhi, avgPhi}) {
53
checkConsistency
();
54
}
55
59
RadialBounds
(
const
std::array<double, eSize>&
values
) noexcept(
false
)
60
:
m_values
(
values
) {
61
checkConsistency
();
62
}
63
64
~RadialBounds
()
override
=
default
;
65
66
SurfaceBounds::BoundsType
type
() const final;
67
71
std::vector<
double
>
values
() const final;
72
79
bool
inside
(const
Vector2
& lposition,
80
const
BoundaryCheck
& bcheck) const final;
81
85
std::ostream&
toStream
(std::ostream& sl) const final;
86
88
double
rMin
() const final;
89
91
double
rMax
() const final;
92
95
double
get
(
BoundValues
bValue)
const
{
return
m_values
[bValue]; }
96
98
bool
coversFullAzimuth
() const final;
99
102
bool
insideRadialBounds
(
double
R
,
double
tolerance
= 0.) const final;
103
105
double
binningValueR
() const final;
106
108
double
binningValuePhi
() const final;
109
110
private
:
111
std::
array
<
double
,
eSize
>
m_values
;
112
115
void
checkConsistency
() noexcept(
false
);
116
121
Vector2
shifted
(const
Vector2
& lposition) const;
122
133
std::vector<
Vector2
>
vertices
(
unsigned
int
lseg) const final;
134
};
135
136
inline
double
RadialBounds
::
rMin
()
const
{
137
return
get
(
eMinR
);
138
}
139
140
inline
double
RadialBounds::rMax
()
const
{
141
return
get
(
eMaxR
);
142
}
143
144
inline
bool
RadialBounds::coversFullAzimuth
()
const
{
145
return
(
get
(
eHalfPhiSector
) == M_PI);
146
}
147
148
inline
bool
RadialBounds::insideRadialBounds
(
double
R
,
double
tolerance
)
const
{
149
return
(R + tolerance >
get
(
eMinR
) and R - tolerance <
get
(
eMaxR
));
150
}
151
152
inline
double
RadialBounds::binningValueR
()
const
{
153
return
0.5 * (
get
(
eMinR
) +
get
(
eMaxR
));
154
}
155
156
inline
double
RadialBounds::binningValuePhi
()
const
{
157
return
get
(
eAveragePhi
);
158
}
159
160
inline
std::vector<double>
RadialBounds::values
()
const
{
161
std::vector<double> valvector;
162
valvector.insert(valvector.begin(),
m_values
.begin(),
m_values
.end());
163
return
valvector;
164
}
165
166
inline
void
RadialBounds::checkConsistency
() noexcept(
false
) {
167
if
(
get
(
eMinR
) < 0. or
get
(
eMaxR
) <= 0. or
get
(
eMinR
) >
get
(
eMaxR
)) {
168
throw
std::invalid_argument(
"RadialBounds: invalid radial setup"
);
169
}
170
if
(
get
(
eHalfPhiSector
) < 0. or
get
(
eHalfPhiSector
) > M_PI) {
171
throw
std::invalid_argument(
"RadialBounds: invalid phi sector setup."
);
172
}
173
if
(
get
(
eAveragePhi
) !=
detail::radian_sym
(
get
(
eAveragePhi
))) {
174
throw
std::invalid_argument(
"RadialBounds: invalid phi positioning."
);
175
}
176
}
177
178
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Surfaces
RadialBounds.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:34
using
1.8.2 with
sPHENIX GitHub integration