#include <scatteractionsfinder.h>
A simple scatter finder: Just loops through all particles and checks each pair for a collision.
Definition at line 30 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... | |
ActionList | find_actions_in_cell (const ParticleList &search_list, double dt) 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 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 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 |
Static Public Member Functions | |
static double | collision_time (const ParticleData &p1, const ParticleData &p2) |
Determine the collision time of the two particles. More... | |
Private Member Functions | |
ActionPtr | check_collision (const ParticleData &data_a, const ParticleData &data_b, double dt) 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 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 208 of file scatteractionsfinder.cc.
|
inlinestatic |
Determine the collision time of the two particles.
Time of the closest approach is taken as collision time.
[in] | p1 | First incoming particle |
[in] | p2 | Second incoming particle |
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 72 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/c] |
Implements smash::ActionFinderInterface.
Definition at line 335 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] |
Implements smash::ActionFinderInterface.
Definition at line 352 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] |
Implements smash::ActionFinderInterface.
Definition at line 369 of file scatteractionsfinder.cc.
|
inlineoverridevirtual |
Find some final collisions at the end of the simulation.
Implements smash::ActionFinderInterface.
Definition at line 140 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 155 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 170 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 393 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 771 of file scatteractionsfinder.cc.
|
inline |
Definition at line 203 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.
[in] | data_a | First incoming particle |
[in] | data_b | Second incoming particle |
[in] | dt | Maximum time interval within which a collision can happen |
Definition at line 255 of file scatteractionsfinder.cc.
|
private |
Class that deals with strings, interfacing Pythia.
Definition at line 226 of file scatteractionsfinder.h.
|
private |
Elastic cross section parameter (in mb).
Definition at line 228 of file scatteractionsfinder.h.
|
private |
Number of test particles.
Definition at line 230 of file scatteractionsfinder.h.
|
private |
Do all collisions isotropically.
Definition at line 232 of file scatteractionsfinder.h.
|
private |
Enable 2->1 processes.
Definition at line 234 of file scatteractionsfinder.h.
|
private |
List of included 2<->2 reactions.
Definition at line 236 of file scatteractionsfinder.h.
|
private |
Elastic collsions between two nucleons with sqrt_s below low_snn_cut_ are excluded.
Definition at line 241 of file scatteractionsfinder.h.
|
private |
Switch to turn off string excitation.
Definition at line 243 of file scatteractionsfinder.h.
|
private |
Switch to control whether to use AQM or not.
Definition at line 245 of file scatteractionsfinder.h.
|
private |
Decide whether to implement string fragmentation based on a probability.
Definition at line 247 of file scatteractionsfinder.h.
|
private |
Switch for NNbar reactions.
Definition at line 249 of file scatteractionsfinder.h.
|
private |
Parameter to record whether the nucleon has experienced a collision or not.
Definition at line 254 of file scatteractionsfinder.h.
|
private |
Record the total number of the nucleons in the two colliding nuclei.
Definition at line 256 of file scatteractionsfinder.h.
|
private |
Record the number of the nucleons in the projectile.
Definition at line 258 of file scatteractionsfinder.h.
|
private |
Parameter for formation time.
Definition at line 260 of file scatteractionsfinder.h.