ATLAS Offline Software
Loading...
Searching...
No Matches
MCTruthSteppingActionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MCTruthBase_MCTruthSteppingActionTool_h
6#define MCTruthBase_MCTruthSteppingActionTool_h
7
8// Local includes
10
11// Infrastructure includes
13
14// STL includes
15#include <string>
16#include <map>
17
18namespace G4UA
19{
20
26 class MCTruthSteppingActionTool : public UserActionToolBase<MCTruthSteppingAction>
27 {
28
29 public:
30
32 MCTruthSteppingActionTool(const std::string& type, const std::string& name,
33 const IInterface* parent);
34
36 virtual StatusCode initialize() override final;
37
38 protected:
39
41 virtual std::unique_ptr<MCTruthSteppingAction>
43
45 StatusCode BeginOfAthenaEvent(HitCollectionMap&) override;
47 StatusCode EndOfAthenaEvent(HitCollectionMap&) override;
48
49 private:
50
52 std::map<std::string, std::string> m_volumeCollectionMap;
53
54 }; // class MCTruthSteppingActionTool
55
56} // namespace G4UA
57
58#endif
virtual std::unique_ptr< MCTruthSteppingAction > makeAndFillAction(G4AtlasUserActions &) override final
Setup the user action for current thread.
std::map< std::string, std::string > m_volumeCollectionMap
Map of volume name to output collection name.
MCTruthSteppingActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
virtual StatusCode initialize() override final
Initialize the tool.
StatusCode EndOfAthenaEvent(HitCollectionMap &) override
Calls EndOfAthenaEvent.
StatusCode BeginOfAthenaEvent(HitCollectionMap &) override
Calls BeginOfAthenaEvent.
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Small wrapper around hit collection map to facilitate accessing the hit collection.
Struct for passing around user actions.