|
|
|||
File indexing completed on 2026-11-07 09:44:12
0001 // This file is part of the ACTS project. 0002 // 0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 #include "Acts/TrackFitting/BetheHeitlerApprox.hpp" 0012 0013 #include <string> 0014 0015 #include <nlohmann/json.hpp> 0016 0017 namespace Acts { 0018 0019 /// @addtogroup json_plugin 0020 /// @{ 0021 0022 /// Serialize polynomial component data to JSON. 0023 /// @param j Output JSON object 0024 /// @param data The PolyData to serialize 0025 void to_json(nlohmann::json& j, 0026 const PolynomialBetheHeitlerApprox::PolyData& data); 0027 0028 /// Deserialize polynomial component data from JSON. 0029 /// @param j Input JSON object 0030 /// @param data The PolyData to populate 0031 void from_json(const nlohmann::json& j, 0032 PolynomialBetheHeitlerApprox::PolyData& data); 0033 0034 /// Serialize a single x/x0 range with its data to JSON. 0035 /// @param j Output JSON object 0036 /// @param data The RangeData to serialize 0037 void to_json(nlohmann::json& j, 0038 const PolynomialBetheHeitlerApprox::RangeData& data); 0039 0040 /// Deserialize a single x/x0 range with its data from JSON. 0041 /// @param j Input JSON object 0042 /// @param data The RangeData to populate 0043 void from_json(const nlohmann::json& j, 0044 PolynomialBetheHeitlerApprox::RangeData& data); 0045 0046 /// Load a Bethe-Heitler approximation from a JSON file. 0047 /// 0048 /// @param filepath Path to the JSON file 0049 /// @param clampToRange Whether to clamp x/x0 values to the valid range 0050 /// @param noChangeLimit Limit below which no change is applied 0051 /// @param singleGaussianLimit Limit below which a single Gaussian is used 0052 /// @return The loaded PolynomialBetheHeitlerApprox 0053 PolynomialBetheHeitlerApprox loadBetheHeitlerApproxFromJson( 0054 const std::string& filepath, bool clampToRange = false, 0055 double noChangeLimit = 0.0001, double singleGaussianLimit = 0.002); 0056 0057 /// @} 0058 0059 } // namespace Acts
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|