#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, const std::vector< bool > &nucleon_has_interacted, int N_tot, int N_proj) | |
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 cell_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, 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 () |
![]() | |
virtual | ~ActionFinderInterface ()=default |
Private Member Functions | |
ActionPtr | check_collision (const ParticleData &data_a, const ParticleData &data_b, double dt, const std::vector< FourVector > &beam_momentum={}, const double cell_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... | |
Private Attributes | |
std::unique_ptr< StringProcess > | string_process_interface_ |
Class that deals with strings, interfacing Pythia. More... | |
const CollisionCriterion | coll_crit_ |
Specifies which collision criterion is used. More... | |
const double | elastic_parameter_ |
Elastic cross section parameter (in mb). More... | |
const int | testparticles_ |
Number of test particles. More... | |
const bool | isotropic_ |
Do all collisions isotropically. More... | |
const bool | two_to_one_ |
Enable 2->1 processes. More... | |
const ReactionsBitSet | incl_set_ |
List of included 2<->2 reactions. More... | |
const double | low_snn_cut_ |
Elastic collsions between two nucleons with sqrt_s below low_snn_cut_ are excluded. More... | |
const bool | strings_switch_ |
Switch to turn off string excitation. More... | |
const bool | use_AQM_ |
Switch to control whether to use AQM or not. More... | |
const bool | strings_with_probability_ |
Decide whether to implement string fragmentation based on a probability. More... | |
const NNbarTreatment | nnbar_treatment_ |
Switch for NNbar reactions. More... | |
const std::vector< bool > & | nucleon_has_interacted_ |
Parameter to record whether the nucleon has experienced a collision or not. More... | |
const int | N_tot_ |
Record the total number of the nucleons in the two colliding nuclei. More... | |
const int | N_proj_ |
Record the number of the nucleons in the projectile. More... | |
const double | string_formation_time_ |
Parameter for formation time. More... | |
smash::ScatterActionsFinder::ScatterActionsFinder | ( | Configuration | config, |
const ExperimentParameters & | parameters, | ||
const std::vector< bool > & | nucleon_has_interacted, | ||
int | N_tot, | ||
int | N_proj | ||
) |
Constructor of the finder with the given parameters.
[in] | 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. |
[in] | nucleon_has_interacted | Flags to record whether an initial nucleon has interacted with another particle not from the same nucleus. The flags are used if we want to exclude the first collisions among the nucleons within the same nucleus. |
[in] | N_tot | Total number of the initial nucleons. This number, as well as the next parameter, will be used to determine whether two intial nucleons are within the same nucleus if we'd like to exclude the first collisions among them. |
[in] | N_proj | Total projectile number |
Definition at line 218 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 as in Xu:2004mz.
[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 |
UrQMD collision time in computational frame, see Bass:1998ca (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/c]
Definition at line 78 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] | cell_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 399 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/c] |
[in] | beam_momentum | [GeV] List of beam momenta for each particle; only necessary for frozen Fermi motion |
Implements smash::ActionFinderInterface.
Definition at line 417 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/c] |
[in] | beam_momentum | [GeV] List of beam momenta for each particle; only necessary for frozen Fermi motion |
Implements smash::ActionFinderInterface.
Definition at line 438 of file scatteractionsfinder.cc.
|
inlineoverridevirtual |
Find some final collisions at the end of the simulation.
Implements smash::ActionFinderInterface.
Definition at line 186 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 201 of file scatteractionsfinder.h.
|
inline |
The maximal distance over which particles can interact, related to the number of test particles and the maximal cross section.
[in] | testparticles | Number of test particles. |
Definition at line 216 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 466 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 852 of file scatteractionsfinder.cc.
|
inline |
Definition at line 249 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 (3.27). 2. A stochastic collision criterion e.g. employed by BAMPS Xu:2004mz (Sec.IIB). Note, the latter is currently only tested for a box with a fixed elastic cross section.
More details on the stochastic collision criterion can be found here:
[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] | cell_vol | (optional) volume of grid cell in which the collision is checked |
Note: cell_vol is optional, since only find_actions_in_cell has (and needs) this information for the stochastic collision criterion.
Definition at line 274 of file scatteractionsfinder.cc.
|
private |
Class that deals with strings, interfacing Pythia.
Definition at line 294 of file scatteractionsfinder.h.
|
private |
Specifies which collision criterion is used.
Definition at line 296 of file scatteractionsfinder.h.
|
private |
Elastic cross section parameter (in mb).
Definition at line 298 of file scatteractionsfinder.h.
|
private |
Number of test particles.
Definition at line 300 of file scatteractionsfinder.h.
|
private |
Do all collisions isotropically.
Definition at line 302 of file scatteractionsfinder.h.
|
private |
Enable 2->1 processes.
Definition at line 304 of file scatteractionsfinder.h.
|
private |
List of included 2<->2 reactions.
Definition at line 306 of file scatteractionsfinder.h.
|
private |
Elastic collsions between two nucleons with sqrt_s below low_snn_cut_ are excluded.
Definition at line 311 of file scatteractionsfinder.h.
|
private |
Switch to turn off string excitation.
Definition at line 313 of file scatteractionsfinder.h.
|
private |
Switch to control whether to use AQM or not.
Definition at line 315 of file scatteractionsfinder.h.
|
private |
Decide whether to implement string fragmentation based on a probability.
Definition at line 317 of file scatteractionsfinder.h.
|
private |
Switch for NNbar reactions.
Definition at line 319 of file scatteractionsfinder.h.
|
private |
Parameter to record whether the nucleon has experienced a collision or not.
Definition at line 323 of file scatteractionsfinder.h.
|
private |
Record the total number of the nucleons in the two colliding nuclei.
Definition at line 325 of file scatteractionsfinder.h.
|
private |
Record the number of the nucleons in the projectile.
Definition at line 327 of file scatteractionsfinder.h.
|
private |
Parameter for formation time.
Definition at line 329 of file scatteractionsfinder.h.