ReactionPlaneFlow
- class ReactionPlaneFlow.ReactionPlaneFlow(n=2)[source]
This class implements a reaction plane flow analysis algorithm.
For this method, the flow is calculated under the assumption that the reaction plane angle is constant throughout all events, i.e., the impact parameter is always oriented in the same direction. The flow is calculated as
\[v_n = \left\langle \exp{in\phi_i}\right\rangle,\]where we average over all particles of all events. We return complex numbers, which contain the information about the magnitude and the angle. If a weight is set for the particles in the Particle objects, then this is used in the flow calculation.
- Parameters:
- nint, optional
The value of the harmonic. Default is 2.
Examples
A demonstration how to calculate flow with the reaction plane method.
1>>> from sparkx.Jetscape import Jetscape 2>>> from sparkx.flow.ReactionPlaneFlow import ReactionPlaneFlow 3>>> 4>>> JETSCAPE_FILE_PATH_FLOW = [Jetscape_directory]/particle_lists_flow.dat 5 6>>> # Jetscape object containing the particles on which we want to calculate flow 7>>> jetscape_flow = Jetscape(JETSCAPE_FILE_PATH_FLOW) 8>>> 9>>> # Create flow objects for v2 10>>> flow2 = ReactionPlaneFlow(n=2).particle_objects_list() 11>>> 12>>> # Calculate the integrated flow with error 13>>> v2 = flow2.integrated_flow(jetscape_flow) 14>>> 15>>> # Calculate the differential flow with error 16>>> pt_bins = [0.0,0.5,1.0,2.0,3.0,4.0] 17>>> v2_differential = flow2.integrated_flow(jetscape_flow,pt_bins,'pt')
Methods
integrated_flow:
Computes the integrated flow.
differential_flow:
Computes the differential flow.
- ReactionPlaneFlow.integrated_flow(particle_data)[source]
Compute the integrated flow.
- Parameters:
- particle_datalist
List of particle data.
- Returns:
- complex
The integrated flow value, represented as a complex number.
- ReactionPlaneFlow.differential_flow(particle_data, bins, flow_as_function_of)[source]
Compute the differential flow.
- Parameters:
- particle_datalist
List of particle data.
- 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”).
- Returns:
- list
A list of complex numbers representing the flow values for each bin.