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"},
188 modus_config.take({
"Sphere",
"Add_Radial_Velocity"}, -1.)),
189 insert_jet_(modus_config.has_value({
"Sphere",
"Jet",
"Jet_PDG"})),
190 jet_pdg_(insert_jet_ ? modus_config.take({
"Sphere",
"Jet",
"Jet_PDG"})
191 .convert_for(jet_pdg_)
193 jet_mom_(modus_config.take({
"Sphere",
"Jet",
"Jet_Momentum"}, 20.)) {}
197 out <<
"-- Sphere Modus:\nRadius of the sphere: " << m.
radius_ <<
" fm\n";
200 <<
" GeV, muB = " << m.
mub_ <<
" GeV, muS = " << m.
mus_
201 <<
" GeV, muQ = " << m.
muq_ <<
" GeV)\n";
205 out << ptype->
name() <<
" initial multiplicity " <<
p.second <<
'\n';
210 out <<
"Boltzmann momentum distribution with T = "
214 out <<
"Fermi/Bose momentum distribution with T = "
218 out <<
"Sphere Initial Condition is IC_ES";
221 out <<
"Sphere Initial Condition is IC_1M";
224 out <<
"Sphere Initial Condition is IC_2M";
227 out <<
"Sphere Initial Condition is IC_Massive";
232 out <<
"Adding a " << ptype->
name() <<
" as a jet in the middle "
233 <<
"of the sphere with " << m.
jet_mom_ <<
" GeV initial momentum.\n";
255 double nb_init = 0.0, ns_init = 0.0, nq_init = 0.0;
258 particles->
create(thermal_mult_int, mult.first);
259 nb_init += mult.second * mult.first.baryon_number();
260 ns_init += mult.second * mult.first.strangeness();
261 nq_init += mult.second * mult.first.charge();
262 logg[
LSphere].debug(mult.first,
" initial multiplicity ",
265 logg[
LSphere].info(
"Initial hadron gas baryon density ", nb_init);
266 logg[
LSphere].info(
"Initial hadron gas strange density ", ns_init);
267 logg[
LSphere].info(
"Initial hadron gas charge density ", nq_init);
271 logg[
LSphere].debug(
"Particle ",
p.first,
" initial multiplicity ",
275 std::unique_ptr<QuantumSampling> quantum_sampling;
277 quantum_sampling = make_unique<QuantumSampling>(
init_multipl_, V, T);
283 double momentum_radial = 0.0, mass = data.pole_mass();
313 mass = data.type().mass();
314 momentum_radial = quantum_sampling->sample(data.pdgcode());
318 logg[
LSphere].debug(data.type().name(),
"(id ", data.id(),
319 ") radial momentum ", momentum_radial,
", direction",
321 data.set_4momentum(mass, phitheta.
threevec() * momentum_radial);
322 momentum_total += data.momentum();
324 double position_radial;
337 throw std::invalid_argument(
338 "Additional velocity cannot be greater than 1!");
341 double particle_radius = std::sqrt(data.position().sqr3());
342 auto e_r = data.position().threevec() / particle_radius;
344 data.set_4momentum(data.momentum().lorentz_boost(radial_velocity));
345 momentum_total += data.momentum();
351 data.set_4momentum(data.momentum().abs(),
352 data.momentum().threevec() -
368 momentum_total += data.momentum();
373 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.
const double radial_velocity_
Wether to add a constant radial velocity profile to the momenta of the particles in the sphere.
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.