ScalarProductFlow

class ScalarProductFlow.ScalarProductFlow(n=2, weight='pt2', pseudorapidity_gap=0.0)[source]

This class implements a scalar product flow analysis algorithm Adler, C., et al. “Elliptic flow from two-and four-particle correlations in Au+ Au collisions at s NN= 130 GeV.” Physical Review C 66.3 (2002): 034904.

For this method, the flow is calculated by correlating the event vector \(Q\) with the conjugated unit momentum vector of the particle. This is normalized by square root of the scalar product of the event vectors of two equal-sized sub-events. We choose here to divide the sub-events by positive and negative pseudorapidity. Note that for asymmetric systems, this will not be sufficient.

In summary, this class calculates the following:

\[v_n = \frac{\langle Q_n u_{n,i}^\ast \rangle}{2\sqrt{\langle Q_n^aQ_n^{b \ast}\rangle}}\]

where we average over all particles of all events.

Parameters:
nint, optional

The value of the harmonic. Default is 2.

weightstr, optional

The weight used for calculating the flow. Default is “pt2”.

pseudorapidity_gapfloat, optional

The pseudorapidity gap used for dividing the particles into sub-events. Default is 0.0.

Examples

A demonstration how to calculate flow according to the event plane of a separate particle list. The same particle list can also be used to determine the event plane and the flow.

 1>>> from sparkx.Jetscape import Jetscape
 2>>> from sparkx.flow.ScalarProductFlow import ScalarProductFlow
 3>>>
 4>>> JETSCAPE_FILE_PATH_FLOW = [Jetscape_directory]/particle_lists_flow.dat
 5>>> JETSCAPE_FILE_PATH_EVENT_PLANE = [Jetscape_directory]/particle_lists_ep.dat
 6>>>
 7>>> # Jetscape object containing the particles on which we want to calculate flow
 8>>> jetscape_flow = Jetscape(JETSCAPE_FILE_PATH_FLOW).particle_objects_list()
 9>>>
10>>> # Jetscape object containing the particles which determine the event plane
11>>> jetscape_event = Jetscape(JETSCAPE_FILE_EVENT_PLANE).particle_objects_list()
12>>>
13>>> # Create flow objects for v2, weighted with pT**2 and v3 weighted with pT**2
14>>> flow2 = ScalarProductFlow(n=2, weight="pt2",pseudorapidity_gap=0.1)
15>>> flow3 = ScalarProductFlow(n=3, weight="pt2",pseudorapidity_gap=0.1)
16>>>
17>>> # Calculate the integrated flow with error
18>>> v2, v2_error = flow2.integrated_flow(jetscape_flow,jetscape_event)
19>>> v3, v3_error = flow3.integrated_flow(jetscape_flow,jetscape_event)

Methods

integrated_flow:

Computes the integrated flow.

differential_flow:

Computes the differential flow.

ScalarProductFlow.integrated_flow(particle_data, particle_data_event_plane, self_corr=True)[source]

Compute the integrated flow.

Parameters:
particle_datalist

List of particle data of which the flow is calculated.

particle_data_event_planelist

List of particle data for the event plane calculation.

self_corrbool, optional

Whether to consider self-correlation in the flow calculation. Default is True.

Returns:
tuple

A tuple containing the integrated flow value and the corresponding uncertainty.

ScalarProductFlow.differential_flow(particle_data, bins, flow_as_function_of, particle_data_event_plane, self_corr=True)[source]

Compute the differential flow.

Parameters:
particle_datalist

List of particle data of which the flow is calculated.

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”).

particle_data_event_planelist

List of particle data for the event plane calculation.

self_corrbool, optional

Whether to consider self-correlation in the flow calculation. Default is True.

Returns:
list

A list of tuples containing the flow values and uncertainties for each bin.