Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-07 08:11:46

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 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 #pragma once
0010 
0011 struct SpacePoint {
0012   SpacePoint() = default;
0013   ;
0014   SpacePoint(float p_x, float p_y, float p_z, float p_r, int p_surface,
0015              float p_varianceR, float p_varianceZ, int p_id)
0016       : varianceR(p_varianceR),
0017         varianceZ(p_varianceZ),
0018         m_surface(p_surface),
0019         m_id(p_id),
0020         m_x(p_x),
0021         m_y(p_y),
0022         m_z(p_z),
0023         m_r(p_r) {}
0024 
0025   float x() const { return m_x; }
0026   float y() const { return m_y; }
0027   float z() const { return m_z; }
0028   float r() const { return m_r; }
0029   int id() const { return m_id; }
0030   int surface() const { return m_surface; }
0031   friend bool operator==(const SpacePoint &a, const SpacePoint &b);
0032   float varianceR;
0033   float varianceZ;
0034   int m_surface;
0035 
0036  private:
0037   int m_id;
0038   float m_x;
0039   float m_y;
0040   float m_z;
0041   float m_r;
0042 };
0043 
0044 bool operator==(const SpacePoint &a, const SpacePoint &b) {
0045   return a.m_id == b.m_id;
0046 }