135 : radius_(modus_config.take({
"Sphere",
"Radius"})),
136 sphere_temperature_(modus_config.take({
"Sphere",
"Sphere_Temperature"})),
137 start_time_(modus_config.take({
"Sphere",
"Start_Time"}, 0.)),
139 modus_config.take({
"Sphere",
"Use_Thermal_Multiplicities"},
false)),
140 mub_(modus_config.take({
"Sphere",
"Baryon_Chemical_Potential"}, 0.)),
141 mus_(modus_config.take({
"Sphere",
"Strange_Chemical_Potential"}, 0.)),
142 init_multipl_(use_thermal_
143 ? std::map<PdgCode, int>()
144 : modus_config.take({
"Sphere",
"Init_Multiplicities"})
145 .convert_for(init_multipl_)),
146 init_distr_(modus_config.take({
"Sphere",
"Initial_Condition"},
151 out <<
"-- Sphere Modus:\nRadius of the sphere: " << m.
radius_ <<
" fm\n";
154 <<
" GeV, muB = " << m.
mub_ <<
" GeV, muS = " << m.
mus_ <<
" GeV)\n";
158 out << ptype->
name() <<
" initial multiplicity " <<
p.second <<
'\n';
169 const auto &log = logger<LogArea::Sphere>();
183 double nb_init = 0.0, ns_init = 0.0;
186 particles->
create(thermal_mult_int, mult.first);
187 nb_init += mult.second * mult.first.baryon_number();
188 ns_init += mult.second * mult.first.strangeness();
189 log.debug(mult.first,
" initial multiplicity ", thermal_mult_int);
191 log.info(
"Initial hadron gas baryon density ", nb_init);
192 log.info(
"Initial hadron gas strange density ", ns_init);
196 log.debug(
"Particle ",
p.first,
" initial multiplicity ",
p.second);
203 double momentum_radial, mass = data.pole_mass();
225 log.debug(data.type().name(),
"(id ", data.id(),
") radial momentum ",
226 momentum_radial,
", direction", phitheta);
227 data.set_4momentum(mass, phitheta.
threevec() * momentum_radial);
228 momentum_total += data.momentum();
230 double position_radial;
240 data.set_4momentum(data.momentum().abs(),
241 data.momentum().threevec() -
242 momentum_total.threevec() / particles->size());
248 momentum_total += data.momentum();
253 log.debug() <<
"Sphere initial total 4-momentum [GeV]: " << momentum_total;
double radius_
Sphere radius (in fm/c)
const SphereInitialCondition init_distr_
Initialization scheme for momenta in the sphere; used for expanding metric setup. ...
double sample_momenta_2M_IC(const double temperature, const double mass)
Samples a momentum from the non-equilibrium distribution 2M_IC from Bazow:2016oky ...
void create(size_t n, PdgCode pdg)
Add n particles of the same type (pdg) to the list.
Collection of useful constants that are known at compile time.
ThreeVector threevec() const
double sphere_temperature_
Temperature for momentum distribution (in GeV)
Interface to the SMASH configuration files.
const double start_time_
Starting time for the Sphere.
static bool is_eos_particle(const ParticleType &ptype)
Check if a particle belongs to the EoS.
std::map< PdgCode, double > average_multipl_
Average multiplicities in case of thermal initialization.
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
SphereModus: Provides a modus for expanding matter calculations.
double sample_momenta_IC_ES(const double temperature)
Sample momenta according to the momentum distribution in Bazow:2016oky
static const ParticleTypeList & list_all()
const bool use_thermal_
Whether to use a thermal initialization for all particles instead of specific numbers.
Generic algorithms on containers and ranges.
Particle type contains the static properties of a particle species.
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.
static double sample_mass_thermal(const ParticleType &ptype, double beta)
Sample resonance mass in a thermal medium.
const double mus_
Strange chemical potential for thermal initialization; only used if use_thermal_ is true...
SphereModus(Configuration modus_config, const ExperimentParameters ¶meters)
Constructor.
const double mub_
Baryon chemical potential for thermal initialization; only used if use_thermal_ is true...
double sample_momenta_non_eq_mass(const double temperature, const double mass)
Samples a momentum via rejection method from the non-equilibrium distribution .
const std::map< PdgCode, int > init_multipl_
Particle multiplicities at initialization; required if use_thermal_ is false.
double sample_momenta_1M_IC(const double temperature, const double mass)
Samples a momentum from the non-equilibrium distribution 1M_IC from Bazow:2016oky ...
static double partial_density(const ParticleType &ptype, double T, double mub, double mus)
Compute partial density of one hadron sort.
int poisson(const T &lam)
Returns a Poisson distributed random number.
int testparticles
Number of test particle.
double initial_conditions(Particles *particles, const ExperimentParameters ¶meters)
Generates initial state of the particles in the system according to specified parameters: number of p...
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.
const std::string & name() const