Version: SMASH-1.7
boxmodus.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2019
3  * SMASH Team
4  *
5  * GNU General Public License (GPLv3 or later)
6  */
7 #ifndef SRC_INCLUDE_BOXMODUS_H_
8 #define SRC_INCLUDE_BOXMODUS_H_
9 
10 #include <map>
11 #include <memory>
12 
13 #include "forwarddeclarations.h"
14 #include "modusdefault.h"
15 
16 namespace smash {
17 
46 class BoxModus : public ModusDefault {
47  public:
58  explicit BoxModus(Configuration modus_config,
59  const ExperimentParameters &parameters);
60 
71  double initial_conditions(Particles *particles,
72  const ExperimentParameters &parameters);
73 
91  const OutputsList &output_list = {});
92 
95  const Particles &particles, double min_cell_length,
96  double timestep_duration,
98  return {{{0, 0, 0}, {length_, length_, length_}},
99  particles,
100  min_cell_length,
101  timestep_duration,
102  strategy};
103  }
104 
111  std::unique_ptr<GrandCanThermalizer> create_grandcan_thermalizer(
112  Configuration &conf) const {
113  const std::array<double, 3> lat_size = {length_, length_, length_};
114  const std::array<double, 3> origin = {0., 0., 0.};
115  const bool periodicity = true;
116  return make_unique<GrandCanThermalizer>(conf, lat_size, origin,
117  periodicity);
118  }
119 
121  double max_timestep(double max_transverse_distance_sqr) const {
122  return 0.5 * std::sqrt(length_ * length_ - max_transverse_distance_sqr);
123  }
124 
126  double length() const { return length_; }
127 
128  private:
132  const double length_;
134  const double temperature_;
136  const double start_time_ = 0.;
141  const bool use_thermal_ = false;
146  const double mub_;
151  const double mus_;
162  const std::map<PdgCode, int> init_multipl_;
167  std::map<PdgCode, double> average_multipl_;
168 
173  const bool insert_jet_ = false;
182  const double jet_mom_;
183 
192  friend std::ostream &operator<<(std::ostream &out, const BoxModus &m);
193 };
194 
195 } // namespace smash
196 
197 #endif // SRC_INCLUDE_BOXMODUS_H_
const double start_time_
Initial time of the box.
Definition: boxmodus.h:136
const double length_
Length of the cube&#39;s edge in fm/c.
Definition: boxmodus.h:132
const std::map< PdgCode, int > init_multipl_
Particle multiplicities at initialization; required if use_thermal_ is false.
Definition: boxmodus.h:162
const bool use_thermal_
Whether to use a thermal initialization for all particles instead of specific numbers.
Definition: boxmodus.h:141
const double temperature_
Temperature of the Box in GeV.
Definition: boxmodus.h:134
const double jet_mom_
Initial momentum of the jet particle; only used if insert_jet_ is true.
Definition: boxmodus.h:182
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.
Definition: boxmodus.h:157
std::unique_ptr< GrandCanThermalizer > create_grandcan_thermalizer(Configuration &conf) const
Creates GrandCanThermalizer.
Definition: boxmodus.h:111
BoxInitialCondition
Initial condition for a particle in a box.
const BoxInitialCondition initial_condition_
Initial momenta distribution: thermal or peaked momenta.
Definition: boxmodus.h:130
Grid< GridOptions::PeriodicBoundaries > create_grid(const Particles &particles, double min_cell_length, double timestep_duration, CellSizeStrategy strategy=CellSizeStrategy::Optimal) const
Creates the Grid with normal boundary conditions.
Definition: boxmodus.h:94
Look for optimal cell size.
double max_timestep(double max_transverse_distance_sqr) const
Definition: boxmodus.h:121
const PdgCode jet_pdg_
Pdg of the particle to use as a jet; necessary if insert_jet_ is true, unused otherwise.
Definition: boxmodus.h:178
const double mus_
Strange chemical potential for thermal initialization; only used if use_thermal_ is true...
Definition: boxmodus.h:151
Interface to the SMASH configuration files.
const bool insert_jet_
Whether to insert a single high energy particle at the center of the box (0,0,0). ...
Definition: boxmodus.h:173
Base class for Modus classes that provides default function implementations.
Definition: modusdefault.h:44
friend 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 out...
Definition: boxmodus.cc:37
double length() const
Definition: boxmodus.h:126
std::map< PdgCode, double > average_multipl_
Average multiplicities in case of thermal initialization.
Definition: boxmodus.h:167
PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number.
Definition: pdgcode.h:108
BoxModus: Provides a modus for infinite matter calculations.
Definition: boxmodus.h:46
BoxModus(Configuration modus_config, const ExperimentParameters &parameters)
Constructor.
Definition: boxmodus.cc:205
double initial_conditions(Particles *particles, const ExperimentParameters &parameters)
Generates initial state of the particles in the system according to specified parameters: number of p...
Definition: boxmodus.cc:226
CellSizeStrategy
Indentifies the strategy of determining the cell size.
Definition: grid.h:33
The Particles class abstracts the storage and manipulation of particles.
Definition: particles.h:33
Helper structure for Experiment.
Definition: action.h:24
int impose_boundary_conditions(Particles *particles, const OutputsList &output_list={})
Enforces that all particles are inside the box at the beginning of an event.
Definition: boxmodus.cc:317
const double mub_
Baryon chemical potential for thermal initialization; only used if use_thermal_ is true...
Definition: boxmodus.h:146