system_control

Functions that steer operations of the expertsystem.

class GammaCheck[source]

Bases: expertsystem.ui.system_control.InteractionDeterminationFunctorInterface

Conservation check for photons.

check(in_edge_props, out_edge_props, node_props)[source]
name_label = 'Name'
class InteractionDeterminationFunctorInterface[source]

Bases: abc.ABC

Interface for interaction determination.

abstract check(in_edge_props, out_edge_props, node_props)[source]
class LeptonCheck[source]

Bases: expertsystem.ui.system_control.InteractionDeterminationFunctorInterface

Conservation check lepton numbers.

check(in_edge_props, out_edge_props, node_props)[source]
lepton_flavor_labels = [<StateQuantumNumberNames.ElectronLN: 6>, <StateQuantumNumberNames.MuonLN: 9>, <StateQuantumNumberNames.TauLN: 13>]
name_label = 'Name'
qns_label = 'QuantumNumber'
class StateTransitionManager(initial_state, final_state, allowed_intermediate_particles=None, interaction_type_settings=None, formalism_type='helicity', topology_building='isobar', number_of_threads=4, propagation_mode='fast')[source]

Bases: object

Main handler for decay topologies.

add_final_state_grouping(fs_group)[source]
build_topologies()[source]
static create_interaction_setting_groups(graph_node_setting_pairs)[source]
create_seed_graphs(topology_graphs)[source]
determine_node_settings(graphs)[source]
find_solutions(graph_setting_groups)[source]

Check for solutions for a specific set of interaction settings.

initialize_qn_propagator(state_graph, node_settings)[source]
prepare_graphs()[source]
propagate_quantum_numbers(state_graph_node_settings_pair)[source]
set_allowed_interaction_types(allowed_interaction_types)[source]
set_topology_builder(topology_builder)[source]
analyse_solution_failure(violated_laws_per_node_and_graph)[source]
calculate_strength(node_interaction_settings)[source]
calculate_swappings(id_mapping)[source]

Calculate edge id swappings.

Its important to use an ordered dict as the swappings do not commute!

change_qn_domain(interaction_settings, qn_name, new_domain)[source]
check_equal_ignoring_qns(ref_graph, solutions, ignored_qn_list)[source]

Define equal operator for the graphs ignoring certain quantum numbers.

create_edge_id_particle_mapping(graph, external_edge_getter_function)[source]
create_setting_combinations(node_settings)[source]
external_edge_identical_particle_combinatorics(graph, external_edge_getter_function)[source]
filter_graphs(graphs, filters)[source]

Implement filtering of a list of StateTransitionGraph ‘s.

This function can be used to select a subset of StateTransitionGraph ‘s from a list. Only the graphs passing all supplied filters will be returned.

Note

For the more advanced user, lambda functions can be used as filters.

Parameters
Returns

filtered list of graphs

Return type

[StateTransitionGraph]

Example

Selecting only the solutions, in which the \(\\rho\) decays via p-wave:

>>> my_filter = require_interaction_property(
        'rho', InteractionQuantumNumberNames.L,
        create_spin_domain([1], True))
>>> filtered_solutions = filter_graphs(solutions, [my_filter])
filter_interaction_types(valid_determined_interaction_types, allowed_interaction_types)[source]
load_default_particle_list(method=<function load_particle_list_from_xml>)[source]

Load the default particle list that comes with the expertsystem.

Return type

None

match_external_edge_ids(graphs, ref_graph_id, external_edge_getter_function)[source]
match_external_edges(graphs)[source]
perform_external_edge_identical_particle_combinatorics(graph)[source]

Create combinatorics clones of the StateTransitionGraph.

In case of identical particles in the initial or final state. Only identical particles, which do not enter or exit the same node allow for combinatorics!

remove_conservation_law(interaction_settings, cons_law)[source]
remove_duplicate_solutions(results, remove_qns_list=None, ignore_qns_list=None)[source]
remove_qns_from_graph(graph, qn_list)[source]
require_interaction_property(ingoing_particle_name, interaction_qn, allowed_values)[source]

Filter function.

Closure, which can be used as a filter function in filter_graphs().

It selects graphs based on a requirement on the property of specific interaction nodes.

Parameters
  • ingoing_particle_name (str) – name of particle, used to find nodes which have a particle with this name as “ingoing”

  • interaction_qn (InteractionQuantumNumberNames) – interaction quantum number

  • allowed_values (list) – list of allowed values, that the interaction quantum number may take

Returns

  • True if the graph has nodes with an ingoing particle of the given name, and the graph fullfills the quantum number requirement

  • False otherwise

Return type

bool