Version: SMASH-3.3
smash::GrandCanThermalizer Class Reference

#include <grandcan_thermalizer.h>

The GrandCanThermalizer class implements the following functionality:

  1. Create a lattice and find the local rest frame energy density in each cell from the particles.
  2. Remove particles from the cells, where the energy density is high enough. Save the energy, momentum and quantum numbers of the removed particles.
  3. Sample new particles instead of the removed ones according to the grand-canonical thermal distribution, but with an additional constraint: the energy, momentum and quantum numbers should be the same as those of the removed particles.

The step 3. is a challenging task, so several algorithms are implemented that try to fulfil the requirements. The algorithms are a trade-off between mathematical rigour and computational speed. All of them are shown to reproduce the mean values of multiplicities correctly. However, this is not the case for multiplicity fluctuations. For details see Oliinychenko:2016vkg [46].

Definition at line 189 of file grandcan_thermalizer.h.

Public Member Functions

 GrandCanThermalizer (const std::array< double, 3 > lat_sizes, const std::array< int, 3 > n_cells, const std::array< double, 3 > origin, bool periodicity, double e_critical, double t_start, double delta_t, ThermalizationAlgorithm algo, bool BF_microcanonical)
 Default constructor for the GranCanThermalizer to allocate the lattice. More...
 
 GrandCanThermalizer (Configuration &conf, const std::array< double, 3 > lat_sizes, const std::array< double, 3 > origin, bool periodicity)
 
bool is_time_to_thermalize (std::unique_ptr< Clock > &clock) const
 Check that the clock is close to n * period of thermalization, since the thermalization only happens at these times. More...
 
void update_thermalizer_lattice (const std::vector< Particles > &ensembles, const DensityParameters &par, bool ignore_cells_under_threshold=true)
 Compute all the thermodynamical quantities on the lattice from particles. More...
 
ThreeVector uniform_in_cell () const
 
void renormalize_momenta (ParticleList &plist, const FourVector required_total_momentum)
 Changes energy and momenta of the particles in plist to match the required_total_momentum. More...
 
void sample_multinomial (HadronClass particle_class, int N)
 The sample_multinomial function samples integer numbers n_i distributed according to the multinomial distribution with sum N: \( p(n_1, n_2, \dots) = \prod a_i^{n_i} \times \frac{N!}{n_1!n_2! \dots} \) if \( \sum n_i = N \) and \( p = 0 \) otherwise. More...
 
void sample_in_random_cell_BF_algo (ParticleList &plist, const double time, size_t type_index)
 The total number of particles of species type_index is defined by mult_int_ array that is returned by. More...
 
void thermalize_BF_algo (QuantumNumbers &conserved_initial, double time, int ntest)
 Samples particles according to the BF algorithm by making use of the. More...
 
template<typename F >
void compute_N_in_cells_mode_algo (F &&condition)
 Computes average number of particles in each cell for the mode algorithm. More...
 
template<typename F >
ParticleData sample_in_random_cell_mode_algo (const double time, F &&condition, SpinInteractionType spin_interaction_type=SpinInteractionType::Off)
 Samples one particle and the species, cell, momentum and coordinate are chosen from the corresponding distributions. More...
 
void thermalize_mode_algo (QuantumNumbers &conserved_initial, double time, SpinInteractionType spin_interaction_type=SpinInteractionType::Off)
 Samples particles to the according to the mode algorithm. More...
 
void thermalize (const Particles &particles, double time, int ntest, SpinInteractionType spin_interaction_type=SpinInteractionType::Off)
 Main thermalize function, that chooses the algorithm to follow (BF or mode sampling). More...
 
void print_statistics (const Clock &clock) const
 Generates standard output with information about the thermodynamic properties of the lattice, the thermalized region and the volume to be thermalized above the critical energy density. More...
 
RectangularLattice< ThermLatticeNode > & lattice () const
 Getter function for the lattice. More...
 
double e_crit () const
 Get the critical energy density. More...
 
ParticleList particles_to_remove () const
 List of particles to be removed from the simulation. More...
 
ParticleList particles_to_insert () const
 List of newly created particles to be inserted in the simulation. More...
 

Private Member Functions

ParticleTypePtrList list_eos_particles () const
 Extracts the particles in the hadron gas equation of state from the complete list of particle types in SMASH. More...
 
HadronClass get_class (size_t typelist_index) const
 Defines the class of hadrons by quantum numbers. More...
 
double mult_class (const HadronClass cl) const
 

Private Attributes

std::vector< double > N_in_cells_
 Number of particles to be sampled in one cell. More...
 
std::vector< size_t > cells_to_sample_
 Cells above critical energy density. More...
 
HadronGasEos eos_ = HadronGasEos(true, false)
 Hadron gas equation of state. More...
 
std::unique_ptr< RectangularLattice< ThermLatticeNode > > lat_
 The lattice on which the thermodynamic quantities are calculated. More...
 
ParticleList to_remove_
 Particles to be removed after this thermalization step. More...
 
ParticleList sampled_list_
 Newly generated particles by thermalizer. More...
 
const ParticleTypePtrList eos_typelist_
 List of particle types from which equation of state is computed. More...
 
const size_t N_sorts_
 Number of different species to be sampled. More...
 
std::vector< double > mult_sort_
 Real number multiplicity for each particle type. More...
 
std::vector< int > mult_int_
 Integer multiplicity for each particle type. More...
 
std::array< double, 7 > mult_classes_
 The different hadron species according to the enum defined in. More...
 
double N_total_in_cells_
 Total number of particles over all cells in thermalization region. More...
 
double lat_cell_volume_
 Volume of a single lattice cell, necessary to convert thermal densities to actual particle numbers. More...
 
const double e_crit_
 Critical energy density above which cells are thermalized. More...
 
const double t_start_
 Starting time of the simulation. More...
 
const double period_
 Defines periodicity of the lattice in fm. More...
 
const ThermalizationAlgorithm algorithm_
 Algorithm to choose for sampling of particles obeying conservation laws. More...
 
const bool BF_enforce_microcanonical_
 Enforce energy conservation as part of BF sampling algorithm or not. More...
 

Constructor & Destructor Documentation

◆ GrandCanThermalizer() [1/2]

smash::GrandCanThermalizer::GrandCanThermalizer ( const std::array< double, 3 >  lat_sizes,
const std::array< int, 3 >  n_cells,
const std::array< double, 3 >  origin,
bool  periodicity,
double  e_critical,
double  t_start,
double  delta_t,
ThermalizationAlgorithm  algo,
bool  BF_microcanonical 
)

