Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NeuralCalibrator.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file NeuralCalibrator.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 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 
15 
16 #include <filesystem>
17 
18 namespace ActsExamples {
19 
21  public:
48  NeuralCalibrator(const std::filesystem::path& modelPath,
49  size_t nComponents = 1,
50  std::vector<size_t> volumeIds = {7, 8, 9});
51 
53  void calibrate(
54  const MeasurementContainer& measurements,
56  const Acts::CalibrationContext& cctx, const Acts::SourceLink& sourceLink,
58  trackState) const override;
59 
60  bool needsClusters() const override { return true; }
61 
62  private:
63  Ort::Env m_env;
65  size_t m_nComponents;
66  size_t m_nInputs =
67  57; // TODO make this configurable? e.g. for changing matrix size?
68 
69  // TODO: this should probably be handled outside of the calibrator,
70  // by setting up a GeometryHierarchyMap<MeasurementCalibrator>
71  std::vector<size_t> m_volumeIds;
73 };
74 
75 } // namespace ActsExamples