The Gaudi Framework
master (37c0b60a)
check_ParticleID.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
17
import
ParticleID
18
import
ParticleProperty
19
import
PythiaID
20
21
props = [prop
for
prop
in
ParticleID.properties
(1)]
22
mthds = [
"NEW"
,
"OLD"
,
"PY"
,
"PP"
]
23
for
pid
in
sorted(ParticleID.pids):
24
base =
ParticleID.properties
(pid)
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))
ParticleID.properties
def properties(pid)
(c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # This software i...
Definition:
ParticleID.py:14
GaudiPartProp
scripts
check_ParticleID.py
Generated on Thu Dec 19 2024 15:35:04 for The Gaudi Framework by
1.8.18