ATLAS Offline Software
Loading...
Searching...
No Matches
MaterialStepRecorder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6// MaterialStepRecorder.h, (c) ATLAS Detector software
8
9#ifndef MaterialStepRecorder_H
10#define MaterialStepRecorder_H
11
17
18#include <vector>
19
21#include "GaudiKernel/ServiceHandle.h"
22
24
25#include "G4UserEventAction.hh"
26#include "G4UserRunAction.hh"
27#include "G4UserSteppingAction.hh"
28
33
34
35namespace G4UA
36{
37
38 class MaterialStepRecorder: public AthMessaging, public G4UserEventAction,
39 public G4UserRunAction, public G4UserSteppingAction
40 {
41
42 public:
44 virtual void BeginOfEventAction(const G4Event*) override;
45 virtual void EndOfEventAction(const G4Event*) override;
46 virtual void BeginOfRunAction(const G4Run*) override;
47 virtual void UserSteppingAction(const G4Step*) override;
48 private:
49
52
53 Trk::MaterialStepCollection* m_matStepCollection; //FIXME convert to a WriteHandle
54 std::string m_matStepCollectionName; //FIXME should be passed in via a Config struct rather than hardcoded.
55
56 bool m_recordComposition; //FIXME should be passed in via a Config struct rather than hardcoded.
57
59 size_t m_eventID;
60
61 Trk::ElementTable* m_elementTable; //FIXME convert to a WriteHandle
62 std::string m_elementTableName;
63
65
66 }; // class MaterialStepRecorder
67
68} // namespace G4UA
69
70#endif
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
virtual void EndOfEventAction(const G4Event *) override
Trk::ElementTable * m_runElementTable
virtual void UserSteppingAction(const G4Step *) override
Trk::MaterialStepCollection * m_matStepCollection
Trk::ElementTable * m_elementTable
virtual void BeginOfEventAction(const G4Event *) override
virtual void BeginOfRunAction(const G4Run *) override
ServiceHandle< StoreGateSvc > m_evtStore
Pointer to StoreGate (event store by default)
DataVector< Trk::MaterialStep > MaterialStepCollection