Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VertexFitterAlgorithm.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VertexFitterAlgorithm.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-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 #pragma once
10 
30 
31 #include <algorithm>
32 #include <array>
33 #include <memory>
34 #include <string>
35 #include <tuple>
36 #include <utility>
37 #include <vector>
38 
39 namespace Acts {
40 class MagneticFieldProvider;
41 } // namespace Acts
42 
43 namespace ActsExamples {
44 struct AlgorithmContext;
45 
46 class VertexFitterAlgorithm final : public IAlgorithm {
47  public:
51  using VertexFitter =
53  using VertexFitterOptions =
55 
56  using VertexCollection =
57  std::vector<Acts::Vertex<Acts::BoundTrackParameters>>;
58 
59  struct Config {
69  std::shared_ptr<Acts::MagneticFieldProvider> bField;
71  bool doConstrainedFit = false;
77  3 * Acts::UnitConstants::mm * Acts::UnitConstants::mm,
78  10 * Acts::UnitConstants::mm * Acts::UnitConstants::mm,
80  .asDiagonal();
81  };
82 
84 
89  ProcessCode execute(const AlgorithmContext& ctx) const final;
90 
92  const Config& config() const { return m_cfg; }
93 
94  private:
96 
98  m_inputTrackParameters{this, "InputTrackParameters"};
99 
101  this, "InputTrajectories"};
102 
104  this, "InputProtoVertices"};
105 
107 };
108 
109 } // namespace ActsExamples