33 static constexpr
int LSphere = LogArea::Sphere::id;
170 : radius_(modus_config.take({
"Sphere",
"Radius"})),
171 sphere_temperature_(modus_config.take({
"Sphere",
"Temperature"})),
172 start_time_(modus_config.take({
"Sphere",
"Start_Time"}, 0.)),
174 modus_config.take({
"Sphere",
"Use_Thermal_Multiplicities"},
false)),
175 mub_(modus_config.take({
"Sphere",
"Baryon_Chemical_Potential"}, 0.)),
176 mus_(modus_config.take({
"Sphere",
"Strange_Chemical_Potential"}, 0.)),
177 muq_(modus_config.take({
"Sphere",
"Charge_Chemical_Potential"}, 0.)),
178 account_for_resonance_widths_(
179 modus_config.take({
"Sphere",
"Account_Resonance_Widths"},
true)),
180 init_multipl_(use_thermal_
181 ? std::map<PdgCode, int>()
182 : modus_config.take({
"Sphere",
"Init_Multiplicities"})
183 .convert_for(init_multipl_)),
185 modus_config.take({
"Sphere",
"Initial_Condition"},
187 insert_jet_(modus_config.has_value({
"Sphere",
"Jet",
"Jet_PDG"})),
188 jet_pdg_(insert_jet_ ? modus_config.take({
"Sphere",
"Jet",
"Jet_PDG"})
189 .convert_for(jet_pdg_)
191 jet_mom_(modus_config.take({
"Sphere",
"Jet",
"Jet_Momentum"}, 20.)) {}
195 out <<
"-- Sphere Modus:\nRadius of the sphere: " << m.
radius_ <<
" fm\n";
198 <<
" GeV, muB = " << m.
mub_ <<
" GeV, muS = " << m.
mus_
199 <<
" GeV, muQ = " << m.
muq_ <<
" GeV)\n";
203 out << ptype->
name() <<
" initial multiplicity " <<
p.second <<
'\n';
208 out <<
"Boltzmann momentum distribution with T = "
212 out <<
"Fermi/Bose momentum distribution with T = "
216 out <<
"Sphere Initial Condition is IC_ES";
219 out <<
"Sphere Initial Condition is IC_1M";
222 out <<
"Sphere Initial Condition is IC_2M";
225 out <<
"Sphere Initial Condition is IC_Massive";
230 out <<
"Adding a " << ptype->
name() <<
" as a jet in the middle "
231 <<
"of the sphere with " << m.
jet_mom_ <<
" GeV initial momentum.\n";
253 double nb_init = 0.0, ns_init = 0.0, nq_init = 0.0;
256 particles->
create(thermal_mult_int, mult.first);
257 nb_init += mult.second * mult.first.baryon_number();
258 ns_init += mult.second * mult.first.strangeness();
259 nq_init += mult.second * mult.first.charge();
260 logg[
LSphere].debug(mult.first,
" initial multiplicity ",
263 logg[
LSphere].info(
"Initial hadron gas baryon density ", nb_init);
264 logg[
LSphere].info(
"Initial hadron gas strange density ", ns_init);
265 logg[
LSphere].info(
"Initial hadron gas charge density ", nq_init);
269 logg[
LSphere].debug(
"Particle ",
p.first,
" initial multiplicity ",
273 std::unique_ptr<QuantumSampling> quantum_sampling;
275 quantum_sampling = make_unique<QuantumSampling>(
init_multipl_, V, T);
281 double momentum_radial = 0.0, mass = data.pole_mass();
311 mass = data.type().mass();
312 momentum_radial = quantum_sampling->sample(data.pdgcode());
316 logg[
LSphere].debug(data.type().name(),
"(id ", data.id(),
317 ") radial momentum ", momentum_radial,
", direction",
319 data.set_4momentum(mass, phitheta.
threevec() * momentum_radial);
320 momentum_total += data.momentum();
322 double position_radial;
332 data.set_4momentum(data.momentum().abs(),
333 data.momentum().threevec() -
349 momentum_total += data.momentum();
354 logg[
LSphere].debug() <<
"Sphere initial total 4-momentum [GeV]: "
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
ThreeVector threevec() const
void distribute_isotropically()
Populate the object with a new direction.
Interface to the SMASH configuration files.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
ThreeVector threevec() const
static double partial_density(const ParticleType &ptype, double T, double mub, double mus, double muq, bool account_for_resonance_widths=false)
Compute partial density of one hadron sort.
static double sample_mass_thermal(const ParticleType &ptype, double beta)
Sample resonance mass in a thermal medium.
static bool is_eos_particle(const ParticleType &ptype)
Check if a particle belongs to the EoS.
ParticleData contains the dynamic information of a certain particle.
A pointer-like interface to global references to ParticleType objects.
Particle type contains the static properties of a particle species.
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
const std::string & name() const
static const ParticleTypeList & list_all()
The Particles class abstracts the storage and manipulation of particles.
void create(size_t n, PdgCode pdg)
Add n particles of the same type (pdg) to the list.
SphereModus: Provides a modus for expanding matter calculations.
const bool account_for_resonance_widths_
In case of thermal initialization: true – account for resonance spectral functions,...
const bool use_thermal_
Whether to use a thermal initialization for all particles instead of specific numbers.
const double muq_
Charge chemical potential for thermal initialization; only used if use_thermal_ is true.
double sphere_temperature_
Temperature for momentum distribution (in GeV)
const double start_time_
Starting time for the Sphere.
const bool insert_jet_
Whether to insert a single high energy particle at the center of the expanding sphere (0,...
const PdgCode jet_pdg_
Pdg of the particle to use as a jet; necessary if insert_jet_ is true, unused otherwise.
const SphereInitialCondition init_distr_
Initialization scheme for momenta in the sphere; used for expanding metric setup.
SphereModus(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...
std::map< PdgCode, double > average_multipl_
Average multiplicities in case of thermal initialization.
const double mub_
Baryon chemical potential for thermal initialization; only used if use_thermal_ is true.
const double jet_mom_
Initial momentum of the jet particle; only used if insert_jet_ is true.
const std::map< PdgCode, int > init_multipl_
Particle multiplicities at initialization; required if use_thermal_ is false.
const double mus_
Strange chemical potential for thermal initialization; only used if use_thermal_ is true.
double radius_
Sphere radius (in fm/c)
The ThreeVector class represents a physical three-vector with the components .
Collection of useful constants that are known at compile time.
@ ThermalMomentaBoltzmann
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
Convenience: dereferences the ActionPtr to Action.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
int poisson(const T &lam)
Returns a Poisson distributed random number.
static constexpr int LSphere
double sample_momenta_from_thermal(const double temperature, const double mass)
Samples a momentum from the Maxwell-Boltzmann (thermal) distribution in a faster way,...
double sample_momenta_IC_ES(const double temperature)
Sample momenta according to the momentum distribution in Bazow:2016oky .
double sample_momenta_non_eq_mass(const double temperature, const double mass)
Samples a momentum via rejection method from the non-equilibrium distribution.
double sample_momenta_1M_IC(const double temperature, const double mass)
Samples a momentum from the non-equilibrium distribution 1M_IC from Bazow:2016oky .
double sample_momenta_2M_IC(const double temperature, const double mass)
Samples a momentum from the non-equilibrium distribution 2M_IC from Bazow:2016oky .
Helper structure for Experiment.
int testparticles
Number of test-particles.