Analysis Software
Documentation for sPHENIX simulation 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  m_position[ePos0] = position[ePos0];
12  m_position[ePos1] = position[ePos1];
13  m_position[ePos2] = position[ePos2];
14 }
15 
16 template <typename input_track_t>
18  : m_position(position) {}
19 
20 template <typename input_track_t>
23  const std::vector<TrackAtVertex<input_track_t>>& tracks)
24  : m_tracksAtVertex(tracks) {
25  m_position[ePos0] = position[ePos0];
26  m_position[ePos1] = position[ePos1];
27  m_position[ePos2] = position[ePos2];
28  m_covariance.block<3, 3>(ePos0, ePos0) = covariance;
29 }
30 
31 template <typename input_track_t>
34  const std::vector<TrackAtVertex<input_track_t>>& tracks)
35  : m_position(position),
36  m_covariance(covariance),
37  m_tracksAtVertex(tracks) {}
38 
39 template <typename input_track_t>
41  return VectorHelpers::position(m_position);
42 }
43 
44 template <typename input_track_t>
46  return m_position[eTime];
47 }
48 
49 template <typename input_track_t>
51  return m_position;
52 }
53 
54 template <typename input_track_t>
56  return m_covariance.block<3, 3>(ePos0, ePos0);
57 }
58 
59 template <typename input_track_t>
61  return m_covariance;
62 }
63 
64 template <typename input_track_t>
65 const std::vector<Acts::TrackAtVertex<input_track_t>>&
67  return m_tracksAtVertex;
68 }
69 
70 template <typename input_track_t>
71 std::pair<double, double> Acts::Vertex<input_track_t>::fitQuality() const {
72  return std::pair<double, double>(m_chiSquared, m_numberDoF);
73 }
74 
75 template <typename input_track_t>
77  ActsScalar time) {
78  m_position[ePos0] = position[ePos0];
79  m_position[ePos1] = position[ePos1];
80  m_position[ePos2] = position[ePos2];
81  m_position[eTime] = time;
82 }
83 
84 template <typename input_track_t>
86  m_position = fullPosition;
87 }
88 
89 template <typename input_track_t>
91  m_position[eTime] = time;
92 }
93 
94 template <typename input_track_t>
96  const SquareMatrix3& covariance) {
97  m_covariance.setZero();
98  m_covariance.block<3, 3>(ePos0, ePos0) = covariance;
99 }
100 
101 template <typename input_track_t>
103  const SquareMatrix4& covariance) {
104  m_covariance = covariance;
105 }
106 
107 template <typename input_track_t>
109  const std::vector<TrackAtVertex<input_track_t>>& tracks) {
110  m_tracksAtVertex = tracks;
111 }
112 
113 template <typename input_track_t>
115  double numberDoF) {
116  m_chiSquared = chiSquared;
117  m_numberDoF = numberDoF;
118 }
119 
120 template <typename input_track_t>
122  std::pair<double, double> fitQuality) {
123  m_chiSquared = fitQuality.first;
124  m_numberDoF = fitQuality.second;
125 }