|
||||
File indexing completed on 2025-01-18 09:28:00
0001 // This file is part of the Acts project. 0002 // 0003 // Copyright (C) 2019-2023 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 http://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 // Workaround for building on clang+libstdc++ 0012 #include "Acts/Utilities/detail/ReferenceWrapperAnyCompat.hpp" 0013 0014 #include "Acts/Geometry/GeometryContext.hpp" 0015 #include "Acts/MagneticField/MagneticFieldContext.hpp" 0016 #include "Acts/Vertexing/Vertex.hpp" 0017 0018 namespace Acts { 0019 0020 /// @brief Vertex Finder Options 0021 /// 0022 struct VertexingOptions { 0023 /// Default constructor is deleted 0024 VertexingOptions() = delete; 0025 0026 /// VertexingOptions with context and vertex constraint 0027 /// 0028 /// @param gctx Geometry context 0029 /// @param mctx Magnetic field context 0030 /// @param constr Vertex constraint 0031 /// @param useConstr Boolean indicating whether vertex constraint should be used during the vertex fit 0032 VertexingOptions(const GeometryContext& gctx, 0033 const MagneticFieldContext& mctx, const Vertex& constr, 0034 const bool useConstr = true) 0035 : geoContext(gctx), 0036 magFieldContext(mctx), 0037 constraint(constr), 0038 useConstraintInFit(useConstr) { 0039 if (useConstraintInFit && constraint.covariance().determinant() == 0.) { 0040 throw std::invalid_argument( 0041 "Vertex constraint covariance matrix must be invertible."); 0042 } 0043 } 0044 0045 /// VertexingOptions with context and without vertex constraint 0046 /// 0047 /// @param gctx Geometry context 0048 /// @param mctx Magnetic field context 0049 VertexingOptions(const GeometryContext& gctx, 0050 const MagneticFieldContext& mctx) 0051 : geoContext(gctx), magFieldContext(mctx) { 0052 constraint = Vertex(); 0053 useConstraintInFit = false; 0054 } 0055 0056 /// Context object for the geometry 0057 std::reference_wrapper<const GeometryContext> geoContext; 0058 /// Context object for the magnetic field 0059 std::reference_wrapper<const MagneticFieldContext> magFieldContext; 0060 /// Vertex constraint. Important note: While this variable is not used during 0061 /// the vertex fit if useConstraintInFit is set to false, it is always used 0062 /// during vertex finding. 0063 Vertex constraint; 0064 /// Boolean indicating whether we use the constraint information during 0065 /// the vertex fit. If set to true, the covariance matrix of constraint must 0066 /// be invertible. 0067 bool useConstraintInFit; 0068 }; 0069 0070 } // 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 |