The Gaudi Framework
master (37c0b60a)
ParticleID.py
Go to the documentation of this file.
1
14
def
properties
(pid):
15
from
GaudiPartProp.decorators
import
Gaudi
16
17
pid =
Gaudi.ParticleID
(pid)
18
return
{
19
"isSM"
: pid.isSM(),
20
"isValid"
: pid.isValid(),
21
"isMeson"
: pid.isMeson(),
22
"isBaryon"
: pid.isBaryon(),
23
"isDiQuark"
: pid.isDiQuark(),
24
"isHadron"
: pid.isHadron(),
25
"isLepton"
: pid.isLepton(),
26
"isNucleus"
: pid.isNucleus(),
27
"hasUp"
: pid.hasUp(),
28
"hasDown"
: pid.hasDown(),
29
"hasStrange"
: pid.hasStrange(),
30
"hasCharm"
: pid.hasCharm(),
31
"hasBottom"
: pid.hasBottom(),
32
"hasTop"
: pid.hasTop(),
33
"hasBottomPrime"
: pid.hasBottomPrime(),
34
"hasTopPrime"
: pid.hasTopPrime(),
35
"isQuark"
: pid.isQuark(),
36
"hasQuarks"
: pid.hasQuarks(),
37
"Z"
: pid.Z(),
38
"A"
: pid.A(),
39
"nLambda"
: pid.nLambda(),
40
"threeCharge"
: pid.threeCharge(),
41
"jSpin"
: pid.jSpin(),
42
"sSpin"
: pid.sSpin(),
43
"lSpin"
: pid.lSpin(),
44
}
45
46
47
# Generate the PID dictionary and optionally archive.
48
def
generate
(dat=None):
49
import
ParticleProperty
50
import
PythiaID
51
52
pids = PythiaID.pids
53
pids.update(ParticleProperty.pids)
54
55
# Loop over the particles and update entries.
56
for
pid
in
pids:
57
pids[pid] =
properties
(pid)
58
59
# Archive if requested.
60
if
dat:
61
with
open(dat,
"w"
)
as
dat:
62
dat.write(repr(pids))
63
return
pids
64
65
66
# Load the PID dictionary.
67
try
:
68
pids = eval(open(
"ParticleID.dat"
).
read
())
69
except
FileNotFoundError:
70
pids =
generate
(
"ParticleID.dat"
)
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
ParticleID.generate
def generate(dat=None)
Definition:
ParticleID.py:48
GaudiPartProp.decorators
Definition:
decorators.py:1
hivetimeline.read
def read(f, regex=".*", skipevents=0)
Definition:
hivetimeline.py:32
Gaudi::ParticleID
Definition:
ParticleID.h:43
GaudiPartProp
scripts
ParticleID.py
Generated on Thu Dec 19 2024 15:35:04 for The Gaudi Framework by
1.8.18