6 Output Data Handling

The output of the data record of the accepted MC particle record and the corresponding sets of hits in the various subdetectors is basic to further handing data originating from simulated particle collisions. In DDG4 the handling of output data is implemented as a specialization of a Geant4EventAction since the output needs to written at the end of each simulated event.

Currently there are three types of output formats implemented:

  • Writing the MC particle record and the Geant4 hits natively as ROOT objects to a ROOT file. This is a very simple solution, writes the entire event as a ROOT TTree object. The persistent data format of the objects is the same as the transition data format in memory used during the simulation step.
  • Writing the particle record and the hit structures in LCIO data format. For details of the LCIO data format please consult the LCIO manual.
  • Writing the particle record and the hit structures in the EDMS data format developed by the CERN/SFT data format. For details of the LCIO data format please consult the LCIO manual.

Unless the native ROOT format is used for data output, the data format of the transient representation of Monte-Carlo particles and the resulting tracker- and calorimeter hits differes from the persistent representation and requires data conversion. The overheads of such conversions however are typically neglidgeble with respect to the rather large resource usage required for simulation.

The component properties of the generic output class:



Class name

Geant4OutputAction

File name

DDG4/src/Geant4OutputAction.cpp

Type

Geant4Action



Component Properties:

defaults apply

Output (string)

String representation of the output-file

HandleErrorsAsFatal (bool)

Convert any error of the concrete implementation

into a fatal exception causing DDG4 to stop processing.

The component properties of the ROOT output class:



Class name

Geant4Output2ROOT

File name

DDG4/src/Geant4Output2ROOT.cpp

Type

Geant4Action



Component Properties:

defaults apply

Section (string)

Name of the ROOT TTree to store the event data.

Default: EVENT

HandleMCTruth (bool)

Handle the results of the Monte-Carlo thruth handler

when outputting data

DisabledCollections

vector<string>

Geant4 filled collections, which should be excluded

from the output record.

DisableParticles (bool)

Inhibit the output of the particle record.