Version: SMASH-3.1
smash::DensityParameters Class Reference

#include <density.h>

A class to pre-calculate and store parameters relevant for density calculation.

It has to be initialized only once per SMASH run.

Definition at line 108 of file density.h.

Public Member Functions

 DensityParameters (const ExperimentParameters &par)
 Constructor of DensityParameters. More...
 
int ntest () const
 
int nensembles () const
 
DerivativesMode derivatives () const
 
RestFrameDensityDerivativesMode rho_derivatives () const
 
SmearingMode smearing () const
 
double central_weight () const
 
double triangular_range () const
 
double r_cut () const
 
double r_cut_sqr () const
 
double two_sig_sqr_inv () const
 
double norm_factor_sf () const
 
bool only_participants () const
 

Private Attributes

const double sig_
 Gaussian smearing width [fm]. More...
 
const double r_cut_
 Cut-off radius [fm]. More...
 
double r_cut_sqr_
 Squared cut-off radius [fm \(^2\)]. More...
 
double two_sig_sqr_inv_
 \( (2 \sigma^2)^{-1} \) [fm \(^{-2}\)] More...
 
double norm_factor_sf_
 Normalization for Gaussian smearing factor. More...
 
const int ntest_
 Testparticle number. More...
 
const int nensembles_
 Number of ensembles. More...
 
const DerivativesMode derivatives_
 Mode of calculating the gradients. More...
 
const RestFrameDensityDerivativesMode rho_derivatives_
 Whether to calculate the rest frame density derivatives. More...
 
const SmearingMode smearing_
 Mode of smearing. More...
 
const double central_weight_
 Weight of the central cell in the discrete smearing. More...
 
const double triangular_range_
 Range of the triangular smearing. More...
 
bool only_participants_
 Flag to take into account only participants. More...
 

Constructor & Destructor Documentation

◆ DensityParameters()

smash::DensityParameters::DensityParameters ( const ExperimentParameters par)
inline

Constructor of DensityParameters.

Parameters
[in]parStruct containing the Gaussian smearing width \(\sigma\), the cutoff factor \(a\) where the cutoff radius \(r_{\rm cut}=a\sigma\), the test-particle number, the number of ensembles, the mode of calculating the derivatives, the smearing mode, the central weight for Discrete smearing, the range (in units of lattice spacing) for Triangular smearing and the flag about using only participants or also spectators

Definition at line 121 of file density.h.

122  : sig_(par.gaussian_sigma),
123  r_cut_(par.gauss_cutoff_in_sigma * par.gaussian_sigma),
124  ntest_(par.testparticles),
125  nensembles_(par.n_ensembles),
126  derivatives_(par.derivatives_mode),
127  rho_derivatives_(par.rho_derivatives_mode),
128  smearing_(par.smearing_mode),
129  central_weight_(par.discrete_weight),
130  triangular_range_(par.triangular_range),
131  only_participants_(par.only_participants) {
133  const double two_sig_sqr = 2 * sig_ * sig_;
134  two_sig_sqr_inv_ = 1. / two_sig_sqr;
135  const double norm = smearing_factor_norm(two_sig_sqr);
136  const double corr_factor =
137  smearing_factor_rcut_correction(par.gauss_cutoff_in_sigma);
138  norm_factor_sf_ = 1. / (norm * ntest_ * nensembles_ * corr_factor);
139  }
double r_cut_sqr_
Squared cut-off radius [fm ].
Definition: density.h:177
const double central_weight_
Weight of the central cell in the discrete smearing.
Definition: density.h:193
const double triangular_range_
Range of the triangular smearing.
Definition: density.h:195
const SmearingMode smearing_
Mode of smearing.
Definition: density.h:191
const int nensembles_
Number of ensembles.
Definition: density.h:185
const DerivativesMode derivatives_
Mode of calculating the gradients.
Definition: density.h:187
bool only_participants_
Flag to take into account only participants.
Definition: density.h:197
const double sig_
Gaussian smearing width [fm].
Definition: density.h:173
const RestFrameDensityDerivativesMode rho_derivatives_
Whether to calculate the rest frame density derivatives.
Definition: density.h:189
const int ntest_
Testparticle number.
Definition: density.h:183
const double r_cut_
Cut-off radius [fm].
Definition: density.h:175
double norm_factor_sf_
Normalization for Gaussian smearing factor.
Definition: density.h:181
double two_sig_sqr_inv_
[fm ]
Definition: density.h:179
double smearing_factor_norm(const double two_sigma_sqr)
Norm of the Gaussian smearing function.
Definition: density.h:77
double smearing_factor_rcut_correction(const double rcut_in_sigma)
Gaussians used for smearing are cut at radius for calculation speed-up.
Definition: density.h:99

Member Function Documentation

◆ ntest()

