File indexing completed on 2025-01-18 09:13:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "TestHostCuts.hpp"
0011
0012 float TestHostCuts::seedWeight(
0013 const Acts::InternalSpacePoint<TestSpacePoint>& bottom,
0014 const Acts::InternalSpacePoint<TestSpacePoint>&,
0015 const Acts::InternalSpacePoint<TestSpacePoint>& top) const {
0016 float weight = 0;
0017 if (bottom.radius() > 150) {
0018 weight = 400;
0019 }
0020 if (top.radius() < 150) {
0021 weight = 200;
0022 }
0023 return weight;
0024 }
0025
0026 bool TestHostCuts::singleSeedCut(
0027 float weight, const Acts::InternalSpacePoint<TestSpacePoint>& b,
0028 const Acts::InternalSpacePoint<TestSpacePoint>&,
0029 const Acts::InternalSpacePoint<TestSpacePoint>&) const {
0030 return !(b.radius() > 150. && weight < 380.);
0031 }
0032
0033 std::vector<typename Acts::CandidatesForMiddleSp<
0034 const Acts::InternalSpacePoint<TestSpacePoint>>::value_type>
0035 TestHostCuts::cutPerMiddleSP(
0036 std::vector<typename Acts::CandidatesForMiddleSp<
0037 const Acts::InternalSpacePoint<TestSpacePoint>>::value_type>
0038 seedCandidates) const {
0039 std::vector<typename Acts::CandidatesForMiddleSp<
0040 const Acts::InternalSpacePoint<TestSpacePoint>>::value_type>
0041 newSeedsVector;
0042 if (seedCandidates.size() <= 1) {
0043 return seedCandidates;
0044 }
0045
0046 newSeedsVector.push_back(std::move(seedCandidates[0]));
0047 std::size_t itLength = std::min(seedCandidates.size(), std::size_t{5});
0048
0049 for (std::size_t i(1); i < itLength; i++) {
0050 float weight = seedCandidates[i].weight;
0051 const auto& bottom = seedCandidates[i].bottom;
0052 if (weight > 200. or bottom->radius() > 43.) {
0053 newSeedsVector.push_back(std::move(seedCandidates[i]));
0054 }
0055 }
0056 return newSeedsVector;
0057 }