EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Vertex.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Vertex.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 
13 
14 namespace Acts {
15 
22 template <typename input_track_t>
23 class Vertex {
24  public:
26  Vertex() = default;
27 
31  Vertex(const Vector3D& position);
32 
36  Vertex(const Vector4D& position);
37 
43  Vertex(const Vector3D& position, const SymMatrix3D& covariance,
45 
51  Vertex(const Vector4D& position, const SymMatrix4D& covariance,
53 
55  Vector3D position() const;
56 
58  BoundScalar time() const;
59 
61  const Vector4D& fullPosition() const;
62 
64  SymMatrix3D covariance() const;
65 
67  const SymMatrix4D& fullCovariance() const;
68 
70  const std::vector<TrackAtVertex<input_track_t>>& tracks() const;
71 
73  std::pair<double, double> fitQuality() const;
74 
79  void setPosition(const Vector3D& position, BoundScalar time = 0);
80 
84  void setFullPosition(const Vector4D& fullPosition);
85 
89  void setTime(BoundScalar time);
90 
94  void setCovariance(const ActsSymMatrixD<3>& covariance);
95 
99  void setFullCovariance(const SymMatrix4D& covariance);
100 
102  void setTracksAtVertex(
104 
107  void setFitQuality(double chiSquared, double numberDoF);
108 
110  void setFitQuality(std::pair<double, double> fitQuality);
111 
112  private:
113  Vector4D m_position = Vector4D::Zero();
114  SymMatrix4D m_covariance = SymMatrix4D::Zero();
115  std::vector<TrackAtVertex<input_track_t>> m_tracksAtVertex;
116  double m_chiSquared = 0.; // chi2 of the fit
117  double m_numberDoF = 0.; // number of degrees of freedom
118 };
119 
120 } // namespace Acts
121 
122 #include "Vertex.ipp"