LDMX Software
EcalDarkBremFilter.h
Go to the documentation of this file.
1
10#ifndef BIASING_ECALDARKBREMFILTER_H_
11#define BIASING_ECALDARKBREMFILTER_H_
12
13//----------------//
14// C++ StdLib //
15//----------------//
16#include <algorithm>
17
18//------------//
19// Geant4 //
20//------------//
21#include "G4RunManager.hh"
22
23/*~~~~~~~~~~~~*/
24/* SimCore */
25/*~~~~~~~~~~~~*/
26#include "SimCore/UserAction.h"
27
28namespace biasing {
29
47 public:
53 EcalDarkBremFilter(const std::string& name,
55
60
66 std::vector<simcore::TYPE> getTypes() override {
67 return {simcore::TYPE::STACKING, simcore::TYPE::EVENT,
68 simcore::TYPE::TRACKING};
69 }
70
76 void BeginOfEventAction(const G4Event* event) override;
77
91 G4ClassificationOfNewTrack ClassifyNewTrack(
92 const G4Track* aTrack,
93 const G4ClassificationOfNewTrack& currentTrackClass) override;
94
105 void NewStage() override;
106
117 void PostUserTrackingAction(const G4Track* track) override;
118
119 private:
126 bool inDesiredVolume(const G4Track*) const;
127
136 void AbortEvent(const std::string& reason) const;
137
138 private:
148
152 std::vector<G4LogicalVolume*> volumes_;
153
160
161}; // EcalDarkBremFilter
162} // namespace biasing
163
164#endif // BIASING_ECALDARKBREMFILTER_H__
This class is meant to filter for events that produce a dark brem occuring within the ECal and produc...
~EcalDarkBremFilter()
Class destructor.
void BeginOfEventAction(const G4Event *event) override
Reset flag on if A' has been found.
void NewStage() override
When using the PartialEnergySorter, the first time that a new stage begins is when all particles are ...
double threshold_
Minimum energy [MeV] that the A' should have to keep the event.
void PostUserTrackingAction(const G4Track *track) override
Make sure A' is saved.
bool foundAp_
Have we found the A' yet?
bool inDesiredVolume(const G4Track *) const
Check if input volume is in the desired volume name.
std::vector< G4LogicalVolume * > volumes_
The volumes that the filter will be applied to.
void AbortEvent(const std::string &reason) const
Helper to abort an event with a message.
std::vector< simcore::TYPE > getTypes() override
Get the types of actions this class can do.
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack, const G4ClassificationOfNewTrack &currentTrackClass) override
We return the classification of the track done by the PartialEnergySorter, but we can check here if t...
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Interface that defines a user action.
Definition UserAction.h:42