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.Oscar import Oscar 2>>> from sparkx.BulkObservables import BulkObservables 3 4>>> # ============================================================ 5>>> # 1. Load and filter input particles from simulation output 6>>> # ============================================================ 7 8>>> # You can obtain a list of Particle objects using either the 9>>> # Oscar or Jetscape classes. Alternatively, you may use a 10>>> # custom user-defined list of Particle objects. 11>>> # 12>>> # In this example, we use the Oscar class and filter the output 13>>> # to include only charged particles. 14>>> 15>>> OSCAR_FILE_PATH = [Oscar_directory]/particle_lists.oscar 16>>> particle_objects_list = Oscar(OSCAR_FILE_PATH, filters={'charged_particles': True}).particle_objects_list() 17 18>>> # ===================================== 19>>> # 2. Calculate bulk observables 20>>> # ===================================== 21 22>>> # Initialize the BulkObservables class 23>>> bulk_observables = BulkObservables(particle_objects_list) 24 25>>> # Calculate dN/dy 26>>> histogram_dNdy = bulk_observables.dNdy() 27 28>>> # Calculate dN/dpT 29>>> histogram_dNdpT = bulk_observables.dNdpT() 30 31>>> # Calculate dN/dη 32>>> histogram_dNdEta = bulk_observables.dNdEta() 33 34>>> # Calculate dN/dmT 35>>> histogram_dNdmT = bulk_observables.dNdmT() 36 37>>> # Calculate mid-rapidity yield 38>>> mid_rapidity_yield = bulk_observables.mid_rapidity_yield() 39>>> print(mid_rapidity_yield) 40 41>>> # Calculate mid-rapidity mean pT 42>>> mid_rapidity_mean_pT = bulk_observables.mid_rapidity_mean_pT() 43>>> print(mid_rapidity_mean_pT) 44 45>>> # Calculate mid-rapidity mean mT 46>>> mid_rapidity_mean_mT = bulk_observables.mid_rapidity_mean_mT() 47>>> 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]