LDMX Software
StepPrinter.h
1#ifndef BIASING_UTILITY_STEPPRINTER_H
2#define BIASING_UTILITY_STEPPRINTER_H
3
4/*~~~~~~~~~~~~~*/
5/* SimCore */
6/*~~~~~~~~~~~~~*/
8#include "SimCore/UserAction.h"
9
10namespace biasing {
11namespace utility {
12
17 public:
25 StepPrinter(const std::string& name,
27
29 virtual ~StepPrinter() = default;
30
37 void stepping(const G4Step* step) override;
38
40 std::vector<simcore::TYPE> getTypes() override {
41 return {simcore::TYPE::STEPPING};
42 }
43
44 private:
46 int trackID_{-9999};
47 std::string processName_{"UNDEFINED"};
48 int depth_{0};
49 std::unordered_map<int, int> trackParents_{};
50
51}; // StepPrinter
52
53} // namespace utility
54} // namespace biasing
55
56#endif // BIASING_UTILITY_STEPPRINTER_H
Class which implements the user tracking action.
User stepping action used to print the details of a step.
Definition StepPrinter.h:16
std::vector< simcore::TYPE > getTypes() override
Retrieve the type of actions this class defines.
Definition StepPrinter.h:40
virtual ~StepPrinter()=default
Destructor.
int trackID_
The track ID to filter on.
Definition StepPrinter.h:46
void stepping(const G4Step *step) override
Stepping action called when a step is taken during tracking of a particle.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Interface that defines a user action.
Definition UserAction.h:42