EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackSelector.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackSelector.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 <limits>
14 #include <string>
15 
16 namespace ActsExamples {
17 
19 class TrackSelector final : public BareAlgorithm {
20  public:
21  struct Config {
23  std::string inputTrackParameters;
25  std::string outputTrackParameters;
29  std::string outputTrackIndices;
30  // Minimum/maximum local positions.
31  double loc0Min = -std::numeric_limits<double>::infinity();
32  double loc0Max = std::numeric_limits<double>::infinity();
33  double loc1Min = -std::numeric_limits<double>::infinity();
34  double loc1Max = std::numeric_limits<double>::infinity();
35  // Minimum/maximum track time.
36  double timeMin = -std::numeric_limits<double>::infinity();
37  double timeMax = std::numeric_limits<double>::infinity();
38  // Direction cuts.
39  double phiMin = -std::numeric_limits<double>::infinity();
40  double phiMax = std::numeric_limits<double>::infinity();
41  double etaMin = -std::numeric_limits<double>::infinity();
42  double etaMax = std::numeric_limits<double>::infinity();
43  double absEtaMin = 0.0;
44  double absEtaMax = std::numeric_limits<double>::infinity();
45  // Momentum cuts.
46  double ptMin = 0.0;
47  double ptMax = std::numeric_limits<double>::infinity();
49  bool removeCharged = false;
51  bool removeNeutral = false;
52  };
53 
54  TrackSelector(const Config& cfg, Acts::Logging::Level lvl);
55 
56  ProcessCode execute(const AlgorithmContext& ctx) const final;
57 
58  private:
60 };
61 
62 } // namespace ActsExamples