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
27#include "G4DarkBreM/G4APrime.h" //checking if particles match A'
28#include "G4DarkBreM/G4DarkBremsstrahlung.h" //checking for dark brem secondaries
29#include "G4LogicalVolumeStore.hh" //for the store
31#include "SimCore/G4User/UserTrackInformation.h" //make sure A' is saved
32
33namespace biasing {
34
52 public:
58 EcalDarkBremFilter(const std::string& name,
60
65
71 std::vector<simcore::TYPE> getTypes() override {
72 return {simcore::TYPE::STACKING, simcore::TYPE::EVENT,
73 simcore::TYPE::TRACKING};
74 }
75
81 void BeginOfEventAction(const G4Event* event) override;
82
96 G4ClassificationOfNewTrack ClassifyNewTrack(
97 const G4Track* aTrack,
98 const G4ClassificationOfNewTrack& currentTrackClass) override;
99
110 void NewStage() override;
111
122 void PostUserTrackingAction(const G4Track* track) override;
123
124 private:
131 bool inDesiredVolume(const G4Track*) const;
132
141 void AbortEvent(const std::string& reason) const;
142
143 private:
153
157 std::vector<G4LogicalVolume*> volumes_;
158
165
166}; // EcalDarkBremFilter
167} // namespace biasing
168
169#endif // BIASING_ECALDARKBREMFILTER_H__
File holding UserAction prototype and supporting macro.
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 ...
bool found_ap_
Have we found the A' yet?
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.
void AbortEvent(const std::string &reason) const
Helper to abort an event with a message.
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.
std::vector< simcore::TYPE > getTypes() override
Get the types of actions this class can do.
EcalDarkBremFilter(const std::string &name, framework::config::Parameters &parameters)
Class constructor.
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:29
Interface that defines a user action.
Definition UserAction.h:47