Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImpactPointEstimator.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ImpactPointEstimator.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 
20 
21 namespace Acts {
22 
24  // Impact parameters ...
25  double d0 = 0.;
26  double z0 = 0.;
27  // ... and their standard deviations wrt a vertex, e.g.:
28  // sigmaD0 = sqrt(Var(X) + Var(Y) + Var(d0)),
29  // where X and Y are the x- and y-coordinate of the vertex
30  double sigmaD0 = 0.;
31  double sigmaZ0 = 0.;
32  // Absolute difference in time between the vertex and the track at the 2D PCA
33  // ...
34  std::optional<double> deltaT = std::nullopt;
35  // ... and standard deviation wrt a vertex
36  std::optional<double> sigmaDeltaT = std::nullopt;
37 };
38 
45 template <typename input_track_t, typename propagator_t,
46  typename propagator_options_t = PropagatorOptions<>>
48  public:
50  struct State {
55  : fieldCache(std::move(fieldCacheIn)) {}
58  };
59 
60  struct Config {
65  Config(std::shared_ptr<const MagneticFieldProvider> bIn,
66  std::shared_ptr<const propagator_t> prop)
67  : bField(std::move(bIn)), propagator(std::move(prop)) {}
68 
73  Config(std::shared_ptr<propagator_t> prop)
74  : bField{std::make_shared<NullBField>()}, propagator(std::move(prop)) {}
75 
77  std::shared_ptr<const MagneticFieldProvider> bField;
79  std::shared_ptr<const propagator_t> propagator;
81  int maxIterations = 20;
83  double precision = 1.e-10;
84  };
85 
90 
100  const BoundTrackParameters& trkParams,
101  const Vector3& vtxPos, State& state) const;
102 
119  const GeometryContext& gctx, const Acts::MagneticFieldContext& mctx,
120  const BoundTrackParameters& trkParams, const Vector3& vtxPos,
121  State& state) const;
122 
137  template <unsigned int nDim>
139  const GeometryContext& gctx, const BoundTrackParameters* trkParams,
140  const ActsVector<nDim>& vertexPos) const;
141 
156  template <unsigned int nDim>
159  const BoundTrackParameters& trkParams,
160  const ActsVector<nDim>& vtxPos, State& state) const;
161 
172  const BoundTrackParameters& track, const Vertex<input_track_t>& vtx,
173  const GeometryContext& gctx, const MagneticFieldContext& mctx,
174  bool calculateTimeIP = false) const;
175 
189  const BoundTrackParameters& track, const Vertex<input_track_t>& vtx,
190  const Acts::Vector3& direction, const GeometryContext& gctx,
191  const MagneticFieldContext& mctx) const;
192 
204  const BoundTrackParameters& track, const Vertex<input_track_t>& vtx,
205  const Acts::Vector3& direction, const GeometryContext& gctx,
206  const MagneticFieldContext& mctx) const;
207 
208  private:
210  const Config m_cfg;
211 
225  const Vector3& vtxPos, double phi,
226  double theta, double rho) const;
227 };
228 
229 } // namespace Acts
230