19#ifndef BDSEVENTACTION_H
20#define BDSEVENTACTION_H
22#include "BDSHitEnergyDeposition.hh"
23#include "BDSHitSampler.hh"
24#include "BDSTrajectoryFilter.hh"
27#include "G4UserEventAction.hh"
53 virtual void BeginOfEventAction(
const G4Event*);
54 virtual void EndOfEventAction(
const G4Event*);
57 G4int CurrentEventIndex()
const {
return currentEventIndex;}
74 G4bool verboseThisEvent,
77 const std::vector<BDSHitsCollectionSampler*>& allSamplerHits,
78 G4int nChar = 50)
const;
84 std::map<
BDSTrajectory*, std::bitset<BDS::NTrajectoryFilters> >& trajectoryFilters)
const;
88 G4bool verboseEventBDSIM;
89 G4int verboseEventStart;
90 G4int verboseEventStop;
93 G4bool storeTrajectorySecondary;
143 G4int currentEventIndex;
Process information at the event level.
G4String trajParticleIDToStore
Cache of variable from global constants.
void IncrementNTracks()
Interface for tracking action to increment the number of tracks in each event.
void ConnectTrajectory(std::map< BDSTrajectory *, bool > &interestingTraj, BDSTrajectory *trajectoryToConnect, std::map< BDSTrajectory *, std::bitset< BDS::NTrajectoryFilters > > &trajectoryFilters) const
G4int eCounterVacuumID
Collection ID for the vacuum energy deposition hits.
G4bool primaryAbsorbedInCollimator
Whether primary stopped in a collimator.
G4double trajectoryCutZ
Cache of variable from global constants.
G4int collimatorCollID
Collection ID for the collimator hits.
G4int eCounterFullID
Collection ID for general energy deposition full hits.
G4int worldExitCollID
Collection ID for the world exit hits.
G4int thinThingCollID
Collection ID for the thin thing hits.
std::vector< std::pair< double, double > > trajSRangeToStore
Cache of variable from global constants.
void SetPrimaryAbsorbedInCollimator(G4bool stoppedIn)
Flag that the primary was absorbed in a collimator - can be done externally to this class.
G4bool storeTrajectory
Cache of whether to store trajectories or not.
G4bool trajectoryFilterLogicAND
Cache of variable from global constants.
G4int eCounterWorldID
Collection ID for the world energy deposition hits.
std::bitset< BDS::NTrajectoryFilters > trajFiltersSet
Cache of variable from global constants.
std::vector< int > trajParticleIDIntToStore
Cache of variable from global constants.
G4int samplerCollID_cylin
Collection ID for cylindrical sampler hits.
std::map< G4String, G4int > extraSamplerCylinderCollectionIDs
Collection IDs for extra samplers.
G4int eCounterWorldContentsID
Collection ID for the world energy deposition hits.
BDSOutput * output
Cache of output instance. Not owned by this class.
BDSTrajectoriesToStore * IdentifyTrajectoriesForStorage(const G4Event *evt, G4bool verboseThisEvent, BDSHitsCollectionEnergyDeposition *eCounterHits, BDSHitsCollectionEnergyDeposition *eCounterFullHits, const std::vector< BDSHitsCollectionSampler * > &allSamplerHits, G4int nChar=50) const
Sift through all trajectories (if any) and mark for storage.
G4int samplerCollID_plane
Collection ID for plane sampler hits.
long long int nTracks
Accumulated number of tracks for the event.
std::map< G4String, G4int > extraSamplerSphereCollectionIDs
Collection IDs for extra samplers.
time_t startTime
Time at the start of the event.
std::map< G4String, G4int > scorerCollectionIDs
Collection IDs for all scorers.
G4bool trajConnect
Cache of variable from global constants.
G4int apertureCollID
Collection ID for the aperture hits.
std::vector< int > trajectorySamplerID
Cache of variable from global constants.
std::map< G4String, G4int > extraSamplerCollectionIDs
Collection IDs for extra samplers.
G4double trajectoryCutR
Cache of variable from global constants.
G4String trajParticleNameToStore
Cache of variable from global constants.
G4double stops
Precise stop time in seconds.
std::clock_t cpuStartTime
CPU time at the start of the event.
G4int trajDepth
Cache of variable from global constants.
std::map< G4int, const BDSTrajectoryPrimary * > primaryTrajectoriesCache
G4int eCounterID
Collection ID for general energy deposition hits.
void SetSamplerIDsForTrajectories(const std::vector< G4int > &samplerIDsIn)
Update the vector of sampler IDs to match for trajectories.
void RegisterPrimaryTrajectory(const BDSTrajectoryPrimary *trajectoryIn)
Append this trajectory to vector of primaries we keep to avoid sifting at the end of event.
G4int samplerCollID_sphere
Collection ID for spherical sampler hits.
G4bool storeTrajectoryAll
Store all trajectories irrespective of filters.
time_t stopTime
Time at the end of the event.
std::string seedStateAtStart
Seed state at start of the event.
G4double starts
Precise start time in seconds.
G4int eCounterTunnelID
Collection ID for the tunnel energy deposition hits.
G4double trajectoryEnergyThreshold
Cache of variable from global constants.
Interface to store event information use G4 hooks.
Output base class that defines interface for all output types.
Double map of trajectories to bitset of which filters matched whether to store them.
Trajectory information for only the primary.
Trajectory information from track including last scatter etc.