ECCE @ EIC Software
 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 
12 
13 #include <cmath>
14 #include <iomanip>
15 #include <iostream>
16 
18  return SurfaceBounds::eDisc;
19 }
20 
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 
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 
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 {
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 }