Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
trento::Event Class Reference

#include <JETSCAPE/blob/main/external_packages/trento/src/event.h>

+ Collaboration diagram for trento::Event:

Public Types

using Grid = boost::multi_array< double, 2 >
 Alias for a 2-dimensional grid.
 
using Grid3D = boost::multi_array< double, 3 >
 Alias for a 3-dimensional grid.
 

Public Member Functions

 Event (const VarMap &var_map)
 Instantiate from the configuration.
 
void compute (const Nucleus &nucleusA, const Nucleus &nucleusB, NucleonProfile &profile)
 
const int & npart () const
 Number of nucleon participants.
 
const int & ncoll () const
 WK: Number of binary collision.
 
const doublemultiplicity () const
 
const std::map< int, double > & eccentricity () const
 
const Grid3Ddensity_grid () const
 The entropy (particle) density grid as a three-dimensional array.
 
const doubledxy () const
 returns grid steps
 
const doubledeta () const
 
const std::map< int, double > & participant_plane () const
 
const GridTAB_grid () const
 WK: The TAB grid for hard process vertex sampling.
 
void clear_TAB (void)
 WK: clear and increase TAB.
 
void accumulate_TAB (Nucleon &A, Nucleon &B, NucleonProfile &profile)
 
const bool & with_ncoll () const
 WK:
 
const std::pair< double, doublemass_center_index () const
 

Private Member Functions

void compute_nuclear_thickness (const Nucleus &nucleus, NucleonProfile &profile, Grid &TX)
 
template<typename GenMean >
void compute_reduced_thickness (GenMean gen_mean)
 
void compute_observables ()
 Compute observables that require a second pass over the reduced thickness grid.
 
bool is3D () const
 

Private Attributes

std::function< void()> compute_reduced_thickness_
 
const double norm_
 Normalization factor.
 
const double beam_energy_
 Beam energy sqrt(s) and beam rapidity y.
 
const double exp_ybeam_
 
const double mean_coeff_
 Rapidity distribution cumulant coefficients.
 
const double std_coeff_
 
const double skew_coeff_
 
const int skew_type_
 
const double dxy_
 Grid step size.
 
const double deta_
 
const int nsteps_
 Number of grid steps.
 
const int neta_
 
const double xymax_
 Grid xy maximum (half width).
 
const double etamax_
 
fast_eta2y eta2y_
 fast eta to y transformer.
 
cumulant_generating cgf_
 cumulant generating approach
 
Grid3D TR_
 Reduced thickness and entropy (particle) density grids.
 
Grid3D density_
 
Grid TA_
 Nuclear thickness grids TA, TB and reduced thickness grid TR.
 
Grid TB_
 
Grid TAB_
 
double ixcm_
 Center of mass coordinates in "units" of grid index (not fm).
 
double iycm_
 
int npart_
 Number of participants.
 
int ncoll_
 WK: Number of binary collisions.
 
double multiplicity_
 Multiplicity (total entropy).
 
std::map< int, doubleeccentricity_
 Eccentricity harmonics.
 
std::map< int, doublepsi_
 WK: Initial density event planes.
 
bool with_ncoll_
 WK:
 

Detailed Description

The primary computation class, responsible for constructing nuclear thickness functions and calculating event observables. Designed to be created once and used many times by repeatedly calling compute(). Stores its observables internally and provides inspector methods.

Example::

Event event{var_map}; for (int n = 0; n < nevents; ++n) { event.compute(nucleusA, nucleusB, nucleon_profile); do_something( event.npart(), event.multiplicity(), event.eccentricity(), event.reduced_thickness_grid() ); }

Definition at line 46 of file event.h.

View newest version in sPHENIX GitHub at line 46 of file event.h

Member Typedef Documentation

using trento::Event::Grid = boost::multi_array<double, 2>

Alias for a 2-dimensional grid.

Definition at line 61 of file event.h.

View newest version in sPHENIX GitHub at line 61 of file event.h

using trento::Event::Grid3D = boost::multi_array<double, 3>

Alias for a 3-dimensional grid.

Definition at line 64 of file event.h.

View newest version in sPHENIX GitHub at line 64 of file event.h

Constructor & Destructor Documentation

Event::Event ( const VarMap var_map)
explicit

Instantiate from the configuration.

Definition at line 57 of file event.cxx.

View newest version in sPHENIX GitHub at line 57 of file event.cxx

References compute_reduced_thickness(), compute_reduced_thickness_, acts::error, merge_hashes::p, skew_coeff_, skew_type_, and TINY.

