EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SteppingAction.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SteppingAction.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-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 
9 #pragma once
10 
13 
14 #include <vector>
15 
16 #include <G4UserSteppingAction.hh>
17 #include <globals.hh>
18 
19 namespace ActsExamples {
20 
28 class SteppingAction final : public G4UserSteppingAction {
29  public:
31  static SteppingAction* instance();
32 
35  ~SteppingAction() final override;
36 
40  void UserSteppingAction(const G4Step* step) final override;
41 
43  void clear();
44 
46  const std::vector<Acts::MaterialInteraction>& materialSteps() const {
47  return m_materialSteps;
48  }
49 
51  const ActsExamples::SimHitContainer::sequence_type& trackSteps() const {
52  return m_trackSteps;
53  }
54 
55  private:
58 
60  std::vector<Acts::MaterialInteraction> m_materialSteps;
62  ActsExamples::SimHitContainer::sequence_type m_trackSteps;
63 };
64 
65 } // namespace ActsExamples