#include <boxmodus.h>
BoxModus: Provides a modus for infinite matter calculations.
Matter is confined in a cubical box. Depending on the initial condition, particles are either reflected on the boundaries (not implemented now) or inserted on opposite positions.
To use this modus, choose Modus: Box
in the configuration file.
Options for BoxModus go in the "Modi"→"Box" section of the configuration:
The following configuration options are understood: Box
Definition at line 46 of file boxmodus.h.
Public Member Functions | |
BoxModus (Configuration modus_config, const ExperimentParameters ¶meters) | |
Constructor. More... | |
double | initial_conditions (Particles *particles, const ExperimentParameters ¶meters) |
Generates initial state of the particles in the system according to specified parameters: number of particles of each species, momentum and coordinate space distributions. More... | |
int | impose_boundary_conditions (Particles *particles, const OutputsList &output_list={}) |
Enforces that all particles are inside the box at the beginning of an event. More... | |
Grid< GridOptions::PeriodicBoundaries > | create_grid (const Particles &particles, double min_cell_length, double timestep_duration, CollisionCriterion crit, const bool include_unformed_particles, CellSizeStrategy strategy=CellSizeStrategy::Optimal) const |
Creates the Grid with normal boundary conditions. More... | |
std::unique_ptr< GrandCanThermalizer > | create_grandcan_thermalizer (Configuration &conf) const |
Creates GrandCanThermalizer. More... | |
double | max_timestep (double max_transverse_distance_sqr) const |
double | equilibration_time () const |
bool | is_box () const |
double | length () const |
Public Member Functions inherited from smash::ModusDefault | |
int | impose_boundary_conditions (Particles *, const OutputsList &={}) |
Enforces sensible positions for the particles. More... | |
bool | is_collider () const |
bool | is_box () const |
bool | is_list () const |
bool | is_sphere () const |
double | sqrt_s_NN () const |
double | impact_parameter () const |
void | sample_impact () const |
sample impact parameter for collider modus More... | |
double | velocity_projectile () const |
double | velocity_target () const |
FermiMotion | fermi_motion () const |
double | max_timestep (double) const |
double | equilibration_time () const |
double | length () const |
double | radius () const |
bool | calculation_frame_is_fixed_target () const |
double | nuclei_passing_time () const |
Get the passing time of the two nuclei in a collision. More... | |
Grid< GridOptions::Normal > | create_grid (const Particles &particles, double min_cell_length, double timestep_duration, CollisionCriterion crit, const bool include_unformed_particles, CellSizeStrategy strategy=CellSizeStrategy::Optimal) const |
Creates the Grid with normal boundary conditions. More... | |
std::unique_ptr< GrandCanThermalizer > | create_grandcan_thermalizer (Configuration &conf) const |
Creates GrandCanThermalizer. More... | |
Private Attributes | |
const BoxInitialCondition | initial_condition_ |
Initial momenta distribution: thermal or peaked momenta. More... | |
const double | length_ |
Length of the cube's edge in fm. More... | |
const double | equilibration_time_ |
time after which output is written More... | |
const double | temperature_ |
Temperature of the Box in GeV. More... | |
const double | start_time_ = 0. |
Initial time of the box. More... | |
const bool | use_thermal_ = false |
Whether to use a thermal initialization for all particles instead of specific numbers. More... | |
const double | mub_ |
Baryon chemical potential for thermal initialization; only used if use_thermal_ is true. More... | |
const double | mus_ |
Strange chemical potential for thermal initialization; only used if use_thermal_ is true. More... | |
const double | muq_ |
Charge chemical potential for thermal initialization; only used if use_thermal_ is true. More... | |
const bool | account_for_resonance_widths_ |
In case of thermal initialization: true – account for resonance spectral functions, while computing multiplicities and sampling masses, false – simply use pole masses. More... | |
const std::map< PdgCode, int > | init_multipl_ |
Particle multiplicities at initialization; required if use_thermal_ is false. More... | |
std::map< PdgCode, double > | average_multipl_ |
Average multiplicities in case of thermal initialization. More... | |
const std::optional< PdgCode > | jet_pdg_ |
Optional PDG code of the particle to use as a jet. More... | |
const double | jet_mom_ |
Initial momentum of the jet particle; only used if insert_jet_ is true. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const BoxModus &m) |
Console output on startup of box specific parameters; writes the initial state for the box to the output stream. More... | |
|
explicit |
Constructor.
Gathers all configuration variables for the Box.
[in] | modus_config | The configuration object that sets all initial conditions of the experiment. |
[in] | parameters | Unused, but necessary because of templated initialization |
Definition at line 65 of file boxmodus.cc.
double smash::BoxModus::initial_conditions | ( | Particles * | particles, |
const ExperimentParameters & | parameters | ||
) |
Generates initial state of the particles in the system according to specified parameters: number of particles of each species, momentum and coordinate space distributions.
Subsequently makes the total 3-momentum 0.
[out] | particles | An empty list that gets filled up by this function |
[in] | parameters | The initialization parameters of the box |
Initialize formation time
Definition at line 106 of file boxmodus.cc.
int smash::BoxModus::impose_boundary_conditions | ( | Particles * | particles, |
const OutputsList & | output_list = {} |
||
) |
Enforces that all particles are inside the box at the beginning of an event.
It checks if the particles were placed correctly inside the box at initialization and places them inside if they are not.
[in] | particles | particles to check their position and possibly move it |
[in] | output_list | output objects |
In BoxModus if a particle crosses the wall of the box, it is inserted from the opposite side. However these wall crossings are not performed by this function but in the Experiment constructor when the WallCrossActionsFinder are created. Wall crossings are written to collision output: this is where OutputsList is used.
Definition at line 218 of file boxmodus.cc.
|
inline |
Creates the Grid with normal boundary conditions.
[in] | particles | The Particles object containing all particles of the currently running Experiment. |
[in] | min_cell_length | The minimal length of the grid cells. |
[in] | timestep_duration | Duration of the timestep. It is necessary for formation times treatment: if particle is fully or partially formed before the end of the timestep, it has to be on the grid. |
[in] | crit | Collision criterion (decides if cell number can be limited) |
[in] | include_unformed_particles | include unformed particles from the grid (worsens runtime, necessary for IC output) |
[in] | strategy | The strategy to determine the cell size |
Definition at line 94 of file boxmodus.h.
|
inline |
Creates GrandCanThermalizer.
(Special Box implementation.)
[in] | conf | configuration object |
Definition at line 118 of file boxmodus.h.
|
inline |
Definition at line 128 of file boxmodus.h.
|
inline |
|
inline |
Definition at line 135 of file boxmodus.h.
|
inline |
|
private |
Initial momenta distribution: thermal or peaked momenta.
Definition at line 141 of file boxmodus.h.
|
private |
Length of the cube's edge in fm.
Definition at line 143 of file boxmodus.h.
|
private |
time after which output is written
Definition at line 145 of file boxmodus.h.
|
private |
Temperature of the Box in GeV.
Definition at line 147 of file boxmodus.h.
|
private |
Initial time of the box.
Definition at line 149 of file boxmodus.h.
|
private |
Whether to use a thermal initialization for all particles instead of specific numbers.
Definition at line 154 of file boxmodus.h.
|
private |
Baryon chemical potential for thermal initialization; only used if use_thermal_ is true.
Definition at line 159 of file boxmodus.h.
|
private |
Strange chemical potential for thermal initialization; only used if use_thermal_ is true.
Definition at line 164 of file boxmodus.h.
|
private |
Charge chemical potential for thermal initialization; only used if use_thermal_ is true.
Definition at line 169 of file boxmodus.h.
|
private |
In case of thermal initialization: true – account for resonance spectral functions, while computing multiplicities and sampling masses, false – simply use pole masses.
Definition at line 175 of file boxmodus.h.
|
private |
Particle multiplicities at initialization; required if use_thermal_ is false.
Definition at line 180 of file boxmodus.h.
|
private |
Average multiplicities in case of thermal initialization.
Saved to avoid recalculating at every event
Definition at line 185 of file boxmodus.h.
|
private |
Optional PDG code of the particle to use as a jet.
Same setup as in the sphere modus case.
Definition at line 190 of file boxmodus.h.
|
private |
Initial momentum of the jet particle; only used if insert_jet_ is true.
Definition at line 194 of file boxmodus.h.