Default constructor for the GranCanThermalizer to allocate the lattice.

Parameters
[in]lat_sizesSize of lattice in x,y and z-direction in fm.
[in]n_cellsNumber of cells in x, y and z-direction.
[in]originCoordinates of the left, down, near corner of the lattice in fm.
[in]periodicityBoolean to decide, if the lattice is periodically extended to infinity or not
[in]e_criticalCritical energy density above which the cells are thermalized
[in]t_startStarting time of the simulation
[in]delta_tTimestep of the simulation
[in]algoChoice of algorithm for the canonical sampling
[in]BF_microcanonicalEnforce energy conservation in BF sampling algorithms or nor

Definition at line 105 of file grandcan_thermalizer.cc.

113  N_sorts_(eos_typelist_.size()),
114  e_crit_(e_critical),
115  t_start_(t_start),
116  period_(delta_t),
117  algorithm_(algo),
118  BF_enforce_microcanonical_(BF_microcanonical) {
120  lat_ = std::make_unique<RectangularLattice<ThermLatticeNode>>(
121  lat_sizes, n_cells, origin, periodicity, upd);
122  const std::array<double, 3> abc = lat_->cell_sizes();
123  lat_cell_volume_ = abc[0] * abc[1] * abc[2];
124  cells_to_sample_.resize(50000);
125  mult_sort_.resize(N_sorts_);
126  mult_int_.resize(N_sorts_);
127 }
std::vector< double > mult_sort_
Real number multiplicity for each particle type.
std::vector< int > mult_int_
Integer multiplicity for each particle type.
const bool BF_enforce_microcanonical_
Enforce energy conservation as part of BF sampling algorithm or not.
std::unique_ptr< RectangularLattice< ThermLatticeNode > > lat_
The lattice on which the thermodynamic quantities are calculated.
const double t_start_
Starting time of the simulation.
const double period_
Defines periodicity of the lattice in fm.
ParticleTypePtrList list_eos_particles() const
Extracts the particles in the hadron gas equation of state from the complete list of particle types i...
const double e_crit_
Critical energy density above which cells are thermalized.
std::vector< size_t > cells_to_sample_
Cells above critical energy density.
const ThermalizationAlgorithm algorithm_
Algorithm to choose for sampling of particles obeying conservation laws.
const ParticleTypePtrList eos_typelist_
List of particle types from which equation of state is computed.
double lat_cell_volume_
Volume of a single lattice cell, necessary to convert thermal densities to actual particle numbers.
const size_t N_sorts_
Number of different species to be sampled.
LatticeUpdate
Enumerator option for lattice updates.
Definition: lattice.h:38

◆ GrandCanThermalizer() [2/2]

smash::GrandCanThermalizer::GrandCanThermalizer ( Configuration conf,
const std::array< double, 3 >  lat_sizes,
const std::array< double, 3 >  origin,
bool  periodicity 
)
inline
See also
GrandCanThermalizer Exactly the same but taking values from config

Definition at line 213 of file grandcan_thermalizer.h.

217  lat_sizes, conf.take(InputKeys::forcedThermalization_cellNumber),
218  origin, periodicity,
GrandCanThermalizer(const std::array< double, 3 > lat_sizes, const std::array< int, 3 > n_cells, const std::array< double, 3 > origin, bool periodicity, double e_critical, double t_start, double delta_t, ThermalizationAlgorithm algo, bool BF_microcanonical)
Default constructor for the GranCanThermalizer to allocate the lattice.
static const Key< double > forcedThermalization_criticalEDensity
See user guide description for more information.
Definition: input_keys.h:5937
static const Key< bool > forcedThermalization_microcanonical
See user guide description for more information.
Definition: input_keys.h:6031
static const Key< double > forcedThermalization_startTime
See user guide description for more information.
Definition: input_keys.h:5950
static const Key< ThermalizationAlgorithm > forcedThermalization_algorithm
See user guide description for more information.
Definition: input_keys.h:5986
static const Key< double > forcedThermalization_timestep
See user guide description for more information.
Definition: input_keys.h:5962
static const Key< std::array< int, 3 > > forcedThermalization_cellNumber
See user guide description for more information.
Definition: input_keys.h:5924

Member Function Documentation

◆ is_time_to_thermalize()

bool smash::GrandCanThermalizer::is_time_to_thermalize ( std::unique_ptr< Clock > &  clock) const
inline

Check that the clock is close to n * period of thermalization, since the thermalization only happens at these times.

Parameters
[in]clockCurrent system time

Definition at line 229 of file grandcan_thermalizer.h.

229  {
230  const double t = clock->current_time();
231  const int n = static_cast<int>(std::floor((t - t_start_) / period_));
232  return (t > t_start_ &&
233  t < t_start_ + n * period_ + clock->timestep_duration());
234  }
constexpr int n
Neutron.

◆ update_thermalizer_lattice()

void smash::GrandCanThermalizer::update_thermalizer_lattice ( const std::vector< Particles > &  ensembles,
const DensityParameters par,
bool  ignore_cells_under_threshold = true 
)

Compute all the thermodynamical quantities on the lattice from particles.

Parameters
[in]ensemblesCurrent list of particles in all ensembles
See also
Particles
ExperimentParameters
Parameters
[in]parParameters necessary for density determination
See also
DensityParameters
Parameters
[in]ignore_cells_under_thresholdBoolean that is true by default

Definition at line 129 of file grandcan_thermalizer.cc.

131  {
132  const DensityType dens_type = DensityType::Hadron;
134  update_lattice_accumulating_ensembles(lat_.get(), update, dens_type, dens_par,
135  ensembles, false);
136  for (auto &node : *lat_) {
137  /* If energy density is definitely below e_crit -
138  no need to find T, mu, etc. So if e = T00 - T0i*vi <=
139  T00 + sum abs(T0i) < e_crit, no efforts are necessary. */
140  if (!ignore_cells_under_treshold ||
141  node.Tmu0().x0() + std::abs(node.Tmu0().x1()) +
142  std::abs(node.Tmu0().x2()) + std::abs(node.Tmu0().x3()) >=
143  e_crit_) {
144  node.compute_rest_frame_quantities(eos_);
145  } else {
146  node = ThermLatticeNode();
147  }
148  }
149 }
HadronGasEos eos_
Hadron gas equation of state.
DensityType
Allows to choose which kind of density to calculate.
void update_lattice_accumulating_ensembles(RectangularLattice< T > *lat, const LatticeUpdate update, const DensityType dens_type, const DensityParameters &par, const std::vector< Particles > &ensembles, const bool compute_gradient)
Updates the contents on the lattice when ensembles are used.
Definition: density.h:644

