LeeYangZeroFlow

class LeeYangZeroFlow.LeeYangZeroFlow(vmin, vmax, vstep, n=2)[source]

Compute integrated and differential anisotropic flow using the Lee-Yang zero method from

For the computation of the anisotropic flow it is important to have an estimate on how large the anisotropic flow will be. To set up the correct range of radial values along which the generating function is calculated.

For a practical guide of the implementation we refer to Ref. [3], where all relevant equations are given.

Parameters:
vminfloat

Minimum flow value.

vmaxfloat

Maximum flow value.

vstepfloat

Step size for the flow values.

nint, optional

The harmonic order. Default is 2.

Notes

If a result contains np.nan or np.inf, the corresponding value is set to None.

A few remarks from Ref. [2] about the applicability of the method and the resolution parameter \(\chi\):
  • \(\chi > 1\): The statistical error on the flow is not significantly larger than with the standard method. At the same time systematic errors due to nonflow effects are much smaller. The present method should be used, and statistics will not be a problem.

  • \(0.5 < \chi < 1\): The method is applicable, but the weights should be optimized to increase \(\chi\). This is not possible with the current implementation of the flow analysis method.

  • \(\chi < 0.5\): Too large statistical errors, the present method should not be used. Using more events will not help much. Use the cumulant methods instead, which are still applicable if the number of events is large enough.

Examples

A demonstration of how to use the LeeYangZerosFlow class to calculate flow.

 1>>> from sparkx.flow.LeeYangZerosFlow import LeeYangZerosFlow
 2>>>
 3>>> JETSCAPE_FILE_PATH = [Jetscape_directory]/particle_lists_flow.dat
 4>>> # Jetscape object containing the particles on which we want to calculate flow
 5>>> particle_data = Jetscape(JETSCAPE_FILE_PATH).particle_objects_list()
 6
 7>>> # Create a LeeYangZerosFlow object
 8>>> flow_instance = LeeYangZerosFlow(vmin=0.01, vmax=0.10, vstep=0.001, n=2)
 9>>>
10>>> # Calculate the integrated flow with error and resolution parameter
11>>> result = flow_instance.integrated_flow(particle_data)

Methods

integrated_flow:

Computes the integrated flow.

differential_flow:

Computes the differential flow.

LeeYangZeroFlow.integrated_flow(particle_data)[source]

Computes the integrated flow.

Parameters:
particle_datalist

List of particle data for multiple events.

Returns:
list

A list containing the following values:

  • vn_inf (float): Integrated flow magnitude.

  • vn_inf_error (float): Standard error on the integrated flow magnitude.

  • chi_value (float): Resolution parameter \(\chi\).

If vn_inf is np.nan or np.inf, the method returns [None, None, None].
LeeYangZeroFlow.differential_flow(particle_data, bins, flow_as_function_of, poi_pdg=None)[source]

Compute the differential flow.

Parameters:
particle_datalist

List of particle data for multiple events.

binslist or np.ndarray

Bins used for the differential flow calculation.

flow_as_function_ofstr

Variable on which the flow is calculated (“pt”, “rapidity”, or “pseudorapidity”).

poi_pdglist

List of PDG id for identified particle differential flow.

Returns:
list

A list containing the differential flow for each bin. Each element in the list corresponds to a bin and contains:

  • vn_inf (float): Differential flow magnitude for the bin.

  • vn_inf_error (float): Error on the differential flow magnitude for the bin.

If a bin has no events, the corresponding element in the result list is
set to None.

Notes

This method will call the integrated_flow method if it was not called before and computes the integrated flow for the given particle_data. Make sure that the same particle_data is used. Otherwise this could lead to wrong results.