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#include "Gaudi/Property.h"
14#include "GaudiKernel/ServiceHandle.h"
15
16// ISF includes
19
20// STL includes
21#include <string>
22
23namespace G4UA
24{
25
31 class MCTruthSteppingActionTool : public UserActionToolBase<MCTruthSteppingAction>
32 {
33
34 public:
35
37 MCTruthSteppingActionTool(const std::string& type, const std::string& name,
38 const IInterface* parent);
39
41 virtual StatusCode initialize() override final;
42
43 protected:
44
46 virtual std::unique_ptr<MCTruthSteppingAction>
48
50 StatusCode BeginOfAthenaEvent(HitCollectionMap&) override;
52 StatusCode EndOfAthenaEvent(HitCollectionMap&) override;
53
54 private:
55
57 Gaudi::Property<MCTruthSteppingAction::VolumeCollectionMap_t>
58 m_volumeCollectionMap{this, "VolumeCollectionMap", {},
59 "Map of volume name to output collection name"};
60
62 Gaudi::Property<int> m_secondarySavingLevel{
63 this, "SecondarySavingLevel", 2,
64 "Three valid options: 1 - Primaries; 2 - StoredSecondaries(default); 3 - All"};
65
67 Gaudi::Property<int> m_subDetVolLevel{
68 this, "SubDetVolumeLevel", 1,
69 "The level in the G4 volume hierarchy at which we find the sub-detector name"};
70
73 this, "TruthRecordSvc", "ISF_TruthRecordSvc", "ISF Particle Truth Service"};
74
77 this, "GeoIDSvc", "ISF_GeoIDSvc", "ISF GeoID Service"};
78
79 }; // class MCTruthSteppingActionTool
80
81} // namespace G4UA
82
83#endif
virtual std::unique_ptr< MCTruthSteppingAction > makeAndFillAction(G4AtlasUserActions &) override final
Setup the user action for current thread.
ServiceHandle< ISF::IGeoIDSvc > m_geoIDSvc
Geo ID Service.
ServiceHandle< ISF::ITruthSvc > m_truthRecordSvc
Central Truth Service.
Gaudi::Property< MCTruthSteppingAction::VolumeCollectionMap_t > m_volumeCollectionMap
Map of volume name to output collection name.
MCTruthSteppingActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Gaudi::Property< int > m_subDetVolLevel
The level in the G4 volume hierarchy at which we find the sub-detector.
virtual StatusCode initialize() override final
Initialize the tool.
StatusCode EndOfAthenaEvent(HitCollectionMap &) override
Calls EndOfAthenaEvent.
StatusCode BeginOfAthenaEvent(HitCollectionMap &) override
Calls BeginOfAthenaEvent.
Gaudi::Property< int > m_secondarySavingLevel
The saving level for secondaries.
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.