Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ParticleKillAction.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ParticleKillAction.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 
11 #include "Acts/Geometry/Volume.hpp"
13 
14 #include <memory>
15 #include <string>
16 
17 #include <G4UserSteppingAction.hh>
18 
19 class G4Step;
20 namespace Acts {
21 class Volume;
22 } // namespace Acts
23 
24 namespace ActsExamples {
25 
30 class ParticleKillAction : public G4UserSteppingAction {
31  public:
33  struct Config {
35  std::shared_ptr<const Acts::Volume> volume;
37  double maxTime = std::numeric_limits<double>::infinity();
39  bool secondaries = false;
40  };
41 
47  std::unique_ptr<const Acts::Logger> logger =
48  Acts::getDefaultLogger("ParticleKillAction",
50  ~ParticleKillAction() override = default;
51 
54  void UserSteppingAction(const G4Step* step) override;
55 
56  private:
57  const Acts::Logger& logger() const { return *m_logger; }
58 
60  std::unique_ptr<const Acts::Logger> m_logger;
61 };
62 
63 } // namespace ActsExamples