|
LDMX Software
|
Biases Geant4 to only process events where PN reaction occurred in the target. More...
#include <TargetProcessFilter.h>
Public Member Functions | |
| TargetProcessFilter (const std::string &name, framework::config::Parameters ¶meters) | |
| Class constructor. | |
| virtual | ~TargetProcessFilter ()=default |
| Destructor. | |
| void | stepping (const G4Step *step) override |
| Implementmthe stepping action which performs the target volume biasing. | |
| void | EndOfEventAction (const G4Event *) override |
| End of event action. | |
| 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. | |
| DECLARE_FACTORY (UserAction, std::shared_ptr< UserAction >, const std::string &, framework::config::Parameters &) | |
| factory for user actions | |
| 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 | |
| G4Track * | current_track_ {nullptr} |
| Pointer to the current track being processed. | |
| std::string | process_ {""} |
| The process to bias. | |
Additional Inherited Members | |
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. | |
| mutable::framework::logging::logger | the_log_ |
the logging channel user actions can use ldmx_log with | |
Biases Geant4 to only process events where PN reaction occurred in the target.
Definition at line 27 of file TargetProcessFilter.h.
| biasing::TargetProcessFilter::TargetProcessFilter | ( | const std::string & | name, |
| framework::config::Parameters & | parameters ) |
Class constructor.
Definition at line 23 of file TargetProcessFilter.cxx.
References framework::config::Parameters::get(), and process_.
|
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 29 of file TargetProcessFilter.cxx.
References current_track_.
|
overridevirtual |
End of event action.
Reimplemented from simcore::UserAction.
Definition at line 167 of file TargetProcessFilter.cxx.
|
inlineoverridevirtual |
Retrieve the type of actions this class defines.
Implements simcore::UserAction.
Definition at line 60 of file TargetProcessFilter.h.
|
overridevirtual |
Implementmthe 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 for 'World_PV' because in later geometries, there is an air gap between the target region and the recoil tracker.
Reimplemented from simcore::UserAction.
Definition at line 45 of file TargetProcessFilter.cxx.
References current_track_, simcore::UserEventInformation::decBremCandidateCount(), simcore::UserTrackInformation::get(), simcore::UserAction::getEventInfo(), and process_.
|
private |
Pointer to the current track being processed.
Definition at line 67 of file TargetProcessFilter.h.
Referenced by ClassifyNewTrack(), and stepping().
|
private |
The process to bias.
Definition at line 70 of file TargetProcessFilter.h.
Referenced by stepping(), and TargetProcessFilter().