|
LDMX Software
|
Interface that defines a user action. More...
#include <UserAction.h>
Public Member Functions | |
| 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 | 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 | the_log_ |
the logging channel user actions can use ldmx_log with | |
Interface that defines a user action.
Definition at line 47 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 71 of file UserAction.h.
|
inlinevirtual |
Method called at the beginning of a run.
TYPE::RUN
| run | Current Geant4 run object. |
Definition at line 89 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 135 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 80 of file UserAction.h.
|
inlinevirtual |
Method called at the end of a run.
TYPE::RUN
| run | Current Geant4 run object. |
Definition at line 98 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 145 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 116 of file UserAction.h.
|
inlinevirtual |
Method called at the beginning of a new event.
TYPE::STACKING
Definition at line 152 of file UserAction.h.
|
inlinevirtual |
Method called before the UserTrackingAction.
TYPE::TRACKING
| track | current Geant4 track |
Definition at line 107 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 125 of file UserAction.h.
|
protected |
|
protected |
The set of parameters used to configure this class.
Definition at line 188 of file UserAction.h.
|
protected |
the logging channel user actions can use ldmx_log with
Definition at line 191 of file UserAction.h.