◆ uniform_in_cell()

ThreeVector smash::GrandCanThermalizer::uniform_in_cell ( ) const
Returns
3 vector uniformly sampled from the rectangular cell.

Definition at line 151 of file grandcan_thermalizer.cc.

151  {
152  return ThreeVector(random::uniform(-0.5 * lat_->cell_sizes()[0],
153  +0.5 * lat_->cell_sizes()[0]),
154  random::uniform(-0.5 * lat_->cell_sizes()[1],
155  +0.5 * lat_->cell_sizes()[1]),
156  random::uniform(-0.5 * lat_->cell_sizes()[2],
157  +0.5 * lat_->cell_sizes()[2]));
158 }
T uniform(T min, T max)
Definition: random.h:88

◆ renormalize_momenta()

void smash::GrandCanThermalizer::renormalize_momenta ( ParticleList &  plist,
const FourVector  required_total_momentum 
)

Changes energy and momenta of the particles in plist to match the required_total_momentum.

The procedure is described in Oliinychenko:2016vkg [46].

Parameters
[in]plistList of particles
See also
ParticleList
Parameters
[in]required_total_momentumThe necessary total momentum of the cell

Definition at line 160 of file grandcan_thermalizer.cc.

161  {
162  // Centralize momenta
163  QuantumNumbers conserved = QuantumNumbers(plist);
164  logg[LGrandcanThermalizer].info("Required 4-momentum: ",
165  required_total_momentum);
166  logg[LGrandcanThermalizer].info("Sampled 4-momentum: ", conserved.momentum());
167  const ThreeVector mom_to_add =
168  (required_total_momentum.threevec() - conserved.momentum().threevec()) /
169  plist.size();
170  logg[LGrandcanThermalizer].info("Adjusting momenta by ", mom_to_add);
171  for (auto &particle : plist) {
172  particle.set_4momentum(particle.type().mass(),
173  particle.momentum().threevec() + mom_to_add);
174  }
175 
176  // Boost every particle to the common center of mass frame
177  conserved = QuantumNumbers(plist);
178  const ThreeVector beta_CM_generated = conserved.momentum().velocity();
179  const ThreeVector beta_CM_required = required_total_momentum.velocity();
180 
181  double E = 0.0;
182  double E_expected = required_total_momentum.abs();
183  for (auto &particle : plist) {
184  particle.boost_momentum(beta_CM_generated);
185  E += particle.momentum().x0();
186  }
187  // Renorm. momenta by factor (1+a) to get the right energy, binary search
188  const double tolerance = really_small;
189  double a, a_min, a_max, er;
190  const int max_iter = 100;
191  int iter = 0;
192  if (E_expected >= E) {
193  a_min = 0.0;
194  a_max = 10.0;
195  } else {
196  a_min = -1.0;
197  a_max = 0.0;
198  }
199  do {
200  a = 0.5 * (a_min + a_max);
201  E = 0.0;
202  for (const auto &particle : plist) {
203  const double p2 = particle.momentum().threevec().sqr();
204  const double E2 = particle.momentum().x0() * particle.momentum().x0();
205  E += std::sqrt(E2 + a * (a + 2.0) * p2);
206  }
207  er = E - E_expected;
208  if (er >= 0.0) {
209  a_max = a;
210  } else {
211  a_min = a;
212  }
213  logg[LGrandcanThermalizer].debug("Iteration ", iter, ": a = ", a,
214  ", Δ = ", er);
215  iter++;
216  } while (std::abs(er) > tolerance && iter < max_iter);
217 
218  logg[LGrandcanThermalizer].info("Renormalizing momenta by factor 1+a, a = ",
219  a);
220  for (auto &particle : plist) {
221  particle.set_4momentum(particle.type().mass(),
222  (1 + a) * particle.momentum().threevec());
223  particle.boost_momentum(-beta_CM_required);
224  }
225 }
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:40
static constexpr int LGrandcanThermalizer
constexpr double really_small
Numerical error tolerance.
Definition: constants.h:41

◆ sample_multinomial()

void smash::GrandCanThermalizer::sample_multinomial ( HadronClass  particle_class,
int  N 
)

The sample_multinomial function samples integer numbers n_i distributed according to the multinomial distribution with sum N: \( p(n_1, n_2, \dots) = \prod a_i^{n_i} \times \frac{N!}{n_1!n_2! \dots} \) if \( \sum n_i = N \) and \( p = 0 \) otherwise.

Parameters
[in]particle_classA certain group of hadron species
See also
HadronClass
Parameters
[out]NNumber of particles to be sampled
Todo:
(oliiny) what to do with this output?

Definition at line 227 of file grandcan_thermalizer.cc.

228  {
229  /* The array mult_sort_ contains real numbers \f$ a_i \f$. The numbers \f$
230  * n_i \f$ are saved in the mult_int_ array. Only particles of class
231  * particle_class are sampled, where particle_class is defined by the
232  * get_class function. */
233  double sum = mult_class(particle_class);
234  for (size_t i_type = 0; (i_type < N_sorts_) && (N_to_sample > 0); i_type++) {
235  if (get_class(i_type) != particle_class) {
236  continue;
237  }
238  const double p = mult_sort_[i_type] / sum;
239  mult_int_[i_type] = random::binomial(N_to_sample, p);
241  /*std::cout << eos_typelist_[i_type]->name() <<
242  ": mult_sort = " << mult_sort_[i_type] <<
243  ", sum = " << sum <<
244  ", p = " << p <<
245  ", N to sample = " << N_to_sample <<
246  ", mult_int_ = " << mult_int_[i_type] << std::endl;*/
247  sum -= mult_sort_[i_type];
248  N_to_sample -= mult_int_[i_type];
249  }
250 }
double mult_class(const HadronClass cl) const
HadronClass get_class(size_t typelist_index) const
Defines the class of hadrons by quantum numbers.
constexpr int p
Proton.
int binomial(const int N, const T &p)
Returns a binomially distributed random number.
Definition: random.h:238

◆ sample_in_random_cell_BF_algo()

void smash::GrandCanThermalizer::sample_in_random_cell_BF_algo ( ParticleList &  plist,
const double  time,
size_t  type_index 
)

