 |
Version: SMASH-2.0
|
|
Go to the documentation of this file.
10 #ifndef SRC_INCLUDE_SMASH_SCATTERACTIONSFINDER_H_
11 #define SRC_INCLUDE_SMASH_SCATTERACTIONSFINDER_H_
58 const std::vector<bool> &nucleon_has_interacted,
59 int N_tot,
int N_proj);
79 const std::vector<FourVector> &beam_momentum)
const {
90 if (p1.
id() < 0 || p2.
id() < 0) {
91 throw std::runtime_error(
"Invalid particle ID for Fermi motion");
93 const bool p1_has_no_prior_interactions =
94 (static_cast<uint64_t>(p1.
id()) <
95 static_cast<uint64_t>(beam_momentum.size())) &&
98 const bool p2_has_no_prior_interactions =
99 (static_cast<uint64_t>(p2.
id()) <
100 static_cast<uint64_t>(beam_momentum.size())) &&
103 const FourVector p1_mom = (p1_has_no_prior_interactions)
104 ? beam_momentum[p1.
id()]
106 const FourVector p2_mom = (p2_has_no_prior_interactions)
107 ? beam_momentum[p2.
id()]
117 const double p1_sqr = p1_mom.
sqr();
118 const double p2_sqr = p2_mom.
sqr();
119 const double p1_dot_x = p1_mom.
Dot(delta_x);
120 const double p2_dot_x = p2_mom.
Dot(delta_x);
121 const double p1_dot_p2 = p1_mom.
Dot(p2_mom);
122 const double denominator = std::pow(p1_dot_p2, 2) - p1_sqr * p2_sqr;
124 const double time_1 = (p2_sqr * p1_dot_x - p1_dot_p2 * p2_dot_x) *
125 p1_mom.
x0() / denominator;
126 const double time_2 = -(p1_sqr * p2_dot_x - p1_dot_p2 * p1_dot_x) *
127 p2_mom.
x0() / denominator;
128 return (time_1 + time_2) / 2;
141 const double dv_times_e1e2_sqr = dv_times_e1e2.
sqr();
147 return -(dr * dv_times_e1e2) *
148 (p1_mom.
x0() * p2_mom.
x0() / dv_times_e1e2_sqr);
168 const ParticleList &search_list,
double dt,
const double gcell_vol,
169 const std::vector<FourVector> &beam_momentum)
const override;
184 const ParticleList &search_list,
const ParticleList &neighbors_list,
185 double dt,
const std::vector<FourVector> &beam_momentum)
const override;
199 const ParticleList &search_list,
const Particles &surrounding_list,
200 double dt,
const std::vector<FourVector> &beam_momentum)
const override;
207 bool =
false)
const override {
239 testparticles *
fm2_mb * M_1_PI;
262 double m_a,
double m_b,
bool final_state,
263 std::vector<double> &plab)
const;
308 const std::vector<FourVector> &beam_momentum = {},
309 const double gcell_vol = 0.0)
const;
327 const double gcell_vol)
const;
390 #endif // SRC_INCLUDE_SMASH_SCATTERACTIONSFINDER_H_
const double low_snn_cut_
Elastic collsions between two nucleons with sqrt_s below low_snn_cut_ are excluded.
double Dot(const FourVector &a) const
calculate the scalar product with another four-vector
const FourVector & momentum() const
Get the particle's 4-momentum.
const double string_formation_time_
Parameter for formation time.
int32_t collisions_per_particle
Collision counter per particle, zero only for initially present particles.
const double elastic_parameter_
Elastic cross section parameter (in mb).
std::unique_ptr< StringProcess > string_process_interface_
Class that deals with strings, interfacing Pythia.
const double additional_el_xs_
Additional constant elastic cross section.
int32_t id() const
Get the id of the particle.
ActionList find_final_actions(const Particles &, bool=false) const override
Find some final collisions at the end of the simulation.
const int testparticles_
Number of test particles.
HistoryData get_history() const
Get history information.
const ReactionsBitSet incl_set_
List of included 2<->2 reactions.
double sqr() const
calculate the square of the vector (which is a scalar)
const bool strings_with_probability_
Decide whether to implement string fragmentation based on a probability.
ActionPtr check_collision_multi_part(const ParticleList &plist, double dt, const double gcell_vol) const
Check for multiple i.e.
const bool two_to_one_
Enable 2->1 processes.
const std::vector< bool > & nucleon_has_interacted_
Parameter to record whether the nucleon has experienced a collision or not.
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) an...
std::bitset< 10 > ReactionsBitSet
Container for the 2 to 2 reactions in the code.
double max_transverse_distance_sqr(int testparticles) const
The maximal distance over which particles can interact, related to the number of test particles and t...
constexpr double really_small
Numerical error tolerance.
const MultiParticleReactionsBitSet incl_multi_set_
List of included multi-particle reactions.
Interface to the SMASH configuration files.
std::bitset< 2 > MultiParticleReactionsBitSet
Container for the 2 to 2 reactions in the code.
String excitation processes used in SMASH.
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.
const NNbarTreatment nnbar_treatment_
Switch for NNbar reactions.
const bool strings_switch_
Switch to turn off string excitation.
const FourVector & position() const
Get the particle's position in Minkowski space.
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.
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.
bool is_constant_elastic_isotropic() const
If there is only one particle sort, no decays (only elastic scatterings are possible),...
const bool only_warn_for_high_prob_
Switch to turn off throwing an exception for collision probabilities larger than 1.
CollisionCriterion
Criteria used to check collisions.
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.
const double maximum_cross_section_
const bool isotropic_
Do all collisions isotropically.
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...
const bool use_AQM_
Switch to control whether to use AQM or not.
constexpr double fm2_mb
mb <-> fm^2 conversion factor.
Helper structure for Experiment.
const double scale_xs_
Factor by which all (partial) cross sections are scaled.
NNbarTreatment
Treatment of N Nbar Annihilation.
void dump_reactions() const
Prints out all the 2-> n (n > 1) reactions with non-zero cross-sections between all possible pairs of...
const int N_tot_
Record the total number of the nucleons in the two colliding nuclei.
const int N_proj_
Record the number of the nucleons in the projectile.
ThreeVector threevec() const
const CollisionCriterion coll_crit_
Specifies which collision criterion is used.
static const ParticleTypeList & list_all()
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.
StringProcess * get_process_string_ptr()
const double box_length_
Box length: needed to determine coordinates of collision correctly in case of collision through the w...