Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MaterialSteppingAction.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MaterialSteppingAction.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-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 #include <vector>
17 
18 #include <G4UserSteppingAction.hh>
19 
20 class G4Step;
21 
22 namespace ActsExamples {
23 
31 class MaterialSteppingAction final : public G4UserSteppingAction {
32  public:
34  struct Config {
35  std::shared_ptr<EventStore> eventStore;
36 
37  std::vector<std::string> excludeMaterials = {};
38  };
39 
45  std::unique_ptr<const Acts::Logger> logger =
46  Acts::getDefaultLogger("SimParticleTranslation",
48  ~MaterialSteppingAction() override;
49 
53  void UserSteppingAction(const G4Step* step) override;
54 
55  private:
58 
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