ECCE @ EIC Software
Reference for
ECCE @ 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
#include "
Acts/Surfaces/detail/VerticesHelper.hpp
"
11
#include "
Acts/Utilities/detail/periodic.hpp
"
12
13
#include <cmath>
14
#include <iomanip>
15
#include <iostream>
16
17
Acts::SurfaceBounds::BoundsType
Acts::RadialBounds::type
()
const
{
18
return
SurfaceBounds::eDisc
;
19
}
20
21
Acts::Vector2D
Acts::RadialBounds::shifted
(
22
const
Acts::Vector2D
& lposition)
const
{
23
Vector2D
tmp
;
24
tmp[
eLOC_R
] = lposition[
eLOC_R
];
25
tmp[
eLOC_PHI
] =
detail::radian_sym
(lposition[
eLOC_PHI
] -
get
(eAveragePhi));
26
return
tmp
;
27
}
28
29
bool
Acts::RadialBounds::inside
(
const
Acts::Vector2D
& lposition,
30
const
Acts::BoundaryCheck
& bcheck)
const
{
31
return
bcheck.
isInside
(shifted(lposition),
32
Vector2D
(
get
(eMinR), -
get
(eHalfPhiSector)),
33
Vector2D
(
get
(eMaxR),
get
(eHalfPhiSector)));
34
}
35
36
double
Acts::RadialBounds::distanceToBoundary
(
37
const
Acts::Vector2D
& lposition)
const
{
38
return
BoundaryCheck
(
true
).
distance
(
39
shifted(lposition),
Vector2D
(
get
(eMinR), -
get
(eHalfPhiSector)),
40
Vector2D
(
get
(eMaxR),
get
(eHalfPhiSector)));
41
}
42
43
std::vector<Acts::Vector2D>
Acts::RadialBounds::vertices
(
44
unsigned
int
lseg)
const
{
45
return
detail::VerticesHelper::circularVertices
(
46
get
(eMinR),
get
(eMaxR),
get
(eAveragePhi),
get
(eHalfPhiSector), lseg);
47
}
48
49
std::ostream&
Acts::RadialBounds::toStream
(std::ostream& sl)
const
{
50
sl << std::setiosflags(std::ios::fixed);
51
sl << std::setprecision(7);
52
sl <<
"Acts::RadialBounds: (innerRadius, outerRadius, hPhiSector, "
53
"averagePhi) = "
;
54
sl <<
"("
<<
get
(eMinR) <<
", "
<<
get
(eMaxR) <<
", "
<<
get
(eHalfPhiSector)
55
<<
", "
<<
get
(eAveragePhi) <<
")"
;
56
sl << std::setprecision(-1);
57
return
sl;
58
}
acts
blob
master
Core
src
Surfaces
RadialBounds.cpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:23
using
1.8.2 with
ECCE GitHub integration