Version: SMASH-3.1
smash::ListBoxModus Class Reference

#include <listmodus.h>

ListBox: Provides a modus for running the SMASH Box with an external particle list,.

To use this modus, choose Modus: ListBox

General:
Modus: ListBox

in the configuration file.

Options for ListBox go in the "Modi"→"ListBox" section of the configuration:

Modi:
ListBox:
# options here

The ListBoxModus inherits all functionality from the ListModus. For more detailed configuring see List.

Since SMASH is searching for collisions in computational frame time 't', all particles need to be at the same time. If this is not the case in the list provided, the particles will be propagated backwards on straight lines ("anti-freestreaming"). To avoid unphysical interactions of these particles, the back-propagated particles receive a formation_time and zero cross_section_scaling_factor. The cross-sections are set to zero during the time, where the particle will just propagate on a straight line again to appear at the formation_time into the system.

Definition at line 260 of file listmodus.h.

Inheritance diagram for smash::ListBoxModus:
smash::ListModus smash::ModusDefault

Public Member Functions

 ListBoxModus (Configuration modus_config, const ExperimentParameters &parameters)
 Constructor (This is the same as for the ListModus) More...
 
bool is_box () const
 in the case of the ListBoxModus is_box has to be true More...
 
int impose_boundary_conditions (Particles *particles, const OutputsList &output_list={})
 Enforces that all particles are inside the box at the beginning of an event. More...
 
Grid< GridOptions::PeriodicBoundariescreate_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. More...
 
- Public Member Functions inherited from smash::ListModus
 ListModus (Configuration modus_config, const ExperimentParameters &parameters)
 Constructor. More...
 
 ListModus ()=default
 Construct an empty list. More...
 
double initial_conditions (Particles *particles, const ExperimentParameters &parameters)
 Generates initial state of the particles in the system according to a list. More...
 
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 particles start already at the same time. More...
 
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 and exists in SMASH. More...
 
bool is_list () const
 
- Public Member Functions inherited from smash::ModusDefault
int impose_boundary_conditions (Particles *, const OutputsList &={})
 Enforces sensible positions for the particles. More...
 
bool is_collider () const
 
bool is_box () const
 
bool is_list () const
 
bool is_sphere () const
 
double sqrt_s_NN () const
 
double impact_parameter () const
 
void sample_impact () const
 sample impact parameter for collider modus More...
 
double velocity_projectile () const
 
double velocity_target () const
 
FermiMotion fermi_motion () const
 
double max_timestep (double) const
 
double equilibration_time () const
 
double length () const
 
double radius () const
 
bool calculation_frame_is_fixed_target () const
 
double nuclei_passing_time () const
 Get the passing time of the two nuclei in a collision. More...
 
Grid< GridOptions::Normalcreate_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. More...
 
std::unique_ptr< GrandCanThermalizercreate_grandcan_thermalizer (Configuration &conf) const
 Creates GrandCanThermalizer. More...
 

Private Attributes

const double length_
 Length of the cube's edge in fm. More...
 

Additional Inherited Members

- Protected Attributes inherited from smash::ListModus
double start_time_ = 0.
 Starting time for the List; changed to the earliest formation time. More...
 

Constructor & Destructor Documentation

◆ ListBoxModus()

smash::ListBoxModus::ListBoxModus ( Configuration  modus_config,
const ExperimentParameters parameters 
)
explicit

Constructor (This is the same as for the ListModus)

Gathers all configuration variables for the List.

Parameters
[in]modus_configThe configuration object that sets all initial conditions of the experiment.
[in]parametersUnused, but necessary because of templated initialization

Definition at line 274 of file listmodus.cc.

