conservation_rules

Collection of quantum number conservation rules for particle reactions.

Contains: - Functors for quantum number condition checks.

class AbstractConditionFunctor[source]

Bases: abc.ABC

Abstract interface of a condition functor.

abstract check(qn_names, in_edges, out_edges, int_node)[source]
class AbstractRule(rule_name)[source]

Bases: abc.ABC

Abstract interface for a conservation rule.

add_required_qn(qn_name, qn_condition_functions=None)[source]
abstract check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]
check_requirements(in_edges, out_edges, int_node)[source]
get_qn_conditions()[source]
get_required_qn_names()[source]
abstract specify_required_qns()[source]
class AdditiveQuantumNumberConservation(qn_name)[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Check for conservation of an additive quantum numbers.

\(\sum q_{in} = \sum q_{out}\)

Additive quantum numbers are, for example:
  • electric charge

  • baryon number

  • lepton number

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]
specify_required_qns()[source]
class CParityConservation[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Check for \(C\)-parity conservation.

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]

Check for \(C_{in} = C_{out}\).

static get_c_parity_multiparticle(part_qns, interaction_qns)[source]
specify_required_qns()[source]
class ClebschGordanCheckHelicityToCanonical[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Implement Clebsch-Gordan checks.

For \(S_1, S_2\) to \(S\) and the \(L,S\) to \(J\) coupling based on the conversion of helicity to canonical amplitude sums.

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]
specify_required_qns()[source]
class DefinedForAllEdges[source]

Bases: expertsystem.state.conservation_rules.AbstractConditionFunctor

Check if a graph has all edges defined.

check(qn_names, in_edges, out_edges, int_node)[source]
class DefinedForAllOutgoingEdges[source]

Bases: expertsystem.state.conservation_rules.AbstractConditionFunctor

Check if all outgoing edges are defined.

check(qn_names, in_edges, out_edges, int_node)[source]
class DefinedForInteractionNode[source]

Bases: expertsystem.state.conservation_rules.AbstractConditionFunctor

Check if all interaction nodes are defined.

check(qn_names, in_edges, out_edges, int_node)[source]
class DefinedIfOtherQnNotDefinedInOutSeparate(other_qn_names)[source]

Bases: expertsystem.state.conservation_rules.AbstractConditionFunctor

Implements logic for…

check(qn_names, in_edges, out_edges, int_node)[source]
check_edge_set(qn_names, edges, int_node)[source]
static find_in_dict(name, props)[source]
class GParityConservation[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Check for \(G\)-parity conservation.

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]

Check for \(G_{in} = G_{out}\).

static check_multistate_g_parity(single_state_qns, double_state_qns, interaction_qns)[source]
specify_required_qns()[source]
class GellMannNishijimaRule[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Conservation rule for Gell-Mann-Nishijima.

static calculate_hypercharge(particle)[source]

Calculate the hypercharge \(Y=S+C+B+T+B\).

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]

Check the Gell-Mann–Nishijima formula.

\(Q=I_3+\frac{Y}{2}\) for each particle.

specify_required_qns()[source]
class HelicityConservation[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Implementation of helicity conservation.

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]

Check for \(|\lambda_2-\lambda_3| \leq S_1\).

specify_required_qns()[source]
class IdenticalParticleSymmetrization[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Implementation of particle symmetrization.

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]
static check_particles_identical(particles)[source]

Check if pids and spins match.

specify_required_qns()[source]
class MassConservation(width_factor=3)[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Mass conservation rule.

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]

Implement the mass check.

\(M_{out} - N \cdot W_{out} < M_{in} + N \cdot W_{in}\)

It makes sure that the net mass outgoing state \(M_{out}\) is smaller than the net mass of the ingoing state \(M_{in}\). Also the width \(W\) of the states is taken into account.

specify_required_qns()[source]
class ParityConservation[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Check parity conservation.

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]

Implement \(P_{in} = P_{out} \cdot (-1)^L\).

specify_required_qns()[source]
class ParityConservationHelicity[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Check parity conservation for the helicity formalism.

check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]

Implements the check parity conservation check.

Check the following:

\[A_{-\lambda_1-\lambda_2} = P_1 P_2 P_3 (-1)^{S_2+S_3-S_1} A_{\lambda_1\lambda_2}\]

Notice that only the special case \(\lambda_1=\lambda_2=0\) may return False.

specify_required_qns()[source]
class SpinConservation(spinlike_qn, use_projection=True)[source]

Bases: expertsystem.state.conservation_rules.AbstractRule

Implementation of conservation of a spin-like quantum number.

That is, for a two body decay (coupling of two particle states). See check() for details.

calculate_total_spins(part_list, interaction_qns)[source]
check(ingoing_part_qns, outgoing_part_qns, interaction_qns)[source]

Check for spin conservation.

Implements

\[|S_1 - S_2| \leq S \leq |S_1 + S_2|\]

and optionally

\[|L - S| \leq J \leq |L + S|\]

Also checks \(M_1 + M_2 = M\) and if Clebsch-Gordan coefficients are all 0.

check_magnitude(in_part, out_part, interaction_qns)[source]
static check_projections(in_part, out_part)[source]
specify_required_qns()[source]
spin_couplings(spin1, spin2)[source]

Implement the coupling of two spins.

\(|S_1 - S_2| \leq S \leq |S_1 + S_2|\) and \(M_1 + M_2 = M\)

is_clebsch_gordan_coefficient_zero(spin1, spin2, spin_coupled)[source]
is_particle_antiparticle_pair(pid1, pid2)[source]