Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackFindingAlgorithmExaTrkX.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackFindingAlgorithmExaTrkX.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2022 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 
21 
22 #include <mutex>
23 #include <string>
24 #include <vector>
25 
26 #include <boost/accumulators/accumulators.hpp>
27 #include <boost/accumulators/statistics.hpp>
28 
29 namespace ActsExamples {
30 
32  public:
33  struct Config {
36 
44 
51 
54 
55  std::shared_ptr<Acts::GraphConstructionBase> graphConstructor;
56 
57  std::vector<std::shared_ptr<Acts::EdgeClassificationBase>> edgeClassifiers;
58 
59  std::shared_ptr<Acts::TrackBuildingBase> trackBuilder;
60 
62  float rScale = 1.f;
63  float phiScale = 1.f;
64  float zScale = 1.f;
65  float cellCountScale = 1.f;
66  float cellSumScale = 1.f;
67  float clusterXScale = 1.f;
68  float clusterYScale = 1.f;
69 
71  std::size_t targetMinHits = 3;
73  };
74 
80 
81  ~TrackFindingAlgorithmExaTrkX() override = default;
82 
88  const ActsExamples::AlgorithmContext& ctx) const final;
89 
92 
93  const Config& config() const { return m_cfg; }
94 
95  private:
97 
99  mutable std::mutex m_mutex;
100 
101  using Accumulator = boost::accumulators::accumulator_set<
102  float, boost::accumulators::features<boost::accumulators::tag::mean,
103  boost::accumulators::tag::variance>>;
104 
105  mutable struct {
107  std::vector<Accumulator> classifierTimes;
109  } m_timing;
110 
112  "InputSpacePoints"};
114 
116  "OutputProtoTracks"};
117 
118  // for truth graph
122  this, "InputMeasurementMap"};
123 };
124 
125 } // namespace ActsExamples