Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-06 07:51:39

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 #pragma once
0010 
0011 #include "Acts/EventData/SpacePointMutableData.hpp"
0012 
0013 #include <cassert>
0014 #include <limits>
0015 
0016 namespace Acts {
0017 
0018 inline float SpacePointMutableData::quality(const std::size_t idx) const {
0019   assert(idx < m_quality.size());
0020   return m_quality[idx];
0021 }
0022 
0023 inline float SpacePointMutableData::deltaR(const std::size_t idx) const {
0024   assert(idx < m_deltaR.size());
0025   return m_deltaR[idx];
0026 }
0027 
0028 inline void SpacePointMutableData::setQuality(const std::size_t idx,
0029                                               const float value) {
0030   assert(idx < m_quality.size());
0031   if (value > m_quality[idx]) {
0032     m_quality[idx] = value;
0033   }
0034 }
0035 
0036 inline void SpacePointMutableData::setDeltaR(const std::size_t idx,
0037                                              const float value) {
0038   assert(idx < m_deltaR.size());
0039   m_deltaR[idx] = value;
0040 }
0041 
0042 inline void SpacePointMutableData::resize(const std::size_t n) {
0043   clear();
0044   m_quality.resize(n, -std::numeric_limits<float>::infinity());
0045   m_deltaR.resize(n, 0.f);
0046 }
0047 
0048 inline void SpacePointMutableData::clear() {
0049   m_quality.clear();
0050   m_deltaR.clear();
0051 }
0052 
0053 }  // namespace Acts