LHECompleter

class LHECompleter

Fills in the non-kinematic data of an LHEEvent from sampled indices.

The matrix element only returns momenta and the sampled diagram, color, flavor and helicity indices; a LHECompleter turns those into the PDG ids, color flow, mother/daughter structure, mass and spin of every LHEParticle, per subprocess. Built once from the topology and color/flavor bookkeeping of every subprocess (SubprocArgs), then reused for every event via complete_event_data.

Public Functions

LHECompleter(const std::vector<SubprocArgs> &subproc_args, double bw_cutoff)
Parameters:
  • subproc_args – Bookkeeping for every subprocess, indexed like subprocess_index in complete_event_data.

  • bw_cutoff – Number of widths within which a propagator is sampled on its Breit-Wigner resonance.

void complete_event_data(LHEEvent &event, int subprocess_index, int diagram_index, int color_index, int flavor_index, int helicity_index, MixMaxRandom &rand_gen)

Fill in event’s PDG ids, color flow, mother/daughter links, masses and spins from the sampled indices.

event.particles must already hold the momenta, one entry per particle.

Parameters:
  • event – The event to complete, modified in place.

  • subprocess_index – Index into the subproc_args passed to the constructor.

  • diagram_index – Sampled diagram.

  • color_index – Sampled color configuration.

  • flavor_index – Sampled flavor assignment.

  • helicity_index – Sampled helicity configuration.

  • rand_gen – RNG stream, used to sample resonance masses.

inline std::size_t max_particle_count() const

Largest particle count over every subprocess.

void save(const std::string &file) const

Serialize this completer’s bookkeeping to file.

Public Static Functions

static LHECompleter load(const std::string &file)

Load a completer previously written with save.

struct SubprocArgs

Per-subprocess topology, permutation, color and flavor bookkeeping needed to complete its events.

Public Members

int process_id

Process id shared by every event of this subprocess.

std::vector<Topology> topologies

Decay topology of each diagram channel.

nested_vector3<std::size_t> permutations

Final-state particle permutation of each channel.

nested_vector2<std::size_t> diagram_indices

Sampled-diagram index available to each channel.

nested_vector3<std::size_t> diagram_color_indices

Color-configuration indices available to each diagram.

nested_vector2<std::tuple<int, int>> color_flows

Color-line assignment of each sampled color configuration.

std::unordered_map<int, int> pdg_color_types

Color representation (singlet, triplet, octet, …) of each PDG id.

nested_vector2<double> helicities

Per-particle helicity of each sampled helicity configuration.

nested_vector3<int> pdg_ids

Per-particle PDG id of each sampled flavor configuration.

nested_vector3<int> diagram_propagator_pdgs

Per-diagram PDG override, indexed like diagram_color_indices then by Topology::Decay::flat_propagator_index.

Falls back to Topology::Decay::pdg_id if empty.