Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SensitiveSteppingAction.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SensitiveSteppingAction.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2021 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 
13 
14 #include <memory>
15 #include <string>
16 
17 #include <G4UserSteppingAction.hh>
18 
19 class G4Step;
20 
21 namespace ActsExamples {
22 
28 class SensitiveSteppingAction : public G4UserSteppingAction {
29  public:
31  struct Config {
32  std::shared_ptr<EventStore> eventStore;
33 
35  bool charged = true;
36  bool neutral = false;
37  bool primary = true;
38  bool secondary = true;
39  };
40 
46  std::unique_ptr<const Acts::Logger> logger =
47  Acts::getDefaultLogger("SensitiveSteppingAction",
49  ~SensitiveSteppingAction() override = default;
50 
53  void UserSteppingAction(const G4Step* step) override;
54 
55  protected:
57 
58  private:
60  const Acts::Logger& logger() const { return *m_logger; }
61 
63  EventStore& eventStore() const { return *m_cfg.eventStore; }
64 
66  std::unique_ptr<const Acts::Logger> m_logger;
67 };
68 
69 } // namespace ActsExamples