|
||||
File indexing completed on 2025-01-18 09:11:14
0001 // This file is part of the ACTS project. 0002 // 0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 #include "Acts/Definitions/Algebra.hpp" 0012 #include "Acts/Vertexing/TrackAtVertex.hpp" 0013 0014 namespace Acts { 0015 0016 /// @class Vertex 0017 /// @brief Class for storing vertex objects 0018 class Vertex { 0019 public: 0020 /// @brief Default constructor 0021 Vertex() = default; 0022 0023 /// @brief Construct for vertex at given 3d-position, sets covariance to zero 0024 /// 0025 /// @param position Vertex position 0026 Vertex(const Vector3& position); 0027 0028 /// @brief Construct for vertex at given 4d-position, sets covariance to zero 0029 /// 0030 /// @param position Vertex position 0031 Vertex(const Vector4& position); 0032 0033 /// @brief Vertex constructor 0034 /// 0035 /// @param position Vertex position 0036 /// @param covariance Position covariance matrix 0037 /// @param tracks Vector of tracks associated with the vertex 0038 Vertex(const Vector3& position, const SquareMatrix3& covariance, 0039 std::vector<TrackAtVertex> tracks); 0040 0041 /// @brief Vertex constructor 0042 /// 0043 /// @param position Full vertex position 0044 /// @param covariance 4x4 covariance matrix 0045 /// @param tracks Vector of tracks associated with the vertex 0046 Vertex(const Vector4& position, const SquareMatrix4& covariance, 0047 std::vector<TrackAtVertex> tracks); 0048 0049 /// @return Returns 3-position 0050 Vector3 position() const; 0051 0052 /// @return Returns time 0053 double time() const; 0054 0055 /// @return Returns 4-position 0056 const Vector4& fullPosition() const; 0057 Vector4& fullPosition(); 0058 0059 /// @return Returns 4D position of the vertex seed 0060 const Vector4& fullSeedPosition() const; 0061 Vector4& fullSeedPosition(); 0062 0063 /// @return Returns position covariance 0064 SquareMatrix3 covariance() const; 0065 0066 /// @return Returns 4x4 covariance 0067 const SquareMatrix4& fullCovariance() const; 0068 SquareMatrix4& fullCovariance(); 0069 0070 /// @return Returns vector of tracks associated with the vertex 0071 const std::vector<TrackAtVertex>& tracks() const; 0072 0073 /// @return Returns pair of (chi2, numberDoF) 0074 std::pair<double, double> fitQuality() const; 0075 0076 /// @brief Set position 0077 /// 0078 /// @param position Vertex position 0079 void setPosition(const Vector3& position); 0080 0081 /// @brief Set position and time 0082 /// 0083 /// @param fullPosition Vertex position and time 0084 void setFullPosition(const Vector4& fullPosition); 0085 0086 /// @brief Sets time 0087 /// 0088 /// @param time The time 0089 void setTime(double time); 0090 0091 /// @brief Sets 3x3 covariance 0092 /// 0093 /// @param covariance Position covariance matrix 0094 void setCovariance(const SquareMatrix3& covariance); 0095 0096 /// @brief Sets 4x4 covariance 0097 /// 0098 /// @param covariance The 4x4 covariance matrix 0099 void setFullCovariance(const SquareMatrix4& covariance); 0100 0101 /// @param tracks Vector of tracks at vertex 0102 void setTracksAtVertex(std::vector<TrackAtVertex> tracks); 0103 0104 /// @param chiSquared Chi2 of fit 0105 /// @param numberDoF Number of degrees of freedom 0106 void setFitQuality(double chiSquared, double numberDoF); 0107 0108 /// @param fitQuality pair of (chi2, numberDoF) 0109 void setFitQuality(std::pair<double, double> fitQuality); 0110 0111 private: 0112 Vector4 m_position = Vector4::Zero(); 0113 Vector4 m_seedPosition = Vector4::Zero(); 0114 SquareMatrix4 m_covariance = SquareMatrix4::Zero(); 0115 std::vector<TrackAtVertex> m_tracksAtVertex; 0116 double m_chiSquared = 0.; // chi2 of the fit 0117 double m_numberDoF = 0.; // number of degrees of freedom 0118 }; 0119 0120 } // namespace Acts
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |