7 #ifndef SRC_INCLUDE_SMASH_LISTMODUS_H_
8 #define SRC_INCLUDE_SMASH_LISTMODUS_H_
132 double x,
double y,
double z,
double mass,
double E,
133 double px,
double py,
double pz);
139 using std::runtime_error::runtime_error;
150 std::string particle_list_file_directory_inh) {
156 std::string particle_list_file_prefix_inh) {
178 std::streampos last_position);
188 std::filesystem::path
file_path_(
const int file_id);
290 const OutputsList &output_list = {});
294 const Particles &particles,
double min_cell_length,
296 const bool include_unformed_particles,
307 include_unformed_particles,
Interface to the SMASH configuration files.
ListBox: Provides a modus for running the SMASH Box with an external particle list,...
const int shift_id_
shift_id is the start number of file_id_
std::string particle_list_file_directory_
File directory of the 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.
int event_id_
event_id_ = the unique id of the current event
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)
std::string particle_list_file_prefix_
File prefix of the particle list.
int file_id_
file_id_ is the id of the current file
ListModus: Provides a modus for running SMASH on an external particle list, for example as an afterbu...
void set_particle_list_file_directory(std::string particle_list_file_directory_inh)
set the particle_list_directory when ListBoxModus is used
std::string current_particle_list_file_
File name of current file.
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.
void set_file_id(const double file_id_inh)
set the file id when ListBoxModus is used
std::string particle_list_file_directory_
File directory of the particle list.
std::string particle_list_file_prefix_
File prefix of the particle list.
int file_id_
file_id_ is the id of the current file
ListModus()
Construct an empty list. Useful for convenient JetScape connection.
double start_time_
Starting time for the List; changed to the earliest formation time.
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::filesystem::path file_path_(const int file_id)
Return the absolute file path based on given integer.
void set_particle_list_file_prefix(std::string particle_list_file_prefix_inh)
set the particle_list_prefix when ListBoxModus is used
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.
const int shift_id_
shift_id is the start number of file_id_
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_
event_id_ = the unique id of the current event
void set_event_id(int event_id_inh)
set the event_id when ListBoxModus is used
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.