ECCE @ 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 SpacePointVector& position);
37 
43  Vertex(const Vector3D& position, const ActsSymMatrixD<3>& covariance,
44  const std::vector<TrackAtVertex<input_track_t>>& tracks);
45 
51  Vertex(const SpacePointVector& position,
52  const SpacePointSymMatrix& covariance,
53  const std::vector<TrackAtVertex<input_track_t>>& tracks);
54 
56  Vector3D position() const;
57 
59  ParValue_t time() const;
60 
62  const SpacePointVector& fullPosition() const;
63 
66 
68  const SpacePointSymMatrix& fullCovariance() const;
69 
71  const std::vector<TrackAtVertex<input_track_t>>& tracks() const;
72 
74  std::pair<double, double> fitQuality() const;
75 
80  void setPosition(const Vector3D& position, ParValue_t time = 0);
81 
85  void setFullPosition(const SpacePointVector& fullPosition);
86 
90  void setTime(ParValue_t time);
91 
95  void setCovariance(const ActsSymMatrixD<3>& covariance);
96 
100  void setFullCovariance(const SpacePointSymMatrix& covariance);
101 
103  void setTracksAtVertex(
104  const std::vector<TrackAtVertex<input_track_t>>& tracks);
105 
108  void setFitQuality(double chiSquared, double numberDoF);
109 
111  void setFitQuality(std::pair<double, double> fitQuality);
112 
113  private:
114  SpacePointVector m_position = SpacePointVector::Zero();
115  SpacePointSymMatrix m_covariance = SpacePointSymMatrix::Zero();
116  std::vector<TrackAtVertex<input_track_t>> m_tracksAtVertex;
117  double m_chiSquared = 1e9; // chi2 of the fit
118  double m_numberDoF = 0.; // number of degrees of freedom
119 };
120 
121 } // namespace Acts
122 
123 #include "Vertex.ipp"