+ Here is the call graph for this function:

Member Function Documentation

void Event::accumulate_TAB ( Nucleon A,
Nucleon B,
NucleonProfile profile 
)

Definition at line 157 of file event.cxx.

View newest version in sPHENIX GitHub at line 157 of file event.cxx

References trento::NucleonProfile::deterministic_thickness(), dxy_, ncoll_, trento::NucleonProfile::norm_Tpp(), nsteps_, physmon_track_finding_ttbar::r, trento::NucleonProfile::radius(), TAB_, trento::Nucleon::x(), ambiguity_solver_full_chain::x, xymax_, y, and trento::Nucleon::y().

Referenced by trento::Collider::sample_impact_param().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Event::clear_TAB ( void  )

WK: clear and increase TAB.

Definition at line 147 of file event.cxx.

View newest version in sPHENIX GitHub at line 147 of file event.cxx

References ncoll_, nsteps_, and TAB_.

Referenced by trento::Collider::sample_impact_param().

+ Here is the caller graph for this function:

void Event::compute ( const Nucleus nucleusA,
const Nucleus nucleusB,
NucleonProfile profile 
)

Compute thickness functions and event observables for a pair of Nucleus objects and a NucleonProfile. The nuclei must have already sampled nucleon positions and participants before passing to this function.

Definition at line 117 of file event.cxx.

View newest version in sPHENIX GitHub at line 117 of file event.cxx

References compute_nuclear_thickness(), compute_observables(), compute_reduced_thickness_, npart_, TA_, and TB_.

Referenced by trento::Collider::run_events().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Event::compute_nuclear_thickness ( const Nucleus nucleus,
NucleonProfile profile,
Grid TX 
)
private

Compute a nuclear thickness function (TA or TB) onto a grid for a given nucleus and nucleon profile. This destroys any data previously contained by the grid.

Definition at line 194 of file event.cxx.

View newest version in sPHENIX GitHub at line 194 of file event.cxx

References dxy_, trento::NucleonProfile::fluctuate(), npart_, nsteps_, physmon_track_finding_ttbar::r, trento::NucleonProfile::radius(), trento::NucleonProfile::thickness(), ambiguity_solver_full_chain::x, xymax_, and y.

Referenced by compute().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Event::compute_observables ( )
private

Compute observables that require a second pass over the reduced thickness grid.

Definition at line 282 of file event.cxx.

View newest version in sPHENIX GitHub at line 282 of file event.cxx

References eccentricity_, ixcm_, iycm_, nsteps_, psi_, physmon_track_finding_ttbar::r, r2, t, TR_, ambiguity_solver_full_chain::x, Acts::Svg::View::xy(), and y.

Referenced by compute().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename GenMean >
void Event::compute_reduced_thickness ( GenMean  gen_mean)
private

Compute the reduced thickness function (TR) after computing TA and TB. Template parameter GenMean sets the actual function that returns TR(TA, TB). It is determined at runtime based on the configuration.

At midrapidity

If operating in the 3D mode, the 3D density_ array is filled with its value at eta=0 identical to TR_ array

Definition at line 240 of file event.cxx.

View newest version in sPHENIX GitHub at line 240 of file event.cxx

References cumulant_generating::calculate_dsdy(), cgf_, density_, deta_, dxy_, eta, eta2y_, etamax_, exp_ybeam_, cumulant_generating::interp_dsdy(), is3D(), ixcm_, iycm_, fast_eta2y::Jacobian(), mean(), mean_coeff_, mean_function(), multiplicity_, neta_, norm_, nsteps_, fast_eta2y::rapidity(), skew_coeff_, skew_function(), skew_type_, std_coeff_, std_function(), sum(), t, TA_, TB_, and TR_.

Referenced by Event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Grid3D& trento::Event::density_grid ( ) const
inline

The entropy (particle) density grid as a three-dimensional array.

Definition at line 92 of file event.h.

View newest version in sPHENIX GitHub at line 92 of file event.h

References density_, is3D(), and TR_.

+ Here is the call graph for this function:

const double& trento::Event::deta ( ) const
inline

Definition at line 103 of file event.h.

View newest version in sPHENIX GitHub at line 103 of file event.h

References deta_.

const double& trento::Event::dxy ( ) const
inline

returns grid steps

Definition at line 100 of file event.h.

View newest version in sPHENIX GitHub at line 100 of file event.h

References dxy_.

const std::map<int, double>& trento::Event::eccentricity ( ) const
inline