The total number of particles of species type_index is defined by mult_int_ array that is returned by.

See also
sample_multinomial. This function samples mult_int_[type_index] particles. It chooses randomly the cell to sample and picks up momentum and coordinate from the corresponding distributions.
Parameters
[out]plist
See also
ParticleList of newly produced particles
Parameters
[in]timeCurrent time in the simulation to become zero component of sampled particles
[in]type_indexSpecies that should be sampled

Definition at line 252 of file grandcan_thermalizer.cc.

254  {
255  N_in_cells_.clear();
256  N_total_in_cells_ = 0.0;
257  for (auto cell_index : cells_to_sample_) {
258  const ThermLatticeNode cell = (*lat_)[cell_index];
259  const double gamma = 1.0 / std::sqrt(1.0 - cell.v().sqr());
260  const double N_this_cell =
261  lat_cell_volume_ * gamma *
262  HadronGasEos::partial_density(*eos_typelist_[type_index], cell.T(),
263  cell.mub(), cell.mus(), cell.muq());
264  N_in_cells_.push_back(N_this_cell);
265  N_total_in_cells_ += N_this_cell;
266  }
267 
268  for (int i = 0; i < mult_int_[type_index]; i++) {
269  // Choose random cell, probability = N_in_cell/N_total
270  double r = random::uniform(0.0, N_total_in_cells_);
271  double partial_sum = 0.0;
272  int index_only_thermalized = -1;
273  while (partial_sum < r) {
274  index_only_thermalized++;
275  partial_sum += N_in_cells_[index_only_thermalized];
276  }
277  const int cell_index = cells_to_sample_[index_only_thermalized];
278  const ThermLatticeNode cell = (*lat_)[cell_index];
279  const ThreeVector cell_center = lat_->cell_center(cell_index);
280 
281  ParticleData particle(*eos_typelist_[type_index]);
282  // Note: it's pole mass for resonances!
283  const double m = eos_typelist_[type_index]->mass();
284  // Position
285  particle.set_4position(FourVector(time, cell_center + uniform_in_cell()));
286  // Momentum
287  double momentum_radial = sample_momenta_from_thermal(cell.T(), m);
288  Angles phitheta;
289  phitheta.distribute_isotropically();
290  particle.set_4momentum(m, phitheta.threevec() * momentum_radial);
291  particle.boost_momentum(-cell.v());
292  particle.set_formation_time(time);
293 
294  plist.push_back(particle);
295  }
296 }
ThreeVector uniform_in_cell() const
std::vector< double > N_in_cells_
Number of particles to be sampled in one cell.
double N_total_in_cells_
Total number of particles over all cells in thermalization region.
static double partial_density(const ParticleType &ptype, double T, double mub, double mus, double muq, bool account_for_resonance_widths=false)
Compute partial density of one hadron sort.
Definition: hadgas_eos.cc:270
double sample_momenta_from_thermal(const double temperature, const double mass)
Samples a momentum from the Maxwell-Boltzmann (thermal) distribution in a faster way,...

◆ thermalize_BF_algo()

void smash::GrandCanThermalizer::thermalize_BF_algo ( QuantumNumbers conserved_initial,
double  time,
int  ntest 
)

Samples particles according to the BF algorithm by making use of the.

See also
sample_in_random_cell_BF_algo. Quantum numbers of the sampled particles are required to be equal to the original particles in this region.
Parameters
[in]conserved_initialThe quantum numbers of the total ensemble of of particles in the region to be thermalized
[in]timeCurrent time of the simulation
[in]ntestNumber of testparticles
Returns
Particle list with newly sampled particles according to Becattini-Feroni algorithm

Definition at line 298 of file grandcan_thermalizer.cc.

299  {
300  std::fill(mult_sort_.begin(), mult_sort_.end(), 0.0);
301  for (auto cell_index : cells_to_sample_) {
302  const ThermLatticeNode cell = (*lat_)[cell_index];
303  const double gamma = 1.0 / std::sqrt(1.0 - cell.v().sqr());
304  for (size_t i = 0; i < N_sorts_; i++) {
305  // N_i = n u^mu dsigma_mu = (isochronous hypersurface) n * V * gamma
306  mult_sort_[i] +=
307  lat_cell_volume_ * gamma * ntest *
308  HadronGasEos::partial_density(*eos_typelist_[i], cell.T(), cell.mub(),
309  cell.mus(), cell.muq());
310  }
311  }
312 
313  std::fill(mult_classes_.begin(), mult_classes_.end(), 0.0);
314  for (size_t i = 0; i < N_sorts_; i++) {
315  mult_classes_[static_cast<size_t>(get_class(i))] += mult_sort_[i];
316  }
317 
318  random::BesselSampler bessel_sampler_B(mult_class(HadronClass::Baryon),
320  conserved_initial.baryon_number());
321 
322  while (true) {
323  sampled_list_.clear();
324  std::fill(mult_int_.begin(), mult_int_.end(), 0);
325  const auto Nbar_antibar = bessel_sampler_B.sample();
326 
327  sample_multinomial(HadronClass::Baryon, Nbar_antibar.first);
328  sample_multinomial(HadronClass::Antibaryon, Nbar_antibar.second);
329 
330  // Count strangeness of the sampled particles
331  int S_sampled = 0;
332  for (size_t i = 0; i < N_sorts_; i++) {
333  S_sampled += eos_typelist_[i]->strangeness() * mult_int_[i];
334  }
335 
336  std::pair<int, int> NS_antiS;
338  random::BesselSampler bessel_sampler_S(
341  conserved_initial.strangeness() - S_sampled);
342  NS_antiS = bessel_sampler_S.sample();
344  NS_antiS = std::make_pair(
347  if (NS_antiS.first - NS_antiS.second !=
348  conserved_initial.strangeness() - S_sampled) {
349  continue;
350  }
351  }
352 
355  // Count charge of the sampled particles
356  int ch_sampled = 0;
357  for (size_t i = 0; i < N_sorts_; i++) {
358  ch_sampled += eos_typelist_[i]->charge() * mult_int_[i];
359  }
360 
361  std::pair<int, int> NC_antiC;
363  random::BesselSampler bessel_sampler_C(
366  conserved_initial.charge() - ch_sampled);
367  NC_antiC = bessel_sampler_C.sample();
369  NC_antiC = std::make_pair(
372  if (NC_antiC.first - NC_antiC.second !=
373  conserved_initial.charge() - ch_sampled) {
374  continue;
375  }
376  }
377 
383 
384  for (size_t itype = 0; itype < N_sorts_; itype++) {
386  }
388  double e_tot;
389  const double e_init = conserved_initial.momentum().x0();
390  e_tot = 0.0;
391  for (auto &particle : sampled_list_) {
392  e_tot += particle.momentum().x0();
393  }
394  if (std::abs(e_tot - e_init) > 0.01 * e_init) {
395  logg[LGrandcanThermalizer].info("Rejecting: energy ", e_tot,
396  " too far from ", e_init);
397  continue;
398  }
399  }
400  break;
401  }
402 }
ParticleList sampled_list_
Newly generated particles by thermalizer.
std::array< double, 7 > mult_classes_
The different hadron species according to the enum defined in.
void sample_in_random_cell_BF_algo(ParticleList &plist, const double time, size_t type_index)
The total number of particles of species type_index is defined by mult_int_ array that is returned by...
void sample_multinomial(HadronClass particle_class, int N)
The sample_multinomial function samples integer numbers n_i distributed according to the multinomial ...
int poisson(const T &lam)
Returns a Poisson distributed random number.
Definition: random.h:226
@ Antibaryon
All anti-baryons.
@ ZeroQZeroSMeson
Neutral non-strange mesons.
@ NegativeSMeson
Mesons with strangeness S < 0.
@ NegativeQZeroSMeson
Non-strange mesons (S = 0) with electric cherge Q < 0.
@ PositiveSMeson
Mesons with strangeness S > 0.
@ Baryon
All baryons.
@ PositiveQZeroSMeson
Non-strange mesons (S = 0) with electric cherge Q > 0.

