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

Functions

 properties (pid, sgn=1)
 (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("PythiaID.dat").read())
 

Function Documentation

◆ generate()

PythiaID.generate ( dat = None)

Definition at line 30 of file PythiaID.py.

30def generate(dat=None):
31 import pythia8
32
33 pythia = pythia8.Pythia("", False)
34
35 # Loop over the particles.
36 pid, pids = 1, {}
37 while pid != 0:
38 pids[pid] = properties(pythia.particleData.particleDataEntryPtr(pid))
39 if pids[pid]["hasAnti"]:
40 pids[-pid] = properties(pythia.particleData.particleDataEntryPtr(pid), -1)
41 pid = pythia.particleData.nextId(abs(pid))
42
43 # Archive if requested.
44 if dat:
45 with open(dat, "w") as dat:
46 dat.write(repr(pids))
47 return pids
48
49
50# Load the Pythia dictionary.

◆ properties()

PythiaID.properties ( pid,
sgn = 1 )

(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 Pythia8::ParticleDataEntry.

Definition at line 14 of file PythiaID.py.

14def properties(pid, sgn=1):
15 return {
16 "name": pid.name(sgn),
17 "threeCharge": pid.chargeType(sgn),
18 "hasAnti": pid.hasAnti(),
19 "isLepton": pid.isLepton(),
20 "isQuark": pid.isQuark(),
21 "isDiQuark": pid.isDiquark(),
22 "isHadron": pid.isHadron(),
23 "isMeson": pid.isMeson(),
24 "isBaryon": pid.isBaryon(),
25 "jSpin": pid.spinType(),
26 }
27
28
29# Generate the PID dictionary and optionally archive.

Variable Documentation

◆ pids

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

Definition at line 52 of file PythiaID.py.