File indexing completed on 2025-01-18 09:10:49
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <iostream>
0010
0011 namespace Acts {
0012
0013 inline float SpacePointData::x(const std::size_t idx) const {
0014 assert(idx < m_x.size());
0015 return m_x[idx];
0016 }
0017
0018 inline float SpacePointData::y(const std::size_t idx) const {
0019 assert(idx < m_y.size());
0020 return m_y[idx];
0021 }
0022
0023 inline float SpacePointData::z(const std::size_t idx) const {
0024 assert(idx < m_z.size());
0025 return m_z[idx];
0026 }
0027
0028 inline float SpacePointData::radius(const std::size_t idx) const {
0029 assert(idx < m_radius.size());
0030 return m_radius[idx];
0031 }
0032
0033 inline float SpacePointData::phi(const std::size_t idx) const {
0034 assert(idx < m_phi.size());
0035 return m_phi[idx];
0036 }
0037
0038 inline float SpacePointData::varianceZ(const std::size_t idx) const {
0039 assert(idx < m_varianceZ.size());
0040 return m_varianceZ[idx];
0041 }
0042
0043 inline float SpacePointData::varianceR(const std::size_t idx) const {
0044 assert(idx < m_varianceR.size());
0045 return m_varianceR[idx];
0046 }
0047
0048 inline void SpacePointData::setX(const std::size_t idx, const float value) {
0049 assert(idx < m_x.size());
0050 m_x[idx] = value;
0051 }
0052
0053 inline void SpacePointData::setY(const std::size_t idx, const float value) {
0054 assert(idx < m_y.size());
0055 m_y[idx] = value;
0056 }
0057
0058 inline void SpacePointData::setZ(const std::size_t idx, const float value) {
0059 assert(idx < m_z.size());
0060 m_z[idx] = value;
0061 }
0062
0063 inline void SpacePointData::setRadius(const std::size_t idx,
0064 const float value) {
0065 assert(idx < m_radius.size());
0066 m_radius[idx] = value;
0067 }
0068
0069 inline void SpacePointData::setPhi(const std::size_t idx, const float value) {
0070 assert(idx < m_phi.size());
0071 m_phi[idx] = value;
0072 }
0073
0074 inline void SpacePointData::setVarianceZ(const std::size_t idx,
0075 const float value) {
0076 assert(idx < m_varianceZ.size());
0077 m_varianceZ[idx] = value;
0078 }
0079
0080 inline void SpacePointData::setVarianceR(const std::size_t idx,
0081 const float value) {
0082 assert(idx < m_varianceR.size());
0083 m_varianceR[idx] = value;
0084 }
0085
0086 inline bool SpacePointData::hasDynamicVariable() const {
0087 return !m_topStripVector.empty();
0088 }
0089
0090 inline const Acts::Vector3& SpacePointData::topStripVector(
0091 const std::size_t idx) const {
0092 assert(idx < m_topStripVector.size());
0093 return m_topStripVector[idx];
0094 }
0095
0096 inline const Acts::Vector3& SpacePointData::bottomStripVector(
0097 const std::size_t idx) const {
0098 assert(idx < m_bottomStripVector.size());
0099 return m_bottomStripVector[idx];
0100 }
0101
0102 inline const Acts::Vector3& SpacePointData::stripCenterDistance(
0103 const std::size_t idx) const {
0104 assert(idx < m_stripCenterDistance.size());
0105 return m_stripCenterDistance[idx];
0106 }
0107
0108 inline const Acts::Vector3& SpacePointData::topStripCenterPosition(
0109 const std::size_t idx) const {
0110 assert(idx < m_topStripCenterPosition.size());
0111 return m_topStripCenterPosition[idx];
0112 }
0113
0114 inline void SpacePointData::setTopStripVector(const std::size_t idx,
0115 const Acts::Vector3& value) {
0116 assert(idx < m_topStripVector.size());
0117 m_topStripVector[idx] = value;
0118 }
0119
0120 inline void SpacePointData::setBottomStripVector(const std::size_t idx,
0121 const Acts::Vector3& value) {
0122 assert(idx < m_bottomStripVector.size());
0123 m_bottomStripVector[idx] = value;
0124 }
0125
0126 inline void SpacePointData::setStripCenterDistance(const std::size_t idx,
0127 const Acts::Vector3& value) {
0128 assert(idx < m_stripCenterDistance.size());
0129 m_stripCenterDistance[idx] = value;
0130 }
0131
0132 inline void SpacePointData::setTopStripCenterPosition(
0133 const std::size_t idx, const Acts::Vector3& value) {
0134 assert(idx < m_topStripCenterPosition.size());
0135 m_topStripCenterPosition[idx] = value;
0136 }
0137
0138 inline void SpacePointData::resize(const std::size_t n, bool resizeDynamic) {
0139 clear();
0140
0141 m_x.resize(n, 0.f);
0142 m_y.resize(n, 0.f);
0143 m_z.resize(n, 0.f);
0144 m_radius.resize(n, 0.f);
0145 m_phi.resize(n, 0.f);
0146 m_varianceZ.resize(n, 0.f);
0147 m_varianceR.resize(n, 0.f);
0148
0149 if (resizeDynamic) {
0150 m_topStripVector.resize(n, {0, 0, 0});
0151 m_bottomStripVector.resize(n, {0, 0, 0});
0152 m_stripCenterDistance.resize(n, {0, 0, 0});
0153 m_topStripCenterPosition.resize(n, {0, 0, 0});
0154 }
0155 }
0156
0157 inline void SpacePointData::clear() {
0158 m_x.clear();
0159 m_y.clear();
0160 m_z.clear();
0161 m_radius.clear();
0162 m_phi.clear();
0163 m_varianceZ.clear();
0164 m_varianceR.clear();
0165
0166 m_topStripVector.clear();
0167 m_bottomStripVector.clear();
0168 m_stripCenterDistance.clear();
0169 m_topStripCenterPosition.clear();
0170 }
0171
0172 }