The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
check_ParticleID.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2
17import ParticleID
18import ParticleProperty
19import PythiaID
20
21props = [prop for prop in ParticleID.properties(1)]
22mthds = ["NEW", "OLD", "PY", "PP"]
23for pid in sorted(ParticleID.pids):
25 if not base["isSM"]:
26 continue
27 comps = {"NEW": base, "OLD": ParticleID.pids[pid], "PY": {}, "PP": {}}
28 if pid in PythiaID.pids:
29 comps["PY"] = PythiaID.pids[pid]
30 if pid in ParticleProperty.pids:
31 comps["PP"] = ParticleProperty.pids[pid]
32 difs = [False] * len(props)
33 for idx, prop in enumerate(props):
34 for mthd, comp in comps.iteritems():
35 if mthd in mthds and prop in comp and base[prop] != comp[prop]:
36 difs[idx] = True
37 if True in difs:
38 print("------------------------------------")
39 if "name" in comps["PY"]:
40 print("PYTHIA: " + comps["PY"]["name"])
41 if "name" in comps["PP"]:
42 print("LHCB: " + comps["PP"]["name"])
43 print("%15s" * (len(mthds) + 1) % tuple([str(pid)] + mthds))
44 for prop, dif in zip(props, difs):
45 if not dif:
46 continue
47 vals = [prop]
48 for mthd in mthds:
49 if mthd in comps and prop in comps[mthd]:
50 vals += [str(comps[mthd][prop])]
51 else:
52 vals += [""]
53 print("%15s" * (len(vals)) % tuple(vals))
properties(pid)
(c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # This software i...
Definition ParticleID.py:14