LDMX Software
UserAction.cxx
1
3
5
6/*~~~~~~~~~~~~*/
7/* Geant4 */
8/*~~~~~~~~~~~~*/
9#include "G4Event.hh"
10#include "G4Run.hh"
11#include "G4Step.hh"
12#include "G4Track.hh"
13
14namespace simcore {
15
16UserAction::UserAction(const std::string& name,
18 : name_{name},
19 parameters_{parameters},
20 the_log_{::framework::logging::makeLogger(name)} {}
21
23 return static_cast<UserEventInformation*>(
24 G4EventManager::GetEventManager()->GetUserInformation());
25}
26
27const std::map<int, ldmx::SimParticle>& UserAction::getCurrentParticleMap()
28 const {
30}
31
33
34} // namespace simcore
#define DEFINE_FACTORY(classtype)
This should go into an implementation file for your prototype class.
Definition Factory.h:411
Class which implements the user tracking action.
File holding UserAction prototype and supporting macro.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
std::map< int, ldmx::SimParticle > & getParticleMap()
Get the map of particles to be stored in output event.
Definition TrackMap.h:101
Interface that defines a user action.
Definition UserAction.h:47
UserAction(const std::string &name, framework::config::Parameters &parameters)
Constructor.
const std::map< int, ldmx::SimParticle > & getCurrentParticleMap() const
Get the current particle map.
UserEventInformation * getEventInfo() const
Get a handle to the event information.
Encapsulates user defined information associated with a Geant4 event.
TrackMap & getTrackMap()
Get a handle to the current TrackMap for the event.
static TrackingAction * get()
Get a pointer to the current UserTrackingAction from the G4RunManager.
All classes in the ldmx-sw project use this namespace.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...