Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AlignmentAlgorithm.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file AlignmentAlgorithm.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 
20 
21 #include <functional>
22 #include <memory>
23 #include <vector>
24 
25 namespace ActsExamples {
26 
27 class AlignmentAlgorithm final : public IAlgorithm {
28  public:
30  using AlignmentParameters =
31  std::unordered_map<Acts::DetectorElementBase*, Acts::Transform3>;
35  using TrackFitterOptions =
37 
42  public:
43  virtual ~AlignmentFunction() = default;
45  const std::vector<std::vector<IndexSourceLink>>&,
48  };
49 
54  static std::shared_ptr<AlignmentFunction> makeAlignmentFunction(
55  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry,
56  std::shared_ptr<const Acts::MagneticFieldProvider> magneticField);
57 
58  struct Config {
70  std::shared_ptr<AlignmentFunction> align;
74  std::vector<Acts::DetectorElementBase*> alignedDetElements;
76  std::map<unsigned int, std::bitset<6>> iterationState;
78  double chi2ONdfCutOff = 0.10;
80  std::pair<size_t, double> deltaChi2ONdfCutOff = {10, 0.00001};
82  size_t maxNumIterations = 100;
84  int maxNumTracks = -1;
85  };
86 
92 
98  const ActsExamples::AlgorithmContext& ctx) const override;
99 
100  private:
102 
104  "InputMeasurements"};
106  this, "InputSourceLinks"};
108  this, "InputInitialTrackParameters"};
110  "InputProtoTracks"};
112  this, "OutputAlignmentParameters"};
113 };
114 
115 } // namespace ActsExamples