Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:13:07

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 // Local include(s).
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   // don't cut first element
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 }