EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ParticleSelector.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ParticleSelector.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019-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 
12 
13 #pragma once
14 
17 
18 #include <limits>
19 
20 namespace ActsExamples {
21 
23 class ParticleSelector final : public BareAlgorithm {
24  public:
25  struct Config {
27  std::string inputParticles;
29  std::string outputParticles;
30  // Minimum/maximum distance from the origin in the tranverse plane.
31  double rhoMin = 0;
32  double rhoMax = std::numeric_limits<double>::infinity();
33  // Minimum/maximum absolute distance from the origin along z.
34  double absZMin = 0;
35  double absZMax = std::numeric_limits<double>::infinity();
36  // Minimum/maximum particle time.
37  double timeMin = -std::numeric_limits<double>::infinity();
38  double timeMax = std::numeric_limits<double>::infinity();
39  // Direction cuts.
40  double phiMin = -std::numeric_limits<double>::infinity();
41  double phiMax = std::numeric_limits<double>::infinity();
42  double etaMin = -std::numeric_limits<double>::infinity();
43  double etaMax = std::numeric_limits<double>::infinity();
44  double absEtaMin = 0;
45  double absEtaMax = std::numeric_limits<double>::infinity();
46  // Momentum cuts.
47  double ptMin = 0;
48  double ptMax = std::numeric_limits<double>::infinity();
50  bool removeCharged = false;
52  bool removeNeutral = false;
53  };
54 
56  static void addOptions(Options::Description& desc);
58  static Config readConfig(const Options::Variables& vars);
59 
61 
62  ProcessCode execute(const AlgorithmContext& ctx) const final;
63 
64  private:
66 };
67 
68 } // namespace ActsExamples