Analysis Software
Documentation for sPHENIX simulation 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) 2023 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 #pragma once
10 
12 
13 #include <algorithm>
14 
15 namespace Acts {
16 template <typename SpacePoint>
17 class ATLASCuts : public IExperimentCuts<SpacePoint> {
18  public:
24  float seedWeight(const InternalSpacePoint<SpacePoint>& bottom,
25  const InternalSpacePoint<SpacePoint>& middle,
26  const InternalSpacePoint<SpacePoint>& top) const;
33  bool singleSeedCut(float weight, const InternalSpacePoint<SpacePoint>& bottom,
34  const InternalSpacePoint<SpacePoint>&,
35  const InternalSpacePoint<SpacePoint>&) const;
36 
40  std::vector<typename CandidatesForMiddleSp<
41  const InternalSpacePoint<SpacePoint>>::value_type>
42  cutPerMiddleSP(std::vector<typename CandidatesForMiddleSp<
43  const InternalSpacePoint<SpacePoint>>::value_type>
44  seedCandidates) const override;
45 };
46 
47 template <typename SpacePoint>
49  const InternalSpacePoint<SpacePoint>& bottom,
50  const InternalSpacePoint<SpacePoint>&,
51  const InternalSpacePoint<SpacePoint>& top) const {
52  float weight = 0;
53  if (bottom.radius() > 150) {
54  weight = 400;
55  }
56  if (top.radius() < 150) {
57  weight = 200;
58  }
59  return weight;
60 }
61 
62 template <typename SpacePoint>
64  float weight, const InternalSpacePoint<SpacePoint>& b,
65  const InternalSpacePoint<SpacePoint>&,
66  const InternalSpacePoint<SpacePoint>&) const {
67  return !(b.radius() > 150. && weight < 380.);
68 }
69 
70 template <typename SpacePoint>
71 std::vector<typename CandidatesForMiddleSp<
72  const InternalSpacePoint<SpacePoint>>::value_type>
74  std::vector<typename CandidatesForMiddleSp<
75  const InternalSpacePoint<SpacePoint>>::value_type>
76  seedCandidates) const {
77  std::vector<typename CandidatesForMiddleSp<
78  const InternalSpacePoint<SpacePoint>>::value_type>
79  newSeedsVector;
80  if (seedCandidates.size() <= 1) {
81  return seedCandidates;
82  }
83 
84  newSeedsVector.push_back(std::move(seedCandidates[0]));
85  std::size_t itLength = std::min(seedCandidates.size(), std::size_t(5));
86  // don't cut first element
87  for (std::size_t i(1); i < itLength; i++) {
88  float weight = seedCandidates[i].weight;
89  const auto& bottom = seedCandidates[i].bottom;
90  if (weight > 200. or bottom->radius() > 43.) {
91  newSeedsVector.push_back(std::move(seedCandidates[i]));
92  }
93  }
94  return newSeedsVector;
95 }
96 } // namespace Acts