BulkObservables

class BulkObservables.BulkObservables(particle_objects_list: List[List[Particle]])[source]

Class to calculate bulk observables from a list of Particle objects. It is assumed that all necessary cuts were performed to the particle list before.

Examples

 1>>> from sparkx.BulkObservables import BulkObservables
 2
 3>>> # Initialize the BulkObservables class
 4>>> bulk_observables = BulkObservables(particle_objects_list)
 5
 6>>> # Calculate dN/dy
 7>>> histogram_dNdy = bulk_observables.dNdy()
 8
 9>>> # Calculate dN/dpT
10>>> histogram_dNdpT = bulk_observables.dNdpT()
11
12>>> # Calculate dN/dη
13>>> histogram_dNdEta = bulk_observables.dNdEta()
14
15>>> # Calculate dN/dmT
16>>> histogram_dNdmT = bulk_observables.dNdmT()
17
18>>> # Calculate mid-rapidity yield
19>>> mid_rapidity_yield = bulk_observables.mid_rapidity_yield()
20>>> print(mid_rapidity_yield)
21
22>>> # Calculate mid-rapidity mean pT
23>>> mid_rapidity_mean_pT = bulk_observables.mid_rapidity_mean_pT()
24>>> print(mid_rapidity_mean_pT)
25
26>>> # Calculate mid-rapidity mean mT
27>>> mid_rapidity_mean_mT = bulk_observables.mid_rapidity_mean_mT()
28>>> print(mid_rapidity_mean_mT)
Attributes:
particle_objects: ReadOnlyList

A read-only list of lists of Particle objects.

Methods

dNdy:

Calculate the event averaged yield \(\frac{dN}{dy}\).

dNdpT:

Calculate the event averaged yield \(\frac{dN}{dp_T}\).

dNdEta:

Calculate the event averaged yield \(\frac{dN}{d\eta}\)

dNdmT:

Calculate the event averaged yield \(\frac{dN}{dm_T}\).

mid_rapidity_yield:

Calculate the event-averaged particle yield at mid-rapidity.

mid_rapidity_mean_pT:

Calculate the event-averaged mean transverse momentum \(p_T\) at mid-rapidity.

mid_rapidity_mean_mT:

Calculate the event-averaged mean transverse mass \(m_T\) at mid-rapidity.

BulkObservables.dNdy(bin_properties: Tuple[int | float, int | float, int] | List[int | float] | None = None) Histogram[source]

Calculate the event averaged yield \(\frac{dN}{dy}\)

Parameters:
bin_properties: tuple, list

Optional tuple (start, stop, num) for histogram binning. If not given, a default will be used

Returns:
Histogram

1D histogram containing the event averaged particle counts per rapidity bin.

BulkObservables.dNdpT(bin_properties: Tuple[int | float, int | float, int] | List[int | float] | None = None) Histogram[source]

Calculate the event averaged yield \(\frac{dN}{dp_T}\)

Parameters:
bin_properties: tuple, list

Optional tuple (start, stop, num) for histogram binning. If not given, a default will be used

Returns:
Histogram

1D histogram containing the event averaged particle counts per transverse momentum bin.

BulkObservables.dNdEta(bin_properties: Tuple[int | float, int | float, int] | List[int | float] | None = None) Histogram[source]

Calculate the event averaged yield \(\frac{dN}{d\eta}\)

Parameters:
bin_properties: tuple, list

Optional tuple (start, stop, num) for histogram binning. If not given, a default will be used

Returns:
Histogram

1D histogram containing the event averaged particle counts per pseudo-rapidity bin.

BulkObservables.dNdmT(bin_properties: Tuple[int | float, int | float, int] | List[int | float] | None = None) Histogram[source]

Calculate the event averaged yield \(\frac{dN}{dm_T}\)

Parameters:
bin_properties: tuple, list

Optional tuple (start, stop, num) for histogram binning. If not given, a default will be used

Returns:
Histogram

1D histogram containing the event averaged particle counts per transverse mass bin.

BulkObservables.mid_rapidity_yield(y_width: float = 1.0, quantity: str = 'rapidity') float[source]

Calculate the event-averaged particle yield at mid-rapidity.

Parameters:
y_width: float
The rapidity window width, centered at 0, within which

particles are counted. The default value is 1, meaning the function will count particles with rapidity between -0.5 and 0.5.

quantity: str

The quantity to be used for the rapidity calculation (rapidity, pseudorapidity, spacetime_rapidity).

Returns:
particle_counter / num_events: float

The average number of particles per event that fall within the specified rapidity range.

BulkObservables.mid_rapidity_mean_pT(y_width: float = 1.0, quantity: str = 'rapidity') float[source]

Calculate the event-averaged mean transverse momentum \(p_T\) at mid-rapidity. It is assumed that detector cuts have been performed on the particle list.

Parameters:
y_width: float
The rapidity window width, centered at 0, within which

particles are counted. The default value is 1, meaning the function will count particles with rapidity between -0.5 and 0.5.

quantity: str

The quantity to be used for the rapidity calculation (rapidity, pseudorapidity, spacetime_rapidity).

Returns:
particle_counter / num_events: float

The average pT of particles per event that fall within the specified rapidity range.

BulkObservables.mid_rapidity_mean_mT(y_width: float = 1.0, quantity: str = 'rapidity') float[source]

Calculate the event-averaged mean transverse mass \(m_T\) at mid-rapidity.

Parameters:
y_width: float
The rapidity window width, centered at 0, within which

particles are counted. The default value is 1, meaning the function will count particles with rapidity between -0.5 and 0.5.

quantity: str

The quantity to be used for the rapidity calculation (rapidity, pseudorapidity, spacetime_rapidity).

Returns:
particle_counter / num_events: float

The average mT of particles per event that fall within the specified rapidity range.