Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SpacePoint.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SpacePoint.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 struct SpacePoint {
12  SpacePoint() = default;
13  ;
14  SpacePoint(float p_x, float p_y, float p_z, float p_r, int p_surface,
15  float p_varianceR, float p_varianceZ, int p_id)
16  : varianceR(p_varianceR),
17  varianceZ(p_varianceZ),
18  m_surface(p_surface),
19  m_id(p_id),
20  m_x(p_x),
21  m_y(p_y),
22  m_z(p_z),
23  m_r(p_r) {}
24 
25  float x() const { return m_x; }
26  float y() const { return m_y; }
27  float z() const { return m_z; }
28  float r() const { return m_r; }
29  int id() const { return m_id; }
30  int surface() const { return m_surface; }
31  friend bool operator==(const SpacePoint &a, const SpacePoint &b);
32  float varianceR;
33  float varianceZ;
34  int m_surface;
35 
36  private:
37  int m_id;
38  float m_x;
39  float m_y;
40  float m_z;
41  float m_r;
42 };
43 
44 bool operator==(const SpacePoint &a, const SpacePoint &b) {
45  return a.m_id == b.m_id;
46 }