LDMX Software
|
User action that allows a user to filter out events that don't result in a brem within the target. More...
#include <TargetBremFilter.h>
Public Member Functions | |
TargetBremFilter (const std::string &name, framework::config::Parameters ¶meters) | |
Constructor. | |
~TargetBremFilter () | |
Destructor. | |
void | stepping (const G4Step *step) override |
Implement the stepping action which performs the target volume biasing. | |
void | EndOfEventAction (const G4Event *) override |
Method called at the end of every event. | |
G4ClassificationOfNewTrack | ClassifyNewTrack (const G4Track *aTrack, const G4ClassificationOfNewTrack ¤tTrackClass) override |
Classify a new track which postpones track processing. | |
std::vector< simcore::TYPE > | getTypes () override |
Retrieve the type of actions this class defines. | |
Public Member Functions inherited from simcore::UserAction | |
UserAction (const std::string &name, framework::config::Parameters ¶meters) | |
Constructor. | |
virtual | ~UserAction ()=default |
Destructor. | |
virtual void | BeginOfEventAction (const G4Event *) |
Method called at the beginning of every event. | |
virtual void | BeginOfRunAction (const G4Run *) |
Method called at the beginning of a run. | |
virtual void | EndOfRunAction (const G4Run *) |
Method called at the end of a run. | |
virtual void | PreUserTrackingAction (const G4Track *) |
Method called before the UserTrackingAction. | |
virtual void | PostUserTrackingAction (const G4Track *) |
Method called after the UserTrackingAction. | |
virtual void | NewStage () |
Method called at the beginning of a new stage. | |
virtual void | PrepareNewEvent () |
Method called at the beginning of a new event. | |
Private Attributes | |
double | recoilMaxPThreshold_ {1500} |
Recoil electron threshold. | |
double | bremEnergyThreshold_ {2500} |
Brem gamma energy treshold. | |
bool | killRecoil_ {false} |
Flag indicating if the recoil electron track should be killed. | |
Additional Inherited Members | |
Public Types inherited from simcore::UserAction | |
using | Factory = ::simcore::Factory< UserAction, std::shared_ptr< UserAction >, const std::string &, framework::config::Parameters & > |
factory for user actions | |
Protected Member Functions inherited from simcore::UserAction | |
UserEventInformation * | getEventInfo () const |
Get a handle to the event information. | |
const std::map< int, ldmx::SimParticle > & | getCurrentParticleMap () const |
Get the current particle map. | |
Protected Attributes inherited from simcore::UserAction | |
std::string | name_ {""} |
Name of the UserAction. | |
framework::config::Parameters | parameters_ |
The set of parameters used to configure this class. | |
User action that allows a user to filter out events that don't result in a brem within the target.
Definition at line 25 of file TargetBremFilter.h.
biasing::TargetBremFilter::TargetBremFilter | ( | const std::string & | name, |
framework::config::Parameters & | parameters | ||
) |
Constructor.
Definition at line 18 of file TargetBremFilter.cxx.
References bremEnergyThreshold_, framework::config::Parameters::getParameter(), killRecoil_, and recoilMaxPThreshold_.
biasing::TargetBremFilter::~TargetBremFilter | ( | ) |
|
overridevirtual |
Classify a new track which postpones track processing.
Track processing resumes normally if a target PN interaction occurred.
aTrack | The Geant4 track. |
currentTrackClass | The current track classification. |
Reimplemented from simcore::UserAction.
Definition at line 30 of file TargetBremFilter.cxx.
|
overridevirtual |
Method called at the end of every event.
event | Geant4 event object. |
Reimplemented from simcore::UserAction.
Definition at line 143 of file TargetBremFilter.cxx.
|
inlineoverridevirtual |
Retrieve the type of actions this class defines.
Implements simcore::UserAction.
Definition at line 58 of file TargetBremFilter.h.
|
overridevirtual |
Implement the stepping action which performs the target volume biasing.
step | The Geant4 step. |
Check if the electron will be exiting the target
The 'recoil_PV' volume name is automatically constructed by Geant4's GDML parser and was found by inspecting the geometry using a visualization. This Physical Volume (PV) is associated with the recoil parent volume and so it will break if the recoil parent volume changes its name.
We also check if the next volume is World_PV because in some geometries (e.g. v14), there is a air-gap between the target region and the recoil.
Reimplemented from simcore::UserAction.
Definition at line 49 of file TargetBremFilter.cxx.
References bremEnergyThreshold_, simcore::UserTrackInformation::get(), simcore::UserAction::getEventInfo(), simcore::UserEventInformation::incBremCandidateCount(), killRecoil_, recoilMaxPThreshold_, and simcore::UserTrackInformation::tagBremCandidate().
|
private |
Brem gamma energy treshold.
Definition at line 68 of file TargetBremFilter.h.
Referenced by stepping(), and TargetBremFilter().
|
private |
Flag indicating if the recoil electron track should be killed.
Definition at line 71 of file TargetBremFilter.h.
Referenced by stepping(), and TargetBremFilter().
|
private |
Recoil electron threshold.
Definition at line 65 of file TargetBremFilter.h.
Referenced by stepping(), and TargetBremFilter().