276  : ListModus(), length_(modus_config.take({"ListBox", "Length"})) {
277  /*
278  * ATTENTION: In a child class initialization list nothing can be done before
279  * calling the base constructor. However, here we cannot hand over the
280  * configuration to the base class as there are child-specific keys to be
281  * taken before. This cannot be done after having moved the configuration and
282  * changing the constructor signature would be a big change as all modus
283  * classes should have the same constructor signature to allow Experiment to
284  * template on it. Therefore, we abuse C++ here by default-initializing the
285  * parent class, then taking the child-specific key(s) and then assigning a
286  * parent instance to the child using the parent assignment operator. In
287  * general this would be risky as it would open up the possibility to leave
288  * part of the children uninitialized, but here we should have under control
289  * what exactly happens at initialization time.
290  */
291  this->ListModus::operator=(ListModus(std::move(modus_config), param));
292 }
const double length_
Length of the cube's edge in fm.
Definition: listmodus.h:303
ListModus()=default
Construct an empty list.

Member Function Documentation

◆ is_box()

bool smash::ListBoxModus::is_box ( ) const
inline

in the case of the ListBoxModus is_box has to be true

Definition at line 276 of file listmodus.h.

276 { return true; }

◆ impose_boundary_conditions()

int smash::ListBoxModus::impose_boundary_conditions ( Particles particles,
const OutputsList &  output_list = {} 
)

Enforces that all particles are inside the box at the beginning of an event.

It checks if the particles were placed correctly inside the box at initialization and places them inside if they are not.

Parameters
[in]particlesparticles to check their position and possibly move it
[in]output_listoutput objects
Returns
The number of particles that were put back into the box

In BoxModus if a particle crosses the wall of the box, it is inserted from the opposite side. However these wall crossings are not performed by this function but in the Experiment constructor when the WallCrossActionsFinder are created. Wall crossings are written to collision output: this is where OutputsList is used.

Definition at line 294 of file listmodus.cc.

295  {
296  int wraps = 0;
297  for (ParticleData &data : *particles) {
298  FourVector position = data.position();
299  bool wall_hit = enforce_periodic_boundaries(position.begin() + 1,
300  position.end(), length_);
301  if (wall_hit) {
302  const ParticleData incoming_particle(data);
303  data.set_4position(position);
304  ++wraps;
305  ActionPtr action =
306  std::make_unique<WallcrossingAction>(incoming_particle, data);
307  for (const auto &output : output_list) {
308  if (!output->is_dilepton_output() && !output->is_photon_output()) {
309  output->at_interaction(*action, 0.);
310  }
311  }
312  }
313  }
314 
315  logg[LList].debug("Moved ", wraps, " particles back into the box.");
316  return wraps;
317 }
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 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.
Definition: algorithms.h:53
static constexpr int LList
Definition: listmodus.cc:36

◆ create_grid()

Grid<GridOptions::PeriodicBoundaries> smash::ListBoxModus::create_grid ( const Particles particles,
double  min_cell_length,
double  timestep_duration,
CollisionCriterion  crit,
const bool  include_unformed_particles,
CellSizeStrategy  strategy = CellSizeStrategy::Optimal 
) const
inline

Creates the Grid with normal boundary conditions.

Parameters
[in]particlesThe Particles object containing all particles of the currently running Experiment.
[in]min_cell_lengthThe minimal length of the grid cells.
[in]timestep_durationDuration of the timestep. It is necessary for formation times treatment: if particle is fully or partially formed before the end of the timestep, it has to be on the grid.
[in]critCollision criterion (decides if cell number can be limited)
[in]include_unformed_particlesinclude unformed particles from the grid (worsens runtime, necessary for IC output)
[in]strategyThe strategy to determine the cell size
Returns
the Grid object
See also
Grid::Grid

Definition at line 283 of file listmodus.h.

287  {
289  if (crit == CollisionCriterion::Stochastic) {
291  }
292  return {{{0, 0, 0}, {length_, length_, length_}},
293  particles,
294  min_cell_length,
295  timestep_duration,
296  limit,
297  include_unformed_particles,
298  strategy};
299  }
@ Stochastic
Stochastic Criteiron.
CellNumberLimitation
Identifies whether the number of cells should be limited.
Definition: grid.h:55
@ ParticleNumber
Limit the number of cells to the number of particles.
@ None
No cell number limitation.

Member Data Documentation

◆ length_

const double smash::ListBoxModus::length_
private

Length of the cube's edge in fm.

Definition at line 303 of file listmodus.h.


The documentation for this class was generated from the following files: