ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MMEventAction.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MMEventAction.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2018 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 
10 // MMEventAction.hpp
12 
13 #pragma once
14 
15 #include <memory>
16 
19 #include "G4UserEventAction.hh"
20 #include "globals.hh"
21 
23 namespace FW {
24 
25 namespace Geant4 {
26 
27 class MMSteppingAction;
28 
38  public:
40  MMEventAction();
41 
43  ~MMEventAction() override;
44 
46  static MMEventAction* Instance();
47 
51  void BeginOfEventAction(const G4Event* event) final override;
52 
56  void EndOfEventAction(const G4Event* event) final override;
57 
60  void Reset();
61 
62  // Access the material track records
63  std::vector<Acts::RecordedMaterialTrack> const MaterialTracks();
64 
65  // Access the step sim hit info
67 
68  private:
71 
73  std::vector<Acts::RecordedMaterialTrack> m_records;
75 };
76 
77 inline std::vector<Acts::RecordedMaterialTrack> const
79  auto rrecords = m_records;
80  m_records.clear();
81  return rrecords;
82 }
83 
85  return m_tracksteps;
86 }
87 
88 } // namespace Geant4
89 } // namespace FW