int smash::DensityParameters::ntest ( ) const
inline
Returns
Testparticle number

Definition at line 141 of file density.h.

141 { return ntest_; }

◆ nensembles()

int smash::DensityParameters::nensembles ( ) const
inline
Returns
Number of ensembles

Definition at line 143 of file density.h.

143 { return nensembles_; }

◆ derivatives()

DerivativesMode smash::DensityParameters::derivatives ( ) const
inline
Returns
Mode of gradient calculation

Definition at line 145 of file density.h.

145 { return derivatives_; }

◆ rho_derivatives()

RestFrameDensityDerivativesMode smash::DensityParameters::rho_derivatives ( ) const
inline
Returns
Mode of rest frame density derivatives (on or off)

Definition at line 147 of file density.h.

147  {
148  return rho_derivatives_;
149  }

◆ smearing()

SmearingMode smash::DensityParameters::smearing ( ) const
inline
Returns
Smearing mode

Definition at line 151 of file density.h.

151 { return smearing_; }

◆ central_weight()

double smash::DensityParameters::central_weight ( ) const
inline
Returns
Weight of the central cell in the discrete smearing

Definition at line 153 of file density.h.

153 { return central_weight_; }

◆ triangular_range()

double smash::DensityParameters::triangular_range ( ) const
inline
Returns
Range of the triangular smearing, in units of lattice spacing

Definition at line 155 of file density.h.

155 { return triangular_range_; }

◆ r_cut()

double smash::DensityParameters::r_cut ( ) const
inline
Returns
Cut-off radius [fm]

Definition at line 157 of file density.h.

157 { return r_cut_; }

◆ r_cut_sqr()

double smash::DensityParameters::r_cut_sqr ( ) const
inline
Returns
Squared cut-off radius [fm \(^2\)]

Definition at line 159 of file density.h.

159 { return r_cut_sqr_; }

◆ two_sig_sqr_inv()

double smash::DensityParameters::two_sig_sqr_inv ( ) const
inline
Returns
\( (2 \sigma^2)^{-1} \) [fm \(^{-2}\)]

Definition at line 161 of file density.h.

161 { return two_sig_sqr_inv_; }

◆ norm_factor_sf()

double smash::DensityParameters::norm_factor_sf ( ) const
inline
Returns
Normalization for smearing factor. Unnormalized smearing factor \( sf(\mathbf{r}) \) has to be multiplied by this to have \( \int d^3r \, sf(\mathbf{r}) = 1 \).

Definition at line 167 of file density.h.

167 { return norm_factor_sf_; }

◆ only_participants()

bool smash::DensityParameters::only_participants ( ) const
inline
Returns
counting only participants (true) or also spectators (false)

Definition at line 169 of file density.h.

169 { return only_participants_; }

Member Data Documentation

◆ sig_

const double smash::DensityParameters::sig_
private

Gaussian smearing width [fm].

Definition at line 173 of file density.h.

◆ r_cut_

const double smash::DensityParameters::r_cut_
private

Cut-off radius [fm].

Definition at line 175 of file density.h.

◆ r_cut_sqr_

double smash::DensityParameters::r_cut_sqr_
private

Squared cut-off radius [fm \(^2\)].

Definition at line 177 of file density.h.

◆ two_sig_sqr_inv_

double smash::DensityParameters::two_sig_sqr_inv_
private

\( (2 \sigma^2)^{-1} \) [fm \(^{-2}\)]

Definition at line 179 of file density.h.

◆ norm_factor_sf_

double smash::DensityParameters::norm_factor_sf_
private

Normalization for Gaussian smearing factor.

Definition at line 181 of file density.h.

◆ ntest_

const int smash::DensityParameters::ntest_
private

Testparticle number.

Definition at line 183 of file density.h.

◆ nensembles_

const int smash::DensityParameters::nensembles_
private

Number of ensembles.

Definition at line 185 of file density.h.

◆ derivatives_

const DerivativesMode smash::DensityParameters::derivatives_
private

Mode of calculating the gradients.

Definition at line 187 of file density.h.

◆ rho_derivatives_

const RestFrameDensityDerivativesMode smash::DensityParameters::rho_derivatives_
private

Whether to calculate the rest frame density derivatives.

Definition at line 189 of file density.h.

◆ smearing_

const SmearingMode smash::DensityParameters::smearing_
private

Mode of smearing.

Definition at line 191 of file density.h.

◆ central_weight_

const double smash::DensityParameters::central_weight_
private

Weight of the central cell in the discrete smearing.

Definition at line 193 of file density.h.

◆ triangular_range_

const double smash::DensityParameters::triangular_range_
private

Range of the triangular smearing.

Definition at line 195 of file density.h.

◆ only_participants_

bool smash::DensityParameters::only_participants_
private

Flag to take into account only participants.

Definition at line 197 of file density.h.


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