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
14// Forward declaration
15class G4Event;
16class G4Step;
17class G4Track;
18
19namespace biasing {
20
27 public:
31 TargetProcessFilter(const std::string &name,
33
35 virtual ~TargetProcessFilter() = default;
36
41 void stepping(const G4Step *step) override;
42
46 void EndOfEventAction(const G4Event *) override;
47
54 G4ClassificationOfNewTrack ClassifyNewTrack(
55 const G4Track *aTrack,
56 const G4ClassificationOfNewTrack &currentTrackClass) override;
57
59 std::vector<simcore::TYPE> getTypes() override {
60 return {simcore::TYPE::EVENT, simcore::TYPE::STACKING,
61 simcore::TYPE::STEPPING};
62 }
63
64 private:
66 G4Track *currentTrack_{nullptr};
67
69 std::string process_{""};
70};
71
72} // namespace biasing
73
74#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.
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:27
Interface that defines a user action.
Definition UserAction.h:42