Eccentricity harmonics \varepsilon_n for n = 2–5. Returns a map of (n : \varepsilon_n) pairs, so e.g.::

double e2 = event.eccentricity().at(2);

Definition at line 88 of file event.h.

View newest version in sPHENIX GitHub at line 88 of file event.h

References eccentricity_.

bool Event::is3D ( ) const
private

Definition at line 127 of file event.cxx.

View newest version in sPHENIX GitHub at line 127 of file event.cxx

References etamax_, and TINY.

Referenced by compute_reduced_thickness(), and density_grid().

+ Here is the caller graph for this function:

const std::pair<double, double> trento::Event::mass_center_index ( ) const
inline

Definition at line 122 of file event.h.

View newest version in sPHENIX GitHub at line 122 of file event.h

References ixcm_, and iycm_.

const double& trento::Event::multiplicity ( ) const
inline

Multiplicity—or more specifically, total entropy. May be interpreted as dS/dy or dS/d\eta at midrapidity.

Definition at line 78 of file event.h.

View newest version in sPHENIX GitHub at line 78 of file event.h

References multiplicity_.

Referenced by trento::Collider::run_events().

+ Here is the caller graph for this function:

const int& trento::Event::ncoll ( ) const
inline

WK: Number of binary collision.

Definition at line 71 of file event.h.

View newest version in sPHENIX GitHub at line 71 of file event.h

References ncoll_.

const int& trento::Event::npart ( ) const
inline

Number of nucleon participants.

Definition at line 67 of file event.h.

View newest version in sPHENIX GitHub at line 67 of file event.h

References npart_.

Referenced by trento::Collider::run_events().

+ Here is the caller graph for this function:

const std::map<int, double>& trento::Event::participant_plane ( ) const
inline

Definition at line 106 of file event.h.

View newest version in sPHENIX GitHub at line 106 of file event.h

References psi_.

const Grid& trento::Event::TAB_grid ( ) const
inline

WK: The TAB grid for hard process vertex sampling.

Definition at line 111 of file event.h.

View newest version in sPHENIX GitHub at line 111 of file event.h

References TAB_.

const bool& trento::Event::with_ncoll ( ) const
inline

WK:

Definition at line 119 of file event.h.

View newest version in sPHENIX GitHub at line 119 of file event.h

References with_ncoll_.

Member Data Documentation

const double trento::Event::beam_energy_
private

Beam energy sqrt(s) and beam rapidity y.

Definition at line 154 of file event.h.

View newest version in sPHENIX GitHub at line 154 of file event.h

cumulant_generating trento::Event::cgf_
private

cumulant generating approach

Definition at line 173 of file event.h.

View newest version in sPHENIX GitHub at line 173 of file event.h

Referenced by compute_reduced_thickness().

std::function<void()> trento::Event::compute_reduced_thickness_
private

An instantation of compute_reduced_thickness<GenMean> with a bound argument for GenMean. Created in the ctor. Implemented this way to allow the compiler to fully inline the GenMean function and only require a single "virtual" function call per event.

Definition at line 142 of file event.h.

View newest version in sPHENIX GitHub at line 142 of file event.h

Referenced by compute(), and Event().

Grid3D trento::Event::density_
private

Definition at line 176 of file event.h.

View newest version in sPHENIX GitHub at line 176 of file event.h

Referenced by compute_reduced_thickness(), and density_grid().

const double trento::Event::deta_
private

Definition at line 161 of file event.h.

View newest version in sPHENIX GitHub at line 161 of file event.h

Referenced by compute_reduced_thickness(), and deta().

const double trento::Event::dxy_
private

Grid step size.

Definition at line 161 of file event.h.

View newest version in sPHENIX GitHub at line 161 of file event.h

Referenced by accumulate_TAB(), compute_nuclear_thickness(), compute_reduced_thickness(), and dxy().

std::map<int, double> trento::Event::eccentricity_
private

Eccentricity harmonics.

Definition at line 194 of file event.h.

View newest version in sPHENIX GitHub at line 194 of file event.h

Referenced by compute_observables(), and eccentricity().

fast_eta2y trento::Event::eta2y_
private

fast eta to y transformer.

Definition at line 170 of file event.h.

View newest version in sPHENIX GitHub at line 170 of file event.h

Referenced by compute_reduced_thickness().

const double trento::Event::etamax_
private

Definition at line 167 of file event.h.

View newest version in sPHENIX GitHub at line 167 of file event.h

Referenced by compute_reduced_thickness(), and is3D().

const double trento::Event::exp_ybeam_
private

Definition at line 154 of file event.h.

