GenerateFlow

class GenerateFlow.GenerateFlow(*vn, **vn_kwargs)[source]

Generate particle data with anisotropic flow for testing.

This class generates particle lists in JETSCAPE or OSCAR output format to test the correct implementation of flow analysis routines.

Notes

If you use the generate_dummy_JETSCAPE_file_realistic_pt_shape() or generate_dummy_OSCAR_file_realistic_pt_shape() keep in mind, that the flow values given during construction are used for the saturation value of the flow at large transverse momentum. They do not reflect the value of the integrated flow.

The implemented method for the more realistic transverse momentum profile is taken from Nicolas Borghini implemented in this event generator.

Examples

To use the class the GenerateFlow object has to be created with the desired anisotropic flow harmonics and then a dummy data file can be created:

1>>> from sparkx.flow.GenerateFlow import GenerateFlow
2>>>
3>>> flow_object = GenerateFlow(v2=0.06, v3=0.02, v4=0.03)
4>>> number_events = 100
5>>> event_multiplicity = 10000
6>>> random_seed = 42
7>>> flow_object.generate_dummy_JETSCAPE_file(path_to_output,number_events,event_multiplicity,random_seed)
Attributes:
n_:

Type of flow harmonics.

vn_:

Value of the flow harmonics.

phi_:

List containing the azimuths of the particles.

px_:

Particle momenta in x-direction.

py_:

Particle momenta in y-direction.

pz_:

Particle momenta in z-direction.

Methods

generate_dummy_JETSCAPE_file:

Generate a dummy JETSCAPE file with random particle momenta resulting in the same flow for all transverse momenta.

generate_dummy_JETSCAPE_file_realistic_pt_shape:

Generate a dummy JETSCAPE file with particles having flow with a more realistic transverse momentum distribution.

generate_dummy_JETSCAPE_file_multi_particle_correlations:

Generate a dummy JETSCAPE file with random particle momenta resulting in the same flow for all transverse momenta. With this function multi-particle correlations can be introduced.

generate_dummy_JETSCAPE_file_realistic_pt_shape_multi_particle_correlations:

Generate a dummy JETSCAPE file with particles having flow with a more realistic transverse momentum distribution. With this function multi-particle correlations can be introduced.

generate_dummy_OSCAR_file:

Generate dummy flow data in OSCAR format.

generate_dummy_OSCAR_file_realistic_pt_shape:

Generate a dummy OSCAR2013 file with particles having flow with a more realistic transverse momentum distribution.

generate_dummy_OSCAR_file_multi_particle_correlations:

Generate a dummy OSCAR2013 file with random particle momenta resulting in the same flow for all transverse momenta. With this function multi-particle correlations can be introduced.

generate_dummy_OSCAR_file_realistic_pt_shape_multi_particle_correlations:

Generate a dummy OSCAR2013 file with particles having flow with a more realistic transverse momentum distribution. With this function multi-particle correlations can be introduced.

GenerateFlow.generate_dummy_JETSCAPE_file(output_path, number_events, multiplicity, seed)[source]

Generate a dummy JETSCAPE file with random particle momenta resulting in the same flow for all transverse momenta.

For simplicity we generate \(\pi^+\) particles with a mass of \(m_{\pi^+}=0.138\) GeV from a thermal distribution with a temperature of \(T=0.140\) GeV.

Parameters:
output_path: str

The output file path.

number_events: int

The number of events to generate.

multiplicity: int

The number of particles per event.

seed: int

The random seed for reproducibility.

Returns:
None
GenerateFlow.generate_dummy_JETSCAPE_file_realistic_pt_shape(output_path, number_events, multiplicity, seed, random_reaction_plane=True)[source]

Generate a dummy JETSCAPE file with particles having flow with a more realistic transverse momentum distribution.

For more details on the chosen parameters have a look at the source code.

Parameters:
output_path: str

The output file path.

number_events: int

The number of events to generate.

multiplicity: int

The number of particles per event.

seed: int

The random seed for reproducibility.

random_reaction_plane: bool

Switch for random reaction plane angle. Default is True. Should be switched off for testing ReactionPlaneFlow.

Returns:
None
GenerateFlow.generate_dummy_JETSCAPE_file_multi_particle_correlations(output_path, number_events, multiplicity, seed, k_particle_correlation, correlation_fraction)[source]

