166 : radius_(modus_config.take({
"Sphere",
"Radius"})),
168 start_time_(modus_config.take({
"Sphere",
"Start_Time"}, 0.)),
170 modus_config.take({
"Sphere",
"Use_Thermal_Multiplicities"},
false)),
171 mub_(modus_config.take({
"Sphere",
"Baryon_Chemical_Potential"}, 0.)),
172 mus_(modus_config.take({
"Sphere",
"Strange_Chemical_Potential"}, 0.)),
174 modus_config.take({
"Sphere",
"Account_Resonance_Widths"},
true)),
176 ? std::map<PdgCode, int>()
177 : modus_config.take({
"Sphere",
"Init_Multiplicities"})
179 init_distr_(modus_config.take({
"Sphere",
"Initial_Condition"},
181 insert_jet_(modus_config.has_value({
"Sphere",
"Jet",
"Jet_PDG"})),
185 jet_mom_(modus_config.take({
"Sphere",
"Jet",
"Jet_Momentum"}, 20.)) {}
189 out <<
"-- Sphere Modus:\nRadius of the sphere: " << m.
radius_ <<
" fm\n";
192 <<
" GeV, muB = " << m.
mub_ <<
" GeV, muS = " << m.
mus_ <<
" GeV)\n";
196 out << ptype->
name() <<
" initial multiplicity " <<
p.second <<
'\n';
203 out <<
"Adding a " << ptype->
name() <<
" as a jet in the middle " 204 <<
"of the sphere with " << m.
jet_mom_ <<
" GeV initial momentum.\n";
212 const auto &log = logger<LogArea::Sphere>();
227 double nb_init = 0.0, ns_init = 0.0;
230 particles->
create(thermal_mult_int, mult.first);
231 nb_init += mult.second * mult.first.baryon_number();
232 ns_init += mult.second * mult.first.strangeness();
233 log.debug(mult.first,
" initial multiplicity ", thermal_mult_int);
235 log.info(
"Initial hadron gas baryon density ", nb_init);
236 log.info(
"Initial hadron gas strange density ", ns_init);
240 log.debug(
"Particle ",
p.first,
" initial multiplicity ",
p.second);
247 double momentum_radial, mass = data.pole_mass();
271 log.debug(data.type().name(),
"(id ", data.id(),
") radial momentum ",
272 momentum_radial,
", direction", phitheta);
273 data.set_4momentum(mass, phitheta.
threevec() * momentum_radial);
274 momentum_total += data.momentum();
276 double position_radial;
286 data.set_4momentum(data.momentum().abs(),
287 data.momentum().threevec() -
288 momentum_total.threevec() / particles->size());
293 auto &jet_particle = particles->create(
jet_pdg_);
303 momentum_total += data.momentum();
308 log.debug() <<
"Sphere initial total 4-momentum [GeV]: " << momentum_total;
double radius_
Sphere radius (in fm/c)
The ThreeVector class represents a physical three-vector with the components .
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.
const double jet_mom_
Initial momentum of the jet particle; only used if insert_jet_ is true.
Collection of useful constants that are known at compile time.
double sphere_temperature_
Temperature for momentum distribution (in GeV)
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.
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.
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.
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
ThreeVector threevec() const
static const ParticleTypeList & list_all()
const bool use_thermal_
Whether to use a thermal initialization for all particles instead of specific numbers.
const std::string & name() const
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 (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.
const bool insert_jet_
Whether to insert a single high energy particle at the center of the expanding sphere (0...
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 ...
const PdgCode jet_pdg_
Pdg of the particle to use as a jet; necessary if insert_jet_ is true, unused otherwise.
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.
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.
friend std::ostream & operator<<(std::ostream &, const SphereModus &)
Writes the initial state for the Sphere to the output stream.