Calculation of common variables for AHCAL engineering prototype is implemented in CALICE software as a Marlin processor (StdVariables.cc).
Note: if you work with setup including tail catcher and/or pre-shower layer (such as for June/July2018 setup), you need to run StdVariablesProcessor separately for each of reconstructed hit collection.
Description of the variables can be found here: RootTreeWriter.
StdVariables.cc does calculation and writes variables in three collections:
Relations between collections: