ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LineBounds.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file LineBounds.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 
10 
11 #include <iomanip>
12 #include <iostream>
13 
15  return SurfaceBounds::eLine;
16 }
17 
19  const Acts::BoundaryCheck& bcheck) const {
20  double r = get(LineBounds::eR);
21  double halfLengthZ = get(LineBounds::eHalfLengthZ);
22  return bcheck.isInside(lposition, Vector2D(-r, -halfLengthZ),
23  Vector2D(r, halfLengthZ));
24 }
25 
27  const Acts::Vector2D& lposition) const {
28  // per definition the min Distance of a correct local position is r
29  return lposition[Acts::eLOC_R];
30 }
31 
32 // ostream operator overload
33 std::ostream& Acts::LineBounds::toStream(std::ostream& sl) const {
34  sl << std::setiosflags(std::ios::fixed);
35  sl << std::setprecision(7);
36  sl << "Acts::LineBounds: (radius, halflengthInZ) = ";
37  sl << "(" << get(LineBounds::eR) << ", " << get(LineBounds::eHalfLengthZ)
38  << ")";
39  sl << std::setprecision(-1);
40  return sl;
41 }