◆ compute_N_in_cells_mode_algo()

template<typename F >
void smash::GrandCanThermalizer::compute_N_in_cells_mode_algo ( F &&  condition)
inline

Computes average number of particles in each cell for the mode algorithm.

Parameters
[in]conditionSpecifies the current mode (1 to 7)

Definition at line 305 of file grandcan_thermalizer.h.

305  {
306  N_in_cells_.clear();
307  N_total_in_cells_ = 0.0;
308  for (auto cell_index : cells_to_sample_) {
309  const ThermLatticeNode cell = (*lat_)[cell_index];
310  const double gamma = 1.0 / std::sqrt(1.0 - cell.v().sqr());
311  double N_tot = 0.0;
312  for (ParticleTypePtr i : eos_typelist_) {
313  if (condition(i->strangeness(), i->baryon_number(), i->charge())) {
314  // N_i = n u^mu dsigma_mu = (isochronous hypersurface) n * V * gamma
315  N_tot += lat_cell_volume_ * gamma *
316  HadronGasEos::partial_density(*i, cell.T(), cell.mub(),
317  cell.mus(), 0.0);
318  }
319  }
320  N_in_cells_.push_back(N_tot);
321  N_total_in_cells_ += N_tot;
322  }
323  }

◆ sample_in_random_cell_mode_algo()

template<typename F >
ParticleData smash::GrandCanThermalizer::sample_in_random_cell_mode_algo ( const double  time,
F &&  condition,
SpinInteractionType  spin_interaction_type = SpinInteractionType::Off 
)
inline

Samples one particle and the species, cell, momentum and coordinate are chosen from the corresponding distributions.

The condition function limits the choice of possible species.

Condition is a function of the signature of quantum number S, B and Q. bool condition(int strangeness, int baryon_number, int charge);

Parameters
[in]timeCurrent time in simulation
[in]conditionSpecifies the actual mode (1 to 7)
[in]spin_interaction_typeType of spin interactions to be considered

Definition at line 337 of file grandcan_thermalizer.h.

339  {
340  // Choose random cell, probability = N_in_cell/N_total
341  double r = random::uniform(0.0, N_total_in_cells_);
342  double partial_sum = 0.0;
343  int index_only_thermalized = -1;
344  while (partial_sum < r) {
345  index_only_thermalized++;
346  partial_sum += N_in_cells_[index_only_thermalized];
347  }
348  const int cell_index = cells_to_sample_[index_only_thermalized];
349  const ThermLatticeNode cell = (*lat_)[cell_index];
350  const ThreeVector cell_center = lat_->cell_center(cell_index);
351  const double gamma = 1.0 / std::sqrt(1.0 - cell.v().sqr());
352  const double N_in_cell = N_in_cells_[index_only_thermalized];
353  // Which sort to sample - probability N_i/N_tot
354  r = random::uniform(0.0, N_in_cell);
355  double N_sum = 0.0;
356  ParticleTypePtr type_to_sample;
357  for (ParticleTypePtr i : eos_typelist_) {
358  if (!condition(i->strangeness(), i->baryon_number(), i->charge())) {
359  continue;
360  }
361  N_sum += lat_cell_volume_ * gamma *
362  HadronGasEos::partial_density(*i, cell.T(), cell.mub(),
363  cell.mus(), 0.0);
364  if (N_sum >= r) {
365  type_to_sample = i;
366  break;
367  }
368  }
369  ParticleData particle(*type_to_sample);
370  // Note: it's pole mass for resonances!
371  const double m = type_to_sample->mass();
372  // Position
373  particle.set_4position(FourVector(time, cell_center + uniform_in_cell()));
374  // Momentum
375  double momentum_radial = sample_momenta_from_thermal(cell.T(), m);
376  Angles phitheta;
377  phitheta.distribute_isotropically();
378  particle.set_4momentum(m, phitheta.threevec() * momentum_radial);
379  particle.boost_momentum(-cell.v());
380  particle.set_formation_time(time);
381  if (spin_interaction_type != SpinInteractionType::Off) {
382  particle.set_unpolarized_spin_vector();
383  }
384  return particle;
385  }
@ Off
No spin interactions.

◆ thermalize_mode_algo()

void smash::GrandCanThermalizer::thermalize_mode_algo ( QuantumNumbers conserved_initial,
double  time,
SpinInteractionType  spin_interaction_type = SpinInteractionType::Off 
)

Samples particles to the according to the mode algorithm.

Quantum numbers of the sampled particles are required to be as in conserved_initial.

Parameters
[in]conserved_initialQuantum numbers of the original particles in the region to be thermalized
[in]timeCurrent time of the simulation
[in]spin_interaction_typeType of spin interactions to be considered

Definition at line 404 of file grandcan_thermalizer.cc.

