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