7 #ifndef SRC_INCLUDE_SMASH_LISTMODUS_H_
8 #define SRC_INCLUDE_SMASH_LISTMODUS_H_
137 double x,
double y,
double z,
double mass,
double E,
138 double px,
double py,
double pz);
144 using std::runtime_error::runtime_error;
166 std::streampos last_position);
180 std::filesystem::path
file_path_(std::optional<int> file_id);
280 const OutputsList &output_list = {});
284 const Particles &particles,
double min_cell_length,
286 const bool include_unformed_particles,
297 include_unformed_particles,
Interface to the SMASH configuration files.
ListBox: Provides a modus for running the SMASH Box with an external particle list,...
Grid< GridOptions::PeriodicBoundaries > create_grid(const Particles &particles, double min_cell_length, double timestep_duration, CollisionCriterion crit, const bool include_unformed_particles, CellSizeStrategy strategy=CellSizeStrategy::Optimal) const
Creates the Grid with normal boundary conditions.
const double length_
Length of the cube's edge in fm.
bool is_box() const
in the case of the ListBoxModus is_box has to be true
int impose_boundary_conditions(Particles *particles, const OutputsList &output_list={})
Enforces that all particles are inside the box at the beginning of an event.
ListBoxModus(Configuration modus_config, const ExperimentParameters ¶meters)
Constructor (This is the same as for the ListModus)
ListModus: Provides a modus for running SMASH on an external particle list, for example as an afterbu...
void backpropagate_to_same_time(Particles &particles)
Judge whether formation times are the same for all the particles; Don't do anti-freestreaming if all ...
bool file_has_events_(std::filesystem::path filepath, std::streampos last_position)
Check if the file given by filepath has events left after streampos last_position.
std::optional< int > file_id_
The id of the current file.
std::string particle_list_filename_or_prefix_
Prefix of the file(s) containing the particle list.
std::filesystem::path file_path_(std::optional< int > file_id)
Return the absolute path of the data file.
std::string particle_list_file_directory_
File directory of the particle list.
double start_time_
Starting time for the List; changed to the earliest formation time.
ListModus()=default
Construct an empty list.
void try_create_particle(Particles &particles, PdgCode pdgcode, double t, double x, double y, double z, double mass, double E, double px, double py, double pz)
Tries to add a new particle to particles and performs consistency checks: (i) The PDG code is legal a...
std::streampos last_read_position_
Last read position in current file.
bool warn_about_mass_discrepancy_
Auxiliary flag to warn about mass-discrepancies only once per instance.
bool warn_about_off_shell_particles_
Auxiliary flag to warn about off-shell particles only once per instance.
std::string next_event_()
Read the next event.
double initial_conditions(Particles *particles, const ExperimentParameters ¶meters)
Generates initial state of the particles in the system according to a list.
int event_id_
The unique id of the current event.
Base class for Modus classes that provides default function implementations.
The Particles class abstracts the storage and manipulation of particles.
PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number.
CollisionCriterion
Criteria used to check collisions.
@ Stochastic
Stochastic Criteiron.
friend std::ostream & operator<<(std::ostream &, const ListModus &)
Writes the initial state for the List to the output stream.
CellNumberLimitation
Identifies whether the number of cells should be limited.
@ ParticleNumber
Limit the number of cells to the number of particles.
@ None
No cell number limitation.
CellSizeStrategy
Indentifies the strategy of determining the cell size.
@ Optimal
Look for optimal cell size.
Helper structure for Experiment.
Used when external particle list cannot be found.