LDMX Software
TargetProcessFilter.h
1#ifndef BIASING_TARGETPROCESSFILTER_H
2#define BIASING_TARGETPROCESSFILTER_H
3
4/*~~~~~~~~~~~~~*/
5/* SimCore */
6/*~~~~~~~~~~~~~*/
7#include "SimCore/UserAction.h"
8
9/*~~~~~~~~~~~~~~~*/
10/* Framework */
11/*~~~~~~~~~~~~~~~*/
12#include "Framework/Configure/Parameters.h"
13#include "Framework/Logger.h"
14
15// Forward declaration
16class G4Event;
17class G4Step;
18class G4Track;
19
20namespace biasing {
21
28 public:
32 TargetProcessFilter(const std::string &name,
34
36 virtual ~TargetProcessFilter() = default;
37
42 void stepping(const G4Step *step) override;
43
47 void EndOfEventAction(const G4Event *) override;
48
55 G4ClassificationOfNewTrack ClassifyNewTrack(
56 const G4Track *aTrack,
57 const G4ClassificationOfNewTrack &currentTrackClass) override;
58
60 std::vector<simcore::TYPE> getTypes() override {
61 return {simcore::TYPE::EVENT, simcore::TYPE::STACKING,
62 simcore::TYPE::STEPPING};
63 }
64
65 private:
67 G4Track *currentTrack_{nullptr};
68
70 std::string process_{""};
71};
72
73} // namespace biasing
74
75#endif // BIASING_TARGETPROCESSFILTER_H
Biases Geant4 to only process events where PN reaction occurred in the target.
virtual ~TargetProcessFilter()=default
Destructor.
G4Track * currentTrack_
Pointer to the current track being processed.
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack, const G4ClassificationOfNewTrack &currentTrackClass) override
Classify a new track which postpones track processing.
std::string process_
The process to bias.
TargetProcessFilter(const std::string &name, framework::config::Parameters &parameters)
Class constructor.
std::vector< simcore::TYPE > getTypes() override
Retrieve the type of actions this class defines.
void EndOfEventAction(const G4Event *) override
End of event action.
void stepping(const G4Step *step) override
Implementmthe stepping action which performs the target volume biasing.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
Interface that defines a user action.
Definition UserAction.h:43