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