Version: SMASH-2.1
smash Namespace Reference

Namespaces

 anonymous_namespace{configuration.cc}
 
 anonymous_namespace{decaymodes.cc}
 
 anonymous_namespace{oscaroutput.cc}
 
 anonymous_namespace{particletype.cc}
 
 anonymous_namespace{smash.cc}
 
 decaytree
 
 LogArea
 The namespace where log areas are declared.
 
 lowess
 
 pdg
 Constants representing PDG codes.
 
 random
 Namespace random provides functions for random Number Generation.
 
 sha256
 
 Test
 
 transit_high_energy
 constants related to transition between low and high collision energies
 
 utf8
 

Classes

class  Action
 Action is the base class for a generic process that takes a number of incoming particles and transforms them into any number of outgoing particles. More...
 
class  ActionFinderInterface
 ActionFinderInterface is the abstract base class for all action finders, i.e. More...
 
class  Actions
 The Actions class abstracts the storage and manipulation of actions. More...
 
class  Angles
 Angles provides a common interface for generating directions: i.e., two angles that should be interpreted as azimuthal and polar angles. More...
 
class  Average
 Calculate an average value incrementally. More...
 
class  BinaryOutputBase
 Base class for SMASH binary output. More...
 
class  BinaryOutputCollisions
 Saves SMASH collision history to binary file. More...
 
class  BinaryOutputParticles
 Writes the particle list at specific times to the binary file. More...
 
class  BinaryOutputInitialConditions
 Writes the particles when crossing the hypersurface to the binary file. More...
 
class  BoxModus
 BoxModus: Provides a modus for infinite matter calculations. More...
 
class  BremsstrahlungAction
 BremsAction is a special action which takes two incoming particles and performs a perturbative scattering where a Bremsstrahlung photon is produced. More...
 
class  ChemicalPotentialSolver
 A class which encapsulates a GSL algorithm for finding the effective chemical potential and supporting functions. More...
 
class  I_tot_range
 Range of total isospin for reaction of particle a with particle b. More...
 
class  Clock
 Clock tracks the time in the simulation. More...
 
class  UniformClock
 Clock with uniformly spaced time steps. More...
 
class  CustomClock
 Clock with explicitly defined time steps. More...
 
class  ColliderModus
 ColliderModus: Provides a modus for colliding nuclei. More...
 
class  Configuration
 Interface to the SMASH configuration files. More...
 
class  CrossSections
 The cross section class assembels everything that is needed to calculate the cross section and returns a list of all possible reactions for the incoming particles at the given energy with the calculated cross sections. More...
 
class  CrosssectionsPhoton
 
class  CrosssectionsPhoton< ComputationMethod::Analytic >
 Class to calculate the cross-section of a meson-meson to meson-photon process. More...
 
struct  Nucleoncustom
 Contains data for one nucleon that is read in from the list. More...
 
class  CustomNucleus
 Inheriting from Nucleus-Class using modified Nucleon configurations. More...
 
class  DecayAction
 DecayAction is a special action which takes one single particle in the initial state and makes it decay into a number of daughter particles (currently two or three). More...
 
class  DecayActionDilepton
 DecayActionDilepton is special action created for particles that can decay into dileptons. More...
 
class  DecayActionsFinder
 A simple decay finder: Just loops through all particles and checks if they can decay during the next timestep. More...
 
class  DecayActionsFinderDilepton
 A dilepton decay finder: Loops through all particles and if they can decay into dileptons, it treats the decays with the shining method. More...
 
class  DecayModes
 The DecayModes class is used to store and update information about decay branches (i.e. More...
 
class  DecayType
 DecayType is the abstract base class for all decay types. More...
 
class  TwoBodyDecay
 TwoBodyDecay represents a decay type with two final-state particles. More...
 
class  TwoBodyDecayStable
 TwoBodyDecayStable represents a decay type with two stable final-state particles. More...
 
class  TwoBodyDecaySemistable
 TwoBodyDecaySemistable represents a decay type with two final-state particles, one of which is stable and the other is unstable. More...
 
class  TwoBodyDecayUnstable
 TwoBodyDecayUnstable represents a decay type with two unstable final-state particles. More...
 
class  TwoBodyDecayDilepton
 TwoBodyDecayDilepton represents a decay with a lepton and its antilepton as the final-state particles. More...
 
class  ThreeBodyDecay
 ThreeBodyDecay represents a decay type with three final-state particles. More...
 
class  ThreeBodyDecayDilepton
 ThreeBodyDecayDilepton represents a decay type with three final-state particles, two of which are leptons. More...
 
class  DeformedNucleus
 DeformedNucleus: Child of nucleus for deformed nuclei. More...
 
class  DensityParameters
 A class to pre-calculate and store parameters relevant for density calculation. More...
 
class  DensityOnLattice
 A class for time-efficient (time-memory trade-off) calculation of density on the lattice. More...
 
class  EnergyMomentumTensor
 The EnergyMomentumTensor class represents a symmetric positive semi-definite energy-momentum tensor \( T^{\mu \nu}\). More...
 
class  ExperimentBase
 Non-template interface to Experiment<Modus>. More...
 
class  Experiment
 The main class, where the simulation of an experiment is executed. More...
 
struct  ExperimentParameters
 Helper structure for Experiment. More...
 
class  FieldsOnLattice
 A class for calculating the fields A^mu associated with the VDF potentials. More...
 
struct  FileDeleter
 FileDeleter is the deleter class for std::unique_ptr of std::FILE. More...
 
class  RenamingFilePtr
 A RAII type to replace std::FILE *. More...
 
class  FileLock
 Guard to create a file lock. More...
 
class  FourVector
 The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature. More...
 
class  DisableFloatTraps
 Guard type that safely disables floating point traps for the scope in which it is placed. More...
 
class  ThermLatticeNode
 The ThermLatticeNode class is intended to compute thermodynamical quantities in a cell given a set of particles. More...
 
class  GrandCanThermalizer
 The GrandCanThermalizer class implements the following functionality: More...
 
class  GridBase
 Base class for Grid to host common functions that do not depend on the GridOptions parameter. More...
 
class  Grid
 Abstracts a list of cells that partition the particles in the experiment into regions of space that can interact / cannot interact. More...
 
class  EosTable
 A class to hold, compute and access tabulated EoS. More...
 
class  HadronGasEos
 Class to handle the equation of state (EoS) of the hadron gas, consisting of all hadrons included in SMASH. More...
 
class  HepMcInterface
 Base class for output handlers that need the HepMC3 structure. More...
 
class  HepMcOutput
 SMASH output to HepMC file. More...
 
class  HypersurfacecrossingAction
 Hypersurfacecrossingaction is a special action which indicates that a particle has crossed a hypersurface of given proper time. More...
 
class  HyperSurfaceCrossActionsFinder
 Finder for hypersurface crossing actions. More...
 
class  ICOutput
 SMASH output in ASCII format containing initial conditions for hydrodynamic codes. More...
 
struct  Line
 Line consists of a line number and the contents of that line. More...
 
struct  GslWorkspaceDeleter
 A deleter type for std::unique_ptr to be used with gsl_integration_workspace pointers. More...
 
class  Result
 The result type returned from integrations, containing the value and an error. More...
 
class  Integrator
 A C++ interface for numerical integration in one dimension with the GSL CQUAD integration functions. More...
 
struct  Integrand2d
 This is a wrapper for the integrand, so we can pass the limits as well for renormalizing to the unit cube. More...
 
class  Integrator2d
 A C++ interface for numerical integration in two dimensions with the Cuba Cuhre integration function. More...
 
class  InterpolateLinear
 Represent a linear interpolation. More...
 
class  InterpolateDataLinear
 Represent a piecewise linear interpolation. More...
 
class  InterpolateDataSpline
 Represent a cubic spline interpolation. More...
 
class  InterpolateData2DSpline
 Represent a bicubic spline interpolation. More...
 
class  IsoParticleType
 IsoParticleType is a class to represent isospin multiplets. More...
 
class  RectangularLattice
 A container class to hold all the arrays on the lattice and access them. More...
 
class  ListModus
 ListModus: Provides a modus for running SMASH on an external particle list, for example as an afterburner calculation. More...
 
class  ListBoxModus
 ListBox: Provides a modus for running the SMASH Box with an external particle list,. More...
 
struct  FormattingHelper
 
class  ModusDefault
 Base class for Modus classes that provides default function implementations. More...
 
class  Nucleus
 A nucleus is a collection of particles that are initialized, before the beginning of the simulation and all have the same velocity. More...
 
class  OscarOutput
 
struct  EventInfo
 Structure to contain custom data for output. More...
 
class  OutputInterface
 Abstraction of generic output. More...
 
struct  OutputParameters
 Helper structure for Experiment to hold output options and parameters. More...
 
struct  pair_hash
 Hash a pair of integers. More...
 
class  KaonNucleonRatios
 Calculate and store isospin ratios for K N -> K Delta reactions. More...
 
struct  HistoryData
 A structure to hold information about the history of the particle, e.g. More...
 
class  ParticleData
 ParticleData contains the dynamic information of a certain particle. More...
 
struct  PrintParticleListDetailed
 
class  Particles
 The Particles class abstracts the storage and manipulation of particles. More...
 
class  ParticleType
 Particle type contains the static properties of a particle species. More...
 
class  ParticleTypePtr
 A pointer-like interface to global references to ParticleType objects. More...
 
class  PauliBlocker
 A class that stores parameters needed for Pauli blocking, tabulates necessary integrals and computes phase-space density. More...
 
class  PdgCode
 PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number. More...
 
class  Potentials
 A class that stores parameters of potentials, calculates potentials and their gradients. More...
 
class  ProcessBranch
 ProcessBranch represents one possible final state of an interaction process. More...
 
class  CollisionBranch
 CollisionBranch is a derivative of ProcessBranch, which is used to represent particular final-state channels in a collision. More...
 
class  DecayBranch
 DecayBranch is a derivative of ProcessBranch, which is used to represent decay channels. More...
 
struct  ExpansionProperties
 Struct containing the type of the metric and the expansion parameter of the metric. More...
 
class  QuantumNumbers
 A container for storing conserved values. More...
 
class  QuantumSampling
 This class: More...
 
class  RivetOutput
 SMASH output to Rivet analyses. More...
 
class  RootOutput
 
class  ScatterAction
 ScatterAction is a special action which takes two incoming particles and performs a scattering, producing one or more final-state particles. More...
 
class  ScatterActionMulti
 ScatterActionMulti is a special action which takes any number of incoming particles and performs a scattering with the use of the stochastic criterion, producing one or more final-state particles. More...
 
class  ScatterActionPhoton
 ScatterActionPhoton is a special action which takes two incoming particles and performs a perturbative electromagnetic scattering. More...
 
class  ScatterActionsFinder
 A simple scatter finder: Just loops through all particles and checks each pair for a collision. More...
 
class  SphereModus
 SphereModus: Provides a modus for expanding matter calculations. More...
 
class  StringProcess
 String excitation processes used in SMASH. More...
 
class  Tabulation
 A class for storing a one-dimensional lookup table of floating-point values. More...
 
class  ThermalizationAction
 ThermalizationAction implements forced thermalization as an Action class. More...
 
class  ThermodynamicLatticeOutput
 Writes the thermodynamic quantities at lattice points versus time. More...
 
class  ThermodynamicOutput
 Writes the thermodynamic quantities at a specified point versus time. More...
 
class  ThreeVector
 The ThreeVector class represents a physical three-vector \( \vec{x} = (x_1,x_2,x_3)\) with the components \( x_1,x_2,x_3 \). More...
 
class  VtkOutput
 SMASH output in a paraview format, intended for simple visualization. More...
 
class  WallcrossingAction
 WallcrossingAction is a special action which indicates that a particle has crossed a box wall. More...
 
class  WallCrossActionsFinder
 Finder for wall crossing actions, when using peridic boundary conditons. More...
 
struct  NeighborLookup
 A strust containing the informations needed to search the neighboring cell. More...
 
struct  FinalStateCrossSection
 Represent a final-state cross section. More...
 

Typedefs

using SystemTimePoint = std::chrono::time_point< std::chrono::system_clock >
 Type (alias) that is used to store the current time. More...
 
using SystemClock = std::chrono::system_clock
 Type (alias) used to obtain the current time via SystemClock:Now(). More...
 
using SystemTimeSpan = SystemClock::duration
 The time duration type (alias) used for measuring run times. More...
 
typedef RectangularLattice< DensityOnLatticeDensityLattice
 Conveniency typedef for lattice of density. More...
 
typedef RectangularLattice< FieldsOnLatticeFieldsLattice
 Conveniency typedef for lattice of fields. More...
 
using FilePtr = std::unique_ptr< std::FILE, FileDeleter >
 A RAII type to replace std::FILE *. More...
 
using Permutation = std::vector< size_t >
 Represent a permutation. More...
 

Enumerations

enum class  ComputationMethod { Analytic }
 Calculation method for the cross sections. More...
 
enum class  DensityType {
  None = 0 , Hadron = 1 , Baryon = 2 , BaryonicIsospin = 3 ,
  Pion = 4 , Isospin3_tot = 5 , Charge = 6 , Strangeness = 7
}
 Allows to choose which kind of density to calculate. More...
 
enum class  HadronClass {
  Baryon = 0 , Antibaryon = 1 , PositiveSMeson = 2 , NegativeSMeson = 3 ,
  PositiveQZeroSMeson = 4 , NegativeQZeroSMeson = 5 , ZeroQZeroSMeson = 6
}
 Specifier to classify the different hadron species according to their quantum numbers. More...
 
enum class  GridOptions : char { Normal = 0 , PeriodicBoundaries = 1 }
 Identifies the mode of the Grid. More...
 
enum class  CellSizeStrategy : char { Optimal , Largest }
 Indentifies the strategy of determining the cell size. More...
 
enum class  CellNumberLimitation : char { None , ParticleNumber }
 Identifies whether the number of cells should be limited. More...
 
enum class  LatticeUpdate { AtOutput = 0 , EveryTimestep = 1 , EveryFixedInterval = 2 }
 Enumerator option for lattice updates. More...
 
enum  OscarOutputFormat { OscarFormat2013 , OscarFormat2013Extended , OscarFormat1999 }
 Selector for the output format of OscarOutput. More...
 
enum  OscarOutputContents {
  OscarInteractions = 0x001 , OscarTimesteps = 0x002 , OscarAtEventstart = 0x004 , OscarParticlesAtEventend = 0x008 ,
  OscarParticlesAtEventendIfNotEmpty = 0x010 , OscarParticlesIC = 0x020
}
 Flags for the Contents template parameter of OscarOutput. More...
 
enum class  BelongsTo : uint8_t { Nothing = 0 , Projectile = 1 , Target = 2 }
 
enum class  Parity { Pos , Neg }
 Represent the parity of a particle type. More...
 
enum class  WhichDecaymodes { All , Hadronic , Dileptons }
 Decide which decay mode widths are returned in get partical widths. More...
 
enum class  ProcessType {
  None = 0 , Elastic = 1 , TwoToOne = 2 , TwoToTwo = 3 ,
  TwoToThree = 4 , TwoToFive = 13 , Decay = 5 , Wall = 6 ,
  Thermalization = 7 , HyperSurfaceCrossing = 8 , Bremsstrahlung = 9 , MultiParticleThreeMesonsToOne = 10 ,
  MultiParticleThreeToTwo = 11 , MultiParticleFiveToTwo = 12 , StringSoftSingleDiffractiveAX = 41 , StringSoftSingleDiffractiveXB = 42 ,
  StringSoftDoubleDiffractive = 43 , StringSoftAnnihilation = 44 , StringSoftNonDiffractive = 45 , StringHard = 46 ,
  FailedString = 47
}
 Process Types are used to identify the type of the process. More...
 
enum class  Extrapolation { Zero = 0 , Const = 1 , Linear = 2 }
 The kind of extrapolation used by the tabulation. More...
 
enum class  NeedsToWrap { PlusLength , No , MinusLength }
 The options determining what to do if a particle flies out of the grids PlusLength: Used if a periodic boundary condition is applied and a particle passes through the lower bound of the grid. More...
 

Functions

std::vector< ActionPtr > & operator+= (std::vector< ActionPtr > &lhs, std::vector< ActionPtr > &&rhs)
 Append vector of action pointers. More...
 
std::ostream & operator<< (std::ostream &out, const ActionPtr &action)
 Convenience: dereferences the ActionPtr to Action. More...
 
std::ostream & operator<< (std::ostream &out, const ActionList &actions)
 Writes multiple actions to the out stream. More...
 
template<typename Iterator >
static bool enforce_periodic_boundaries (Iterator begin, const Iterator &end, typename std::iterator_traits< Iterator >::value_type length)
 Enforces periodic boundaries on the given collection of values. More...
 
template<typename Container , typename UnaryPredicate >
bool all_of (Container &&c, UnaryPredicate &&p)
 Convenience wrapper for std::all_of that operates on a complete container. More...
 
template<typename Container , typename UnaryFunction >
UnaryFunction for_each (Container &&c, UnaryFunction &&f)
 Convenience wrapper for std::for_each that operates on a complete container. More...
 
std::ostream & operator<< (std::ostream &out, const Angles &a)
 Creates output for an Angles object in the form "φ: 0.1294, cos ϑ: 0.423". More...
 
template<typename T >
std::pair< std::vector< T >, std::vector< T > > dedup_avg (const std::vector< T > &x, const std::vector< T > &y)
 Remove duplicates from data (x, y) by averaging y. More...
 
double clebsch_gordan (const int j_a, const int j_b, const int j_c, const int m_a, const int m_b, const int m_c)
 Calculate Clebsch-Gordan coefficient \((-1)^{j_a - j_b + m_c} \sqrt{(2 j_c + 1)} \cdot [Wigner 3J symbol] \). More...
 
double isospin_clebsch_gordan_sqr_2to1 (const ParticleType &p_a, const ParticleType &p_b, const ParticleType &Res)
 Calculate the squared isospin Clebsch-Gordan coefficient for two particles p_a and p_b coupling to a resonance Res. More...
 
double isospin_clebsch_gordan_sqr_3to1 (const ParticleType &p_a, const ParticleType &p_b, const ParticleType &p_c, const ParticleType &Res)
 Calculate the squared isospin Clebsch-Gordan coefficient for three particles p_a, p_b and p_c coupling to a resonance Res. More...
 
double isospin_clebsch_gordan_sqr_2to2 (const ParticleType &p_a, const ParticleType &p_b, const ParticleType &p_c, const ParticleType &p_d, const int I=-1)
 Calculate the squared isospin Clebsch-Gordan coefficient for a 2-to-2 reaction A + B -> C + D. More...
 
double cut_off (const double sigma_mb)
 Cross section after cut off. More...
 
template<typename T , typename... Args>
std::unique_ptr< T > make_unique (Args &&... args)
 Definition for make_unique Is in C++14's standard library; necessary for older compilers. More...
 
double y_l_0 (int l, double cosx)
 Spherical harmonics Y_2_0 and Y_4_0. More...
 
std::ostream & operator<< (std::ostream &os, DensityType dt)
 Create the output operator for the densities. More...
 
double density_factor (const ParticleType &type, DensityType dens_type)
 Get the factor that determines how much a particle contributes to the density type that is computed. More...
 
double smearing_factor_norm (const double two_sigma_sqr)
 Norm of the Gaussian smearing function. More...
 
double smearing_factor_rcut_correction (const double rcut_in_sigma)
 Gaussians used for smearing are cut at radius \(r_{cut} = a \sigma \) for calculation speed-up. More...
 
std::pair< double, ThreeVectorunnormalized_smearing_factor (const ThreeVector &r, const FourVector &p, const double m_inv, const DensityParameters &dens_par, const bool compute_gradient=false)
 Implements gaussian smearing for any quantity. More...
 
std::tuple< double, FourVector, ThreeVector, ThreeVector, FourVector, FourVector, FourVector, FourVectorcurrent_eckart (const ThreeVector &r, const ParticleList &plist, const DensityParameters &par, DensityType dens_type, bool compute_gradient, bool smearing)
 
std::tuple< double, FourVector, ThreeVector, ThreeVector, FourVector, FourVector, FourVector, FourVectorcurrent_eckart (const ThreeVector &r, const Particles &plist, const DensityParameters &par, DensityType dens_type, bool compute_gradient, bool smearing)
 convenience overload of the above (ParticleList -> Particles) More...
 
template<typename T >
void update_lattice (RectangularLattice< T > *lat, const LatticeUpdate update, const DensityType dens_type, const DensityParameters &par, const std::vector< Particles > &ensembles, const bool compute_gradient)
 Updates the contents on the lattice. More...
 
void update_lattice (RectangularLattice< DensityOnLattice > *lat, RectangularLattice< FourVector > *old_jmu, RectangularLattice< FourVector > *new_jmu, RectangularLattice< std::array< FourVector, 4 >> *four_grad_lattice, const LatticeUpdate update, const DensityType dens_type, const DensityParameters &par, const std::vector< Particles > &ensembles, const double time_step, const bool compute_gradient)
 Updates the contents on the lattice of DensityOnLattice type. More...
 
double breit_wigner (double m, double pole, double width)
 Returns a relativistic Breit-Wigner distribution. More...
 
double breit_wigner_nonrel (double m, double pole, double width)
 Returns a non-relativistic Breit-Wigner distribution, which is essentially a Cauchy distribution with half width. More...
 
double cauchy (double x, double pole, double width)
 Returns a Cauchy distribution (sometimes also called Lorentz or non-relativistic Breit-Wigner distribution) with the given parameters. More...
 
double density_integrand (const double energy, const double momentum_sqr, const double temperature)
 Returns the Maxwell-Boltzmann distribution. More...
 
double density_integrand_mass (const double energy, const double momentum_sqr, const double temperature)
 density_integrand_mass - off_equilibrium distribution for massive particles More...
 
double density_integrand_1M_IC (const double energy, const double momentum_sqr, const double temperature)
 density integrand - 1M_IC massless particles for expanding metric initialization, see Bazow:2016oky [6] More...
 
double density_integrand_2M_IC (const double energy, const double momentum_sqr, const double temperature)
 density integrand - 2M_IC massless particles for expanding metric initialization, see Bazow:2016oky [6] More...
 
double juttner_distribution_func (double momentum_radial, double mass, double temperature, double effective_chemical_potential, double statistics)
 Relativistic Juttner distribution function is just a convenience wrapper for displaying Fermi, Bose, and Boltzmann distributions in one mathematical form. More...
 
double sample_momenta_non_eq_mass (const double temperature, const double mass)
 Samples a momentum via rejection method from the non-equilibrium distribution. More...
 
double sample_momenta_1M_IC (const double temperature, const double mass)
 Samples a momentum from the non-equilibrium distribution 1M_IC from Bazow:2016oky [6]. More...
 
double sample_momenta_2M_IC (const double temperature, const double mass)
 Samples a momentum from the non-equilibrium distribution 2M_IC from Bazow:2016oky [6]. More...
 
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 [40]) APPENDIX: ALGORITHM FOR GENERATING PARTICLES math trick: for \( x^{n-1}e^{-x} \) distribution, sample x by: \( x = -ln(r_1 r_2 r_3 ... r_n) \) where \( r_i \) are uniform random numbers between [0,1) for \( T/m > 0.6 \): \( p^2 e^{-E/T} = p^2 e^{-p/T} * e^{(p-E)/T} \), where \( e^{(p-E)/T}\) is used as rejection weight. More...
 
double sample_momenta_IC_ES (const double temperature)
 Sample momenta according to the momentum distribution in Bazow:2016oky [6]. More...
 
std::ostream & operator<< (std::ostream &, const EnergyMomentumTensor &)
 Prints out 4x4 tensor to the output stream. More...
 
EnergyMomentumTensor operator+ (EnergyMomentumTensor a, const EnergyMomentumTensor &b)
 Direct addition operator. More...
 
EnergyMomentumTensor operator- (EnergyMomentumTensor a, const EnergyMomentumTensor &b)
 Direct subtraction operator. More...
 
EnergyMomentumTensor operator* (EnergyMomentumTensor a, const double b)
 Direct multiplication operator. More...
 
EnergyMomentumTensor operator* (const double a, EnergyMomentumTensor b)
 Direct multiplication operator. More...
 
EnergyMomentumTensor operator/ (EnergyMomentumTensor a, const double b)
 Direct division operator. More...
 
template<typename Modus >
std::ostream & operator<< (std::ostream &out, const Experiment< Modus > &e)
 Creates a verbose textual description of the setup of the Experiment. More...
 
ExperimentParameters create_experiment_parameters (Configuration config)
 Gathers all general Experiment parameters. More...
 
const std::string hline (113, '-')
 String representing a horizontal line. More...
 
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. More...
 
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 running. More...
 
EventInfo fill_event_info (const std::vector< Particles > &ensembles, double E_mean_field, double modus_impact_parameter, const ExperimentParameters &parameters, bool projectile_target_interact)
 Generate the EventInfo object which is passed to outputs_. More...
 
void check_interactions_total (uint64_t interactions_total)
 Make sure interactions_total can be represented as a 32-bit integer. More...
 
void update_fields_lattice (RectangularLattice< FieldsOnLattice > *fields_lat, RectangularLattice< FourVector > *old_fields, RectangularLattice< FourVector > *new_fields, RectangularLattice< std::array< FourVector, 4 >> *fields_four_grad_lattice, DensityLattice *jmu_B_lat, const LatticeUpdate fields_lat_update, const Potentials &potentials, const double time_step)
 Updates the contents on the lattice of FieldsOnLattice type. More...
 
FilePtr fopen (const bf::path &filename, const std::string &mode)
 Open a file with given mode. More...
 
double blatt_weisskopf_sqr (const double p_ab, const int L)
 
double post_ff_sqr (double m, double M0, double srts0, double L)
 An additional form factor for unstable final states as used in GiBUU, according to M. More...
 
double em_form_factor_ps (PdgCode pdg, double mass)
 
double em_form_factor_sqr_vec (PdgCode pdg, double mass)
 
double form_factor_delta (double m)
 
FourVector operator+ (FourVector a, const FourVector &b)
 add two FourVectors More...
 
FourVector operator- (FourVector a, const FourVector &b)
 subtract two FourVectors More...
 
FourVector operator* (FourVector a, double b)
 multiply a vector with a scalar More...
 
FourVector operator* (double b, FourVector a)
 multiply a vector with a scalar More...
 
FourVector operator/ (FourVector a, const double &b)
 divide a vector by a scalar More...
 
std::ostream & operator<< (std::ostream &os, const FourVector &vec)
 Writes the four components of the vector to the output stream. More...
 
bool enable_float_traps (int)
 Fallback that fails to set the trap. More...
 
void setup_default_float_traps ()
 Setup the floating-point traps used throughout SMASH. More...
 
template<typename F >
void without_float_traps (F &&f)
 Convenience function to create a scope where all floating point traps are disabled. More...
 
std::ostream & operator<< (std::ostream &s, const ThermLatticeNode &node)
 This operator writes all the thermodynamic quantities at a certain position to the file out. More...
 
std::string build_error_string (std::string message, const Line &line)
 Builds a meaningful error message. More...
 
build_vector_< Lineline_parser (const std::string &input)
 Helper function for parsing particles.txt and decaymodes.txt. More...
 
void ensure_all_read (std::istream &input, const Line &line)
 Makes sure that nothing is left to read from this line. More...
 
std::string read_all (std::istream &&input)
 Utility function to read a complete input stream (e.g. More...
 
bool has_crlf_line_ending (const std::string in)
 Check if a line in the string ends with \r\n. More...
 
template<typename T >
interpolate_trilinear (T ax, T ay, T az, T f1, T f2, T f3, T f4, T f5, T f6, T f7, T f8)
 Perform a trilinear 1st order interpolation. More...
 
template<typename T , typename Cmp >
Permutation generate_sort_permutation (std::vector< T > const &v, Cmp compare)
 Calculate the permutations necessary for sorting a vector. More...
 
template<typename T >
std::vector< T > apply_permutation (const std::vector< T > &v, const Permutation &p)
 Apply a permutation to a vector. More...
 
template<typename T >
void check_duplicates (const std::vector< T > &x, const std::string &error_position)
 Check whether two components have the same value in a sorted vector x. More...
 
template<typename T >
size_t find_index (const std::vector< T > &v, T x)
 Find the index in v that corresponds to the last value strictly smaller than x. More...
 
template<int w = 9, int p = w - 3, typename CharT , typename Traits >
std::basic_ostream< CharT, Traits > & field (std::basic_ostream< CharT, Traits > &s)
 Stream modifier to align the next object to a specific width w. More...
 
double center_of_velocity_v (double s, double ma, double mb)
 
double fixed_target_projectile_v (double s, double ma, double mb)
 
template<typename T >
pCM_sqr_from_s (const T s, const T mass_a, const T mass_b) noexcept
 
template<typename T >
pCM_from_s (const T s, const T mass_a, const T mass_b) noexcept
 
template<typename T >
pCM (const T sqrts, const T mass_a, const T mass_b) noexcept
 
template<typename T >
pCM_sqr (const T sqrts, const T mass_a, const T mass_b) noexcept
 
template<typename T >
std::array< T, 2 > get_t_range (const T sqrts, const T m1, const T m2, const T m3, const T m4)
 Get the range of Mandelstam-t values allowed in a particular 2->2 process, see PDG 2014 booklet, eq. More...
 
static void check_energy (double mandelstam_s, double m_sum)
 Helper function for plab_from_s. More...
 
static void check_radicand (double mandelstam_s, double radicand)
 Helper function for plab_from_s. More...
 
double plab_from_s (double mandelstam_s, double mass)
 Convert Mandelstam-s to p_lab in a fixed-target collision. More...
 
double plab_from_s (double mandelstam_s)
 Convert Mandelstam-s to p_lab in a fixed-target collision. More...
 
double plab_from_s (double mandelstam_s, double m_projectile, double m_target)
 Convert Mandelstam-s to p_lab in a fixed-target collision. More...
 
double s_from_Etot (double e_tot, double m_P, double m_T)
 Convert E_tot to Mandelstam-s for a fixed-target setup, with a projectile of mass m_P and a total energy e_tot and a target of mass m_T at rest. More...
 
double s_from_Etot (double e_tot_p, double e_tot_t, double m_p, double m_t)
 Convert E_tot to Mandelstam-s for two beams with total energies and masses (E,m) More...
 
double s_from_Ekin (double e_kin, double m_P, double m_T)
 Convert E_kin to Mandelstam-s for a fixed-target setup, with a projectile of mass m_P and a kinetic energy e_kin and a target of mass m_T at rest. More...
 
double s_from_Ekin (double e_kin_p, double e_kin_t, double m_p, double m_t)
 Convert E_kin=(E_tot-m) to Mandelstam-s for two beams with total energies and masses (E,m) More...
 
double s_from_plab (double plab, double m_P, double m_T)
 Convert p_lab to Mandelstam-s for a fixed-target setup, with a projectile of mass m_P and momentum plab and a target of mass m_T at rest. More...
 
double s_from_plab (double plab_p, double plab_t, double m_p, double m_t)
 Convert P_lab to Mandelstam-s for two beams with total momenta and masses (P,m) (P_lab gives per nucleon, P=P_lab*A) More...
 
void create_all_loggers (Configuration config)
 Called from main() right after the Configuration object is fully set up to create all logger objects (as defined by LogArea::AreaTuple) with the correct area names and log levels. More...
 
einhard::LogLevel default_loglevel ()
 
void set_default_loglevel (einhard::LogLevel level)
 Set the default log level (what will be returned from subsequent default_loglevel calls). More...
 
template<typename T >
FormattingHelper< T > format (const T &value, const char *unit, int width=-1, int precision=-1)
 Acts as a stream modifier for std::ostream to output an object with an optional suffix string and with a given field width and precision. More...
 
template<typename T >
std::vector< T > smooth (const std::vector< T > &x, const std::vector< T > &y, T span=2./3, size_t iter=3, T delta=0)
 Apply the LOWESS smoother (see the reference below) to the given data (x, y). More...
 
template<typename N >
bool almost_equal (const N x, const N y)
 Checks two numbers for relative approximate equality. More...
 
template<typename N >
bool almost_equal_physics (const N x, const N y)
 Same as smash::almost_equal, but for physical checks like energy-momentum conservation small_number is enough precision-wise. More...
 
std::unique_ptr< OutputInterfacecreate_oscar_output (const std::string &format, const std::string &content, const bf::path &path, const OutputParameters &out_par)
 
double xs_high_energy (double mandelstam_s, bool is_opposite_charge, double ma, double mb, double P, double R1, double R2)
 total hadronic cross sections at high energies parametrized in the 2016 PDG book(http://pdg.lbl.gov/2016/reviews/rpp2016-rev-cross-section-plots.pdf) More...
 
double pp_high_energy (double mandelstam_s)
 pp total cross section at high energies More...
 
double ppbar_high_energy (double mandelstam_s)
 ppbar total cross section at high energies More...
 
double np_high_energy (double mandelstam_s)
 np total cross section at high energies More...
 
double npbar_high_energy (double mandelstam_s)
 npbar total cross section at high energies More...
 
double piplusp_high_energy (double mandelstam_s)
 pi+p total cross section at high energies More...
 
double piminusp_high_energy (double mandelstam_s)
 pi-p total cross section at high energies More...
 
double xs_ppbar_annihilation (double mandelstam_s)
 parametrized cross-section for proton-antiproton annihilation used in the UrQMD model More...
 
double xs_string_hard (double mandelstam_s, double xs_0, double e_0, double lambda_pow)
 Utility function called by specific other parametrizations Parametrized hard scattering cross section (with partonic scattering) This parametrization is a direct fit to cross sections in PYTHIA See Sjostrand:1987su [46]. More...
 
double NN_string_hard (double mandelstam_s)
 nucleon-nucleon hard scattering cross section (with partonic scattering) More...
 
double Npi_string_hard (double mandelstam_s)
 nucleon-pion hard scattering cross section (with partonic scattering) More...
 
double pipi_string_hard (double mandelstam_s)
 pion-pion hard scattering cross section (with partonic scattering) More...
 
double piplusp_elastic_high_energy (double mandelstam_s, double m1, double m2)
 pi+p elactic cross section parametrization. More...
 
double piplusp_elastic_AQM (double mandelstam_s, double m1, double m2)
 An overload of piplusp_elastic_high_energy in which the very low part is replaced by a flat 5 mb cross section; used for meson-meson interactions. More...
 
double piplusp_elastic (double mandelstam_s)
 pi+p elastic cross section parametrization, PDG data. More...
 
double piplusp_sigmapluskplus_pdg (double mandelstam_s)
 pi+ p to Sigma+ K+ cross section parametrization, PDG data. More...
 
double piminusp_elastic (double mandelstam_s)
 pi-p elastic cross section parametrization Source: GiBUU:parametrizationBarMes_HighEnergy.f90 More...
 
double piminusp_lambdak0_pdg (double mandelstam_s)
 pi- p -> Lambda K0 cross section parametrization, PDG data. More...
 
double piminusp_sigmaminuskplus_pdg (double mandelstam_s)
 pi- p -> Sigma- K+ cross section parametrization, PDG data. More...
 
double piminusp_sigma0k0_res (double mandelstam_s)
 pi- p -> Sigma0 K0 cross section parametrization, resonance contribution. More...
 
double pp_elastic (double mandelstam_s)
 pp elastic cross section parametrization Source: Weil:2013mya [53], eq. More...
 
double pp_elastic_high_energy (double mandelstam_s, double m1, double m2)
 pp elastic cross section parametrization, with only the high energy part generalized to all energy regimes (used for AQM) Source: Weil:2013mya [53], eq. More...
 
double pp_total (double mandelstam_s)
 pp total cross section parametrization Sources: low-p: Cugnon:1996kh [15] highest-p: Buss:2011mx [10] More...
 
double np_elastic (double mandelstam_s)
 np elastic cross section parametrization Source: Weil:2013mya [53], eq. More...
 
double np_total (double mandelstam_s)
 np total cross section parametrization Sources: low-p: Cugnon:1996kh [15] highest-p: Buss:2011mx [10] More...
 
double ppbar_elastic (double mandelstam_s)
 ppbar elastic cross section parametrization Source: Bass:1998ca [4] More...
 
double ppbar_total (double mandelstam_s)
 ppbar total cross section parametrization Source: Bass:1998ca [4] More...
 
double deuteron_pion_elastic (double mandelstam_s)
 Deuteron pion elastic cross-section [mb] parametrized to fit pi-d elastic scattering data (the data collection was be obtained from SAID data base, gwdac.phys.gwu.edu) More...
 
double deuteron_nucleon_elastic (double mandelstam_s)
 Deuteron nucleon elastic cross-section [mb] parametrized by Oh:2009gx [35]. More...
 
double kplusp_elastic_background (double mandelstam_s)
 K+ p elastic background cross section parametrization. More...
 
double kplusn_elastic_background (double mandelstam_s)
 K+ n elastic background cross section parametrization sigma(K+n->K+n) = sigma(K+n->K0p) = 0.5 * sigma(K+p->K+p) Source: Buss:2011mx [10], B.3.8. More...
 
double kplusn_k0p (double mandelstam_s)
 K+ n charge exchange cross section parametrization. More...
 
double kminusp_elastic_background (double mandelstam_s)
 K- p elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9. More...
 
double kminusn_elastic_background (double mandelstam_s)
 K- n elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9. More...
 
double k0p_elastic_background (double mandelstam_s)
 K0 p elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9. More...
 
double k0n_elastic_background (double mandelstam_s)
 K0 n elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9. More...
 
double kbar0p_elastic_background (double mandelstam_s)
 Kbar0 p elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9. More...
 
double kbar0n_elastic_background (double mandelstam_s)
 Kbar0 n elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9. More...
 
double kplusp_inelastic_background (double mandelstam_s)
 K+ p inelastic background cross section parametrization Source: Buss:2011mx [10], B.3.8. More...
 
double kplusn_inelastic_background (double mandelstam_s)
 K+ n inelastic background cross section parametrization Source: Buss:2011mx [10], B.3.8. More...
 
double kminusp_kbar0n (double mandelstam_s)
 K- p <-> Kbar0 n cross section parametrization. More...
 
double kminusp_piminussigmaplus (double sqrts)
 K- p <-> pi- Sigma+ cross section parametrization Taken from UrQMD (Graef:2014mra [21]). More...
 
double kminusp_piplussigmaminus (double sqrts)
 K- p <-> pi+ Sigma- cross section parametrization Taken from UrQMD (Graef:2014mra [21]). More...
 
double kminusp_pi0sigma0 (double sqrts)
 K- p <-> pi0 Sigma0 cross section parametrization Fit to Landolt-Börnstein instead of UrQMD values. More...
 
double kminusp_pi0lambda (double sqrts)
 K- p <-> pi0 Lambda cross section parametrization Fit to Landolt-Börnstein instead of UrQMD values. More...
 
double kminusn_piminussigma0 (double sqrts)
 K- n <-> pi- Sigma0 cross section parametrization Follow from the parametrization with the same strange product via isospin symmetry. More...
 
double kminusn_pi0sigmaminus (double sqrts)
 K- n <-> pi0 Sigma- cross section parametrization Follow from the parametrization with the same strange product via isospin symmetry. More...
 
double kminusn_piminuslambda (double sqrts)
 K- n <-> pi- Lambda cross section parametrization Follow from the parametrization with the same strange product via isospin symmetry. More...
 
double lambdalambda_ximinusp (double sqrts_sqrts0, double p_N, double p_lambda)
 Lambda Lambda <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double lambdalambda_xi0n (double sqrts_sqrts0, double p_N, double p_lambda)
 Lambda Lambda <-> Xi0 n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double lambdasigmaplus_xi0p (double sqrts_sqrts0)
 Lambda Sigma+ <-> Xi0 p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double lambdasigmaminus_ximinusn (double sqrts_sqrts0)
 Lambda Sigma- <-> Xi- n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double lambdasigma0_ximinusp (double sqrts_sqrts0)
 Lambda Sigma0 <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double lambdasigma0_xi0n (double sqrts_sqrts0)
 Lambda Sigma0 <-> Xi0 n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double sigma0sigma0_ximinusp (double sqrts_sqrts0)
 Sigma0 Sigma0 <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double sigma0sigma0_xi0n (double sqrts_sqrts0)
 Sigma0 Sigma0 <-> Xi0 n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double sigmaplussigmaminus_xi0p (double sqrts_sqrts0)
 Sigma+ Sigma- <-> Xi0 p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double sigma0sigmaminus_ximinusn (double sqrts_sqrts0)
 Sigma0 Sigma- <-> Xi- n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double sigmaplussigmaminus_ximinusp (double sqrts_sqrts0)
 Sigma+ Sigma- <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
double sigmaplussigmaminus_xi0n (double sqrts_sqrts0)
 Sigma+ Sigma- <-> Xi0 n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]). More...
 
std::ostream & operator<< (std::ostream &s, const ParticleData &p)
 Writes the state of the particle to the output stream. More...
 
std::ostream & operator<< (std::ostream &out, const ParticleList &particle_list)
 Writes a compact overview over the particles in the particle_list argument to the stream. More...
 
PrintParticleListDetailed detailed (const ParticleList &list)
 Request the ParticleList to be printed in full detail (i.e. More...
 
std::ostream & operator<< (std::ostream &out, const PrintParticleListDetailed &particle_list)
 Writes a detailed overview over the particles in the particle_list argument to the stream. More...
 
Parity operator- (Parity p)
 
Parity operator* (Parity x, Parity y)
 
void operator*= (Parity &x, Parity y)
 
std::istream & operator>> (std::istream &is, PdgCode &code)
 Sets the PDG code from the textual representation in the input stream. More...
 
std::ostream & operator<< (std::ostream &is, const PdgCode &code)
 Writes the textual representation of the PDG code to the output stream. More...
 
bool is_dilepton (const PdgCode pdg1, const PdgCode pdg2)
 
bool has_lepton_pair (const PdgCode pdg1, const PdgCode pdg2, const PdgCode pdg3)
 
constexpr uint64_t pack (int32_t x, int32_t y)
 Pack two int32_t into an uint64_t. More...
 
template<class T >
constexpr T pow_int (const T base, unsigned const exponent)
 Efficient template for calculating integer powers using squaring. More...
 
template<class T >
constexpr T square (const T base)
 Efficient template for calculating the square. More...
 
bool is_string_soft_process (ProcessType p)
 Check if a given process type is a soft string excitation. More...
 
std::ostream & operator<< (std::ostream &os, ProcessType process_type)
 Writes the textual representation of the process_type to the output stream os. More...
 
std::ostream & operator<< (std::ostream &os, const CollisionBranch &cbranch)
 Writes the textual representation of the Collision Branch cbranch to the output stream os. More...
 
double calc_hubble (double time, const ExpansionProperties &metric)
 Calculate the Hubble parameter \(H(t)\), which describes how large the expansion flow is. More...
 
double propagate_straight_line (Particles *particles, double to_time, const std::vector< FourVector > &beam_momentum)
 Propagates the positions of all particles on a straight line to a given moment. More...
 
void expand_space_time (Particles *particles, const ExperimentParameters &parameters, const ExpansionProperties &metric)
 Modifies positions and momentum of all particles to account for space-time deformation. More...
 
void update_momenta (std::vector< Particles > &particles, double dt, const Potentials &pot, RectangularLattice< std::pair< ThreeVector, ThreeVector >> *FB_lat, RectangularLattice< std::pair< ThreeVector, ThreeVector >> *FI3_lat, RectangularLattice< std::pair< ThreeVector, ThreeVector >> *EM_lat)
 Updates the momenta of all particles at the current time step according to the equations of motion: More...
 
std::pair< std::string, std::string > load_particles_and_decaymodes (const char *particles_file, const char *decaymodes_file)
 Loads particles and decaymodes from provided files particles_file and decaymodes_file. More...
 
void load_default_particles_and_decaymodes ()
 Loads default smash particle list and decaymodes. More...
 
std::string trim (const std::string &s)
 Strip leading and trailing whitespaces. More...
 
void remove_substr (std::string &s, const std::string &p)
 Remove all instances of a substring p in a string s. More...
 
void isoclean (std::string &s)
 Remove ⁺, ⁻, ⁰ from string. More...
 
std::vector< std::string > split (const std::string &s, char delim)
 Split string by delimiter. More...
 
double spec_func_integrand_1res (double resonance_mass, double sqrts, double stable_mass, const ParticleType &type)
 Spectral function integrand for GSL integration, with one resonance in the final state (the second particle is stable). More...
 
double spec_func_integrand_2res (double sqrts, double res_mass_1, double res_mass_2, const ParticleType &t1, const ParticleType &t2)
 Spectral function integrand for GSL integration, with two resonances in the final state. More...
 
Tabulation spectral_integral_semistable (Integrator &integrate, const ParticleType &resonance, const ParticleType &stable, double range)
 Create a table for the spectral integral of a resonance and a stable particle. More...
 
Tabulation spectral_integral_unstable (Integrator2d &integrate2d, const ParticleType &res1, const ParticleType &res2, double range)
 Create a table for the spectral integral of two resonances. More...
 
std::ostream & operator<< (std::ostream &, const ThreeVector &)
 Writes the three components of the vector to the output stream. More...
 
ThreeVector operator+ (ThreeVector a, const ThreeVector &b)
 
ThreeVector operator- (ThreeVector a, const ThreeVector &b)
 
ThreeVector operator* (ThreeVector a, const double &b)
 multiply a three-vector by constant factor \( b \vec{a} \). More...
 
ThreeVector operator* (const double &a, ThreeVector b)
 multiply a three-vector by constant factor \( a \vec{b} \). More...
 
double operator* (ThreeVector a, const ThreeVector &b)
 
ThreeVector operator/ (ThreeVector a, const double &b)
 divide a three-vector by constant factor \( \vec{a} / b \). More...
 
std::ostream & operator<< (std::ostream &out, const BoxModus &m)
 
static double isospin_clebsch_gordan_2to1 (const ParticleType &p_a, const ParticleType &p_b, const int I_tot, const int I_z)
 Calculate isospin Clebsch-Gordan coefficient for two particles p_a and p_b coupling to a total isospin. More...
 
std::ostream & operator<< (std::ostream &out, const ColliderModus &m)
 
static double detailed_balance_factor_stable (double s, const ParticleType &a, const ParticleType &b, const ParticleType &c, const ParticleType &d)
 Helper function: Calculate the detailed balance factor R such that. More...
 
static double detailed_balance_factor_RK (double sqrts, double pcm, const ParticleType &a, const ParticleType &b, const ParticleType &c, const ParticleType &d)
 Helper function: Calculate the detailed balance factor R such that. More...
 
static double detailed_balance_factor_RR (double sqrts, double pcm, const ParticleType &a, const ParticleType &b, const ParticleType &c, const ParticleType &d)
 Helper function: Calculate the detailed balance factor R such that. More...
 
static void append_list (CollisionBranchList &main_list, CollisionBranchList in_list, double weight=1.)
 Helper function: Append a list of processes to another (main) list of processes. More...
 
static int min_angular_momentum (int s0, int s1, int s2)
 
static int min_angular_momentum (int s0, int s1, int s2, int s3)
 
static double integrand_rho_Manley_1res (double sqrts, double mass, double stable_mass, ParticleTypePtr type, int L)
 
static double integrand_rho_Manley_2res (double sqrts, double m1, double m2, ParticleTypePtr t1, ParticleTypePtr t2, int L)
 
static ParticleTypePtrList & arrange_particles (ParticleTypePtrList &part_types)
 Rearrange the particle list such that the first particle is the stable one. More...
 
static ParticleTypePtrList sort_particles (ParticleTypePtrList part_types)
 sort the particle list More...
 
template<typename T >
std::tuple< double, FourVector, ThreeVector, ThreeVector, FourVector, FourVector, FourVector, FourVectorcurrent_eckart_impl (const ThreeVector &r, const T &plist, const DensityParameters &par, DensityType dens_type, bool compute_gradient, bool smearing)
 
static IsoParticleTypetry_find_private (const std::string &name)
 Helper function for IsoParticleType::try_find and friends. More...
 
static std::string multiplet_name (std::string name)
 Construct the name-string for an isospin multiplet from the given name-string for the particle. More...
 
static bf::path generate_tabulation_path (const bf::path &dir, const std::string &prefix, const std::string &res_name)
 
void cache_integral (std::unordered_map< std::string, Tabulation > &tabulations, const bf::path &dir, sha256::Hash hash, const IsoParticleType &part, const IsoParticleType &res, const IsoParticleType *antires, bool unstable)
 
std::ostream & operator<< (std::ostream &out, const ListModus &m)
 
template<int index, int stop = 0>
constexpr std::enable_if<(index==stop), int >::type find_longest_logger_name ()
 
template<int index, int stop = 0, int mid = (index + stop) / 2>
constexpr std::enable_if<(index > stop), int >::type find_longest_logger_name ()
 
template<std::size_t index, int >
std::enable_if<(index==0)>::type create_all_loggers_impl (Configuration &)
 
template<std::size_t index, int longest_name = find_longest_logger_name<index - 1>()>
std::enable_if<(index !=0)>::type create_all_loggers_impl (Configuration &config)
 
std::ostream & operator<< (std::ostream &out, const Nucleus &n)
 
static double piplusp_elastic_pdg (double mandelstam_s)
 
static double piminusp_elastic_pdg (double mandelstam_s)
 
static double kminusp_elastic_pdg (double mandelstam_s)
 
static void initialize (std::unordered_map< std::pair< uint64_t, uint64_t >, double, pair_hash > &ratios)
 Calculate and store isospin ratios for K N -> K Delta reactions. More...
 
std::ostream & operator<< (std::ostream &out, const Particles &particles)
 
static std::string antiname (const std::string &name, PdgCode code)
 Construct an antiparticle name-string from the given name-string for the particle and its PDG code. More...
 
static std::string chargestr (int charge)
 Construct a charge string, given the charge as integer. More...
 
std::ostream & operator<< (std::ostream &out, const ParticleType &type)
 
static double Cugnon_bpp (double plab)
 Computes the B coefficients from the Cugnon parametrization of the angular distribution in elastic pp scattering. More...
 
static double Cugnon_bnp (double plab)
 Computes the B coefficients from the Cugnon parametrization of the angular distribution in elastic np scattering. More...
 
static void deduplicate (std::vector< FinalStateCrossSection > &final_state_xs)
 Deduplicate the final-state cross sections by summing. More...
 
std::ostream & operator<< (std::ostream &out, const SphereModus &m)
 
template<typename Out >
void split (const std::string &s, char delim, Out result)
 Split string by delimiter. More...
 
static void swrite (std::ofstream &stream, double x)
 Write binary representation to stream. More...
 
static double sread_double (std::ifstream &stream)
 Read binary representation of a double. More...
 
static void swrite (std::ofstream &stream, size_t x)
 Write binary representation to stream. More...
 
static size_t sread_size (std::ifstream &stream)
 Read binary representation of a size_t. More...
 
static void swrite (std::ofstream &stream, const std::vector< double > x)
 Write binary representation to stream. More...
 
static std::vector< double > sread_vector (std::ifstream &stream)
 Read binary representation of a vector of doubles. More...
 
static void swrite (std::ofstream &stream, sha256::Hash x)
 Write binary representation to stream. More...
 
static sha256::Hash sread_hash (std::ifstream &stream)
 Read binary representation of a SHA256 hash. More...
 
std::ostream & operator<< (std::ostream &out, const TimeStampCounter &tsc)
 

Variables

static constexpr int LAction = LogArea::Action::id
 
static constexpr int LClock = LogArea::Clock::id
 
constexpr double hbarc = 0.197327053
 GeV <-> fm conversion factor. More...
 
constexpr double fm2_mb = 0.1
 mb <-> fm^2 conversion factor. More...
 
constexpr double gev2_mb = hbarc * hbarc / fm2_mb
 GeV^-2 <-> mb conversion factor. More...
 
constexpr double mev_to_gev = 1.e-3
 MeV to GeV conversion factor. More...
 
constexpr double really_small = 1.0e-6
 Numerical error tolerance. More...
 
constexpr double very_small_double = 1.0e-15
 A very small double, used to avoid division by zero. More...
 
constexpr double twopi = 2. * M_PI
 \( 2\pi \). More...
 
constexpr double nuclear_density = 0.168
 Ground state density of symmetric nuclear matter [fm^-3]. More...
 
constexpr double small_number = 1.0e-4
 Physical error tolerance. More...
 
constexpr double nucleon_mass = 0.938
 Nucleon mass in GeV. More...
 
constexpr double pion_mass = 0.138
 Pion mass in GeV. More...
 
constexpr double kaon_mass = 0.494
 Kaon mass in GeV. More...
 
constexpr double omega_mass = 0.783
 omega mass in GeV. More...
 
constexpr double a1_mass = 1.26
 a1 mass in GeV. More...
 
constexpr double delta_mass = 1.232
 Delta mass in GeV. More...
 
constexpr double deuteron_mass = 1.8756
 Deuteron mass in GeV. More...
 
constexpr double fine_structure = 7.2973525698e-3
 Fine-struture constant, approximately 1/137. More...
 
const double elementary_charge = std::sqrt(fine_structure * 4 * M_PI)
 Elementary electric charge in natural units, approximately 0.3. More...
 
constexpr int maximum_rndm_seed_in_pythia = 900000000
 The maximum value of the random seed used in PYTHIA. More...
 
constexpr double minimum_sqrts_pythia_can_handle = 10.0
 Energy in GeV, below which hard reactions via pythia are impossible. More...
 
constexpr std::uint32_t ID_PROCESS_PHOTON
 Process ID for any photon process. More...
 
const std::initializer_list< double > BREMS_SQRTS
 Center-of-mass energy. More...
 
const std::initializer_list< double > BREMS_K
 photon momentum More...
 
const std::initializer_list< double > BREMS_THETA
 theta angle with respect to collision axis of incoming pions More...
 
const std::initializer_list< double > BREMS_PIPI_PIPI_OPP_SIG
 Total π+- + π-+ -> π+- + π-+ + γ cross section. More...
 
const std::initializer_list< double > BREMS_PIPI_PIPI_OPP_DIFF_SIG_K
 dSigma/dk for π+- + π-+ -> π+- + π-+ + γ More...
 
const std::initializer_list< double > BREMS_PIPI_PIPI_OPP_DIFF_SIG_THETA
 dSigma/dtheta for π+- + π-+ -> π+- + π-+ + γ More...
 
const std::initializer_list< double > BREMS_PIPI_PIPI_SAME_SIG
 Total π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ cross section. More...
 
const std::initializer_list< double > BREMS_PIPI_PIPI_SAME_DIFF_SIG_K
 dSigma/dk for π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ More...
 
const std::initializer_list< double > BREMS_PIPI_PIPI_SAME_DIFF_SIG_THETA
 dSigma/dtheta for π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ More...
 
const std::initializer_list< double > BREMS_PIPI0_PIPI0_SIG
 Total π0 + π -> π0 + π + γ cross section. More...
 
const std::initializer_list< double > BREMS_PIPI0_PIPI0_DIFF_SIG_K
 dSigma/dk for π0 + π -> π0 + π + γ More...
 
const std::initializer_list< double > BREMS_PIPI0_PIPI0_DIFF_SIG_THETA
 dSigma/dtheta for π0 + π -> π0 + π + γ More...
 
const std::initializer_list< double > BREMS_PIPI_PI0PI0_SIG
 Total π+- + π-+ -> π0 + π0 + γ cross section. More...
 
const std::initializer_list< double > BREMS_PIPI_PI0PI0_DIFF_SIG_K
 dSigma/dk for π+- + π-+ -> π0 + π0 + γ More...
 
const std::initializer_list< double > BREMS_PIPI_PI0PI0_DIFF_SIG_THETA
 dSigma/dtheta for π+- + π-+ -> π0 + π0 + γ More...
 
const std::initializer_list< double > BREMS_PI0PI0_PIPI_SIG
 Total π0 + π0 -> π+- + π-+ + γ cross section. More...
 
const std::initializer_list< double > BREMS_PI0PI0_PIPI_DIFF_SIG_K
 dSigma/dk for π0 + π0 -> π+- + π-+ + γ More...
 
const std::initializer_list< double > BREMS_PI0PI0_PIPI_DIFF_SIG_THETA
 dSigma/dtheta for π0 + π0 -> π+- + π-+ + γ More...
 
static constexpr int LDensity = LogArea::Density::id
 
static constexpr int LMain = LogArea::Main::id
 
static constexpr int LInitialConditions = LogArea::InitialConditions::id
 
static constexpr int LLattice = LogArea::Lattice::id
 
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
 An array that stores all pre-configured Logger objects. More...
 
static constexpr int LOutput = LogArea::Output::id
 
static constexpr int LExperiment = LogArea::Experiment::id
 
KaonNucleonRatios kaon_nucleon_ratios
 
const std::initializer_list< double > KMINUSP_ELASTIC_P_LAB
 PDG data on K- p elastic cross section: momentum in lab frame. More...
 
const std::initializer_list< double > KMINUSP_ELASTIC_SIG
 PDG data on K- p elastic cross section: cross section. More...
 
static std::unique_ptr< InterpolateDataLinear< double > > kminusp_elastic_interpolation = nullptr
 An interpolation that gets lazily filled using the KMINUSP_ELASTIC data. More...
 
const std::initializer_list< double > KMINUSP_TOT_PLAB
 PDG data on K- p total cross section: momentum in lab frame. More...
 
const std::initializer_list< double > KMINUSP_TOT_SIG
 PDG data on K- p total cross section: cross section. More...
 
const std::initializer_list< double > KMINUSP_RES_SQRTS
 Center-of-mass energy list for K̅⁻ N⁺ More...
 
const std::initializer_list< double > KMINUSP_RES_SIG
 Elastic K̅⁻ N⁺ cross section contributions from decays. More...
 
static std::unique_ptr< InterpolateDataSplinekminusp_elastic_res_interpolation = nullptr
 An interpolation that gets lazily filled using the KMINUSP_RES data. More...
 
const std::initializer_list< double > KPLUSN_TOT_PLAB
 PDG data on K+ n total cross section: momentum in lab frame. More...
 
const std::initializer_list< double > KPLUSN_TOT_SIG
 PDG data on K+ n total cross section: cross section. More...
 
static std::unique_ptr< InterpolateDataLinear< double > > kplusn_total_interpolation = nullptr
 An interpolation that gets lazily filled using the KPLUSN_TOT data. More...
 
const std::initializer_list< double > KPLUSP_TOT_PLAB
 PDG data on K+ p total cross section: momentum in lab frame. More...
 
const std::initializer_list< double > KPLUSP_TOT_SIG
 PDG data on K+ p total cross section: cross section. More...
 
static std::unique_ptr< InterpolateDataLinear< double > > kplusp_total_interpolation = nullptr
 An interpolation that gets lazily filled using the KPLUSP_TOT data. More...
 
const std::initializer_list< double > PIMINUSP_ELASTIC_P_LAB
 PDG data on pi- p elastic cross section: momentum in lab frame. More...
 
const std::initializer_list< double > PIMINUSP_ELASTIC_SIG
 PDG data on pi- p elastic cross section: cross section. More...
 
static std::unique_ptr< InterpolateDataLinear< double > > piminusp_elastic_interpolation = nullptr
 An interpolation that gets lazily filled using the PIMINUSP_ELASTIC data. More...
 
const std::initializer_list< double > PIMINUSP_LAMBDAK0_P_LAB
 PDG data on pi- p to Lambda K0 cross section: momentum in lab frame. More...
 
const std::initializer_list< double > PIMINUSP_LAMBDAK0_SIG
 PDG data on pi- p to Lambda K0 cross section: cross section. More...
 
static std::unique_ptr< InterpolateDataLinear< double > > piminusp_lambdak0_interpolation = nullptr
 An interpolation that gets lazily filled using the PIMINUSP_LAMBDAK0 data. More...
 
const std::initializer_list< double > PIMINUSP_SIGMAMINUSKPLUS_P_LAB
 PDG data on pi- p to Sigma- K+ cross section: momentum in lab frame. More...
 
const std::initializer_list< double > PIMINUSP_SIGMAMINUSKPLUS_SIG
 PDG data on pi- p to Sigma- K+ cross section: cross section. More...
 
static std::unique_ptr< InterpolateDataLinear< double > > piminusp_sigmaminuskplus_interpolation = nullptr
 An interpolation that gets lazily filled using the PIMINUSP_SIGMAMINUSKPLUS data. More...
 
const std::initializer_list< double > PIMINUSP_SIGMA0K0_RES_SQRTS
 pi- p to Sigma0 K0 cross section: square root s More...
 
const std::initializer_list< double > PIMINUSP_SIGMA0K0_RES_SIG
 pi- p to Sigma0 K0 cross section: cross section More...
 
static std::unique_ptr< InterpolateDataLinear< double > > piminusp_sigma0k0_interpolation = nullptr
 An interpolation that gets lazily filled using the PIMINUSP_SIGMA0K0_RES data. More...
 
const std::initializer_list< double > PIMINUSP_RES_SQRTS
 Center-of-mass energy. More...
 
const std::initializer_list< double > PIMINUSP_RES_SIG
 Elastic π⁻N⁺ cross section contributions from decays. More...
 
static std::unique_ptr< InterpolateDataSplinepiminusp_elastic_res_interpolation = nullptr
 An interpolation that gets lazily filled using the PIMINUSP_RES data. More...
 
const std::initializer_list< double > PIPLUSP_ELASTIC_P_LAB
 PDG data on pi+ p elastic cross section: momentum in lab frame. More...
 
const std::initializer_list< double > PIPLUSP_ELASTIC_SIG
 PDG data on pi+ p elastic cross section: cross section. More...
 
static std::unique_ptr< InterpolateDataLinear< double > > piplusp_elastic_interpolation = nullptr
 An interpolation that gets lazily filled using the PIPLUSP_ELASTIC_SIG data. More...
 
const std::initializer_list< double > PIPLUSP_SIGMAPLUSKPLUS_P_LAB
 PDG data on pi+ p to Sigma+ K+ cross section: momentum in lab frame. More...
 
const std::initializer_list< double > PIPLUSP_SIGMAPLUSKPLUS_SIG
 PDG data on pi+ p to Sigma+ K+ section: cross section. More...
 
static std::unique_ptr< InterpolateDataLinear< double > > piplusp_sigmapluskplus_interpolation = nullptr
 An interpolation that gets lazily filled using the PIPLUSP_SIGMAPLUSKPLUS_SIG data. More...
 
const std::initializer_list< double > PIPLUSP_RES_SQRTS
 Center-of-mass energy. More...
 
const std::initializer_list< double > PIPLUSP_RES_SIG
 Elastic π⁺N⁺ cross section contributions from decays. More...
 
static std::unique_ptr< InterpolateDataSplinepiplusp_elastic_res_interpolation = nullptr
 A null interpolation that gets filled using the PIPLUSP_RES data. More...
 
RectangularLattice< FourVector > * UB_lat_pointer = nullptr
 Pointer to the skyrme potential on the lattice. More...
 
RectangularLattice< FourVector > * UI3_lat_pointer = nullptr
 Pointer to the symmmetry potential on the lattice. More...
 
Potentialspot_pointer = nullptr
 Pointer to a Potential class. More...
 
static constexpr int LPythia = LogArea::Pythia::id
 
static constexpr int LPauliBlocking = LogArea::PauliBlocking::id
 
static constexpr int HyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
 
static constexpr int LBox = LogArea::Box::id
 
static constexpr int LScatterAction = LogArea::ScatterAction::id
 
static constexpr int LResonances = LogArea::Resonances::id
 
static constexpr int LCollider = LogArea::Collider::id
 
static constexpr int LCrossSections = LogArea::CrossSections::id
 
static constexpr int LScatterAction = LogArea::ScatterAction::id
 
static constexpr int LCollider = LogArea::Collider::id
 
static constexpr int LDecayModes = LogArea::DecayModes::id
 
static constexpr int LDecayModes = LogArea::DecayModes::id
 
std::vector< DecayTypePtr > * all_decay_types = nullptr
 Global pointer to the decay types list. More...
 
constexpr size_t num_tab_pts = 200
 Number of tabulation points. More...
 
static Integrator integrate
 
static Integrator2d integrate2d (1E7)
 
static constexpr int LDistributions = LogArea::Distributions::id
 
static constexpr int LTmn = LogArea::Tmn::id
 
static constexpr int LFpe = LogArea::Fpe::id
 
static constexpr int LGrandcanThermalizer = LogArea::GrandcanThermalizer::id
 
static constexpr int LGrid = LogArea::Grid::id
 
static const std::initializer_list< GridBase::SizeTypeZERO {0}
 
static const std::initializer_list< GridBase::SizeTypeZERO_ONE {0, 1}
 
static const std::initializer_list< GridBase::SizeTypeMINUS_ONE_ZERO {-1, 0}
 
static const std::initializer_list< GridBase::SizeTypeMINUS_ONE_ZERO_ONE
 
static constexpr int LResonances = LogArea::Resonances::id
 
static constexpr int LHyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
 
static constexpr int LHyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
 
static constexpr int LInputParser = LogArea::InputParser::id
 
static constexpr int LParticleType = LogArea::ParticleType::id
 
static IsoParticleTypeList iso_type_list
 
static std::vector< const IsoParticleType * > iso_baryon_resonances
 
static Integrator integrate
 
static Integrator2d integrate2d
 
static std::unordered_map< std::string, TabulationNR_tabulations
 Tabulation of all N R integrals. More...
 
static std::unordered_map< std::string, TabulationpiR_tabulations
 Tabulation of all pi R integrals. More...
 
static std::unordered_map< std::string, TabulationRK_tabulations
 Tabulation of all K R integrals. More...
 
static std::unordered_map< std::string, TabulationDeltaR_tabulations
 Tabulation of all Delta R integrals. More...
 
static std::unordered_map< std::string, TabulationrhoR_tabulations
 Tabulation of all rho rho integrals. More...
 
static constexpr int LList = LogArea::List::id
 
static einhard::LogLevel global_default_loglevel = einhard::ALL
 The default logging level is ALL. More...
 
static constexpr int LNucleus = LogArea::Nucleus::id
 
static constexpr int LHyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
 
static constexpr int LParticleType = LogArea::ParticleType::id
 
static constexpr int LResonances = LogArea::Resonances::id
 
static constexpr int LPauliBlocking = LogArea::PauliBlocking::id
 
static constexpr int LPropagation = LogArea::Propagation::id
 
static constexpr int LGrandcanThermalizer = LogArea::GrandcanThermalizer::id
 
static constexpr int LHyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
 
static constexpr int LScatterAction = LogArea::ScatterAction::id
 
static constexpr int LScatterActionMulti = LogArea::ScatterActionMulti::id
 
static constexpr int LScatterAction = LogArea::ScatterAction::id
 
static constexpr int LFindScatter = LogArea::FindScatter::id
 
static constexpr int LSphere = LogArea::Sphere::id
 
static constexpr int LOutput = LogArea::Output::id
 
Interpolation objects for π+- + π-+ -> π+- + π-+ + γ processes

(opposite charge incoming pions, charged pions in final state)

static std::unique_ptr< InterpolateDataLinear< double > > pipi_pipi_opp_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepipi_pipi_opp_dsigma_dk_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepipi_pipi_opp_dsigma_dtheta_interpolation = nullptr
 
Interpolation objects for π+ + π+ -> π+ + π+ + γ and

or π- + π- -> π- + π- + γ processes (same charge incoming pions)

static std::unique_ptr< InterpolateDataLinear< double > > pipi_pipi_same_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepipi_pipi_same_dsigma_dk_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepipi_pipi_same_dsigma_dtheta_interpolation = nullptr
 
Interpolation objects for π + π0 -> π + π0 + γ processes
static std::unique_ptr< InterpolateDataLinear< double > > pipi0_pipi0_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepipi0_pipi0_dsigma_dk_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepipi0_pipi0_dsigma_dtheta_interpolation = nullptr
 
Interpolation objects for π+- + π-+ -> π0 + π0 + γ processes
static std::unique_ptr< InterpolateDataLinear< double > > pipi_pi0pi0_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepipi_pi0pi0_dsigma_dk_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepipi_pi0pi0_dsigma_dtheta_interpolation = nullptr
 
Interpolation objects for π0 + π0 -> π+- + π-+ + γ processes
static std::unique_ptr< InterpolateDataLinear< double > > pi0pi0_pipi_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepi0pi0_pipi_dsigma_dk_interpolation = nullptr
 
static std::unique_ptr< InterpolateData2DSplinepi0pi0_pipi_dsigma_dtheta_interpolation = nullptr
 

Typedef Documentation

◆ SystemTimePoint

using smash::SystemTimePoint = typedef std::chrono::time_point<std::chrono::system_clock>

Type (alias) that is used to store the current time.

Definition at line 22 of file chrono.h.

◆ SystemClock

using smash::SystemClock = typedef std::chrono::system_clock

Type (alias) used to obtain the current time via SystemClock:Now().

Definition at line 25 of file chrono.h.

◆ SystemTimeSpan

using smash::SystemTimeSpan = typedef SystemClock::duration

The time duration type (alias) used for measuring run times.

Definition at line 28 of file chrono.h.

◆ DensityLattice

Conveniency typedef for lattice of density.

Definition at line 521 of file density.h.

◆ FieldsLattice

Conveniency typedef for lattice of fields.

Definition at line 122 of file fields.h.

◆ FilePtr

using smash::FilePtr = typedef std::unique_ptr<std::FILE, FileDeleter>

A RAII type to replace std::FILE *.

This is an alias type for std::unique_ptr to automatically free the std::FILE resource after the last reference goes out of scope. It is important to use a custom deleter type, and therefore SMASH code should never use std::unique_ptr directly with std::FILE.

Definition at line 63 of file file.h.

◆ Permutation

using smash::Permutation = typedef std::vector<size_t>

Represent a permutation.

Definition at line 136 of file interpolation.h.

Enumeration Type Documentation

◆ ComputationMethod

Calculation method for the cross sections.

It has only one member at the moment. In the future there will be more options.

Enumerator
Analytic 

Definition at line 38 of file crosssectionsphoton.h.

◆ DensityType

enum smash::DensityType
strong

Allows to choose which kind of density to calculate.

The baryon density is necessary for the Skyrme potential. For the symmetry potential one needs to know the isospin density.

Enumerator
None 
Hadron 
Baryon 
BaryonicIsospin 
Pion 
Isospin3_tot 
Charge 
Strangeness 

Definition at line 36 of file density.h.

◆ HadronClass

enum smash::HadronClass
strong

Specifier to classify the different hadron species according to their quantum numbers.

Enumerator
Baryon 

All baryons.

Antibaryon 

All anti-baryons.

PositiveSMeson 

Mesons with strangeness S > 0.

NegativeSMeson 

Mesons with strangeness S < 0.

PositiveQZeroSMeson 

Non-strange mesons (S = 0) with electric cherge Q > 0.

NegativeQZeroSMeson 

Non-strange mesons (S = 0) with electric cherge Q < 0.

ZeroQZeroSMeson 

Neutral non-strange mesons.

Definition at line 153 of file grandcan_thermalizer.h.

153  {
155  Baryon = 0,
157  Antibaryon = 1,
159  PositiveSMeson = 2,
161  NegativeSMeson = 3,
167  ZeroQZeroSMeson = 6,
168 };
@ Antibaryon
All anti-baryons.
@ ZeroQZeroSMeson
Neutral non-strange mesons.
@ NegativeSMeson
Mesons with strangeness S < 0.
@ NegativeQZeroSMeson
Non-strange mesons (S = 0) with electric cherge Q < 0.
@ PositiveSMeson
Mesons with strangeness S > 0.
@ PositiveQZeroSMeson
Non-strange mesons (S = 0) with electric cherge Q > 0.

◆ GridOptions

enum smash::GridOptions : char
strong

Identifies the mode of the Grid.

Enumerator
Normal 

Without ghost cells.

PeriodicBoundaries 

With ghost cells for periodic boundaries.

Definition at line 25 of file grid.h.

25  : char {
27  Normal = 0,
30 };
@ Normal
Without ghost cells.
@ PeriodicBoundaries
With ghost cells for periodic boundaries.

◆ CellSizeStrategy

enum smash::CellSizeStrategy : char
strong

Indentifies the strategy of determining the cell size.

Enumerator
Optimal 

Look for optimal cell size.

Largest 

Make cells as large as possible.

This means a single cell for normal boundary conditions and 8 cells for periodic boundary conditions.

Definition at line 33 of file grid.h.

33  : char {
35  Optimal,
36 
43  Largest
44 };
@ Optimal
Look for optimal cell size.
@ Largest
Make cells as large as possible.

◆ CellNumberLimitation

enum smash::CellNumberLimitation : char
strong

Identifies whether the number of cells should be limited.

For the geometric criterion it makes sense to not have less than 1 particle in each cell, since the grid cell search is an optimization and the cells can be always made larger. For the stochastic collision criterion, the cell size is an important calculation parameter, which should be kept constant. The number of cells therefore cannot be limited as the medium grows even though this might be inefficient for large systems.

Enumerator
None 

No cell number limitation.

ParticleNumber 

Limit the number of cells to the number of particles.

Definition at line 55 of file grid.h.

55  : char {
57  None,
58 
61 };
@ ParticleNumber
Limit the number of cells to the number of particles.

◆ LatticeUpdate

enum smash::LatticeUpdate
strong

Enumerator option for lattice updates.

Updating the lattice is a costly operation and should be performed only if necessary. Possible needs are:

  • output: then it is enough to update lattice just before output,
  • physics: update every time step is unavoidable.
Enumerator
AtOutput 
EveryTimestep 
EveryFixedInterval 

Definition at line 36 of file lattice.h.

36  {
37  AtOutput = 0,
38  EveryTimestep = 1,
40 };

◆ BelongsTo

enum smash::BelongsTo : uint8_t
strong
Enumerator
Nothing 
Projectile 
Target 

Definition at line 20 of file particledata.h.

20  : uint8_t {
21  Nothing = 0,
22  Projectile = 1,
23  Target = 2,
24 };

◆ Parity

enum smash::Parity
strong

Represent the parity of a particle type.

Enumerator
Pos 

Positive parity.

Neg 

Negative parity.

Definition at line 24 of file particletype.h.

24  {
26  Pos,
28  Neg
29 };
@ Neg
Negative parity.
@ Pos
Positive parity.

◆ WhichDecaymodes

Decide which decay mode widths are returned in get partical widths.

Enumerator
All 

All decay mode widths.

Hadronic 

Ignore dilepton decay modes widths.

Dileptons 

Only return dilepton decays widths.

Definition at line 32 of file particletype.h.

32  {
34  All,
36  Hadronic,
38  Dileptons
39 };
@ Hadronic
Ignore dilepton decay modes widths.
@ Dileptons
Only return dilepton decays widths.

◆ ProcessType

enum smash::ProcessType
strong

Process Types are used to identify the type of the process.

Corresponding integer numbers are given explicitly, because they appear in the output.

Enumerator
None 

nothing

Elastic 

elastic scattering: particles remain the same, only momenta change

TwoToOne 

resonance formation (2->1)

TwoToTwo 

2->2 inelastic scattering

TwoToThree 

2->3 scattering

TwoToFive 

2->5 scattering

Decay 

resonance decay

Wall 

box wall crossing

Thermalization 

forced thermalization, many particles are replaced by a thermalized ensemble

HyperSurfaceCrossing 

Hypersurface crossing Particles are removed from the evolution and printed to a separate output to serve as initial conditions for hybrid models.

Bremsstrahlung 

bremsstrahlung process: a + b -> a + b + photon

MultiParticleThreeMesonsToOne 

multi particle scattering

MultiParticleThreeToTwo 
MultiParticleFiveToTwo 
StringSoftSingleDiffractiveAX 

(41-45) soft string excitations.

Here "soft" means that the process does not involve quark or gluon scattering. A string is formed by quark and antiquark, or quark and diquark, in its ends. Then this string decays. Depending on which quark and anti- (or di-)quarks are selected for string formation, the process has one of the following types. single diffractive AB->AX. Both quark and anti-/di-quark taken from B.

StringSoftSingleDiffractiveXB 

single diffractive AB->XB.

Both quark and anti-/di-quark taken from A. It makes sense to distinguish it from AB->AX, because A and B can be particles of different types, for example, a pion and a proton. It matters then, whether the pion creates a string or the proton.

StringSoftDoubleDiffractive 

double diffractive. Two strings are formed, one from A and one from B.

StringSoftAnnihilation 

a special case of baryon-antibaryon annihilation.

One pair qqbar annihilates immediately and then two strings are formed.

StringSoftNonDiffractive 

non-diffractive. Two strings are formed both have ends in A and B.

StringHard 

hard string process involving 2->2 QCD process by PYTHIA.

Here quarks do not simply form a string. They actually scatter on parton level first.

FailedString 

Soft String NNbar annihilation process can fail by lack of energy.

This is a tag we add to avoid mislabeling the events.

Definition at line 25 of file processbranch.h.

25  {
27  None = 0,
29  Elastic = 1,
31  TwoToOne = 2,
33  TwoToTwo = 3,
35  TwoToThree = 4,
37  TwoToFive = 13,
39  Decay = 5,
41  Wall = 6,
46  Thermalization = 7,
53  Bremsstrahlung = 9,
58 
89  StringHard = 46,
90 
95  FailedString = 47
96 };
@ TwoToFive
Directly create 5 pions, use with multi-particle reactions.
static constexpr int HyperSurfaceCrossing
Definition: binaryoutput.cc:22
@ FailedString
Soft String NNbar annihilation process can fail by lack of energy.
@ TwoToOne
resonance formation (2->1)
@ StringSoftDoubleDiffractive
double diffractive. Two strings are formed, one from A and one from B.
@ Bremsstrahlung
bremsstrahlung process: a + b -> a + b + photon
@ Thermalization
forced thermalization, many particles are replaced by a thermalized ensemble
@ Decay
resonance decay
@ StringSoftSingleDiffractiveXB
single diffractive AB->XB.
@ TwoToTwo
2->2 inelastic scattering
@ Wall
box wall crossing
@ StringSoftAnnihilation
a special case of baryon-antibaryon annihilation.
@ MultiParticleThreeMesonsToOne
multi particle scattering
@ StringSoftNonDiffractive
non-diffractive. Two strings are formed both have ends in A and B.
@ StringSoftSingleDiffractiveAX
(41-45) soft string excitations.
@ StringHard
hard string process involving 2->2 QCD process by PYTHIA.
@ TwoToThree
2->3 scattering

◆ Extrapolation

enum smash::Extrapolation
strong

The kind of extrapolation used by the tabulation.

Enumerator
Zero 
Const 
Linear 

Definition at line 26 of file tabulation.h.

26  {
27  Zero = 0,
28  Const = 1,
29  Linear = 2,
30 };

◆ NeedsToWrap

enum smash::NeedsToWrap
strong

The options determining what to do if a particle flies out of the grids PlusLength: Used if a periodic boundary condition is applied and a particle passes through the lower bound of the grid.

No: Used if the boundary condition is not periodic. MinusLength: Used if a periodic boundary condition is applied and a particle passes through the upper bound of the grid.

Enumerator
PlusLength 
No 
MinusLength 

Definition at line 322 of file grid.cc.

@ No
Print initial, intermediate and final-state particles.

Function Documentation

◆ operator+=()

std::vector<ActionPtr>& smash::operator+= ( std::vector< ActionPtr > &  lhs,
std::vector< ActionPtr > &&  rhs 
)
inline

Append vector of action pointers.

Parameters
[in]lhsvector of action pointers that is appended to
[in]rhsvector of action pointers that is appended
Returns
vector of action pointers containing lhs and rhs

Definition at line 514 of file action.h.

515  {
516  if (lhs.size() == 0) {
517  lhs = std::move(rhs);
518  } else {
519  lhs.insert(lhs.end(), std::make_move_iterator(rhs.begin()),
520  std::make_move_iterator(rhs.end()));
521  }
522  return lhs;
523 }

◆ enforce_periodic_boundaries()

template<typename Iterator >
static bool smash::enforce_periodic_boundaries ( Iterator  begin,
const Iterator &  end,
typename std::iterator_traits< Iterator >::value_type  length 
)
static

Enforces periodic boundaries on the given collection of values.

The values in an arbitrary container, starting from begin and ending at end, will be checked. If the value is less than 0, length will be added to it. If the value is greater than or equal to length, length will be subtracted from it.

The implementation therefore assumes that the values are at most one length away from the 0 to length range.

Template Parameters
IteratorType of the iterator.
Parameters
beginIterator pointing to the first value to check.
endEnd iterator.
lengthThe length of the valid interval.
Returns
Whether a correction was done.

Definition at line 53 of file algorithms.h.

55  {
56  bool had_to_wrap = false;
57  for (; begin != end; ++begin) {
58  auto &x = *begin;
59  if (x < 0) {
60  had_to_wrap = true;
61  x += length;
62  } else if (x >= length) {
63  had_to_wrap = true;
64  x -= length;
65  }
66  }
67  return had_to_wrap;
68 }
Here is the caller graph for this function:

◆ all_of()

template<typename Container , typename UnaryPredicate >
bool smash::all_of ( Container &&  c,
UnaryPredicate &&  p 
)
inline

Convenience wrapper for std::all_of that operates on a complete container.

Template Parameters
ContainerType of the container.
UnaryPredicateType of the predicate.
Parameters
cA container of elements to examine.
pUnary predicate.
Returns
Whether all elements in c return true when passed to p.

Definition at line 80 of file algorithms.h.

80  {
81  return std::all_of(std::begin(c), std::end(c),
82  std::forward<UnaryPredicate>(p));
83 }
constexpr int p
Proton.
bool all_of(Container &&c, UnaryPredicate &&p)
Convenience wrapper for std::all_of that operates on a complete container.
Definition: algorithms.h:80
Here is the caller graph for this function:

◆ for_each()

template<typename Container , typename UnaryFunction >
UnaryFunction smash::for_each ( Container &&  c,
UnaryFunction &&  f 
)
inline

Convenience wrapper for std::for_each that operates on a complete container.

Template Parameters
ContainerType of the container.
UnaryFunctionType of the function.
Parameters
cA container of elements on which to perform the function f
fA function to apply on all elements of the container c
Returns
The function that was applied to all elements.

Definition at line 96 of file algorithms.h.

96  {
97  return std::for_each(std::begin(c), std::end(c),
98  std::forward<UnaryFunction>(f));
99 }
UnaryFunction for_each(Container &&c, UnaryFunction &&f)
Convenience wrapper for std::for_each that operates on a complete container.
Definition: algorithms.h:96
Here is the caller graph for this function:

◆ dedup_avg()

template<typename T >
std::pair<std::vector<T>, std::vector<T> > smash::dedup_avg ( const std::vector< T > &  x,
const std::vector< T > &  y 
)

Remove duplicates from data (x, y) by averaging y.

Assumes (x, y) is sorted.

Template Parameters
TType of the values (should be floating point).
Parameters
xx-values.
yy-values.
Returns
New x and y values as a pair of vectors.

Definition at line 65 of file average.h.

66  {
67  if (x.size() != y.size()) {
68  std::stringstream ss;
69  ss << "x and y have to be of same size: " << x.size() << " != " << y.size();
70  throw std::runtime_error(ss.str());
71  }
72  if (x.size() < 1) {
73  throw std::runtime_error("x cannot be empty.");
74  }
75  std::vector<T> new_x;
76  new_x.reserve(x.size());
77  std::vector<T> new_y;
78  new_y.reserve(y.size());
79  Average<T> avg;
80  T prev_x = x[0];
81  for (size_t i = 0; i < x.size(); i++) {
82  if (x[i] == prev_x) {
83  avg.add(y[i]);
84  } else {
85  assert(i != 0);
86  new_x.push_back(x[i - 1]);
87  new_y.push_back(avg.average());
88  avg.clear();
89  avg.add(y[i]);
90  prev_x = x[i];
91  }
92  }
93  new_x.push_back(x.back());
94  new_y.push_back(avg.average());
95  return std::make_pair(std::move(new_x), std::move(new_y));
96 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clebsch_gordan()

double smash::clebsch_gordan ( const int  j_a,
const int  j_b,
const int  j_c,
const int  m_a,
const int  m_b,
const int  m_c 
)

Calculate Clebsch-Gordan coefficient \((-1)^{j_a - j_b + m_c} \sqrt{(2 j_c + 1)} \cdot [Wigner 3J symbol] \).

Parameters
[in]j_aspin of first particle
[in]j_bspin of second particle
[in]j_cspin of resonance
[in]m_aisospin of first particle
[in]m_bisospin of second particle
[in]m_cisospin of resonance
Returns
Clebsch-Gordan coefficient for coupling of particles a, b and c

Note that the calculation assumes that the spin/isospin values (j/m) have been multiplied by two (in order to be integer).

Definition at line 18 of file clebschgordan.cc.

19  {
20  const double wigner_3j = gsl_sf_coupling_3j(j_a, j_b, j_c, m_a, m_b, -m_c);
21  if (std::abs(wigner_3j) < really_small) {
22  return 0.;
23  }
24  assert((j_a - j_b + m_c) % 2 == 0);
25  const int j = (j_a - j_b + m_c) / 2;
26  double result = std::sqrt(j_c + 1) * wigner_3j;
27  result *= (j % 2 == 0) * 2 - 1; // == (-1)**j
28 
29  logg[LResonances].debug("CG: ", result, " I1: ", j_a, " I2: ", j_b,
30  " IR: ", j_c, " iz1: ", m_a, " iz2: ", m_b,
31  " izR: ", m_c);
32 
33  return result;
34 }
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
static constexpr int LResonances
constexpr double really_small
Numerical error tolerance.
Definition: constants.h:37
Here is the caller graph for this function:

◆ isospin_clebsch_gordan_sqr_2to1()

double smash::isospin_clebsch_gordan_sqr_2to1 ( const ParticleType p_a,
const ParticleType p_b,
const ParticleType Res 
)
inline

Calculate the squared isospin Clebsch-Gordan coefficient for two particles p_a and p_b coupling to a resonance Res.

Parameters
[in]p_aInformation on spin/isospin of particle a
[in]p_bInformation on spin/isospin of particle b
[in]ResInformation on spin/isospin of resonance
Returns
Clebsch-Gordan squared for 2->1 reaction

Definition at line 42 of file clebschgordan.h.

44  {
45  const double cg =
46  clebsch_gordan(p_a.isospin(), p_b.isospin(), Res.isospin(),
47  p_a.isospin3(), p_b.isospin3(), Res.isospin3());
48  return cg * cg;
49 }
double clebsch_gordan(const int j_a, const int j_b, const int j_c, const int m_a, const int m_b, const int m_c)
Calculate Clebsch-Gordan coefficient .
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isospin_clebsch_gordan_sqr_3to1()

double smash::isospin_clebsch_gordan_sqr_3to1 ( const ParticleType p_a,
const ParticleType p_b,
const ParticleType p_c,
const ParticleType Res 
)

Calculate the squared isospin Clebsch-Gordan coefficient for three particles p_a, p_b and p_c coupling to a resonance Res.

Parameters
[in]p_aInformation on spin/isospin of particle a
[in]p_bInformation on spin/isospin of particle b
[in]p_cInformation on spin/isospin of particle c
[in]ResInformation on spin/isospin of resonance
Returns
Clebsch-Gordan squared for 3->1 reaction

Definition at line 51 of file clebschgordan.cc.

54  {
55  // Calculate allowed isospin range for 3->1 reaction I_ab
56  const auto min_I_ab = std::abs(p_a.isospin() - p_b.isospin());
57  const auto max_I_ab = p_a.isospin() + p_b.isospin();
58  std::vector<int> possible_I_ab(max_I_ab - min_I_ab + 1);
59  std::iota(possible_I_ab.begin(), possible_I_ab.end(), min_I_ab);
60  std::vector<int> allowed_I_ab;
61  allowed_I_ab.reserve(possible_I_ab.size());
62  for (const auto Iab : possible_I_ab) {
63  const auto min_I = std::abs(Iab - p_c.isospin());
64  const auto max_I = Iab + p_c.isospin();
65  if (min_I <= Res.isospin() && Res.isospin() <= max_I) {
66  allowed_I_ab.push_back(Iab);
67  }
68  }
69  if (allowed_I_ab.size() != 1) {
70  throw std::runtime_error(
71  "The coupled 3-body isospin state is not uniquely defined for " +
72  Res.name() + " -> " + p_a.name() + " " + p_b.name() + " " + p_c.name());
73  }
74  const auto I_ab = allowed_I_ab[0];
75 
76  const int I_abz = p_a.isospin3() + p_b.isospin3();
77  const double cg = clebsch_gordan(I_ab, p_c.isospin(), Res.isospin(), I_abz,
78  p_c.isospin3(), Res.isospin3()) *
79  clebsch_gordan(p_a.isospin(), p_b.isospin(), I_ab,
80  p_a.isospin3(), p_b.isospin3(), I_abz);
81  return cg * cg;
82 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isospin_clebsch_gordan_sqr_2to2()

double smash::isospin_clebsch_gordan_sqr_2to2 ( const ParticleType p_a,
const ParticleType p_b,
const ParticleType p_c,
const ParticleType p_d,
const int  I = -1 
)

Calculate the squared isospin Clebsch-Gordan coefficient for a 2-to-2 reaction A + B -> C + D.

If a total isospin value I is given (doubled in order to be integer), then only contributions with that total isospin will be counted.

Parameters
[in]p_aInformation on spin/isospin of particle a
[in]p_bInformation on spin/isospin of particle b
[in]p_cInformation on spin/isospin of particle c
[in]p_dInformation on spin/isospin of particle d
[in]Itotal isospin of the reaction
Returns
Clebsch-Gordan squared for 2->2 reaction

Definition at line 84 of file clebschgordan.cc.

87  {
88  const int I_z = p_a.isospin3() + p_b.isospin3();
89 
90  /* Loop over total isospin in allowed range. */
91  double isospin_factor = 0.;
92  for (const int I_tot : I_tot_range(p_a, p_b, p_c, p_d)) {
93  if (I < 0 || I_tot == I) {
94  const double cg_in = isospin_clebsch_gordan_2to1(p_a, p_b, I_tot, I_z);
95  const double cg_out = isospin_clebsch_gordan_2to1(p_c, p_d, I_tot, I_z);
96  isospin_factor = isospin_factor + cg_in * cg_in * cg_out * cg_out;
97  }
98  }
99  return isospin_factor;
100 }
static double isospin_clebsch_gordan_2to1(const ParticleType &p_a, const ParticleType &p_b, const int I_tot, const int I_z)
Calculate isospin Clebsch-Gordan coefficient for two particles p_a and p_b coupling to a total isospi...
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cut_off()

double smash::cut_off ( const double  sigma_mb)

Cross section after cut off.

Photon cross sections diverge tremendously at the threshold which becomes particularly problematic when running with broad rho mesons. Then the actual photon cross section is used for the weight: W = Sigma_photon/Sigma_hadron. If the photon cross section diverges, the weight becomes huge and we significantly overestimate photon production. This cutoff fixes the problem.

Either the cross section is returned or, if the cross section i larger than the cut off, the cut off value is returned.

Parameters
[in]sigma_mbcross section before cut off [mb]
Returns
Cross section after cut off [mb]

Definition at line 53 of file crosssectionsphoton.cc.

53  {
54  constexpr double maximum_cross_section_photon = 200.0; // [mb]
55  return (sigma_mb > maximum_cross_section_photon)
56  ? maximum_cross_section_photon
57  : sigma_mb;
58 }
Here is the caller graph for this function:

◆ make_unique()

template<typename T , typename... Args>
std::unique_ptr<T> smash::make_unique ( Args &&...  args)
inline

Definition for make_unique Is in C++14's standard library; necessary for older compilers.

See also
http://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique

Definition at line 26 of file cxx14compat.h.

26  {
27  return std::unique_ptr<T>{new T{std::forward<Args>(args)...}};
28 }
Here is the caller graph for this function:

◆ y_l_0()

double smash::y_l_0 ( int  l,
double  cosx 
)

Spherical harmonics Y_2_0 and Y_4_0.

Parameters
[in]lAngular momentum value (2 and 4 are supported)
[in]cosxCosine of the polar angle
Returns
Value of the corresponding spherical harmonic
Exceptions
domain_errorif unsupported l is encountered

Definition at line 277 of file deformednucleus.cc.

277  {
278  if (l == 2) {
279  return (1. / 4) * std::sqrt(5 / M_PI) * (3. * (cosx * cosx) - 1);
280  } else if (l == 4) {
281  return (3. / 16) * std::sqrt(1 / M_PI) *
282  (35. * (cosx * cosx) * (cosx * cosx) - 30. * (cosx * cosx) + 3);
283  } else {
284  throw std::domain_error(
285  "Not a valid angular momentum quantum number in y_l_0.");
286  }
287 }
Here is the caller graph for this function:

◆ operator<<() [1/11]

std::ostream & smash::operator<< ( std::ostream &  os,
DensityType  dt 
)

Create the output operator for the densities.

Parameters
[out]osOutput operator for the densities
[in]dtType of density (e.g. baryon density)
Returns
An output operator for the densities

Definition at line 276 of file density.cc.

276  {
277  switch (dens_type) {
278  case DensityType::Hadron:
279  os << "hadron density";
280  break;
281  case DensityType::Baryon:
282  os << "baryon density";
283  break;
284  case DensityType::BaryonicIsospin:
285  os << "baryonic isospin density";
286  break;
287  case DensityType::Pion:
288  os << "pion density";
289  break;
290  case DensityType::Isospin3_tot:
291  os << "total isospin3 density";
292  break;
293  case DensityType::None:
294  os << "none";
295  break;
296  default:
297  os.setstate(std::ios_base::failbit);
298  }
299  return os;
300 }

◆ density_factor()

double smash::density_factor ( const ParticleType type,
DensityType  dens_type 
)

Get the factor that determines how much a particle contributes to the density type that is computed.

E.g. positive pion contributes with factor 1 to total particle density and with factor 0 to baryon density. Proton contributes with factor 1 to baryon density, anti-proton - with factor -1 to baryon density, and so on.

Parameters
[in]typetype of the particle to be tested
[in]dens_typeThe density type
Returns
The corresponding factor (0 if the particle doesn't contribute at all).

Definition at line 16 of file density.cc.

16  {
17  switch (dens_type) {
18  case DensityType::Hadron:
19  return type.is_hadron() ? 1. : 0.;
20  case DensityType::Baryon:
21  return static_cast<double>(type.baryon_number());
22  case DensityType::BaryonicIsospin:
23  return type.is_baryon() || type.is_nucleus() ? type.isospin3_rel() : 0.;
24  case DensityType::Pion:
25  return type.pdgcode().is_pion() ? 1. : 0.;
26  case DensityType::Isospin3_tot:
27  return type.is_hadron() ? type.isospin3() : 0.;
28  case DensityType::Charge:
29  return static_cast<double>(type.charge());
30  case DensityType::Strangeness:
31  return static_cast<double>(type.strangeness());
32  default:
33  return 0.;
34  }
35 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smearing_factor_norm()

double smash::smearing_factor_norm ( const double  two_sigma_sqr)
inline

Norm of the Gaussian smearing function.

Parameters
[in]two_sigma_sqr\(2 \sigma^2 \) [fm \(^2\)], \( \sigma \) - width of gaussian smearing
Returns
\( (2 \pi \sigma^2)^{3/2}\) [fm \(^3\)]

Definition at line 77 of file density.h.

77  {
78  const double tmp = two_sigma_sqr * M_PI;
79  return tmp * std::sqrt(tmp);
80 }
Here is the caller graph for this function:

◆ smearing_factor_rcut_correction()

double smash::smearing_factor_rcut_correction ( const double  rcut_in_sigma)
inline

Gaussians used for smearing are cut at radius \(r_{cut} = a \sigma \) for calculation speed-up.

In the limit of \(a \to \infty \) smearing factor is normalized to 1:

\[ \frac{4 \pi}{(2 \pi \sigma^2)^{3/2}} \int_0^{\infty} e^{-r^2/2 \sigma^2} r^2 dr = 1 \]

However, for finite \( a\) integral is less than one:

\[ g(a) \equiv \frac{4 \pi}{(2 \pi \sigma^2)^{3/2}} \int_0^{a \sigma} e^{-r^2/2 \sigma^2} r^2 dr = -\sqrt{\frac{2}{\pi}} a e^{-a^2/2} + Erf[a/\sqrt{2}] \]

This \( g(a) \) is typically close to 1. For example, for \(r_{cut} = 3 \sigma \), and thus \( a=3 \), g(3) = 0.9707; g(4) = 0.9987. The aim of this function is to compensate for this factor.

Parameters
[in]rcut_in_sigma\( a = r_{cut} / \sigma\)
Returns
\( g(a) \)

Definition at line 99 of file density.h.

99  {
100  const double x = rcut_in_sigma / std::sqrt(2.0);
101  return -2.0 / std::sqrt(M_PI) * x * std::exp(-x * x) + std::erf(x);
102 }
Here is the caller graph for this function:

◆ unnormalized_smearing_factor()

std::pair< double, ThreeVector > smash::unnormalized_smearing_factor ( const ThreeVector r,
const FourVector p,
const double  m_inv,
const DensityParameters dens_par,
const bool  compute_gradient = false 
)

Implements gaussian smearing for any quantity.

Computes smearing factor taking Lorentz contraction into account. Integral of unnormalized smearing factor over space should be \( (2 \pi \sigma^2)^{3/2} \). Division over norm is split for efficiency: it is not nice to recalculate the same constant norm at every call.

Parameters
[in]rvector from the particle to the point of interest [fm]
[in]pparticle 4-momentum to account for Lorentz contraction [GeV]
[in]m_invparticle mass, \( (E^2 - p^2)^{-1/2} \) [GeV]
[in]dens_parobject containing precomputed parameters for density calculation.
[in]compute_gradientoption, true - compute gradient, false - no
Returns
(smearing factor, the gradient of the smearing factor or a zero three vector)

Definition at line 37 of file density.cc.

39  {
40  const double r_sqr = r.sqr();
41  // Distance from particle to point of interest > r_cut
42  if (r_sqr > dens_par.r_cut_sqr()) {
43  return std::make_pair(0.0, ThreeVector(0.0, 0.0, 0.0));
44  }
45 
46  const FourVector u = p * m_inv;
47  const double u_r_scalar = r * u.threevec();
48  const double r_rest_sqr = r_sqr + u_r_scalar * u_r_scalar;
49 
50  // Lorentz contracted distance from particle to point of interest > r_cut
51  if (r_rest_sqr > dens_par.r_cut_sqr()) {
52  return std::make_pair(0.0, ThreeVector(0.0, 0.0, 0.0));
53  }
54  const double sf = std::exp(-r_rest_sqr * dens_par.two_sig_sqr_inv()) * u.x0();
55  const ThreeVector sf_grad = compute_gradient
56  ? sf * (r + u.threevec() * u_r_scalar) *
57  dens_par.two_sig_sqr_inv() * 2.0
58  : ThreeVector(0.0, 0.0, 0.0);
59 
60  return std::make_pair(sf, sf_grad);
61 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ current_eckart() [1/2]

std::tuple< double, FourVector, ThreeVector, ThreeVector, FourVector, FourVector, FourVector, FourVector > smash::current_eckart ( const ThreeVector r,
const ParticleList &  plist,
const DensityParameters par,
DensityType  dens_type,
bool  compute_gradient,
bool  smearing 
)

Calculates Eckart rest frame density and 4-current of a given density type and optionally the gradient of the density in an arbitary frame (grad j0), the curl of the 3-current, and the time, x, y, and z derivatives of the 4-current.

\[j^{\mu} = (\sqrt{2\pi} \sigma )^{-3} \sum_{i=1}^N C_i u^{\mu}_i exp \left(- \frac{(\vec r -\vec r_i + \frac{\gamma_i^2}{1 + \gamma_i} \vec \beta_i (\vec \beta_i, \vec r - \vec r_i))^2}{2\sigma^2} \right)\]

\[ \rho^{Eckart} = \sqrt{j^{\mu} j_{\mu}} \]

Here \( C_i \) is a corresponding value of "charge". If baryon current option is selected then \( C_i \) is 1 for baryons, -1 for antibaryons and 0 otherwise. For proton/neutron current \( C_i = 1\) for proton/neutron and 0 otherwise.

To avoid the problems with Eckart frame definition, densities for positive and negative charges, \(\rho_+ \) and \( \rho_-\), are computed separately and final density is \(\rho_+ - \rho_-\).

Parameters
[in]rArbitrary space point where 4-current is calculated [fm]; ignored if smearing is false
[in]plistList of all particles to be used in \(j^{\mu}\) calculation. If smearing is false or if the distance between particle and calculation point r, \( |r-r_i| > r_{cut} \) then particle input to density will be ignored.

Next four values are taken from ExperimentalParameters structure:

Parameters
[in]parSet of parameters packed in one structure. From them the cutting radius r_cut \( r_{cut} / \sigma \), number of test-particles ntest and the gaussian width gs_sigma are needed.
[in]dens_typetype of four-currect to be calculated: baryon, proton or neutron options are currently available
[in]compute_gradienttrue - compute gradient, false - no
[in]smearingwhether to use gaussian smearing or not. If false, this parameter will use ALL particles equally to calculate the current, and that as such it will not be normalized wrt volume. This should be true for any internal calculation of any quantity and only makes sense to turn off for output purposes in a box.
Returns
(rest frame density in the local Eckart frame [fm \(^{-3}\)], \( j^\mu \) as a 4-vector, \( \vec{\nabla}\cdot j^0 \) or a 0 3-vector, \( \vec{\nabla} \times \vec{j} \) or a 0 3-vector, \( \partial_t j^\mu \) or a 0 4-vector, \( \partial_x j^\mu \) or a 0 4-vector, \( \partial_y j^\mu \) or a 0 4-vector, \( \partial_z j^\mu \) or a 0 4-vector).

Definition at line 167 of file density.cc.

169  {
170  return current_eckart_impl(r, plist, par, dens_type, compute_gradient,
171  smearing);
172 }
std::tuple< double, FourVector, ThreeVector, ThreeVector, FourVector, FourVector, FourVector, FourVector > current_eckart_impl(const ThreeVector &r, const T &plist, const DensityParameters &par, DensityType dens_type, bool compute_gradient, bool smearing)
Definition: density.cc:67
Here is the call graph for this function:
Here is the caller graph for this function:

◆ current_eckart() [2/2]

std::tuple< double, FourVector, ThreeVector, ThreeVector, FourVector, FourVector, FourVector, FourVector > smash::current_eckart ( const ThreeVector r,
const Particles plist,
const DensityParameters par,
DensityType  dens_type,
bool  compute_gradient,
bool  smearing 
)

convenience overload of the above (ParticleList -> Particles)

Definition at line 175 of file density.cc.

177  {
178  return current_eckart_impl(r, plist, par, dens_type, compute_gradient,
179  smearing);
180 }
Here is the call graph for this function:

◆ update_lattice() [1/2]

template<typename T >
void smash::update_lattice ( RectangularLattice< T > *  lat,
const LatticeUpdate  update,
const DensityType  dens_type,
const DensityParameters par,
const std::vector< Particles > &  ensembles,
const bool  compute_gradient 
)

Updates the contents on the lattice.

Parameters
[out]latThe lattice on which the content will be updated
[in]updatetells if called for update at printout or at timestep
[in]dens_typedensity type to be computed on the lattice
[in]para structure containing testparticles number and gaussian smearing parameters.
[in]ensemblesthe particles vector for each ensemble
[in]compute_gradientWhether to compute the gradients
Template Parameters
TLatticeType

Definition at line 536 of file density.h.

539  {
540  // Do not proceed if lattice does not exists/update not required
541  if (lat == nullptr || lat->when_update() != update) {
542  return;
543  }
544 
545  lat->reset();
546  // get the normalization factor for the covariant Gaussian smearing
547  const double norm_factor_gaus = par.norm_factor_sf();
548  // get the volume of the cell and weights for discrete smearing
549  const double V_cell =
550  (lat->cell_sizes())[0] * (lat->cell_sizes())[1] * (lat->cell_sizes())[2];
551  // weights for coarse smearing
552  const double big = par.central_weight();
553  const double small = (1.0 - big) / 6.0;
554  // get the radii for triangular smearing
555  const std::array<double, 3> triangular_radius = {
556  par.triangular_range() * (lat->cell_sizes())[0],
557  par.triangular_range() * (lat->cell_sizes())[1],
558  par.triangular_range() * (lat->cell_sizes())[2]};
559  const double prefactor_triangular =
560  1.0 /
561  (par.ntest() * par.nensembles() * triangular_radius[0] *
562  triangular_radius[0] * triangular_radius[1] * triangular_radius[1] *
563  triangular_radius[2] * triangular_radius[2]);
564 
565  for (const Particles &particles : ensembles) {
566  for (const ParticleData &part : particles) {
567  if (par.only_participants()) {
568  // if this conditions holds, the hadron is a spectator
569  if (part.get_history().collisions_per_particle == 0) {
570  continue;
571  }
572  }
573  const double dens_factor = density_factor(part.type(), dens_type);
574  if (std::abs(dens_factor) < really_small) {
575  continue;
576  }
577  const FourVector p_mu = part.momentum();
578  const ThreeVector pos = part.position().threevec();
579 
580  // act accordingly to which smearing is used
581  if (par.smearing() == SmearingMode::CovariantGaussian) {
582  const double m = p_mu.abs();
583  if (unlikely(m < really_small)) {
584  logg[LDensity].warn("Gaussian smearing is undefined for momentum ",
585  p_mu);
586  continue;
587  }
588  const double m_inv = 1.0 / m;
589 
590  // unweighted contribution to density
591  const double common_weight = dens_factor * norm_factor_gaus;
592  lat->iterate_in_cube(
593  pos, par.r_cut(), [&](T &node, int ix, int iy, int iz) {
594  // find the weight for smearing
595  const ThreeVector r = lat->cell_center(ix, iy, iz);
596  const auto sf = unnormalized_smearing_factor(
597  pos - r, p_mu, m_inv, par, compute_gradient);
598  node.add_particle(part, sf.first * common_weight);
599  if (par.derivatives() == DerivativesMode::CovariantGaussian) {
600  node.add_particle_for_derivatives(part, dens_factor,
601  sf.second * norm_factor_gaus);
602  }
603  });
604  } else if (par.smearing() == SmearingMode::Discrete) {
605  // unweighted contribution to density
606  const double common_weight =
607  dens_factor / (par.ntest() * par.nensembles() * V_cell);
608  lat->iterate_nearest_neighbors(
609  pos, [&](T &node, int iterated_index, int center_index) {
610  node.add_particle(
611  part, common_weight *
612  // the contribution to density is weighted depending
613  // on what node it is added to
614  (iterated_index == center_index ? big : small));
615  });
616  } else if (par.smearing() == SmearingMode::Triangular) {
617  // unweighted contribution to density
618  const double common_weight = dens_factor * prefactor_triangular;
619  lat->iterate_in_rectangle(
620  pos, triangular_radius, [&](T &node, int ix, int iy, int iz) {
621  // compute the position of the node
622  const ThreeVector cell_center = lat->cell_center(ix, iy, iz);
623  // compute smearing weight
624  const double weight_x =
625  triangular_radius[0] - std::abs(cell_center[0] - pos[0]);
626  const double weight_y =
627  triangular_radius[1] - std::abs(cell_center[1] - pos[1]);
628  const double weight_z =
629  triangular_radius[2] - std::abs(cell_center[2] - pos[2]);
630  // add the contribution to the node
631  node.add_particle(part,
632  common_weight * weight_x * weight_y * weight_z);
633  });
634  }
635  } // end of for (const ParticleData &part : particles)
636  } // end of for (const Particles &particles : ensembles)
637 }
#define unlikely(x)
Tell the branch predictor that this expression is likely false.
Definition: macros.h:16
double density_factor(const ParticleType &type, DensityType dens_type)
Get the factor that determines how much a particle contributes to the density type that is computed.
Definition: density.cc:16
static constexpr int LDensity
Definition: density.h:29
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_lattice() [2/2]

void smash::update_lattice ( RectangularLattice< DensityOnLattice > *  lat,
RectangularLattice< FourVector > *  old_jmu,
RectangularLattice< FourVector > *  new_jmu,
RectangularLattice< std::array< FourVector, 4 >> *  four_grad_lattice,
const LatticeUpdate  update,
const DensityType  dens_type,
const DensityParameters par,
const std::vector< Particles > &  ensembles,
const double  time_step,
const bool  compute_gradient 
)

Updates the contents on the lattice of DensityOnLattice type.

Parameters
[out]latThe lattice of DensityOnLattice type on which the content will be updated
[in]old_jmuAuxiliary lattice, filled with current values at t0, needed for calculating time derivatives
[in]new_jmuAuxiliary lattice,filled with current values at t0 + dt, needed for calculating time derivatives
[in]four_grad_latticeAuxiliary lattice for calculating the fourgradient of the current
[in]updateTells if called for update at printout or at timestep
[in]dens_typeDensity type to be computed on the lattice
[in]para structure containing testparticles number and gaussian smearing parameters.
[in]ensemblesThe particles vector for each ensemble
[in]time_stepTime step used in the simulation
[in]compute_gradientWhether to compute the gradients

Definition at line 182 of file density.cc.

189  {
190  // Do not proceed if lattice does not exists/update not required
191  if (lat == nullptr || lat->when_update() != update) {
192  return;
193  }
194  const std::array<int, 3> lattice_n_cells = lat->n_cells();
195  const int number_of_nodes =
196  lattice_n_cells[0] * lattice_n_cells[1] * lattice_n_cells[2];
197 
198  /*
199  * Take the provided DensityOnLattice lattice and use the information about
200  * the current to create a lattice of current FourVectors. Because the lattice
201  * hasn't been updated at this point yet, it provides the t_0 time step
202  * information on the currents.
203  */
204  // copy values of jmu at t_0 onto old_jmu;
205  // proceed only if finite difference gradients are calculated
206  if (par.derivatives() == DerivativesMode::FiniteDifference) {
207  for (int i = 0; i < number_of_nodes; i++) {
208  old_jmu->assign_value(i, ((*lat)[i]).jmu_net());
209  }
210  }
211 
212  update_lattice(lat, update, dens_type, par, ensembles, compute_gradient);
213 
214  // calculate the gradients for finite difference derivatives
215  if (par.derivatives() == DerivativesMode::FiniteDifference) {
216  // copy values of jmu FourVectors at t_0 + time_step onto new_jmu
217  for (int i = 0; i < number_of_nodes; i++) {
218  new_jmu->assign_value(i, ((*lat)[i]).jmu_net());
219  }
220 
221  // compute time derivatives and gradients of all components of jmu
222  new_jmu->compute_four_gradient_lattice(*old_jmu, time_step,
223  *four_grad_lattice);
224 
225  // substitute new derivatives
226  int node_number = 0;
227  for (auto &node : *lat) {
228  auto tmp = (*four_grad_lattice)[node_number];
229  node.overwrite_djmu_dxnu(tmp[0], tmp[1], tmp[2], tmp[3]);
230  node_number++;
231  }
232  } // if (par.derivatives() == DerivativesMode::FiniteDifference)
233 
234  // calculate gradients of rest frame density
235  if (par.rho_derivatives() == RestFrameDensityDerivativesMode::On) {
236  for (auto &node : *lat) {
237  // the rest frame density
238  double rho = node.rho();
239  const int sgn = rho > 0 ? 1 : -1;
240  if (std::abs(rho) < very_small_double) {
241  rho = sgn * very_small_double;
242  }
243 
244  // the computational frame j^mu
245  const FourVector jmu = node.jmu_net();
246  // computational frame array of derivatives of j^mu
247  const std::array<FourVector, 4> djmu_dxnu = node.djmu_dxnu();
248 
249  const double drho_dt =
250  (1 / rho) *
251  (jmu.x0() * djmu_dxnu[0].x0() - jmu.x1() * djmu_dxnu[0].x1() -
252  jmu.x2() * djmu_dxnu[0].x2() - jmu.x3() * djmu_dxnu[0].x3());
253 
254  const double drho_dx =
255  (1 / rho) *
256  (jmu.x0() * djmu_dxnu[1].x0() - jmu.x1() * djmu_dxnu[1].x1() -
257  jmu.x2() * djmu_dxnu[1].x2() - jmu.x3() * djmu_dxnu[1].x3());
258 
259  const double drho_dy =
260  (1 / rho) *
261  (jmu.x0() * djmu_dxnu[2].x0() - jmu.x1() * djmu_dxnu[2].x1() -
262  jmu.x2() * djmu_dxnu[2].x2() - jmu.x3() * djmu_dxnu[2].x3());
263 
264  const double drho_dz =
265  (1 / rho) *
266  (jmu.x0() * djmu_dxnu[3].x0() - jmu.x1() * djmu_dxnu[3].x1() -
267  jmu.x2() * djmu_dxnu[3].x2() - jmu.x3() * djmu_dxnu[3].x3());
268 
269  const FourVector drho_dxnu = {drho_dt, drho_dx, drho_dy, drho_dz};
270 
271  node.overwrite_drho_dxnu(drho_dxnu);
272  }
273  } // if (par.rho_derivatives() == RestFrameDensityDerivatives::On){
274 } // void update_lattice()
int sgn(T val)
Signum function.
Definition: random.h:190
void update_lattice(RectangularLattice< T > *lat, const LatticeUpdate update, const DensityType dens_type, const DensityParameters &par, const std::vector< Particles > &ensembles, const bool compute_gradient)
Updates the contents on the lattice.
Definition: density.h:536
constexpr double very_small_double
A very small double, used to avoid division by zero.
Definition: constants.h:40
Here is the call graph for this function:

◆ breit_wigner()

double smash::breit_wigner ( double  m,
double  pole,
double  width 
)

Returns a relativistic Breit-Wigner distribution.

The normalization is such that the integration over \( \sqrt{s} \) from 0 to infinity yields one.

Parameters
[in]mArgument of the Breit-Wigner function (off-shell mass m in GeV)
[in]poleResonance pole mass \( m_0 \) in GeV
[in]widthResonance width \( \Gamma \) in GeV
Returns
\( \frac{2}{\pi} \frac{m^2\Gamma}{(m^2-m_0^2)^2 + m^2\Gamma^2} \)

Definition at line 24 of file distributions.cc.

24  {
25  const double msqr = m * m;
26  const double dmsqr = msqr - pole * pole;
27  return 2. * msqr * width / (M_PI * (dmsqr * dmsqr + msqr * width * width));
28 }
Here is the caller graph for this function:

◆ breit_wigner_nonrel()

double smash::breit_wigner_nonrel ( double  m,
double  pole,
double  width 
)

Returns a non-relativistic Breit-Wigner distribution, which is essentially a Cauchy distribution with half width.

Parameters
[in]mArgument of the Breit-Wigner function (off-shell mass m in GeV)
[in]poleresonance pole mass \( m_0 \) in GeV
[in]widthresonance width \( \Gamma \) in GeV
Returns
\( \frac{\Gamma/2}{\pi ((m-m_0)^2+\Gamma^2/4)}\)

Definition at line 31 of file distributions.cc.

31  {
32  return cauchy(m, pole, width / 2.);
33 }
double cauchy(double x, double pole, double width)
Returns a Cauchy distribution (sometimes also called Lorentz or non-relativistic Breit-Wigner distrib...
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cauchy()

double smash::cauchy ( double  x,
double  pole,
double  width 
)

Returns a Cauchy distribution (sometimes also called Lorentz or non-relativistic Breit-Wigner distribution) with the given parameters.

The normalization is such that integrating over x from -infinity to +infinity yields one.

Parameters
xArgument of the Cauchy function in GeV.
polePole parameter \( m_0 \) of the Cauchy function in GeV, i.e. location of the peak.
widthWidth parameter \( \Gamma \) of the Cauchy function in GeV, determining the sharpness of the peak.
Returns
\( \frac{\Gamma}{\pi ((x-m_0)^2+\Gamma^2)}\)

Definition at line 36 of file distributions.cc.

36  {
37  const double dm = x - pole;
38  return width / (M_PI * (dm * dm + width * width));
39 }
Here is the caller graph for this function:

◆ density_integrand()

double smash::density_integrand ( const double  energy,
const double  momentum_sqr,
const double  temperature 
)

Returns the Maxwell-Boltzmann distribution.

Todo:
rename the following 4 functions to make clear what they are and check if they are actually used
Parameters
[in]energy\(E\) (in GeV)
[in]momentum_sqrsquared \(p\) (in GeV \(^2\))
[in]temperature\(T\) (in GeV)
Returns
\(4\pi p^2 \exp{-\frac{E}{T}}\)

Definition at line 42 of file distributions.cc.

43  {
44  return 4.0 * M_PI * momentum_sqr * std::exp(-energy / temperature);
45 }

◆ density_integrand_mass()

double smash::density_integrand_mass ( const double  energy,
const double  momentum_sqr,
const double  temperature 
)

density_integrand_mass - off_equilibrium distribution for massive particles

Parameters
[in]energy\(E\) (in GeV)
[in]momentum_sqrsquared \(p\) (in GeV \(^2\))
[in]temperature\(T\) (in GeV)
Returns

\[f=pe^{-\frac{\sqrt{m^2+p^2}}{T_0}}\]

Definition at line 47 of file distributions.cc.

48  {
49  return momentum_sqr * std::sqrt(momentum_sqr) *
50  std::exp(-energy / temperature);
51 }
Here is the caller graph for this function:

◆ density_integrand_1M_IC()

double smash::density_integrand_1M_IC ( const double  energy,
const double  momentum_sqr,
const double  temperature 
)

density integrand - 1M_IC massless particles for expanding metric initialization, see Bazow:2016oky [6]

Parameters
[in]energy\(E\) (in GeV)
[in]momentum_sqrsquared \(p\) (in GeV \(^2\))
[in]temperature\(T\) (in GeV)
Returns
Value of function 1M_IC

Definition at line 53 of file distributions.cc.

54  {
55  return ((3.0 / 20.0) * (momentum_sqr / (temperature * temperature)) -
56  (6.0 / 5.0) * (energy / temperature) + (14.0 / 5.0)) *
57  std::exp(-energy / temperature) * momentum_sqr;
58 }
Here is the caller graph for this function:

◆ density_integrand_2M_IC()

double smash::density_integrand_2M_IC ( const double  energy,
const double  momentum_sqr,
const double  temperature 
)

density integrand - 2M_IC massless particles for expanding metric initialization, see Bazow:2016oky [6]

Parameters
[in]energy\(E\) (in GeV)
[in]momentum_sqrsquared \(p\) (in GeV \(^2\))
[in]temperature\(T\) (in GeV)
Returns
Value of function 2M_IC

Definition at line 60 of file distributions.cc.

61  {
62  return (0.75 + 0.125 * (momentum_sqr / (temperature * temperature)) -
63  (1.0 / 30.0) * (momentum_sqr * energy /
64  (temperature * temperature * temperature)) +
65  (1.0 / 480.0) *
66  (momentum_sqr * momentum_sqr /
67  (temperature * temperature * temperature * temperature))) *
68  std::exp(-energy / temperature) * momentum_sqr;
69 }
Here is the caller graph for this function:

◆ juttner_distribution_func()

double smash::juttner_distribution_func ( double  momentum_radial,
double  mass,
double  temperature,
double  effective_chemical_potential,
double  statistics 
)

Relativistic Juttner distribution function is just a convenience wrapper for displaying Fermi, Bose, and Boltzmann distributions in one mathematical form.

Juttner distribution is a unified way of introducing quantum thermal distributions, in which the "statistics" variable controls the type of the distribution used: statistics = 0: Boltzmann distribution statistics = -1: Bose distribution statistics = +1: Fermi distribution.

Parameters
[in]momentum_radiallength of the momentum vector [GeV]
[in]mass(pole) mass of the particle species [GeV]
[in]temperaturetemperature of the system [GeV]
[in]effective_chemical_potentialeffective chemical potential of the system [GeV]
[in]statisticsquantum statistics of the particles species (+1 for Fermi, -1 for Bose, 0 for Boltzmann)
Returns
the Juttner distribution function

Definition at line 79 of file distributions.cc.

82  {
83  const double Boltzmann_factor =
84  std::exp(-(std::sqrt(momentum_radial * momentum_radial + mass * mass) -
85  effective_chemical_potential) /
86  temperature);
87  // exp(-x) / [1 + exp(-x)] is numerically more stable than 1 / [exp(x) + 1]
88  return Boltzmann_factor / (1 + statistics * Boltzmann_factor);
89 }
Here is the caller graph for this function:

◆ sample_momenta_non_eq_mass()

double smash::sample_momenta_non_eq_mass ( const double  temperature,
const double  mass 
)

Samples a momentum via rejection method from the non-equilibrium distribution.

\[f=pe^{-\frac{\sqrt{m^2+p^2}}{T_0}}\]

See also
density_integrand_mass
Parameters
[in]temperatureTemperature \(T\) [GeV]
[in]massMass of the particle: \(m = \sqrt{E^2 - p^2}\) [GeV]
Returns
one possible momentum between mass and 50 GeV

Definition at line 91 of file distributions.cc.

91  {
92  logg[LDistributions].debug("Sample momenta with mass ", mass, " and T ",
93  temperature);
94 
95  /* Calculate range on momentum values to use
96  * ideally 0.0 and as large as possible but we want to be efficient! */
97  const double mom_min = 0.0;
98  const double mom_max =
99  std::sqrt(50. * 50. * temperature * temperature - mass * mass);
100  /* Calculate momentum and energy values that will give
101  * maxima of density_integrand_mass, verified by differentiation */
102  const double p_non_eq_sq =
103  0.5 * (9 * temperature * temperature +
104  temperature *
105  std::sqrt(81 * temperature * temperature + 36 * mass * mass));
106  const double e_non_eq = std::sqrt(p_non_eq_sq + mass * mass);
107  const double probability_max =
108  2. * density_integrand_mass(e_non_eq, p_non_eq_sq, temperature);
109 
110  /* sample by rejection method: (see numerical recipes for more efficient)
111  * random momenta and random probability need to be below the distribution */
112  double energy, momentum_radial, probability;
113  do {
114  // sample uniformly in momentum, DONT sample uniformly in energy!
115  momentum_radial = random::uniform(mom_min, mom_max);
116  // Energy by on-shell condition
117  energy = std::sqrt(momentum_radial * momentum_radial + mass * mass);
118  probability = density_integrand_mass(
119  energy, momentum_radial * momentum_radial, temperature);
120  } while (random::uniform(0., probability_max) > probability);
121 
122  return momentum_radial;
123 }
T uniform(T min, T max)
Definition: random.h:88
static constexpr int LDistributions
double density_integrand_mass(const double energy, const double momentum_sqr, const double temperature)
density_integrand_mass - off_equilibrium distribution for massive particles
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sample_momenta_1M_IC()

double smash::sample_momenta_1M_IC ( const double  temperature,
const double  mass 
)

Samples a momentum from the non-equilibrium distribution 1M_IC from Bazow:2016oky [6].

See also
density_integrand_1M_IC
Parameters
[in]temperatureTemperature \(T\) [GeV]
[in]massMass of the particle: \(m = \sqrt{E^2 - p^2}\) [GeV]
Returns
one possible momentum between mass and 50 GeV

Definition at line 125 of file distributions.cc.

125  {
126  logg[LDistributions].debug("Sample momenta with mass ", mass, " and T ",
127  temperature);
128  // Maxwell-Boltzmann average E <E>=3T + m * K_1(m/T) / K_2(m/T)
129  double energy_average;
130  if (mass > 0.) {
131  // massive particles
132  const double m_over_T = mass / temperature;
133  energy_average = 3 * temperature + mass * gsl_sf_bessel_K1(m_over_T) /
134  gsl_sf_bessel_Kn(2, m_over_T);
135  } else {
136  // massless particles
137  energy_average = 3 * temperature;
138  }
139  const double momentum_average_sqr =
140  (energy_average - mass) * (energy_average + mass);
141  const double energy_min = mass;
142  const double energy_max = 50. * temperature;
143  /* 16 * the massless peak value to be well above maximum of the
144  * distribution */
145  const double probability_max =
146  16. * density_integrand_1M_IC(energy_average, momentum_average_sqr,
147  temperature);
148 
149  /* sample by rejection method: (see numerical recipes for more efficient)
150  * random momenta and random probability need to be below the distribution */
151  double momentum_radial_sqr, probability;
152  do {
153  double energy = random::uniform(energy_min, energy_max);
154  momentum_radial_sqr = (energy - mass) * (energy + mass);
155  probability =
156  density_integrand_1M_IC(energy, momentum_radial_sqr, temperature);
157  } while (random::uniform(0., probability_max) > probability);
158 
159  return std::sqrt(momentum_radial_sqr);
160 }
double density_integrand_1M_IC(const double energy, const double momentum_sqr, const double temperature)
density integrand - 1M_IC massless particles for expanding metric initialization, see Bazow:2016oky
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sample_momenta_2M_IC()

double smash::sample_momenta_2M_IC ( const double  temperature,
const double  mass 
)

Samples a momentum from the non-equilibrium distribution 2M_IC from Bazow:2016oky [6].

See also
density_integrand_2M_IC
Parameters
[in]temperatureTemperature \(T\) [GeV]
[in]massMass of the particle: \(m = \sqrt{E^2 - p^2}\) [GeV]
Returns
one possible momentum between mass and 50 GeV

Definition at line 162 of file distributions.cc.

162  {
163  logg[LDistributions].debug("Sample momenta with mass ", mass, " and T ",
164  temperature);
165  /* Maxwell-Boltzmann average E <E>=3T + m * K_1(m/T) / K_2(m/T) */
166  double energy_average;
167  if (mass > 0.) {
168  // massive particles
169  const double m_over_T = mass / temperature;
170  energy_average = 3 * temperature + mass * gsl_sf_bessel_K1(m_over_T) /
171  gsl_sf_bessel_Kn(2, m_over_T);
172  } else {
173  // massless particles
174  energy_average = 3 * temperature;
175  }
176  const double momentum_average_sqr =
177  (energy_average - mass) * (energy_average + mass);
178  const double energy_min = mass;
179  const double energy_max = 50. * temperature;
180  /* 16 * the massless peak value to be well above maximum of the
181  * distribution */
182  const double probability_max =
183  16. * density_integrand_2M_IC(energy_average, momentum_average_sqr,
184  temperature);
185 
186  /* sample by rejection method: (see numerical recipes for more efficient)
187  * random momenta and random probability need to be below the distribution */
188  double momentum_radial_sqr, probability;
189  do {
190  double energy = random::uniform(energy_min, energy_max);
191  momentum_radial_sqr = (energy - mass) * (energy + mass);
192  probability =
193  density_integrand_2M_IC(energy, momentum_radial_sqr, temperature);
194  } while (random::uniform(0., probability_max) > probability);
195 
196  return std::sqrt(momentum_radial_sqr);
197 }
double density_integrand_2M_IC(const double energy, const double momentum_sqr, const double temperature)
density integrand - 2M_IC massless particles for expanding metric initialization, see Bazow:2016oky
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sample_momenta_from_thermal()

double smash::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 [40]) APPENDIX: ALGORITHM FOR GENERATING PARTICLES math trick: for \( x^{n-1}e^{-x} \) distribution, sample x by: \( x = -ln(r_1 r_2 r_3 ... r_n) \) where \( r_i \) are uniform random numbers between [0,1) for \( T/m > 0.6 \): \( p^2 e^{-E/T} = p^2 e^{-p/T} * e^{(p-E)/T} \), where \( e^{(p-E)/T}\) is used as rejection weight.

Since \(T/m > 0.6 \), \( e^{(p-E)/T}\) is close to 1. for \( T/m < 0.6 \), there are many rejections another manipulation is used: \( p^2 e^{-E/T} dp = dE \frac{E}{p} p^2 e^{-E/T} \) \( = dK \frac{p}{E} (K+m)^2 e^{-K/T} e^{-m/T} \) \( = dK (K^2 + 2mK + m^2) e^{-K/T} \frac{p}{E}\) where \( \frac{p}{E} \) is used as rejection weight.

Parameters
[in]temperatureTemperature \(T\) [GeV]
[in]massMass of the particle: \(m = \sqrt{E^2 - p^2}\) [GeV]
Returns
one possible momentum

Definition at line 199 of file distributions.cc.

200  {
201  logg[LDistributions].debug("Sample momenta with mass ", mass, " and T ",
202  temperature);
203  double momentum_radial, energy;
204  // when temperature/mass
205  if (temperature > 0.6 * mass) {
206  while (true) {
207  const double a = -std::log(random::canonical_nonzero());
208  const double b = -std::log(random::canonical_nonzero());
209  const double c = -std::log(random::canonical_nonzero());
210  momentum_radial = temperature * (a + b + c);
211  energy = std::sqrt(momentum_radial * momentum_radial + mass * mass);
212  if (random::canonical() <
213  std::exp((momentum_radial - energy) / temperature)) {
214  break;
215  }
216  }
217  } else {
218  while (true) {
219  const double r0 = random::canonical();
220  const double I1 = mass * mass;
221  const double I2 = 2.0 * mass * temperature;
222  const double I3 = 2.0 * temperature * temperature;
223  const double Itot = I1 + I2 + I3;
224  double K;
225  if (r0 < I1 / Itot) {
226  const double r1 = random::canonical_nonzero();
227  K = -temperature * std::log(r1);
228  } else if (r0 < (I1 + I2) / Itot) {
229  const double r1 = random::canonical_nonzero();
230  const double r2 = random::canonical_nonzero();
231  K = -temperature * std::log(r1 * r2);
232  } else {
233  const double r1 = random::canonical_nonzero();
234  const double r2 = random::canonical_nonzero();
235  const double r3 = random::canonical_nonzero();
236  K = -temperature * std::log(r1 * r2 * r3);
237  }
238  energy = K + mass;
239  momentum_radial = std::sqrt((energy + mass) * (energy - mass));
240  if (random::canonical() < momentum_radial / energy) {
241  break;
242  }
243  }
244  }
245  return momentum_radial;
246 }
T canonical_nonzero()
Definition: random.h:122
T canonical()
Definition: random.h:113
static const uint32_t K[64]
The K array.
Definition: sha256.cc:70
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sample_momenta_IC_ES()

double smash::sample_momenta_IC_ES ( const double  temperature)

Sample momenta according to the momentum distribution in Bazow:2016oky [6].

Parameters
[in]temperatureThe temperature for the distribution [GeV]
Returns
Radial momentum

Definition at line 248 of file distributions.cc.

248  {
249  double momentum_radial;
250  const double a = -std::log(random::canonical_nonzero());
251  const double b = -std::log(random::canonical_nonzero());
252  const double c = -std::log(random::canonical_nonzero());
253  const double d = -std::log(random::canonical_nonzero());
254  momentum_radial = (3.0 / 4.0) * temperature * (a + b + c + d);
255 
256  return momentum_radial;
257 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator+() [1/3]

EnergyMomentumTensor smash::operator+ ( EnergyMomentumTensor  a,
const EnergyMomentumTensor b 
)
inline

Direct addition operator.

Definition at line 163 of file energymomentumtensor.h.

164  {
165  a += b;
166  return a;
167 }

◆ operator-() [1/4]

EnergyMomentumTensor smash::operator- ( EnergyMomentumTensor  a,
const EnergyMomentumTensor b 
)
inline

Direct subtraction operator.

Definition at line 177 of file energymomentumtensor.h.

178  {
179  a -= b;
180  return a;
181 }

◆ operator*() [1/8]

EnergyMomentumTensor smash::operator* ( EnergyMomentumTensor  a,
const double  b 
)
inline

Direct multiplication operator.

Definition at line 190 of file energymomentumtensor.h.

190  {
191  a *= b;
192  return a;
193 }

◆ operator*() [2/8]

EnergyMomentumTensor smash::operator* ( const double  a,
EnergyMomentumTensor  b 
)
inline

Direct multiplication operator.

Definition at line 195 of file energymomentumtensor.h.

195  {
196  b *= a;
197  return b;
198 }

◆ operator/() [1/3]

EnergyMomentumTensor smash::operator/ ( EnergyMomentumTensor  a,
const double  b 
)
inline

Direct division operator.

Definition at line 207 of file energymomentumtensor.h.

207  {
208  a /= b;
209  return a;
210 }

◆ operator<<() [2/11]

template<typename Modus >
std::ostream & smash::operator<< ( std::ostream &  out,
const Experiment< Modus > &  e 
)

Creates a verbose textual description of the setup of the Experiment.

Writes the initial state for the Experiment to the output stream.

It automatically appends the output of the current Modus.

Definition at line 634 of file experiment.h.

634  {
635  out << "End time: " << e.end_time_ << " fm/c\n";
636  out << e.modus_;
637  return out;
638 }

◆ create_experiment_parameters()

ExperimentParameters smash::create_experiment_parameters ( Configuration  config)

Gathers all general Experiment parameters.

Parameters
[in,out]configConfiguration element
Returns
The ExperimentParameters struct filled with values from the Configuration

The maximum around 200 mb occurs in the Delta peak of the pi+p cross section. Many SMASH cross sections diverge at the threshold, these divergent parts are effectively cut off. If deuteron production via d' is considered, then the default should be increased to 2000 mb to function correctly (see Oliinychenko:2018ugs [38]). If the cross sections are globally scaled, the maximum cross section is also scaled.

The maximum around 200 mb occurs in the Delta peak of the pi+p cross section. Many SMASH cross sections diverge at the threshold, these divergent parts are effectively cut off. If deuteron production via d' is considered, then the default should be increased to 2000 mb to function correctly (see Oliinychenko:2018ugs [38]). If the cross sections are globally scaled, the maximum cross section is also scaled.

Definition at line 474 of file experiment.cc.

474  {
476 
477  const int ntest = config.take({"General", "Testparticles"}, 1);
478  if (ntest <= 0) {
479  throw std::invalid_argument("Testparticle number should be positive!");
480  }
481 
482  // sets whether to consider only participants in thermodynamic outputs or not
483  const bool only_participants =
484  config.take({"Output", "Thermodynamics", "Only_Participants"}, false);
485 
486  if (only_participants && config.has_value({"Potentials"})) {
487  throw std::invalid_argument(
488  "Only_Participants option cannot be "
489  "set to True when using Potentials.");
490  }
491 
492  const std::string modus_chooser = config.take({"General", "Modus"});
493  // remove config maps of unused Modi
494  config["Modi"].remove_all_but(modus_chooser);
495 
496  double box_length = -1.0;
497  if (config.has_value({"Modi", "Box", "Length"})) {
498  box_length = config.read({"Modi", "Box", "Length"});
499  }
500 
501  if (config.has_value({"Modi", "ListBox", "Length"})) {
502  box_length = config.read({"Modi", "ListBox", "Length"});
503  }
504 
505  /* If this Delta_Time option is absent (this can be for timestepless mode)
506  * just assign 1.0 fm/c, reasonable value will be set at event initialization
507  */
508  const double dt = config.take({"General", "Delta_Time"}, 1.);
509  const double t_end = config.read({"General", "End_Time"});
510 
511  // Enforce a small time step, if the box modus is used
512  if (box_length > 0.0 && dt > box_length / 10.0) {
513  throw std::invalid_argument(
514  "Please decrease the timestep size. "
515  "A value of (dt < l_box / 10) is recommended in the boxmodus.");
516  }
517 
518  // define output clock
519  std::unique_ptr<Clock> output_clock = nullptr;
520  if (config.has_value({"Output", "Output_Times"})) {
521  if (config.has_value({"Output", "Output_Interval"})) {
522  throw std::invalid_argument(
523  "Please specify either Output_Interval or Output_Times");
524  }
525  std::vector<double> output_times = config.take({"Output", "Output_Times"});
526  // Add an output time larger than the end time so that the next time is
527  // always defined during the time evolution
528  output_times.push_back(t_end + 1.);
529  output_clock = make_unique<CustomClock>(output_times);
530  } else {
531  const double output_dt = config.take({"Output", "Output_Interval"}, t_end);
532  output_clock = make_unique<UniformClock>(0.0, output_dt);
533  }
534 
535  // Add proper error messages if photons are not configured properly.
536  // 1) Missing Photon config section.
537  if (config["Output"].has_value({"Photons"}) &&
538  (!config.has_value({"Collision_Term", "Photons"}))) {
539  throw std::invalid_argument(
540  "Photon output is enabled although photon production is disabled. "
541  "Photon production can be configured in the \"Photon\" subsection "
542  "of the \"Collision_Term\".");
543  }
544 
545  // 2) Missing Photon output section.
546  bool missing_output_2to2 = false;
547  bool missing_output_brems = false;
548  if (!(config["Output"].has_value({"Photons"}))) {
549  if (config.has_value({"Collision_Term", "Photons", "2to2_Scatterings"})) {
550  missing_output_2to2 =
551  config.read({"Collision_Term", "Photons", "2to2_Scatterings"});
552  }
553  if (config.has_value({"Collision_Term", "Photons", "Bremsstrahlung"})) {
554  missing_output_brems =
555  config.read({"Collision_Term", "Photons", "Bremsstrahlung"});
556  }
557 
558  if (missing_output_2to2 || missing_output_brems) {
559  throw std::invalid_argument(
560  "Photon output is disabled although photon production is enabled. "
561  "Please enable the photon output.");
562  }
563  }
564 
565  // Add proper error messages if dileptons are not configured properly.
566  // 1) Missing Dilepton config section.
567  if (config["Output"].has_value({"Dileptons"}) &&
568  (!config.has_value({"Collision_Term", "Dileptons"}))) {
569  throw std::invalid_argument(
570  "Dilepton output is enabled although dilepton production is disabled. "
571  "Dilepton production can be configured in the \"Dileptons\" subsection "
572  "of the \"Collision_Term\".");
573  }
574 
575  // 2) Missing Dilepton output section.
576  bool missing_output_decays = false;
577  if (!(config["Output"].has_value({"Dileptons"}))) {
578  if (config.has_value({"Collision_Term", "Dileptons", "Decays"})) {
579  missing_output_decays =
580  config.read({"Collision_Term", "Dileptons", "Decays"});
581  }
582 
583  if (missing_output_decays) {
584  throw std::invalid_argument(
585  "Dilepton output is disabled although dilepton production is "
586  "enabled. "
587  "Please enable the dilepton output.");
588  }
589  }
590 
591  auto config_coll = config["Collision_Term"];
592  /* Elastic collisions between the nucleons with the square root s
593  * below low_snn_cut are excluded. */
594  const double low_snn_cut =
595  config_coll.take({"Elastic_NN_Cutoff_Sqrts"}, 1.98);
596  const auto proton = ParticleType::try_find(pdg::p);
597  const auto pion = ParticleType::try_find(pdg::pi_z);
598  if (proton && pion &&
599  low_snn_cut > proton->mass() + proton->mass() + pion->mass()) {
600  logg[LExperiment].warn("The cut-off should be below the threshold energy",
601  " of the process: NN to NNpi");
602  }
603  const bool potential_affect_threshold =
604  config.take({"Lattice", "Potentials_Affect_Thresholds"}, false);
605  const double scale_xs = config_coll.take({"Cross_Section_Scaling"}, 1.0);
606 
607  const auto criterion =
608  config_coll.take({"Collision_Criterion"}, CollisionCriterion::Covariant);
609 
610  if (config_coll.has_value({"Fixed_Min_Cell_Length"}) &&
611  criterion != CollisionCriterion::Stochastic) {
612  throw std::invalid_argument(
613  "Only use a fixed minimal cell length with the stochastic collision "
614  "criterion.");
615  }
616  if (config_coll.has_value({"Maximum_Cross_Section"}) &&
617  criterion == CollisionCriterion::Stochastic) {
618  throw std::invalid_argument(
619  "Only use maximum cross section with the "
620  "geometric collision criterion. Use Fixed_Min_Cell_Length to change "
621  "the grid "
622  "size for the stochastic criterion.");
623  }
624 
633  const double maximum_cross_section_default =
634  ParticleType::exists("d'") ? 2000.0 : 200.0;
635 
636  bool cll_in_nucleus =
637  config.take({"Modi", "Collider", "Collisions_Within_Nucleus"}, false);
638  double maximum_cross_section = config_coll.take(
639  {"Maximum_Cross_Section"}, maximum_cross_section_default);
640  maximum_cross_section *= scale_xs;
641  return {make_unique<UniformClock>(0.0, dt),
642  std::move(output_clock),
643  config.take({"General", "Ensembles"}, 1),
644  ntest,
645  config.take({"General", "Derivatives_Mode"},
647  config.has_value({"Potentials", "VDF"})
650  config.take({"General", "Field_Derivatives_Mode"},
652  config.take({"General", "Smearing_Mode"},
654  config.take({"General", "Gaussian_Sigma"}, 1.),
655  config.take({"General", "Gauss_Cutoff_In_Sigma"}, 4.),
656  config.take({"General", "Discrete_Weight"}, 1. / 3.0),
657  config.take({"General", "Triangular_Range"}, 2.0),
658  criterion,
659  config_coll.take({"Two_to_One"}, true),
660  config_coll.take({"Included_2to2"}, ReactionsBitSet().set()),
661  config_coll.take({"Multi_Particle_Reactions"},
662  MultiParticleReactionsBitSet().reset()),
663  config_coll.take({"Strings"}, modus_chooser != "Box"),
664  config_coll.take({"Use_AQM"}, true),
665  config_coll.take({"Resonance_Lifetime_Modifier"}, 1.),
666  config_coll.take({"Strings_with_Probability"}, true),
667  config_coll.take({"NNbar_Treatment"}, NNbarTreatment::Strings),
668  low_snn_cut,
669  potential_affect_threshold,
670  box_length,
671  maximum_cross_section,
672  config_coll.take({"Fixed_Min_Cell_Length"}, 2.5),
673  cll_in_nucleus,
674  scale_xs,
675  config_coll.take({"Additional_Elastic_Cross_Section"}, 0.0),
676  only_participants};
677 }
std::bitset< 10 > ReactionsBitSet
Container for the 2 to 2 reactions in the code.
@ Strings
Use string fragmentation.
@ Stochastic
Stochastic Criteiron.
@ Covariant
Covariant Criterion.
std::bitset< 3 > MultiParticleReactionsBitSet
Container for the n to m reactions in the code.
#define SMASH_SOURCE_LOCATION
Hackery that is required to output the location in the source code where the log statement occurs.
Definition: logging.h:243
constexpr int pi_z
π⁰.
static constexpr int LExperiment
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hline()

const std::string smash::hline ( 113  ,
'-'   
)

String representing a horizontal line.

Here is the caller graph for this function:

◆ format_measurements()

std::string smash::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.

Parameters
[in]ensemblesThe simulated particles: one Particles object per ensemble. The information about particles is used to check the conservation of the total energy and momentum as well as print other useful information.
[in]scatterings_this_intervalNumber of the scatterings occur within the current timestep.
[in]conserved_initialInitial quantum numbers needed to check the conservations.
[in]time_startMoment in the REAL WORLD when SMASH starts to run [s].
[in]timeCurrent moment in SMASH [fm/c].
[in]E_mean_fieldValue of the mean-field contribution to the total energy of the system at the current time.
[in]E_mean_field_initialValue of the mean-field contribution to the total energy of the system at t=0.
Returns
'Current time in SMASH [fm/c]', 'Total kinetic energy in the system [GeV]', 'Total mean field energy in the system [GeV]', 'Total energy in the system [GeV]', 'Total energy per particle [GeV]', 'Deviation of the energy per particle from the initial value [GeV]', 'Number of scatterings that occurred within the timestep', 'Total particle number', 'Computing time consumed'.

Definition at line 679 of file experiment.cc.

684  {
685  const SystemTimeSpan elapsed_seconds = SystemClock::now() - time_start;
686 
687  const QuantumNumbers current_values(ensembles);
688  const QuantumNumbers difference = current_values - conserved_initial;
689  int total_particles = 0;
690  for (const Particles &particles : ensembles) {
691  total_particles += particles.size();
692  }
693 
694  // Make sure there are no FPEs in case of IC output, were there will
695  // eventually be no more particles in the system
696  const double current_energy = current_values.momentum().x0();
697  const double energy_per_part =
698  (total_particles > 0) ? (current_energy + E_mean_field) / total_particles
699  : 0.0;
700 
701  std::ostringstream ss;
702  // clang-format off
703  ss << field<7, 3> << time
704  // total kinetic energy in the system
705  << field<11, 3> << current_energy
706  // total mean field energy in the system
707  << field<11, 3> << E_mean_field
708  // total energy in the system
709  << field<12, 3> << current_energy + E_mean_field
710  // total energy per particle in the system
711  << field<12, 6> << energy_per_part;
712  // change in total energy per particle (unless IC output is enabled)
713  if (total_particles == 0) {
714  ss << field<13, 6> << "N/A";
715  } else {
716  ss << field<13, 6> << (difference.momentum().x0()
717  + E_mean_field - E_mean_field_initial)
718  / total_particles;
719  }
720  ss << field<14, 3> << scatterings_this_interval
721  << field<10, 3> << total_particles
722  << field<9, 3> << elapsed_seconds;
723  // clang-format on
724  return ss.str();
725 }
SystemClock::duration SystemTimeSpan
The time duration type (alias) used for measuring run times.
Definition: chrono.h:28
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_mean_field_energy()

double smash::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 running.

Using the baryon density lattice is necessary.

Parameters
[in]potentialsParameters of the potentials used in the simulation.
[in]jmu_B_latLattice of baryon density and baryon current values as well as their gradients at each lattice node.
[in]em_latticeLattice containing the electric and magnetic field in fm^-2
[in]parametersParameters of the experiment, needed for the access to the number of testparticles.
Returns
Total mean field energy in the Box.

Definition at line 727 of file experiment.cc.

731  {
732  // basic parameters and variables
733  const double V_cell = (jmuB_lat.cell_sizes())[0] *
734  (jmuB_lat.cell_sizes())[1] * (jmuB_lat.cell_sizes())[2];
735 
736  double E_mean_field = 0.0;
737  double density_mean = 0.0;
738  double density_variance = 0.0;
739 
740  /*
741  * We anticipate having other options, like the vector DFT potentials, in the
742  * future, hence we include checking which potentials are used.
743  */
744  if (potentials.use_skyrme()) {
745  /*
746  * Calculating the symmetry energy contribution to the total mean field
747  * energy in the system is not implemented at this time.
748  */
749  if (potentials.use_symmetry() &&
750  parameters.outputclock->current_time() == 0.0) {
751  logg[LExperiment].warn()
752  << "Note:"
753  << "\nSymmetry energy is not included in the mean field calculation."
754  << "\n\n";
755  }
756 
757  /*
758  * Skyrme potential parameters:
759  * C1GeV are the Skyrme coefficients converted to GeV,
760  * b1 are the powers of the baryon number density entering the expression
761  * for the energy density of the system. Note that these exponents are
762  * larger by 1 than those for the energy of a particle (which are used in
763  * Potentials class). The formula for a total mean field energy due to a
764  * Skyrme potential is E_MF = \sum_i (C_i/b_i) ( n_B^b_i )/( n_0^(b_i - 1) )
765  * where nB is the local rest frame baryon number density and n_0 is the
766  * saturation density. Then the single particle potential follows from
767  * V = d E_MF / d n_B .
768  */
769  double C1GeV = (potentials.skyrme_a()) / 1000.0;
770  double C2GeV = (potentials.skyrme_b()) / 1000.0;
771  double b1 = 2.0;
772  double b2 = (potentials.skyrme_tau()) + 1.0;
773 
774  /*
775  * Note: calculating the mean field only works if lattice is used.
776  * We iterate over the nodes of the baryon density lattice to sum their
777  * contributions to the total mean field.
778  */
779  int number_of_nodes = 0;
780  double lattice_mean_field_total = 0.0;
781 
782  for (auto &node : jmuB_lat) {
783  number_of_nodes++;
784  // the rest frame density
785  double rhoB = node.rho();
786  // the computational frame density
787  const double j0B = node.jmu_net().x0();
788 
789  const double abs_rhoB = std::abs(rhoB);
790  if (abs_rhoB < very_small_double) {
791  continue;
792  }
793  density_mean += j0B;
794  density_variance += j0B * j0B;
795 
796  /*
797  * The mean-field energy for the Skyrme potential. Note: this expression
798  * is only exact in the rest frame, and is expected to significantly
799  * deviate from the correct value for systems that are considerably
800  * relativistic. Note: symmetry energy is not taken into the account.
801  *
802  * TODO: Add symmetry energy.
803  */
804  double mean_field_contribution_1 = (C1GeV / b1) * std::pow(abs_rhoB, b1) /
805  std::pow(nuclear_density, b1 - 1);
806  double mean_field_contribution_2 = (C2GeV / b2) * std::pow(abs_rhoB, b2) /
807  std::pow(nuclear_density, b2 - 1);
808 
809  lattice_mean_field_total +=
810  V_cell * (mean_field_contribution_1 + mean_field_contribution_2);
811  }
812 
813  // logging statistical properties of the density calculation
814  density_mean = density_mean / number_of_nodes;
815  density_variance = density_variance / number_of_nodes;
816  double density_scaled_variance =
817  std::sqrt(density_variance - density_mean * density_mean) /
818  density_mean;
819  logg[LExperiment].debug() << "\t\t\t\t\t";
820  logg[LExperiment].debug()
821  << "\n\t\t\t\t\t density mean = " << density_mean;
822  logg[LExperiment].debug()
823  << "\n\t\t\t\t\t density scaled variance = " << density_scaled_variance;
824  logg[LExperiment].debug()
825  << "\n\t\t\t\t\t total mean_field = "
826  << lattice_mean_field_total * parameters.testparticles *
827  parameters.n_ensembles
828  << "\n";
829 
830  E_mean_field = lattice_mean_field_total;
831  } // if (potentials.use_skyrme())
832 
833  if (potentials.use_vdf()) {
834  /*
835  * Safety check:
836  * Calculating the symmetry energy contribution to the total mean field
837  * energy in the system is not implemented at this time.
838  */
839  if (potentials.use_symmetry() &&
840  parameters.outputclock->current_time() == 0.0) {
841  logg[LExperiment].error()
842  << "\nSymmetry energy is not included in the VDF mean-field "
843  "calculation"
844  << "\nas VDF potentials haven't been fitted with symmetry energy."
845  << "\n\n";
846  }
847 
848  /*
849  * The total mean-field energy density due to a VDF potential is
850  * E_MF = \sum_i C_i rho^(b_i - 2) *
851  * * [j_0^2 - rho^2 * (b_i - 1)/b_i] / rho_0^(b_i - 1)
852  * where j_0 is the local computational frame baryon density, rho is the
853  * local rest frame baryon density, and rho_0 is the saturation density.
854  */
855 
856  // saturation density of nuclear matter specified in the VDF parameters
857  double rhoB_0 = potentials.saturation_density();
858 
859  /*
860  * Note: calculating the mean field only works if lattice is used.
861  * We iterate over the nodes of the baryon density lattice to sum their
862  * contributions to the total mean field.
863  */
864  int number_of_nodes = 0;
865  double lattice_mean_field_total = 0.0;
866 
867  for (auto &node : jmuB_lat) {
868  number_of_nodes++;
869  // the rest frame density
870  double rhoB = node.rho();
871  // the computational frame density
872  const double j0B = node.jmu_net().x0();
873  double abs_rhoB = std::abs(rhoB);
874  density_mean += j0B;
875  density_variance += j0B * j0B;
876 
877  /*
878  * The mean-field energy for the VDF potential. This expression is correct
879  * in any frame, and in the rest frame conforms to the Skyrme mean-field
880  * energy (if same coefficients and powers are used).
881  */
882  // in order to prevent dividing by zero in case any b_i < 2.0
883  if (abs_rhoB < very_small_double) {
884  abs_rhoB = very_small_double;
885  }
886  double mean_field_contribution = 0.0;
887  for (int i = 0; i < potentials.number_of_terms(); i++) {
888  mean_field_contribution +=
889  potentials.coeffs()[i] *
890  std::pow(abs_rhoB, potentials.powers()[i] - 2.0) *
891  (j0B * j0B -
892  ((potentials.powers()[i] - 1.0) / potentials.powers()[i]) *
893  abs_rhoB * abs_rhoB) /
894  std::pow(rhoB_0, potentials.powers()[i] - 1.0);
895  }
896  lattice_mean_field_total += V_cell * mean_field_contribution;
897  }
898 
899  // logging statistical properties of the density calculation
900  density_mean = density_mean / number_of_nodes;
901  density_variance = density_variance / number_of_nodes;
902  double density_scaled_variance =
903  std::sqrt(density_variance - density_mean * density_mean) /
904  density_mean;
905  logg[LExperiment].debug() << "\t\t\t\t\t";
906  logg[LExperiment].debug()
907  << "\n\t\t\t\t\t density mean = " << density_mean;
908  logg[LExperiment].debug()
909  << "\n\t\t\t\t\t density scaled variance = " << density_scaled_variance;
910  logg[LExperiment].debug()
911  << "\n\t\t\t\t\t total mean_field = "
912  << lattice_mean_field_total * parameters.testparticles *
913  parameters.n_ensembles
914  << "\n";
915 
916  E_mean_field = lattice_mean_field_total;
917  }
918 
919  double electromagnetic_potential = 0.0;
920  if (potentials.use_coulomb() && em_lattice) {
921  // Use cell volume of electromagnetic fields lattice even though it should
922  // be the same as for net-baryon density
923  double V_cell_em = em_lattice->cell_sizes()[0] *
924  em_lattice->cell_sizes()[1] *
925  em_lattice->cell_sizes()[2];
926  for (auto &fields : *em_lattice) {
927  // Energy is 0.5 * int E^2 + B^2 dV
928  electromagnetic_potential +=
929  hbarc * 0.5 * V_cell_em * (fields.first.sqr() + fields.second.sqr());
930  }
931  }
932  logg[LExperiment].debug() << "Total energy in electromagnetic field = "
933  << electromagnetic_potential;
934  E_mean_field += electromagnetic_potential;
935  /*
936  * E_mean_field is multiplied by the number of testparticles per particle and
937  * the number of parallel ensembles because the total kinetic energy tracked
938  * is that of all particles in the simulation, including test-particles and/or
939  * ensembles, and so this way is more consistent.
940  */
941  E_mean_field =
942  E_mean_field * parameters.testparticles * parameters.n_ensembles;
943 
944  return E_mean_field;
945 }
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3].
Definition: constants.h:48
constexpr double hbarc
GeV <-> fm conversion factor.
Definition: constants.h:25
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_event_info()

EventInfo smash::fill_event_info ( const std::vector< Particles > &  ensembles,
double  E_mean_field,
double  modus_impact_parameter,
const ExperimentParameters parameters,
bool  projectile_target_interact 
)

Generate the EventInfo object which is passed to outputs_.

Parameters
[in]ensemblesThe simulated particles: one Particles object per ensemble. Information about all particles (positions, momenta, etc.)is passed to the output.
[in]E_mean_fieldValue of the mean-field contribution to the total energy of the system at the current time.
[in]modus_impact_parameterThe impact parameter
[in]parametersstructure that holds various global parameters such as testparticle number, see ExperimentParameters
[in]projectile_target_interacttrue if there was at least one collision

Definition at line 947 of file experiment.cc.

950  {
951  const QuantumNumbers current_values(ensembles);
952  const double E_kinetic_total = current_values.momentum().x0();
953  const double E_total = E_kinetic_total + E_mean_field;
954 
955  EventInfo event_info{modus_impact_parameter,
956  parameters.box_length,
957  parameters.outputclock->current_time(),
958  E_kinetic_total,
959  E_mean_field,
960  E_total,
961  parameters.testparticles,
962  parameters.n_ensembles,
963  !projectile_target_interact};
964  return event_info;
965 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_interactions_total()

void smash::check_interactions_total ( uint64_t  interactions_total)
inline

Make sure interactions_total can be represented as a 32-bit integer.

This is necessary for converting to a id_process. The latter is 32-bit integer, because it is written like this to binary output.

Parameters
[in]interactions_totalTotal interaction number

Definition at line 2328 of file experiment.h.

2328  {
2329  constexpr uint64_t max_uint32 = std::numeric_limits<uint32_t>::max();
2330  if (interactions_total >= max_uint32) {
2331  throw std::runtime_error("Integer overflow in total interaction number!");
2332  }
2333 }
Here is the caller graph for this function:

◆ update_fields_lattice()

void smash::update_fields_lattice ( RectangularLattice< FieldsOnLattice > *  fields_lat,
RectangularLattice< FourVector > *  old_fields,
RectangularLattice< FourVector > *  new_fields,
RectangularLattice< std::array< FourVector, 4 >> *  fields_four_grad_lattice,
DensityLattice jmu_B_lat,
const LatticeUpdate  fields_lat_update,
const Potentials potentials,
const double  time_step 
)

Updates the contents on the lattice of FieldsOnLattice type.

Parameters
[out]fields_latThe lattice of FieldsOnLattice type on which the content will be updated
[in]old_fieldsAuxiliary lattice, filled with field values at t0, needed for calculating time derivatives
[in]new_fieldsAuxiliary lattice, filled with field values at t0 + dt, needed for calculating time derivatives
[in]fields_four_grad_latticeAuxiliary lattice for calculating the fourgradient of the fields
[in]jmu_B_latLattice of baryon four-current
[in]fields_lat_updateTells if called for update at printout or at timestep
[in]potentialsmean-field potentials used in the simulation
[in]time_stepTime step used in the simulation

Definition at line 14 of file fields.cc.

20  {
21  // Do not proceed if lattice does not exists/update not required
22  if (fields_lat == nullptr || fields_lat->when_update() != fields_lat_update) {
23  return;
24  }
25  // get the number of nodes on the fields lattice
26  const std::array<int, 3> lattice_n_cells = fields_lat->n_cells();
27  const int number_of_nodes =
28  lattice_n_cells[0] * lattice_n_cells[1] * lattice_n_cells[2];
29 
30  /*
31  * Take the provided FieldsOnLattice lattice, fields_lat, and use the
32  * information about the fields to populate the lattice of A^mu FourVectors at
33  * t0, old_fields.
34  */
35  for (int i = 0; i < number_of_nodes; i++) {
36  old_fields->assign_value(i, ((*fields_lat)[i]).A_mu());
37  }
38 
39  /*
40  * Update the fields lattice
41  */
42  fields_lat->reset();
43 
44  // Get the potential parameters
45  const double rhoB_0 = potentials.saturation_density();
46 
47  // update the fields lattice
48  for (int i = 0; i < number_of_nodes; i++) {
49  // read values off the jmu_B lattice (which holds values at t0 + Delta t)
50  double rhoB_at_i = ((*jmuB_lat)[i]).rho();
51  FourVector jmuB_at_i = ((*jmuB_lat)[i]).jmu_net();
52 
53  double abs_rhoB_at_i = std::abs(rhoB_at_i);
54  // this is to prevent nan expressions
55  if (abs_rhoB_at_i < very_small_double) {
56  abs_rhoB_at_i = very_small_double;
57  }
58 
59  // this needs to be used in order to prevent trying to calculate something
60  // an expression like (-rhoB)^{3.4}
61  const int sgn = rhoB_at_i > 0 ? 1 : -1;
62 
63  // field contributions as obtained in the VDF model
64  double field_contribution = 0.0;
65  for (int j = 0; j < potentials.number_of_terms(); j++) {
66  field_contribution +=
67  sgn * potentials.coeffs()[j] *
68  std::pow(abs_rhoB_at_i / rhoB_0, potentials.powers()[j] - 2.0) /
69  rhoB_0;
70  }
71  FourVector field_at_i = field_contribution * jmuB_at_i;
72 
73  // fill the A_mu lattice
74  ((*fields_lat)[i]).overwrite_A_mu(field_at_i);
75  }
76 
77  /*
78  * Use the updated fields lattice, fields_lat, to populate the lattice of A^mu
79  * FourVectors at t0 + Delta t, new_fields.
80  */
81  for (int i = 0; i < number_of_nodes; i++) {
82  new_fields->assign_value(i, ((*fields_lat)[i]).A_mu());
83  }
84 
85  /*
86  * Compute time derivatives and gradients of all components of A^mu
87  */
88  new_fields->compute_four_gradient_lattice(*old_fields, time_step,
89  *fields_four_grad_lattice);
90 
91  // substitute new derivatives
92  for (int i = 0; i < number_of_nodes; i++) {
93  auto tmp = (*fields_four_grad_lattice)[i];
94  ((*fields_lat)[i]).overwrite_dAmu_dxnu(tmp[0], tmp[1], tmp[2], tmp[3]);
95  }
96 } // void update_fields_lattice()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fopen()

FilePtr smash::fopen ( const bf::path &  filename,
const std::string &  mode 
)

Open a file with given mode.

This wraps std::fopen but uses FileDeleter to automatically close the file.

Parameters
[in]filenamePath to the file.
[in]modeThe mode in which the file should be opened (see std::fopen).
Returns
The constructed FilePtr.

Definition at line 14 of file file.cc.

14  {
15  FilePtr f{std::fopen(filename.c_str(), mode.c_str())};
16  return f;
17 }
FilePtr fopen(const bf::path &filename, const std::string &mode)
Open a file with given mode.
Definition: file.cc:14
std::unique_ptr< std::FILE, FileDeleter > FilePtr
A RAII type to replace std::FILE *.
Definition: file.h:63
Here is the caller graph for this function:

◆ blatt_weisskopf_sqr()

double smash::blatt_weisskopf_sqr ( const double  p_ab,
const int  L 
)
inline
Returns
the squared Blatt-Weisskopf functions, which influence the mass dependence of the decay widths. See e.g. Effenberger:1999wlg [18], page 28 and https://physique.cuso.ch/fileadmin/physique/document/2015_chung_brfactor1.pdf where the recursive formula used here is given.
Parameters
p_abMomentum of outgoing particles A and B in center-of-mass frame [GeV]
LAngular momentum of outgoing particles A and B.

This is used as a standard form factor for all hadronic decays. Note that all the Blatt-Weisskopf functions approach one for large p_ab and behave like p_ab**L for small p_ab. They are increasing monotonically with p_ab.

Definition at line 33 of file formfactors.h.

33  {
34  if (L == 0) {
35  return 1.;
36  }
37  constexpr double R = 1. / hbarc; /* interaction radius = 1 fm */
38  const double x = p_ab * R;
39  const double x2 = x * x;
40  if (L == 1) {
41  return x2 / (1. + x2);
42  }
43  std::complex<double> g_prevprev(1, 0);
44  std::complex<double> g_prev(1, -x);
45  double numer = x2;
46  for (int l = 1; l < L; l++) {
47  numer *= x2;
48  const auto new_g =
49  static_cast<double>(2 * l + 1) * g_prev - x2 * g_prevprev;
50  g_prevprev = g_prev;
51  g_prev = new_g;
52  }
53  const double denom = std::norm(g_prev);
54  return numer / denom;
55 }
#define R(x, n)
Definition: sha256.cc:55
Here is the caller graph for this function:

◆ post_ff_sqr()

double smash::post_ff_sqr ( double  m,
double  M0,
double  srts0,
double  L 
)
inline

An additional form factor for unstable final states as used in GiBUU, according to M.

Post, see eq. (174) in Buss:2011mx [10] or eq. (13) in Post:2003hu [39].

Parameters
mActual mass of the decaying resonance [GeV].
M0Pole mass of the decaying resonance [GeV].
srts0Threshold of the reaction, i.e. minimum possible sqrt(s) [GeV].
LLambda parameter of the form factor [GeV]. This is a cut-off parameter that can be different for baryons and mesons.
Returns
The squared value of the form factor (dimensionless).

This form factor is equal to one at m=M0 and m=srts0. For decreasing values of L, the form factor results in a stronger and stronger suppression of the high-mass tail (m > M0) and a corresponding enhancement of the low-mass tail (m < M0).

Definition at line 75 of file formfactors.h.

75  {
76  const auto L4 = L * L * L * L;
77  const auto M2 = M0 * M0;
78  const auto s0 = srts0 * srts0;
79  const auto sminus = (s0 - M2) * 0.5;
80  const auto splus = m * m - (s0 + M2) * 0.5;
81  const auto FF = (L4 + sminus * sminus) / (L4 + splus * splus);
82  return FF * FF;
83 }
Here is the caller graph for this function:

◆ em_form_factor_ps()

double smash::em_form_factor_ps ( PdgCode  pdg,
double  mass 
)
inline
Returns
Electromagnetic transition form factor for P → γ e⁺ e⁻, with a pseudoscalar meson P = π⁰,η,η', as a function of the dilepton mass.

For the π⁰ see Landsberg:1986fd [30]. For the η the Lambda parameter is fitted to NA60 data, see Arnaldi:2009aa [3].

Parameters
pdgPDG code of the decaying meson.
massInvariant dilepton mass [GeV].

Definition at line 97 of file formfactors.h.

97  {
98  switch (pdg.code()) {
99  case pdg::pi_z:
100  return 1. + 5.5 * mass * mass;
101  case pdg::eta: {
102  const double lambda_eta = 0.716;
103  const double m_over_eta = mass / lambda_eta;
104  return 1. / (1. - m_over_eta * m_over_eta);
105  }
106  default: /* η' etc */
107  return 1.; // use QED approximation
108  }
109 }
constexpr int eta
η.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ em_form_factor_sqr_vec()

double smash::em_form_factor_sqr_vec ( PdgCode  pdg,
double  mass 
)
inline
Returns
Squared electromagnetic transition form factor for V → π⁰ e⁺ e⁻, with a vector meson V = ω,φ, as a function of the dilepton mass.

For the ω, see Bratkovskaya:1996qe [9].

Parameters
pdgPDG code of the decaying meson.
massInvariant dilepton mass [GeV].

Definition at line 120 of file formfactors.h.

120  {
121  switch (pdg.code()) {
122  case pdg::omega: {
123  constexpr double lambda = 0.65;
124  constexpr double gamma = 0.075;
125  constexpr double lambda_sqr = lambda * lambda;
126  constexpr double gamma_sqr = gamma * gamma;
127  const double tmp = lambda_sqr - mass * mass;
128  const double denom = tmp * tmp + lambda_sqr * gamma_sqr;
129  return lambda_sqr * lambda_sqr / denom;
130  }
131  default: /* φ etc */
132  return 1.; // use QED approximation
133  }
134 }
constexpr int omega
ω.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ form_factor_delta()

double smash::form_factor_delta ( double  m)
inline
Returns
Electromagnetic transition form factor for Delta -> N e+ e- as a function of the dilepton mass m.
Parameters
mInvariant dilepton mass [GeV].

Currently assumed to be constant, normalized at the real-photon point.

Definition at line 144 of file formfactors.h.

144  {
145  SMASH_UNUSED(m);
146  return 3.12;
147 }
#define SMASH_UNUSED(x)
Mark as unused, silencing compiler warnings.
Definition: macros.h:24
Here is the caller graph for this function:

◆ operator+() [2/3]

FourVector smash::operator+ ( FourVector  a,
const FourVector b 
)
inline

add two FourVectors

Parameters
[in]aThe first FourVector to add
[in]bThe second FourVector to add
Returns
\(x^\mu = a^\mu + b^\mu\)

Definition at line 371 of file fourvector.h.

371  {
372  a += b;
373  return a;
374 }

◆ operator-() [2/4]

FourVector smash::operator- ( FourVector  a,
const FourVector b 
)
inline

subtract two FourVectors

Parameters
[in]aThe FourVector from which to subtract
[in]bThe FourVector to subtract
Returns
\(x^\mu = a^\mu - b^\mu\)

Definition at line 392 of file fourvector.h.

392  {
393  a -= b;
394  return a;
395 }

◆ operator*() [3/8]

FourVector smash::operator* ( FourVector  a,
double  b 
)
inline

multiply a vector with a scalar

Parameters
[in]aThe FourVector to multiply
[in]bThe value with which to multiply
Returns
\(x^\mu = b \cdot a^\mu\)

Definition at line 413 of file fourvector.h.

413  {
414  a *= b;
415  return a;
416 }

◆ operator*() [4/8]

FourVector smash::operator* ( double  b,
FourVector  a 
)
inline

multiply a vector with a scalar

Parameters
[in]bThe value with which to multiply
[in]aThe FourVector to multiply
Returns
\(x^\mu = b \cdot a^\mu\)

Definition at line 424 of file fourvector.h.

424  {
425  a *= b;
426  return a;
427 }

◆ operator/() [2/3]

FourVector smash::operator/ ( FourVector  a,
const double &  b 
)
inline

divide a vector by a scalar

Parameters
[in]aThe FourVector to divide
[in]bThe value with which to divide
Returns
\(x^\mu = \frac{1}{b} \cdot a^\mu\)

Definition at line 446 of file fourvector.h.

446  {
447  a /= b;
448  return a;
449 }

◆ enable_float_traps()

bool smash::enable_float_traps ( int  )
inline

Fallback that fails to set the trap.

Definition at line 40 of file fpenvironment.h.

40 { return false; }
Here is the caller graph for this function:

◆ setup_default_float_traps()

void smash::setup_default_float_traps ( )

Setup the floating-point traps used throughout SMASH.

If possible, this function additionally installs a signal handler that prints what kind of condition triggered the trap. This requires POSIX.1-2001 to work.

Definition at line 69 of file fpenvironment.cc.

69  {
70  {
71  // pole error occurred in a floating-point operation:
72  if (!enable_float_traps(FE_DIVBYZERO)) {
73  logg[LFpe].warn("Failed to setup trap on pole error.");
74  }
75 
76  // domain error occurred in an earlier floating-point operation:
77  if (!enable_float_traps(FE_INVALID)) {
78  logg[LFpe].warn("Failed to setup trap on domain error.");
79  }
80 
81  /* The result of the earlier floating-point operation was too large to be
82  * representable: */
83  if (!enable_float_traps(FE_OVERFLOW)) {
84  logg[LFpe].warn("Failed to setup trap on overflow.");
85  }
86 
87  /* There's also FE_UNDERFLOW, where the result of the earlier
88  * floating-point operation was subnormal with a loss of precision.
89  * We do not consider this an error by default.
90  * Furthermore, there's FE_INEXACT, but this traps if "rounding was
91  * necessary to store the result of an earlier floating-point
92  * operation". This is common and not really an error condition. */
93  }
94 
95 // Install the signal handler if we have the functionality.
96 #if (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 199309L) || \
97  (defined _XOPEN_SOURCE && _XOPEN_SOURCE) || \
98  (defined _POSIX_SOURCE && _POSIX_SOURCE)
99 /* The missing-fields-initializers warning says that not all fields of this
100  * struct were explicitly initialized. That's exactly what is the intention
101  * here, because then they are default-initialized, which is zero. */
102 #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
103  struct sigaction action = {};
104  action.sa_flags = SA_SIGINFO;
105  action.sa_sigaction = [](int signal, siginfo_t *info, void *) {
106  if (signal == SIGFPE) {
107  const char *msg = nullptr;
108  switch (info->si_code) {
109  case FPE_FLTDIV:
110  msg = "Division by Zero (NaN)";
111  break;
112  case FPE_FLTUND:
113  msg = "Underflow (result was subnormal with a loss of precision)";
114  break;
115  case FPE_FLTOVF:
116  msg = "Overflow (result was too large to be representable)";
117  break;
118  case FPE_FLTINV:
119  msg = "Invalid (domain error occurred)";
120  break;
121  case FPE_FLTRES:
122  msg =
123  "Inexact Result (rounding was necessary to store the result of "
124  "an earlier floating-point operation)";
125  break;
126  default:
127  msg = "unknown";
128  break;
129  }
131  "Floating point trap was raised: ", msg);
132  } else {
133  logg[LFpe].fatal(SMASH_SOURCE_LOCATION, "Unexpected Signal ", signal,
134  " received in the FPE signal handler. Aborting.");
135  }
136  std::abort();
137  };
138  sigaction(SIGFPE, &action, nullptr);
139 #endif
140 }
bool enable_float_traps(int)
Fallback that fails to set the trap.
Definition: fpenvironment.h:40
static constexpr int LFpe
Here is the call graph for this function:
Here is the caller graph for this function:

◆ without_float_traps()

template<typename F >
void smash::without_float_traps ( F &&  f)

Convenience function to create a scope where all floating point traps are disabled.

Example:

// some code where FPEs will trap
// all code up to the closing brace will not trap anymore.
});
// more code where FPEs will trap
void without_float_traps(F &&f)
Convenience function to create a scope where all floating point traps are disabled.
Parameters
fA functor (e.g. lambda) that is executed in the cleared floating point environment.
Template Parameters
Ftype of the functor

Definition at line 129 of file fpenvironment.h.

129  {
130  DisableFloatTraps guard;
131  f();
132 }

◆ operator<<() [3/11]

std::ostream & smash::operator<< ( std::ostream &  s,
const ThermLatticeNode node 
)

This operator writes all the thermodynamic quantities at a certain position to the file out.

Parameters
[in]slocation of the output
[in]nodeposition on the lattice, where the output is generated

Definition at line 98 of file grandcan_thermalizer.cc.

98  {
99  return out << "T[mu,0]: " << node.Tmu0() << ", nb: " << node.nb()
100  << ", ns: " << node.ns() << ", v: " << node.v()
101  << ", e: " << node.e() << ", p: " << node.p()
102  << ", T: " << node.T() << ", mub: " << node.mub()
103  << ", mus: " << node.mus() << ", muq: " << node.muq();
104 }
Here is the call graph for this function:

◆ build_error_string()

std::string smash::build_error_string ( std::string  message,
const Line line 
)
inline

Builds a meaningful error message.

Takes the message and quotes the Line where the error occurs

Parameters
[in]messageError message
[in]lineLine object containing line number and line content.

Definition at line 42 of file inputfunctions.h.

42  {
43  return message + " (on line " + std::to_string(line.number) + ": \"" +
44  line.text + "\")";
45 }
Here is the caller graph for this function:

◆ line_parser()

std::vector< Line > smash::line_parser ( const std::string &  input)

Helper function for parsing particles.txt and decaymodes.txt.

This function goes through an input stream line by line and removes comments and empty lines. The remaining lines will be returned as a vector of strings and linenumber pairs (Line).

Parameters
[in]inputan lvalue reference to an input stream

Definition at line 21 of file inputfunctions.cc.

21  {
22  logg[LInputParser].trace() << SMASH_SOURCE_LOCATION << input;
23  std::istringstream input_stream(input);
24  std::vector<Line> lines;
25  lines.reserve(50);
26 
27  std::string line;
28  int line_number = 0;
29  while (std::getline(input_stream, line)) {
30  ++line_number;
31  const auto hash_pos = line.find('#');
32  if (hash_pos != std::string::npos) {
33  // Found a comment, remove it from the line and look further
34  line = line.substr(0, hash_pos);
35  }
36  if (line.find_first_not_of(" \t") == std::string::npos) {
37  // Only whitespace (or nothing) on this line. Next, please.
38  continue;
39  }
40  line = trim(line);
41  lines.emplace_back(line_number, std::move(line));
42  line = std::string();
43  }
44  return lines;
45 }
std::string trim(const std::string &s)
Strip leading and trailing whitespaces.
static constexpr int LInputParser
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ensure_all_read()

void smash::ensure_all_read ( std::istream &  input,
const Line line 
)
inline

Makes sure that nothing is left to read from this line.

Definition at line 59 of file inputfunctions.h.

59  { /*{{{*/
60  std::string tmp;
61  input >> tmp;
62  if (!input.eof()) {
63  throw ParticleType::LoadFailure(
64  build_error_string("While loading the Particle data:\nGarbage (" + tmp +
65  ") at the remainder of the line.",
66  line));
67  }
68 } /*}}}*/
std::string build_error_string(std::string message, const Line &line)
Builds a meaningful error message.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_all()

std::string smash::read_all ( std::istream &&  input)
inline

Utility function to read a complete input stream (e.g.

file) into one string.

Parameters
[in]inputThe input stream. Since it reads until EOF und thus "uses up the whole input stream" the function takes an rvalue reference to the stream object (just pass a temporary).
Note
There's no slicing here: the actual istream object is a temporary that is not destroyed until read_all returns.

Definition at line 80 of file inputfunctions.h.

80  {
81  return {std::istreambuf_iterator<char>{input},
82  std::istreambuf_iterator<char>{}};
83 }
Here is the caller graph for this function:

◆ has_crlf_line_ending()

bool smash::has_crlf_line_ending ( const std::string  in)
inline

Check if a line in the string ends with \r\n.

This may happen when a file was edited on Windows.

Parameters
[in]inInput string
Returns
True if \r\n was found, else false

Definition at line 91 of file inputfunctions.h.

91  {
92  if (in.find("\r\n") != std::string::npos) {
93  return true;
94  }
95  return false;
96 }
Here is the caller graph for this function:

◆ interpolate_trilinear()

template<typename T >
T smash::interpolate_trilinear ( ax,
ay,
az,
f1,
f2,
f3,
f4,
f5,
f6,
f7,
f8 
)

Perform a trilinear 1st order interpolation.

Assume, we seek the value of a function f at position (x, y, z). We know the position (x, y, z) lies within a 3D cube, for which the values of the function f are known at each corner (f1, ..., f8). We can now interpolate those values trilinearly to obtain an estimate of f at position (x, y, z).

Parameters
[in]axfraction of the step in x-direction
[in]ayfraction of the step in y-direction
[in]azfraction of the step in z-direction
[in]f1Value at the lower left front corner of the cube
[in]f2Value at the lower right front corner of the cube
[in]f3Value at the upper left front corner of the cube
[in]f4Value at the upper right front corner of the cube
[in]f5Value at the lower left back corner of the cube
[in]f6Value at the lower right back corner of the cube
[in]f7Value at the upper left back corner of the cube
[in]f8Value at the upper right back corner of the cube
Returns
Interpolated value

Definition at line 126 of file interpolation.h.

127  {
128  T res = az * (ax * (ay * f8 + (1.0 - ay) * f6) +
129  (1.0 - ax) * (ay * f7 + (1.0 - ay) * f5)) +
130  (1 - az) * (ax * (ay * f4 + (1.0 - ay) * f2) +
131  (1.0 - ax) * (ay * f3 + (1.0 - ay) * f1));
132  return res;
133 }
Here is the caller graph for this function:

◆ generate_sort_permutation()

template<typename T , typename Cmp >
Permutation smash::generate_sort_permutation ( std::vector< T > const &  v,
Cmp  compare 
)

Calculate the permutations necessary for sorting a vector.

Template Parameters
CmpType of comparison function.
Parameters
vVector to be sorted.
compareComparison function (see std::sort).
Returns
Vector of indices into the original vector.

Definition at line 147 of file interpolation.h.

147  {
148  Permutation p(v.size());
149  std::iota(p.begin(), p.end(), 0);
150  std::sort(p.begin(), p.end(),
151  [&](size_t i, size_t j) { return compare(v[i], v[j]); });
152  return p;
153 }
std::vector< size_t > Permutation
Represent a permutation.
Here is the caller graph for this function:

◆ apply_permutation()

template<typename T >
std::vector<T> smash::apply_permutation ( const std::vector< T > &  v,
const Permutation p 
)

Apply a permutation to a vector.

Template Parameters
TType of values to be permuted.
Parameters
vVector to be permuted.
pPermutation to be applied.
Returns
Permuted vector.

Definition at line 164 of file interpolation.h.

165  {
166  std::vector<T> copied_v = v;
167  std::transform(p.begin(), p.end(), copied_v.begin(),
168  [&](size_t i) { return v[i]; });
169  return copied_v;
170 }
Here is the caller graph for this function:

◆ check_duplicates()

template<typename T >
void smash::check_duplicates ( const std::vector< T > &  x,
const std::string &  error_position 
)

Check whether two components have the same value in a sorted vector x.

Throws an exception if duplicates are encountered.

Template Parameters
TType of values to be checked for duplicates.
Parameters
xVector to be checked for duplicates.
error_positionString used in the error message, indicating where the error originated.

Definition at line 183 of file interpolation.h.

184  {
185  auto it = std::adjacent_find(x.begin(), x.end());
186  if (it != x.end()) {
187  std::stringstream error_msg;
188  error_msg << error_position << ": Each x value must be unique. \"" << *it
189  << "\" was found twice.";
190  throw std::runtime_error(error_msg.str());
191  }
192 }
Here is the caller graph for this function:

◆ find_index()

template<typename T >
size_t smash::find_index ( const std::vector< T > &  v,
x 
)

Find the index in v that corresponds to the last value strictly smaller than x.

If no such value exists, the first value is returned.

This assumes v is sorted and uses a binary search.

Template Parameters
TType of values to be compared to x.
Parameters
vVector to be searched.
xUpper bound for indexed value.
Returns
Largest index corresponding to value below upper bound.

Example:

std::vector<int> x = { 0, 2, 4, 6, 8, 10 }; find_index(x, 2)

0

find_index(x, 3)

1

Definition at line 230 of file interpolation.h.

230  {
231  const auto it = std::lower_bound(v.begin(), v.end(), x);
232  if (it == v.begin()) {
233  return 0;
234  } else {
235  return it - 1 - v.begin();
236  }
237 }
Here is the caller graph for this function:

◆ center_of_velocity_v()

double smash::center_of_velocity_v ( double  s,
double  ma,
double  mb 
)
inline
Returns
Velocity in the center of velocities frame of two particles given their Mandelstam s and masses
Parameters
[in]sMandelstam s of the collision [GeV^2]
[in]maMass of the first particle [GeV]
[in]mbMass of the second particle [GeV]

Definition at line 26 of file kinematics.h.

26  {
27  const double m_sum = ma + mb;
28  const double m_dif = ma - mb;
29  return std::sqrt((s - m_sum * m_sum) / (s - m_dif * m_dif));
30 }
Here is the caller graph for this function:

◆ fixed_target_projectile_v()

double smash::fixed_target_projectile_v ( double  s,
double  ma,
double  mb 
)
inline
Returns
Velocity of projectile in the fixed target frame given the Mandelstam s of projectile and target and their masses
Parameters
[in]sMandelstam s of the collision [GeV^2]
[in]maMass of the projectile [GeV]
[in]mbMass of the target [GeV]

Definition at line 39 of file kinematics.h.

39  {
40  const double inv_gamma = 2 * ma * mb / (s - ma * ma - mb * mb);
41  return std::sqrt(1.0 - inv_gamma * inv_gamma);
42 }
Here is the caller graph for this function:

◆ pCM_sqr_from_s()

template<typename T >
T smash::pCM_sqr_from_s ( const T  s,
const T  mass_a,
const T  mass_b 
)
noexcept
Returns
The squared center-of-mass momentum of two particles, given s and their masses. [GeV^2]
Parameters
[in]sMandelstam s of the process [GeV^2].
[in]mass_aMass of first particle [GeV].
[in]mass_bMass of second particle [GeV].

Definition at line 52 of file kinematics.h.

52  {
53  const auto mass_a_sqr = mass_a * mass_a;
54  const auto x = s + mass_a_sqr - mass_b * mass_b;
55  return x * x * (T(0.25) / s) - mass_a_sqr;
56 }
Here is the caller graph for this function:

◆ pCM_from_s()

template<typename T >
T smash::pCM_from_s ( const T  s,
const T  mass_a,
const T  mass_b 
)
noexcept
Returns
The center-of-mass momentum of two particles, given s and their masses. [GeV]
Parameters
[in]sMandelstam s of the process [GeV^2].
[in]mass_aMass of first particle [GeV].
[in]mass_bMass of second particle [GeV].

Definition at line 66 of file kinematics.h.

66  {
67  const auto psqr = pCM_sqr_from_s(s, mass_a, mass_b);
68  return psqr > T(0.) ? std::sqrt(psqr) : T(0.);
69 }
T pCM_sqr_from_s(const T s, const T mass_a, const T mass_b) noexcept
Definition: kinematics.h:52
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pCM()

template<typename T >
T smash::pCM ( const T  sqrts,
const T  mass_a,
const T  mass_b 
)
noexcept
Returns
The center-of-mass momentum of two particles, given sqrt(s) and their masses. [GeV]
Parameters
[in]sqrtssqrt(s) of the process [GeV].
[in]mass_aMass of first particle [GeV].
[in]mass_bMass of second particle [GeV].

Definition at line 79 of file kinematics.h.

79  {
80  return pCM_from_s(sqrts * sqrts, mass_a, mass_b);
81 }
T pCM_from_s(const T s, const T mass_a, const T mass_b) noexcept
Definition: kinematics.h:66
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pCM_sqr()

template<typename T >
T smash::pCM_sqr ( const T  sqrts,
const T  mass_a,
const T  mass_b 
)
noexcept
Returns
The squared center-of-mass momentum of two particles, given sqrt(s) and their masses.
Parameters
[in]sqrtssqrt(s) of the process [GeV].
[in]mass_aMass of first particle [GeV].
[in]mass_bMass of second particle [GeV].

Definition at line 91 of file kinematics.h.

91  {
92  return pCM_sqr_from_s(sqrts * sqrts, mass_a, mass_b);
93 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_t_range()

template<typename T >
std::array<T, 2> smash::get_t_range ( const T  sqrts,
const T  m1,
const T  m2,
const T  m3,
const T  m4 
)

Get the range of Mandelstam-t values allowed in a particular 2->2 process, see PDG 2014 booklet, eq.

(46.34).

Parameters
[in]sqrtssqrt(s) of the process [GeV].
[in]m1Mass of first incoming particle [GeV].
[in]m2Mass of second incoming particle [GeV].
[in]m3Mass of first outgoing particle [GeV].
[in]m4Mass of second outgoing particle [GeV].
Returns
array consisting of {t_min, t_max}

Note that both t_min and t_max are negative, with |t_min| < |t_max|, i.e. t_min > t_max.

Definition at line 109 of file kinematics.h.

110  {
111  const T p_i = pCM(sqrts, m1, m2); // initial-state CM momentum
112  const T p_f = pCM(sqrts, m3, m4); // final-state CM momentum
113  const T sqrt_t0 = (m1 * m1 - m2 * m2 - m3 * m3 + m4 * m4) / (2. * sqrts);
114  const T t0 = sqrt_t0 * sqrt_t0;
115  const T t_min = t0 - (p_i - p_f) * (p_i - p_f);
116  const T t_max = t0 - (p_i + p_f) * (p_i + p_f);
117  assert(t_min >= t_max);
118  return {t_min, t_max};
119 }
T pCM(const T sqrts, const T mass_a, const T mass_b) noexcept
Definition: kinematics.h:79
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_energy()

static void smash::check_energy ( double  mandelstam_s,
double  m_sum 
)
inlinestatic

Helper function for plab_from_s.

Parameters
[in]mandelstam_sThe Mandelstam variable s [GeV^2]
[in]m_sumSum of masses of target and projectile [GeV] \( m_1 + m_2 \)

Definition at line 127 of file kinematics.h.

127  {
128  if (mandelstam_s < m_sum * m_sum) {
129  std::stringstream err;
130  err << "plab_from_s: s too small: " << mandelstam_s << " < "
131  << m_sum * m_sum;
132  throw std::runtime_error(err.str());
133  }
134 }
Here is the caller graph for this function:

◆ check_radicand()

static void smash::check_radicand ( double  mandelstam_s,
double  radicand 
)
inlinestatic

Helper function for plab_from_s.

Parameters
[in]mandelstam_sThe Mandelstam variable s [GeV^2]
[in]radicand\( (s - (m_1 + m_2)^2) * (s - (m_1 - m_2)^2) \) where \( m_1 \) and \( m_2 \) are masses of incoming particles [GeV^4]

Definition at line 142 of file kinematics.h.

142  {
143  if (radicand < 0) {
144  std::stringstream err;
145  err << "plab_from_s: negative radicand: " << mandelstam_s;
146  throw std::runtime_error(err.str());
147  }
148 }
Here is the caller graph for this function:

◆ plab_from_s() [1/3]

double smash::plab_from_s ( double  mandelstam_s,
double  mass 
)
inline

Convert Mandelstam-s to p_lab in a fixed-target collision.

This assumes both particles have the given mass.

Parameters
[in]mandelstam_sThe Mandelstam variable s [GeV^2]
[in]massMass of projectile and target [GeV]
Returns
Momentum of the projectile in the lab frame [GeV]

Definition at line 157 of file kinematics.h.

157  {
158  const double radicand = mandelstam_s * (mandelstam_s - 4 * mass * mass);
159 #ifndef NDEBUG
160  const double m_sum = 2 * mass;
161  check_energy(mandelstam_s, m_sum);
162  check_radicand(mandelstam_s, radicand);
163 #endif
164  return std::sqrt(radicand) / (2 * mass);
165 }
static void check_radicand(double mandelstam_s, double radicand)
Helper function for plab_from_s.
Definition: kinematics.h:142
static void check_energy(double mandelstam_s, double m_sum)
Helper function for plab_from_s.
Definition: kinematics.h:127
Here is the call graph for this function:
Here is the caller graph for this function:

◆ plab_from_s() [2/3]

double smash::plab_from_s ( double  mandelstam_s)
inline

Convert Mandelstam-s to p_lab in a fixed-target collision.

This assumes both particles have the mass of a nucleon.

Parameters
[in]mandelstam_sThe Mandelstam variable s [GeV^2]
Returns
Momentum of the projectile in the lab frame [GeV]

Definition at line 173 of file kinematics.h.

173  {
174  return plab_from_s(mandelstam_s, nucleon_mass);
175 }
constexpr double nucleon_mass
Nucleon mass in GeV.
Definition: constants.h:58
double plab_from_s(double mandelstam_s, double m_projectile, double m_target)
Convert Mandelstam-s to p_lab in a fixed-target collision.
Definition: kinematics.h:185
Here is the call graph for this function:

◆ plab_from_s() [3/3]

double smash::plab_from_s ( double  mandelstam_s,
double  m_projectile,
double  m_target 
)
inline

Convert Mandelstam-s to p_lab in a fixed-target collision.

The mass of the projectile and the mass of the target have to be given.

Parameters
[in]mandelstam_sthe Mandelstam variable s [GeV^2]
[in]m_projectilemass of the projectile [GeV]
[in]m_targetmass of the target [GeV]
Returns
momentum of the projectile in the lab frame [GeV]

Definition at line 185 of file kinematics.h.

186  {
187  const double m_sum = m_projectile + m_target;
188  const double m_diff = m_projectile - m_target;
189  const double radicand =
190  (mandelstam_s - m_sum * m_sum) * (mandelstam_s - m_diff * m_diff);
191 /* This is equivalent to:
192  * const double radicand
193  * = (mandelstam_s - m_a_sq - m_b_sq) * (mandelstam_s - m_a_sq - m_b_sq)
194  * - 4 * m_a_sq * m_b_sq; */
195 #ifndef NDEBUG
196  check_energy(mandelstam_s, m_sum);
197  check_radicand(mandelstam_s, radicand);
198 #endif
199  return std::sqrt(radicand) / (2 * m_target);
200 }
Here is the call graph for this function:

◆ s_from_Etot() [1/2]

double smash::s_from_Etot ( double  e_tot,
double  m_P,
double  m_T 
)
inline

Convert E_tot to Mandelstam-s for a fixed-target setup, with a projectile of mass m_P and a total energy e_tot and a target of mass m_T at rest.

Parameters
[in]e_totenergy of the projectile in the lab frame [GeV]
[in]m_Pmass of the projectile [GeV]
[in]m_Tmass of the target [GeV]
Returns
The Mandelstam variable s [GeV^2]

Definition at line 211 of file kinematics.h.

211  {
212  return m_P * m_P + m_T * m_T + 2 * m_T * e_tot;
213 }
Here is the caller graph for this function:

◆ s_from_Etot() [2/2]

double smash::s_from_Etot ( double  e_tot_p,
double  e_tot_t,
double  m_p,
double  m_t 
)
inline

Convert E_tot to Mandelstam-s for two beams with total energies and masses (E,m)

Parameters
[in]e_tot_pTotal energy of projectile [GeV]
[in]e_tot_tTotal energy of target [GeV]
[in]m_pMass of projectile [GeV]
[in]m_tMass of target [GeV]
Returns
Mandelstam-s [GeV^2]

Definition at line 224 of file kinematics.h.

225  {
226  double pz_p = std::sqrt(e_tot_p * e_tot_p - m_p * m_p);
227  double pz_t = std::sqrt(e_tot_t * e_tot_t - m_t * m_t);
228  return std::pow(e_tot_p + e_tot_t, 2) - std::pow(pz_p - pz_t, 2);
229 }

◆ s_from_Ekin() [1/2]

double smash::s_from_Ekin ( double  e_kin,
double  m_P,
double  m_T 
)
inline

Convert E_kin to Mandelstam-s for a fixed-target setup, with a projectile of mass m_P and a kinetic energy e_kin and a target of mass m_T at rest.

Parameters
[in]e_kinkinetic energy of the projectile in the lab frame [GeV]
[in]m_Pmass of the projectile [GeV]
[in]m_Tmass of the target [GeV]
Returns
The Mandelstam variable s [GeV^2]

Definition at line 239 of file kinematics.h.

239  {
240  return s_from_Etot(e_kin + m_P, m_P, m_T);
241 }
double s_from_Etot(double e_tot_p, double e_tot_t, double m_p, double m_t)
Convert E_tot to Mandelstam-s for two beams with total energies and masses (E,m)
Definition: kinematics.h:224
Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_from_Ekin() [2/2]

double smash::s_from_Ekin ( double  e_kin_p,
double  e_kin_t,
double  m_p,
double  m_t 
)
inline

Convert E_kin=(E_tot-m) to Mandelstam-s for two beams with total energies and masses (E,m)

Parameters
[in]e_kin_pKinetic energy of projectile [GeV]
[in]e_kin_tKinetic energy of target [GeV]
[in]m_pMass of projectile [GeV]
[in]m_tMass of target [GeV]
Returns
Mandelstam-s [GeV^2]

Definition at line 252 of file kinematics.h.

253  {
254  return s_from_Etot(e_kin_p + m_t, e_kin_t + m_t, m_p, m_t);
255 }
Here is the call graph for this function:

◆ s_from_plab() [1/2]

double smash::s_from_plab ( double  plab,
double  m_P,
double  m_T 
)
inline

Convert p_lab to Mandelstam-s for a fixed-target setup, with a projectile of mass m_P and momentum plab and a target of mass m_T at rest.

Parameters
[in]plabMomentum of the projectile in the lab frame [GeV]
[in]m_PMass of the projectile [GeV]
[in]m_TMass of the target [GeV]
Returns
The Mandelstam variable s [GeV^2]

Definition at line 265 of file kinematics.h.

265  {
266  return m_P * m_P + m_T * m_T + 2 * m_T * std::sqrt(m_P * m_P + plab * plab);
267 }
Here is the caller graph for this function:

◆ s_from_plab() [2/2]

double smash::s_from_plab ( double  plab_p,
double  plab_t,
double  m_p,
double  m_t 
)
inline

Convert P_lab to Mandelstam-s for two beams with total momenta and masses (P,m) (P_lab gives per nucleon, P=P_lab*A)

Parameters
[in]plab_pKinetic energy of projectile [GeV]
[in]plab_tKinetic energy of target [GeV]
[in]m_pMass of projectile [GeV]
[in]m_tMass of target [GeV]
Returns
Mandelstam-s [GeV^2]

Definition at line 278 of file kinematics.h.

279  {
280  return s_from_Etot(std::sqrt(m_p * m_p + plab_p * plab_p),
281  std::sqrt(m_t * m_t + plab_t * plab_t), plab_p, plab_t);
282 }
Here is the call graph for this function:

◆ smooth()

template<typename T >
std::vector<T> smash::smooth ( const std::vector< T > &  x,
const std::vector< T > &  y,
span = 2. / 3,
size_t  iter = 3,
delta = 0 
)

Apply the LOWESS smoother (see the reference below) to the given data (x, y).

Parameters
xx-values.
yy-values.
spanThe smoother span. This gives the proportion of points in the plot which influence the smoothness at each value. Larger values give more smoothness.
iterThe number of robustifying iterations which should be performed. Using smaller values of iter will make lowess run faster.
deltaValues of x which lie within delta of each other replaced by a single value in the output from lowess. For delta = 0, delta will be calculated.
Returns
Smoothed y-values.

References:

  • Cleveland, W. S. (1979) Robust locally weighted regression and smoothing scatterplots. J. Amer. Statist. Assoc. 74, 829-836.
  • Cleveland, W. S. (1981) LOWESS: A program for smoothing scatterplots by robust locally weighted regression. The American Statistician, 35, 54.

Definition at line 289 of file lowess.h.

290  {
291  assert(x.size() == y.size());
292  std::vector<T> result;
293  result.resize(x.size());
294  std::vector<T> rw;
295  rw.resize(x.size());
296  std::vector<T> res;
297  res.resize(x.size());
298  lowess::lowess(&x.front(), &y.front(), x.size(), &result.front(), span, iter,
299  delta, &rw.front(), &res.front());
300  return result;
301 }
void lowess(const T *x, const T *y, size_t n, T *ys, T span, size_t iter, T delta, T *rw, T *res)
Lowess regression smoother.
Definition: lowess.h:139
Here is the call graph for this function:
Here is the caller graph for this function:

◆ almost_equal()

template<typename N >
bool smash::almost_equal ( const N  x,
const N  y 
)

Checks two numbers for relative approximate equality.

Template Parameters
NNumber type.
Parameters
xLeft-hand side.
yRight-hand side.
Returns
true if the difference between x and y is less than or equal to \(\delta = \)smash::really_small or that times the average of \(|x|\) and \(|y|\):

\[|x - y| \stackrel{?}{\le} \delta \mbox{ or } |x - y| \stackrel{?}{\le} \frac{|x| + |y|}{2} \cdot \delta\]

See also
smash::really_small

Definition at line 42 of file numerics.h.

42  {
43  return (std::abs(x - y) <= N(really_small) ||
44  std::abs(x - y) <=
45  N(0.5 * really_small) * (std::abs(x) + std::abs(y)));
46 }
Here is the caller graph for this function:

◆ almost_equal_physics()

template<typename N >
bool smash::almost_equal_physics ( const N  x,
const N  y 
)

Same as smash::almost_equal, but for physical checks like energy-momentum conservation small_number is enough precision-wise.

Template Parameters
NNumber type.
Parameters
xLeft-hand side.
yRight-hand side.
Returns
true if the difference between x and y is less than or equal to \(\delta = \)smash::small_number or that times the average of \(|x|\) and \(|y|\):
See also
smash::small_number
smash::almost_equal

Definition at line 62 of file numerics.h.

62  {
63  return (std::abs(x - y) <= N(small_number) ||
64  std::abs(x - y) <=
65  N(0.5 * small_number) * (std::abs(x) + std::abs(y)));
66 }
constexpr double small_number
Physical error tolerance.
Definition: constants.h:51
Here is the caller graph for this function:

◆ xs_high_energy()

double smash::xs_high_energy ( double  mandelstam_s,
bool  is_opposite_charge,
double  ma,
double  mb,
double  P,
double  R1,
double  R2 
)

total hadronic cross sections at high energies parametrized in the 2016 PDG book(http://pdg.lbl.gov/2016/reviews/rpp2016-rev-cross-section-plots.pdf)

This function is a utility function called from specific parametrizations.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
[in]is_opposite_chargewhether the particles being collided have opposite charges
[in]mamass of first particle [GeV]
[in]mbmass of second particle [GeV]
[in]PPomeranchuk's constant term [mb]
[in]R1intensity of the first Regge pole contribution [mb]
[in]R2intensity of the second Regge pole contribution [mb]
Returns
the parametrized cross-section [mb]

Definition at line 29 of file parametrizations.cc.

30  {
31  const double M = 2.1206;
32  const double H = 0.272;
33  const double eta1 = 0.4473;
34  const double eta2 = 0.5486;
35  const double s_sab = mandelstam_s / (ma + mb + M) / (ma + mb + M);
36  double xs =
37  H * std::log(s_sab) * std::log(s_sab) + P + R1 * std::pow(s_sab, -eta1);
38  xs = is_opposite_charge ? xs + R2 * std::pow(s_sab, -eta2)
39  : xs - R2 * std::pow(s_sab, -eta2);
40  return xs;
41 }
Here is the caller graph for this function:

◆ pp_high_energy()

double smash::pp_high_energy ( double  mandelstam_s)

pp total cross section at high energies

See also
xs_high_energy
Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 43 of file parametrizations.cc.

43  {
44  return xs_high_energy(mandelstam_s, false, 0.939, 0.939, 34.41, 13.07, 7.394);
45 }
double xs_high_energy(double mandelstam_s, bool is_opposite_charge, double ma, double mb, double P, double R1, double R2)
total hadronic cross sections at high energies parametrized in the 2016 PDG book(http://pdg....
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ppbar_high_energy()

double smash::ppbar_high_energy ( double  mandelstam_s)

ppbar total cross section at high energies

See also
xs_high_energy
Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 47 of file parametrizations.cc.

47  {
48  return xs_high_energy(mandelstam_s, true, 0.939, 0.939, 34.41, 13.07, 7.394);
49 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ np_high_energy()

double smash::np_high_energy ( double  mandelstam_s)

np total cross section at high energies

See also
xs_high_energy
Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 51 of file parametrizations.cc.

51  {
52  return xs_high_energy(mandelstam_s, false, 0.939, 0.939, 34.41, 12.52, 6.66);
53 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ npbar_high_energy()

double smash::npbar_high_energy ( double  mandelstam_s)

npbar total cross section at high energies

See also
xs_high_energy
Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 55 of file parametrizations.cc.

55  {
56  return xs_high_energy(mandelstam_s, true, 0.939, 0.939, 34.41, 12.52, 6.66);
57 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piplusp_high_energy()

double smash::piplusp_high_energy ( double  mandelstam_s)

pi+p total cross section at high energies

See also
xs_high_energy
Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 59 of file parametrizations.cc.

59  {
60  return xs_high_energy(mandelstam_s, false, 0.939, 0.138, 18.75, 9.56, 1.767);
61 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piminusp_high_energy()

double smash::piminusp_high_energy ( double  mandelstam_s)

pi-p total cross section at high energies

See also
xs_high_energy
Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 63 of file parametrizations.cc.

63  {
64  return xs_high_energy(mandelstam_s, true, 0.939, 0.138, 18.75, 9.56, 1.767);
65 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xs_ppbar_annihilation()

double smash::xs_ppbar_annihilation ( double  mandelstam_s)

parametrized cross-section for proton-antiproton annihilation used in the UrQMD model

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 67 of file parametrizations.cc.

67  {
68  const double xs_ref = 120.;
69  const double s_ref = 4. * nucleon_mass * nucleon_mass;
70  const double constant_a = 0.05;
71  const double constant_b = 0.6;
72  const double factor = constant_a * constant_a * s_ref /
73  ((mandelstam_s - s_ref) * (mandelstam_s - s_ref) +
74  constant_a * constant_a * s_ref) +
75  constant_b;
76  return xs_ref * (s_ref / mandelstam_s) * factor;
77 }
Here is the caller graph for this function:

◆ xs_string_hard()

double smash::xs_string_hard ( double  mandelstam_s,
double  xs_0,
double  e_0,
double  lambda_pow 
)

Utility function called by specific other parametrizations Parametrized hard scattering cross section (with partonic scattering) This parametrization is a direct fit to cross sections in PYTHIA See Sjostrand:1987su [46].

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
[in]xs_0a fit parameter [mb]
[in]e_0a fit parameter [GeV]
[in]lambda_powa fit parameter
Returns
the parametrized cross-section [mb]

Definition at line 79 of file parametrizations.cc.

80  {
81  const double sqrts = std::sqrt(mandelstam_s);
82  if (sqrts < e_0) {
83  return 0.;
84  } else {
85  double xs = xs_0 * std::pow(std::log(sqrts / e_0), lambda_pow);
86  return xs;
87  }
88 }
Here is the caller graph for this function:

◆ NN_string_hard()

double smash::NN_string_hard ( double  mandelstam_s)

nucleon-nucleon hard scattering cross section (with partonic scattering)

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]
See also
xs_string_hard

Definition at line 90 of file parametrizations.cc.

90  {
91  return xs_string_hard(mandelstam_s, 0.087, 4.1, 3.8);
92 }
double xs_string_hard(double mandelstam_s, double xs_0, double e_0, double lambda_pow)
Utility function called by specific other parametrizations Parametrized hard scattering cross section...
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Npi_string_hard()

double smash::Npi_string_hard ( double  mandelstam_s)

nucleon-pion hard scattering cross section (with partonic scattering)

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]
See also
xs_string_hard

Definition at line 94 of file parametrizations.cc.

94  {
95  return xs_string_hard(mandelstam_s, 0.042, 3.5, 4.2);
96 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipi_string_hard()

double smash::pipi_string_hard ( double  mandelstam_s)

pion-pion hard scattering cross section (with partonic scattering)

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]
See also
xs_string_hard

Definition at line 98 of file parametrizations.cc.

98  {
99  return xs_string_hard(mandelstam_s, 0.013, 2.3, 4.7);
100 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piplusp_elastic_high_energy()

double smash::piplusp_elastic_high_energy ( double  mandelstam_s,
double  m1,
double  m2 
)

pi+p elactic cross section parametrization.

Source: GiBUU:parametrizationBarMes_HighEnergy.f90 Elastic contributions from decays are not subtracted, high energy parametrization used at all energies (useful for AQM)

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
[in]m1the mass of the first particle [GeV]
[in]m2the mass of the second particle [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 122 of file parametrizations.cc.

122  {
123  const double p_lab = (m1 > m2) ? plab_from_s(mandelstam_s, m2, m1)
124  : plab_from_s(mandelstam_s, m1, m2);
125  const auto logp = std::log(p_lab);
126  return 11.4 * std::pow(p_lab, -0.4) + 0.079 * logp * logp;
127 }
double plab_from_s(double mandelstam_s, double mass)
Convert Mandelstam-s to p_lab in a fixed-target collision.
Definition: kinematics.h:157
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piplusp_elastic_AQM()

double smash::piplusp_elastic_AQM ( double  mandelstam_s,
double  m1,
double  m2 
)

An overload of piplusp_elastic_high_energy in which the very low part is replaced by a flat 5 mb cross section; used for meson-meson interactions.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
[in]m1the mass of the first particle [GeV]
[in]m2the mass of the second particle [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 129 of file parametrizations.cc.

129  {
130  const double p_lab = (m1 > m2) ? plab_from_s(mandelstam_s, m2, m1)
131  : plab_from_s(mandelstam_s, m1, m2);
132  if (p_lab < 3.05) { // the plab from which the param starts to explode
133  return 7.5; // this will be scaled down by 2/3 for meson-meson
134  } else {
135  return piplusp_elastic_high_energy(mandelstam_s, m1, m2);
136  }
137 }
double piplusp_elastic_high_energy(double mandelstam_s, double m1, double m2)
pi+p elactic cross section parametrization.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piplusp_elastic()

double smash::piplusp_elastic ( double  mandelstam_s)

pi+p elastic cross section parametrization, PDG data.

Source: GiBUU:parametrizationBarMes_HighEnergy.f90

The parametrizations of the elastic pion+nucleon cross sections are still under tuning. The parametrizaton is employed to give a non-zero cross section at high energies. To make sure it doesn't affect the cross section at the low energies, I truncate the parametrization at p_lab = 8 GeV, which correspons to square root of s equal to 4 GeV.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 139 of file parametrizations.cc.

139  {
140  double sigma;
141  const double p_lab = plab_from_s(mandelstam_s, pion_mass, nucleon_mass);
142  if (mandelstam_s < 2.25) {
143  sigma = really_small;
144  } else if (mandelstam_s > 4.84) {
145  const auto logp = std::log(p_lab);
146  sigma = 11.4 * std::pow(p_lab, -0.4) + 0.079 * logp * logp;
147  } else {
148  sigma = piplusp_elastic_pdg(mandelstam_s);
149  }
150 
151  // The elastic contributions from decays still need to be subtracted.
152  if (piplusp_elastic_res_interpolation == nullptr) {
153  std::vector<double> x = PIPLUSP_RES_SQRTS;
154  for (auto& i : x) {
155  i = i * i;
156  }
157  std::vector<double> y = PIPLUSP_RES_SIG;
159  make_unique<InterpolateDataSpline>(x, y);
160  }
161  sigma -= (*piplusp_elastic_res_interpolation)(mandelstam_s);
162  if (sigma < 0) {
163  sigma = really_small;
164  }
165  return sigma;
166 }
static double piplusp_elastic_pdg(double mandelstam_s)
const std::initializer_list< double > PIPLUSP_RES_SQRTS
Center-of-mass energy.
static std::unique_ptr< InterpolateDataSpline > piplusp_elastic_res_interpolation
A null interpolation that gets filled using the PIPLUSP_RES data.
const std::initializer_list< double > PIPLUSP_RES_SIG
Elastic π⁺N⁺ cross section contributions from decays.
constexpr double pion_mass
Pion mass in GeV.
Definition: constants.h:65
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piplusp_sigmapluskplus_pdg()

double smash::piplusp_sigmapluskplus_pdg ( double  mandelstam_s)

pi+ p to Sigma+ K+ cross section parametrization, PDG data.

The PDG data is smoothed using the LOWESS algorithm. If more than one cross section was given for one p_lab value, the corresponding cross sections are averaged.

Definition at line 173 of file parametrizations.cc.

173  {
174  if (piplusp_sigmapluskplus_interpolation == nullptr) {
175  std::vector<double> x = PIPLUSP_SIGMAPLUSKPLUS_P_LAB;
176  std::vector<double> y = PIPLUSP_SIGMAPLUSKPLUS_SIG;
177  std::vector<double> dedup_x;
178  std::vector<double> dedup_y;
179  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
180  dedup_y = smooth(dedup_x, dedup_y, 0.2, 5);
182  make_unique<InterpolateDataLinear<double>>(dedup_x, dedup_y);
183  }
184  const double p_lab = plab_from_s(mandelstam_s, pion_mass, nucleon_mass);
185  return (*piplusp_sigmapluskplus_interpolation)(p_lab);
186 }
std::vector< T > smooth(const std::vector< T > &x, const std::vector< T > &y, T span=2./3, size_t iter=3, T delta=0)
Apply the LOWESS smoother (see the reference below) to the given data (x, y).
Definition: lowess.h:289
static std::unique_ptr< InterpolateDataLinear< double > > piplusp_sigmapluskplus_interpolation
An interpolation that gets lazily filled using the PIPLUSP_SIGMAPLUSKPLUS_SIG data.
const std::initializer_list< double > PIPLUSP_SIGMAPLUSKPLUS_SIG
PDG data on pi+ p to Sigma+ K+ section: cross section.
const std::initializer_list< double > PIPLUSP_SIGMAPLUSKPLUS_P_LAB
PDG data on pi+ p to Sigma+ K+ cross section: momentum in lab frame.
std::pair< std::vector< T >, std::vector< T > > dedup_avg(const std::vector< T > &x, const std::vector< T > &y)
Remove duplicates from data (x, y) by averaging y.
Definition: average.h:65
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piminusp_elastic()

double smash::piminusp_elastic ( double  mandelstam_s)

pi-p elastic cross section parametrization Source: GiBUU:parametrizationBarMes_HighEnergy.f90

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 208 of file parametrizations.cc.

208  {
209  double sigma;
210  const double p_lab = plab_from_s(mandelstam_s, pion_mass, nucleon_mass);
211  const auto logp = std::log(p_lab);
212  if (mandelstam_s < 1.69) {
213  sigma = really_small;
214  } else if (mandelstam_s > 4.84) {
215  sigma = 1.76 + 11.2 * std::pow(p_lab, -0.64) + 0.043 * logp * logp;
216  } else {
217  sigma = piminusp_elastic_pdg(mandelstam_s);
218  }
219  /* Tune down the elastic cross section when sqrt s is between 1.8 GeV
220  * and 1.97 GeV so that the total cross section can fit the data. The
221  * scaling factor is chosen so that the it's equal to one and its
222  * derivate vanishes at the both ends. The minimum scaling factor in this
223  * region is 0.88-0.12=0.76. */
224  if (mandelstam_s > 3.24 && mandelstam_s < 3.8809) {
225  sigma *= (0.12 * std::cos(2 * M_PI * (std::sqrt(mandelstam_s) - 1.8) /
226  (1.97 - 1.8)) +
227  0.88);
228  }
229  // The elastic contributions from decays still need to be subtracted.
230  if (piminusp_elastic_res_interpolation == nullptr) {
231  std::vector<double> x = PIMINUSP_RES_SQRTS;
232  for (auto& i : x) {
233  i = i * i;
234  }
235  std::vector<double> y = PIMINUSP_RES_SIG;
236  std::vector<double> dedup_x;
237  std::vector<double> dedup_y;
238  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
240  make_unique<InterpolateDataSpline>(dedup_x, dedup_y);
241  }
242  sigma -= (*piminusp_elastic_res_interpolation)(mandelstam_s);
243  if (sigma < 0) {
244  sigma = really_small;
245  }
246  return sigma;
247 }
const std::initializer_list< double > PIMINUSP_RES_SIG
Elastic π⁻N⁺ cross section contributions from decays.
static double piminusp_elastic_pdg(double mandelstam_s)
const std::initializer_list< double > PIMINUSP_RES_SQRTS
Center-of-mass energy.
static std::unique_ptr< InterpolateDataSpline > piminusp_elastic_res_interpolation
An interpolation that gets lazily filled using the PIMINUSP_RES data.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piminusp_lambdak0_pdg()

double smash::piminusp_lambdak0_pdg ( double  mandelstam_s)

pi- p -> Lambda K0 cross section parametrization, PDG data.

The PDG data is smoothed using the LOWESS algorithm. If more than one cross section was given for one p_lab value, the corresponding cross sections are averaged.

Definition at line 254 of file parametrizations.cc.

254  {
255  if (piminusp_lambdak0_interpolation == nullptr) {
256  std::vector<double> x = PIMINUSP_LAMBDAK0_P_LAB;
257  std::vector<double> y = PIMINUSP_LAMBDAK0_SIG;
258  std::vector<double> dedup_x;
259  std::vector<double> dedup_y;
260  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
261  dedup_y = smooth(dedup_x, dedup_y, 0.2, 6);
263  make_unique<InterpolateDataLinear<double>>(dedup_x, dedup_y);
264  }
265  const double p_lab = plab_from_s(mandelstam_s, pion_mass, nucleon_mass);
266  return (*piminusp_lambdak0_interpolation)(p_lab);
267 }
const std::initializer_list< double > PIMINUSP_LAMBDAK0_P_LAB
PDG data on pi- p to Lambda K0 cross section: momentum in lab frame.
static std::unique_ptr< InterpolateDataLinear< double > > piminusp_lambdak0_interpolation
An interpolation that gets lazily filled using the PIMINUSP_LAMBDAK0 data.
const std::initializer_list< double > PIMINUSP_LAMBDAK0_SIG
PDG data on pi- p to Lambda K0 cross section: cross section.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piminusp_sigmaminuskplus_pdg()

double smash::piminusp_sigmaminuskplus_pdg ( double  mandelstam_s)

pi- p -> Sigma- K+ cross section parametrization, PDG data.

The PDG data is smoothed using the LOWESS algorithm. If more than one cross section was given for one p_lab value, the corresponding cross sections are averaged.

Definition at line 274 of file parametrizations.cc.

274  {
276  std::vector<double> x = PIMINUSP_SIGMAMINUSKPLUS_P_LAB;
277  std::vector<double> y = PIMINUSP_SIGMAMINUSKPLUS_SIG;
278  std::vector<double> dedup_x;
279  std::vector<double> dedup_y;
280  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
281  dedup_y = smooth(dedup_x, dedup_y, 0.2, 6);
283  make_unique<InterpolateDataLinear<double>>(dedup_x, dedup_y);
284  }
285  const double p_lab = plab_from_s(mandelstam_s, pion_mass, nucleon_mass);
287 }
const std::initializer_list< double > PIMINUSP_SIGMAMINUSKPLUS_P_LAB
PDG data on pi- p to Sigma- K+ cross section: momentum in lab frame.
const std::initializer_list< double > PIMINUSP_SIGMAMINUSKPLUS_SIG
PDG data on pi- p to Sigma- K+ cross section: cross section.
static std::unique_ptr< InterpolateDataLinear< double > > piminusp_sigmaminuskplus_interpolation
An interpolation that gets lazily filled using the PIMINUSP_SIGMAMINUSKPLUS data.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piminusp_sigma0k0_res()

double smash::piminusp_sigma0k0_res ( double  mandelstam_s)

pi- p -> Sigma0 K0 cross section parametrization, resonance contribution.

The data is smoothed using the LOWESS algorithm. If more than one cross section was given for one sqrts value, the corresponding cross sections are averaged.

Definition at line 294 of file parametrizations.cc.

294  {
295  if (piminusp_sigma0k0_interpolation == nullptr) {
296  std::vector<double> x = PIMINUSP_SIGMA0K0_RES_SQRTS;
297  std::vector<double> y = PIMINUSP_SIGMA0K0_RES_SIG;
298  std::vector<double> dedup_x;
299  std::vector<double> dedup_y;
300  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
301  dedup_y = smooth(dedup_x, dedup_y, 0.2, 6);
303  make_unique<InterpolateDataLinear<double>>(dedup_x, dedup_y);
304  }
305  const double sqrts = std::sqrt(mandelstam_s);
306  return (*piminusp_sigma0k0_interpolation)(sqrts);
307 }
const std::initializer_list< double > PIMINUSP_SIGMA0K0_RES_SIG
pi- p to Sigma0 K0 cross section: cross section
const std::initializer_list< double > PIMINUSP_SIGMA0K0_RES_SQRTS
pi- p to Sigma0 K0 cross section: square root s
static std::unique_ptr< InterpolateDataLinear< double > > piminusp_sigma0k0_interpolation
An interpolation that gets lazily filled using the PIMINUSP_SIGMA0K0_RES data.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pp_elastic()

double smash::pp_elastic ( double  mandelstam_s)

pp elastic cross section parametrization Source: Weil:2013mya [53], eq.

(44)

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 309 of file parametrizations.cc.

309  {
310  const double p_lab = plab_from_s(mandelstam_s);
311  if (p_lab < 0.435) {
312  return 5.12 * nucleon_mass /
313  (mandelstam_s - 4 * nucleon_mass * nucleon_mass) +
314  1.67;
315  } else if (p_lab < 0.8) {
316  return 23.5 + 1000 * pow_int(p_lab - 0.7, 4);
317  } else if (p_lab < 2.0) {
318  return 1250 / (p_lab + 50) - 4 * (p_lab - 1.3) * (p_lab - 1.3);
319  } else if (p_lab < 2.776) {
320  return 77 / (p_lab + 1.5);
321  } else {
322  const auto logp = std::log(p_lab);
323  return 11.9 + 26.9 * std::pow(p_lab, -1.21) + 0.169 * logp * logp -
324  1.85 * logp;
325  }
326 }
constexpr T pow_int(const T base, unsigned const exponent)
Efficient template for calculating integer powers using squaring.
Definition: pow.h:23
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pp_elastic_high_energy()

double smash::pp_elastic_high_energy ( double  mandelstam_s,
double  m1,
double  m2 
)

pp elastic cross section parametrization, with only the high energy part generalized to all energy regimes (used for AQM) Source: Weil:2013mya [53], eq.

(44)

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
[in]m1the mass of the first particle [GeV]
[in]m2the mass of the second particle [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 328 of file parametrizations.cc.

328  {
329  const double p_lab = (m1 > m2) ? plab_from_s(mandelstam_s, m2, m1)
330  : plab_from_s(mandelstam_s, m1, m2);
331  const auto logp = std::log(p_lab);
332  return 11.9 + 26.9 * std::pow(p_lab, -1.21) + 0.169 * logp * logp -
333  1.85 * logp;
334 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pp_total()

double smash::pp_total ( double  mandelstam_s)

pp total cross section parametrization Sources: low-p: Cugnon:1996kh [15] highest-p: Buss:2011mx [10]

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 336 of file parametrizations.cc.

336  {
337  const double p_lab = plab_from_s(mandelstam_s);
338  if (p_lab < 0.4) {
339  return 34 * std::pow(p_lab / 0.4, -2.104);
340  } else if (p_lab < 0.8) {
341  return 23.5 + 1000 * pow_int(p_lab - 0.7, 4);
342  } else if (p_lab < 1.5) {
343  return 23.5 + 24.6 / (1 + std::exp(-(p_lab - 1.2) / 0.1));
344  } else if (p_lab < 5.0) {
345  return 41 + 60 * (p_lab - 0.9) * std::exp(-1.2 * p_lab);
346  } else {
347  const auto logp = std::log(p_lab);
348  return 48.0 + 0.522 * logp * logp - 4.51 * logp;
349  }
350 }
Here is the call graph for this function:

◆ np_elastic()

double smash::np_elastic ( double  mandelstam_s)

np elastic cross section parametrization Source: Weil:2013mya [53], eq.

(45)

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 352 of file parametrizations.cc.

352  {
353  const double p_lab = plab_from_s(mandelstam_s);
354  if (p_lab < 0.525) {
355  return 17.05 * nucleon_mass /
356  (mandelstam_s - 4 * nucleon_mass * nucleon_mass) -
357  6.83;
358  } else if (p_lab < 0.8) {
359  return 33 + 196 * std::pow(std::abs(p_lab - 0.95), 2.5);
360  } else if (p_lab < 2.0) {
361  return 31 / std::sqrt(p_lab);
362  } else if (p_lab < 2.776) {
363  return 77 / (p_lab + 1.5);
364  } else {
365  const auto logp = std::log(p_lab);
366  return 11.9 + 26.9 * std::pow(p_lab, -1.21) + 0.169 * logp * logp -
367  1.85 * logp;
368  }
369 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ np_total()

double smash::np_total ( double  mandelstam_s)

np total cross section parametrization Sources: low-p: Cugnon:1996kh [15] highest-p: Buss:2011mx [10]

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 371 of file parametrizations.cc.

371  {
372  const double p_lab = plab_from_s(mandelstam_s);
373  const auto logp = std::log(p_lab);
374  if (p_lab < 0.4) {
375  return 6.3555 * std::pow(p_lab, -3.2481) * std::exp(-0.377 * logp * logp);
376  } else if (p_lab < 1.0) {
377  return 33 + 196 * std::pow(std::abs(p_lab - 0.95), 2.5);
378  } else if (p_lab < 2.0) {
379  return 24.2 + 8.9 * p_lab;
380  } else if (p_lab < 5.0) {
381  return 42;
382  } else {
383  return 48.0 + 0.522 * logp * logp - 4.51 * logp;
384  }
385 }
Here is the call graph for this function:

◆ ppbar_elastic()

double smash::ppbar_elastic ( double  mandelstam_s)

ppbar elastic cross section parametrization Source: Bass:1998ca [4]

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 387 of file parametrizations.cc.

387  {
388  if (mandelstam_s < 4 * nucleon_mass * nucleon_mass) {
389  // Needed, since called directly from p_52
390  return 0.0;
391  }
392  const double p_lab = plab_from_s(mandelstam_s);
393  if (p_lab < 0.3) {
394  return 78.6;
395  } else if (p_lab < 5.0) {
396  return 31.6 + 18.3 / p_lab - 1.1 / (p_lab * p_lab) - 3.8 * p_lab;
397  } else {
398  const auto logp = std::log(p_lab);
399  return 10.2 + 52.7 * std::pow(p_lab, -1.16) + 0.125 * logp * logp -
400  1.28 * logp;
401  }
402 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ppbar_total()

double smash::ppbar_total ( double  mandelstam_s)

ppbar total cross section parametrization Source: Bass:1998ca [4]

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 404 of file parametrizations.cc.

404  {
405  if (mandelstam_s < 4 * nucleon_mass * nucleon_mass) {
406  // Needed, since called directly from p_52
407  return 0.0;
408  }
409  const double p_lab = plab_from_s(mandelstam_s);
410  if (p_lab < 0.3) {
411  return 271.6 * std::exp(-1.1 * p_lab * p_lab);
412  } else if (p_lab < 5.0) {
413  return 75.0 + 43.1 / p_lab + 2.6 / (p_lab * p_lab) - 3.9 * p_lab;
414  } else {
415  const auto logp = std::log(p_lab);
416  return 38.4 + 77.6 * std::pow(p_lab, -0.64) + 0.26 * logp * logp -
417  1.2 * logp;
418  }
419 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deuteron_pion_elastic()

double smash::deuteron_pion_elastic ( double  mandelstam_s)

Deuteron pion elastic cross-section [mb] parametrized to fit pi-d elastic scattering data (the data collection was be obtained from SAID data base, gwdac.phys.gwu.edu)

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 421 of file parametrizations.cc.

421  {
422  const double tmp = std::sqrt(mandelstam_s) - 2.172;
423  return 4.0 + 0.27 / (tmp * tmp + 0.065 * 0.065);
424 }
Here is the caller graph for this function:

◆ deuteron_nucleon_elastic()

double smash::deuteron_nucleon_elastic ( double  mandelstam_s)

Deuteron nucleon elastic cross-section [mb] parametrized by Oh:2009gx [35].

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 426 of file parametrizations.cc.

426  {
427  const double s = mandelstam_s;
428  return 2500.0 * std::exp(-smash::square(s - 7.93) / 0.003) +
429  600.0 * std::exp(-smash::square(s - 7.93) / 0.1) + 10.0;
430 }
constexpr T square(const T base)
Efficient template for calculating the square.
Definition: pow.h:38
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kplusp_elastic_background()

double smash::kplusp_elastic_background ( double  mandelstam_s)

K+ p elastic background cross section parametrization.

sigma(K+n->K+n) = sigma(K+n->K0p) = 0.5 * sigma(K+p->K+p) Source: Buss:2011mx [10], B.3.8

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 432 of file parametrizations.cc.

432  {
433  constexpr double a0 = 10.508; // mb
434  constexpr double a1 = -3.716; // mb/GeV
435  constexpr double a2 = 1.845; // mb/GeV^2
436  constexpr double a3 = -0.764; // GeV^-1
437  constexpr double a4 = 0.508; // GeV^-2
438 
439  const double p_lab = plab_from_s(mandelstam_s, kaon_mass, nucleon_mass);
440  const double p_lab2 = p_lab * p_lab;
441 
442  return (a0 + a1 * p_lab + a2 * p_lab2) / (1 + a3 * p_lab + a4 * p_lab2);
443 }
constexpr double kaon_mass
Kaon mass in GeV.
Definition: constants.h:72
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kplusn_elastic_background()

double smash::kplusn_elastic_background ( double  mandelstam_s)

K+ n elastic background cross section parametrization sigma(K+n->K+n) = sigma(K+n->K0p) = 0.5 * sigma(K+p->K+p) Source: Buss:2011mx [10], B.3.8.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 445 of file parametrizations.cc.

445  {
446  return 0.25 * kplusp_elastic_background(mandelstam_s);
447 }
double kplusp_elastic_background(double mandelstam_s)
K+ p elastic background cross section parametrization.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kplusn_k0p()

double smash::kplusn_k0p ( double  mandelstam_s)

K+ n charge exchange cross section parametrization.

sigma(K+n->K+n) = sigma(K+n->K0p) = 0.5 * sigma(K+p->K+p) Source: Buss:2011mx [10], B.3.8

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 449 of file parametrizations.cc.

449  {
450  return 0.25 * kplusp_elastic_background(mandelstam_s);
451 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusp_elastic_background()

double smash::kminusp_elastic_background ( double  mandelstam_s)

K- p elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 473 of file parametrizations.cc.

473  {
474  const double p_lab = plab_from_s(mandelstam_s, kaon_mass, nucleon_mass);
475  double sigma;
476  if (std::sqrt(mandelstam_s) < 1.68) {
477  /* The parametrization here also works for anti-K0 n, Lambda pi0,
478  * Sigma+ pi-, Sigma- pi+, Sigma0 pi0 with different parameters a0, a1, a2.
479  *
480  * The values of the parameters are *not* taken from the source above,
481  * they come from a fit to PDG data. */
482  constexpr double a0 = 186.03567644; // mb GeV^2
483  constexpr double a1 = 0.22002795; // Gev
484  constexpr double a2 = 0.64907116;
485 
486  const double p_i = p_lab;
487  const double p_f = p_lab;
488 
489  const double ratio = a1 * a1 / (a1 * a1 + p_f * p_f);
490  sigma = a0 * p_f / (p_i * mandelstam_s) * std::pow(ratio, a2);
491  } else {
492  sigma = kminusp_elastic_pdg(mandelstam_s);
493  }
494  // The elastic contributions from decays still need to be subtracted.
495  if (kminusp_elastic_res_interpolation == nullptr) {
496  std::vector<double> x = KMINUSP_RES_SQRTS;
497  for (auto& i : x) {
498  i = plab_from_s(i * i, kaon_mass, nucleon_mass);
499  }
500  std::vector<double> y = KMINUSP_RES_SIG;
502  make_unique<InterpolateDataSpline>(x, y);
503  }
504  const auto old_sigma = sigma;
505  sigma -= (*kminusp_elastic_res_interpolation)(p_lab);
506  if (sigma < 0) {
507  std::cout << "NEGATIVE SIGMA: sigma=" << sigma
508  << ", sqrt(s)=" << std::sqrt(mandelstam_s)
509  << ", sig_el_exp=" << old_sigma
510  << ", sig_el_res=" << (*kminusp_elastic_res_interpolation)(p_lab)
511  << std::endl;
512  }
513  assert(sigma >= 0);
514  return sigma;
515 }
const std::initializer_list< double > KMINUSP_RES_SQRTS
Center-of-mass energy list for K̅⁻ N⁺
const std::initializer_list< double > KMINUSP_RES_SIG
Elastic K̅⁻ N⁺ cross section contributions from decays.
static std::unique_ptr< InterpolateDataSpline > kminusp_elastic_res_interpolation
An interpolation that gets lazily filled using the KMINUSP_RES data.
static double kminusp_elastic_pdg(double mandelstam_s)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusn_elastic_background()

double smash::kminusn_elastic_background ( double  mandelstam_s)

K- n elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 517 of file parametrizations.cc.

517 { return 4.0; }
Here is the caller graph for this function:

◆ k0p_elastic_background()

double smash::k0p_elastic_background ( double  mandelstam_s)

K0 p elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 519 of file parametrizations.cc.

519  {
520  // by isospin symmetry
521  return kplusn_elastic_background(mandelstam_s);
522 }
double kplusn_elastic_background(double mandelstam_s)
K+ n elastic background cross section parametrization sigma(K+n->K+n) = sigma(K+n->K0p) = 0....
Here is the call graph for this function:
Here is the caller graph for this function:

◆ k0n_elastic_background()

double smash::k0n_elastic_background ( double  mandelstam_s)

K0 n elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 524 of file parametrizations.cc.

524  {
525  // by isospin symmetry
526  return kplusp_elastic_background(mandelstam_s);
527 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kbar0p_elastic_background()

double smash::kbar0p_elastic_background ( double  mandelstam_s)

Kbar0 p elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 529 of file parametrizations.cc.

529  {
530  // by isospin symmetry
531  return kminusn_elastic_background(mandelstam_s);
532 }
double kminusn_elastic_background(double mandelstam_s)
K- n elastic background cross section parametrization Source: Buss:2011mx , B.3.9.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kbar0n_elastic_background()

double smash::kbar0n_elastic_background ( double  mandelstam_s)

Kbar0 n elastic background cross section parametrization Source: Buss:2011mx [10], B.3.9.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 534 of file parametrizations.cc.

534  {
535  // by isospin symmetry
536  return kminusp_elastic_background(mandelstam_s);
537 }
double kminusp_elastic_background(double mandelstam_s)
K- p elastic background cross section parametrization Source: Buss:2011mx , B.3.9.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kplusp_inelastic_background()

double smash::kplusp_inelastic_background ( double  mandelstam_s)

K+ p inelastic background cross section parametrization Source: Buss:2011mx [10], B.3.8.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 539 of file parametrizations.cc.

539  {
540  if (kplusp_total_interpolation == nullptr) {
541  std::vector<double> x = KPLUSP_TOT_PLAB;
542  std::vector<double> y = KPLUSP_TOT_SIG;
543  std::vector<double> dedup_x;
544  std::vector<double> dedup_y;
545  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
546  dedup_y = smooth(dedup_x, dedup_y, 0.1, 5);
548  make_unique<InterpolateDataLinear<double>>(dedup_x, dedup_y);
549  }
550  const double p_lab = plab_from_s(mandelstam_s, kaon_mass, nucleon_mass);
552  mandelstam_s);
553 }
const std::initializer_list< double > KPLUSP_TOT_SIG
PDG data on K+ p total cross section: cross section.
const std::initializer_list< double > KPLUSP_TOT_PLAB
PDG data on K+ p total cross section: momentum in lab frame.
static std::unique_ptr< InterpolateDataLinear< double > > kplusp_total_interpolation
An interpolation that gets lazily filled using the KPLUSP_TOT data.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kplusn_inelastic_background()

double smash::kplusn_inelastic_background ( double  mandelstam_s)

K+ n inelastic background cross section parametrization Source: Buss:2011mx [10], B.3.8.

This interpolates the experimental data of the total cross section and subtracts the elastic and charge exchange cross section.

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 555 of file parametrizations.cc.

555  {
556  if (kplusn_total_interpolation == nullptr) {
557  std::vector<double> x = KPLUSN_TOT_PLAB;
558  std::vector<double> y = KPLUSN_TOT_SIG;
559  std::vector<double> dedup_x;
560  std::vector<double> dedup_y;
561  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
562  dedup_y = smooth(dedup_x, dedup_y, 0.05, 5);
564  make_unique<InterpolateDataLinear<double>>(dedup_x, dedup_y);
565  }
566  const double p_lab = plab_from_s(mandelstam_s, kaon_mass, nucleon_mass);
568  mandelstam_s) -
569  kplusn_k0p(mandelstam_s);
570 }
double kplusn_k0p(double mandelstam_s)
K+ n charge exchange cross section parametrization.
const std::initializer_list< double > KPLUSN_TOT_SIG
PDG data on K+ n total cross section: cross section.
const std::initializer_list< double > KPLUSN_TOT_PLAB
PDG data on K+ n total cross section: momentum in lab frame.
static std::unique_ptr< InterpolateDataLinear< double > > kplusn_total_interpolation
An interpolation that gets lazily filled using the KPLUSN_TOT data.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusp_kbar0n()

double smash::kminusp_kbar0n ( double  mandelstam_s)

K- p <-> Kbar0 n cross section parametrization.

Source: Buss:2011mx [10], B.3.9

Parameters
[in]mandelstam_sthe rest frame total energy squared [GeV^2]
Returns
the parametrized cross-section [mb]

Definition at line 677 of file parametrizations.cc.

677  {
678  constexpr double a0 = 100; // mb GeV^2
679  constexpr double a1 = 0.15; // GeV
680  constexpr unsigned a2 = 2;
681 
682  const double p_lab = plab_from_s(mandelstam_s, kaon_mass, nucleon_mass);
683  const double p_i = p_lab;
684  const double p_f = p_lab;
685 
686  return a0 * p_f / (p_i * mandelstam_s) *
687  pow_int(a1 * a1 / (a1 * a1 + p_f * p_f), a2);
688 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusp_piminussigmaplus()

double smash::kminusp_piminussigmaplus ( double  sqrts)

K- p <-> pi- Sigma+ cross section parametrization Taken from UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrtsthe rest frame total energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 690 of file parametrizations.cc.

690  {
691  return 0.0788265 / smash::square(sqrts - 1.38841);
692 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusp_piplussigmaminus()

double smash::kminusp_piplussigmaminus ( double  sqrts)

K- p <-> pi+ Sigma- cross section parametrization Taken from UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrtsthe rest frame total energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 694 of file parametrizations.cc.

694  {
695  return 0.0196741 / smash::square(sqrts - 1.42318);
696 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusp_pi0sigma0()

double smash::kminusp_pi0sigma0 ( double  sqrts)

K- p <-> pi0 Sigma0 cross section parametrization Fit to Landolt-Börnstein instead of UrQMD values.

Parameters
[in]sqrtsthe rest frame total energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 698 of file parametrizations.cc.

698  {
699  return 0.0403364 / smash::square(sqrts - 1.39830305);
700 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusp_pi0lambda()

double smash::kminusp_pi0lambda ( double  sqrts)

K- p <-> pi0 Lambda cross section parametrization Fit to Landolt-Börnstein instead of UrQMD values.

Todo:
clarify this
Parameters
[in]sqrtsthe rest frame total energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 702 of file parametrizations.cc.

702  {
703  return 0.05932562 / smash::square(sqrts - 1.38786692);
704 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusn_piminussigma0()

double smash::kminusn_piminussigma0 ( double  sqrts)

K- n <-> pi- Sigma0 cross section parametrization Follow from the parametrization with the same strange product via isospin symmetry.

Parameters
[in]sqrtsthe rest frame total energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 706 of file parametrizations.cc.

706  {
707  return kminusp_piminussigmaplus(sqrts) + kminusp_piplussigmaminus(sqrts) -
708  2. * kminusp_pi0sigma0(sqrts);
709 }
double kminusp_piminussigmaplus(double sqrts)
K- p <-> pi- Sigma+ cross section parametrization Taken from UrQMD (Graef:2014mra ).
double kminusp_pi0sigma0(double sqrts)
K- p <-> pi0 Sigma0 cross section parametrization Fit to Landolt-Börnstein instead of UrQMD values.
double kminusp_piplussigmaminus(double sqrts)
K- p <-> pi+ Sigma- cross section parametrization Taken from UrQMD (Graef:2014mra ).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusn_pi0sigmaminus()

double smash::kminusn_pi0sigmaminus ( double  sqrts)

K- n <-> pi0 Sigma- cross section parametrization Follow from the parametrization with the same strange product via isospin symmetry.

Parameters
[in]sqrtsthe rest frame total energy [GeV]
Returns
the parametrized cross-section [mb]

◆ kminusn_piminuslambda()

double smash::kminusn_piminuslambda ( double  sqrts)

K- n <-> pi- Lambda cross section parametrization Follow from the parametrization with the same strange product via isospin symmetry.

Parameters
[in]sqrtsthe rest frame total energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 711 of file parametrizations.cc.

711  {
712  return 2. * kminusp_pi0lambda(sqrts);
713 }
double kminusp_pi0lambda(double sqrts)
K- p <-> pi0 Lambda cross section parametrization Fit to Landolt-Börnstein instead of UrQMD values.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lambdalambda_ximinusp()

double smash::lambdalambda_ximinusp ( double  sqrts_sqrts0,
double  p_N,
double  p_lambda 
)

Lambda Lambda <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
[in]p_Nmomentum of outgoing nucleon in center of mass frame [GeV]
[in]p_lambdamomentum of incoming lambda in center of mass frame [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 717 of file parametrizations.cc.

717  {
718  assert(p_lambda != 0);
719  assert(sqrts_sqrts0 >= 0);
720  return 37.15 / 2 * p_N / p_lambda * std::pow(sqrts_sqrts0, -0.16);
721 }
Here is the caller graph for this function:

◆ lambdalambda_xi0n()

double smash::lambdalambda_xi0n ( double  sqrts_sqrts0,
double  p_N,
double  p_lambda 
)

Lambda Lambda <-> Xi0 n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
[in]p_Nmomentum of outgoing nucleon in center of mass frame [GeV]
[in]p_lambdamomentum of incoming lambda in center of mass frame [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 723 of file parametrizations.cc.

723  {
724  return lambdalambda_ximinusp(sqrts_sqrts0, p_N, p_lambda);
725 }
double lambdalambda_ximinusp(double sqrts_sqrts0, double p_N, double p_lambda)
Lambda Lambda <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model ...
Here is the call graph for this function:

◆ lambdasigmaplus_xi0p()

double smash::lambdasigmaplus_xi0p ( double  sqrts_sqrts0)

Lambda Sigma+ <-> Xi0 p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 727 of file parametrizations.cc.

727  {
728  assert(sqrts_sqrts0 >= 0);
729  return 24.3781 * std::pow(sqrts_sqrts0, -0.479);
730 }
Here is the caller graph for this function:

◆ lambdasigmaminus_ximinusn()

double smash::lambdasigmaminus_ximinusn ( double  sqrts_sqrts0)

Lambda Sigma- <-> Xi- n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 732 of file parametrizations.cc.

732  {
733  return lambdasigmaplus_xi0p(sqrts_sqrts0);
734 }
double lambdasigmaplus_xi0p(double sqrts_sqrts0)
Lambda Sigma+ <-> Xi0 p cross section parametrization Two hyperon exchange, based on effective model ...
Here is the call graph for this function:

◆ lambdasigma0_ximinusp()

double smash::lambdasigma0_ximinusp ( double  sqrts_sqrts0)

Lambda Sigma0 <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 736 of file parametrizations.cc.

736  {
737  assert(sqrts_sqrts0 >= 0);
738  if (sqrts_sqrts0 < 0.03336) {
739  return 6.475 * std::pow(sqrts_sqrts0, -0.4167);
740  } else {
741  return 14.5054 * std::pow(sqrts_sqrts0, -0.1795);
742  }
743 }
Here is the caller graph for this function:

◆ lambdasigma0_xi0n()

double smash::lambdasigma0_xi0n ( double  sqrts_sqrts0)

Lambda Sigma0 <-> Xi0 n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 745 of file parametrizations.cc.

745  {
746  return lambdasigma0_ximinusp(sqrts_sqrts0);
747 }
double lambdasigma0_ximinusp(double sqrts_sqrts0)
Lambda Sigma0 <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model ...
Here is the call graph for this function:

◆ sigma0sigma0_ximinusp()

double smash::sigma0sigma0_ximinusp ( double  sqrts_sqrts0)

Sigma0 Sigma0 <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 749 of file parametrizations.cc.

749  {
750  assert(sqrts_sqrts0 >= 0);
751  if (sqrts_sqrts0 < 0.09047) {
752  return 5.625 * std::pow(sqrts_sqrts0, -0.318);
753  } else {
754  return 4.174 * std::pow(sqrts_sqrts0, -0.4421);
755  }
756 }
Here is the caller graph for this function:

◆ sigma0sigma0_xi0n()

double smash::sigma0sigma0_xi0n ( double  sqrts_sqrts0)

Sigma0 Sigma0 <-> Xi0 n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Note that there is a typo in the paper in equation (6): "Lambda Sigma0 -> Xi0 n" should be "Sigma0 Sigma0 -> Xi0 n".

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 758 of file parametrizations.cc.

758  {
759  return sigma0sigma0_ximinusp(sqrts_sqrts0);
760 }
double sigma0sigma0_ximinusp(double sqrts_sqrts0)
Sigma0 Sigma0 <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model ...
Here is the call graph for this function:

◆ sigmaplussigmaminus_xi0p()

double smash::sigmaplussigmaminus_xi0p ( double  sqrts_sqrts0)

Sigma+ Sigma- <-> Xi0 p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 762 of file parametrizations.cc.

762  {
763  return 4 * sigma0sigma0_ximinusp(sqrts_sqrts0);
764 }
Here is the call graph for this function:

◆ sigma0sigmaminus_ximinusn()

double smash::sigma0sigmaminus_ximinusn ( double  sqrts_sqrts0)

Sigma0 Sigma- <-> Xi- n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 766 of file parametrizations.cc.

766  {
767  return 4 * sigma0sigma0_ximinusp(sqrts_sqrts0);
768 }
Here is the call graph for this function:

◆ sigmaplussigmaminus_ximinusp()

double smash::sigmaplussigmaminus_ximinusp ( double  sqrts_sqrts0)

Sigma+ Sigma- <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 770 of file parametrizations.cc.

770  {
771  return 14.194 * std::pow(sqrts_sqrts0, -0.442);
772 }
Here is the caller graph for this function:

◆ sigmaplussigmaminus_xi0n()

double smash::sigmaplussigmaminus_xi0n ( double  sqrts_sqrts0)

Sigma+ Sigma- <-> Xi0 n cross section parametrization Two hyperon exchange, based on effective model by Feng Li, as in UrQMD (Graef:2014mra [21]).

Parameters
[in]sqrts_sqrts0the rest frame total energy minus threshold energy [GeV]
Returns
the parametrized cross-section [mb]

Definition at line 774 of file parametrizations.cc.

774  {
775  return sigmaplussigmaminus_ximinusp(sqrts_sqrts0);
776 }
double sigmaplussigmaminus_ximinusp(double sqrts_sqrts0)
Sigma+ Sigma- <-> Xi- p cross section parametrization Two hyperon exchange, based on effective model ...
Here is the call graph for this function:

◆ operator-() [3/4]

Parity smash::operator- ( Parity  p)
inline
Parameters
pGiven parity.
Returns
Inverted parity.

Definition at line 45 of file particletype.h.

45  {
46  switch (p) {
47  case Parity::Pos:
48  return Parity::Neg;
49  case Parity::Neg:
50  return Parity::Pos;
51  }
52  // This is unreachable and should be optimized away.
53  // It is required to silence a compiler warning.
54  throw std::runtime_error("unreachable");
55 }

◆ operator*() [5/8]

Parity smash::operator* ( Parity  x,
Parity  y 
)
inline
Parameters
xLeft-hand parity
yRight-hand parity
Returns
Product of x and y.

Definition at line 62 of file particletype.h.

62  {
63  if (x == y) {
64  return Parity::Pos;
65  } else {
66  return Parity::Neg;
67  }
68 }

◆ operator*=()

void smash::operator*= ( Parity x,
Parity  y 
)
inline
Parameters
xLeft-hand parity
yRight-hand parity
Returns
Product of x and y.

Definition at line 75 of file particletype.h.

75  {
76  if (x == y) {
77  x = Parity::Pos;
78  } else {
79  x = Parity::Neg;
80  }
81 }

◆ operator>>()

std::istream & smash::operator>> ( std::istream &  is,
PdgCode code 
)

Sets the PDG code from the textual representation in the input stream.

istream >> PdgCode assigns the PDG Code from an istream.

Parameters
[in]isinput string
[out]codePdgCode to be set

Definition at line 14 of file pdgcode.cc.

14  {
15  std::string codestring("");
16  is >> codestring;
17  if (!is) {
18  code = PdgCode::invalid();
19  return is;
20  }
21  try {
22  // set the fields from the string:
23  code.set_from_string(codestring);
24  } catch (PdgCode::InvalidPdgCode&) {
25  is.setstate(std::ios::failbit);
26  code = PdgCode::invalid();
27  }
28  return is;
29 }
constexpr int invalid
Invalid particle.

◆ is_dilepton()

bool smash::is_dilepton ( const PdgCode  pdg1,
const PdgCode  pdg2 
)
inline
Returns
if two given particles represent a lepton pair (e+e- or mu+mu-).

Definition at line 978 of file pdgcode.h.

978  {
979  const auto c1 = pdg1.code();
980  const auto c2 = pdg2.code();
981  const auto min = std::min(c1, c2);
982  const auto max = std::max(c1, c2);
983  return (max == 0x11 && min == -0x11) || (max == 0x13 && min == -0x13);
984 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_lepton_pair()

bool smash::has_lepton_pair ( const PdgCode  pdg1,
const PdgCode  pdg2,
const PdgCode  pdg3 
)
inline
Returns
if two of the three given particles represent a lepton pair (e+e- or mu+mu-).

Definition at line 990 of file pdgcode.h.

991  {
992  return is_dilepton(pdg1, pdg2) || is_dilepton(pdg1, pdg3) ||
993  is_dilepton(pdg2, pdg3);
994 }
bool is_dilepton(const PdgCode pdg1, const PdgCode pdg2)
Definition: pdgcode.h:978
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pack()

constexpr uint64_t smash::pack ( int32_t  x,
int32_t  y 
)
constexpr

Pack two int32_t into an uint64_t.

This is useful for switch statements on pairs.

Parameters
xFirst integer to be packed.
ySecond integer to be packed.
Returns
Combined integer.

Definition at line 112 of file pdgcode_constants.h.

112  {
113  return (static_cast<uint64_t>(static_cast<uint32_t>(x)) << 32) |
114  static_cast<uint64_t>(static_cast<uint32_t>(y));
115  //^ Casting to an intermediate 32-bit integer is important!
116 }
Here is the caller graph for this function:

◆ pow_int()

template<class T >
constexpr T smash::pow_int ( const T  base,
unsigned const  exponent 
)
inlineconstexpr

Efficient template for calculating integer powers using squaring.

Template Parameters
TType that implements multiplication.
Parameters
[in]base
[in]exponent
Returns
base^exponent

Definition at line 23 of file pow.h.

23  {
24  return (exponent == 0)
25  ? 1
26  : (exponent % 2 == 0)
27  ? pow_int(base, exponent / 2) * pow_int(base, exponent / 2)
28  : base * pow_int(base, exponent - 1);
29 }
Here is the caller graph for this function:

◆ square()

template<class T >
constexpr T smash::square ( const T  base)
inlineconstexpr

Efficient template for calculating the square.

Template Parameters
TType that implements multiplication.
Parameters
[in]basevalue that gets squared
Returns
result of squaring base

Definition at line 38 of file pow.h.

38  {
39  return pow_int(base, 2);
40 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_string_soft_process()

bool smash::is_string_soft_process ( ProcessType  p)

Check if a given process type is a soft string excitation.

Parameters
[in]pThe process type

Definition at line 18 of file processbranch.cc.

18  {
19  return p == ProcessType::StringSoftSingleDiffractiveAX ||
20  p == ProcessType::StringSoftSingleDiffractiveXB ||
21  p == ProcessType::StringSoftDoubleDiffractive ||
22  p == ProcessType::StringSoftAnnihilation ||
23  p == ProcessType::StringSoftNonDiffractive;
24 }
Here is the caller graph for this function:

◆ calc_hubble()

double smash::calc_hubble ( double  time,
const ExpansionProperties metric 
)

Calculate the Hubble parameter \(H(t)\), which describes how large the expansion flow is.

The flow \(\vec v=H(t) \vec x\) Tindall:2016try [51]

Parameters
[in]timetime in the computational frame. [fm]
[in]metricStruct containing the parameters needed to calculate the metric.
Returns
Hubble parameter [fm^ \({-1}\)]

Definition at line 21 of file propagation.cc.

21  {
22  double h; // Hubble parameter
23 
24  switch (metric.mode_) {
26  h = 0.;
27  break;
29  h = metric.b_ / (2 * (metric.b_ * time + 1));
30  break;
32  h = 2 * metric.b_ / (3 * (metric.b_ * time + 1));
33  break;
35  h = metric.b_ * time;
36  break;
37  default:
38  h = 0.;
39  }
40 
41  return h;
42 }
Here is the caller graph for this function:

◆ propagate_straight_line()

double smash::propagate_straight_line ( Particles particles,
double  to_time,
const std::vector< FourVector > &  beam_momentum 
)

Propagates the positions of all particles on a straight line to a given moment.

For each particle, the position is shifted:

\[ \vec x^\prime = \vec x + \vec v \Delta t \]

where \(\vec x\) is the current position, \(\vec v\) its velocity and \(\Delta t\) the duration of this timestep.

Parameters
[out]particlesThe particle list in the event
[in]to_timefinal time [fm]
[in]beam_momentumThis vector of 4-momenta should have non-zero size only if "frozen Fermi motion" is on. The the Fermi momenta are only used for collisions, but not for propagation. In this case beam_momentum is used for propagating the initial nucleons. [GeV]
Returns
dt time interval of propagation which is equal to the difference between the final time and the initial time read from the 4-position of the particle.

Definition at line 44 of file propagation.cc.

45  {
46  bool negative_dt_error = false;
47  double dt = 0.0;
48  for (ParticleData &data : *particles) {
49  const double t0 = data.position().x0();
50  dt = to_time - t0;
51  if (dt < 0.0 && !negative_dt_error) {
52  // Print error message once, not for every particle
53  negative_dt_error = true;
54  logg[LPropagation].error("propagate_straight_line - negative dt = ", dt);
55  }
56  assert(dt >= 0.0);
57  /* "Frozen Fermi motion": Fermi momenta are only used for collisions,
58  * but not for propagation. This is done to avoid nucleus flying apart
59  * even if potentials are off. Initial nucleons before the first collision
60  * are propagated only according to beam momentum.
61  * Initial nucleons are distinguished by data.id() < the size of
62  * beam_momentum, which is by default zero except for the collider modus
63  * with the fermi motion == frozen.
64  * todo(m. mayer): improve this condition (see comment #11 issue #4213)*/
65  assert(data.id() >= 0);
66  const bool avoid_fermi_motion =
67  (static_cast<uint64_t>(data.id()) <
68  static_cast<uint64_t>(beam_momentum.size())) &&
69  (data.get_history().collisions_per_particle == 0);
70  ThreeVector v;
71  if (avoid_fermi_motion) {
72  const FourVector vbeam = beam_momentum[data.id()];
73  v = vbeam.velocity();
74  } else {
75  v = data.velocity();
76  }
77  const FourVector distance = FourVector(0.0, v * dt);
78  logg[LPropagation].debug("Particle ", data, " motion: ", distance);
79  FourVector position = data.position() + distance;
80  position.set_x0(to_time);
81  data.set_4position(position);
82  }
83  return dt;
84 }
static constexpr int LPropagation
Definition: propagation.cc:19
Here is the call graph for this function:
Here is the caller graph for this function:

◆ expand_space_time()

void smash::expand_space_time ( Particles particles,
const ExperimentParameters parameters,
const ExpansionProperties metric 
)

Modifies positions and momentum of all particles to account for space-time deformation.

Parameters
[out]particlesAll the particles in the event
[in]parametersA struct containing the parameters from which we extract the time in the computational frame.
[in]metricA struct containing the parameters need to calculate the metric

Definition at line 86 of file propagation.cc.

88  {
89  const double dt = parameters.labclock->timestep_duration();
90  for (ParticleData &data : *particles) {
91  // Momentum and position modification to ensure appropriate expansion
92  const double h = calc_hubble(parameters.labclock->current_time(), metric);
93  FourVector delta_mom = FourVector(0.0, h * data.momentum().threevec() * dt);
94  FourVector expan_dist =
95  FourVector(0.0, h * data.position().threevec() * dt);
96 
97  logg[LPropagation].debug("Particle ", data,
98  " expansion motion: ", expan_dist);
99  // New position and momentum
100  FourVector position = data.position() + expan_dist;
101  FourVector momentum = data.momentum() - delta_mom;
102 
103  // set the new momentum and position variables
104  data.set_4position(position);
105  data.set_4momentum(momentum);
106  // force the on shell condition to ensure correct energy
107  data.set_4momentum(data.pole_mass(), data.momentum().threevec());
108  }
109 }
double calc_hubble(double time, const ExpansionProperties &metric)
Calculate the Hubble parameter , which describes how large the expansion flow is.
Definition: propagation.cc:21
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_momenta()

void smash::update_momenta ( std::vector< Particles > &  particles,
double  dt,
const Potentials pot,
RectangularLattice< std::pair< ThreeVector, ThreeVector >> *  FB_lat,
RectangularLattice< std::pair< ThreeVector, ThreeVector >> *  FI3_lat,
RectangularLattice< std::pair< ThreeVector, ThreeVector >> *  EM_lat 
)

Updates the momenta of all particles at the current time step according to the equations of motion:

\[ \frac{dp}{dt} = \vec E + \vec v \times \vec B \]

Parameters
[out]particlesThe particle list in the event
[in]dttimestep
[in]potThe potentials in the system
[in]FB_latLattice for the electric and magnetic components of the Skyrme force
[in]FI3_latLattice for the electric and magnetic components of the symmetry force
[in]EM_latLattice for the electric and magnetic field

Definition at line 111 of file propagation.cc.

115  {
116  // Copy particles from ALL ensembles to a single list before propagation
117  // and calculate potentials from this list
118  ParticleList plist;
119  for (Particles &particles : ensembles) {
120  const ParticleList tmp = particles.copy_to_vector();
121  plist.insert(plist.end(), tmp.begin(), tmp.end());
122  }
123 
124  bool possibly_use_lattice =
125  (pot.use_skyrme() ? (FB_lat != nullptr) : true) &&
126  (pot.use_vdf() ? (FB_lat != nullptr) : true) &&
127  (pot.use_symmetry() ? (FI3_lat != nullptr) : true);
128  std::pair<ThreeVector, ThreeVector> FB, FI3, EM_fields;
129  double min_time_scale = std::numeric_limits<double>::infinity();
130 
131  for (Particles &particles : ensembles) {
132  for (ParticleData &data : particles) {
133  // Only baryons and nuclei will be affected by the potentials
134  if (!(data.is_baryon() || data.is_nucleus())) {
135  continue;
136  }
137  const auto scale = pot.force_scale(data.type());
138  const ThreeVector r = data.position().threevec();
139  /* Lattices can be used for calculation if 1-2 are fulfilled:
140  * 1) Required lattices are not nullptr - possibly_use_lattice
141  * 2) r is not out of required lattices */
142  const bool use_lattice =
143  possibly_use_lattice &&
144  (pot.use_skyrme() ? FB_lat->value_at(r, FB) : true) &&
145  (pot.use_vdf() ? FB_lat->value_at(r, FB) : true) &&
146  (pot.use_symmetry() ? FI3_lat->value_at(r, FI3) : true);
147  if (!pot.use_skyrme() && !pot.use_vdf()) {
148  FB = std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
149  }
150  if (!pot.use_symmetry()) {
151  FI3 = std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
152  }
153  if (!use_lattice) {
154  const auto tmp = pot.all_forces(r, plist);
155  FB = std::make_pair(std::get<0>(tmp), std::get<1>(tmp));
156  FI3 = std::make_pair(std::get<2>(tmp), std::get<3>(tmp));
157  }
158  ThreeVector Force =
159  scale.first *
160  (FB.first + data.momentum().velocity().cross_product(FB.second)) +
161  scale.second * data.type().isospin3_rel() *
162  (FI3.first +
163  data.momentum().velocity().cross_product(FI3.second));
164  // Potentially add Lorentz force
165  if (pot.use_coulomb() && EM_lat->value_at(r, EM_fields)) {
166  // factor hbar*c to convert fields from 1/fm^2 to GeV/fm
167  Force += hbarc * data.type().charge() * elementary_charge *
168  (EM_fields.first +
169  data.momentum().velocity().cross_product(EM_fields.second));
170  }
171  logg[LPropagation].debug("Update momenta: F [GeV/fm] = ", Force);
172  data.set_4momentum(data.effective_mass(),
173  data.momentum().threevec() + Force * dt);
174 
175  // calculate the time scale of the change in momentum
176  const double Force_abs = Force.abs();
177  if (Force_abs < really_small) {
178  continue;
179  }
180  const double time_scale = data.momentum().x0() / Force_abs;
181  if (time_scale < min_time_scale) {
182  min_time_scale = time_scale;
183  }
184  }
185  }
186  // warn if the time step is too big
187  constexpr double safety_factor = 0.1;
188  if (dt > safety_factor * min_time_scale) {
189  logg[LPropagation].warn()
190  << "The time step size is too large for an accurate propagation "
191  << "with potentials. Maximum safe value: "
192  << safety_factor * min_time_scale << " fm/c.\n"
193  << "In case of Triangular or Discrete smearing you may additionally "
194  << "need to increase the number of ensembles or testparticles.";
195  }
196 }
const double elementary_charge
Elementary electric charge in natural units, approximately 0.3.
Definition: constants.h:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_particles_and_decaymodes()

std::pair< std::string, std::string > smash::load_particles_and_decaymodes ( const char *  particles_file,
const char *  decaymodes_file 
)

Loads particles and decaymodes from provided files particles_file and decaymodes_file.

In case if particles_file or decaymodes_file are nullptr, the defaults are taken

Parameters
[in]particles_filea file containing particles list. See Particles.
[in]decaymodes_filea file containing decay modes of the resonances. See Decay Modes.
Returns
a pair of strings – the contents of particle and decaymode files.

Definition at line 31 of file setup_particles_decaymodes.cc.

32  {
33  std::string particle_string, decay_string;
34  if (particles_file) {
35  if (!boost::filesystem::exists(particles_file)) {
36  std::stringstream err;
37  err << "The particles file was expected at '" << particles_file
38  << "', but the file does not exist.";
39  throw std::runtime_error(err.str());
40  }
41  particle_string = read_all(boost::filesystem::ifstream{particles_file});
42  if (has_crlf_line_ending(particle_string)) {
43  std::stringstream err;
44  err << "The particles file has CR LF line endings. Please use LF"
45  " line endings.";
46  throw std::runtime_error(err.str());
47  }
48  } else {
49  particle_string = particles_txt::data;
50  }
51 
52  if (decaymodes_file) {
53  if (!boost::filesystem::exists(decaymodes_file)) {
54  std::stringstream err;
55  err << "The decay modes file was expected at '" << decaymodes_file
56  << "', but the file does not exist.";
57  throw std::runtime_error(err.str());
58  }
59  decay_string = read_all(boost::filesystem::ifstream{decaymodes_file});
60  if (has_crlf_line_ending(decay_string)) {
61  std::stringstream err;
62  err << "The decay mode file has CR LF line endings. Please use LF"
63  " line endings.";
64  throw std::runtime_error(err.str());
65  }
66  } else {
67  decay_string = decaymodes_txt::data;
68  }
69  return std::make_pair(particle_string, decay_string);
70 }
bool has_crlf_line_ending(const std::string in)
Check if a line in the string ends with \r\n.
std::string read_all(std::istream &&input)
Utility function to read a complete input stream (e.g.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_default_particles_and_decaymodes()

void smash::load_default_particles_and_decaymodes ( )

Loads default smash particle list and decaymodes.

Definition at line 72 of file setup_particles_decaymodes.cc.

72  {
73  const auto pd = load_particles_and_decaymodes(nullptr, nullptr);
74  ParticleType::create_type_list(pd.first);
75  DecayModes::load_decaymodes(pd.second);
76  ParticleType::check_consistency();
77 }
std::pair< std::string, std::string > load_particles_and_decaymodes(const char *particles_file, const char *decaymodes_file)
Loads particles and decaymodes from provided files particles_file and decaymodes_file.
Here is the call graph for this function:

◆ trim()

std::string smash::trim ( const std::string &  s)

Strip leading and trailing whitespaces.

Parameters
sString to be trimmed.
Returns
Trimmed string.

Definition at line 75 of file stringfunctions.cc.

75  {
76  const auto begin = s.find_first_not_of(" \t\n\r");
77  if (begin == std::string::npos) {
78  return {};
79  }
80  const auto end = s.find_last_not_of(" \t\n\r");
81  return s.substr(begin, end - begin + 1);
82 }
Here is the caller graph for this function:

◆ remove_substr()

void smash::remove_substr ( std::string &  s,
const std::string &  p 
)

Remove all instances of a substring p in a string s.

Parameters
[in,out]sString to be searched and modified.
[in]pSubstring to be removed.

Definition at line 84 of file stringfunctions.cc.

84  {
85  using str = std::string;
86  str::size_type n = p.length();
87  for (str::size_type i = s.find(p); i != str::npos; i = s.find(p)) {
88  s.erase(i, n);
89  }
90 }
constexpr int n
Neutron.
Here is the caller graph for this function:

◆ isoclean()

void smash::isoclean ( std::string &  s)

Remove ⁺, ⁻, ⁰ from string.

Parameters
[in,out]sString to be cleaned.

Definition at line 92 of file stringfunctions.cc.

92  {
93  remove_substr(s, "⁺");
94  remove_substr(s, "⁻");
95  remove_substr(s, "⁰");
96 }
void remove_substr(std::string &s, const std::string &p)
Remove all instances of a substring p in a string s.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ split() [1/2]

std::vector< std::string > smash::split ( const std::string &  s,
char  delim 
)

Split string by delimiter.

Parameters
[in]sString to be split.
[in]delimSplitting delimiter.
Returns
Split string.

Definition at line 120 of file stringfunctions.cc.

120  {
121  std::vector<std::string> elems;
122  split(s, delim, std::back_inserter(elems));
123  return elems;
124 }
void split(const std::string &s, char delim, Out result)
Split string by delimiter.
Here is the caller graph for this function:

◆ spec_func_integrand_1res()

double smash::spec_func_integrand_1res ( double  resonance_mass,
double  sqrts,
double  stable_mass,
const ParticleType type 
)
inline

Spectral function integrand for GSL integration, with one resonance in the final state (the second particle is stable).

The integrand is \( A(m) p_{cm}^f \), where \( m \) is the resonance mass, \( A(m) \) is the spectral function and \( p_{cm}^f \) is the center-of-mass momentum of the final state.

Parameters
[in]resonance_massActual mass of the resonance [GeV].
[in]sqrtsCenter-of-mass Energy, i.e. sqrt of Mandelstam s [GeV].
[in]stable_massMass of the stable particle in the final state [GeV].
[in]typeType of the resonance.
Returns
Value of the integrand.

Definition at line 136 of file tabulation.h.

138  {
139  if (sqrts <= stable_mass + resonance_mass) {
140  return 0.;
141  }
142 
143  /* Integrand is the spectral function weighted by the CM momentum of the
144  * final state. */
145  return type.spectral_function(resonance_mass) *
146  pCM(sqrts, stable_mass, resonance_mass);
147 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spec_func_integrand_2res()

double smash::spec_func_integrand_2res ( double  sqrts,
double  res_mass_1,
double  res_mass_2,
const ParticleType t1,
const ParticleType t2 
)
inline

Spectral function integrand for GSL integration, with two resonances in the final state.

The integrand is \( A_1(m_1) A_2(m_2) p_{cm}^f \), where \( m_1 \) and \( m_2 \) are the resonance masses, \( A_1 \) and \( A_2 \) are the spectral functions and \( p_{cm}^f \) is the center-of-mass momentum of the final state.

Parameters
[in]sqrtsCenter-of-mass energy, i.e. sqrt of Mandelstam s [GeV].
[in]res_mass_1Actual mass of the first resonance [GeV].
[in]res_mass_2Actual mass of the second resonance [GeV].
[in]t1Type of the first resonance.
[in]t2Type of the second resonance.
Returns
Value of the integrand.

Definition at line 165 of file tabulation.h.

168  {
169  if (sqrts <= res_mass_1 + res_mass_2) {
170  return 0.;
171  }
172 
173  /* Integrand is the product of the spectral function weighted by the
174  * CM momentum of the final state. */
175  return t1.spectral_function(res_mass_1) * t2.spectral_function(res_mass_2) *
176  pCM(sqrts, res_mass_1, res_mass_2);
177 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spectral_integral_semistable()

Tabulation smash::spectral_integral_semistable ( Integrator integrate,
const ParticleType resonance,
const ParticleType stable,
double  range 
)
inline

Create a table for the spectral integral of a resonance and a stable particle.

Parameters
[in,out]integrateNumerical integrator.
[in]resonanceType of the resonance particle.
[in]stableType of the stable particle.
[in]rangeDistance between tabulation points [GeV].
Returns
Tabulation of the given integral.

Definition at line 189 of file tabulation.h.

192  {
193  const double m_min = resonance.min_mass_kinematic();
194  const double m_stable = stable.mass();
195  return Tabulation(m_min + m_stable, range, 100, [&](double srts) {
196  return integrate(m_min, srts - m_stable, [&](double m) {
197  return spec_func_integrand_1res(m, srts, m_stable, resonance);
198  });
199  });
200 }
static Integrator integrate
Definition: decaytype.cc:144
double spec_func_integrand_1res(double resonance_mass, double sqrts, double stable_mass, const ParticleType &type)
Spectral function integrand for GSL integration, with one resonance in the final state (the second pa...
Definition: tabulation.h:136
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spectral_integral_unstable()

Tabulation smash::spectral_integral_unstable ( Integrator2d integrate2d,
const ParticleType res1,
const ParticleType res2,
double  range 
)
inline

Create a table for the spectral integral of two resonances.

Parameters
[in,out]integrate2dNumerical integrator.
[in]res1Type of the first resonance particle.
[in]res2Type of the second resonance particle.
[in]rangeDistance between tabulation points [GeV].
Returns
Tabulation of the given integral.

Definition at line 211 of file tabulation.h.

214  {
215  const double m1_min = res1.min_mass_kinematic();
216  const double m2_min = res2.min_mass_kinematic();
217  return Tabulation(m1_min + m2_min, range, 125, [&](double srts) {
218  const double m1_max = srts - m2_min;
219  const double m2_max = srts - m1_min;
220  return integrate2d(
221  m1_min, m1_max, m2_min, m2_max, [&](double m1, double m2) {
222  return spec_func_integrand_2res(srts, m1, m2, res1, res2);
223  });
224  });
225 }
static Integrator2d integrate2d(1E7)
double spec_func_integrand_2res(double sqrts, double res_mass_1, double res_mass_2, const ParticleType &t1, const ParticleType &t2)
Spectral function integrand for GSL integration, with two resonances in the final state.
Definition: tabulation.h:165
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator+() [3/3]

ThreeVector smash::operator+ ( ThreeVector  a,
const ThreeVector b 
)
inline
Returns
sum of two three-vectors \( \vec{a} + \vec{b} \).

Definition at line 190 of file threevector.h.

190  {
191  a += b;
192  return a;
193 }

◆ operator-() [4/4]

ThreeVector smash::operator- ( ThreeVector  a,
const ThreeVector b 
)
inline
Returns
difference between two three-vectors \( \vec{a} - \vec{b} \).

Definition at line 203 of file threevector.h.

203  {
204  a -= b;
205  return a;
206 }

◆ operator*() [6/8]

ThreeVector smash::operator* ( ThreeVector  a,
const double &  b 
)
inline

multiply a three-vector by constant factor \( b \vec{a} \).

Definition at line 216 of file threevector.h.

216  {
217  a *= b;
218  return a;
219 }

◆ operator*() [7/8]

ThreeVector smash::operator* ( const double &  a,
ThreeVector  b 
)
inline

multiply a three-vector by constant factor \( a \vec{b} \).

Definition at line 222 of file threevector.h.

222  {
223  b *= a;
224  return b;
225 }

◆ operator*() [8/8]

double smash::operator* ( ThreeVector  a,
const ThreeVector b 
)
inline
Returns
inner product of two three-vectors \( \vec{a} \cdot \vec{b} \)

Definition at line 231 of file threevector.h.

231  {
232  return a.x1() * b.x1() + a.x2() * b.x2() + a.x3() * b.x3();
233 }
Here is the call graph for this function:

◆ operator/() [3/3]

ThreeVector smash::operator/ ( ThreeVector  a,
const double &  b 
)
inline

divide a three-vector by constant factor \( \vec{a} / b \).

Definition at line 254 of file threevector.h.

254  {
255  a /= b;
256  return a;
257 }

◆ operator<<() [4/11]

std::ostream& smash::operator<< ( std::ostream &  out,
const BoxModus m 
)
Parameters
[in]outThe ostream into which to output
[in]mThe BoxModus object to write into out

Definition at line 31 of file boxmodus.cc.

31  {
32  out << "-- Box Modus:\nSize of the box: (" << m.length_ << " fm)³\n";
33  if (m.use_thermal_) {
34  out << "Thermal multiplicities "
35  << "(T = " << m.temperature_ << " GeV, muB = " << m.mub_
36  << " GeV, muS = " << m.mus_ << " GeV, muQ = " << m.muq_ << " GeV)\n";
37  } else {
38  for (const auto &p : m.init_multipl_) {
39  ParticleTypePtr ptype = &ParticleType::find(p.first);
40  out << ptype->name() << " initial multiplicity " << p.second << '\n';
41  }
42  }
43  switch (m.initial_condition_) {
45  out << "All initial momenta = 3T = " << 3 * m.temperature_ << " GeV\n";
46  break;
48  out << "Boltzmann momentum distribution with T = " << m.temperature_
49  << " GeV.\n";
50  break;
52  out << "Fermi/Bose momentum distribution with T = " << m.temperature_
53  << " GeV.\n";
54  break;
55  }
56  if (m.insert_jet_) {
57  ParticleTypePtr ptype = &ParticleType::find(m.jet_pdg_);
58  out << "Adding a " << ptype->name() << " as a jet in the middle "
59  << "of the box with " << m.jet_mom_ << " GeV initial momentum.\n";
60  }
61  return out;
62 }

◆ isospin_clebsch_gordan_2to1()

static double smash::isospin_clebsch_gordan_2to1 ( const ParticleType p_a,
const ParticleType p_b,
const int  I_tot,
const int  I_z 
)
static

Calculate isospin Clebsch-Gordan coefficient for two particles p_a and p_b coupling to a total isospin.

See also
clebsch_gordan for details (I_tot, I_z).
Parameters
[in]p_aInformation of particle type for first particle
[in]p_bInformation of particle type for second particle
[out]I_totTotal isospin of the reaction
[out]I_zTotal isospin 3 component of the reaction

Definition at line 44 of file clebschgordan.cc.

46  {
47  return clebsch_gordan(p_a.isospin(), p_b.isospin(), I_tot, p_a.isospin3(),
48  p_b.isospin3(), I_z);
49 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<<() [5/11]

std::ostream& smash::operator<< ( std::ostream &  out,
const ColliderModus m 
)
Parameters
[in]outThe ostream into which to output
[in]mThe ColliderModus object to write into out

Definition at line 562 of file collidermodus.cc.

562  {
563  return out << "-- Collider Modus:\n"
564  << "sqrt(S) (nucleus-nucleus) = "
565  << format(std::sqrt(m.total_s_), "GeV\n")
566  << "sqrt(S) (nucleon-nucleon) = " << format(m.sqrt_s_NN_, "GeV\n")
567  << "Projectile:\n"
568  << *m.projectile_ << "\nTarget:\n"
569  << *m.target_;
570 }
FormattingHelper< T > format(const T &value, const char *unit, int width=-1, int precision=-1)
Acts as a stream modifier for std::ostream to output an object with an optional suffix string and wit...
Definition: logging.h:307

◆ detailed_balance_factor_stable()

static double smash::detailed_balance_factor_stable ( double  s,
const ParticleType a,
const ParticleType b,
const ParticleType c,
const ParticleType d 
)
static

Helper function: Calculate the detailed balance factor R such that.

\[ R = \sigma(AB \to CD) / \sigma(CD \to AB) \]

where \( A, B, C, D \) are stable.

Definition at line 28 of file crosssections.cc.

31  {
32  double spin_factor = (c.spin() + 1) * (d.spin() + 1);
33  spin_factor /= (a.spin() + 1) * (b.spin() + 1);
34  double symmetry_factor = (1 + (a == b));
35  symmetry_factor /= (1 + (c == d));
36  const double momentum_factor = pCM_sqr_from_s(s, c.mass(), d.mass()) /
37  pCM_sqr_from_s(s, a.mass(), b.mass());
38  return spin_factor * symmetry_factor * momentum_factor;
39 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detailed_balance_factor_RK()

static double smash::detailed_balance_factor_RK ( double  sqrts,
double  pcm,
const ParticleType a,
const ParticleType b,
const ParticleType c,
const ParticleType d 
)
static

Helper function: Calculate the detailed balance factor R such that.

\[ R = \sigma(AB \to CD) / \sigma(CD \to AB) \]

where \(A\) is unstable, \(B\) is a kaon and \(C, D\) are stable.

Definition at line 47 of file crosssections.cc.

51  {
52  assert(!a.is_stable());
53  assert(b.pdgcode().is_kaon());
54  double spin_factor = (c.spin() + 1) * (d.spin() + 1);
55  spin_factor /= (a.spin() + 1) * (b.spin() + 1);
56  double symmetry_factor = (1 + (a == b));
57  symmetry_factor /= (1 + (c == d));
58  const double momentum_factor =
59  pCM_sqr(sqrts, c.mass(), d.mass()) /
60  (pcm * a.iso_multiplet()->get_integral_RK(sqrts));
61  return spin_factor * symmetry_factor * momentum_factor;
62 }
T pCM_sqr(const T sqrts, const T mass_a, const T mass_b) noexcept
Definition: kinematics.h:91
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detailed_balance_factor_RR()

static double smash::detailed_balance_factor_RR ( double  sqrts,
double  pcm,
const ParticleType a,
const ParticleType b,
const ParticleType c,
const ParticleType d 
)
static

Helper function: Calculate the detailed balance factor R such that.

\[ R = \sigma(AB \to CD) / \sigma(CD \to AB) \]

where \(A\) and \(B\) are unstable, and \(C\) and \(D\) are stable.

Definition at line 70 of file crosssections.cc.

74  {
75  assert(!a.is_stable());
76  assert(!b.is_stable());
77  double spin_factor = (c.spin() + 1) * (d.spin() + 1);
78  spin_factor /= (a.spin() + 1) * (b.spin() + 1);
79  double symmetry_factor = (1 + (a == b));
80  symmetry_factor /= (1 + (c == d));
81  const double momentum_factor =
82  pCM_sqr(sqrts, c.mass(), d.mass()) /
83  (pcm * a.iso_multiplet()->get_integral_RR(b.iso_multiplet(), sqrts));
84  return spin_factor * symmetry_factor * momentum_factor;
85 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ append_list()

static void smash::append_list ( CollisionBranchList &  main_list,
CollisionBranchList  in_list,
double  weight = 1. 
)
static

Helper function: Append a list of processes to another (main) list of processes.

Definition at line 91 of file crosssections.cc.

92  {
93  main_list.reserve(main_list.size() + in_list.size());
94  for (auto& proc : in_list) {
95  proc->set_weight(proc->weight() * weight);
96  main_list.emplace_back(std::move(proc));
97  }
98 }
Here is the caller graph for this function:

◆ min_angular_momentum() [1/2]

static int smash::min_angular_momentum ( int  s0,
int  s1,
int  s2 
)
static

Definition at line 139 of file decaymodes.cc.

139  {
140  int min_L = std::min(std::abs(s0 - s1 - s2), std::abs(s0 - s1 + s2));
141  min_L = std::min(min_L, std::abs(s0 + s1 - s2));
142  if (min_L % 2 != 0) {
143  throw std::runtime_error(
144  "min_angular_momentum: sum of spins should be integer");
145  }
146  return min_L / 2.;
147 }
Here is the caller graph for this function:

◆ min_angular_momentum() [2/2]

static int smash::min_angular_momentum ( int  s0,
int  s1,
int  s2,
int  s3 
)
static

Definition at line 149 of file decaymodes.cc.

149  {
150  int min_L =
151  std::min(std::abs(s0 - s1 + s2 + s3), std::abs(s0 + s1 - s2 + s3));
152  min_L = std::min(min_L, std::abs(s0 + s1 + s2 - s3));
153  min_L = std::min(min_L, std::abs(s0 - s1 - s2 + s3));
154  min_L = std::min(min_L, std::abs(s0 - s1 + s2 - s3));
155  min_L = std::min(min_L, std::abs(s0 + s1 - s2 - s3));
156  min_L = std::min(min_L, std::abs(s0 - s1 - s2 - s3));
157  if (min_L % 2 != 0) {
158  throw std::runtime_error(
159  "min_angular_momentum: sum of spins should be integer");
160  }
161  return min_L / 2.;
162 }

◆ integrand_rho_Manley_1res()

static double smash::integrand_rho_Manley_1res ( double  sqrts,
double  mass,
double  stable_mass,
ParticleTypePtr  type,
int  L 
)
static

Definition at line 22 of file decaytype.cc.

24  {
25  if (sqrts <= mass + stable_mass) {
26  return 0.;
27  }
28 
29  /* center-of-mass momentum of final state particles */
30  const double p_f = pCM(sqrts, stable_mass, mass);
31 
32  return p_f / sqrts * blatt_weisskopf_sqr(p_f, L) *
33  type->spectral_function(mass);
34 }
double blatt_weisskopf_sqr(const double p_ab, const int L)
Definition: formfactors.h:33
Here is the call graph for this function:
Here is the caller graph for this function:

◆ integrand_rho_Manley_2res()

static double smash::integrand_rho_Manley_2res ( double  sqrts,
double  m1,
double  m2,
ParticleTypePtr  t1,
ParticleTypePtr  t2,
int  L 
)
static

Definition at line 36 of file decaytype.cc.

38  {
39  if (sqrts <= m1 + m2) {
40  return 0.;
41  }
42 
43  /* center-of-mass momentum of final state particles */
44  const double p_f = pCM(sqrts, m1, m2);
45 
46  return p_f / sqrts * blatt_weisskopf_sqr(p_f, L) * t1->spectral_function(m1) *
47  t2->spectral_function(m2);
48 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ arrange_particles()

static ParticleTypePtrList& smash::arrange_particles ( ParticleTypePtrList &  part_types)
static

Rearrange the particle list such that the first particle is the stable one.

Parameters
[in,out]part_typesParticle list to be rearranged.
Returns
Reference to rearranged particle list.

Definition at line 110 of file decaytype.cc.

110  {
111  if (part_types[1]->is_stable()) {
112  std::swap(part_types[0], part_types[1]);
113  }
114  /* verify that this is really a "semi-stable" decay,
115  * i.e. the first particle is stable and the second unstable */
116  if (!part_types[0]->is_stable() || part_types[1]->is_stable()) {
117  throw std::runtime_error("Error in TwoBodyDecaySemistable constructor: " +
118  part_types[0]->pdgcode().string() + " " +
119  part_types[1]->pdgcode().string());
120  }
121  return part_types;
122 }

◆ sort_particles()

static ParticleTypePtrList smash::sort_particles ( ParticleTypePtrList  part_types)
static

sort the particle list

Definition at line 270 of file decaytype.cc.

270  {
271  std::sort(part_types.begin(), part_types.end());
272  return part_types;
273 }

◆ current_eckart_impl()

template<typename T >
std::tuple<double, FourVector, ThreeVector, ThreeVector, FourVector, FourVector, FourVector, FourVector> smash::current_eckart_impl ( const ThreeVector r,
const T &  plist,
const DensityParameters par,
DensityType  dens_type,
bool  compute_gradient,
bool  smearing 
)

Calculates Eckart rest frame density and 4-current of a given density type and optionally the gradient of the density in an arbitary frame (grad j0), the curl of the 3-current, and the time, x, y, and z derivatives of the 4-current.

\[j^{\mu} = (\sqrt{2\pi} \sigma )^{-3} \sum_{i=1}^N C_i u^{\mu}_i exp \left(- \frac{(\vec r -\vec r_i + \frac{\gamma_i^2}{1 + \gamma_i} \vec \beta_i (\vec \beta_i, \vec r - \vec r_i))^2}{2\sigma^2} \right)\]

\[ \rho^{Eckart} = \sqrt{j^{\mu} j_{\mu}} \]

Here \( C_i \) is a corresponding value of "charge". If baryon current option is selected then \( C_i \) is 1 for baryons, -1 for antibaryons and 0 otherwise. For proton/neutron current \( C_i = 1\) for proton/neutron and 0 otherwise.

To avoid the problems with Eckart frame definition, densities for positive and negative charges, \(\rho_+ \) and \( \rho_-\), are computed separately and final density is \(\rho_+ - \rho_-\).

Parameters
[in]rArbitrary space point where 4-current is calculated [fm]; ignored if smearing is false
[in]plistList of all particles to be used in \(j^{\mu}\) calculation. If smearing is false or if the distance between particle and calculation point r, \( |r-r_i| > r_{cut} \) then particle input to density will be ignored.

Next four values are taken from ExperimentalParameters structure:

Parameters
[in]parSet of parameters packed in one structure. From them the cutting radius r_cut \( r_{cut} / \sigma \), number of test-particles ntest and the gaussian width gs_sigma are needed.
[in]dens_typetype of four-currect to be calculated: baryon, proton or neutron options are currently available
[in]compute_gradienttrue - compute gradient, false - no
[in]smearingwhether to use gaussian smearing or not. If false, this parameter will use ALL particles equally to calculate the current, and that as such it will not be normalized wrt volume. This should be true for any internal calculation of any quantity and only makes sense to turn off for output purposes in a box.
Returns
(rest frame density in the local Eckart frame [fm \(^{-3}\)], \( j^\mu \) as a 4-vector, \( \vec{\nabla}\cdot j^0 \) or a 0 3-vector, \( \vec{\nabla} \times \vec{j} \) or a 0 3-vector, \( \partial_t j^\mu \) or a 0 4-vector, \( \partial_x j^\mu \) or a 0 4-vector, \( \partial_y j^\mu \) or a 0 4-vector, \( \partial_z j^\mu \) or a 0 4-vector).

Definition at line 67 of file density.cc.

69  {
70  /* The current density of the positively and negatively charged particles.
71  * Division into positive and negative charges is necessary to avoid
72  * problems with the Eckart frame definition. Example of problem:
73  * get Eckart frame for two identical oppositely flying bunches of
74  * electrons and positrons. For this case jmu = (0, 0, 0, non-zero),
75  * so jmu.abs does not exist and Eckart frame is not defined.
76  * If one takes rho = jmu_pos.abs - jmu_neg.abs, it is still Lorentz-
77  * invariant and gives the right limit in non-relativistic case, but
78  * it gives no such problem. */
79  FourVector jmu_pos, jmu_neg;
80  /* The array of the derivatives of the current density.
81  * The zeroth component is the time derivative,
82  * while the next 3 ones are spacial derivatives. */
83  std::array<FourVector, 4> djmu_dxnu;
84 
85  for (const auto &p : plist) {
86  if (par.only_participants()) {
87  // if this conditions holds, the hadron is a spectator
88  if (p.get_history().collisions_per_particle == 0) {
89  continue;
90  }
91  }
92  const double dens_factor = density_factor(p.type(), dens_type);
93  if (std::fabs(dens_factor) < really_small) {
94  continue;
95  }
96  const FourVector mom = p.momentum();
97  const double m = mom.abs();
98  if (m < really_small) {
99  continue;
100  }
101  const double m_inv = 1.0 / m;
102  const auto sf_and_grad = unnormalized_smearing_factor(
103  p.position().threevec() - r, mom, m_inv, par, compute_gradient);
104  const FourVector tmp = mom * (dens_factor / mom.x0());
105  if (smearing) {
106  if (dens_factor > 0.) {
107  jmu_pos += tmp * sf_and_grad.first;
108  } else {
109  jmu_neg += tmp * sf_and_grad.first;
110  }
111  } else {
112  if (dens_factor > 0.) {
113  jmu_pos += tmp;
114  } else {
115  jmu_neg += tmp;
116  }
117  }
118  if (compute_gradient) {
119  for (int k = 1; k <= 3; k++) {
120  djmu_dxnu[k] += tmp * sf_and_grad.second[k - 1];
121  djmu_dxnu[0] -= tmp * sf_and_grad.second[k - 1] *
122  tmp.threevec()[k - 1] / dens_factor;
123  }
124  }
125  }
126 
127  // Eckart density (rest frame density)
128  const double rho_eck = (jmu_pos.abs() - jmu_neg.abs()) * par.norm_factor_sf();
129 
130  // $\partial_t j^{\mu}$
131  const FourVector djmu_dt = compute_gradient
132  ? djmu_dxnu[0] * par.norm_factor_sf()
133  : FourVector(0.0, 0.0, 0.0, 0.0);
134  // $\partial_x j^{\mu}$
135  const FourVector djmu_dx = compute_gradient
136  ? djmu_dxnu[1] * par.norm_factor_sf()
137  : FourVector(0.0, 0.0, 0.0, 0.0);
138  // $\partial_y j^{\mu}$
139  const FourVector djmu_dy = compute_gradient
140  ? djmu_dxnu[2] * par.norm_factor_sf()
141  : FourVector(0.0, 0.0, 0.0, 0.0);
142  // $\partial_z j^{\mu}$
143  const FourVector djmu_dz = compute_gradient
144  ? djmu_dxnu[3] * par.norm_factor_sf()
145  : FourVector(0.0, 0.0, 0.0, 0.0);
146 
147  // Gradient of j0
148  ThreeVector grad_j0 = ThreeVector(0.0, 0.0, 0.0);
149  // Curl of the 3-current density
150  ThreeVector curl_vecj = ThreeVector(0.0, 0.0, 0.0);
151  if (compute_gradient) {
152  curl_vecj.set_x1(djmu_dxnu[2].x3() - djmu_dxnu[3].x2());
153  curl_vecj.set_x2(djmu_dxnu[3].x1() - djmu_dxnu[1].x3());
154  curl_vecj.set_x3(djmu_dxnu[1].x2() - djmu_dxnu[2].x1());
155  curl_vecj *= par.norm_factor_sf();
156  for (int i = 1; i < 4; i++) {
157  grad_j0[i - 1] += djmu_dxnu[i].x0() * par.norm_factor_sf();
158  }
159  }
160  return std::make_tuple(rho_eck, (jmu_pos + jmu_neg) * par.norm_factor_sf(),
161  grad_j0, curl_vecj, djmu_dt, djmu_dx, djmu_dy,
162  djmu_dz);
163 }
std::pair< double, ThreeVector > unnormalized_smearing_factor(const ThreeVector &r, const FourVector &p, const double m_inv, const DensityParameters &dens_par, const bool compute_gradient=false)
Implements gaussian smearing for any quantity.
Definition: density.cc:37
Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_find_private()

static IsoParticleType* smash::try_find_private ( const std::string &  name)
static

Helper function for IsoParticleType::try_find and friends.

Definition at line 45 of file isoparticletype.cc.

45  {
46  auto found =
47  std::lower_bound(iso_type_list.begin(), iso_type_list.end(), name,
48  [](const IsoParticleType &l, const std::string &r) {
49  return l.name() < r;
50  });
51  if (found == iso_type_list.end() || found->name() != name) {
52  return {}; // The default constructor creates an invalid pointer.
53  }
54  return &*found;
55 }
static IsoParticleTypeList iso_type_list
Here is the caller graph for this function:

◆ multiplet_name()

static std::string smash::multiplet_name ( std::string  name)
static

Construct the name-string for an isospin multiplet from the given name-string for the particle.

Parameters
[in]namename-string of the particle
Returns
the name-string for an isospin multiplet

Definition at line 90 of file isoparticletype.cc.

90  {
91  if (name.find("⁺⁺") != std::string::npos) {
92  return name.substr(0, name.length() - sizeof("⁺⁺") + 1);
93  } else if (name.find("⁺") != std::string::npos) {
94  return name.substr(0, name.length() - sizeof("⁺") + 1);
95  } else if (name.find("⁻⁻") != std::string::npos) {
96  return name.substr(0, name.length() - sizeof("⁻⁻") + 1);
97  } else if (name.find("⁻") != std::string::npos) {
98  return name.substr(0, name.length() - sizeof("⁻") + 1);
99  } else if (name.find("⁰") != std::string::npos) {
100  return name.substr(0, name.length() - sizeof("⁰") + 1);
101  } else {
102  return name;
103  }
104 }
Here is the caller graph for this function:

◆ generate_tabulation_path()

static bf::path smash::generate_tabulation_path ( const bf::path &  dir,
const std::string &  prefix,
const std::string &  res_name 
)
static

Definition at line 220 of file isoparticletype.cc.

222  {
223  return dir / (prefix + res_name + ".bin");
224 }
Here is the caller graph for this function:

◆ cache_integral()

void smash::cache_integral ( std::unordered_map< std::string, Tabulation > &  tabulations,
const bf::path &  dir,
sha256::Hash  hash,
const IsoParticleType part,
const IsoParticleType res,
const IsoParticleType antires,
bool  unstable 
)
inline

Definition at line 226 of file isoparticletype.cc.

229  {
230  constexpr double spacing = 2.0;
231  constexpr double spacing2d = 3.0;
232  const auto path = generate_tabulation_path(dir, part.name_filtered_prime(),
233  res.name_filtered_prime());
234  Tabulation integral;
235  if (!dir.empty() && bf::exists(path)) {
236  std::ifstream file(path.string());
237  integral = Tabulation::from_file(file, hash);
238  if (!integral.is_empty()) {
239  // Only print message if the found tabulation was valid.
240  std::cout << "Tabulation found at " << path.filename() << '\r'
241  << std::flush;
242  }
243  }
244  if (integral.is_empty()) {
245  if (!dir.empty()) {
246  std::cout << "Caching tabulation to " << path.filename() << '\r'
247  << std::flush;
248  }
249  if (!unstable) {
250  integral = spectral_integral_semistable(integrate, *res.get_states()[0],
251  *part.get_states()[0], spacing);
252  } else {
253  integral = spectral_integral_unstable(integrate2d, *res.get_states()[0],
254  *part.get_states()[0], spacing2d);
255  }
256  if (!dir.empty()) {
257  std::ofstream file(path.string());
258  integral.write(file, hash);
259  }
260  }
261  tabulations.emplace(std::make_pair(res.name(), integral));
262  if (antires != nullptr) {
263  tabulations.emplace(std::make_pair(antires->name(), integral));
264  }
265 }
static Integrator2d integrate2d
Tabulation spectral_integral_semistable(Integrator &integrate, const ParticleType &resonance, const ParticleType &stable, double range)
Create a table for the spectral integral of a resonance and a stable particle.
Definition: tabulation.h:189
static bf::path generate_tabulation_path(const bf::path &dir, const std::string &prefix, const std::string &res_name)
Tabulation spectral_integral_unstable(Integrator2d &integrate2d, const ParticleType &res1, const ParticleType &res2, double range)
Create a table for the spectral integral of two resonances.
Definition: tabulation.h:211
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<<() [6/11]

std::ostream& smash::operator<< ( std::ostream &  out,
const ListModus m 
)
Parameters
[in]outThe ostream into which to output
[in]mThe ListModus object to write into out

Definition at line 156 of file listmodus.cc.

156  {
157  out << "-- List Modus\nInput directory for external particle lists:\n"
158  << m.particle_list_file_directory_ << "\n";
159  return out;
160 }

◆ find_longest_logger_name() [1/2]

template<int index, int stop = 0>
constexpr std::enable_if<(index == stop), int>::type smash::find_longest_logger_name ( )
constexpr

Recursively find the longest logger name at compile time.

Beginning of the recursion.

Template Parameters
indexRecursion index.
stopStopping index.
Returns
Current maximal logger name length.

Definition at line 53 of file logging.cc.

53  {
54  using LogAreaTag = typename std::remove_reference<decltype(
55  std::get<index>(std::declval<LogArea::AreaTuple &>()))>::type;
56  return LogAreaTag::textual_length();
57 }

◆ find_longest_logger_name() [2/2]

template<int index, int stop = 0, int mid = (index + stop) / 2>
constexpr std::enable_if<(index > stop), int>::type smash::find_longest_logger_name ( )
constexpr

Recursively find the longest logger name at compile time.

All cases except for the beginning of the recursion.

Template Parameters
indexRecursion index.
stopStopping index.
midMiddle index.
Returns
Current maximal logger name length.

Definition at line 72 of file logging.cc.

72  {
73  return find_longest_logger_name<index, mid + 1>() >
74  find_longest_logger_name<mid, stop>()
75  ? find_longest_logger_name<index, mid + 1>()
76  : find_longest_logger_name<mid, stop>();
77 }
constexpr std::enable_if<(index > stop), int >::type find_longest_logger_name()
Definition: logging.cc:72

◆ create_all_loggers_impl() [1/2]

template<std::size_t index, int >
std::enable_if<(index == 0)>::type smash::create_all_loggers_impl ( Configuration )
inline

Recurse over the log areas in the LogArea::AreaTuple type. Do nothing here to end the recursion (see also below).

Definition at line 85 of file logging.cc.

86  {}
Here is the caller graph for this function:

◆ create_all_loggers_impl() [2/2]

template<std::size_t index, int longest_name = find_longest_logger_name<index - 1>()>
std::enable_if<(index != 0)>::type smash::create_all_loggers_impl ( Configuration config)
inline

Recurse over the log areas in the LogArea::AreaTuple type. (The recursion is ended via the overload above.)

For every entry in the list the corresponding Logger object in logg is set up with area name and verbosity.

Template Parameters
indexRecursion index.
longest_nameLength of longest log area name.
Parameters
[in,out]configConfiguration object.

Definition at line 102 of file logging.cc.

103  {
104  using LogAreaTag = typename std::remove_reference<decltype(
105  std::get<index - 1>(std::declval<LogArea::AreaTuple &>()))>::type;
106  static_assert(LogAreaTag::id == index - 1,
107  "The order of types in LogArea::AreaTuple does not match the "
108  "id values in the LogArea types. Please fix! (see top of "
109  "'include/logging.h')");
110  auto &logger = logg[LogAreaTag::id];
111  const auto tmp = utf8::fill_both(LogAreaTag::textual(), longest_name);
112  logger.setAreaName(tmp);
113  logger.setVerbosity(
114  config.take({LogAreaTag::textual()}, global_default_loglevel));
115  create_all_loggers_impl<index - 1, longest_name>(config);
116 }
std::string fill_both(const std::string &s, size_t width, char fill=' ')
Fill string with characters at both sides until the given width is reached.
std::enable_if<(index !=0)>::type create_all_loggers_impl(Configuration &config)
Definition: logging.cc:102
static einhard::LogLevel global_default_loglevel
The default logging level is ALL.
Definition: logging.cc:20
Here is the call graph for this function:

◆ operator<<() [7/11]

std::ostream& smash::operator<< ( std::ostream &  out,
const Nucleus n 
)

Definition at line 509 of file nucleus.cc.

509  {
510  return out << " #particles #testparticles mass [GeV] "
511  "radius [fm] diffusiveness [fm]\n"
512  << format(n.number_of_particles(), nullptr, 12)
513  << format(n.size(), nullptr, 17) << format(n.mass(), nullptr, 13)
514  << format(n.get_nuclear_radius(), nullptr, 14)
515  << format(n.get_diffusiveness(), nullptr, 20);
516 }

◆ piplusp_elastic_pdg()

static double smash::piplusp_elastic_pdg ( double  mandelstam_s)
static

Definition at line 107 of file parametrizations.cc.

107  {
108  if (piplusp_elastic_interpolation == nullptr) {
109  std::vector<double> x = PIPLUSP_ELASTIC_P_LAB;
110  std::vector<double> y = PIPLUSP_ELASTIC_SIG;
111  std::vector<double> dedup_x;
112  std::vector<double> dedup_y;
113  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
114  dedup_y = smooth(dedup_x, dedup_y, 0.1, 5);
116  make_unique<InterpolateDataLinear<double>>(dedup_x, dedup_y);
117  }
118  const double p_lab = plab_from_s(mandelstam_s, pion_mass, nucleon_mass);
119  return (*piplusp_elastic_interpolation)(p_lab);
120 }
static std::unique_ptr< InterpolateDataLinear< double > > piplusp_elastic_interpolation
An interpolation that gets lazily filled using the PIPLUSP_ELASTIC_SIG data.
const std::initializer_list< double > PIPLUSP_ELASTIC_P_LAB
PDG data on pi+ p elastic cross section: momentum in lab frame.
const std::initializer_list< double > PIPLUSP_ELASTIC_SIG
PDG data on pi+ p elastic cross section: cross section.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piminusp_elastic_pdg()

static double smash::piminusp_elastic_pdg ( double  mandelstam_s)
static

Definition at line 193 of file parametrizations.cc.

193  {
194  if (piminusp_elastic_interpolation == nullptr) {
195  std::vector<double> x = PIMINUSP_ELASTIC_P_LAB;
196  std::vector<double> y = PIMINUSP_ELASTIC_SIG;
197  std::vector<double> dedup_x;
198  std::vector<double> dedup_y;
199  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
200  dedup_y = smooth(dedup_x, dedup_y, 0.2, 6);
202  make_unique<InterpolateDataLinear<double>>(dedup_x, dedup_y);
203  }
204  const double p_lab = plab_from_s(mandelstam_s, pion_mass, nucleon_mass);
205  return (*piminusp_elastic_interpolation)(p_lab);
206 }
const std::initializer_list< double > PIMINUSP_ELASTIC_P_LAB
PDG data on pi- p elastic cross section: momentum in lab frame.
const std::initializer_list< double > PIMINUSP_ELASTIC_SIG
PDG data on pi- p elastic cross section: cross section.
static std::unique_ptr< InterpolateDataLinear< double > > piminusp_elastic_interpolation
An interpolation that gets lazily filled using the PIMINUSP_ELASTIC data.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kminusp_elastic_pdg()

static double smash::kminusp_elastic_pdg ( double  mandelstam_s)
static

Definition at line 458 of file parametrizations.cc.

458  {
459  if (kminusp_elastic_interpolation == nullptr) {
460  std::vector<double> x = KMINUSP_ELASTIC_P_LAB;
461  std::vector<double> y = KMINUSP_ELASTIC_SIG;
462  std::vector<double> dedup_x;
463  std::vector<double> dedup_y;
464  std::tie(dedup_x, dedup_y) = dedup_avg(x, y);
465  dedup_y = smooth(dedup_x, dedup_y, 0.1, 5);
467  make_unique<InterpolateDataLinear<double>>(dedup_x, dedup_y);
468  }
469  const double p_lab = plab_from_s(mandelstam_s, kaon_mass, nucleon_mass);
470  return (*kminusp_elastic_interpolation)(p_lab);
471 }
const std::initializer_list< double > KMINUSP_ELASTIC_P_LAB
PDG data on K- p elastic cross section: momentum in lab frame.
static std::unique_ptr< InterpolateDataLinear< double > > kminusp_elastic_interpolation
An interpolation that gets lazily filled using the KMINUSP_ELASTIC data.
const std::initializer_list< double > KMINUSP_ELASTIC_SIG
PDG data on K- p elastic cross section: cross section.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

static void smash::initialize ( std::unordered_map< std::pair< uint64_t, uint64_t >, double, pair_hash > &  ratios)
static

Calculate and store isospin ratios for K N -> K Delta reactions.

See the documentation of KaonNucleonRatios for details.

Parameters
[in]ratiosAn empty map where the ratios for K N -> K Delta reactions are stored.

Definition at line 580 of file parametrizations.cc.

581  {
582  const auto& type_p = ParticleType::find(pdg::p);
583  const auto& type_n = ParticleType::find(pdg::n);
584  const auto& type_K_p = ParticleType::find(pdg::K_p);
585  const auto& type_K_z = ParticleType::find(pdg::K_z);
586  const auto& type_Delta_pp = ParticleType::find(pdg::Delta_pp);
587  const auto& type_Delta_p = ParticleType::find(pdg::Delta_p);
588  const auto& type_Delta_z = ParticleType::find(pdg::Delta_z);
589  const auto& type_Delta_m = ParticleType::find(pdg::Delta_m);
590 
591  /* Store the isospin ratio of the given reaction relative to all other
592  * possible isospin-symmetric reactions. */
593  auto add_to_ratios = [&](const ParticleType& a, const ParticleType& b,
594  const ParticleType& c, const ParticleType& d,
595  double weight_numerator, double weight_other) {
596  assert(weight_numerator + weight_other != 0);
597  const auto key =
598  std::make_pair(pack(a.pdgcode().code(), b.pdgcode().code()),
599  pack(c.pdgcode().code(), d.pdgcode().code()));
600  const double ratio = weight_numerator / (weight_numerator + weight_other);
601  ratios[key] = ratio;
602  };
603 
604  /* All inelastic channels are K N -> K Delta -> K pi N or charge exchange,
605  * with identical cross section, weighted by the isospin factor.
606  *
607  * For charge exchange, the isospin factors are 1,
608  * so they are excluded here. */
609  {
610  const auto weight1 = isospin_clebsch_gordan_sqr_2to2(
611  type_p, type_K_p, type_K_z, type_Delta_pp);
612  const auto weight2 = isospin_clebsch_gordan_sqr_2to2(
613  type_p, type_K_p, type_K_p, type_Delta_p);
614 
615  add_to_ratios(type_p, type_K_p, type_K_z, type_Delta_pp, weight1, weight2);
616  add_to_ratios(type_p, type_K_p, type_K_p, type_Delta_p, weight2, weight1);
617  }
618  {
619  const auto weight1 = isospin_clebsch_gordan_sqr_2to2(
620  type_n, type_K_p, type_K_z, type_Delta_p);
621  const auto weight2 = isospin_clebsch_gordan_sqr_2to2(
622  type_n, type_K_p, type_K_p, type_Delta_z);
623 
624  add_to_ratios(type_n, type_K_p, type_K_z, type_Delta_p, weight1, weight2);
625  add_to_ratios(type_n, type_K_p, type_K_p, type_Delta_z, weight2, weight1);
626  }
627  /* K+ and K0 have the same mass and spin, their cross sections are assumed to
628  * only differ in isospin factors. */
629  {
630  const auto weight1 = isospin_clebsch_gordan_sqr_2to2(
631  type_p, type_K_z, type_K_z, type_Delta_p);
632  const auto weight2 = isospin_clebsch_gordan_sqr_2to2(
633  type_p, type_K_z, type_K_p, type_Delta_z);
634 
635  add_to_ratios(type_p, type_K_z, type_K_z, type_Delta_p, weight1, weight2);
636  add_to_ratios(type_p, type_K_z, type_K_p, type_Delta_z, weight2, weight1);
637  }
638  {
639  const auto weight1 = isospin_clebsch_gordan_sqr_2to2(
640  type_n, type_K_z, type_K_z, type_Delta_z);
641  const auto weight2 = isospin_clebsch_gordan_sqr_2to2(
642  type_n, type_K_z, type_K_p, type_Delta_m);
643 
644  add_to_ratios(type_n, type_K_z, type_K_z, type_Delta_z, weight1, weight2);
645  add_to_ratios(type_n, type_K_z, type_K_p, type_Delta_m, weight2, weight1);
646  }
647 }
constexpr int Delta_p
Δ⁺.
constexpr int Delta_pp
Δ⁺⁺.
constexpr int K_p
K⁺.
constexpr int K_z
K⁰.
constexpr int Delta_m
Δ⁻.
constexpr int Delta_z
Δ⁰.
double isospin_clebsch_gordan_sqr_2to2(const ParticleType &p_a, const ParticleType &p_b, const ParticleType &p_c, const ParticleType &p_d, const int I=-1)
Calculate the squared isospin Clebsch-Gordan coefficient for a 2-to-2 reaction A + B -> C + D.
constexpr uint64_t pack(int32_t x, int32_t y)
Pack two int32_t into an uint64_t.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<<() [8/11]

std::ostream& smash::operator<< ( std::ostream &  out,
const Particles particles 
)
Parameters
[in]outThe ostream into which to output
[in]particlesThe Particles object to write into out

Definition at line 148 of file particles.cc.

148  {
149  out << particles.size() << " Particles:\n";
150  for (unsigned i = 0; i < particles.data_size_; ++i) {
151  const auto &p = particles.data_[i];
152  if (p.id() < 0) {
153  out << "------ ";
154  } else {
155  out << std::setw(5) << std::setprecision(3) << p.momentum().abs3()
156  << p.type().name();
157  }
158  if ((i & 15) == 0) {
159  out << '\n';
160  }
161  }
162  return out;
163 }

◆ antiname()

static std::string smash::antiname ( const std::string &  name,
PdgCode  code 
)
static

Construct an antiparticle name-string from the given name-string for the particle and its PDG code.

Parameters
[in]namethe name-string of the particle to convert
[in]codethe pdgcode of the particle to convert
Returns
the name-string of the converted antiparticle

Definition at line 143 of file particletype.cc.

143  {
144  std::string basename, charge;
145 
146  if (name.find("⁺⁺") != std::string::npos) {
147  basename = name.substr(0, name.length() - sizeof("⁺⁺") + 1);
148  charge = "⁻⁻";
149  } else if (name.find("⁺") != std::string::npos) {
150  basename = name.substr(0, name.length() - sizeof("⁺") + 1);
151  charge = "⁻";
152  } else if (name.find("⁻⁻") != std::string::npos) {
153  basename = name.substr(0, name.length() - sizeof("⁻⁻") + 1);
154  charge = "⁺⁺";
155  } else if (name.find("⁻") != std::string::npos) {
156  basename = name.substr(0, name.length() - sizeof("⁻") + 1);
157  charge = "⁺";
158  } else if (name.find("⁰") != std::string::npos) {
159  basename = name.substr(0, name.length() - sizeof("⁰") + 1);
160  charge = "⁰";
161  } else {
162  basename = name;
163  charge = "";
164  }
165 
166  // baryons & strange mesons: insert a bar
167  if (code.baryon_number() != 0 || code.strangeness() != 0) {
168  constexpr char bar[] = "\u0305";
169  basename.insert(utf8::sequence_length(basename.begin()), bar);
170  }
171 
172  return basename + charge;
173 }
std::iterator_traits< octet_iterator >::difference_type sequence_length(octet_iterator lead_it)
Given an iterator to the beginning of a UTF-8 sequence, return the length of the next UTF-8 code poin...
Here is the call graph for this function:
Here is the caller graph for this function:

◆ chargestr()

static std::string smash::chargestr ( int  charge)
static

Construct a charge string, given the charge as integer.

Parameters
[in]chargecharge of a particle
Returns
the corresponding string to write out this charge
Exceptions
runtime_errorif the charge is not an integer between -2 and 2

Definition at line 182 of file particletype.cc.

182  {
183  switch (charge) {
184  case 2:
185  return "⁺⁺";
186  case 1:
187  return "⁺";
188  case 0:
189  return "⁰";
190  case -1:
191  return "⁻";
192  case -2:
193  return "⁻⁻";
194  default:
195  throw std::runtime_error("Invalid charge " + std::to_string(charge));
196  }
197 }
Here is the caller graph for this function:

◆ operator<<() [9/11]

std::ostream& smash::operator<< ( std::ostream &  out,
const ParticleType type 
)
Parameters
[out]outThe ostream into which to output
[in]typeThe ParticleType object to write into out

Definition at line 761 of file particletype.cc.

761  {
762  const PdgCode &pdg = type.pdgcode();
763  return out << type.name() << std::setfill(' ') << std::right
764  << "[ mass:" << field<6> << type.mass()
765  << ", width:" << field<6> << type.width_at_pole()
766  << ", PDG:" << field<6> << pdg
767  << ", charge:" << field<3> << pdg.charge()
768  << ", spin:" << field<2> << pdg.spin() << "/2 ]";
769 }

◆ Cugnon_bpp()

static double smash::Cugnon_bpp ( double  plab)
static

Computes the B coefficients from the Cugnon parametrization of the angular distribution in elastic pp scattering.

See equation (8) in Cugnon:1996kh [15]. Note: The original Cugnon parametrization is only applicable for plab < 6 GeV and keeps rising above that. We add an upper limit of b <= 9, in order to be compatible with high-energy data (up to plab ~ 25 GeV).

Parameters
[in]plabLab momentum in GeV.
Returns
Cugnon B coefficient for elatic proton-proton scatterings.

Definition at line 264 of file scatteraction.cc.

264  {
265  if (plab < 2.) {
266  double p8 = pow_int(plab, 8);
267  return 5.5 * p8 / (7.7 + p8);
268  } else {
269  return std::min(9.0, 5.334 + 0.67 * (plab - 2.));
270  }
271 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cugnon_bnp()

static double smash::Cugnon_bnp ( double  plab)
static

Computes the B coefficients from the Cugnon parametrization of the angular distribution in elastic np scattering.

See equation (10) in Cugnon:1996kh [15].

Parameters
[in]plabLab momentum in GeV.
Returns
Cugnon B coefficient for elastic proton-neutron scatterings.

Definition at line 283 of file scatteraction.cc.

283  {
284  if (plab < 0.225) {
285  return 0.;
286  } else if (plab < 0.6) {
287  return 16.53 * (plab - 0.225);
288  } else if (plab < 1.6) {
289  return -1.63 * plab + 7.16;
290  } else {
291  return Cugnon_bpp(plab);
292  }
293 }
static double Cugnon_bpp(double plab)
Computes the B coefficients from the Cugnon parametrization of the angular distribution in elastic pp...
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deduplicate()

static void smash::deduplicate ( std::vector< FinalStateCrossSection > &  final_state_xs)
static

Deduplicate the final-state cross sections by summing.

Parameters
[in,out]final_state_xsFinal-state cross sections.

Definition at line 1074 of file scatteractionsfinder.cc.

1074  {
1075  std::sort(final_state_xs.begin(), final_state_xs.end(),
1076  [](const FinalStateCrossSection& a,
1077  const FinalStateCrossSection& b) { return a.name_ < b.name_; });
1078  auto current = final_state_xs.begin();
1079  while (current != final_state_xs.end()) {
1080  auto adjacent = std::adjacent_find(
1081  current, final_state_xs.end(),
1082  [](const FinalStateCrossSection& a, const FinalStateCrossSection& b) {
1083  return a.name_ == b.name_;
1084  });
1085  current = adjacent;
1086  if (adjacent != final_state_xs.end()) {
1087  adjacent->cross_section_ += (adjacent + 1)->cross_section_;
1088  final_state_xs.erase(adjacent + 1);
1089  }
1090  }
1091 }
Here is the caller graph for this function:

◆ operator<<() [10/11]

std::ostream& smash::operator<< ( std::ostream &  out,
const SphereModus m 
)
Parameters
[in]outThe ostream into which to output
[in]mThe SphereModus object to write into out

Definition at line 194 of file spheremodus.cc.

194  {
195  out << "-- Sphere Modus:\nRadius of the sphere: " << m.radius_ << " fm\n";
196  if (m.use_thermal_) {
197  out << "Thermal multiplicities (T = " << m.sphere_temperature_
198  << " GeV, muB = " << m.mub_ << " GeV, muS = " << m.mus_
199  << " GeV, muQ = " << m.muq_ << " GeV)\n";
200  } else {
201  for (const auto &p : m.init_multipl_) {
202  ParticleTypePtr ptype = &ParticleType::find(p.first);
203  out << ptype->name() << " initial multiplicity " << p.second << '\n';
204  }
205  }
206  switch (m.init_distr_) {
208  out << "Boltzmann momentum distribution with T = "
209  << m.sphere_temperature_ << " GeV.\n";
210  break;
212  out << "Fermi/Bose momentum distribution with T = "
213  << m.sphere_temperature_ << " GeV.\n";
214  break;
216  out << "Sphere Initial Condition is IC_ES";
217  break;
219  out << "Sphere Initial Condition is IC_1M";
220  break;
222  out << "Sphere Initial Condition is IC_2M";
223  break;
225  out << "Sphere Initial Condition is IC_Massive";
226  break;
227  }
228  if (m.insert_jet_) {
229  ParticleTypePtr ptype = &ParticleType::find(m.jet_pdg_);
230  out << "Adding a " << ptype->name() << " as a jet in the middle "
231  << "of the sphere with " << m.jet_mom_ << " GeV initial momentum.\n";
232  }
233  return out;
234 }

◆ split() [2/2]

template<typename Out >
void smash::split ( const std::string &  s,
char  delim,
Out  result 
)

Split string by delimiter.

Parameters
[in]sString to be split.
[in]delimSplitting delimiter.
[out]resultSplit string as iterator.

Necessary for the next function

Definition at line 111 of file stringfunctions.cc.

111  {
112  std::stringstream ss;
113  ss.str(s);
114  std::string item;
115  while (std::getline(ss, item, delim)) {
116  *(result++) = item;
117  }
118 }

◆ swrite() [1/4]

static void smash::swrite ( std::ofstream &  stream,
double  x 
)
static

Write binary representation to stream.

Parameters
streamOutput stream.
xValue to be written.

Definition at line 62 of file tabulation.cc.

62  {
63  stream.write(reinterpret_cast<const char*>(&x), sizeof(x));
64 }
Here is the caller graph for this function:

◆ sread_double()

static double smash::sread_double ( std::ifstream &  stream)
static

Read binary representation of a double.

Parameters
[in]streamInput stream.
Returns
Read value.

Definition at line 72 of file tabulation.cc.

72  {
73  double x;
74  stream.read(reinterpret_cast<char*>(&x), sizeof(x));
75  return x;
76 }
Here is the caller graph for this function:

◆ swrite() [2/4]

static void smash::swrite ( std::ofstream &  stream,
size_t  x 
)
static

Write binary representation to stream.

Parameters
streamOutput stream.
xValue to be written.

Definition at line 84 of file tabulation.cc.

84  {
85  // We want to support 32-bit and 64-bit platforms, so we store a 64-bit
86  // integer on all platforms.
87  const auto const_size_x = static_cast<uint64_t>(x);
88  stream.write(reinterpret_cast<const char*>(&const_size_x),
89  sizeof(const_size_x));
90 }

◆ sread_size()

static size_t smash::sread_size ( std::ifstream &  stream)
static

Read binary representation of a size_t.

Parameters
[in]streamInput stream.
Returns
Read value.

Definition at line 98 of file tabulation.cc.

98  {
99  uint64_t x;
100  stream.read(reinterpret_cast<char*>(&x), sizeof(x));
101  if (x > std::numeric_limits<size_t>::max()) {
102  throw std::runtime_error("trying to read vector larger than supported");
103  }
104  return x;
105 }
Here is the caller graph for this function:

◆ swrite() [3/4]

static void smash::swrite ( std::ofstream &  stream,
const std::vector< double >  x 
)
static

Write binary representation to stream.

Parameters
streamOutput stream.
xValue to be written.

Definition at line 113 of file tabulation.cc.

113  {
114  swrite(stream, x.size());
115  if (x.size() > 0) {
116  stream.write(reinterpret_cast<const char*>(x.data()),
117  sizeof(x[0]) * x.size());
118  }
119 }
static void swrite(std::ofstream &stream, sha256::Hash x)
Write binary representation to stream.
Definition: tabulation.cc:141
Here is the call graph for this function:

◆ sread_vector()

static std::vector<double> smash::sread_vector ( std::ifstream &  stream)
static

Read binary representation of a vector of doubles.

Parameters
[in]streamInput stream.
Returns
Read value.

Definition at line 127 of file tabulation.cc.

127  {
128  const size_t n = sread_size(stream);
129  std::vector<double> x;
130  x.resize(n);
131  stream.read(reinterpret_cast<char*>(x.data()), sizeof(double) * n);
132  return x;
133 }
static size_t sread_size(std::ifstream &stream)
Read binary representation of a size_t.
Definition: tabulation.cc:98
Here is the call graph for this function:
Here is the caller graph for this function:

◆ swrite() [4/4]

static void smash::swrite ( std::ofstream &  stream,
sha256::Hash  x 
)
static

Write binary representation to stream.

Parameters
streamOutput stream.
xValue to be written.

Definition at line 141 of file tabulation.cc.

141  {
142  // The size is always the same, so there is no need to write it.
143  stream.write(reinterpret_cast<const char*>(x.data()),
144  sizeof(x[0]) * x.size());
145 }

◆ sread_hash()

static sha256::Hash smash::sread_hash ( std::ifstream &  stream)
static

Read binary representation of a SHA256 hash.

Parameters
[in]streamInput stream.
Returns
Read value.

Definition at line 153 of file tabulation.cc.

153  {
154  sha256::Hash x;
155  stream.read(reinterpret_cast<char*>(x.data()), x.size());
156  return x;
157 }
std::array< uint8_t, HASH_SIZE > Hash
A SHA256 hash.
Definition: sha256.h:25
Here is the caller graph for this function:

◆ operator<<() [11/11]

std::ostream& smash::operator<< ( std::ostream &  out,
const TimeStampCounter &  tsc 
)

Definition at line 18 of file tsc.cc.

18  {
19  auto c = tsc.cycles();
20  int blocks[10];
21  int n = 0;
22  for (int digits = std::log10(c); digits > 0; digits -= 3) {
23  blocks[n++] = c % 1000;
24  c /= 1000;
25  }
26  if (n == 0) {
27  return out;
28  }
29  const auto lastFill = out.fill('0');
30  out << blocks[--n];
31  while (n > 0) {
32  out << '\'' << std::setw(3) << blocks[--n];
33  }
34  out.fill(lastFill);
35  return out << " Cycles";
36 }

Variable Documentation

◆ LAction

constexpr int smash::LAction = LogArea::Action::id
staticconstexpr

Definition at line 25 of file action.h.

◆ LClock

constexpr int smash::LClock = LogArea::Clock::id
staticconstexpr

Definition at line 25 of file clock.h.

◆ hbarc

constexpr double smash::hbarc = 0.197327053
constexpr

GeV <-> fm conversion factor.

Definition at line 25 of file constants.h.

◆ fm2_mb

constexpr double smash::fm2_mb = 0.1
constexpr

mb <-> fm^2 conversion factor.

Definition at line 28 of file constants.h.

◆ gev2_mb

constexpr double smash::gev2_mb = hbarc * hbarc / fm2_mb
constexpr

GeV^-2 <-> mb conversion factor.

Definition at line 31 of file constants.h.

◆ mev_to_gev

constexpr double smash::mev_to_gev = 1.e-3
constexpr

MeV to GeV conversion factor.

Definition at line 34 of file constants.h.

◆ really_small

constexpr double smash::really_small = 1.0e-6
constexpr

Numerical error tolerance.

Definition at line 37 of file constants.h.

◆ very_small_double

constexpr double smash::very_small_double = 1.0e-15
constexpr

A very small double, used to avoid division by zero.

Definition at line 40 of file constants.h.

◆ twopi

constexpr double smash::twopi = 2. * M_PI
constexpr

\( 2\pi \).

Definition at line 45 of file constants.h.

◆ nuclear_density

constexpr double smash::nuclear_density = 0.168
constexpr

Ground state density of symmetric nuclear matter [fm^-3].

Definition at line 48 of file constants.h.

◆ small_number

constexpr double smash::small_number = 1.0e-4
constexpr

Physical error tolerance.

Definition at line 51 of file constants.h.

◆ nucleon_mass

constexpr double smash::nucleon_mass = 0.938
constexpr

Nucleon mass in GeV.

Note that this should be the same as in particles.txt.

Definition at line 58 of file constants.h.

◆ pion_mass

constexpr double smash::pion_mass = 0.138
constexpr

Pion mass in GeV.

Note that this should be the same as in particles.txt.

Definition at line 65 of file constants.h.

◆ kaon_mass

constexpr double smash::kaon_mass = 0.494
constexpr

Kaon mass in GeV.

Note that this should be the same as in particles.txt.

Definition at line 72 of file constants.h.

◆ omega_mass

constexpr double smash::omega_mass = 0.783
constexpr

omega mass in GeV.

Note that this should be the same as in particles.txt.

Definition at line 79 of file constants.h.

◆ a1_mass

constexpr double smash::a1_mass = 1.26
constexpr

a1 mass in GeV.

Note that this should be the same as in particles.txt.

Definition at line 86 of file constants.h.

◆ delta_mass

constexpr double smash::delta_mass = 1.232
constexpr

Delta mass in GeV.

Note that this should be the same as in particles.txt.

Definition at line 92 of file constants.h.

◆ deuteron_mass

constexpr double smash::deuteron_mass = 1.8756
constexpr

Deuteron mass in GeV.

Note that this should be the same as in particles.txt.

Definition at line 98 of file constants.h.

◆ fine_structure

constexpr double smash::fine_structure = 7.2973525698e-3
constexpr

Fine-struture constant, approximately 1/137.

Definition at line 101 of file constants.h.

◆ elementary_charge

const double smash::elementary_charge = std::sqrt(fine_structure * 4 * M_PI)

Elementary electric charge in natural units, approximately 0.3.

Definition at line 104 of file constants.h.

◆ maximum_rndm_seed_in_pythia

constexpr int smash::maximum_rndm_seed_in_pythia = 900000000
constexpr

The maximum value of the random seed used in PYTHIA.

Definition at line 109 of file constants.h.

◆ minimum_sqrts_pythia_can_handle

constexpr double smash::minimum_sqrts_pythia_can_handle = 10.0
constexpr

Energy in GeV, below which hard reactions via pythia are impossible.

This constraint is technical and comes from the pythia model itself. At the same time, physics-wise, hard cross-sections at the low energies are so small, that this constrant is well justified.

Definition at line 117 of file constants.h.

◆ ID_PROCESS_PHOTON

constexpr std::uint32_t smash::ID_PROCESS_PHOTON
constexpr
Initial value:
=
std::numeric_limits<std::uint32_t>::max()

Process ID for any photon process.

It is chosen such that it will not conflict with any other process.

Definition at line 124 of file constants.h.

◆ BREMS_SQRTS

const std::initializer_list<double> smash::BREMS_SQRTS
Initial value:
= {
0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41,
0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53,
0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65,
0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77,
0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89,
0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0, 1.01,
1.02, 1.03, 1.04, 1.05, 1.06, 1.07, 1.08, 1.09, 1.1, 1.11, 1.12, 1.13,
1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.2, 1.21, 1.22, 1.23, 1.24, 1.25,
1.26, 1.27, 1.28, 1.29, 1.3, 1.31, 1.32, 1.33, 1.34, 1.35, 1.36, 1.37,
1.38, 1.39, 1.4, 1.41, 1.42, 1.43, 1.44, 1.45, 1.46, 1.47, 1.48, 1.49,
1.5, 1.51, 1.52, 1.53, 1.54, 1.55, 1.56, 1.57, 1.58, 1.59, 1.6, 1.61,
1.62, 1.63, 1.64, 1.65, 1.66, 1.67, 1.68, 1.69, 1.7, 1.71, 1.72, 1.73,
1.74, 1.75, 1.76, 1.77, 1.78, 1.79, 1.8, 1.81, 1.82, 1.83, 1.84, 1.85,
1.86, 1.87, 1.88, 1.89, 1.9, 1.91, 1.92, 1.93, 1.94, 1.95, 1.96, 1.97,
1.98, 1.99, 2.03, 2.06, 2.09, 2.12, 2.15, 2.18, 2.21, 2.24, 2.27, 2.3,
2.33, 2.36, 2.39, 2.42, 2.45, 2.48, 2.51, 2.54, 2.57, 2.6, 2.63, 2.66,
2.69, 2.72, 2.75, 2.78, 2.81, 2.84, 2.87, 2.9, 2.93, 2.96, 2.99, 3.02,
3.05, 3.08, 3.11, 3.14, 3.17, 3.2, 3.23, 3.26, 3.29, 3.32, 3.35, 3.38,
3.41, 3.44, 3.47, 3.5, 3.53, 3.56, 3.59, 3.62, 3.65, 3.68, 3.71, 3.74,
3.77, 3.8, 3.83, 3.86, 3.89, 3.92, 3.95, 3.98, 4.01, 4.04, 4.07, 4.1,
4.13, 4.16, 4.19, 4.22, 4.25, 4.28, 4.31, 4.34, 4.37, 4.4, 4.43, 4.46,
4.49, 4.52, 4.55, 4.58, 4.61, 4.64, 4.67, 4.7, 4.73, 4.76, 4.79, 4.82,
4.85, 4.88, 4.91, 4.94, 4.97, 5.0}

Center-of-mass energy.

Definition at line 24 of file crosssectionsbrems.h.

◆ BREMS_K

const std::initializer_list<double> smash::BREMS_K
Initial value:
= {
0.001, 0.00107227, 0.00114976, 0.00123285, 0.00132194, 0.00141747,
0.00151991, 0.00162975, 0.00174753, 0.00187382, 0.00200923, 0.00215443,
0.00231013, 0.00247708, 0.00265609, 0.00284804, 0.00305386, 0.00327455,
0.00351119, 0.00376494, 0.00403702, 0.00432876, 0.00464159, 0.00497702,
0.0053367, 0.00572237, 0.00613591, 0.00657933, 0.0070548, 0.00756463,
0.00811131, 0.00869749, 0.00932603, 0.01, 0.0107227, 0.0114976,
0.0123285, 0.0132194, 0.0141747, 0.0151991, 0.0162975, 0.0174753,
0.0187382, 0.0200923, 0.0215443, 0.0231013, 0.0247708, 0.0265609,
0.0284804, 0.0305386, 0.0327455, 0.0351119, 0.0376494, 0.0403702,
0.0432876, 0.0464159, 0.0497702, 0.053367, 0.0572237, 0.0613591,
0.0657933, 0.070548, 0.0756463, 0.0811131, 0.0869749, 0.0932603,
0.1, 0.107227, 0.114976, 0.123285, 0.132194, 0.141747,
0.151991, 0.162975, 0.174753, 0.187382, 0.200923, 0.215443,
0.231013, 0.247708, 0.265609, 0.284804, 0.305386, 0.327455,
0.351119, 0.376494, 0.403702, 0.432876, 0.464159, 0.497702,
0.53367, 0.572237, 0.613591, 0.657933, 0.70548, 0.756463,
0.811131, 0.869749, 0.932603, 1.0}

photon momentum

Definition at line 50 of file crosssectionsbrems.h.

◆ BREMS_THETA

const std::initializer_list<double> smash::BREMS_THETA
Initial value:
= {
0.0, 0.039767, 0.079534, 0.119301, 0.159068, 0.198835, 0.238602,
0.278369, 0.318136, 0.357903, 0.39767, 0.437437, 0.477204, 0.516971,
0.556738, 0.596505, 0.636272, 0.676039, 0.715806, 0.755573, 0.79534,
0.835107, 0.874874, 0.914641, 0.954408, 0.994175, 1.03394, 1.07371,
1.11348, 1.15324, 1.19301, 1.23278, 1.27254, 1.31231, 1.35208,
1.39184, 1.43161, 1.47138, 1.51115, 1.55091, 1.59068, 1.63045,
1.67021, 1.70998, 1.74975, 1.78951, 1.82928, 1.86905, 1.90882,
1.94858, 1.98835, 2.02812, 2.06788, 2.10765, 2.14742, 2.18718,
2.22695, 2.26672, 2.30649, 2.34625, 2.38602, 2.42579, 2.46555,
2.50532, 2.54509, 2.58485, 2.62462, 2.66439, 2.70416, 2.74392,
2.78369, 2.82346, 2.86322, 2.90299, 2.94276, 2.98252, 3.02229,
3.06206, 3.10183, 3.14159}

theta angle with respect to collision axis of incoming pions

Definition at line 70 of file crosssectionsbrems.h.

◆ pipi_pipi_opp_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::pipi_pipi_opp_interpolation = nullptr
static

Definition at line 89 of file crosssectionsbrems.h.

◆ pipi_pipi_opp_dsigma_dk_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pipi_pipi_opp_dsigma_dk_interpolation = nullptr
static

Definition at line 91 of file crosssectionsbrems.h.

◆ pipi_pipi_opp_dsigma_dtheta_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pipi_pipi_opp_dsigma_dtheta_interpolation = nullptr
static

Definition at line 93 of file crosssectionsbrems.h.

◆ BREMS_PIPI_PIPI_OPP_SIG

const std::initializer_list<double> smash::BREMS_PIPI_PIPI_OPP_SIG

Total π+- + π-+ -> π+- + π-+ + γ cross section.

Definition at line 97 of file crosssectionsbrems.h.

◆ BREMS_PIPI_PIPI_OPP_DIFF_SIG_K

const std::initializer_list<double> smash::BREMS_PIPI_PIPI_OPP_DIFF_SIG_K

dSigma/dk for π+- + π-+ -> π+- + π-+ + γ

Definition at line 139 of file crosssectionsbrems.h.

◆ BREMS_PIPI_PIPI_OPP_DIFF_SIG_THETA

const std::initializer_list<double> smash::BREMS_PIPI_PIPI_OPP_DIFF_SIG_THETA

dSigma/dtheta for π+- + π-+ -> π+- + π-+ + γ

Definition at line 4642 of file crosssectionsbrems.h.

◆ pipi_pipi_same_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::pipi_pipi_same_interpolation = nullptr
static

Definition at line 8969 of file crosssectionsbrems.h.

◆ pipi_pipi_same_dsigma_dk_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pipi_pipi_same_dsigma_dk_interpolation = nullptr
static

Definition at line 8971 of file crosssectionsbrems.h.

◆ pipi_pipi_same_dsigma_dtheta_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pipi_pipi_same_dsigma_dtheta_interpolation = nullptr
static

Definition at line 8973 of file crosssectionsbrems.h.

◆ BREMS_PIPI_PIPI_SAME_SIG

const std::initializer_list<double> smash::BREMS_PIPI_PIPI_SAME_SIG

Total π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ cross section.

Definition at line 8977 of file crosssectionsbrems.h.

◆ BREMS_PIPI_PIPI_SAME_DIFF_SIG_K

const std::initializer_list<double> smash::BREMS_PIPI_PIPI_SAME_DIFF_SIG_K

dSigma/dk for π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ

Definition at line 9025 of file crosssectionsbrems.h.

◆ BREMS_PIPI_PIPI_SAME_DIFF_SIG_THETA

const std::initializer_list<double> smash::BREMS_PIPI_PIPI_SAME_DIFF_SIG_THETA

dSigma/dtheta for π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ

Definition at line 14428 of file crosssectionsbrems.h.

◆ pipi0_pipi0_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::pipi0_pipi0_interpolation = nullptr
static

Definition at line 18754 of file crosssectionsbrems.h.

◆ pipi0_pipi0_dsigma_dk_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pipi0_pipi0_dsigma_dk_interpolation = nullptr
static

Definition at line 18756 of file crosssectionsbrems.h.

◆ pipi0_pipi0_dsigma_dtheta_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pipi0_pipi0_dsigma_dtheta_interpolation = nullptr
static

Definition at line 18758 of file crosssectionsbrems.h.

◆ BREMS_PIPI0_PIPI0_SIG

const std::initializer_list<double> smash::BREMS_PIPI0_PIPI0_SIG

Total π0 + π -> π0 + π + γ cross section.

Definition at line 18762 of file crosssectionsbrems.h.

◆ BREMS_PIPI0_PIPI0_DIFF_SIG_K

const std::initializer_list<double> smash::BREMS_PIPI0_PIPI0_DIFF_SIG_K

dSigma/dk for π0 + π -> π0 + π + γ

Definition at line 18810 of file crosssectionsbrems.h.

◆ BREMS_PIPI0_PIPI0_DIFF_SIG_THETA

const std::initializer_list<double> smash::BREMS_PIPI0_PIPI0_DIFF_SIG_THETA

dSigma/dtheta for π0 + π -> π0 + π + γ

Definition at line 23313 of file crosssectionsbrems.h.

◆ pipi_pi0pi0_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::pipi_pi0pi0_interpolation = nullptr
static

Definition at line 27639 of file crosssectionsbrems.h.

◆ pipi_pi0pi0_dsigma_dk_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pipi_pi0pi0_dsigma_dk_interpolation = nullptr
static

Definition at line 27641 of file crosssectionsbrems.h.

◆ pipi_pi0pi0_dsigma_dtheta_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pipi_pi0pi0_dsigma_dtheta_interpolation = nullptr
static

Definition at line 27643 of file crosssectionsbrems.h.

◆ BREMS_PIPI_PI0PI0_SIG

const std::initializer_list<double> smash::BREMS_PIPI_PI0PI0_SIG

Total π+- + π-+ -> π0 + π0 + γ cross section.

Definition at line 27647 of file crosssectionsbrems.h.

◆ BREMS_PIPI_PI0PI0_DIFF_SIG_K

const std::initializer_list<double> smash::BREMS_PIPI_PI0PI0_DIFF_SIG_K

dSigma/dk for π+- + π-+ -> π0 + π0 + γ

Definition at line 27695 of file crosssectionsbrems.h.

◆ BREMS_PIPI_PI0PI0_DIFF_SIG_THETA

const std::initializer_list<double> smash::BREMS_PIPI_PI0PI0_DIFF_SIG_THETA

dSigma/dtheta for π+- + π-+ -> π0 + π0 + γ

Definition at line 31556 of file crosssectionsbrems.h.

◆ pi0pi0_pipi_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::pi0pi0_pipi_interpolation = nullptr
static

Definition at line 35882 of file crosssectionsbrems.h.

◆ pi0pi0_pipi_dsigma_dk_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pi0pi0_pipi_dsigma_dk_interpolation = nullptr
static

Definition at line 35884 of file crosssectionsbrems.h.

◆ pi0pi0_pipi_dsigma_dtheta_interpolation

std::unique_ptr<InterpolateData2DSpline> smash::pi0pi0_pipi_dsigma_dtheta_interpolation = nullptr
static

Definition at line 35886 of file crosssectionsbrems.h.

◆ BREMS_PI0PI0_PIPI_SIG

const std::initializer_list<double> smash::BREMS_PI0PI0_PIPI_SIG

Total π0 + π0 -> π+- + π-+ + γ cross section.

Definition at line 35890 of file crosssectionsbrems.h.

◆ BREMS_PI0PI0_PIPI_DIFF_SIG_K

const std::initializer_list<double> smash::BREMS_PI0PI0_PIPI_DIFF_SIG_K

dSigma/dk for π0 + π0 -> π+- + π-+ + γ

Definition at line 35938 of file crosssectionsbrems.h.

◆ BREMS_PI0PI0_PIPI_DIFF_SIG_THETA

const std::initializer_list<double> smash::BREMS_PI0PI0_PIPI_DIFF_SIG_THETA

dSigma/dtheta for π0 + π0 -> π+- + π-+ + γ

Definition at line 41341 of file crosssectionsbrems.h.

◆ LDensity

constexpr int smash::LDensity = LogArea::Density::id
staticconstexpr

Definition at line 29 of file density.h.

◆ LMain

constexpr int smash::LMain = LogArea::Main::id
staticconstexpr

Definition at line 87 of file experiment.h.

◆ LInitialConditions

constexpr int smash::LInitialConditions = LogArea::InitialConditions::id
staticconstexpr

Definition at line 88 of file experiment.h.

◆ LLattice

constexpr int smash::LLattice = LogArea::Lattice::id
staticconstexpr

Definition at line 25 of file lattice.h.

◆ LOutput [1/2]

constexpr int smash::LOutput = LogArea::Output::id
staticconstexpr

Definition at line 26 of file outputinterface.h.

◆ LExperiment

constexpr int smash::LExperiment = LogArea::Experiment::id
staticconstexpr

Definition at line 19 of file outputparameters.h.

◆ kaon_nucleon_ratios

KaonNucleonRatios smash::kaon_nucleon_ratios

Definition at line 675 of file parametrizations.cc.

◆ KMINUSP_ELASTIC_P_LAB

const std::initializer_list<double> smash::KMINUSP_ELASTIC_P_LAB

PDG data on K- p elastic cross section: momentum in lab frame.

Definition at line 20 of file parametrizations_data.h.

◆ KMINUSP_ELASTIC_SIG

const std::initializer_list<double> smash::KMINUSP_ELASTIC_SIG

PDG data on K- p elastic cross section: cross section.

Definition at line 68 of file parametrizations_data.h.

◆ kminusp_elastic_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::kminusp_elastic_interpolation = nullptr
static

An interpolation that gets lazily filled using the KMINUSP_ELASTIC data.

Definition at line 107 of file parametrizations_data.h.

◆ KMINUSP_TOT_PLAB

const std::initializer_list<double> smash::KMINUSP_TOT_PLAB

PDG data on K- p total cross section: momentum in lab frame.

Definition at line 110 of file parametrizations_data.h.

◆ KMINUSP_TOT_SIG

const std::initializer_list<double> smash::KMINUSP_TOT_SIG

PDG data on K- p total cross section: cross section.

Definition at line 165 of file parametrizations_data.h.

◆ KMINUSP_RES_SQRTS

const std::initializer_list<double> smash::KMINUSP_RES_SQRTS
Initial value:
= {
1.4355, 1.4530, 1.4730, 1.4929, 1.5129, 1.5329, 1.5529, 1.5729,
1.5929, 1.6128, 1.6328, 1.6528, 1.6728, 1.6928, 1.7127, 1.7327,
1.7527, 1.7727, 1.7927, 1.8127, 1.8326, 1.8526, 1.8726, 1.8926,
1.9126, 1.9325, 1.9525, 1.9725, 1.9925, 2.0125, 2.0325, 2.0524,
2.0724, 2.0924, 2.1124, 2.1324, 2.1523, 2.1723, 2.1923, 2.2123,
2.2323, 2.2523, 2.2722, 2.2922, 2.3122, 2.3322, 2.3522, 2.3721,
2.3921, 2.4121, 2.4321, 2.4521, 2.4721, 2.4920, 2.5120, 2.5320}

Center-of-mass energy list for K̅⁻ N⁺

Definition at line 210 of file parametrizations_data.h.

◆ KMINUSP_RES_SIG

const std::initializer_list<double> smash::KMINUSP_RES_SIG
Initial value:
= {
0.46856081097, 0.68994120313, 1.00475205957, 1.66469547655,
5.63530052434, 4.17372028288, 4.50737036469, 8.00913400697,
0.29205365102, 2.72859364291, 3.30822314603, 4.44740017628,
4.95697831919, 5.05350905117, 4.87562017799, 7.48383422000,
8.29845755438, 9.71940157530, 11.10200040600, 12.00610574630,
10.06137989140, 7.47886042856, 6.11390219499, 5.19531126779,
4.38090191191, 3.95316327084, 3.53446044755, 3.46497827089,
3.63741875589, 3.77762079044, 0.87409952036, 4.19070149234,
4.38097308237, 4.27752586136, 4.12637945445, 3.70027602474,
3.31806303484, 2.88526838044, 2.58141493751, 2.36391939397,
2.18133708906, 1.39193162095, 2.03247269918, 2.00726146262,
2.13817978212, 2.16907178433, 2.08118209913, 1.83166338166,
1.56038155638, 1.27216056674, 1.03167072054, 0.85006416230,
0.39627220898, 0.57172926654, 0.51129452389, 0.44626386026}

Elastic K̅⁻ N⁺ cross section contributions from decays.

These need to be subtracted from the interpolation of the PDG data on elastic cross sections. This data was generated using the SMASH analysis suite and should be updated when strange resonances are changed or added.

Definition at line 226 of file parametrizations_data.h.

◆ kminusp_elastic_res_interpolation

std::unique_ptr<InterpolateDataSpline> smash::kminusp_elastic_res_interpolation = nullptr
static

An interpolation that gets lazily filled using the KMINUSP_RES data.

Definition at line 244 of file parametrizations_data.h.

◆ KPLUSN_TOT_PLAB

const std::initializer_list<double> smash::KPLUSN_TOT_PLAB
Initial value:
= {
0.770, 0.888, 0.939, 0.970, 0.989, 1.040, 1.091, 1.141,
1.191, 1.242, 1.292, 1.300, 1.342, 1.392, 1.440,
1.442, 1.492, 1.550, 1.593, 1.600, 1.643, 1.690, 1.693,
1.700, 1.743, 1.750, 1.793, 1.800, 1.850, 1.893, 1.900,
1.950, 1.970, 1.993, 2.000, 2.050, 2.093, 2.100, 2.150,
2.193, 2.200, 2.260, 2.300, 2.350, 2.393, 2.400, 2.450,
2.500, 2.550, 2.550, 2.600, 2.650, 2.700, 2.750, 2.800,
2.830, 2.850, 2.900, 2.950, 3.000, 3.050, 3.100, 3.150,
3.200, 3.250, 3.300, 6.000, 8.000, 10.000, 12.000, 14.000,
15.000, 16.000, 18.000, 20.000, 20.000, 25.000, 30.000, 35.000,
35.000, 40.000, 45.000, 50.000, 50.000, 50.000, 55.000, 70.000,
100.000, 100.000, 120.000, 150.000, 150.000, 170.000, 200.000, 200.000,
240.000, 280.000, 310.000}

PDG data on K+ n total cross section: momentum in lab frame.

One data point is ignored because it is an outlier and messes up the smoothing.

Definition at line 252 of file parametrizations_data.h.

◆ KPLUSN_TOT_SIG

const std::initializer_list<double> smash::KPLUSN_TOT_SIG
Initial value:
= {
15.50, 16.85, 17.60, 17.80, 18.53, 18.91, 20.61, 21.25, 20.87,
20.26, 19.68, 18.50, 19.32, 19.22, 18.10, 19.07, 18.95, 18.91,
18.79, 18.89, 18.67, 18.50, 18.69, 18.83, 18.88, 18.86, 18.73,
18.53, 18.66, 18.50, 18.69, 18.70, 18.60, 18.55, 18.79, 18.54,
18.67, 18.49, 18.43, 18.40, 18.40, 17.70, 18.27, 18.26, 18.63,
18.09, 18.25, 18.11, 17.10, 18.17, 18.09, 18.02, 18.11, 18.06,
18.01, 17.50, 17.95, 17.85, 17.81, 17.81, 17.83, 17.85, 17.61,
17.61, 17.66, 17.55, 17.50, 17.60, 17.50, 17.60, 17.50, 17.87,
17.40, 17.60, 17.94, 17.70, 17.78, 17.69, 18.29, 18.12, 18.15,
18.30, 18.66, 18.56, 18.02, 18.43, 18.60, 19.04, 18.99, 19.23,
19.63, 19.55, 19.74, 19.72, 19.82, 20.37, 20.61, 20.80}

PDG data on K+ n total cross section: cross section.

One data point is ignored because it is an outlier and messes up the smoothing.

Definition at line 273 of file parametrizations_data.h.

◆ kplusn_total_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::kplusn_total_interpolation = nullptr
static

An interpolation that gets lazily filled using the KPLUSN_TOT data.

Definition at line 288 of file parametrizations_data.h.

◆ KPLUSP_TOT_PLAB

const std::initializer_list<double> smash::KPLUSP_TOT_PLAB
Initial value:
= {
0.178, 0.265, 0.321, 0.351, 0.366, 0.405, 0.440, 0.451,
0.475, 0.475, 0.506, 0.522, 0.536, 0.566, 0.569, 0.588,
0.589, 0.592, 0.593, 0.596, 0.618, 0.620, 0.627, 0.643,
0.644, 0.657, 0.668, 0.686, 0.698, 0.713, 0.717, 0.727,
0.757, 0.768, 0.770, 0.786, 0.817, 0.823, 0.846, 0.864,
0.864, 0.881, 0.891, 0.900, 0.904, 0.916, 0.938, 0.942,
0.951, 0.969, 0.969, 0.970, 0.970, 0.985, 0.992, 1.020,
1.029, 1.043, 1.055, 1.060, 1.084, 1.090, 1.094, 1.125,
1.130, 1.140, 1.144, 1.160, 1.170, 1.189, 1.194, 1.207,
1.210, 1.238, 1.245, 1.250, 1.293, 1.295, 1.300, 1.320,
1.345, 1.347, 1.380, 1.395, 1.408, 1.440, 1.445, 1.455,
1.468, 1.480, 1.495, 1.550, 1.563, 1.596, 1.600, 1.646,
1.690, 1.696, 1.700, 1.746, 1.750, 1.796, 1.800, 1.850,
1.896, 1.900, 1.945, 1.950, 1.960, 1.970, 1.996, 2.000,
2.050, 2.096, 2.100, 2.150, 2.196, 2.200, 2.260, 2.300,
2.350, 2.396, 2.400, 2.450, 2.473, 2.500, 2.530, 2.550,
2.550, 2.600, 2.650, 2.700, 2.750, 2.760, 2.800, 2.830,
2.850, 2.900, 2.950, 3.000, 3.050, 3.100, 3.150, 3.200,
3.200, 3.250, 3.250, 3.300, 3.700, 4.000, 4.200, 4.750,
5.000, 5.500, 6.000, 7.000, 7.000, 8.000, 8.200, 8.500,
10.000, 10.000, 10.000, 10.000, 10.900, 11.500, 12.000, 12.500,
13.400, 14.000, 15.000, 15.000, 16.000, 16.000, 16.900, 18.000,
19.000, 20.000, 20.000, 25.000, 30.000, 32.000, 35.000, 35.000,
40.000, 42.500, 45.000, 50.000, 50.000, 50.000, 52.200, 55.000,
70.000, 100.000, 100.000, 100.000, 100.000, 120.000, 147.000, 150.000,
150.000, 170.000, 175.000, 200.000, 200.000, 240.000, 280.000, 310.000}

PDG data on K+ p total cross section: momentum in lab frame.

Definition at line 291 of file parametrizations_data.h.

◆ KPLUSP_TOT_SIG

const std::initializer_list<double> smash::KPLUSP_TOT_SIG
Initial value:
= {
11.40, 13.00, 14.00, 12.20, 13.20, 13.69, 12.81, 16.30, 12.70, 13.58, 13.02,
15.20, 12.09, 13.20, 12.70, 12.60, 16.30, 14.36, 13.05, 13.04, 12.65, 12.91,
12.18, 12.50, 12.88, 12.43, 13.10, 11.25, 12.60, 11.14, 11.10, 12.45, 12.65,
11.65, 13.00, 12.80, 13.20, 12.97, 13.45, 14.07, 13.21, 13.90, 14.39, 13.10,
14.23, 14.20, 14.59, 15.57, 14.95, 15.28, 15.63, 15.40, 15.25, 16.20, 15.97,
16.10, 15.69, 17.39, 16.95, 16.40, 17.04, 17.60, 17.12, 17.55, 18.08, 18.02,
18.09, 17.95, 18.10, 18.06, 18.47, 19.85, 18.58, 18.11, 18.54, 20.71, 18.44,
18.61, 17.90, 19.33, 18.44, 18.27, 18.64, 18.27, 17.97, 18.10, 18.04, 18.20,
17.94, 18.04, 17.93, 17.70, 17.66, 17.75, 17.71, 17.86, 17.50, 17.85, 17.73,
17.80, 17.83, 17.80, 17.98, 17.77, 17.81, 17.79, 17.41, 17.75, 19.40, 16.90,
17.60, 17.63, 17.72, 17.51, 17.56, 17.57, 17.54, 17.60, 17.10, 17.44, 17.52,
17.55, 17.56, 17.48, 17.25, 17.49, 17.47, 17.10, 17.44, 17.50, 17.47, 17.41,
17.41, 17.41, 17.40, 16.70, 17.30, 17.34, 17.30, 17.19, 17.14, 17.08, 17.15,
17.13, 17.13, 17.13, 17.50, 17.14, 21.00, 17.60, 17.10, 21.30, 17.20, 17.90,
17.00, 17.20, 18.40, 17.30, 17.20, 18.70, 17.20, 17.30, 18.80, 17.30, 18.10,
19.00, 17.30, 18.30, 17.50, 17.40, 18.50, 17.31, 17.10, 17.00, 18.80, 17.10,
17.30, 17.50, 17.42, 17.68, 17.72, 18.40, 17.82, 17.80, 18.05, 17.91, 17.88,
18.06, 18.03, 18.37, 18.28, 18.17, 18.52, 18.40, 18.88, 18.70, 18.85, 19.14,
19.52, 19.36, 19.33, 19.64, 18.20, 19.91, 19.84, 20.22, 20.45, 20.67}

PDG data on K+ p total cross section: cross section.

Definition at line 320 of file parametrizations_data.h.

◆ kplusp_total_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::kplusp_total_interpolation = nullptr
static

An interpolation that gets lazily filled using the KPLUSP_TOT data.

Definition at line 343 of file parametrizations_data.h.

◆ PIMINUSP_ELASTIC_P_LAB

const std::initializer_list<double> smash::PIMINUSP_ELASTIC_P_LAB
Initial value:
= {
0.09875, 0.14956, 0.21648, 0.21885, 0.22828, 0.24684, 0.25599, 0.26733,
0.27071, 0.2752, 0.29303, 0.29303, 0.33138, 0.33571, 0.33788, 0.35052,
0.378, 0.38261, 0.404, 0.40626, 0.408, 0.42188, 0.427, 0.44888,
0.452, 0.471, 0.49008, 0.49008, 0.49008, 0.509, 0.523, 0.52845,
0.53155, 0.547, 0.54911, 0.54911, 0.556, 0.565, 0.57281, 0.582,
0.586, 0.609, 0.6139, 0.61698, 0.625, 0.64054, 0.657, 0.65793,
0.658, 0.6753, 0.683, 0.687, 0.69061, 0.699, 0.70692, 0.71399,
0.72628, 0.731, 0.73257, 0.74257, 0.75, 0.76189, 0.775, 0.77714,
0.77714, 0.77827, 0.798, 0.82586, 0.83803, 0.848, 0.84954, 0.854,
0.87466, 0.90386, 0.91903, 0.924, 0.95947, 1.03016, 1.106, 1.12339,
1.164, 1.165, 1.174, 1.214, 1.21659, 1.23, 1.25, 1.26,
1.279, 1.323, 1.339, 1.347, 1.355, 1.365, 1.375, 1.385,
1.395, 1.405, 1.415, 1.425, 1.435, 1.445, 1.455, 1.465,
1.475, 1.485, 1.495, 1.497, 1.499, 1.503, 1.5031, 1.509,
1.567, 1.59, 1.6, 1.603, 1.71, 1.85, 2.1, 2.14,
2.26, 2.29, 2.7, 2.75, 2.77, 2.7999, 3., 3.15}

PDG data on pi- p elastic cross section: momentum in lab frame.

Definition at line 346 of file parametrizations_data.h.

◆ PIMINUSP_ELASTIC_SIG

const std::initializer_list<double> smash::PIMINUSP_ELASTIC_SIG
Initial value:
= {
1.847, 2.9, 9.6, 11.3, 12.8, 17., 20.1, 21.4, 22.5,
21.2, 22.5, 18.2, 19.5, 16., 17.4, 15.1, 12.29, 12.4,
10.1, 13.8, 10.41, 11.4, 9., 10.3, 8.9, 9.2, 10.42,
10.9, 10.8, 9.15, 9.8, 11.4, 11.4, 9.99, 13., 13.,
10.24, 10.8, 12.19, 16.2, 11.34, 12.86, 13.71, 13.9, 12.19,
14.8, 13.92, 16.2, 15.32, 16.98, 18.9, 17.07, 18.86, 19.07,
19.95, 20.5, 19.87, 18.9, 16.6, 19.4, 19.91, 18.94, 17.56,
17.19, 17.82, 16.1, 14.91, 15.75, 14.9, 13.2, 14.1, 14.47,
14.4, 14.8, 14.1, 18.8, 18., 18.6, 17.95, 17.7, 13.66,
15.01, 15.73, 12.45, 14.1, 14.6, 13.31, 13.8, 12.8, 13.09,
12.627, 12.987, 12.763, 12.367, 12.852, 12.67, 12.126, 12.972, 12.478,
12.594, 12.532, 11.801, 11.568, 11.413, 11.119, 11.643, 11.368, 11.523,
11.163, 11.69, 10., 10.39, 10.21, 9.65, 9., 9.82, 10.4,
11.1, 9.69, 9.3, 8.91, 8.5, 7.7, 7.2, 7.2, 7.8,
7.57, 6.1}

PDG data on pi- p elastic cross section: cross section.

Definition at line 365 of file parametrizations_data.h.

◆ piminusp_elastic_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::piminusp_elastic_interpolation = nullptr
static

An interpolation that gets lazily filled using the PIMINUSP_ELASTIC data.

Definition at line 384 of file parametrizations_data.h.

◆ PIMINUSP_LAMBDAK0_P_LAB

const std::initializer_list<double> smash::PIMINUSP_LAMBDAK0_P_LAB
Initial value:
= {
0.904, 0.91, 0.919, 0.922, 0.926, 0.93, 0.931, 0.942, 0.945, 0.958, 0.964,
0.968, 0.98, 0.98, 0.983, 0.993, 0.997, 1.001, 1.002, 1.007, 1.012, 1.017,
1.02, 1.02, 1.021, 1.022, 1.023, 1.027, 1.031, 1.035, 1.04, 1.04, 1.04,
1.043, 1.048, 1.054, 1.059, 1.065, 1.078, 1.081, 1.091, 1.091, 1.094, 1.095,
1.097, 1.116, 1.129, 1.13, 1.135, 1.144, 1.159, 1.194, 1.223, 1.235, 1.277,
1.287, 1.326, 1.331, 1.332, 1.395, 1.433, 1.455, 1.5, 1.508, 1.515, 1.575,
1.59, 1.6, 1.615, 1.645, 1.69, 1.69, 1.705, 1.775, 1.85, 1.875, 1.94,
1.95, 1.98, 2., 2.05, 2.05, 2.055, 2.115, 2.14, 2.15, 2.235, 2.25,
2.35, 2.375, 2.494, 2.605, 2.7, 2.75, 2.75, 2.86, 3.01, 3.125, 3.21,
3.885, 3.9, 3.95, 4.16, 4.5, 6., 8., 10.}

PDG data on pi- p to Lambda K0 cross section: momentum in lab frame.

Definition at line 387 of file parametrizations_data.h.

◆ PIMINUSP_LAMBDAK0_SIG

const std::initializer_list<double> smash::PIMINUSP_LAMBDAK0_SIG
Initial value:
= {
0.056, 0.122, 0.18, 0.14, 0.227, 0.212, 0.13, 0.3, 0.336, 0.43,
0.427, 0.52, 0.467, 0.45, 0.576, 0.59, 0.652, 0.56, 0.588, 0.634,
0.686, 0.665, 0.67, 0.69, 0.809, 0.675, 0.94, 0.737, 0.734, 0.73,
0.926, 0.59, 0.92, 0.57, 0.568, 0.651, 0.899, 0.64, 0.794, 0.58,
0.82, 0.58, 0.7, 0.68, 0.729, 0.575, 0.592, 0.462, 0.541, 0.64,
0.48, 0.58, 0.46, 0.485, 0.447, 0.25, 0.367, 0.32, 0.29, 0.25,
0.32, 0.29, 0.334, 0.214, 0.22, 0.21, 0.214, 0.238, 0.208, 0.16,
0.199, 0.174, 0.14, 0.13, 0.181, 0.16, 0.185, 0.182, 0.184, 0.15,
0.182, 0.179, 0.11, 0.16, 0.162, 0.192, 0.15, 0.172, 0.174, 0.12,
0.16, 0.106, 0.12, 0.09, 0.09, 0.109, 0.084, 0.094, 0.087, 0.067,
0.058, 0.0644, 0.049, 0.054, 0.038, 0.0221, 0.0157}

PDG data on pi- p to Lambda K0 cross section: cross section.

Definition at line 400 of file parametrizations_data.h.

◆ piminusp_lambdak0_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::piminusp_lambdak0_interpolation = nullptr
static

An interpolation that gets lazily filled using the PIMINUSP_LAMBDAK0 data.

Definition at line 415 of file parametrizations_data.h.

◆ PIMINUSP_SIGMAMINUSKPLUS_P_LAB

const std::initializer_list<double> smash::PIMINUSP_SIGMAMINUSKPLUS_P_LAB
Initial value:
= {
1.091, 1.128, 1.17, 1.22, 1.235, 1.284, 1.326, 1.5, 1.59,
1.615, 1.69, 1.69, 1.85, 1.94, 1.95, 1.98, 2.05, 2.14,
2.15, 2.25, 2.35, 2.494, 2.61, 2.7, 2.75, 2.86, 3.,
3.01, 3.13, 3.21, 3.89, 3.95, 4., 4.16}

PDG data on pi- p to Sigma- K+ cross section: momentum in lab frame.

Definition at line 418 of file parametrizations_data.h.

◆ PIMINUSP_SIGMAMINUSKPLUS_SIG

const std::initializer_list<double> smash::PIMINUSP_SIGMAMINUSKPLUS_SIG
Initial value:
= {
0.25, 0.218, 0.231, 0.27, 0.235, 0.209, 0.245, 0.242, 0.262,
0.18, 0.153, 0.19, 0.099, 0.098, 0.099, 0.09, 0.087, 0.069,
0.065, 0.057, 0.053, 0.051, 0.03, 0.031, 0.032, 0.022, 0.015,
0.022, 0.0155, 0.0145, 0.0085, 0.0096, 0.005, 0.0045}

PDG data on pi- p to Sigma- K+ cross section: cross section.

Definition at line 425 of file parametrizations_data.h.

◆ piminusp_sigmaminuskplus_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::piminusp_sigmaminuskplus_interpolation = nullptr
static

An interpolation that gets lazily filled using the PIMINUSP_SIGMAMINUSKPLUS data.

Definition at line 436 of file parametrizations_data.h.

◆ PIMINUSP_SIGMA0K0_RES_SQRTS

const std::initializer_list<double> smash::PIMINUSP_SIGMA0K0_RES_SQRTS
Initial value:
= {
1.5, 1.516, 1.532, 1.548, 1.564, 1.58, 1.596, 1.612, 1.628, 1.644, 1.66,
1.676, 1.692, 1.708, 1.724, 1.74, 1.756, 1.772, 1.788, 1.804, 1.82, 1.836,
1.852, 1.868, 1.884, 1.9, 1.916, 1.932, 1.948, 1.964, 1.98, 1.996, 2.012,
2.028, 2.044, 2.06, 2.076, 2.092, 2.108, 2.124, 2.14, 2.156, 2.172, 2.188,
2.204, 2.22, 2.236, 2.252, 2.268, 2.284, 2.3, 2.316, 2.332, 2.348, 2.364,
2.38, 2.396, 2.412, 2.428, 2.444, 2.46, 2.476, 2.492, 2.508, 2.524, 2.54,
2.556, 2.572, 2.588, 2.604, 2.62, 2.636, 2.652, 2.668, 2.684, 2.7, 2.716,
2.732, 2.748, 2.764, 2.78, 2.796, 2.812, 2.828, 2.844, 2.86, 2.876, 2.892,
2.908, 2.924, 2.94, 2.956, 2.972, 2.988, 3.004, 3.02, 3.036, 3.052, 3.068,
3.084, 3.1, 3.116, 3.132, 3.148, 3.164, 3.18}

pi- p to Sigma0 K0 cross section: square root s

Definition at line 439 of file parametrizations_data.h.

◆ PIMINUSP_SIGMA0K0_RES_SIG

const std::initializer_list<double> smash::PIMINUSP_SIGMA0K0_RES_SIG
Initial value:
= {
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0.0386981, 0.09589789, 0.11956695, 0.11685363, 0.12053117, 0.13208736,
0.14949223, 0.16688579, 0.18830654, 0.20611132, 0.22231072, 0.23099061,
0.23734563, 0.23334048, 0.22794051, 0.21559531, 0.20134617, 0.18763246,
0.1723282, 0.15814744, 0.14757816, 0.13750278, 0.12698656, 0.11719809,
0.11024985, 0.1044732, 0.09623321, 0.09092108, 0.08670191, 0.08147493,
0.0772165, 0.07346243, 0.0719974, 0.06805902, 0.06496733, 0.06264939,
0.05904799, 0.05762721, 0.05588871, 0.05393479, 0.0517673, 0.05165839,
0.05087591, 0.04885535, 0.04730724, 0.04651682, 0.04604065, 0.04529776,
0.04406593, 0.04367817, 0.04230014, 0.04144308, 0.04171145, 0.04073006,
0.03996921, 0.03902337, 0.03939531, 0.03895125, 0.03904553, 0.03816119,
0.03772662, 0.03710955, 0.0361001, 0.03632378, 0.03549849, 0.03549987,
0.03527251, 0.034535, 0.03314715, 0.0335742, 0.03326698, 0.0330181,
0.0324203, 0.03227253, 0.0315376, 0.03065083, 0.03041305, 0.03023753,
0.03008669, 0.02900321, 0.02827017, 0.02805024, 0.02785525, 0.02753706,
0.02692862, 0.02603758, 0.02591122, 0.02537291, 0.02467199, 0.02466657,
0.02370074, 0.02353027, 0.02362089, 0.0230085}

pi- p to Sigma0 K0 cross section: cross section

The experimental data is missing, so the cross section is obtained by running the simulation, and purely contributed by the resonances

Definition at line 457 of file parametrizations_data.h.

◆ piminusp_sigma0k0_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::piminusp_sigma0k0_interpolation = nullptr
static

An interpolation that gets lazily filled using the PIMINUSP_SIGMA0K0_RES data.

Definition at line 482 of file parametrizations_data.h.

◆ PIMINUSP_RES_SQRTS

const std::initializer_list<double> smash::PIMINUSP_RES_SQRTS

Center-of-mass energy.

Definition at line 485 of file parametrizations_data.h.

◆ PIMINUSP_RES_SIG

const std::initializer_list<double> smash::PIMINUSP_RES_SIG

Elastic π⁻N⁺ cross section contributions from decays.

These need to be subtracted from the interpolation of the PDG data on elastic cross sections. This data was generated using the SMASH analysis suite and should be updated when strange resonances are changed or added.

Definition at line 560 of file parametrizations_data.h.

◆ piminusp_elastic_res_interpolation

std::unique_ptr<InterpolateDataSpline> smash::piminusp_elastic_res_interpolation = nullptr
static

An interpolation that gets lazily filled using the PIMINUSP_RES data.

Definition at line 633 of file parametrizations_data.h.

◆ PIPLUSP_ELASTIC_P_LAB

const std::initializer_list<double> smash::PIPLUSP_ELASTIC_P_LAB
Initial value:
= {
0.09875, 0.13984, 0.14956, 0.33138, 0.378, 0.408, 0.4093, 0.427,
0.42736, 0.453, 0.471, 0.49008, 0.509, 0.5214, 0.53155, 0.547,
0.57281, 0.574, 0.586, 0.5891, 0.59, 0.591, 0.6139, 0.625,
0.625, 0.635, 0.645, 0.645, 0.657, 0.65793, 0.6753, 0.687,
0.698, 0.7, 0.70692, 0.725, 0.72628, 0.72628, 0.752, 0.752,
0.77714, 0.807, 0.809, 0.82, 0.82586, 0.85, 0.895, 0.895,
0.9, 0.91, 0.93926, 0.945, 0.945, 0.995, 0.995, 1.0029,
1.02, 1.04, 1.04, 1.0402, 1.05, 1.12091, 1.12091, 1.195,
1.207, 1.2217, 1.232, 1.375, 1.3925, 1.44384, 1.46, 1.493,
1.5, 1.53, 1.585, 1.585, 1.6, 1.68881, 1.69, 1.77,
1.8, 1.869, 1.9, 1.99, 2., 2.0199, 2.07, 2.077,
2.11, 2.19, 2.3, 2.35, 2.5, 2.77, 2.9, 3.,
3.05, 3.56, 3.63, 3.65, 3.67, 3.9, 4., 5.,
5., 6., 6.8001, 8., 8.04, 8.8, 10.8, 11.7,
12.8, 14.8, 16., 16.2, 16.7, 29., 32.1, 43.,
50., 60., 70., 100., 140., 147., 175., 200.,
250.}

PDG data on pi+ p elastic cross section: momentum in lab frame.

Definition at line 636 of file parametrizations_data.h.

◆ PIPLUSP_ELASTIC_SIG

const std::initializer_list<double> smash::PIPLUSP_ELASTIC_SIG
Initial value:
= {
6.15, 15.8, 20.4, 140.9, 91.6, 71.6, 67.5, 57.3, 60.19, 46.6, 40.8,
38.74, 30.6, 29.6, 30.59, 24.74, 24.31, 28.16, 19.83, 20.4, 20.64, 20.63,
19.55, 15.75, 18.5, 17.2, 14.85, 16.16, 14.71, 15.32, 14.38, 12.2, 12.93,
12.96, 12.17, 11.6, 11.06, 11.5, 10.62, 10.55, 8.82, 9.36, 8.97, 9.1,
8.02, 8.38, 8.37, 8.14, 11.1, 9.3, 11., 10.32, 9.87, 11.7, 11.15,
12.05, 11.1, 12.37, 11.83, 10.3, 12.8, 14.54, 15.3, 14.3, 13.59, 12.6,
12.3, 17.87, 16.5, 19.31, 18.73, 16.68, 13.8, 15.86, 16.7, 16.7, 15.05,
13.04, 13.57, 12.46, 12.3, 11.81, 10.9, 9.84, 10.6, 9.1, 9.52, 9.46,
9.44, 9.15, 8.45, 10.2, 6.9, 7.7, 8.3, 7.84, 7.02, 6.93, 7.07,
6.88, 7.15, 6.5, 6.4, 5.85, 5.79, 5.33, 5.47, 4.9, 4.9, 5.02,
4.75, 4.2, 4.54, 4.46, 4.21, 4.21, 3.98, 3.19, 3.37, 3.16, 3.29,
3.1, 3.35, 3.3, 3.39, 3.24, 3.37, 3.17, 3.3}

PDG data on pi+ p elastic cross section: cross section.

Definition at line 656 of file parametrizations_data.h.

◆ piplusp_elastic_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::piplusp_elastic_interpolation = nullptr
static

An interpolation that gets lazily filled using the PIPLUSP_ELASTIC_SIG data.

Definition at line 672 of file parametrizations_data.h.

◆ PIPLUSP_SIGMAPLUSKPLUS_P_LAB

const std::initializer_list<double> smash::PIPLUSP_SIGMAPLUSKPLUS_P_LAB
Initial value:
= {
1.041, 1.105, 1.111, 1.15, 1.157, 1.17, 1.195, 1.206, 1.218, 1.222, 1.265,
1.28, 1.282, 1.328, 1.34, 1.377, 1.39, 1.41, 1.419, 1.43, 1.456, 1.49,
1.508, 1.518, 1.549, 1.55, 1.58, 1.582, 1.614, 1.63, 1.68, 1.687, 1.7,
1.712, 1.76, 1.77, 1.775, 1.808, 1.84, 1.879, 1.906, 1.95, 1.971, 1.997,
2.067, 2.08, 2.099, 2.152, 2.197, 2.241, 2.291, 2.344, 2.379, 2.437, 2.473,
2.77, 3.23, 3.71, 4., 5., 5.5, 7., 10.3, 12., 16.}

PDG data on pi+ p to Sigma+ K+ cross section: momentum in lab frame.

Definition at line 675 of file parametrizations_data.h.

◆ PIPLUSP_SIGMAPLUSKPLUS_SIG

const std::initializer_list<double> smash::PIPLUSP_SIGMAPLUSKPLUS_SIG
Initial value:
= {
0.034, 0.146, 0.144, 0.214, 0.248, 0.205, 0.24, 0.214, 0.242, 0.25,
0.278, 0.34, 0.369, 0.412, 0.4, 0.467, 0.44, 0.49, 0.523, 0.51,
0.662, 0.529, 0.692, 0.545, 0.604, 0.53, 0.53, 0.465, 0.494, 0.47,
0.505, 0.434, 0.47, 0.436, 0.38, 0.415, 0.418, 0.393, 0.405, 0.332,
0.37, 0.31, 0.338, 0.298, 0.3, 0.29, 0.28, 0.273, 0.26, 0.25,
0.23, 0.242, 0.22, 0.217, 0.234, 0.165, 0.168, 0.104, 0.059, 0.059,
0.0297, 0.0371, 0.02, 0.0202, 0.0143}

PDG data on pi+ p to Sigma+ K+ section: cross section.

Definition at line 684 of file parametrizations_data.h.

◆ piplusp_sigmapluskplus_interpolation

std::unique_ptr<InterpolateDataLinear<double> > smash::piplusp_sigmapluskplus_interpolation = nullptr
static

An interpolation that gets lazily filled using the PIPLUSP_SIGMAPLUSKPLUS_SIG data.

Definition at line 698 of file parametrizations_data.h.

◆ PIPLUSP_RES_SQRTS

const std::initializer_list<double> smash::PIPLUSP_RES_SQRTS

Center-of-mass energy.

Definition at line 701 of file parametrizations_data.h.

◆ PIPLUSP_RES_SIG

const std::initializer_list<double> smash::PIPLUSP_RES_SIG

Elastic π⁺N⁺ cross section contributions from decays.

These need to be subtracted from the interpolation of the PDG data on elastic cross sections. This data was generated using the SMASH analysis suite and should be updated when strange resonances are changed or added.

Definition at line 757 of file parametrizations_data.h.

◆ piplusp_elastic_res_interpolation

std::unique_ptr<InterpolateDataSpline> smash::piplusp_elastic_res_interpolation = nullptr
static

A null interpolation that gets filled using the PIPLUSP_RES data.

Definition at line 819 of file parametrizations_data.h.

◆ UB_lat_pointer

RectangularLattice< FourVector > * smash::UB_lat_pointer = nullptr

Pointer to the skyrme potential on the lattice.

Definition at line 15 of file potential_globals.cc.

◆ UI3_lat_pointer

RectangularLattice< FourVector > * smash::UI3_lat_pointer = nullptr

Pointer to the symmmetry potential on the lattice.

Definition at line 16 of file potential_globals.cc.

◆ pot_pointer

Potentials * smash::pot_pointer = nullptr

Pointer to a Potential class.

Definition at line 17 of file potential_globals.cc.

◆ LPythia

constexpr int smash::LPythia = LogArea::Pythia::id
staticconstexpr

Definition at line 26 of file stringprocess.h.

◆ LPauliBlocking [1/2]

constexpr int smash::LPauliBlocking = LogArea::PauliBlocking::id
staticconstexpr

Definition at line 26 of file action.cc.

◆ HyperSurfaceCrossing

constexpr int smash::HyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
staticconstexpr

Definition at line 22 of file binaryoutput.cc.

◆ LBox

constexpr int smash::LBox = LogArea::Box::id
staticconstexpr

Definition at line 28 of file boxmodus.cc.

◆ LScatterAction [1/4]

constexpr int smash::LScatterAction = LogArea::ScatterAction::id
staticconstexpr

Definition at line 16 of file bremsstrahlungaction.cc.

◆ LResonances [1/3]

constexpr int smash::LResonances = LogArea::Resonances::id
staticconstexpr

Definition at line 16 of file clebschgordan.cc.

◆ LCollider [1/2]

constexpr int smash::LCollider = LogArea::Collider::id
staticconstexpr

Definition at line 30 of file collidermodus.cc.

◆ LCrossSections

constexpr int smash::LCrossSections = LogArea::CrossSections::id
staticconstexpr

Definition at line 19 of file crosssections.cc.

◆ LScatterAction [2/4]

constexpr int smash::LScatterAction = LogArea::ScatterAction::id
staticconstexpr

Definition at line 20 of file crosssections.cc.

◆ LCollider [2/2]

constexpr int smash::LCollider = LogArea::Collider::id
staticconstexpr

Definition at line 19 of file customnucleus.cc.

◆ LDecayModes [1/2]

constexpr int smash::LDecayModes = LogArea::DecayModes::id
staticconstexpr

Definition at line 17 of file decayaction.cc.

◆ LDecayModes [2/2]

constexpr int smash::LDecayModes = LogArea::DecayModes::id
staticconstexpr

Definition at line 23 of file decaymodes.cc.

◆ all_decay_types

std::vector<DecayTypePtr>* smash::all_decay_types = nullptr

Global pointer to the decay types list.

Definition at line 28 of file decaymodes.cc.

◆ num_tab_pts

constexpr size_t smash::num_tab_pts = 200
constexpr

Number of tabulation points.

Definition at line 143 of file decaytype.cc.

◆ integrate [1/2]

Integrator smash::integrate
static

Definition at line 144 of file decaytype.cc.

◆ integrate2d [1/2]

Integrator2d smash::integrate2d(1E7) ( 1E7  )
static

◆ LDistributions

constexpr int smash::LDistributions = LogArea::Distributions::id
staticconstexpr

Definition at line 21 of file distributions.cc.

◆ LTmn

constexpr int smash::LTmn = LogArea::Tmn::id
staticconstexpr

Definition at line 21 of file energymomentumtensor.cc.

◆ LFpe

constexpr int smash::LFpe = LogArea::Fpe::id
staticconstexpr

Definition at line 21 of file fpenvironment.cc.

◆ LGrandcanThermalizer [1/2]

constexpr int smash::LGrandcanThermalizer = LogArea::GrandcanThermalizer::id
staticconstexpr

Definition at line 21 of file grandcan_thermalizer.cc.

◆ LGrid

constexpr int smash::LGrid = LogArea::Grid::id
staticconstexpr

Definition at line 66 of file grid.cc.

◆ ZERO

const std::initializer_list<GridBase::SizeType> smash::ZERO {0}
static

Definition at line 260 of file grid.cc.

◆ ZERO_ONE

const std::initializer_list<GridBase::SizeType> smash::ZERO_ONE {0, 1}
static

Definition at line 261 of file grid.cc.

◆ MINUS_ONE_ZERO

const std::initializer_list<GridBase::SizeType> smash::MINUS_ONE_ZERO {-1, 0}
static

Definition at line 262 of file grid.cc.

◆ MINUS_ONE_ZERO_ONE

const std::initializer_list<GridBase::SizeType> smash::MINUS_ONE_ZERO_ONE
static
Initial value:
{-1, 0,
1}

Definition at line 263 of file grid.cc.

◆ LResonances [2/3]

constexpr int smash::LResonances = LogArea::Resonances::id
staticconstexpr

Definition at line 26 of file hadgas_eos.cc.

◆ LHyperSurfaceCrossing [1/4]

constexpr int smash::LHyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
staticconstexpr

Definition at line 16 of file hypersurfacecrossingaction.cc.

◆ LHyperSurfaceCrossing [2/4]

constexpr int smash::LHyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
staticconstexpr

Definition at line 19 of file icoutput.cc.

◆ LInputParser

constexpr int smash::LInputParser = LogArea::InputParser::id
staticconstexpr

Definition at line 19 of file inputfunctions.cc.

◆ LParticleType [1/2]

constexpr int smash::LParticleType = LogArea::ParticleType::id
staticconstexpr

Definition at line 18 of file isoparticletype.cc.

◆ iso_type_list

IsoParticleTypeList smash::iso_type_list
static

Definition at line 20 of file isoparticletype.cc.

◆ iso_baryon_resonances

std::vector<const IsoParticleType *> smash::iso_baryon_resonances
static

Definition at line 21 of file isoparticletype.cc.

◆ integrate [2/2]

Integrator smash::integrate
static

Definition at line 182 of file isoparticletype.cc.

◆ integrate2d [2/2]

Integrator2d smash::integrate2d
static

Definition at line 183 of file isoparticletype.cc.

◆ NR_tabulations

std::unordered_map<std::string, Tabulation> smash::NR_tabulations
static

Tabulation of all N R integrals.

Keys are the multiplet names (which are unique).

Definition at line 190 of file isoparticletype.cc.

◆ piR_tabulations

std::unordered_map<std::string, Tabulation> smash::piR_tabulations
static

Tabulation of all pi R integrals.

Keys are the multiplet names (which are unique).

Definition at line 197 of file isoparticletype.cc.

◆ RK_tabulations

std::unordered_map<std::string, Tabulation> smash::RK_tabulations
static

Tabulation of all K R integrals.

Keys are the multiplet names (which are unique).

Definition at line 204 of file isoparticletype.cc.

◆ DeltaR_tabulations

std::unordered_map<std::string, Tabulation> smash::DeltaR_tabulations
static

Tabulation of all Delta R integrals.

Keys are the pairs of multiplet names (which are unique).

Definition at line 211 of file isoparticletype.cc.

◆ rhoR_tabulations

std::unordered_map<std::string, Tabulation> smash::rhoR_tabulations
static

Tabulation of all rho rho integrals.

Keys are the pairs of multiplet names (which are unique).

Definition at line 218 of file isoparticletype.cc.

◆ LList

constexpr int smash::LList = LogArea::List::id
staticconstexpr

Definition at line 37 of file listmodus.cc.

◆ global_default_loglevel

einhard::LogLevel smash::global_default_loglevel = einhard::ALL
static

The default logging level is ALL.

Definition at line 20 of file logging.cc.

◆ LNucleus

constexpr int smash::LNucleus = LogArea::Nucleus::id
staticconstexpr

Definition at line 23 of file nucleus.cc.

◆ LHyperSurfaceCrossing [3/4]

constexpr int smash::LHyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
staticconstexpr

Definition at line 23 of file oscaroutput.cc.

◆ LParticleType [2/2]

constexpr int smash::LParticleType = LogArea::ParticleType::id
staticconstexpr

Definition at line 31 of file particletype.cc.

◆ LResonances [3/3]

constexpr int smash::LResonances = LogArea::Resonances::id
staticconstexpr

Definition at line 32 of file particletype.cc.

◆ LPauliBlocking [2/2]

constexpr int smash::LPauliBlocking = LogArea::PauliBlocking::id
staticconstexpr

Definition at line 15 of file pauliblocking.cc.

◆ LPropagation

constexpr int smash::LPropagation = LogArea::Propagation::id
staticconstexpr

Definition at line 19 of file propagation.cc.

◆ LGrandcanThermalizer [2/2]

constexpr int smash::LGrandcanThermalizer = LogArea::GrandcanThermalizer::id
staticconstexpr

Definition at line 15 of file random.cc.

◆ LHyperSurfaceCrossing [4/4]

constexpr int smash::LHyperSurfaceCrossing = LogArea::HyperSurfaceCrossing::id
staticconstexpr

Definition at line 19 of file rootoutput.cc.

◆ LScatterAction [3/4]

constexpr int smash::LScatterAction = LogArea::ScatterAction::id
staticconstexpr

Definition at line 27 of file scatteraction.cc.

◆ LScatterActionMulti

constexpr int smash::LScatterActionMulti = LogArea::ScatterActionMulti::id
staticconstexpr

Definition at line 18 of file scatteractionmulti.cc.

◆ LScatterAction [4/4]

constexpr int smash::LScatterAction = LogArea::ScatterAction::id
staticconstexpr

Definition at line 25 of file scatteractionphoton.cc.

◆ LFindScatter

constexpr int smash::LFindScatter = LogArea::FindScatter::id
staticconstexpr

Definition at line 26 of file scatteractionsfinder.cc.

◆ LSphere

constexpr int smash::LSphere = LogArea::Sphere::id
staticconstexpr

Definition at line 33 of file spheremodus.cc.

◆ LOutput [2/2]

constexpr int smash::LOutput = LogArea::Output::id
staticconstexpr

Definition at line 19 of file stringprocess.cc.