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