406  {
407  double energy = 0.0;
408  int S_plus = 0, S_minus = 0, B_plus = 0, B_minus = 0, E_plus = 0, E_minus = 0;
409  // Mode 1: sample until energy is conserved, take only strangeness < 0
410  auto condition1 = [](int, int, int) { return true; };
411  compute_N_in_cells_mode_algo(condition1);
412  while (conserved_initial.momentum().x0() > energy ||
413  S_plus < conserved_initial.strangeness()) {
414  ParticleData p = sample_in_random_cell_mode_algo(time, condition1,
415  spin_interaction_type);
416  energy += p.momentum().x0();
417  if (p.pdgcode().strangeness() > 0) {
418  sampled_list_.push_back(p);
419  S_plus += p.pdgcode().strangeness();
420  }
421  }
422 
423  // Mode 2: sample until strangeness is conserved
424  auto condition2 = [](int S, int, int) { return (S < 0); };
425  compute_N_in_cells_mode_algo(condition2);
426  while (S_plus + S_minus > conserved_initial.strangeness()) {
427  ParticleData p = sample_in_random_cell_mode_algo(time, condition2,
428  spin_interaction_type);
429  const int s_part = p.pdgcode().strangeness();
430  // Do not allow particles with S = -2 or -3 spoil the total sum
431  if (S_plus + S_minus + s_part >= conserved_initial.strangeness()) {
432  sampled_list_.push_back(p);
433  S_minus += s_part;
434  }
435  }
436 
437  // Mode 3: sample non-strange baryons
438  auto condition3 = [](int S, int, int) { return (S == 0); };
439  QuantumNumbers conserved_remaining =
440  conserved_initial - QuantumNumbers(sampled_list_);
441  energy = 0.0;
442  compute_N_in_cells_mode_algo(condition3);
443  while (conserved_remaining.momentum().x0() > energy ||
444  B_plus < conserved_remaining.baryon_number()) {
445  ParticleData p = sample_in_random_cell_mode_algo(time, condition3,
446  spin_interaction_type);
447  energy += p.momentum().x0();
448  if (p.pdgcode().baryon_number() > 0) {
449  sampled_list_.push_back(p);
450  B_plus += p.pdgcode().baryon_number();
451  }
452  }
453 
454  // Mode 4: sample non-strange anti-baryons
455  auto condition4 = [](int S, int B, int) { return (S == 0) && (B < 0); };
456  compute_N_in_cells_mode_algo(condition4);
457  while (B_plus + B_minus > conserved_remaining.baryon_number()) {
458  ParticleData p = sample_in_random_cell_mode_algo(time, condition4,
459  spin_interaction_type);
460  const int bar = p.pdgcode().baryon_number();
461  if (B_plus + B_minus + bar >= conserved_remaining.baryon_number()) {
462  sampled_list_.push_back(p);
463  B_minus += bar;
464  }
465  }
466 
467  // Mode 5: sample non_strange mesons, but take only with charge > 0
468  auto condition5 = [](int S, int B, int) { return (S == 0) && (B == 0); };
469  conserved_remaining = conserved_initial - QuantumNumbers(sampled_list_);
470  energy = 0.0;
471  compute_N_in_cells_mode_algo(condition5);
472  while (conserved_remaining.momentum().x0() > energy ||
473  E_plus < conserved_remaining.charge()) {
474  ParticleData p = sample_in_random_cell_mode_algo(time, condition5,
475  spin_interaction_type);
476  energy += p.momentum().x0();
477  if (p.pdgcode().charge() > 0) {
478  sampled_list_.push_back(p);
479  E_plus += p.pdgcode().charge();
480  }
481  }
482 
483  // Mode 6: sample non_strange mesons to conserve charge
484  auto condition6 = [](int S, int B, int C) {
485  return (S == 0) && (B == 0) && (C < 0);
486  };
487  compute_N_in_cells_mode_algo(condition6);
488  while (E_plus + E_minus > conserved_remaining.charge()) {
489  ParticleData p = sample_in_random_cell_mode_algo(time, condition6,
490  spin_interaction_type);
491  const int charge = p.pdgcode().charge();
492  if (E_plus + E_minus + charge >= conserved_remaining.charge()) {
493  sampled_list_.push_back(p);
494  E_minus += charge;
495  }
496  }
497 
498  // Mode 7: sample neutral non-strange mesons to conserve energy
499  auto condition7 = [](int S, int B, int C) {
500  return (S == 0) && (B == 0) && (C == 0);
501  };
502  conserved_remaining = conserved_initial - QuantumNumbers(sampled_list_);
503  energy = 0.0;
504  compute_N_in_cells_mode_algo(condition7);
505  while (conserved_remaining.momentum().x0() > energy) {
506  ParticleData p = sample_in_random_cell_mode_algo(time, condition7,
507  spin_interaction_type);
508  sampled_list_.push_back(p);
509  energy += p.momentum().x0();
510  }
511 }
void compute_N_in_cells_mode_algo(F &&condition)
Computes average number of particles in each cell for the mode algorithm.
ParticleData sample_in_random_cell_mode_algo(const double time, F &&condition, SpinInteractionType spin_interaction_type=SpinInteractionType::Off)
Samples one particle and the species, cell, momentum and coordinate are chosen from the corresponding...
#define S(x, n)
Definition: sha256.cc:54

◆ thermalize()

void smash::GrandCanThermalizer::thermalize ( const Particles particles,
double  time,
int  ntest,
SpinInteractionType  spin_interaction_type = SpinInteractionType::Off 
)

Main thermalize function, that chooses the algorithm to follow (BF or mode sampling).

Parameters
[out]particlesList of sampled particles in thermalized region
[in]timeCurrent time of the simulation
[in]ntestnumber of testparticles
[in]spin_interaction_typeType of spin interactions to be considered

Definition at line 513 of file grandcan_thermalizer.cc.

