#include <scatteractionsfinder.h>
A simple scatter finder: Just loops through all particles and checks each pair for a collision.
It supports two collision criteria: a geometric and stochastic criterion.
Definition at line 31 of file scatteractionsfinder.h.
Public Member Functions | |
ScatterActionsFinder (Configuration &config, const ExperimentParameters ¶meters) | |
Constructor of the finder with the given parameters. More... | |
double | collision_time (const ParticleData &p1, const ParticleData &p2, double dt, const std::vector< FourVector > &beam_momentum) const |
Determine the collision time of the two particles. More... | |
ActionList | find_actions_in_cell (const ParticleList &search_list, double dt, const double gcell_vol, const std::vector< FourVector > &beam_momentum) const override |
Search for all the possible collisions within one cell. More... | |
ActionList | find_actions_with_neighbors (const ParticleList &search_list, const ParticleList &neighbors_list, double dt, const std::vector< FourVector > &beam_momentum) const override |
Search for all the possible collisions among the neighboring cells. More... | |
ActionList | find_actions_with_surrounding_particles (const ParticleList &search_list, const Particles &surrounding_list, double dt, const std::vector< FourVector > &beam_momentum) const override |
Search for all the possible secondary collisions between the outgoing particles and the rest. More... | |
ActionList | find_final_actions (const Particles &, bool=false) const override |
Find some final collisions at the end of the simulation. More... | |
bool | is_constant_elastic_isotropic () const |
If there is only one particle sort, no decays (only elastic scatterings are possible), scatterings are isotropic and cross-section fixed to elastic_parameter_ independently on momenta, then maximal cross-section is elastic_parameter_. More... | |
double | max_transverse_distance_sqr (int testparticles) const |
The maximal distance over which particles can interact in case of the geometric criterion, related to the number of test particles and the maximal cross section. More... | |
void | dump_reactions () const |
Prints out all the 2-> n (n > 1) reactions with non-zero cross-sections between all possible pairs of particle types. More... | |
void | dump_cross_sections (const ParticleType &a, const ParticleType &b, double m_a, double m_b, bool final_state, std::vector< double > &plab) const |
Print out partial cross-sections of all processes that can occur in the collision of a(mass = m_a) and b(mass = m_b). More... | |
StringProcess * | get_process_string_ptr () |
Public Member Functions inherited from smash::ActionFinderInterface | |
virtual | ~ActionFinderInterface ()=default |
Private Member Functions | |
ActionPtr | check_collision_two_part (const ParticleData &data_a, const ParticleData &data_b, double dt, const std::vector< FourVector > &beam_momentum={}, const double gcell_vol=0.0) const |
Check for a single pair of particles (id_a, id_b) if a collision will happen in the next timestep and create a corresponding Action object in that case. More... | |
ActionPtr | check_collision_multi_part (const ParticleList &plist, double dt, const double gcell_vol) const |
Check for multiple i.e. More... | |
Private Attributes | |
ScatterActionsFinderParameters | finder_parameters_ |
Struct collecting several parameters. More... | |
std::unique_ptr< StringProcess > | string_process_interface_ |
Class that deals with strings, interfacing Pythia. More... | |
const bool | isotropic_ |
Do all collisions isotropically. More... | |
const double | box_length_ |
Box length: needed to determine coordinates of collision correctly in case of collision through the wall. More... | |
const double | string_formation_time_ |
Parameter for formation time. More... | |
smash::ScatterActionsFinder::ScatterActionsFinder | ( | Configuration & | config, |
const ExperimentParameters & | parameters | ||
) |
Constructor of the finder with the given parameters.
[in,out] | config | Configuration of smash from which we take: 1) A global elastic cross section [mb]. It will be used regardless of the species of the colliding particles. It won't be used if the value is negative. 2) An option determining whether all the scatterings are isotropic 3) Parameters of the string process |
[in] | parameters | Struct of parameters determining whether to exclude some certain types of scatterings and switching among the methods to treat with the NNbar collisions. |
Definition at line 34 of file scatteractionsfinder.cc.
|
inline |
Determine the collision time of the two particles.
Time of the closest approach is taken as collision time, if the geometric collision criterion is used. For stochastic criterion the time is distributed uniformly within the timestep.
[in] | p1 | First incoming particle |
[in] | p2 | Second incoming particle |
[in] | dt | The maximum time interval at the current time step [fm] |
[in] | beam_momentum | [GeV] List of beam momenta for each particle; only necessary for frozen Fermi motion |
JAM collision times from the closest approach in the two-particle center-of-mass-framem, see Hirano:2012yy [26] (5.13) and (5.14). The scatteraction is performed at the mean of these two times.
UrQMD collision time in computational frame, see Bass:1998ca [5] (3.28): position of particle 1: \(r_1\) [fm] position of particle 2: \(r_2\) [fm] velocity of particle 1: \(v_1\) velocity of particle 1: \(v_2\)
\[t_{coll} = - (r_1 - r_2) . (v_1 - v_2) / (v_1 - v_2)^2\]
[fm]
Definition at line 66 of file scatteractionsfinder.h.
|
overridevirtual |
Search for all the possible collisions within one cell.
This function is only used for counting the primary collisions at the beginning of each time step. (Although it's also called afterwards for searching the secondary collisions among the outgoing particles, no new actions will be found since the scattered pairs cannot scatter again.)
[in] | search_list | A list of particles within one cell |
[in] | dt | The maximum time interval at the current time step [fm] |
[in] | gcell_vol | Volume of searched grid cell [fm^3] |
[in] | beam_momentum | [GeV] List of beam momenta for each particle; only necessary for frozen Fermi motion |
Implements smash::ActionFinderInterface.
Definition at line 445 of file scatteractionsfinder.cc.
|
overridevirtual |
Search for all the possible collisions among the neighboring cells.
This function is only used for counting the primary collisions at the beginning of each time step.
[in] | search_list | A list of particles within the current cell |
[in] | neighbors_list | A list of particles within the neighboring cell |
[in] | dt | The maximum time interval at the current time step [fm] |
[in] | beam_momentum | [GeV] List of beam momenta for each particle; only necessary for frozen Fermi motion |
Implements smash::ActionFinderInterface.
Definition at line 510 of file scatteractionsfinder.cc.
|
overridevirtual |
Search for all the possible secondary collisions between the outgoing particles and the rest.
[in] | search_list | A list of particles within the current cell |
[in] | surrounding_list | The whole particle list |
[in] | dt | The maximum time interval at the current time step [fm] |
[in] | beam_momentum | [GeV] List of beam momenta for each particle; only necessary for frozen Fermi motion |
Implements smash::ActionFinderInterface.
Definition at line 531 of file scatteractionsfinder.cc.
|
inlineoverridevirtual |
Find some final collisions at the end of the simulation.
Implements smash::ActionFinderInterface.
Definition at line 198 of file scatteractionsfinder.h.
|
inline |
If there is only one particle sort, no decays (only elastic scatterings are possible), scatterings are isotropic and cross-section fixed to elastic_parameter_ independently on momenta, then maximal cross-section is elastic_parameter_.
This knowledge can be used for improving performance.
Definition at line 213 of file scatteractionsfinder.h.
|
inline |
The maximal distance over which particles can interact in case of the geometric criterion, related to the number of test particles and the maximal cross section.
[in] | testparticles | Number of test particles. |
Definition at line 231 of file scatteractionsfinder.h.
void smash::ScatterActionsFinder::dump_reactions | ( | ) | const |
Prints out all the 2-> n (n > 1) reactions with non-zero cross-sections between all possible pairs of particle types.
Definition at line 559 of file scatteractionsfinder.cc.
void smash::ScatterActionsFinder::dump_cross_sections | ( | const ParticleType & | a, |
const ParticleType & | b, | ||
double | m_a, | ||
double | m_b, | ||
bool | final_state, | ||
std::vector< double > & | plab | ||
) | const |
Print out partial cross-sections of all processes that can occur in the collision of a(mass = m_a) and b(mass = m_b).
[in] | a | The specie of the first incoming particle. |
[in] | b | The specie of the second incoming particle. |
[in] | m_a | Mass of species a [GeV]. |
[in] | m_b | Mass of species b [GeV]. |
[in] | final_state | Whether the final state cross sections should be printed. |
[in] | plab | Optional momenta in lab frame to be evaluated [GeV]. Ignored if empty. |
Definition at line 942 of file scatteractionsfinder.cc.
|
inline |
Definition at line 265 of file scatteractionsfinder.h.
|
private |
Check for a single pair of particles (id_a, id_b) if a collision will happen in the next timestep and create a corresponding Action object in that case.
Two criteria for the collision decision are supported: 1. The default geometric criterion from UrQMD Bass:1998ca [5] (3.27). 2. A stochastic collision criterion as introduced in Staudenmaier:2021lrg [56].
[in] | data_a | First incoming particle |
[in] | data_b | Second incoming particle |
[in] | dt | Maximum time interval within which a collision can happen |
[in] | beam_momentum | [GeV] List of beam momenta for each particle; only necessary for frozen Fermi motion |
[in] | gcell_vol | (optional) volume of grid cell in which the collision is checked |
Note: gcell_vol is optional, since only find_actions_in_cell has (and needs) this information for the stochastic collision criterion.
Definition at line 211 of file scatteractionsfinder.cc.
|
private |
Check for multiple i.e.
more than 2 particles if a collision will happen in the next timestep and create a corresponding Action object in that case.
This is only possible for the stochastic collision criterion, which is introduced in Staudenmaier:2021lrg [56]. Following the same general idea as for the 2-particle scatterings, probabilities for multi-particle scatterings can be derived.
[in] | plist | List of incoming particles |
[in] | dt | Maximum time interval within which a collision can happen |
[in] | gcell_vol | volume of grid cell in which the collision is checked |
Definition at line 368 of file scatteractionsfinder.cc.
|
private |
Struct collecting several parameters.
Definition at line 320 of file scatteractionsfinder.h.
|
private |
Class that deals with strings, interfacing Pythia.
Definition at line 322 of file scatteractionsfinder.h.
|
private |
Do all collisions isotropically.
Definition at line 324 of file scatteractionsfinder.h.
|
private |
Box length: needed to determine coordinates of collision correctly in case of collision through the wall.
Ignored if negative.
Definition at line 330 of file scatteractionsfinder.h.
|
private |
Parameter for formation time.
Definition at line 332 of file scatteractionsfinder.h.