Parsing EvtGen's DECAY.DEC


The following are quick instructions on using decparser.py.

Download python script

The script can be downloaded here. It will operate from any directory.

Set up environment variables

You need to get Python 2.4, and you need to pick up the hep.pdt package. Your default environment variables will probably not provide these. Ensure the following:

If you can execute the following:

% c3python
Python 2.4 (#2, Mar 21 2005, 19:41:04)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from hep.pdt import default as particle_data
>>>
	

and get no errors, you are set to go. (To get out of python, type Ctrl-D.)

Running the script

A session might go like this:

% c3python decparser.py	
Hi! Welcome to the DECAY.DEC parser program.
Blame ponyisi@lepp if any problems arise.
(Cmd) readfile
fixin 0.00014         gamma chi_b2(3P)  HELAMP 2.4494897 0. 1.7320508 0. 1. 0.
fixin 0.001365   Xu+  e-  anti-nu_e          PHOTOS   VUB 4.8 1.29 0.22 20
...
[gunk snipped. DECAY.DEC is read in from $C3_DATA by default]
...
(Cmd) dump D_s+
------------- D_s+ -------------
0.02 phi nu_e e+
0.026 eta nu_e e+
0.0089 eta' nu_e e+
0.0027 anti-K0 nu_e e+
0.001 anti-K*0 nu_e e+
...
[many more decay modes of D_s+ snipped.  These are the decay modes listed in DECAY.DEC for this particle]
...
(Cmd) final D_s+
0.0650357298 K+ K- pi+ pi0
0.054394453 pi+ pi0 gamma gamma
0.050677 K+ K- pi+
0.04482173832 pi+ pi+ pi- pi0 gamma
...
[many many more final states of D_s+ decay snipped.  Many photons since we decay the eta and eta'.]
...
(Cmd) termpart
['pi0', 'K_S0']
(Cmd) termpart add eta
(Cmd) final D_s+
0.131 eta pi+ pi0
0.0650357298 K+ K- pi+ pi0
0.054188 eta pi- pi+ pi+ pi0
0.050677 K+ K- pi+
...
[more final states snipped.  As you see we now stop at the eta instead of decaying it.]
...
(Cmd) termpart del eta
(Cmd) explain
Parent particle? D_s+
Final state? K+ K- pi+
0.0219681 Chain:
        D_s+ -> K+ anti-K*0
        anti-K*0 -> K- pi+
0.017676 Chain:
        D_s+ -> phi pi+
        phi -> K+ K-
0.009 Chain:
        D_s+ -> K+ K- pi+
0.00198 Chain:
        D_s+ -> f_0 pi+
        f_0 -> K+ K-
5.29e-05 Chain:
        D_s+ -> f_2 pi+
        f_2 -> K+ K-
(Cmd) exit

Commands

Unfortunately the online help is not so useful at the moment.

readfile [decayfile]
This is the first command you should run in any session; it reads in a decay file. If just "readfile" is called, it will read in $C3_DATA/DECAY.DEC. If the optional "decayfile" argument is given, it will read in "decayfile" instead.
dump particle
Dump the immediate decay modes of the particle. This is straight from DECAY.DEC, without the decay model information. Printout is in the same order as in DECAY.DEC.
termpart [(add|del) particle]
View and adjust the list of particles which, although they have decays in DECAY.DEC, are regarded as stable. By default these are the π0 (pi0) and K0S (K_0S). The command "termpart" by itself responds with the current list. "termpart add particle" adds a particle to the list, and "termpart del particle" deletes it.
final particle
Gives all the final states for decay of the particle, by decaying all intermediate resonances until "final state" particles are reached. "Final state" particles are those that either do not have decays defined in DECAY.DEC, or are in the variable "termpart". The results are sorted by branching fraction.
explain
This command gives all decay chains leading to a given final state, along with the branching fraction for each chain. The program will prompt you for the parent particle and the final state. The final state particles can be entered in any order.