File indexing completed on 2025-08-06 08:11:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Seeding/IExperimentCuts.hpp"
0012
0013 #include <algorithm>
0014
0015 namespace Acts {
0016 template <typename SpacePoint>
0017 class ATLASCuts : public IExperimentCuts<SpacePoint> {
0018 public:
0019
0020
0021
0022
0023
0024 float seedWeight(const InternalSpacePoint<SpacePoint>& bottom,
0025 const InternalSpacePoint<SpacePoint>& middle,
0026 const InternalSpacePoint<SpacePoint>& top) const override;
0027
0028
0029
0030
0031
0032
0033 bool singleSeedCut(
0034 float weight, const InternalSpacePoint<SpacePoint>& bottom,
0035 const InternalSpacePoint<SpacePoint>& ,
0036 const InternalSpacePoint<SpacePoint>& ) const override;
0037
0038
0039
0040
0041 std::vector<typename CandidatesForMiddleSp<
0042 const InternalSpacePoint<SpacePoint>>::value_type>
0043 cutPerMiddleSP(std::vector<typename CandidatesForMiddleSp<
0044 const InternalSpacePoint<SpacePoint>>::value_type>
0045 seedCandidates) const override;
0046 };
0047
0048 template <typename SpacePoint>
0049 float ATLASCuts<SpacePoint>::seedWeight(
0050 const InternalSpacePoint<SpacePoint>& bottom,
0051 const InternalSpacePoint<SpacePoint>& ,
0052 const InternalSpacePoint<SpacePoint>& top) const {
0053 float weight = 0;
0054 if (bottom.radius() > 150) {
0055 weight = 400;
0056 }
0057 if (top.radius() < 150) {
0058 weight = 200;
0059 }
0060 return weight;
0061 }
0062
0063 template <typename SpacePoint>
0064 bool ATLASCuts<SpacePoint>::singleSeedCut(
0065 float weight, const InternalSpacePoint<SpacePoint>& b,
0066 const InternalSpacePoint<SpacePoint>& ,
0067 const InternalSpacePoint<SpacePoint>& ) const {
0068 return !(b.radius() > 150. && weight < 380.);
0069 }
0070
0071 template <typename SpacePoint>
0072 std::vector<typename CandidatesForMiddleSp<
0073 const InternalSpacePoint<SpacePoint>>::value_type>
0074 ATLASCuts<SpacePoint>::cutPerMiddleSP(
0075 std::vector<typename CandidatesForMiddleSp<
0076 const InternalSpacePoint<SpacePoint>>::value_type>
0077 seedCandidates) const {
0078 std::vector<typename CandidatesForMiddleSp<
0079 const InternalSpacePoint<SpacePoint>>::value_type>
0080 newSeedsVector;
0081 if (seedCandidates.size() <= 1) {
0082 return seedCandidates;
0083 }
0084
0085 newSeedsVector.push_back(std::move(seedCandidates[0]));
0086 std::size_t itLength = std::min(seedCandidates.size(), std::size_t(5));
0087
0088 for (std::size_t i(1); i < itLength; i++) {
0089 float weight = seedCandidates[i].weight;
0090 const auto& bottom = seedCandidates[i].bottom;
0091 if (weight > 200. || bottom->radius() > 43.) {
0092 newSeedsVector.push_back(std::move(seedCandidates[i]));
0093 }
0094 }
0095 return newSeedsVector;
0096 }
0097 }