LDMX Software
|
Interface that defines a user action. More...
#include <UserAction.h>
Public Types | |
using | Factory |
factory for user actions | |
Public Member Functions | |
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 | EndOfEventAction (const G4Event *) |
Method called at the end 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 | stepping (const G4Step *) |
Method called after each simulation step. | |
virtual G4ClassificationOfNewTrack | ClassifyNewTrack (const G4Track *, const G4ClassificationOfNewTrack &cl) |
Method called when a track is updated. | |
virtual void | NewStage () |
Method called at the beginning of a new stage. | |
virtual void | PrepareNewEvent () |
Method called at the beginning of a new event. | |
virtual std::vector< TYPE > | getTypes ()=0 |
Protected Member Functions | |
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 | |
std::string | name_ {""} |
Name of the UserAction. | |
framework::config::Parameters | parameters_ |
The set of parameters used to configure this class. | |
mutable::framework::logging::logger | theLog_ |
the logging channel user actions can use ldmx_log with | |
Interface that defines a user action.
Definition at line 43 of file UserAction.h.
factory for user actions
Definition at line 54 of file UserAction.h.
simcore::UserAction::UserAction | ( | const std::string & | name, |
framework::config::Parameters & | parameters ) |
Constructor.
name | Name given the to class instance. |
Definition at line 16 of file UserAction.cxx.
|
inlinevirtual |
Method called at the beginning of every event.
TYPE::EVENT
event | Geant4 event object. |
Reimplemented in biasing::DeepEcalProcessFilter, biasing::EcalDarkBremFilter, biasing::MidShowerDiMuonBkgdFilter, biasing::MidShowerNuclearBkgdFilter, biasing::TaggerVetoFilter, biasing::TargetDarkBremFilter, and biasing::utility::PartialEnergySorter.
Definition at line 68 of file UserAction.h.
|
inlinevirtual |
Method called at the beginning of a run.
TYPE::RUN
run | Current Geant4 run object. |
Definition at line 86 of file UserAction.h.
|
inlinevirtual |
Method called when a track is updated.
TYPE::STEPPING
current | Geant4 track |
current | tracks' classification |
Reimplemented in biasing::EcalDarkBremFilter, biasing::EcalProcessFilter, biasing::TargetBremFilter, biasing::TargetProcessFilter, and biasing::utility::PartialEnergySorter.
Definition at line 132 of file UserAction.h.
|
inlinevirtual |
Method called at the end of every event.
TYPE::EVENT
event | Geant4 event object. |
Reimplemented in biasing::NonFiducialFilter, biasing::TaggerHitFilter, biasing::TaggerVetoFilter, biasing::TargetBremFilter, biasing::TargetDarkBremFilter, biasing::TargetENProcessFilter, and biasing::TargetProcessFilter.
Definition at line 77 of file UserAction.h.
|
inlinevirtual |
Method called at the end of a run.
TYPE::RUN
run | Current Geant4 run object. |
Definition at line 95 of file UserAction.h.
|
protected |
Get the current particle map.
Definition at line 27 of file UserAction.cxx.
References simcore::g4user::TrackingAction::get(), simcore::TrackMap::getParticleMap(), and simcore::g4user::TrackingAction::getTrackMap().
Referenced by biasing::utility::DecayChildrenKeeper::PostUserTrackingAction().
|
protected |
Get a handle to the event information.
This is static just to point out that it doesn't depend on any of the member variables of this class. It is just a helper function for shortening any code that interacts with our event information.
Definition at line 22 of file UserAction.cxx.
Referenced by biasing::DeepEcalProcessFilter::stepping(), biasing::MidShowerNuclearBkgdFilter::stepping(), biasing::TargetBremFilter::stepping(), and biasing::TargetProcessFilter::stepping().
|
pure virtual |
Must be defined by any UserActions so that we know what functions to call.
Implemented in biasing::DeepEcalProcessFilter, biasing::EcalDarkBremFilter, biasing::EcalProcessFilter, biasing::MidShowerDiMuonBkgdFilter, biasing::MidShowerNuclearBkgdFilter, biasing::NonFiducialFilter, biasing::PhotoNuclearProductsFilter, biasing::PhotoNuclearTopologyFilter, biasing::PrimaryToEcalFilter, biasing::TaggerHitFilter, biasing::TaggerVetoFilter, biasing::TargetBremFilter, biasing::TargetDarkBremFilter, biasing::TargetENProcessFilter, biasing::TargetProcessFilter, biasing::utility::DecayChildrenKeeper, biasing::utility::PartialEnergySorter, biasing::utility::StepPrinter, and biasing::utility::TrackProcessFilter.
|
inlinevirtual |
Method called at the beginning of a new stage.
TYPE::STACKING
Reimplemented in biasing::DeepEcalProcessFilter, biasing::EcalDarkBremFilter, biasing::MidShowerDiMuonBkgdFilter, biasing::MidShowerNuclearBkgdFilter, and biasing::utility::PartialEnergySorter.
Definition at line 142 of file UserAction.h.
|
inlinevirtual |
Method called after the UserTrackingAction.
TYPE::TRACKING
track | current Geant4 track |
Reimplemented in biasing::EcalDarkBremFilter, biasing::utility::DecayChildrenKeeper, and biasing::utility::TrackProcessFilter.
Definition at line 113 of file UserAction.h.
|
inlinevirtual |
Method called at the beginning of a new event.
TYPE::STACKING
Definition at line 149 of file UserAction.h.
|
inlinevirtual |
Method called before the UserTrackingAction.
TYPE::TRACKING
track | current Geant4 track |
Definition at line 104 of file UserAction.h.
|
inlinevirtual |
Method called after each simulation step.
TYPE::STEPPING
current | Geant4 step |
Reimplemented in biasing::DeepEcalProcessFilter, biasing::EcalProcessFilter, biasing::MidShowerDiMuonBkgdFilter, biasing::MidShowerNuclearBkgdFilter, biasing::NonFiducialFilter, biasing::PhotoNuclearProductsFilter, biasing::PhotoNuclearTopologyFilter, biasing::PrimaryToEcalFilter, biasing::TaggerHitFilter, biasing::TaggerVetoFilter, biasing::TargetBremFilter, biasing::TargetDarkBremFilter, biasing::TargetENProcessFilter, biasing::TargetProcessFilter, biasing::utility::PartialEnergySorter, and biasing::utility::StepPrinter.
Definition at line 122 of file UserAction.h.
|
protected |
|
protected |
The set of parameters used to configure this class.
Definition at line 185 of file UserAction.h.
|
protected |
the logging channel user actions can use ldmx_log
with
Definition at line 188 of file UserAction.h.