ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Vertex.ipp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Vertex.ipp
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 template <typename input_track_t>
11 
12 {
13  m_position.setZero();
14  VectorHelpers::position(m_position) = position;
15 }
16 
17 template <typename input_track_t>
19 
20 {
21  m_position = position;
22 }
23 
24 template <typename input_track_t>
26  const Vector3D& position, const ActsSymMatrixD<3>& covariance,
27  const std::vector<TrackAtVertex<input_track_t>>& tracks)
28  : m_tracksAtVertex(tracks) {
29  m_position.setZero();
31  m_covariance.setZero();
32  m_covariance.block<3, 3>(0, 0) = covariance;
33 }
34 
35 template <typename input_track_t>
37  const SpacePointVector& position, const SpacePointSymMatrix& covariance,
38  const std::vector<TrackAtVertex<input_track_t>>& tracks)
39  : m_position(position),
40  m_covariance(covariance),
41  m_tracksAtVertex(tracks) {}
42 
43 template <typename input_track_t>
45  return VectorHelpers::position(m_position);
46 }
47 
48 template <typename input_track_t>
50  return VectorHelpers::time(m_position);
51 }
52 
53 template <typename input_track_t>
55  const {
56  return m_position;
57 }
58 
59 template <typename input_track_t>
61  return m_covariance.block<3, 3>(0, 0);
62 }
63 
64 template <typename input_track_t>
66  const {
67  return m_covariance;
68 }
69 
70 template <typename input_track_t>
71 const std::vector<Acts::TrackAtVertex<input_track_t>>&
73  return m_tracksAtVertex;
74 }
75 
76 template <typename input_track_t>
77 std::pair<double, double> Acts::Vertex<input_track_t>::fitQuality() const {
78  return std::pair<double, double>(m_chiSquared, m_numberDoF);
79 }
80 
81 template <typename input_track_t>
83  ParValue_t time) {
84  m_position.setZero();
85  VectorHelpers::position(m_position) = position;
86  VectorHelpers::time(m_position) = time;
87 }
88 
89 template <typename input_track_t>
91  const SpacePointVector& fullPosition) {
92  m_position = fullPosition;
93 }
94 
95 template <typename input_track_t>
97  VectorHelpers::time(m_position) = time;
98 }
99 
100 template <typename input_track_t>
102  const ActsSymMatrixD<3>& covariance) {
103  m_covariance.setZero();
104  m_covariance.block<3, 3>(0, 0) = covariance;
105 }
106 
107 template <typename input_track_t>
109  const SpacePointSymMatrix& covariance) {
110  m_covariance = covariance;
111 }
112 
113 template <typename input_track_t>
115  const std::vector<TrackAtVertex<input_track_t>>& tracks) {
116  m_tracksAtVertex = tracks;
117 }
118 
119 template <typename input_track_t>
121  double numberDoF) {
122  m_chiSquared = chiSquared;
123  m_numberDoF = numberDoF;
124 }
125 
126 template <typename input_track_t>
128  std::pair<double, double> fitQuality) {
129  m_chiSquared = fitQuality.first;
130  m_numberDoF = fitQuality.second;
131 }