Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TestHostCuts.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TestHostCuts.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 // Local include(s).
10 #include "TestHostCuts.hpp"
11 
16  float weight = 0;
17  if (bottom.radius() > 150) {
18  weight = 400;
19  }
20  if (top.radius() < 150) {
21  weight = 200;
22  }
23  return weight;
24 }
25 
27  float weight, const Acts::InternalSpacePoint<TestSpacePoint>& b,
30  return !(b.radius() > 150. && weight < 380.);
31 }
32 
33 std::vector<typename Acts::CandidatesForMiddleSp<
36  std::vector<typename Acts::CandidatesForMiddleSp<
38  seedCandidates) const {
39  std::vector<typename Acts::CandidatesForMiddleSp<
41  newSeedsVector;
42  if (seedCandidates.size() <= 1) {
43  return seedCandidates;
44  }
45 
46  newSeedsVector.push_back(std::move(seedCandidates[0]));
47  std::size_t itLength = std::min(seedCandidates.size(), std::size_t(5));
48  // don't cut first element
49  for (std::size_t i(1); i < itLength; i++) {
50  float weight = seedCandidates[i].weight;
51  const auto& bottom = seedCandidates[i].bottom;
52  if (weight > 200. or bottom->radius() > 43.) {
53  newSeedsVector.push_back(std::move(seedCandidates[i]));
54  }
55  }
56  return newSeedsVector;
57 }