View newest version in sPHENIX GitHub at line 154 of file event.h

Referenced by compute_reduced_thickness().

double trento::Event::ixcm_
private

Center of mass coordinates in "units" of grid index (not fm).

Definition at line 182 of file event.h.

View newest version in sPHENIX GitHub at line 182 of file event.h

Referenced by compute_observables(), compute_reduced_thickness(), and mass_center_index().

double trento::Event::iycm_
private

Definition at line 182 of file event.h.

View newest version in sPHENIX GitHub at line 182 of file event.h

Referenced by compute_observables(), compute_reduced_thickness(), and mass_center_index().

const double trento::Event::mean_coeff_
private

Rapidity distribution cumulant coefficients.

Definition at line 157 of file event.h.

View newest version in sPHENIX GitHub at line 157 of file event.h

Referenced by compute_reduced_thickness().

double trento::Event::multiplicity_
private

Multiplicity (total entropy).

Definition at line 191 of file event.h.

View newest version in sPHENIX GitHub at line 191 of file event.h

Referenced by compute_reduced_thickness(), and multiplicity().

int trento::Event::ncoll_
private

WK: Number of binary collisions.

Definition at line 188 of file event.h.

View newest version in sPHENIX GitHub at line 188 of file event.h

Referenced by accumulate_TAB(), clear_TAB(), and ncoll().

const int trento::Event::neta_
private

Definition at line 164 of file event.h.

View newest version in sPHENIX GitHub at line 164 of file event.h

Referenced by compute_reduced_thickness().

const double trento::Event::norm_
private

Normalization factor.

Definition at line 151 of file event.h.

View newest version in sPHENIX GitHub at line 151 of file event.h

Referenced by compute_reduced_thickness().

int trento::Event::npart_
private

Number of participants.

Definition at line 185 of file event.h.

View newest version in sPHENIX GitHub at line 185 of file event.h

Referenced by compute(), compute_nuclear_thickness(), and npart().

const int trento::Event::nsteps_
private

Number of grid steps.

Definition at line 164 of file event.h.

View newest version in sPHENIX GitHub at line 164 of file event.h

Referenced by accumulate_TAB(), clear_TAB(), compute_nuclear_thickness(), compute_observables(), and compute_reduced_thickness().

std::map<int, double> trento::Event::psi_
private

WK: Initial density event planes.

Definition at line 197 of file event.h.

View newest version in sPHENIX GitHub at line 197 of file event.h

Referenced by compute_observables(), and participant_plane().

const double trento::Event::skew_coeff_
private

Definition at line 157 of file event.h.

View newest version in sPHENIX GitHub at line 157 of file event.h

Referenced by compute_reduced_thickness(), and Event().

const int trento::Event::skew_type_
private

Definition at line 158 of file event.h.

View newest version in sPHENIX GitHub at line 158 of file event.h

Referenced by compute_reduced_thickness(), and Event().

const double trento::Event::std_coeff_
private

Definition at line 157 of file event.h.

View newest version in sPHENIX GitHub at line 157 of file event.h

Referenced by compute_reduced_thickness().

Grid trento::Event::TA_
private

Nuclear thickness grids TA, TB and reduced thickness grid TR.

Definition at line 179 of file event.h.

View newest version in sPHENIX GitHub at line 179 of file event.h

Referenced by compute(), and compute_reduced_thickness().

Grid trento::Event::TAB_
private

Definition at line 179 of file event.h.

View newest version in sPHENIX GitHub at line 179 of file event.h

Referenced by accumulate_TAB(), clear_TAB(), and TAB_grid().

Grid trento::Event::TB_
private

Definition at line 179 of file event.h.

View newest version in sPHENIX GitHub at line 179 of file event.h

Referenced by compute(), and compute_reduced_thickness().

Grid3D trento::Event::TR_
private

Reduced thickness and entropy (particle) density grids.

Definition at line 176 of file event.h.

View newest version in sPHENIX GitHub at line 176 of file event.h

Referenced by compute_observables(), compute_reduced_thickness(), and density_grid().

bool trento::Event::with_ncoll_
private

WK:

Definition at line 200 of file event.h.

View newest version in sPHENIX GitHub at line 200 of file event.h

Referenced by with_ncoll().

const double trento::Event::xymax_
private

Grid xy maximum (half width).

Definition at line 167 of file event.h.

View newest version in sPHENIX GitHub at line 167 of file event.h

Referenced by accumulate_TAB(), and compute_nuclear_thickness().


The documentation for this class was generated from the following files: