LDMX Software
StepPrinter.h
1#ifndef BIASING_UTILITY_STEPPRINTER_H
2#define BIASING_UTILITY_STEPPRINTER_H
3
4/*~~~~~~~~~~~~~*/
5/* SimCore */
6/*~~~~~~~~~~~~~*/
8
9namespace biasing {
10namespace utility {
11
16 public:
24 StepPrinter(const std::string& name,
26
28 virtual ~StepPrinter() = default;
29
36 void stepping(const G4Step* step) override;
37
39 std::vector<simcore::TYPE> getTypes() override {
40 return {simcore::TYPE::STEPPING};
41 }
42
43 private:
45 int track_id_{-9999};
46 std::string process_name_{"UNDEFINED"};
47 int depth_{0};
48 std::unordered_map<int, int> track_parents_{};
49
50}; // StepPrinter
51
52} // namespace utility
53} // namespace biasing
54
55#endif // BIASING_UTILITY_STEPPRINTER_H
File holding UserAction prototype and supporting macro.
User stepping action used to print the details of a step.
Definition StepPrinter.h:15
std::vector< simcore::TYPE > getTypes() override
Retrieve the type of actions this class defines.
Definition StepPrinter.h:39
virtual ~StepPrinter()=default
Destructor.
StepPrinter(const std::string &name, framework::config::Parameters &parameters)
Constructor.
int track_id_
The track ID to filter on.
Definition StepPrinter.h:45
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:26
Interface that defines a user action.
Definition UserAction.h:46