Version: SMASH-3.3
experiment.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2013-2025
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #include "smash/experiment.h"
11 
12 #include <cstdint>
13 
14 #include "smash/boxmodus.h"
15 #include "smash/collidermodus.h"
16 #include "smash/listmodus.h"
17 #include "smash/spheremodus.h"
18 
19 namespace smash {
20 
21 /* ExperimentBase carries everything that is needed for the evolution */
22 ExperimentPtr ExperimentBase::create(Configuration &config,
23  const std::filesystem::path &output_path) {
24  if (!std::filesystem::exists(output_path)) {
25  throw NonExistingOutputPathRequest("The requested output path (" +
26  output_path.string() +
27  ") does not exist.");
28  }
30 
31  const std::string modus_chooser = config.read(InputKeys::gen_modus);
32  logg[LExperiment].debug() << "Modus for this calculation: " << modus_chooser;
33 
34  if (modus_chooser == "Box") {
35  return std::make_unique<Experiment<BoxModus>>(config, output_path);
36  } else if (modus_chooser == "List") {
37  return std::make_unique<Experiment<ListModus>>(config, output_path);
38  } else if (modus_chooser == "ListBox") {
39  return std::make_unique<Experiment<ListBoxModus>>(config, output_path);
40  } else if (modus_chooser == "Collider") {
41  return std::make_unique<Experiment<ColliderModus>>(config, output_path);
42  } else if (modus_chooser == "Sphere") {
43  return std::make_unique<Experiment<SphereModus>>(config, output_path);
44  } else {
45  throw InvalidModusRequest("Invalid Modus (" + modus_chooser +
46  ") requested from ExperimentBase::create.");
47  }
48 }
49 
139 
140  const int ntest = config.take(InputKeys::gen_testparticles);
141  if (ntest <= 0) {
142  throw std::invalid_argument("Testparticle number should be positive!");
143  }
144 
145  // sets whether to consider only participants in thermodynamic outputs or not
146  const bool only_participants =
148 
149  if (only_participants && config.has_section(InputSections::potentials)) {
150  throw std::invalid_argument(
151  "Only_Participants option cannot be "
152  "set to True when using Potentials.");
153  }
154 
155  const std::string modus_chooser = config.take(InputKeys::gen_modus);
156  // remove config maps of unused Modi
157  config.remove_all_entries_in_section_but_one(modus_chooser, {"Modi"});
158 
159  double box_length = -1.0;
161  box_length = config.read(InputKeys::modi_box_length);
162  }
164  box_length = config.read(InputKeys::modi_listBox_length);
165  }
166 
167  /* If this Delta_Time option is absent (this can be for timestepless mode)
168  * just assign 1.0 fm, reasonable value will be set at event initialization
169  */
170  const double dt = config.take(InputKeys::gen_deltaTime);
171  if (dt <= 0.) {
172  throw std::invalid_argument("Delta_Time cannot be zero or negative.");
173  }
174 
175  const double t_end = config.read(InputKeys::gen_endTime);
176  if (t_end <= 0.) {
177  throw std::invalid_argument("End_Time cannot be zero or negative.");
178  }
179 
180  // Enforce a small time step, if the box modus is used
181  if (box_length > 0.0 && dt > box_length / 10.0) {
182  throw std::invalid_argument(
183  "Please decrease the timestep size. "
184  "A value of (dt <= l_box / 10) is necessary in the box modus.");
185  }
186 
187  // define output clock
188  std::unique_ptr<Clock> output_clock = nullptr;
191  throw std::invalid_argument(
192  "Please specify either Output_Interval or Output_Times");
193  }
194  std::vector<double> output_times =
196  // Add an output time larger than the end time so that the next time is
197  // always defined during the time evolution
198  output_times.push_back(t_end + 1.);
199  output_clock = std::make_unique<CustomClock>(output_times);
200  } else {
201  const double output_dt =
202  config.take(InputKeys::output_outputInterval, t_end);
203  if (output_dt <= 0.) {
204  throw std::invalid_argument(
205  "Output_Interval cannot be zero or negative.");
206  }
207  output_clock = std::make_unique<UniformClock>(0.0, output_dt, t_end);
208  }
209 
210  // Add proper error messages if photons are not configured properly.
211  // 1) Missing Photon config section.
214  throw std::invalid_argument(
215  "Photon output is enabled although photon production is disabled. "
216  "Photon production can be configured in the \"Photon\" subsection "
217  "of the \"Collision_Term\".");
218  }
219 
220  // 2) Missing Photon output section.
221  if (!(config.has_section(InputSections::o_photons))) {
222  const bool missing_output_2to2 =
224  missing_output_brems =
226  if (missing_output_2to2 || missing_output_brems) {
227  throw std::invalid_argument(
228  "Photon output is disabled although photon production is enabled. "
229  "Please enable the photon output.");
230  }
231  }
232 
233  // Add proper error messages if dileptons are not configured properly.
234  // 1) Missing Dilepton config section.
237  throw std::invalid_argument(
238  "Dilepton output is enabled although dilepton production is disabled. "
239  "Dilepton production can be configured in the \"Dileptons\" subsection "
240  "of the \"Collision_Term\".");
241  }
242 
243  // 2) Missing Dilepton output section.
244  if (!(config.has_section(InputSections::o_dileptons))) {
245  const bool missing_output_decays =
247  if (missing_output_decays) {
248  throw std::invalid_argument(
249  "Dilepton output is disabled although dilepton production is "
250  "enabled. "
251  "Please enable the dilepton output.");
252  }
253  }
254  /* Elastic collisions between the nucleons with the square root s
255  * below low_snn_cut are excluded. */
256  const double low_snn_cut =
258  const auto proton = ParticleType::try_find(pdg::p);
259  const auto pion = ParticleType::try_find(pdg::pi_z);
260  if (proton && pion &&
261  low_snn_cut > proton->mass() + proton->mass() + pion->mass()) {
262  logg[LExperiment].warn("The cut-off should be below the threshold energy",
263  " of the process: NN to NNpi");
264  }
265  const bool potential_affect_threshold =
267  const double scale_xs = config.take(InputKeys::collTerm_crossSectionScaling);
268 
269  const auto criterion = config.take(InputKeys::collTerm_collisionCriterion);
270 
272  criterion != CollisionCriterion::Stochastic) {
273  throw std::invalid_argument(
274  "Only use a fixed minimal cell length with the stochastic collision "
275  "criterion.");
276  }
278  criterion == CollisionCriterion::Stochastic) {
279  throw std::invalid_argument(
280  "Only use maximum cross section with the geometric collision "
281  "criterion. Use Fixed_Min_Cell_Length to change the grid size for the "
282  "stochastic criterion.");
283  }
284 
293  const double maximum_cross_section_default =
294  ParticleType::exists("d'") ? 2000.0 : 200.0;
295 
296  double maximum_cross_section = config.take(
297  InputKeys::collTerm_maximumCrossSection, maximum_cross_section_default);
298  maximum_cross_section *= scale_xs;
299  return {std::make_unique<UniformClock>(0.0, dt, t_end),
300  std::move(output_clock),
302  ntest,
313  criterion,
317  config.take(InputKeys::collTerm_strings, modus_chooser != "Box"),
320  low_snn_cut,
321  potential_affect_threshold,
322  box_length,
323  maximum_cross_section,
325  scale_xs,
326  only_participants,
330  std::nullopt};
331 }
332 
333 std::string format_measurements(const std::vector<Particles> &ensembles,
334  uint64_t scatterings_this_interval,
335  const QuantumNumbers &conserved_initial,
336  SystemTimePoint time_start, double time,
337  double E_mean_field,
338  double E_mean_field_initial) {
339  const SystemTimeSpan elapsed_seconds = SystemClock::now() - time_start;
340 
341  const QuantumNumbers current_values(ensembles);
342  const QuantumNumbers difference = current_values - conserved_initial;
343  int total_particles = 0;
344  for (const Particles &particles : ensembles) {
345  total_particles += particles.size();
346  }
347 
348  // Make sure there are no FPEs in case of IC output, were there will
349  // eventually be no more particles in the system
350  const double current_energy = current_values.momentum().x0();
351  const double energy_per_part =
352  (total_particles > 0) ? (current_energy + E_mean_field) / total_particles
353  : 0.0;
354 
355  std::ostringstream ss;
356  // clang-format off
357  ss << field<7, 3> << time
358  // total kinetic energy in the system
359  << field<11, 3> << current_energy
360  // total mean field energy in the system
361  << field<11, 3> << E_mean_field
362  // total energy in the system
363  << field<12, 3> << current_energy + E_mean_field
364  // total energy per particle in the system
365  << field<12, 6> << energy_per_part;
366  // change in total energy per particle (unless IC output is enabled)
367  if (total_particles == 0) {
368  ss << field<13, 6> << "N/A";
369  } else {
370  ss << field<13, 6> << (difference.momentum().x0()
371  + E_mean_field - E_mean_field_initial)
372  / total_particles;
373  }
374  ss << field<14, 3> << scatterings_this_interval
375  << field<10, 3> << total_particles
376  << field<9, 3> << elapsed_seconds;
377  // clang-format on
378  return ss.str();
379 }
380 
382  const Potentials &potentials,
384  RectangularLattice<std::pair<ThreeVector, ThreeVector>> *em_lattice,
385  const ExperimentParameters &parameters) {
386  // basic parameters and variables
387  const double V_cell = (jmuB_lat.cell_sizes())[0] *
388  (jmuB_lat.cell_sizes())[1] * (jmuB_lat.cell_sizes())[2];
389 
390  double E_mean_field = 0.0;
391  double density_mean = 0.0;
392  double density_variance = 0.0;
393 
394  /*
395  * We anticipate having other options, like the vector DFT potentials, in the
396  * future, hence we include checking which potentials are used.
397  */
398  if (potentials.use_skyrme()) {
399  /*
400  * Calculating the symmetry energy contribution to the total mean field
401  * energy in the system is not implemented at this time.
402  */
403  if (potentials.use_symmetry() &&
404  parameters.outputclock->current_time() == 0.0) {
405  logg[LExperiment].warn()
406  << "Note:"
407  << "\nSymmetry energy is not included in the mean field calculation."
408  << "\n\n";
409  }
410 
411  /*
412  * Skyrme potential parameters:
413  * C1GeV are the Skyrme coefficients converted to GeV,
414  * b1 are the powers of the baryon number density entering the expression
415  * for the energy density of the system. Note that these exponents are
416  * larger by 1 than those for the energy of a particle (which are used in
417  * Potentials class). The formula for a total mean field energy due to a
418  * Skyrme potential is E_MF = \sum_i (C_i/b_i) ( n_B^b_i )/( n_0^(b_i - 1) )
419  * where nB is the local rest frame baryon number density and n_0 is the
420  * saturation density. Then the single particle potential follows from
421  * V = d E_MF / d n_B .
422  */
423  double C1GeV = (potentials.skyrme_a()) / 1000.0;
424  double C2GeV = (potentials.skyrme_b()) / 1000.0;
425  double b1 = 2.0;
426  double b2 = (potentials.skyrme_tau()) + 1.0;
427 
428  /*
429  * Note: calculating the mean field only works if lattice is used.
430  * We iterate over the nodes of the baryon density lattice to sum their
431  * contributions to the total mean field.
432  */
433  int number_of_nodes = 0;
434  double lattice_mean_field_total = 0.0;
435 
436  for (auto &node : jmuB_lat) {
437  number_of_nodes++;
438  // the rest frame density
439  double rhoB = node.rho();
440  // the computational frame density
441  const double j0B = node.jmu_net().x0();
442 
443  const double abs_rhoB = std::abs(rhoB);
444  if (abs_rhoB < very_small_double) {
445  continue;
446  }
447  density_mean += j0B;
448  density_variance += j0B * j0B;
449 
450  /*
451  * The mean-field energy for the Skyrme potential. Note: this expression
452  * is only exact in the rest frame, and is expected to significantly
453  * deviate from the correct value for systems that are considerably
454  * relativistic. Note: symmetry energy is not taken into the account.
455  *
456  * TODO: Add symmetry energy.
457  */
458  double mean_field_contribution_1 = (C1GeV / b1) * std::pow(abs_rhoB, b1) /
459  std::pow(nuclear_density, b1 - 1);
460  double mean_field_contribution_2 = (C2GeV / b2) * std::pow(abs_rhoB, b2) /
461  std::pow(nuclear_density, b2 - 1);
462 
463  lattice_mean_field_total +=
464  V_cell * (mean_field_contribution_1 + mean_field_contribution_2);
465  }
466 
467  // logging statistical properties of the density calculation
468  density_mean = density_mean / number_of_nodes;
469  density_variance = density_variance / number_of_nodes;
470  double density_scaled_variance =
471  std::sqrt(density_variance - density_mean * density_mean) /
472  density_mean;
473  logg[LExperiment].debug() << "\t\t\t\t\t";
474  logg[LExperiment].debug()
475  << "\n\t\t\t\t\t density mean = " << density_mean;
476  logg[LExperiment].debug()
477  << "\n\t\t\t\t\t density scaled variance = " << density_scaled_variance;
478  logg[LExperiment].debug()
479  << "\n\t\t\t\t\t total mean_field = "
480  << lattice_mean_field_total * parameters.testparticles *
481  parameters.n_ensembles
482  << "\n";
483 
484  E_mean_field = lattice_mean_field_total;
485  } // if (potentials.use_skyrme())
486 
487  if (potentials.use_vdf()) {
488  /*
489  * Safety check:
490  * Calculating the symmetry energy contribution to the total mean field
491  * energy in the system is not implemented at this time.
492  */
493  if (potentials.use_symmetry() &&
494  parameters.outputclock->current_time() == 0.0) {
495  logg[LExperiment].error()
496  << "\nSymmetry energy is not included in the VDF mean-field "
497  "calculation"
498  << "\nas VDF potentials haven't been fitted with symmetry energy."
499  << "\n\n";
500  }
501 
502  /*
503  * The total mean-field energy density due to a VDF potential is
504  * E_MF = \sum_i C_i rho^(b_i - 2) *
505  * * [j_0^2 - rho^2 * (b_i - 1)/b_i] / rho_0^(b_i - 1)
506  * where j_0 is the local computational frame baryon density, rho is the
507  * local rest frame baryon density, and rho_0 is the saturation density.
508  */
509 
510  // saturation density of nuclear matter specified in the VDF parameters
511  double rhoB_0 = potentials.saturation_density();
512 
513  /*
514  * Note: calculating the mean field only works if lattice is used.
515  * We iterate over the nodes of the baryon density lattice to sum their
516  * contributions to the total mean field.
517  */
518  int number_of_nodes = 0;
519  double lattice_mean_field_total = 0.0;
520 
521  for (auto &node : jmuB_lat) {
522  number_of_nodes++;
523  // the rest frame density
524  double rhoB = node.rho();
525  // the computational frame density
526  const double j0B = node.jmu_net().x0();
527  double abs_rhoB = std::abs(rhoB);
528  density_mean += j0B;
529  density_variance += j0B * j0B;
530 
531  /*
532  * The mean-field energy for the VDF potential. This expression is correct
533  * in any frame, and in the rest frame conforms to the Skyrme mean-field
534  * energy (if same coefficients and powers are used).
535  */
536  // in order to prevent dividing by zero in case any b_i < 2.0
537  if (abs_rhoB < very_small_double) {
538  abs_rhoB = very_small_double;
539  }
540  double mean_field_contribution = 0.0;
541  for (int i = 0; i < potentials.number_of_terms(); i++) {
542  mean_field_contribution +=
543  potentials.coeffs()[i] *
544  std::pow(abs_rhoB, potentials.powers()[i] - 2.0) *
545  (j0B * j0B -
546  ((potentials.powers()[i] - 1.0) / potentials.powers()[i]) *
547  abs_rhoB * abs_rhoB) /
548  std::pow(rhoB_0, potentials.powers()[i] - 1.0);
549  }
550  lattice_mean_field_total += V_cell * mean_field_contribution;
551  }
552 
553  // logging statistical properties of the density calculation
554  density_mean = density_mean / number_of_nodes;
555  density_variance = density_variance / number_of_nodes;
556  double density_scaled_variance =
557  std::sqrt(density_variance - density_mean * density_mean) /
558  density_mean;
559  logg[LExperiment].debug() << "\t\t\t\t\t";
560  logg[LExperiment].debug()
561  << "\n\t\t\t\t\t density mean = " << density_mean;
562  logg[LExperiment].debug()
563  << "\n\t\t\t\t\t density scaled variance = " << density_scaled_variance;
564  logg[LExperiment].debug()
565  << "\n\t\t\t\t\t total mean_field = "
566  << lattice_mean_field_total * parameters.testparticles *
567  parameters.n_ensembles
568  << "\n";
569 
570  E_mean_field = lattice_mean_field_total;
571  }
572 
573  double electromagnetic_potential = 0.0;
574  if (potentials.use_coulomb() && em_lattice) {
575  // Use cell volume of electromagnetic fields lattice even though it should
576  // be the same as for net-baryon density
577  double V_cell_em = em_lattice->cell_sizes()[0] *
578  em_lattice->cell_sizes()[1] *
579  em_lattice->cell_sizes()[2];
580  for (auto &fields : *em_lattice) {
581  // Energy is 0.5 * int E^2 + B^2 dV
582  electromagnetic_potential +=
583  hbarc * 0.5 * V_cell_em * (fields.first.sqr() + fields.second.sqr());
584  }
585  }
586  logg[LExperiment].debug() << "Total energy in electromagnetic field = "
587  << electromagnetic_potential;
588  E_mean_field += electromagnetic_potential;
589  /*
590  * E_mean_field is multiplied by the number of testparticles per particle and
591  * the number of parallel ensembles because the total kinetic energy tracked
592  * is that of all particles in the simulation, including test-particles and/or
593  * ensembles, and so this way is more consistent.
594  */
595  E_mean_field =
596  E_mean_field * parameters.testparticles * parameters.n_ensembles;
597 
598  return E_mean_field;
599 }
600 
601 EventInfo fill_event_info(const std::vector<Particles> &ensembles,
602  double E_mean_field, double modus_impact_parameter,
603  const ExperimentParameters &parameters,
604  bool projectile_target_interact,
605  bool kinematic_cut_for_SMASH_IC) {
606  const QuantumNumbers current_values(ensembles);
607  const double E_kinetic_total = current_values.momentum().x0();
608  const double E_total = E_kinetic_total + E_mean_field;
609 
610  EventInfo event_info{modus_impact_parameter,
611  parameters.box_length,
612  parameters.outputclock->current_time(),
613  E_kinetic_total,
614  E_mean_field,
615  E_total,
616  parameters.testparticles,
617  parameters.n_ensembles,
618  !projectile_target_interact,
619  kinematic_cut_for_SMASH_IC};
620  return event_info;
621 }
622 
623 void validate_and_adjust_particle_list(ParticleList &particle_list) {
624  static bool warn_mass_discrepancy = true;
625  static bool warn_off_shell_particle = true;
626  for (auto it = particle_list.begin(); it != particle_list.end();) {
627  auto &particle = *it;
628  auto pdgcode = particle.pdgcode();
629  try {
630  // Convert Kaon-L or Kaon-S into K0 or Anti-K0 used in SMASH
631  if (pdgcode == 0x310 || pdgcode == 0x130) {
632  pdgcode = (random::uniform_int(0, 1) == 0) ? pdg::K_z : pdg::Kbar_z;
633  }
634  /* ATTENTION: It would be wrong to directly assign here the return value
635  * to 'particle', because this would potentially also change its id and
636  * process number, which in turn, might lead to actions to be discarded.
637  * Here, only the particle momentum has to be adjusted and this is done
638  * creating a new particle and using its momentum to set 'particle' one.
639  * The position and momentum of the particle are checked for nan values.
640  */
641  auto valid_smash_particle =
643  pdgcode, particle.effective_mass(), particle.position(),
644  particle.momentum(), LExperiment, warn_mass_discrepancy,
645  warn_off_shell_particle);
646  particle.set_4position(valid_smash_particle.position());
647  particle.set_4momentum(valid_smash_particle.momentum());
648  particle.set_cross_section_scaling_factor(
649  valid_smash_particle.xsec_scaling_factor());
650  it++;
652  logg[LExperiment].warn()
653  << "SMASH does not recognize pdg code " << pdgcode
654  << " obtained from hadron list. This particle will be ignored.\n";
655  it = particle_list.erase(it);
656  }
657  }
658 }
659 
660 } // namespace smash
Interface to the SMASH configuration files.
T read(const Key< T > &key) const
Additional interface for SMASH to read configuration values without removing them.
bool has_value(const Key< T > &key) const
Return whether there is a non-empty value behind the requested key (which is supposed not to refer to...
bool has_section(const KeyLabels &labels) const
Return whether there is a (possibly empty) section with the given labels.
T take(const Key< T > &key)
The default interface for SMASH to read configuration values.
void remove_all_entries_in_section_but_one(const std::string &key, KeyLabels section={})
Remove all entries in the given section except for key.
static std::unique_ptr< ExperimentBase > create(Configuration &config, const std::filesystem::path &output_path)
Factory method that creates and initializes a new Experiment<Modus>.
Definition: experiment.cc:22
double x0() const
Definition: fourvector.h:313
static const ParticleTypePtr try_find(PdgCode pdgcode)
Returns the ParticleTypePtr for the given pdgcode.
Definition: particletype.cc:89
static bool exists(PdgCode pdgcode)
The Particles class abstracts the storage and manipulation of particles.
Definition: particles.h:33
A class that stores parameters of potentials, calculates potentials and their gradients.
Definition: potentials.h:36
const std::vector< double > & powers() const
Definition: potentials.h:504
virtual bool use_symmetry() const
Definition: potentials.h:480
const std::vector< double > & coeffs() const
Definition: potentials.h:502
virtual bool use_skyrme() const
Definition: potentials.h:478
virtual bool use_coulomb() const
Definition: potentials.h:482
double skyrme_a() const
Definition: potentials.h:489
double skyrme_tau() const
Definition: potentials.h:493
int number_of_terms() const
Definition: potentials.h:506
double skyrme_b() const
Definition: potentials.h:491
virtual bool use_vdf() const
Definition: potentials.h:498
double saturation_density() const
Definition: potentials.h:500
A container for storing conserved values.
FourVector momentum() const
A container class to hold all the arrays on the lattice and access them.
Definition: lattice.h:49
const std::array< double, 3 > & cell_sizes() const
Definition: lattice.h:162
@ Stochastic
Stochastic Criteiron.
#define SMASH_SOURCE_LOCATION
Hackery that is required to output the location in the source code where the log statement occurs.
Definition: logging.h:153
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:40
constexpr int K_z
K⁰.
constexpr int p
Proton.
constexpr int pi_z
π⁰.
constexpr int Kbar_z
K̄⁰.
T uniform_int(T min, T max)
Definition: random.h:100
Definition: action.h:24
EventInfo fill_event_info(const std::vector< Particles > &ensembles, double E_mean_field, double modus_impact_parameter, const ExperimentParameters &parameters, bool projectile_target_interact, bool kinematic_cut_for_SMASH_IC)
Generate the EventInfo object which is passed to outputs_.
Definition: experiment.cc:601
SystemClock::duration SystemTimeSpan
The time duration type (alias) used for measuring run times.
Definition: chrono.h:28
std::string format_measurements(const std::vector< Particles > &ensembles, uint64_t scatterings_this_interval, const QuantumNumbers &conserved_initial, SystemTimePoint time_start, double time, double E_mean_field, double E_mean_field_initial)
Generate a string which will be printed to the screen when SMASH is running.
Definition: experiment.cc:333
ExperimentParameters create_experiment_parameters(Configuration &config)
Gathers all general Experiment parameters.
Definition: experiment.cc:137
constexpr double very_small_double
A very small double, used to avoid division by zero.
Definition: constants.h:44
double calculate_mean_field_energy(const Potentials &potentials, RectangularLattice< smash::DensityOnLattice > &jmu_B_lat, RectangularLattice< std::pair< ThreeVector, ThreeVector >> *em_lattice, const ExperimentParameters &parameters)
Calculate the total mean field energy of the system; this will be printed to the screen when SMASH is...
Definition: experiment.cc:381
static constexpr int LExperiment
void validate_and_adjust_particle_list(ParticleList &particle_list)
Validate a particle list adjusting each particle to be a valid SMASH particle.
Definition: experiment.cc:623
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3].
Definition: constants.h:52
ParticleData create_valid_smash_particle_matching_provided_quantities(PdgCode pdgcode, double mass, const FourVector &four_position, const FourVector &four_momentum, int log_area, bool &mass_warning, bool &on_shell_warning)
This function creates a SMASH particle validating the provided information.
constexpr double hbarc
GeV <-> fm conversion factor.
Definition: constants.h:29
std::chrono::time_point< std::chrono::system_clock > SystemTimePoint
Type (alias) that is used to store the current time.
Definition: chrono.h:22
Structure to contain custom data for output.
Exception class that is thrown if an invalid modus is requested from the Experiment factory.
Definition: experiment.h:148
Exception class that is thrown if the requested output path in the Experiment factory is not existing...
Definition: experiment.h:157
Helper structure for Experiment.
double box_length
Length of the box in fm in case of box modus, otherwise -1.
int n_ensembles
Number of parallel ensembles.
std::unique_ptr< Clock > outputclock
Output clock to keep track of the next output time.
int testparticles
Number of test-particles.
static const Key< bool > collTerm_photons_twoToTwoScatterings
See user guide description for more information.
Definition: input_keys.h:3141
static const Key< double > modi_listBox_length
See user guide description for more information.
Definition: input_keys.h:4850
static const Key< double > collTerm_resonanceLifetimeModifier
See user guide description for more information.
Definition: input_keys.h:2534
static const Key< ReactionsBitSet > collTerm_includedTwoToTwo
See user guide description for more information.
Definition: input_keys.h:2284
static const Key< double > collTerm_crossSectionScaling
See user guide description for more information.
Definition: input_keys.h:2173
static const Key< double > modi_box_length
See user guide description for more information.
Definition: input_keys.h:4511
static const Key< bool > collTerm_decayInitial
See user guide description for more information.
Definition: input_keys.h:2248
static const Key< std::string > gen_modus
See user guide description for more information.
Definition: input_keys.h:1168
static const Key< double > gen_smearingTriangularRange
See user guide description for more information.
Definition: input_keys.h:1569
static const Key< double > output_outputInterval
See user guide description for more information.
Definition: input_keys.h:4916
static const Key< double > gen_smearingGaussianSigma
See user guide description for more information.
Definition: input_keys.h:1398
static const Key< bool > collTerm_dileptons_decays
See user guide description for more information.
Definition: input_keys.h:3129
static const Key< bool > collTerm_strings
See user guide description for more information.
Definition: input_keys.h:2565
static const Key< DerivativesMode > gen_derivativesMode
See user guide description for more information.
Definition: input_keys.h:1276
static const Key< double > gen_endTime
See user guide description for more information.
Definition: input_keys.h:1142
static const Key< bool > collTerm_photons_bremsstrahlung
See user guide description for more information.
Definition: input_keys.h:3153
static const Key< double > gen_smearingGaussCutoffInSigma
See user guide description for more information.
Definition: input_keys.h:1385
static const Key< double > gen_smearingDiscreteWeight
See user guide description for more information.
Definition: input_keys.h:1293
static const Key< double > collTerm_elasticNNCutoffSqrts
See user guide description for more information.
Definition: input_keys.h:2206
static const Key< int > gen_ensembles
See user guide description for more information.
Definition: input_keys.h:1323
static const Key< double > collTerm_fixedMinCellLength
See user guide description for more information.
Definition: input_keys.h:2221
static const Key< MultiParticleReactionsBitSet > collTerm_multiParticleReactions
See user guide description for more information.
Definition: input_keys.h:2416
static const Key< double > collTerm_maximumCrossSection
See user guide description for more information.
Definition: input_keys.h:2368
static const Key< SpinInteractionType > collTerm_spinInteractions
See user guide description for more information.
Definition: input_keys.h:2549
static const Key< CollisionCriterion > collTerm_collisionCriterion
See user guide description for more information.
Definition: input_keys.h:2156
static const Key< SmearingMode > gen_smearingMode
See user guide description for more information.
Definition: input_keys.h:1500
static const Key< bool > output_thermodynamics_onlyParticipants
See user guide description for more information.
Definition: input_keys.h:5543
static const Key< FieldDerivativesMode > gen_fieldDerivativesMode
See user guide description for more information.
Definition: input_keys.h:1370
static const Key< bool > collTerm_ignoreDecayWidthAtTheEnd
See user guide description for more information.
Definition: input_keys.h:2325
static const Key< NNbarTreatment > collTerm_nnbarTreatment
See user guide description for more information.
Definition: input_keys.h:2441
static const Key< double > gen_deltaTime
See user guide description for more information.
Definition: input_keys.h:1253
static const Key< std::vector< double > > output_outputTimes
See user guide description for more information.
Definition: input_keys.h:4940
static const Key< bool > lattice_potentialsAffectThreshold
See user guide description for more information.
Definition: input_keys.h:5733
static const Key< bool > collTerm_twoToOne
See user guide description for more information.
Definition: input_keys.h:2643
static const Key< int > gen_testparticles
See user guide description for more information.
Definition: input_keys.h:1532
static const Section potentials
Section for the potentials information.
Definition: input_keys.h:164
static const Section c_photons
Subsection for the photons.
Definition: input_keys.h:61
static const Section c_dileptons
Subsection for the dileptons.
Definition: input_keys.h:55
static const Section p_vdf
Subsection for the VDF potentials information.
Definition: input_keys.h:176
static const Section o_dileptons
Subsection for the output dileptons content.
Definition: input_keys.h:147
static const Section o_photons
Subsection for the output photons content.
Definition: input_keys.h:154