Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VertexingOptions.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VertexingOptions.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019-2023 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 
11 // Workaround for building on clang+libstdc++
13 
17 
18 namespace Acts {
19 
22 template <typename input_track_t>
25  VertexingOptions() = delete;
26 
34  const MagneticFieldContext& mctx,
35  const Vertex<input_track_t>& constr,
36  const bool useConstr = true)
37  : geoContext(gctx),
38  magFieldContext(mctx),
39  constraint(constr),
40  useConstraintInFit(useConstr) {
41  if (useConstraintInFit && constraint.covariance().determinant() == 0.) {
42  throw std::invalid_argument(
43  "Vertex constraint covariance matrix must be invertible.");
44  }
45  }
46 
52  const MagneticFieldContext& mctx)
53  : geoContext(gctx), magFieldContext(mctx) {
55  useConstraintInFit = false;
56  }
57 
59  std::reference_wrapper<const GeometryContext> geoContext;
61  std::reference_wrapper<const MagneticFieldContext> magFieldContext;
70 };
71 
72 } // namespace Acts