phasespace
phasespace¶
import tensorwaves.data.phasespace
Implementations of DataGenerator
and WeightedDataGenerator
.
- class TFPhaseSpaceGenerator(initial_state_mass: float, final_state_masses: Mapping[int, float], bunch_size: int = 50000)[source]¶
Bases:
DataGenerator
Implements a phase space generator using tensorflow.
- Parameters
initial_state_mass – Mass of the decaying state.
final_state_masses – A mapping of final state IDs to the corresponding masses.
bunch_size – Size of a bunch that is generated during a hit-and-miss iteration.
- generate(size: int, rng: RealNumberGenerator) Dict[str, ndarray] [source]¶
Generate a
DataSample
of phase space four-momenta.- Returns
A
DataSample
of four-momenta arrays of shape \(n \times 4\).
See also
- class TFWeightedPhaseSpaceGenerator(initial_state_mass: float, final_state_masses: Mapping[int, float])[source]¶
Bases:
WeightedDataGenerator
Implements a phase space generator with weights using tensorflow.
- Parameters
initial_state_mass – Mass of the decaying state.
final_state_masses – A mapping of final state IDs to the corresponding masses.
See also
- generate(size: int, rng: RealNumberGenerator) Tuple[Dict[str, ndarray], ndarray] [source]¶
Generate a
DataSample
of phase space four-momenta with weights.- Returns
A
tuple
of aDataSample
(four-momenta) with an event-wise sequence of weights. The four-momenta are arrays of shape \(n \times 4\).