515  {
516  logg[LGrandcanThermalizer].info("Starting forced thermalization, time ", time,
517  " fm");
518  to_remove_.clear();
519  sampled_list_.clear();
520  /* Remove particles from the cells with e > e_crit_,
521  * sum up their conserved quantities */
522  QuantumNumbers conserved_initial = QuantumNumbers();
523  ThermLatticeNode node;
524  for (auto &particle : particles) {
525  const bool is_on_lattice =
526  lat_->value_at(particle.position().threevec(), node);
527  if (is_on_lattice && node.e() > e_crit_) {
528  to_remove_.push_back(particle);
529  }
530  }
531  /* Do not thermalize too small number of particles: for the number
532  * of particles < 30 the algorithm tends to hang or crash too often. */
533  if (to_remove_.size() > 30) {
534  for (auto &particle : to_remove_) {
535  conserved_initial.add_values(particle);
536  }
537  } else {
538  to_remove_.clear();
539  conserved_initial = QuantumNumbers();
540  }
541  logg[LGrandcanThermalizer].info("Removed ", to_remove_.size(), " particles.");
542 
543  // Exit if there is nothing to thermalize
544  if (conserved_initial == QuantumNumbers()) {
545  return;
546  }
547  // Save the indices of cells inside the volume with e > e_crit_
548  cells_to_sample_.clear();
549  const size_t lattice_total_cells = lat_->size();
550  for (size_t i = 0; i < lattice_total_cells; i++) {
551  if ((*lat_)[i].e() > e_crit_) {
552  cells_to_sample_.push_back(i);
553  }
554  }
556  "Number of cells in the thermalization region = ",
557  cells_to_sample_.size(),
558  ", its total volume [fm^3]: ", cells_to_sample_.size() * lat_cell_volume_,
559  ", in % of lattice: ",
560  100.0 * cells_to_sample_.size() / lattice_total_cells);
561 
562  switch (algorithm_) {
565  thermalize_BF_algo(conserved_initial, time, ntest);
566  break;
568  thermalize_mode_algo(conserved_initial, time, spin_interaction_type);
569  break;
570  default:
571  throw std::invalid_argument(
572  "This thermalization algorithm is"
573  " not yet implemented");
574  }
575  logg[LGrandcanThermalizer].info("Sampled ", sampled_list_.size(),
576  " particles.");
577 
578  // Adjust momenta
579  renormalize_momenta(sampled_list_, conserved_initial.momentum());
580 }
void thermalize_BF_algo(QuantumNumbers &conserved_initial, double time, int ntest)
Samples particles according to the BF algorithm by making use of the.
void thermalize_mode_algo(QuantumNumbers &conserved_initial, double time, SpinInteractionType spin_interaction_type=SpinInteractionType::Off)
Samples particles to the according to the mode algorithm.
ParticleList to_remove_
Particles to be removed after this thermalization step.
void renormalize_momenta(ParticleList &plist, const FourVector required_total_momentum)
Changes energy and momenta of the particles in plist to match the required_total_momentum.

◆ print_statistics()

void smash::GrandCanThermalizer::print_statistics ( const Clock clock) const

Generates standard output with information about the thermodynamic properties of the lattice, the thermalized region and the volume to be thermalized above the critical energy density.

Parameters
[in]clockCurrent time of the simulation

Definition at line 582 of file grandcan_thermalizer.cc.

582  {
583  struct to_average {
584  double T;
585  double mub;
586  double mus;
587  double muq;
588  double nb;
589  double ns;
590  double nq;
591  };
592  struct to_average on_lattice = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
593  struct to_average in_therm_reg = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
594  double e_sum_on_lattice = 0.0, e_sum_in_therm_reg = 0.0;
595  int node_counter = 0;
596  for (const auto &node : *lat_) {
597  const double e = node.e();
598  on_lattice.T += node.T() * e;
599  on_lattice.mub += node.mub() * e;
600  on_lattice.mus += node.mus() * e;
601  on_lattice.muq += node.muq() * e;
602  on_lattice.nb += node.nb() * e;
603  on_lattice.ns += node.ns() * e;
604  on_lattice.nq += node.nq() * e;
605  e_sum_on_lattice += e;
606  if (e >= e_crit_) {
607  in_therm_reg.T += node.T() * e;
608  in_therm_reg.mub += node.mub() * e;
609  in_therm_reg.mus += node.mus() * e;
610  in_therm_reg.muq += node.muq() * e;
611  in_therm_reg.nb += node.nb() * e;
612  in_therm_reg.ns += node.ns() * e;
613  in_therm_reg.nq += node.nq() * e;
614  e_sum_in_therm_reg += e;
615  node_counter++;
616  }
617  }
618  if (e_sum_on_lattice > really_small) {
619  on_lattice.T /= e_sum_on_lattice;
620  on_lattice.mub /= e_sum_on_lattice;
621  on_lattice.mus /= e_sum_on_lattice;
622  on_lattice.muq /= e_sum_on_lattice;
623  on_lattice.nb /= e_sum_on_lattice;
624  on_lattice.ns /= e_sum_on_lattice;
625  on_lattice.nq /= e_sum_on_lattice;
626  }
627  if (e_sum_in_therm_reg > really_small) {
628  in_therm_reg.T /= e_sum_in_therm_reg;
629  in_therm_reg.mub /= e_sum_in_therm_reg;
630  in_therm_reg.mus /= e_sum_in_therm_reg;
631  in_therm_reg.muq /= e_sum_in_therm_reg;
632  in_therm_reg.nb /= e_sum_in_therm_reg;
633  in_therm_reg.ns /= e_sum_in_therm_reg;
634  in_therm_reg.nq /= e_sum_in_therm_reg;
635  }
636 
637  std::cout << "Current time [fm]: " << clock.current_time() << std::endl;
638  std::cout << "Averages on the lattice - T[GeV], mub[GeV], mus[GeV], muq[GeV] "
639  << "nb[fm^-3], ns[fm^-3], nq[fm^-3]: " << on_lattice.T << " "
640  << on_lattice.mub << " " << on_lattice.mus << " " << on_lattice.muq
641  << " " << on_lattice.nb << " " << on_lattice.ns << " "
642  << on_lattice.nq << std::endl;
643  std::cout
644  << "Averages in therm. region - T[GeV], mub[GeV], mus[GeV], muq[GeV] "
645  << "nb[fm^-3], ns[fm^-3], nq[fm^-3]: " << in_therm_reg.T << " "
646  << in_therm_reg.mub << " " << in_therm_reg.mus << " " << in_therm_reg.muq
647  << " " << in_therm_reg.nb << " " << in_therm_reg.ns << " "
648  << in_therm_reg.nq << std::endl;
649  std::cout << "Volume with e > e_crit [fm^3]: "
650  << lat_cell_volume_ * node_counter << std::endl;
651 }

◆ lattice()

RectangularLattice<ThermLatticeNode>& smash::GrandCanThermalizer::lattice ( ) const
inline

Getter function for the lattice.

Definition at line 419 of file grandcan_thermalizer.h.

419 { return *lat_; }

◆ e_crit()

