#include <collidermodus.h>
ColliderModus: Provides a modus for colliding nuclei.
To use this modus, choose
in the configuration file.
Options for ColliderModus go in the "Modi"→"Collider" section of the configuration.
The following configuration options are understood: Collider
Definition at line 48 of file collidermodus.h.
Classes | |
| struct | ColliderEmpty |
| Thrown when either projectile_ or target_ nuclei are empty. More... | |
Public Member Functions | |
| ColliderModus (Configuration modus_config, const ExperimentParameters ¶meters) | |
| Constructor. More... | |
| std::string | custom_file_path (const std::string &file_directory, const std::string &file_name) |
| Creates full path string consisting of file_directory and file_name Needed to initialize a customnucleus. More... | |
| double | initial_conditions (Particles *particles, const ExperimentParameters ¶meters) |
| Generates initial state of the particles in the system. More... | |
| void | sample_impact () |
| Sample impact parameter. More... | |
| double | nuclei_passing_time () const |
| Time until nuclei have passed through each other. More... | |
| double | velocity_projectile () const |
| double | velocity_target () const |
| FermiMotion | fermi_motion () |
| bool | is_collider () const |
| double | sqrt_s_NN () const |
| double | impact_parameter () const |
| bool | calculation_frame_is_fixed_target () const |
| bool | is_IC_for_hybrid () const |
| const InitialConditionParameters & | IC_parameters () const |
| const std::map< int32_t, double > & | fluid_background () const |
| const RectangularLattice< EnergyMomentumTensor > & | fluid_lattice () const |
| void | build_fluidization_lattice (double t, const std::vector< Particles > &ensembles, const DensityParameters &dens_par) |
| Build lattice of energy momentum tensor. More... | |
| void | update_fluidization_background (std::map< int32_t, double > &&background) |
| Update the background energy density due to hydrodynamics, to be called by an external manager. More... | |
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... | |
| bool | is_IC_for_hybrid () const |
| const InitialConditionParameters & | IC_parameters () const |
| const std::map< int32_t, double > & | fluid_background () |
| const RectangularLattice< EnergyMomentumTensor > & | fluid_lattice () |
| void | build_fluidization_lattice ([[maybe_unused]] const double t, [[maybe_unused]] const std::vector< Particles > &ensembles, [[maybe_unused]] const DensityParameters &dens_par) |
| Build lattice of energy momentum tensor. More... | |
| Grid< GridOptions::Normal > | 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. More... | |
| std::unique_ptr< GrandCanThermalizer > | create_grandcan_thermalizer (Configuration &conf) const |
| Creates GrandCanThermalizer. More... | |
Private Member Functions | |
| bool | same_inputfile (Configuration &proj_config, Configuration &targ_config) |
| Checks if target and projectile are read from the same external file if they are both initialized as a customnucleus. More... | |
| void | log_IC_kinematic_range () noexcept |
| Print information about the input kinematic range for the Initial Conditions output. More... | |
| void | rotate_reaction_plane (double phi, Particles *particles) |
| Rotate the reaction plane about the angle phi. More... | |
| std::pair< double, double > | get_velocities (double mandelstam_s, double m_a, double m_b) |
| Get the frame dependent velocity for each nucleus, using the current reference frame. More... | |
Static Private Member Functions | |
| static std::unique_ptr< DeformedNucleus > | create_deformed_nucleus (Configuration &nucleus_cfg, const int ntest, const std::string &nucleus_type) |
| Configure Deformed Nucleus. More... | |
| static std::unique_ptr< AlphaClusteredNucleus > | create_alphaclustered_nucleus (Configuration &nucleus_cfg, const int ntest, const std::string &nucleus_type) |
| Configure Alpha-Clustered Nucleus. More... | |
Private Attributes | |
| std::unique_ptr< Nucleus > | projectile_ |
| Projectile. More... | |
| std::unique_ptr< Nucleus > | target_ |
| Target. More... | |
| double | total_s_ |
| Center-of-mass energy squared of the nucleus-nucleus collision. More... | |
| double | sqrt_s_NN_ |
| Center-of-mass energy of a nucleon-nucleon collision. More... | |
| double | impact_ = 0. |
| Impact parameter. More... | |
| bool | random_reaction_plane_ |
| Whether the reaction plane should be randomized. More... | |
| bool | IC_for_hybrid_ = false |
| Whether the particles will serve as initial conditions for hydrodynamics. More... | |
| Sampling | sampling_ = InputKeys::modi_collider_impact_sample.default_value() |
| Method used for sampling of impact parameter. More... | |
| double | imp_min_ = InputKeys::modi_collider_impact_value.default_value() |
| Minimum value of impact parameter. More... | |
| double | imp_max_ = InputKeys::modi_collider_impact_value.default_value() |
| Maximum value of impact parameter. More... | |
| double | yield_max_ = 0.0 |
| Maximum value of yield. Needed for custom impact parameter sampling. More... | |
| std::unique_ptr< InterpolateDataLinear< double > > | impact_interpolation_ |
| Pointer to the impact parameter interpolation. More... | |
| double | initial_z_displacement_ |
| Initial z-displacement of nuclei. More... | |
| CalculationFrame | frame_ |
| Reference frame for the system, as specified from config. More... | |
| FermiMotion | fermi_motion_ |
| An option to include Fermi motion ("off", "on", "frozen") More... | |
| double | velocity_projectile_ = 0.0 |
| Beam velocity of the projectile. More... | |
| double | velocity_target_ = 0.0 |
| Beam velocity of the target. More... | |
| std::unique_ptr< InitialConditionParameters > | IC_parameters_ |
| Plain Old Data type to hold parameters for initial conditions. More... | |
| std::unique_ptr< RectangularLattice< EnergyMomentumTensor > > | fluid_lattice_ |
| Energy-momentum tensor lattice for dynamic fluidization. More... | |
| std::unique_ptr< std::map< int32_t, double > > | fluid_background_ = nullptr |
| Energy density background from hydrodynamic evolution, with particle indices as keys. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &, const ColliderModus &) |
| Writes the initial state for the ColliderModus to the output stream. More... | |
|
explicit |
Constructor.
Takes all there is to take from the (truncated!) configuration object (only contains configuration for this modus).
| [in] | modus_config | The configuration object that sets all initial conditions of the experiment. |
| [in] | parameters | Unused, but necessary because of templated initialization |
| ColliderEmpty | if projectile or nucleus are empty (i.e. do not contain particles) |
| InvalidEnergy | if sqrts from config is not large enough to support the colliding masses of the nuclei, or if E_kin or P_lab are negative |
| domain_error | if more or less than exactly one of the input energy options is specified, or if custom impact parameter Values and Yields are improperly supplied |
Definition at line 36 of file collidermodus.cc.
| std::string smash::ColliderModus::custom_file_path | ( | const std::string & | file_directory, |
| const std::string & | file_name | ||
| ) |
Creates full path string consisting of file_directory and file_name Needed to initialize a customnucleus.
| [in] | file_directory | is the path to the external file |
| [in] | file_name | is the name of the external file |
Definition at line 591 of file collidermodus.cc.
| double smash::ColliderModus::initial_conditions | ( | Particles * | particles, |
| const ExperimentParameters & | parameters | ||
| ) |
Generates initial state of the particles in the system.
In particular, it initializes the momenta and positions of nucleons withing the colliding nuclei.
| [out] | particles | An empty list that gets filled up by this function |
| [in] | parameters | The initialization parameters of the system |
| domain_error | if the velocities of each nucleus are >= 1, or if input for Fermi motion is invalid |
Definition at line 451 of file collidermodus.cc.
| void smash::ColliderModus::sample_impact | ( | ) |
Sample impact parameter.
Samples the impact parameter from values between imp_min_ and imp_max_, if linear or quadratic sampling is used. By specifying impact parameters and corresponding yields, custom sampling can be used. This depends on the value of sampling_.
Note that imp_max_ less than imp_min_ also works fine.
Definition at line 533 of file collidermodus.cc.
|
inline |
|
inline |
Definition at line 123 of file collidermodus.h.
|
inline |
Definition at line 128 of file collidermodus.h.
|
inline |
|
inline |
Definition at line 132 of file collidermodus.h.
|
inline |
|
inline |
|
inline |
Definition at line 138 of file collidermodus.h.
|
inline |
Definition at line 142 of file collidermodus.h.
|
inline |
Definition at line 144 of file collidermodus.h.
|
inline |
Definition at line 148 of file collidermodus.h.
|
inline |
Definition at line 152 of file collidermodus.h.
| void smash::ColliderModus::build_fluidization_lattice | ( | double | t, |
| const std::vector< Particles > & | ensembles, | ||
| const DensityParameters & | dens_par | ||
| ) |
Build lattice of energy momentum tensor.
After t>25 fm, the lattice grows at every 5 fm to accommodate for the system expansion.
| [in] | t | Current time. |
| [in] | ensembles | Only the first Particles element is actually used. |
| [in] | dens_par | Contains parameters for density smearing. |
Definition at line 630 of file collidermodus.cc.
|
inline |
Update the background energy density due to hydrodynamics, to be called by an external manager.
| [in] | background | Map with particle indices as keys and their corresponding background energy density as values. |
Definition at line 174 of file collidermodus.h.
|
staticprivate |
Configure Deformed Nucleus.
Sets up a deformed nucleus object based on the input parameters in the configuration file.
| [in] | nucleus_cfg | Subset of configuration, projectile or target section. |
| [in] | ntest | Number of test particles |
| [in] | nucleus_type | String 'projectile' or 'target'. To display an appropriate error message. |
Definition at line 362 of file collidermodus.cc.
|
staticprivate |
Configure Alpha-Clustered Nucleus.
Sets up an alpha-clustered nucleus object based on the input parameters in the configuration file.
| [in] | nucleus_cfg | Subset of configuration, projectile or target section. |
| [in] | ntest | Number of test particles |
| [in] | nucleus_type | String 'projectile' or 'target'. To display an appropriate error message. |
Definition at line 415 of file collidermodus.cc.
|
private |
Checks if target and projectile are read from the same external file if they are both initialized as a customnucleus.
Function is only called if, projectile is customnucleus.
| [in] | proj_config | Configuration of projectile nucleus |
| [in] | targ_config | Configuration of target nucleus |
Definition at line 601 of file collidermodus.cc.
|
privatenoexcept |
Print information about the input kinematic range for the Initial Conditions output.
Definition at line 330 of file collidermodus.cc.
|
private |
Rotate the reaction plane about the angle phi.
| [in] | phi | Angle about which to rotate |
| [in] | particles | Particles, whose position is rotated |
Definition at line 522 of file collidermodus.cc.
|
private |
Get the frame dependent velocity for each nucleus, using the current reference frame.
| [in] | mandelstam_s | The total center-of-mass energy of the system. |
| [in] | m_a | The (positive) mass of the projectile. |
| [in] | m_b | The (positive) mass of the target. |
| domain_error | if the reference frame is not properly specified |
Definition at line 564 of file collidermodus.cc.
|
private |
Projectile.
The object that goes from negative z-values to positive z-values with positive velocity.
Definition at line 193 of file collidermodus.h.
|
private |
Target.
The object that goes from positive z-values to negative z-values with negative velocity. In fixed target experiments, the target is at rest.
Definition at line 201 of file collidermodus.h.
|
private |
Center-of-mass energy squared of the nucleus-nucleus collision.
Needs to be double to allow for calculations at LHC energies
Definition at line 207 of file collidermodus.h.
|
private |
Center-of-mass energy of a nucleon-nucleon collision.
Needs to be double to allow for calculations at LHC energies
Definition at line 213 of file collidermodus.h.
|
private |
Impact parameter.
The nuclei projectile_ and target_ will be shifted along the x-axis so that their centers move on antiparallel lines that are this distance apart from each other.
Definition at line 262 of file collidermodus.h.
|
private |
Whether the reaction plane should be randomized.
Definition at line 264 of file collidermodus.h.
|
private |
Whether the particles will serve as initial conditions for hydrodynamics.
Definition at line 266 of file collidermodus.h.
|
private |
Method used for sampling of impact parameter.
Definition at line 268 of file collidermodus.h.
|
private |
Minimum value of impact parameter.
Definition at line 270 of file collidermodus.h.
|
private |
Maximum value of impact parameter.
Definition at line 272 of file collidermodus.h.
|
private |
Maximum value of yield. Needed for custom impact parameter sampling.
Definition at line 274 of file collidermodus.h.
|
private |
Pointer to the impact parameter interpolation.
Definition at line 276 of file collidermodus.h.
|
private |
Initial z-displacement of nuclei.
Projectile is shifted on -(this value) in z-direction and target on +(this value)*v_target/v_projectile. In this way projectile and target touch at t=0 in z=0.
Definition at line 293 of file collidermodus.h.
|
private |
Reference frame for the system, as specified from config.
Definition at line 297 of file collidermodus.h.
|
private |
An option to include Fermi motion ("off", "on", "frozen")
Definition at line 301 of file collidermodus.h.
|
private |
Beam velocity of the projectile.
Definition at line 305 of file collidermodus.h.
|
private |
Beam velocity of the target.
Definition at line 309 of file collidermodus.h.
|
private |
Plain Old Data type to hold parameters for initial conditions.
Definition at line 311 of file collidermodus.h.
|
private |
Energy-momentum tensor lattice for dynamic fluidization.
Definition at line 313 of file collidermodus.h.
|
private |
Energy density background from hydrodynamic evolution, with particle indices as keys.
Useful when using SMASH as a library.
Definition at line 319 of file collidermodus.h.