Generate a dummy JETSCAPE file with random particle momenta resulting in the same flow for all transverse momenta. A fraction of k-particle correlations can be introduced.

For simplicity we generate \(\pi^+\) particles with a mass of \(m_{\pi^+}=0.138\) GeV from a thermal distribution with a temperature of \(T=0.140\) GeV.

Parameters:
output_path: str

The output file path.

number_events: int

The number of events to generate.

multiplicity: int

The number of particles per event.

seed: int

The random seed for reproducibility.

k_particle_correlation: int

The order of k-particle correlations.

correlation_fraction:

The fraction of correlated particles.

Returns:
None
GenerateFlow.generate_dummy_JETSCAPE_file_realistic_pt_shape_multi_particle_correlations(output_path, number_events, multiplicity, seed, k_particle_correlation, correlation_fraction, random_reaction_plane=True)[source]

Generate a dummy JETSCAPE file with particles having flow with a more realistic transverse momentum distribution. A fraction of k-particle correlations can be introduced.

For more details on the chosen parameters have a look at the source code.

Parameters:
output_path: str

The output file path.

number_events: int

The number of events to generate.

multiplicity: int

The number of particles per event.

seed: int

The random seed for reproducibility.

k_particle_correlation: int

The order of k-particle correlations.

correlation_fraction:

The fraction of correlated particles.

random_reaction_plane: bool

Switch for random reaction plane angle. Default is True. Should be switched off for testing ReactionPlaneFlow.

Returns:
None
GenerateFlow.generate_dummy_OSCAR_file(output_path, number_events, multiplicity, seed)[source]

Generate a dummy OSCAR2013 file with random particle momenta resulting in the same flow for all transverse momenta.

For simplicity we generate \(\pi^+\) particles with a mass of \(m_{\pi^+}=0.138\) GeV from a thermal distribution with a temperature of \(T=0.140\) GeV.

Parameters:
output_path: str

The output file path.

number_events: int

The number of events to generate.

multiplicity: int

The number of particles per event.

seed: int

The random seed for reproducibility.

Returns:
None
GenerateFlow.generate_dummy_OSCAR_file_realistic_pt_shape(output_path, number_events, multiplicity, seed, random_reaction_plane=True)[source]

Generate a dummy OSCAR2013 file with particles having flow with a more realistic transverse momentum distribution.

For more details on the chosen parameters have a look at the source code.

Parameters:
output_path: str

The output file path.

number_events: int

The number of events to generate.

multiplicity: int

The number of particles per event.

seed: int

The random seed for reproducibility.

random_reaction_plane: bool

Switch for random reaction plane angle. Default is True. Should be switched off for testing ReactionPlaneFlow.

Returns:
None
GenerateFlow.generate_dummy_OSCAR_file_multi_particle_correlations(output_path, number_events, multiplicity, seed, k_particle_correlation, correlation_fraction)[source]

Generate a dummy OSCAR2013 file with random particle momenta resulting in the same flow for all transverse momenta. A fraction of k-particle correlations can be introduced.

For simplicity we generate \(\pi^+\) particles with a mass of \(m_{\pi^+}=0.138\) GeV from a thermal distribution with a temperature of \(T=0.140\) GeV.

Parameters:
output_path: str

The output file path.

number_events: int

The number of events to generate.

multiplicity: int

The number of particles per event.

seed: int

The random seed for reproducibility.

k_particle_correlation: int

The order of k-particle correlations.

correlation_fraction:

The fraction of correlated particles.

Returns:
None
GenerateFlow.generate_dummy_OSCAR_file_realistic_pt_shape_multi_particle_correlations(output_path, number_events, multiplicity, seed, k_particle_correlation, correlation_fraction, random_reaction_plane=True)[source]

Generate a dummy OSCAR2013 file with particles having flow with a more realistic transverse momentum distribution. A fraction of k-particle correlations can be introduced.

For more details on the chosen parameters have a look at the source code.

Parameters:
output_path: str

The output file path.

number_events: int

The number of events to generate.

multiplicity: int

The number of particles per event.

seed: int

The random seed for reproducibility.

k_particle_correlation: int

The order of k-particle correlations.

correlation_fraction:

The fraction of correlated particles.

random_reaction_plane: bool

Switch for random reaction plane angle. Default is True. Should be switched off for testing ReactionPlaneFlow.

Returns:
None