Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-20 09:28:12

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/.
0008 
0009 #include "ActsPlugins/Traccc/TrackConversion.hpp"
0010 
0011 namespace ActsPlugins {
0012 
0013 Acts::BoundVector convertBoundVectorFromTraccc(
0014     const TracccBoundTrackParameters& params) {
0015   Acts::BoundVector vector;
0016   for (unsigned int i = 0; i < Acts::eBoundSize; ++i) {
0017     vector[i] = traccc::getter::element(params.vector(), i, 0u);
0018   }
0019   return vector;
0020 }
0021 
0022 Acts::BoundMatrix convertBoundCovarianceFromTraccc(
0023     const TracccBoundTrackParameters& params) {
0024   Acts::BoundMatrix covariance;
0025   for (unsigned int i = 0; i < Acts::eBoundSize; ++i) {
0026     for (unsigned int j = 0; j < Acts::eBoundSize; ++j) {
0027       covariance(i, j) = traccc::getter::element(params.covariance(), i, j);
0028     }
0029   }
0030   return covariance;
0031 }
0032 
0033 bool ActsPlugins::detail::hasZeroBoundParameters(
0034     const TracccBoundTrackParameters& params) {
0035   return params.bound_local()[0] == 0 && params.bound_local()[1] == 0 &&
0036          params.phi() == 0 && params.theta() == 0 && params.qop() == 0 &&
0037          params.time() == 0;
0038 }
0039 
0040 std::ostream& operator<<(std::ostream& os,
0041                          const TracccTrackConversionStatistics& stats) {
0042   os << "converted " << stats.nConverted << " / " << stats.nInput
0043      << " tracks (dropped: " << stats.nFailedFit << " failed fit, "
0044      << stats.nMissingSurface << " missing surface, " << stats.nDegenerate
0045      << " degenerate parameters)";
0046   return os;
0047 }
0048 
0049 }  // namespace ActsPlugins