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
RadialBounds.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RadialBounds.cpp
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
#include "
Acts/Surfaces/RadialBounds.hpp
"
10
11
#include "
Acts/Surfaces/detail/VerticesHelper.hpp
"
12
#include "
Acts/Utilities/detail/periodic.hpp
"
13
14
#include <cmath>
15
#include <iomanip>
16
#include <iostream>
17
18
Acts::SurfaceBounds::BoundsType
Acts::RadialBounds::type
()
const
{
19
return
SurfaceBounds::eDisc
;
20
}
21
22
Acts::Vector2D
Acts::RadialBounds::shifted
(
23
const
Acts::Vector2D
& lposition)
const
{
24
Vector2D
tmp;
25
tmp[
eBoundLoc0
] = lposition[
eBoundLoc0
];
26
tmp[
eBoundLoc1
] =
27
detail::radian_sym
(lposition[
eBoundLoc1
] -
get
(eAveragePhi));
28
return
tmp;
29
}
30
31
bool
Acts::RadialBounds::inside
(
const
Acts::Vector2D
& lposition,
32
const
Acts::BoundaryCheck
& bcheck)
const
{
33
return
bcheck.
isInside
(shifted(lposition),
34
Vector2D
(
get
(eMinR), -
get
(eHalfPhiSector)),
35
Vector2D
(
get
(eMaxR),
get
(eHalfPhiSector)));
36
}
37
38
std::vector<Acts::Vector2D>
Acts::RadialBounds::vertices
(
39
unsigned
int
lseg)
const
{
40
return
detail::VerticesHelper::circularVertices
(
41
get
(eMinR),
get
(eMaxR),
get
(eAveragePhi),
get
(eHalfPhiSector), lseg);
42
}
43
44
std::ostream&
Acts::RadialBounds::toStream
(std::ostream& sl)
const
{
45
sl << std::setiosflags(std::ios::fixed);
46
sl << std::setprecision(7);
47
sl <<
"Acts::RadialBounds: (innerRadius, outerRadius, hPhiSector, "
48
"averagePhi) = "
;
49
sl <<
"("
<<
get
(eMinR) <<
", "
<<
get
(eMaxR) <<
", "
<<
get
(eHalfPhiSector)
50
<<
", "
<<
get
(eAveragePhi) <<
")"
;
51
sl << std::setprecision(-1);
52
return
sl;
53
}
acts
blob
sPHENIX
Core
src
Surfaces
RadialBounds.cpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration