LDMX Software
UserAction.cxx
1
2#include "SimCore/UserAction.h"
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}
21
23 return static_cast<UserEventInformation*>(
24 G4EventManager::GetEventManager()->GetUserInformation());
25}
26
27const std::map<int, ldmx::SimParticle>& UserAction::getCurrentParticleMap()
28 const {
30}
31
32} // namespace simcore
Class which implements the user tracking action.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
std::map< int, ldmx::SimParticle > & getParticleMap()
Get the map of particles to be stored in output event.
Definition TrackMap.h:101
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.
std::string name_
Name of the UserAction.
Definition UserAction.h:181
framework::config::Parameters parameters_
The set of parameters used to configure this class.
Definition UserAction.h:184
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.