Version: SMASH-3.4
forwarddeclarations.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2014-2026
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_FORWARDDECLARATIONS_H_
11 #define SRC_INCLUDE_SMASH_FORWARDDECLARATIONS_H_
12 
13 /// @cond
14 // exclude most content here from documentation
15 
16 #include <bitset>
17 #include <iosfwd>
18 #include <memory>
19 #include <vector>
20 
21 namespace smash {
22 
23 class Action;
24 class ScatterAction;
25 class ScatterActionMulti;
26 class BoxModus;
27 class Clock;
28 class CollisionBranch;
29 class Configuration;
30 class CrossSections;
31 class DecayBranch;
32 class DecayModes;
33 class DecayType;
34 class ExperimentBase;
35 class FourVector;
36 class IsoParticleType;
37 template <typename T>
38 class Key;
39 class ModusDefault;
40 class OutputInterface;
41 class ParticleData;
42 class Particles;
43 class ParticleType;
44 class ParticleTypePtr;
45 class PdgCode;
46 class ScatterActionsFinderParameters;
47 class Tabulation;
48 class ThreeVector;
49 
50 struct ExperimentParameters;
51 struct InitialConditionParameters;
52 struct StringTransitionParameters;
53 struct Nucleoncorr;
54 
55 /// @endcond
56 
57 /// The calculation frame
58 enum class CalculationFrame {
62 };
63 
64 /**
65  * Option to use form factors in dilepton bremsstrahlung as described in
66  * \iref{Shyam:2010vr}.
67  */
69  /// Don't use form factors, i.e. multiply by 1.
70  Off,
71  /// Photon couples to pion only via \f$\rho_0\f$ meson.
72  FF1,
73  /**
74  * Photon couples 40% directly to intrinsice quark structure of pion and
75  * 60% indirectly via \f$\rho_0\f$ meson.
76  */
77  FF2,
78 };
79 
80 /// Option to use Fermi Motion
81 enum class FermiMotion {
82  /// Don't use fermi motion.
83  Off,
84  /// Use fermi motion in combination with potentials.
85  On,
86  /// Use fermi motion without potentials.
87  Frozen,
88 };
89 
90 /// Possible methods of impact parameter sampling.
91 enum class Sampling {
92  /// Sample from uniform distribution.
93  Uniform,
94  /// Sample from areal / quadratic distribution.
95  Quadratic,
96  /// Sample from custom, user-defined distribution.
97  Custom,
98 };
99 
100 /// Modes of calculating the gradients
101 enum class DerivativesMode {
104  Off,
105 };
106 
107 /**
108  * This enum is here only to serve InputKeys class, but it is unused and
109  * referring to a removed SMASH input key.
110  */
112  On,
113  Off,
114 };
115 
116 /**
117  * Modes of calculating the field gradients: chain rule or direct. The modes
118  * only make sense for the VDF potentials.
119  */
121  ChainRule,
122  Direct,
123 };
124 
125 /// Modes of smearing
126 enum class SmearingMode {
128  Discrete,
129  Triangular,
130 };
131 
132 /// The time step mode.
133 enum class TimeStepMode : char {
134  /// Don't use time steps; propagate from action to action.
135  None,
136  /// Use fixed time step.
137  Fixed,
138 };
139 
140 /**
141  * Initial condition for a particle in a box.
142  *
143  * In all cases, the positions in space are chosen randomly.
144  */
146  /// A thermalized ensemble is generated, with momenta sampled from a
147  /// Maxwell-Boltzmann distribution
149  /// A thermalized ensemble is generated, with momenta of baryons(mesons)
150  /// sampled from a Fermi(Bose) distribution
152  /// All particles have the same momentum \f$p = 3 \cdot T\f$ with T being the
153  /// temperature.
155 };
156 
157 /// Initial condition for a particle in a sphere
159  /// A thermalized ensemble is generated, with momenta sampled from a
160  /// Maxwell-Boltzmann distribution
162  /// A thermalized ensemble is generated, with momenta of baryons(mesons)
163  /// sampled from a Fermi(Bose) distribution
165  /// Off-equilibrium distribution used in massless comparisons of SMASH to the
166  /// extended universe metric. See eq. (76) in \iref{Bazow:2016oky}
167  IC_ES,
168  /// Off-equilibrium distribution used in massless comparisons of SMASH to the
169  /// extended universe metric. See eq. (77) in \iref{Bazow:2016oky}
170  IC_1M,
171  /// Off-equilibrium distribution used in massless comparisons of SMASH to the
172  /// extended universe metric. See eq. (78) in \iref{Bazow:2016oky}
173  IC_2M,
174  /// A generalization of IC_ES for the non-zero mass case; note that there is
175  /// currently no analytical comparison possible with this distribution.
176  IC_Massive,
177 };
178 
179 /**
180  * Defines properties of expansion for the metric (e.g. FRW)
181  *
182  * If anything else than NoExpansion is used, then a non-zero
183  * Hubble parameter is computed and corrections are brought to the
184  * propagation of all particles according to selected expanding
185  * metric.
186  */
187 enum class ExpansionMode {
188  NoExpansion,
189  MasslessFRW,
190  MassiveFRW,
191  Exponential,
192 };
193 
194 /// Treatment of N Nbar Annihilation
195 enum class NNbarTreatment {
196  /// No Annihilation
198  /// Use intermediate Resonances
199  Resonances,
200  /// Directly create 5 pions, use with multi-particle reactions
201  TwoToFive,
202  /// Use string fragmentation
203  Strings,
204 };
205 
206 /**
207  * Represents thermodynamic quantities that can be printed out
208  * \see_key{key_output_thermo_type_}
209  */
210 enum class ThermodynamicQuantity : char {
211  /// Density in the Eckart frame
213  /// Energy-momentum tensor in lab frame
214  Tmn,
215  /// Energy-momentum tensor in Landau rest frame
216  TmnLandau,
217  /// Velocity of the Landau rest frame
219  /// Electric (Q), baryonic (B) and strange (S) currents
220  j_QBS
221 };
222 
223 /// Criteria used to check collisions
224 enum class CollisionCriterion {
225  /// Geometric criterion.
226  Geometric,
227  /// Stochastic Criteiron.
228  Stochastic,
229  /// Covariant Criterion
230  Covariant
231 };
232 
233 /// Whether and when only final state particles should be printed.
234 enum class OutputOnlyFinal {
235  /// Print only final-state particles.
236  Yes,
237  /// Print initial, intermediate and final-state particles.
238  No,
239  /// Print only final-state particles, and those only if the event is not
240  /// empty.
241  IfNotEmpty,
242 };
243 
244 /// The different groups of 2 to 2 reactions that one can include
245 // Because std::bitset does not handle enum classes, this is a simple enum.
247  All = 50,
248  Elastic = 0,
249  NN_to_NR = 1,
250  NN_to_DR = 2,
251  KN_to_KN = 3,
254  NNbar = 6,
259 };
260 
261 /**
262  * Container for the 2 to 2 reactions in the code
263  *
264  * @attention Two `typedef`s naming the same type are not distinct types. Hence,
265  * if two bitsets have an identical length N of bits (\c std::bitset<N>), the
266  * types are exactly the same. The compiler will e.g. reject ambiguous
267  * overloads; therefore, developers should ensure that multiple bitsets are not
268  * set to the same length.
269  */
270 typedef std::bitset<11> ReactionsBitSet;
271 
272 /// The different groups of multi-particle reactions that one can include
273 // Because std::bitset does not handle enum classes, this is a simple enum.
279 };
280 
281 /**
282  * Container for the n to m reactions in the code
283  *
284  * @attention See remark in \ref ReactionsBitSet
285  */
286 typedef std::bitset<4> MultiParticleReactionsBitSet;
287 
288 /// Possible charm scattering options
289 enum class CharmRescattering {
290  /// Disable charm interactions
291  None,
292  /// Charm interactions via resonances
293  Resonances,
294  /// Charm interactions via T-matrix approach
295  T_Matrix,
296 };
297 
298 /// Possible spin interaction types
300  /// All spin interactions
301  On,
302  /// No spin interactions
303  Off
304 };
305 
306 /**
307  * Defines the algorithm used for the forced thermalization.
308  * For the description of algorithms see \iref{Oliinychenko:2016vkg}.
309  * All of them intend to conserve the net baryon number, strangeness
310  * and electric charge, as well as energy. Mode sampling is the fastest,
311  * but least theoretically robust, unbiased BF is the slowest
312  * (even hangs completely from time to time), but it is also the most
313  * theoretically robust.
314  */
316  ModeSampling,
317  BiasedBF,
318  UnbiasedBF,
319 };
320 
321 /// Defines how the number of events is determined.
322 enum class EventCounting {
323  /// The desired number of events is simulated disregarding of whether an
324  /// interaction took place.
325  FixedNumber,
326  /// Events are simulated until there are at least a given number of ensembles
327  /// in which an interaction took place
329  /// Unused, only in the code for internal logic
330  Invalid,
331 };
332 
333 /// Determine how total cross sections for collision finding should be computed.
335  /// Sum the existing partial contributions
336  BottomUp,
337  /// Use parametrizations based on existing data, rescaling with AQM for
338  /// unmeasured processes
339  TopDown,
340  /// Mix the two above, using the parametrizations only for measured processes,
341  /// and summing up partials for unmeasured interactions
343 };
344 
345 /**
346  * Select the model used for the transition from soft to hard string
347  * excitation.
348  */
350  /// Legacy exponential splitting based on the hard string cross section
351  Exponential,
352 
353  /// Smooth transition within a user-defined invariant energy range.
354  Custom_Range,
355 };
356 
357 /**
358  * Which pseudo-resonance fills the inelastic gap in the transition to string
359  * region of cross sections. \see_key{key_CT_pseudoresonance_}
360  */
361 enum class PseudoResonance {
362  /// No pseudo-resonance is created
363  None,
364  /// Resonance of largest mass for all processes
365  Largest,
366  /// Resonance with the pole mass closest from the invariant mass of incoming
367  /// particles for all processes
368  Closest,
369  /// Heaviest possible resonance from processes with at least one resonance in
370  /// the incoming particles
372  /// Closest resonance for a given mass from processes with at least one
373  /// resonance in the incoming particles
375 };
376 
377 /**
378  * Possible methods to convert SMASH particle into fluid cells.
379  * \see_key{key_MC_IC_type_}
380  */
381 enum class FluidizationType {
382  /// Hypersurface crossed at a fixed proper time
383  ConstantTau,
384  /// Dynamic fluidization based on local densities
385  Dynamic,
386 };
387 
388 /**
389  * The different processes from where fluidizable particles are produced.
390  * \see_key{key_MC_IC_fluidizable_processes}
391  */
392 // Because std::bitset does not handle enum classes, this is a simple enum.
399 };
400 
401 /// @attention See remark in \ref ReactionsBitSet
402 typedef std::bitset<5> FluidizableProcessesBitSet;
403 
404 /**
405  * Allows to choose which kind of density to calculate.
406  * The baryon density is necessary for the Skyrme potential.
407  * For the symmetry potential one needs to know the isospin density.
408  */
409 enum class DensityType {
410  None = 0,
411  Hadron = 1,
412  Baryon = 2,
413  BaryonicIsospin = 3,
414  Pion = 4,
415  Isospin3_tot = 5,
416  Charge = 6,
417  Strangeness = 7,
418 };
419 
420 /// Allows to specify the desired extrapolation type.
421 enum class ExtrapolationType {
422  /// No extrapolation is done.
423  None = -1,
424  /// Extrapolate with zero.
425  Zero = 0,
426  /// Extrapolate using a constant value.
427  Constant = 1,
428  /// Extrapolate using a linear approach.
429  Linear = 2,
430 };
431 
432 /// @cond
433 template <typename T>
434 using build_unique_ptr_ = std::unique_ptr<T, std::default_delete<T>>;
435 template <typename T>
436 using build_vector_ = std::vector<T, std::allocator<T>>;
437 
438 using ActionPtr = build_unique_ptr_<Action>;
439 using ScatterActionPtr = build_unique_ptr_<ScatterAction>;
440 using ScatterActionMultiPtr = build_unique_ptr_<ScatterActionMulti>;
441 using ActionList = build_vector_<ActionPtr>;
442 
443 using OutputPtr = build_unique_ptr_<OutputInterface>;
444 using OutputsList = build_vector_<OutputPtr>;
445 
446 using ParticleList = build_vector_<ParticleData>;
447 using ParticleTypeList = build_vector_<ParticleType>;
448 using ParticleTypePtrList = build_vector_<ParticleTypePtr>;
449 using IsoParticleTypeList = build_vector_<IsoParticleType>;
450 
451 template <typename T>
452 using ProcessBranchPtr = build_unique_ptr_<T>;
453 template <typename T>
454 using ProcessBranchList = build_vector_<ProcessBranchPtr<T>>;
455 using DecayBranchPtr = build_unique_ptr_<DecayBranch>;
456 using DecayBranchList = build_vector_<DecayBranchPtr>;
457 using CollisionBranchPtr = build_unique_ptr_<CollisionBranch>;
458 using CollisionBranchList = build_vector_<CollisionBranchPtr>;
459 
460 using TabulationPtr = build_unique_ptr_<Tabulation>;
461 using ExperimentPtr = build_unique_ptr_<ExperimentBase>;
462 using DecayTypePtr = build_unique_ptr_<DecayType>;
463 
464 /// @endcond
465 
466 } // namespace smash
467 
468 #endif // SRC_INCLUDE_SMASH_FORWARDDECLARATIONS_H_
SmearingMode
Modes of smearing.
DileptonBremsPionFormFactor
Option to use form factors in dilepton bremsstrahlung as described in Shyam:2010vr .
@ FF2
Photon couples 40% directly to intrinsice quark structure of pion and 60% indirectly via meson.
@ FF1
Photon couples to pion only via meson.
@ Off
Don't use form factors, i.e. multiply by 1.
FermiMotion
Option to use Fermi Motion.
@ On
Use fermi motion in combination with potentials.
@ Frozen
Use fermi motion without potentials.
ExtrapolationType
Allows to specify the desired extrapolation type.
@ Linear
Extrapolate using a linear approach.
@ Constant
Extrapolate using a constant value.
@ Zero
Extrapolate with zero.
ThermalizationAlgorithm
Defines the algorithm used for the forced thermalization.
FluidizationType
Possible methods to convert SMASH particle into fluid cells.
@ ConstantTau
Hypersurface crossed at a fixed proper time.
@ Dynamic
Dynamic fluidization based on local densities.
NNbarTreatment
Treatment of N Nbar Annihilation.
@ NoAnnihilation
No Annihilation.
@ TwoToFive
Directly create 5 pions, use with multi-particle reactions.
@ Resonances
Use intermediate Resonances.
@ Strings
Use string fragmentation.
RestFrameDensityDerivativesMode
This enum is here only to serve InputKeys class, but it is unused and referring to a removed SMASH in...
CharmRescattering
Possible charm scattering options.
@ T_Matrix
Charm interactions via T-matrix approach.
TimeStepMode
The time step mode.
@ Fixed
Use fixed time step.
@ None
Don't use time steps; propagate from action to action.
ThermodynamicQuantity
Represents thermodynamic quantities that can be printed out See user guide description for more infor...
@ EckartDensity
Density in the Eckart frame.
@ Tmn
Energy-momentum tensor in lab frame.
@ LandauVelocity
Velocity of the Landau rest frame.
@ j_QBS
Electric (Q), baryonic (B) and strange (S) currents.
@ TmnLandau
Energy-momentum tensor in Landau rest frame.
HardStringTransitionMode
Select the model used for the transition from soft to hard string excitation.
@ Custom_Range
Smooth transition within a user-defined invariant energy range.
std::bitset< 5 > FluidizableProcessesBitSet
TotalCrossSectionStrategy
Determine how total cross sections for collision finding should be computed.
@ TopDownMeasured
Mix the two above, using the parametrizations only for measured processes, and summing up partials fo...
@ TopDown
Use parametrizations based on existing data, rescaling with AQM for unmeasured processes.
@ BottomUp
Sum the existing partial contributions.
Sampling
Possible methods of impact parameter sampling.
@ Quadratic
Sample from areal / quadratic distribution.
@ Custom
Sample from custom, user-defined distribution.
@ Uniform
Sample from uniform distribution.
IncludedFluidizableProcesses
The different processes from where fluidizable particles are produced.
@ From_HardString
@ From_Inelastic
@ From_Elastic
@ From_SoftString
@ From_Decay
std::bitset< 4 > MultiParticleReactionsBitSet
Container for the n to m reactions in the code.
CalculationFrame
The calculation frame.
IncludedMultiParticleReactions
The different groups of multi-particle reactions that one can include.
@ NNbar_5to2
@ A3_Nuclei_4to2
@ Deuteron_3to2
@ Meson_3to1
DerivativesMode
Modes of calculating the gradients.
CollisionCriterion
Criteria used to check collisions.
@ Stochastic
Stochastic Criteiron.
@ Geometric
Geometric criterion.
@ Covariant
Covariant Criterion.
FieldDerivativesMode
Modes of calculating the field gradients: chain rule or direct.
SphereInitialCondition
Initial condition for a particle in a sphere.
@ IC_ES
Off-equilibrium distribution used in massless comparisons of SMASH to the extended universe metric.
@ IC_Massive
A generalization of IC_ES for the non-zero mass case; note that there is currently no analytical comp...
@ IC_2M
Off-equilibrium distribution used in massless comparisons of SMASH to the extended universe metric.
@ IC_1M
Off-equilibrium distribution used in massless comparisons of SMASH to the extended universe metric.
PseudoResonance
Which pseudo-resonance fills the inelastic gap in the transition to string region of cross sections.
@ Closest
Resonance with the pole mass closest from the invariant mass of incoming particles for all processes.
@ ClosestFromUnstable
Closest resonance for a given mass from processes with at least one resonance in the incoming particl...
@ LargestFromUnstable
Heaviest possible resonance from processes with at least one resonance in the incoming particles.
@ Largest
Resonance of largest mass for all processes.
EventCounting
Defines how the number of events is determined.
@ Invalid
Unused, only in the code for internal logic.
@ FixedNumber
The desired number of events is simulated disregarding of whether an interaction took place.
@ MinimumNonEmpty
Events are simulated until there are at least a given number of ensembles in which an interaction too...
IncludedReactions
The different groups of 2 to 2 reactions that one can include.
@ KN_to_KDelta
@ KN_to_KN
@ NN_to_NR
@ PiDeuteron_to_pidprime
@ NDeuteron_to_Ndprime
@ Strangeness_exchange
@ Charm_T_matrix
@ PiDeuteron_to_NN
@ NN_to_DR
std::bitset< 11 > ReactionsBitSet
Container for the 2 to 2 reactions in the code.
DensityType
Allows to choose which kind of density to calculate.
OutputOnlyFinal
Whether and when only final state particles should be printed.
@ IfNotEmpty
Print only final-state particles, and those only if the event is not empty.
@ Yes
Print only final-state particles.
@ No
Print initial, intermediate and final-state particles.
SpinInteractionType
Possible spin interaction types.
BoxInitialCondition
Initial condition for a particle in a box.
@ ThermalMomentaBoltzmann
A thermalized ensemble is generated, with momenta sampled from a Maxwell-Boltzmann distribution.
@ ThermalMomentaQuantum
A thermalized ensemble is generated, with momenta of baryons(mesons) sampled from a Fermi(Bose) distr...
@ PeakedMomenta
All particles have the same momentum with T being the temperature.
ExpansionMode
Defines properties of expansion for the metric (e.g.
Definition: action.h:24