The Gaudi Framework  master (37c0b60a)
ParticleID Namespace Reference

Functions

def 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". More...
 
def generate (dat=None)
 

Variables

 pids
 

Function Documentation

◆ generate()

def ParticleID.generate (   dat = None)

Definition at line 48 of file ParticleID.py.

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())

◆ properties()

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

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.

Variable Documentation

◆ pids

ParticleID.pids

Definition at line 70 of file ParticleID.py.

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