Belle II Software development
printMCParticleArray.py
1#!/usr/bin/env python3
2
3
10
11"""
12This script loads specified ROOT file and prints the content of the MCParticle StoreArray
13for each event. To be used for debugging.
14
15Execute script with:
16 $> basf2 printMCParticleArray.py -i [input_ROOT_file]
17"""
18
19# Doxygen should skip this script
20# @cond
21
22import basf2
23import modularAnalysis as ma
24
25path = basf2.Path()
26ma.inputMdst(filename=basf2.find_file('mdst16.root', 'validation', True),
27 path=path)
28ma.printMCParticles(path=path)
29
30# The printed information can be stored in TTree via VariablesToNtuple module
31# The branch __MCDecayString__ is automatically created if printMCParticles is called
32ma.variablesToNtuple(decayString="", variables=[], path=path)
33
34basf2.process(path)
35
36# @endcond