52def dump_truth(f=sys.stdout, sgkey="SpclMC", maxn=None):
53 """Dump out truth information for the current event.
54F is the file to which the dump is sent.
55SGKEY is the StoreGate key which is used to retrieve the truth information.
56
57The first column in the dump is the particle unique ID number.
58This is followed by the particle type, and then by the unique ID numbers
59of any decay daughters (up to 3). This is followed by the four-momentum
60in two versions: first as pt, eta, phi, m and then as px, py, pz, e.
61"""
62 parts = [p for p in PyParticleTools.getTruthParticles (sgkey)]
63 if maxn is not None:
64 parts = parts[:maxn]
65 for t in parts:
66 dump_one_truth (t, f)
67 return