10 #ifndef SRC_TESTS_SETUP_H_
11 #define SRC_TESTS_SETUP_H_
39 #include <particles.txt.h>
51 #include <decaymodes.txt.h>
68 "# NAME MASS[GEV] WIDTH[GEV] PARITY PDG\n"
80 "# NAME MASS[GEV] WIDTH[GEV] PARITY PDG\n"
108 p.set_4position(position);
117 p.set_4momentum(momentum);
127 p.set_4position(position);
128 p.set_4momentum(momentum);
141 p.set_4position(position);
142 p.set_4momentum(momentum);
153 {random_value(), random_value(), random_value(), random_value()});
155 {random_value(), random_value(), random_value()});
169 template <
typename G>
173 for (
auto i =
n; i; --i) {
174 list.emplace_back(generator());
186 template <
typename G>
189 for (
auto i =
n; i; --i) {
190 p->insert(generator());
200 const std::initializer_list<ParticleData> &init) {
202 for (
const auto &data : init) {
226 int testparticles = 1,
double dt = 0.1,
229 std::make_unique<UniformClock>(0., dt, 300.0),
230 std::make_unique<UniformClock>(0., 1., 300.0),
268 double elastic_parameter = 10,
271 bool strings_switch =
true,
bool use_AQM =
false,
272 bool strings_with_probability =
false,
276 return {elastic_parameter,
290 strings_with_probability,
292 default_transition_params,
299 bool empty_event =
false) {
300 return EventInfo{impact_parameter, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1,
306 return std::make_unique<StringProcess>(
Interface to the SMASH configuration files.
static void load_decaymodes(const std::string &input)
Loads the DecayModes map as described in the input string.
static std::unique_ptr< ExperimentBase > create(Configuration &config, const std::filesystem::path &output_path)
Factory method that creates and initializes a new Experiment<Modus>.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
FourVector()
default constructor nulls the fourvector components
ParticleData contains the dynamic information of a certain particle.
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
static void create_type_list(const std::string &particles)
Initialize the global ParticleType list (list_all) from the given input data.
std::bitset< 10 > ReactionsBitSet
Container for the 2 to 2 reactions in the code.
NNbarTreatment
Treatment of N Nbar Annihilation.
@ NoAnnihilation
No Annihilation.
TotalCrossSectionStrategy
Determine how total cross sections for collision finding should be computed.
@ BottomUp
Sum the existing partial contributions.
std::bitset< 4 > MultiParticleReactionsBitSet
Container for the n to m reactions in the code.
CollisionCriterion
Criteria used to check collisions.
@ Geometric
Geometric criterion.
@ None
No pseudo-resonance is created.
ParticleList create_particle_list(std::size_t n, G &&generator)
Generate a list of particles from the given generator function.
static constexpr double smashon_mass
The mass of the smashon particle.
void create_actual_particletypes()
Creates the ParticleType list containing the actual particles that SMASH uses.
static constexpr const char smashon_pdg_string[]
The PDG code of the smashon particle.
ParticlesPtr create_particles(int n, G &&generator)
Creates a Particles object and fills it with n particles generated by the generator function.
std::unique_ptr< StringProcess > default_string_process_interface()
Creates a default StringProcessInterface object for testing.
static constexpr double smashon_width
The decay width of the smashon particle.
void create_actual_decaymodes()
Creates the DecayModes list containing the actual decay modes that SMASH uses.
std::unique_ptr< Particles > ParticlesPtr
A type alias for a unique_ptr of Particles.
std::unique_ptr< ExperimentBase > experiment(Configuration c)
Create an experiment given an input configuration.
ExperimentParameters default_parameters(int testparticles=1, double dt=0.1, CollisionCriterion crit=CollisionCriterion::Geometric)
Creates a standard ExperimentParameters object which works for almost all testing purposes.
void create_smashon_particletypes()
Creates a ParticleType list containing only the smashon test particle.
ParticleData smashon(int id=-1)
Create a particle with 0 position and momentum vectors and optionally a given id.
MultiParticleReactionsBitSet no_multiparticle_reactions()
returns BitSet for multi-particle reactions, where everything is off
ScatterActionsFinderParameters default_finder_parameters(double elastic_parameter=10, NNbarTreatment nnbar_treatment=NNbarTreatment::NoAnnihilation, ReactionsBitSet included_2to2=all_reactions_included(), bool strings_switch=true, bool use_AQM=false, bool strings_with_probability=false, TotalCrossSectionStrategy xs_strategy=TotalCrossSectionStrategy::BottomUp)
Creates a standard ScatterActionsFinderParameters object which works for almost all testing purposes.
EventInfo default_event_info(double impact_parameter=0.0, bool empty_event=false)
Creates default EventInfo object for testing purposes.
void create_stable_smashon_particletypes()
Creates a ParticleType list containing only the smashon test particle with width 0 (stable).
ParticleData smashon_random(int id=-1)
Create a particle with random position and momentum vectors and optionally a given id.
ReactionsBitSet all_reactions_included()
returns BitSet of 2->2 reactions, where everything is on
uniform_dist< T > make_uniform_distribution(T min, T max)
Structure to contain custom data for output.
Helper structure for Experiment.
Helper structure for ScatterActionsFinder.
Constants related to transition between low and high collision energies.
A FourVector that is marked as a momentum vector.
A FourVector that is marked as a position vector.