38 out <<
"-- Box Modus:\nSize of the box: (" << m.
length_ <<
" fm)³\n";
40 out <<
"Thermal multiplicities " 42 <<
" GeV, muS = " << m.
mus_ <<
" GeV)\n";
46 out << ptype->
name() <<
" initial multiplicity " <<
p.second <<
'\n';
50 out <<
"All initial momenta = 3T = " << 3 * m.
temperature_ <<
" GeV\n";
52 out <<
"Boltzmann momentum distribution with T = " << m.
temperature_ 57 out <<
"Adding a " << ptype->
name() <<
" as a jet in the middle " 58 <<
"of the box with " << m.
jet_mom_ <<
" GeV initial momentum.\n";
206 : initial_condition_(modus_config.take({
"Box",
"Initial_Condition"})),
207 length_(modus_config.take({
"Box",
"Length"})),
208 temperature_(modus_config.take({
"Box",
"Temperature"})),
209 start_time_(modus_config.take({
"Box",
"Start_Time"}, 0.)),
211 modus_config.take({
"Box",
"Use_Thermal_Multiplicities"},
false)),
212 mub_(modus_config.take({
"Box",
"Baryon_Chemical_Potential"}, 0.)),
213 mus_(modus_config.take({
"Box",
"Strange_Chemical_Potential"}, 0.)),
215 modus_config.take({
"Box",
"Account_Resonance_Widths"},
true)),
217 ? std::map<PdgCode, int>()
218 : modus_config.take({
"Box",
"Init_Multiplicities"})
220 insert_jet_(modus_config.has_value({
"Box",
"Jet",
"Jet_PDG"})),
224 jet_mom_(modus_config.take({
"Box",
"Jet",
"Jet_Momentum"}, 20.)) {}
228 const auto &log = logger<LogArea::Box>();
229 double momentum_radial = 0, mass;
246 double nb_init = 0.0, ns_init = 0.0;
249 particles->
create(thermal_mult_int, mult.first);
250 nb_init += mult.second * mult.first.baryon_number();
251 ns_init += mult.second * mult.first.strangeness();
252 log.debug(mult.first,
" initial multiplicity ", thermal_mult_int);
254 log.info(
"Initial hadron gas baryon density ", nb_init);
255 log.info(
"Initial hadron gas strange density ", ns_init);
259 log.debug(
"Particle ",
p.first,
" initial multiplicity ",
p.second);
267 momentum_radial = 3.0 * T;
268 mass = data.pole_mass();
277 log.debug(data.type().name(),
"(id ", data.id(),
") radial momentum ",
278 momentum_radial,
", direction", phitheta);
279 data.set_4momentum(mass, phitheta.
threevec() * momentum_radial);
280 momentum_total += data.momentum();
283 ThreeVector pos{uniform_length(), uniform_length(), uniform_length()};
291 data.set_4momentum(data.momentum().abs(),
292 data.momentum().threevec() -
293 momentum_total.
threevec() / particles->size());
298 auto &jet_particle = particles->create(
jet_pdg_);
308 momentum_total += data.momentum();
313 log.debug() <<
"Initial total 4-momentum [GeV]: " << momentum_total;
318 const OutputsList &output_list) {
319 const auto &log = logger<LogArea::Box>();
328 data.set_4position(position);
331 make_unique<WallcrossingAction>(incoming_particle, data);
332 for (
const auto &output : output_list) {
333 if (!output->is_dilepton_output() && !output->is_photon_output()) {
334 output->at_interaction(*action, 0.);
339 log.debug(
"Moved ", wraps,
" particles back into the box.");
const double start_time_
Initial time of the box.
const double length_
Length of the cube's edge in fm/c.
const std::map< PdgCode, int > init_multipl_
Particle multiplicities at initialization; required if use_thermal_ is false.
The ThreeVector class represents a physical three-vector with the components .
const bool use_thermal_
Whether to use a thermal initialization for all particles instead of specific numbers.
const double temperature_
Temperature of the Box in GeV.
const double jet_mom_
Initial momentum of the jet particle; only used if insert_jet_ is true.
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.
void create(size_t n, PdgCode pdg)
Add n particles of the same type (pdg) to the list.
const BoxInitialCondition initial_condition_
Initial momenta distribution: thermal or peaked momenta.
Collection of useful constants that are known at compile time.
ThreeVector threevec() const
const PdgCode jet_pdg_
Pdg of the particle to use as a jet; necessary if insert_jet_ is true, unused otherwise.
const double mus_
Strange chemical potential for thermal initialization; only used if use_thermal_ is true...
Interface to the SMASH configuration files.
static bool is_eos_particle(const ParticleType &ptype)
Check if a particle belongs to the EoS.
const bool insert_jet_
Whether to insert a single high energy particle at the center of the box (0,0,0). ...
static double partial_density(const ParticleType &ptype, double T, double mub, double mus, bool account_for_resonance_widths=false)
Compute partial density of one hadron sort.
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
ThreeVector threevec() const
static const ParticleTypeList & list_all()
const std::string & name() const
Generic algorithms on containers and ranges.
Particle type contains the static properties of a particle species.
std::map< PdgCode, double > average_multipl_
Average multiplicities in case of thermal initialization.
double sample_momenta_from_thermal(const double temperature, const double mass)
Samples a momentum from the Maxwell-Boltzmann (thermal) distribution in a faster way, given by Scott Pratt (see Pratt:2014vja) APPENDIX: ALGORITHM FOR GENERATING PARTICLES math trick: for distribution, sample x by: where are uniform random numbers between [0,1) for : , where is used as rejection weight.
static double sample_mass_thermal(const ParticleType &ptype, double beta)
Sample resonance mass in a thermal medium.
uniform_dist< T > make_uniform_distribution(T min, T max)
BoxModus: Provides a modus for infinite matter calculations.
BoxModus(Configuration modus_config, const ExperimentParameters ¶meters)
Constructor.
double initial_conditions(Particles *particles, const ExperimentParameters ¶meters)
Generates initial state of the particles in the system according to specified parameters: number of p...
int poisson(const T &lam)
Returns a Poisson distributed random number.
int testparticles
Number of test particle.
A pointer-like interface to global references to ParticleType objects.
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
void distribute_isotropically()
Populate the object with a new direction.
The Particles class abstracts the storage and manipulation of particles.
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
Convenience: dereferences the ActionPtr to Action.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
Helper structure for Experiment.
ParticleData contains the dynamic information of a certain particle.
static bool enforce_periodic_boundaries(Iterator begin, const Iterator &end, typename std::iterator_traits< Iterator >::value_type length)
Enforces periodic boundaries on the given collection of values.
int impose_boundary_conditions(Particles *particles, const OutputsList &output_list={})
Enforces that all particles are inside the box at the beginning of an event.
const double mub_
Baryon chemical potential for thermal initialization; only used if use_thermal_ is true...