The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
ParticleID Namespace Reference

Functions

 properties (pid)
 (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".
 
 generate (dat=None)
 

Variables

 pids = eval(open("ParticleID.dat").read())
 

Function Documentation

◆ generate()

ParticleID.generate ( dat = None)

Definition at line 48 of file ParticleID.py.

48def 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.

◆ properties()

ParticleID.properties ( pid)

(c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".

# # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. #

Date
21/03/2018
Author
Philip Ilten Return the property dictionary for a given Gaudi.ParticleID.

Definition at line 14 of file ParticleID.py.

14def 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.
Holds PDG + LHCb extension particle code, following the PDG particle numbering scheme (pdg....
Definition ParticleID.h:43

Variable Documentation

◆ pids

ParticleID.pids = eval(open("ParticleID.dat").read())

Definition at line 68 of file ParticleID.py.