 |
Belle II Software
release-05-02-19
|
12 #ifndef SIMULATION_MODULES_FULLSIM_FULLSIMTIMINGMODULE_H
13 #define SIMULATION_MODULES_FULLSIM_FULLSIMTIMINGMODULE_H
15 #include <framework/core/Module.h>
16 #include <simulation/kernel/StepTiming.h>
59 virtual void event()
override;
66 void processStep(G4Track* track, G4LogicalVolume* volume,
double time);
92 #endif // SIMULATION_MODULES_FULLSIM_FULLSIMTIMINGMODULE_H
unsigned int m_eventCount
number of events with m_eventTime>0
FullSimTimingModule()
Constructor: Sets the description, the properties and the parameters of the module.
FullSimTimingModule & operator=(const FullSimTimingModule &)=delete
No assignment.
Simulation::StepTiming * m_timing
instance of the StepTiming class which records the step times in geant4
virtual void initialize() override
Setup the timing structure.
Provide more detailled timing info for FullSim module.
std::string m_rootFileName
filename of the root file to store the timing profile
std::map< const G4Region *, double >::iterator m_lastRegion
iterator pointing to the region of the last step to speed up lookup
void processStep(G4Track *track, G4LogicalVolume *volume, double time)
store the time it took a Geant4 track for one step inside a volume
std::map< const G4Region *, double > m_regionCache
map containing the amount of time spent in each region
Abstract base class for different kinds of events.
Class to perform more detailed timing studies of the Geant4 simulation.
virtual void terminate() override
Save the output.
double m_eventTime
stepping time of the current event
double m_totalTime
total time spent stepping through the simulation geometry
std::map< const G4Region *, int > m_regionIndices
map between region and and bin indices in the TProfile
virtual void event() override
Save the simulation time for each region in a profile.
TProfile * m_timingProfile
profile of the time spent per event in each region
bool m_isInitialized
remember whether we aleady initialized everything