File indexing completed on 2025-01-18 09:55:43
0001
0002
0003
0004
0005 #pragma once
0006
0007 #include <Acts/MagneticField/MagneticFieldContext.hpp>
0008 #include <Acts/Seeding/SeedFilterConfig.hpp>
0009 #include <Acts/Seeding/SeedFinderConfig.hpp>
0010 #include <Acts/Seeding/SeedFinderOrthogonalConfig.hpp>
0011 #include <edm4eic/TrackParametersCollection.h>
0012 #include <edm4eic/TrackerHitCollection.h>
0013 #include <spdlog/logger.h>
0014 #include <cstddef> // IWYU pragma: keep FIXME size_t missing in SeedConfirmationRangeConfig.hpp until Acts 27.2.0 (maybe even later)
0015 #include <memory>
0016 #include <tuple>
0017 #include <utility>
0018 #include <vector>
0019
0020 #include "ActsGeometryProvider.h"
0021 #include "DD4hepBField.h"
0022 #include "OrthogonalTrackSeedingConfig.h"
0023 #include "SpacePoint.h"
0024 #include "algorithms/interfaces/WithPodConfig.h"
0025
0026
0027 namespace eicrecon {
0028 class TrackSeeding:
0029 public eicrecon::WithPodConfig<eicrecon::OrthogonalTrackSeedingConfig> {
0030 public:
0031 void init(std::shared_ptr<const ActsGeometryProvider> geo_svc, std::shared_ptr<spdlog::logger> log);
0032 std::unique_ptr<edm4eic::TrackParametersCollection> produce(const edm4eic::TrackerHitCollection& trk_hits);
0033
0034 private:
0035 void configure();
0036
0037 std::shared_ptr<spdlog::logger> m_log;
0038 std::shared_ptr<const ActsGeometryProvider> m_geoSvc;
0039
0040 std::shared_ptr<const eicrecon::BField::DD4hepBField> m_BField = nullptr;
0041 Acts::MagneticFieldContext m_fieldctx;
0042
0043 Acts::SeedFilterConfig m_seedFilterConfig;
0044 Acts::SeedFinderOptions m_seedFinderOptions;
0045 Acts::SeedFinderOrthogonalConfig<SpacePoint> m_seedFinderConfig;
0046
0047 int determineCharge(std::vector<std::pair<float,float>>& positions, const std::pair<float,float>& PCA, std::tuple<float,float,float>& RX0Y0) const;
0048 std::pair<float,float> findPCA(std::tuple<float,float,float>& circleParams) const;
0049 std::vector<const eicrecon::SpacePoint*> getSpacePoints(const edm4eic::TrackerHitCollection& trk_hits);
0050 std::unique_ptr<edm4eic::TrackParametersCollection> makeTrackParams(SeedContainer& seeds);
0051
0052 std::tuple<float,float,float> circleFit(std::vector<std::pair<float,float>>& positions) const;
0053 std::tuple<float,float> lineFit(std::vector<std::pair<float,float>>& positions) const;
0054 };
0055 }