TRUTH Derivations

Last update: 08 Mar 2024 [History] [Edit]

Before a MC request can be submitted for central production, it needs to be validated to ensure that the output is as expected. The first step to do this is to produce TRUTH derivations from the EVNT file produced by the Gen_tf.py command.

Introduction to derivations

Derivations follow the xAOD format and typically contain a subset of the available information as well as additional information compared to primary xAODs. In the case of TRUTH derivations, information about the truth record (simulated particles before they go through the detector simulation) for all events.

There are four types of TRUTH derivations, each containing a different amount of the truth record. The formats are as follows:

  • TRUTH0: An exact copy of the input EVNT file in xAOD format. This includes all particles and vertices and their corresponding links.
  • TRUTH1: The reduced containers from TRUTH3 and complete collection of particles from TRUTH0 as well as links to truth jet constituents and truth charged particle jets.
  • TRUTH2: The reduced containers from TRUTH3 and the “compact hard truth record” that removes soft parts of the truth record while maintaining much of the full navigability.
  • TRUTH3: This is the main truth analysis format. It contains containers with the main truth information that is needed for analyses purposes. This is the same format that the DAOD_PHYS and DAOD_PHYSLITE formats use.

For this tutorial, we will be using TRUTH1 for the MC validation. The format provides the complete truth record navigation necessary to validate the physics process.

Producing TRUTH derivations

Begin by creating the directory MCTutorial/MCDerivation and navigate there. Set up a recent Athena release in a new shell.

setupATLAS
asetup Athena,24.0.24

To produce a derivation from evgen.root, use the following command:

Derivation_tf.py \
    --CA True \
    --inputEVNTFile=../MCGeneration/evgen.root \
    --outputDAODFile=mcval.pool.root \
    --formats TRUTH1

tip You can provide a path to evgen.root as the inputEVNTFile argument or copy it into the same directory where the command is being run. Using a path reduces the number of redundant file copies and ensures you run over the latest input file.

This will produce a file in the DAOD_TRUTH1 format, as indicated in its name. This will be the file we will use for the validation. It also produces a logfile named log.EVNTtoDAOD that can be useful for debugging.

tip You can simultaneously produce multiple derivations in the same command. This is done by adding multiple DAOD formats separated by commas as the formats argument. E.g., --formats TRUTH1,TRUTH3

You can check the content of your DAOD using

checkxAOD.py DAOD_TRUTH1.mcval.pool.root

This will print information about all of the xAOD containers available in the file.