Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:09:40

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2016-2020 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/Surfaces/LineBounds.hpp"
0010 
0011 #include <iomanip>
0012 #include <iostream>
0013 
0014 Acts::SurfaceBounds::BoundsType Acts::LineBounds::type() const {
0015   return SurfaceBounds::eLine;
0016 }
0017 
0018 bool Acts::LineBounds::inside(const Acts::Vector2& lposition,
0019                               const Acts::BoundaryCheck& bcheck) const {
0020   double r = get(LineBounds::eR);
0021   double halfLengthZ = get(LineBounds::eHalfLengthZ);
0022   return bcheck.isInside(lposition, Vector2(-r, -halfLengthZ),
0023                          Vector2(r, halfLengthZ));
0024 }
0025 
0026 // ostream operator overload
0027 std::ostream& Acts::LineBounds::toStream(std::ostream& sl) const {
0028   sl << std::setiosflags(std::ios::fixed);
0029   sl << std::setprecision(7);
0030   sl << "Acts::LineBounds: (radius, halflengthInZ) = ";
0031   sl << "(" << get(LineBounds::eR) << ", " << get(LineBounds::eHalfLengthZ)
0032      << ")";
0033   sl << std::setprecision(-1);
0034   return sl;
0035 }