EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ATLASCuts.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ATLASCuts.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018 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 
10 
11 #include <algorithm>
12 
13 namespace Acts {
14 template <typename SpacePoint>
15 class ATLASCuts : public IExperimentCuts<SpacePoint> {
16  public:
22  float seedWeight(const InternalSpacePoint<SpacePoint>& bottom,
23  const InternalSpacePoint<SpacePoint>& middle,
24  const InternalSpacePoint<SpacePoint>& top) const;
31  bool singleSeedCut(float weight, const InternalSpacePoint<SpacePoint>& bottom,
32  const InternalSpacePoint<SpacePoint>&,
33  const InternalSpacePoint<SpacePoint>&) const;
34 
39  std::vector<std::pair<float, std::unique_ptr<const InternalSeed<SpacePoint>>>>
42  std::pair<float, std::unique_ptr<const InternalSeed<SpacePoint>>>>
43  seeds) const;
44 };
45 
46 template <typename SpacePoint>
48  const InternalSpacePoint<SpacePoint>& bottom,
49  const InternalSpacePoint<SpacePoint>&,
50  const InternalSpacePoint<SpacePoint>& top) const {
51  float weight = 0;
52  if (bottom.radius() > 150) {
53  weight = 400;
54  }
55  if (top.radius() < 150) {
56  weight = 200;
57  }
58  return weight;
59 }
60 
61 template <typename SpacePoint>
63  float weight, const InternalSpacePoint<SpacePoint>& b,
64  const InternalSpacePoint<SpacePoint>&,
65  const InternalSpacePoint<SpacePoint>&) const {
66  return !(b.radius() > 150. && weight < 380.);
67 }
68 
69 template <typename SpacePoint>
70 std::vector<std::pair<float, std::unique_ptr<const InternalSeed<SpacePoint>>>>
73  std::pair<float, std::unique_ptr<const InternalSeed<SpacePoint>>>>
74  seeds) const {
75  std::vector<std::pair<float, std::unique_ptr<const InternalSeed<SpacePoint>>>>
76  newSeedsVector;
77  if (seeds.size() > 1) {
78  newSeedsVector.push_back(std::move(seeds[0]));
79  size_t itLength = std::min(seeds.size(), size_t(5));
80  // don't cut first element
81  for (size_t i = 1; i < itLength; i++) {
82  if (seeds[i].first > 200. || seeds[i].second->sp[0]->radius() > 43.) {
83  newSeedsVector.push_back(std::move(seeds[i]));
84  }
85  }
86  return newSeedsVector;
87  }
88  return seeds;
89 }
90 } // namespace Acts