particle

This module implements classes to describe particles and decays.

class BaseDecay(core, outs, name=None, disable=False, p_break=False, c_break=True, curve_style=None, **kwargs)[source]

Bases: object

Base Decay object

Parameters:
  • core – Particle. The mother particle

  • outs – List of Particle. The daughter particles

  • name – String. Name of the decay

  • disable – Boolean. If it’s True???

as_config()[source]
get_id()[source]
property name
class BaseParticle(name, J=0, P=-1, C=None, spins=None, mass=None, width=None, id_=None, disable=False, **kwargs)[source]

Bases: object

Base Particle object. Name is “name[:id]”.

Parameters:
  • name – String. Name of the particle

  • J – Integer or half-integer. The total spin

  • P – 1 or -1. The parity

  • spins – List. The spin quantum numbers. If it’s not provided, spins will be tuple(range(-J, J + 1)).

  • mass – Real variable

  • width – Real variable

add_creator(d)[source]

Add a decay reaction where the particle is created.

Parameters:

d – BaseDecay object

add_decay(d)[source]
Parameters:

d – BaseDecay object

as_config()[source]
chain_decay()[source]

return all decay chain self decay to

get_resonances()[source]

return all resonances self decay to

property name
remove_decay(d)[source]
Parameters:

d – BaseDecay object

set_name(name, id_=None)[source]
class Decay(core, outs, name=None, disable=False, p_break=False, c_break=True, curve_style=None, **kwargs)[source]

Bases: BaseDecay

General Decay object

barrier_factor(q, q0)[source]

The cached barrier factors with \(d=3.0\) for all \(l\). For barrier factor, refer to tf_pwa.breit_wigner.Bprime(L, q, q0, d)

Parameters:
  • q – Data array

  • q0 – Real number

Returns:

1-d array for every data point

generate_params(name=None, _ls=True)[source]

Generate the name of the variable for every (l,s) pair. In PWA, the variable is usually expressed as \(g_ls\).

Parameters:
  • name – String. It is the name of the decay by default

  • _ls

    ???

Returns:

List of strings

get_cg_matrix()[source]

The matrix indexed by \([(l,s),(\lambda_b,\lambda_c)]\). The matrix element is

\[\sqrt{\frac{ 2 l + 1 }{ 2 j_a + 1 }} \langle j_b, j_c, \lambda_b, - \lambda_c | s, \lambda_b - \lambda_c \rangle \langle l, s, 0, \lambda_b - \lambda_c | j_a, \lambda_b - \lambda_c \rangle\]

This is actually the pre-factor of \(g_ls\) in the amplitude formula.

Returns:

2-d array of real numbers

get_l_list()[source]

List of l in self.get_ls_list()

get_ls_list()[source]

It has interface to tf_pwa.particle.GetA2BC_LS_list(ja, jb, jc, pa, pb, pc) :return: List of (l,s) pairs

get_min_l()[source]

The minimal l in the LS coupling

class DecayChain(chain)[source]

Bases: object

A decay chain. E.g. \(A\rightarrow BC, B\rightarrow DE\)

Parameters:

chain

???

depth_first(node_first=True)[source]

depth first travel for decay

static from_particles(top, finals)[source]

Build possible decay chain Topology. E.g. a -> [b,c,d] => [[a->rb,r->cd],[a->rc,r->bd],[a->rd,r->bc]]

Parameters:
  • top – Particle

  • finals – List of Particle

Returns:

DecayChain

static from_sorted_table(decay_dict)[source]

Create decay chain from a topology independent structure. E.g. {a:[b,c,d],r:[c,d],b:[b],c:[c],d:[d]} => [a->rb,r->cd]

Parameters:

decay_dict – Dictionary

Returns:

DecayChain

get_all_particles()[source]

get all particles in the decay chains

get_id()[source]

return identity of the decay

get_particle_decay(particle)[source]

get particle decay in the chain

sorted_table()[source]

A topology independent structure. E.g. [a->rb,r->cd] => {a:[b,c,d],r:[c,d],b:[b],c:[c],d:[d]}

Returns:

Dictionary indexed by Particle

sorted_table_layers()[source]

Get the layer of decay chain as sorted table. Or the list of particle with the same number of final particles. So, the first item is always None. E.g. [a->rb,r->cd] => [None, [(b, [b]), (c, [c]), (d, [d])], [(r, [c, d])], [(a, [b, c, d])]]

Returns:

List of dictionary

standard_topology()[source]

standard topology structure of the decay chain, all inner particle will be replace as a tuple of out particles. for example [A->R+C, R->B+D], is [A->(B, D)+C, (B, D)->B+D]

topology_id(identical=True)[source]

topology identy

Parameters:

identical – allow identical particle in finals

Returns:

topology_map(other=None)[source]

Mapping relations of the same topology decay E.g. [A->R+B,R->C+D],[A->Z+B,Z->C+D] => {A:A,B:B,C:C,D:D,R:Z,A->R+B:A->Z+B,R->C+D:Z->C+D}

topology_same(other, identical=True)[source]

whether self and other is the same topology

Parameters:
  • other – other decay chains

  • identical – using identical particles

Returns:

class DecayGroup(chains)[source]

Bases: object

A group of two-body decays.

Parameters:

chains – List of DecayChain

as_config()[source]
get_chain_from_particle(names)[source]

get the first decay chain has all particles in names

get_chains_map(chains=None)[source]
Parameters:

chains

Returns:

get_decay_chain(id_)[source]

get decay chain from identity string

get_particle(name)[source]

get particle by name

topology_structure(identical=False, standard=True)[source]
Parameters:
  • identical

  • standard

Returns:

GetA2BC_LS_list(ja, jb, jc, pa=None, pb=None, pc=None, p_break=False, ca=None)[source]

The \(L-S\) coupling for the decay \(A\rightarrow BC\), where \(L\) is the orbital angular momentum of \(B\) and \(B\), and \(S\) is the superposition of their spins. It’s required that \(|J_B-J_C|\leq S \leq J_B+J_C\) and \(|L-S|\leq J_A \leq L+S\). It’s also required by the conservation of P parity that \(L\) is keep \(P_A = P_B P_C (-1)^{l}\).

Parameters:
  • jaJ of particle A

  • jbJ of particle B

  • jcJ of particle C

  • paP of particle A

  • pbP of particle B

  • pcP of particle C

  • p_break – allow p voilate

  • ca – enabel c partity select c=(-1)^(l+s)

Returns:

List of \((l,s)\) pairs.

class ParticleList(initlist=None)[source]

Bases: UserList

List for Particle

cp_charge_group(finals, id_p, cp)[source]
cross_combine(x)[source]

Combine every two of a list, as well as give every one of them.??? Can be put to utils.py

Parameters:

x

Returns:

simple_cache_fun(f)[source]
Parameters:

f

Returns:

split_len(dicts)[source]

Split a dictionary of lists by their length. E.g. {“b”:[2],”c”:[1,3],”d”:[1]} => [None, [(‘b’, [2]), (‘d’, [1])], [(‘c’, [1, 3])]]

Put to utils.py or _split_len if not used anymore???

Parameters:

dicts – Dictionary

Returns:

List of dictionary

split_particle_type(decays)[source]
split_particle_type_list(decays)[source]

Separate initial particle, intermediate particles, final particles in a decay chain.

Parameters:

decays – DecayChain

Returns:

Set of initial Particle, set of intermediate Particle, set of final Particle