SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
PairConvFilter.hh
Go to the documentation of this file.
1 #ifndef PLUGINS_PAIRCONV_FILTER_H
2 #define PLUGINS_PAIRCONV_FILTER_H
3 
4 //~~~ SLIC ~~~//
5 #include "UserActionPlugin.hh"
6 
7 // Forward declarations
8 class G4Step;
9 
10 namespace slic {
11 
17 
18 public:
20  PairConvFilter() = default;
21 
23  ~PairConvFilter() = default;
24 
26  std::string getName() { return "PairConvFilter"; }
27 
29  bool hasSteppingAction() final override { return true; }
30 
32  bool hasEventAction() final override { return true; }
33 
35  bool hasStackingAction() final override { return true; }
36 
38  bool hasRunAction() final override { return true; }
39 
45  void stepping(const G4Step *step) final override;
46 
52  void endEvent(const G4Event *) final override;
53 
60  void endRun(const G4Run* run) final override;
61 
70  G4ClassificationOfNewTrack stackingClassifyNewTrack(
71  const G4Track *,
72  const G4ClassificationOfNewTrack &currentTrackClass) final override;
73 
74 private:
76  G4Track *currentTrack_{nullptr};
77 
79  bool hasPairConv_{false};
80 
82  short pairConvCount_{0};
83 
84 }; // PairConvFilter
85 } // namespace slic
86 
87 #endif // PLUGINS_PAIRCONVFILTER_H_
bool hasRunAction() final override
PairConvFilter()=default
Default constructor.
~PairConvFilter()=default
Destructor.
bool hasSteppingAction() final override
bool hasPairConv_
Flag that denotes whether a conversion has been found.
bool hasStackingAction() final override
void endRun(const G4Run *run) final override
std::string getName()
G4ClassificationOfNewTrack stackingClassifyNewTrack(const G4Track *, const G4ClassificationOfNewTrack &currentTrackClass) final override
short pairConvCount_
Counter to keep track of the pair conversion count.
G4Track * currentTrack_
Pointer to the current track being processed.
void endEvent(const G4Event *) final override
bool hasEventAction() final override
void stepping(const G4Step *step) final override
User simulation plugin.