double smash::GrandCanThermalizer::e_crit ( ) const
inline

Get the critical energy density.

Definition at line 421 of file grandcan_thermalizer.h.

421 { return e_crit_; }

◆ particles_to_remove()

ParticleList smash::GrandCanThermalizer::particles_to_remove ( ) const
inline

List of particles to be removed from the simulation.

Definition at line 423 of file grandcan_thermalizer.h.

423 { return to_remove_; }

◆ particles_to_insert()

ParticleList smash::GrandCanThermalizer::particles_to_insert ( ) const
inline

List of newly created particles to be inserted in the simulation.

Definition at line 425 of file grandcan_thermalizer.h.

425 { return sampled_list_; }

◆ list_eos_particles()

ParticleTypePtrList smash::GrandCanThermalizer::list_eos_particles ( ) const
inlineprivate

Extracts the particles in the hadron gas equation of state from the complete list of particle types in SMASH.

Definition at line 432 of file grandcan_thermalizer.h.

432  {
433  ParticleTypePtrList res;
434  for (const ParticleType& ptype : ParticleType::list_all()) {
435  if (HadronGasEos::is_eos_particle(ptype)) {
436  res.push_back(&ptype);
437  }
438  }
439  return res;
440  }
static bool is_eos_particle(const ParticleType &ptype)
Check if a particle belongs to the EoS.
Definition: hadgas_eos.h:355
static const ParticleTypeList & list_all()
Definition: particletype.cc:51

◆ get_class()

HadronClass smash::GrandCanThermalizer::get_class ( size_t  typelist_index) const
inlineprivate

Defines the class of hadrons by quantum numbers.

Parameters
[in]typelist_indexIndex for a certain quantum number

Definition at line 445 of file grandcan_thermalizer.h.

445  {
446  const int B = eos_typelist_[typelist_index]->baryon_number();
447  const int S = eos_typelist_[typelist_index]->strangeness();
448  const int ch = eos_typelist_[typelist_index]->charge();
449  // clang-format off
450  return (B > 0) ? HadronClass::Baryon :
451  (B < 0) ? HadronClass::Antibaryon :
457  // clang-format on
458  }

◆ mult_class()

double smash::GrandCanThermalizer::mult_class ( const HadronClass  cl) const
inlineprivate
Parameters
[out]clMultiplicity of the hadron class

Definition at line 460 of file grandcan_thermalizer.h.

460  {
461  return mult_classes_[static_cast<size_t>(cl)];
462  }

Member Data Documentation

◆ N_in_cells_

std::vector<double> smash::GrandCanThermalizer::N_in_cells_
private

Number of particles to be sampled in one cell.

Definition at line 464 of file grandcan_thermalizer.h.

◆ cells_to_sample_

std::vector<size_t> smash::GrandCanThermalizer::cells_to_sample_
private

Cells above critical energy density.

Definition at line 466 of file grandcan_thermalizer.h.

◆ eos_

HadronGasEos smash::GrandCanThermalizer::eos_ = HadronGasEos(true, false)
private

Hadron gas equation of state.

Definition at line 468 of file grandcan_thermalizer.h.

◆ lat_

std::unique_ptr<RectangularLattice<ThermLatticeNode> > smash::GrandCanThermalizer::lat_
private

The lattice on which the thermodynamic quantities are calculated.

Definition at line 470 of file grandcan_thermalizer.h.

◆ to_remove_

ParticleList smash::GrandCanThermalizer::to_remove_
private

Particles to be removed after this thermalization step.

Definition at line 472 of file grandcan_thermalizer.h.

◆ sampled_list_

ParticleList smash::GrandCanThermalizer::sampled_list_
private

Newly generated particles by thermalizer.

Definition at line 474 of file grandcan_thermalizer.h.

◆ eos_typelist_

const ParticleTypePtrList smash::GrandCanThermalizer::eos_typelist_
private

List of particle types from which equation of state is computed.

Most particles are included, but not all of them. For example, photons and leptons are not included. Heavy hadrons, that can originate from Pythia, but do not interact in SMASH are not included. The latter are excluded to avoid violations of charm and bottomness conservation, when HadronGasEoS is used for forced thermalization.

Definition at line 483 of file grandcan_thermalizer.h.

◆ N_sorts_

const size_t smash::GrandCanThermalizer::N_sorts_
private

Number of different species to be sampled.

Definition at line 485 of file grandcan_thermalizer.h.

◆ mult_sort_

std::vector<double> smash::GrandCanThermalizer::mult_sort_
private

Real number multiplicity for each particle type.

Definition at line 487 of file grandcan_thermalizer.h.

◆ mult_int_

std::vector<int> smash::GrandCanThermalizer::mult_int_
private

Integer multiplicity for each particle type.

Definition at line 489 of file grandcan_thermalizer.h.

◆ mult_classes_

std::array<double, 7> smash::GrandCanThermalizer::mult_classes_
private

The different hadron species according to the enum defined in.

See also
HadronClass

Definition at line 494 of file grandcan_thermalizer.h.

◆ N_total_in_cells_

double smash::GrandCanThermalizer::N_total_in_cells_
private

Total number of particles over all cells in thermalization region.

Definition at line 496 of file grandcan_thermalizer.h.

◆ lat_cell_volume_

double smash::GrandCanThermalizer::lat_cell_volume_
private

Volume of a single lattice cell, necessary to convert thermal densities to actual particle numbers.

Definition at line 501 of file grandcan_thermalizer.h.

◆ e_crit_

const double smash::GrandCanThermalizer::e_crit_
private

Critical energy density above which cells are thermalized.

Definition at line 503 of file grandcan_thermalizer.h.

◆ t_start_

const double smash::GrandCanThermalizer::t_start_
private

Starting time of the simulation.

Definition at line 505 of file grandcan_thermalizer.h.

◆ period_

const double smash::GrandCanThermalizer::period_
private

Defines periodicity of the lattice in fm.

Definition at line 507 of file grandcan_thermalizer.h.

◆ algorithm_

const ThermalizationAlgorithm smash::GrandCanThermalizer::algorithm_
private

Algorithm to choose for sampling of particles obeying conservation laws.

Definition at line 509 of file grandcan_thermalizer.h.

◆ BF_enforce_microcanonical_

const bool smash::GrandCanThermalizer::BF_enforce_microcanonical_
private

Enforce energy conservation as part of BF sampling algorithm or not.

Definition at line 511 of file grandcan_thermalizer.h.


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