File indexing completed on 2025-01-18 09:13:07
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;
0027
0028
0029
0030
0031
0032
0033 bool singleSeedCut(float weight, const InternalSpacePoint<SpacePoint>& bottom,
0034 const InternalSpacePoint<SpacePoint>&,
0035 const InternalSpacePoint<SpacePoint>&) const;
0036
0037
0038
0039
0040 std::vector<typename CandidatesForMiddleSp<
0041 const InternalSpacePoint<SpacePoint>>::value_type>
0042 cutPerMiddleSP(std::vector<typename CandidatesForMiddleSp<
0043 const InternalSpacePoint<SpacePoint>>::value_type>
0044 seedCandidates) const override;
0045 };
0046
0047 template <typename SpacePoint>
0048 float ATLASCuts<SpacePoint>::seedWeight(
0049 const InternalSpacePoint<SpacePoint>& bottom,
0050 const InternalSpacePoint<SpacePoint>&,
0051 const InternalSpacePoint<SpacePoint>& top) const {
0052 float weight = 0;
0053 if (bottom.radius() > 150) {
0054 weight = 400;
0055 }
0056 if (top.radius() < 150) {
0057 weight = 200;
0058 }
0059 return weight;
0060 }
0061
0062 template <typename SpacePoint>
0063 bool ATLASCuts<SpacePoint>::singleSeedCut(
0064 float weight, const InternalSpacePoint<SpacePoint>& b,
0065 const InternalSpacePoint<SpacePoint>&,
0066 const InternalSpacePoint<SpacePoint>&) const {
0067 return !(b.radius() > 150. && weight < 380.);
0068 }
0069
0070 template <typename SpacePoint>
0071 std::vector<typename CandidatesForMiddleSp<
0072 const InternalSpacePoint<SpacePoint>>::value_type>
0073 ATLASCuts<SpacePoint>::cutPerMiddleSP(
0074 std::vector<typename CandidatesForMiddleSp<
0075 const InternalSpacePoint<SpacePoint>>::value_type>
0076 seedCandidates) const {
0077 std::vector<typename CandidatesForMiddleSp<
0078 const InternalSpacePoint<SpacePoint>>::value_type>
0079 newSeedsVector;
0080 if (seedCandidates.size() <= 1) {
0081 return seedCandidates;
0082 }
0083
0084 newSeedsVector.push_back(std::move(seedCandidates[0]));
0085 std::size_t itLength = std::min(seedCandidates.size(), std::size_t{5});
0086
0087 for (std::size_t i(1); i < itLength; i++) {
0088 float weight = seedCandidates[i].weight;
0089 const auto& bottom = seedCandidates[i].bottom;
0090 if (weight > 200. || bottom->radius() > 43.) {
0091 newSeedsVector.push_back(std::move(seedCandidates[i]));
0092 }
0093 }
0094 return newSeedsVector;
0095 }
0096 }