 |
Version: SMASH-2.0
|
|
Go to the documentation of this file.
33 static constexpr
int LSphere = LogArea::Sphere::id;
166 : radius_(modus_config.take({
"Sphere",
"Radius"})),
167 sphere_temperature_(modus_config.take({
"Sphere",
"Temperature"})),
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.)),
173 account_for_resonance_widths_(
174 modus_config.take({
"Sphere",
"Account_Resonance_Widths"},
true)),
175 init_multipl_(use_thermal_
176 ? std::map<PdgCode, int>()
177 : modus_config.take({
"Sphere",
"Init_Multiplicities"})
178 .convert_for(init_multipl_)),
180 modus_config.take({
"Sphere",
"Initial_Condition"},
182 insert_jet_(modus_config.has_value({
"Sphere",
"Jet",
"Jet_PDG"})),
183 jet_pdg_(insert_jet_ ? modus_config.take({
"Sphere",
"Jet",
"Jet_PDG"})
184 .convert_for(jet_pdg_)
186 jet_mom_(modus_config.take({
"Sphere",
"Jet",
"Jet_Momentum"}, 20.)) {}
190 out <<
"-- Sphere Modus:\nRadius of the sphere: " << m.
radius_ <<
" fm\n";
193 <<
" GeV, muB = " << m.
mub_ <<
" GeV, muS = " << m.
mus_ <<
" GeV)\n";
197 out << ptype->
name() <<
" initial multiplicity " <<
p.second <<
'\n';
202 out <<
"Boltzmann momentum distribution with T = "
206 out <<
"Fermi/Bose momentum distribution with T = "
210 out <<
"Sphere Initial Condition is IC_ES";
213 out <<
"Sphere Initial Condition is IC_1M";
216 out <<
"Sphere Initial Condition is IC_2M";
219 out <<
"Sphere Initial Condition is IC_Massive";
224 out <<
"Adding a " << ptype->
name() <<
" as a jet in the middle "
225 <<
"of the sphere with " << m.
jet_mom_ <<
" GeV initial momentum.\n";
247 double nb_init = 0.0, ns_init = 0.0;
250 particles->
create(thermal_mult_int, mult.first);
251 nb_init += mult.second * mult.first.baryon_number();
252 ns_init += mult.second * mult.first.strangeness();
253 logg[
LSphere].debug(mult.first,
" initial multiplicity ",
256 logg[
LSphere].info(
"Initial hadron gas baryon density ", nb_init);
257 logg[
LSphere].info(
"Initial hadron gas strange density ", ns_init);
261 logg[
LSphere].debug(
"Particle ",
p.first,
" initial multiplicity ",
265 std::unique_ptr<QuantumSampling> quantum_sampling;
267 quantum_sampling = make_unique<QuantumSampling>(
init_multipl_, V, T);
273 double momentum_radial = 0.0, mass = data.pole_mass();
303 mass = data.type().mass();
304 momentum_radial = quantum_sampling->sample(data.pdgcode());
308 logg[
LSphere].debug(data.type().name(),
"(id ", data.id(),
309 ") radial momentum ", momentum_radial,
", direction",
311 data.set_4momentum(mass, phitheta.
threevec() * momentum_radial);
312 momentum_total += data.momentum();
314 double position_radial;
324 data.set_4momentum(data.momentum().abs(),
325 data.momentum().threevec() -
326 momentum_total.
threevec() / particles->size());
331 auto &jet_particle = particles->create(
jet_pdg_);
341 momentum_total += data.momentum();
346 logg[
LSphere].debug() <<
"Sphere initial total 4-momentum [GeV]: "
const double mus_
Strange chemical potential for thermal initialization; only used if use_thermal_ is true.
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 initial_conditions(Particles *particles, const ExperimentParameters ¶meters)
Generates initial state of the particles in the system according to specified parameters: number of p...
const std::map< PdgCode, int > init_multipl_
Particle multiplicities at initialization; required if use_thermal_ is false.
const bool insert_jet_
Whether to insert a single high energy particle at the center of the expanding sphere (0,...
const bool account_for_resonance_widths_
In case of thermal initialization: true – account for resonance spectral functions,...
double radius_
Sphere radius (in fm/c)
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
void distribute_isotropically()
Populate the object with a new direction.
double sample_momenta_non_eq_mass(const double temperature, const double mass)
Samples a momentum via rejection method from the non-equilibrium distribution.
const double start_time_
Starting time for the Sphere.
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.
const SphereInitialCondition init_distr_
Initialization scheme for momenta in the sphere; used for expanding metric setup.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
Interface to the SMASH configuration files.
void create(size_t n, PdgCode pdg)
Add n particles of the same type (pdg) to the list.
static double sample_mass_thermal(const ParticleType &ptype, double beta)
Sample resonance mass in a thermal medium.
const double mub_
Baryon chemical potential for thermal initialization; only used if use_thermal_ is true.
const std::string & name() const
double sphere_temperature_
Temperature for momentum distribution (in GeV)
double sample_momenta_2M_IC(const double temperature, const double mass)
Samples a momentum from the non-equilibrium distribution 2M_IC from Bazow:2016oky .
static constexpr int LSphere
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.
ThreeVector threevec() const
double sample_momenta_IC_ES(const double temperature)
Sample momenta according to the momentum distribution in Bazow:2016oky .
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.
const double jet_mom_
Initial momentum of the jet particle; only used if insert_jet_ is true.
SphereModus(Configuration modus_config, const ExperimentParameters ¶meters)
Constructor.
Helper structure for Experiment.
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
double sample_momenta_from_thermal(const double temperature, const double mass)
Samples a momentum from the Maxwell-Boltzmann (thermal) distribution in a faster way,...
int testparticles
Number of test particle.
const bool use_thermal_
Whether to use a thermal initialization for all particles instead of specific numbers.
ThreeVector threevec() const
static const ParticleTypeList & list_all()