File indexing completed on 2025-01-19 09:23:31
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Geometry/Extent.hpp"
0012 #include "Acts/Seeding/BinnedGroup.hpp"
0013 #include "Acts/Seeding/InternalSpacePoint.hpp"
0014 #include "Acts/Seeding/SeedFinderConfig.hpp"
0015 #include "Acts/Utilities/Grid.hpp"
0016
0017 #include <vector>
0018
0019 namespace Acts {
0020
0021
0022
0023 template <typename external_spacepoint_t>
0024 using CylindricalSpacePointGrid =
0025 Acts::Grid<std::vector<std::unique_ptr<
0026 Acts::InternalSpacePoint<external_spacepoint_t>>>,
0027 Acts::detail::Axis<Acts::detail::AxisType::Equidistant,
0028 Acts::detail::AxisBoundaryType::Closed>,
0029 Acts::detail::Axis<Acts::detail::AxisType::Variable,
0030 Acts::detail::AxisBoundaryType::Bound>>;
0031
0032
0033 template <typename external_spacepoint_t>
0034 using CylindricalBinnedGroup =
0035 Acts::BinnedGroup<Acts::CylindricalSpacePointGrid<external_spacepoint_t>>;
0036
0037 template <typename external_spacepoint_t>
0038 using CylindricalBinnedGroupIterator = Acts::BinnedGroupIterator<
0039 Acts::CylindricalSpacePointGrid<external_spacepoint_t>>;
0040
0041 struct CylindricalSpacePointGridConfig {
0042
0043 float minPt = 0;
0044
0045
0046 float rMax = 0;
0047
0048
0049 float zMax = 0;
0050
0051
0052 float zMin = 0;
0053
0054 float deltaRMax = 0;
0055
0056 float cotThetaMax = 0;
0057
0058 float impactMax = 0;
0059
0060 float phiMin = -M_PI;
0061
0062 float phiMax = M_PI;
0063
0064
0065
0066
0067
0068
0069 int phiBinDeflectionCoverage = 1;
0070
0071 int maxPhiBins = 10000;
0072
0073 std::vector<float> zBinEdges;
0074 bool isInInternalUnits = false;
0075 CylindricalSpacePointGridConfig toInternalUnits() const {
0076 if (isInInternalUnits) {
0077 throw std::runtime_error(
0078 "Repeated conversion to internal units for "
0079 "CylindricalSpacePointGridConfig");
0080 }
0081 using namespace Acts::UnitLiterals;
0082 CylindricalSpacePointGridConfig config = *this;
0083 config.isInInternalUnits = true;
0084 config.minPt /= 1_MeV;
0085 config.rMax /= 1_mm;
0086 config.zMax /= 1_mm;
0087 config.zMin /= 1_mm;
0088 config.deltaRMax /= 1_mm;
0089
0090 return config;
0091 }
0092 };
0093
0094 struct CylindricalSpacePointGridOptions {
0095
0096 float bFieldInZ = 0;
0097 bool isInInternalUnits = false;
0098 CylindricalSpacePointGridOptions toInternalUnits() const {
0099 if (isInInternalUnits) {
0100 throw std::runtime_error(
0101 "Repeated conversion to internal units for "
0102 "CylindricalSpacePointGridOptions");
0103 }
0104 using namespace Acts::UnitLiterals;
0105 CylindricalSpacePointGridOptions options = *this;
0106 options.isInInternalUnits = true;
0107 options.bFieldInZ /= 1000_T;
0108
0109 return options;
0110 }
0111 };
0112
0113
0114 class CylindricalSpacePointGridCreator {
0115 public:
0116 template <typename external_spacepoint_t>
0117 static Acts::CylindricalSpacePointGrid<external_spacepoint_t> createGrid(
0118 const Acts::CylindricalSpacePointGridConfig& _config,
0119 const Acts::CylindricalSpacePointGridOptions& _options);
0120
0121 template <typename external_spacepoint_t,
0122 typename external_spacepoint_iterator_t, typename callable_t>
0123 static void fillGrid(
0124 const Acts::SeedFinderConfig<external_spacepoint_t>& config,
0125 const Acts::SeedFinderOptions& options,
0126 Acts::CylindricalSpacePointGrid<external_spacepoint_t>& grid,
0127 external_spacepoint_iterator_t spBegin,
0128 external_spacepoint_iterator_t spEnd, callable_t&& toGlobal,
0129 Acts::Extent& rRangeSPExtent);
0130 };
0131
0132 }
0133
0134 #include "Acts/Seeding/detail/CylindricalSpacePointGrid.ipp"