ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ZScanVertexFinder.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ZScanVertexFinder.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 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 
11 #include <unordered_map>
12 
17 #include "Acts/Utilities/Units.hpp"
23 
24 namespace Acts {
25 
33 template <typename vfitter_t>
35  static_assert(VertexFitterConcept<vfitter_t>,
36  "Vertex fitter does not fulfill vertex fitter concept.");
37  using Propagator_t = typename vfitter_t::Propagator_t;
38 
39  public:
40  using InputTrack_t = typename vfitter_t::InputTrack_t;
41 
43  struct Config {
48  : ipEstimator(ipEst) {}
49 
50  // ImpactPointEstimator
52 
53  // FsmwMode1dFinder
55 
56  // disables all weights, set all weights to 1.
57  bool disableAllWeights = false;
58  // constraint parameters
59  float constraintcutoff = 9.;
60  float constrainttemp = 1.;
61  // use LogPt for weighting
62  bool useLogPt = true;
63  // use pt for weighting
64  bool usePt = false;
65  // minimum pt
66  double minPt = 0.4 * UnitConstants::GeV;
67  // exponent used for weighting if usePt
68  double expPt = 1.;
69  // minimum required weight
70  double minWeight = 0.01;
71  };
72 
77  template <typename T = InputTrack_t,
79 
81  std::unique_ptr<const Logger> logger =
82  getDefaultLogger("ZScanVertexFinder", Logging::INFO))
83  : m_cfg(std::move(cfg)),
84  m_extractParameters([](T params) { return params; }),
85 
86  m_logger(std::move(logger)) {}
87 
95  std::unique_ptr<const Logger> logger =
96  getDefaultLogger("ZScanVertexFinder", Logging::INFO))
97  : m_cfg(cfg), m_extractParameters(func), m_logger(std::move(logger)) {}
98 
109  const std::vector<const InputTrack_t*>& trackVector,
110  const VertexingOptions<InputTrack_t>& vertexingOptions) const;
111 
112  private:
114 
120  std::function<BoundParameters(InputTrack_t)> m_extractParameters;
121 
123  std::unique_ptr<const Logger> m_logger;
124 
126  const Logger& logger() const { return *m_logger; }
127 };
128 
129 } // namespace Acts
130 
131 #include "ZScanVertexFinder.ipp"