Commit 7bdc6bb5 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'cosmics_time' into 'master'

DepositionCosmics: store total_time_simulated in ROOT Output

See merge request allpix-squared/allpix-squared!597
parents 38464937 0b61d0a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ void DepositionCosmicsModule::finalizeThread() {

void DepositionCosmicsModule::finalize() {
    LOG(STATUS) << "Total simulated time in CRY: " << Units::display(total_time_simulated_, {"us", "ms", "s"});
    config_.set("total_time_simulated", total_time_simulated_);

    // Call base class finalization:
    DepositionGeant4Module::finalize();
+3 −0
Original line number Diff line number Diff line
@@ -23,6 +23,9 @@ The first shower particle arriving in the event has a timestamp of `0ns`, all su
It should be noted that the time difference between the arrival of different particles of the same shower can amount up to hundreds of microseconds.
If this behavior is not desired, all particle timestamps can be forced to `0ns` by enabling the `reset_particle_time` switch.

The total time elapsed in the CRY simulation for the given number of showers is stored in the module configuration under the key `total_time_simulated`. If the ROOTObjectWriter is used to store the simulation result, this value is available from the output file.
In other cases, the value can be obtained from the log output of the run.

### Dependencies

This module inherits from and therefore requires the *DepositionGeant4* module as well as an installation Geant4.