Version: SMASH-2.0
smash::ScatterActionsFinder Class Reference

#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 30 of file scatteractionsfinder.h.

Inheritance diagram for smash::ScatterActionsFinder:
[legend]
Collaboration diagram for smash::ScatterActionsFinder:
[legend]

Public Member Functions

 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. 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, 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...
 
StringProcessget_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

std::unique_ptr< StringProcessstring_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 MultiParticleReactionsBitSet incl_multi_set_
 List of included multi-particle reactions. More...
 
const double scale_xs_
 Factor by which all (partial) cross sections are scaled. More...
 
const double additional_el_xs_
 Additional constant elastic cross section. 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 double box_length_
 Box length: needed to determine coordinates of collision correctly in case of collision through the wall. 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...
 
const double maximum_cross_section_
 
const bool only_warn_for_high_prob_
 Switch to turn off throwing an exception for collision probabilities larger than 1. More...
 

Constructor & Destructor Documentation

◆ ScatterActionsFinder()

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.

Parameters
[in]configConfiguration 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]parametersStruct 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_interactedFlags 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_totTotal 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_projTotal projectile number

Definition at line 296 of file scatteractionsfinder.cc.

299  : coll_crit_(parameters.coll_crit),
301  config.take({"Collision_Term", "Elastic_Cross_Section"}, -1.)),
302  testparticles_(parameters.testparticles),
303  isotropic_(config.take({"Collision_Term", "Isotropic"}, false)),
304  two_to_one_(parameters.two_to_one),
305  incl_set_(parameters.included_2to2),
306  incl_multi_set_(parameters.included_multi),
307  scale_xs_(parameters.scale_xs),
308  additional_el_xs_(parameters.additional_el_xs),
309  low_snn_cut_(parameters.low_snn_cut),
310  strings_switch_(parameters.strings_switch),
311  use_AQM_(parameters.use_AQM),
312  strings_with_probability_(parameters.strings_with_probability),
313  nnbar_treatment_(parameters.nnbar_treatment),
314  box_length_(parameters.box_length),
315  nucleon_has_interacted_(nucleon_has_interacted),
316  N_tot_(N_tot),
317  N_proj_(N_proj),
318  string_formation_time_(config.take(
319  {"Collision_Term", "String_Parameters", "Formation_Time"}, 1.)),
320  maximum_cross_section_(parameters.maximum_cross_section),
321  only_warn_for_high_prob_(config.take(
322  {"Collision_Term", "Only_Warn_For_High_Probability"}, false)) {
324  logg[LFindScatter].info(
325  "Constant elastic isotropic cross-section mode:", " using ",
326  elastic_parameter_, " mb as maximal cross-section.");
327  }
329  throw std::invalid_argument(
330  "Multi-body reactions (like e.g. 3->1 or 3->2) are only possible with "
331  "the stochastic "
332  "collision "
333  "criterion. Change your config accordingly.");
334  }
335 
339  throw std::invalid_argument(
340  "To prevent double counting it is not possible to enable deuteron 3->2 "
341  "reactions\nand reactions involving the d' at the same time\ni.e. to "
342  "include `Deuteron_3to2` in `Multi_Particle_Reactions` and\n "
343  "\"PiDeuteron_to_pidprime\" "
344  "or \"NDeuteron_to_Ndprime\" in `Included_2to2` at the same time.\n"
345  "Change your config accordingly.");
346  }
347 
348  if (strings_switch_) {
349  auto subconfig = config["Collision_Term"]["String_Parameters"];
350  string_process_interface_ = make_unique<StringProcess>(
351  subconfig.take({"String_Tension"}, 1.0), string_formation_time_,
352  subconfig.take({"Gluon_Beta"}, 0.5),
353  subconfig.take({"Gluon_Pmin"}, 0.001),
354  subconfig.take({"Quark_Alpha"}, 2.0),
355  subconfig.take({"Quark_Beta"}, 7.0),
356  subconfig.take({"Strange_Supp"}, 0.16),
357  subconfig.take({"Diquark_Supp"}, 0.036),
358  subconfig.take({"Sigma_Perp"}, 0.42),
359  subconfig.take({"StringZ_A_Leading"}, 0.2),
360  subconfig.take({"StringZ_B_Leading"}, 2.0),
361  subconfig.take({"StringZ_A"}, 2.0), subconfig.take({"StringZ_B"}, 0.55),
362  subconfig.take({"String_Sigma_T"}, 0.5),
363  subconfig.take({"Form_Time_Factor"}, 1.0),
364  subconfig.take({"Mass_Dependent_Formation_Times"}, false),
365  subconfig.take({"Prob_proton_to_d_uu"}, 1. / 3.),
366  subconfig.take({"Separate_Fragment_Baryon"}, true),
367  subconfig.take({"Popcorn_Rate"}, 0.15));
368  }
369 }

Member Function Documentation

◆ collision_time()

double smash::ScatterActionsFinder::collision_time ( const ParticleData p1,
const ParticleData p2,
double  dt,
const std::vector< FourVector > &  beam_momentum 
) const
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 [53].

Parameters
[in]p1First incoming particle
[in]p2Second incoming particle
[in]dtThe 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
Returns
How long does it take for the two incoming particles to propagate before scattering [fm/c]. It's set equal to -1 if the two particles are not moving relative to each other.

JAM collision times from the closest approach in the two-particle center-of-mass-framem, see Hirano:2012yy [22] (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 [4] (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 77 of file scatteractionsfinder.h.

79  {
81  return dt * random::uniform(0., 1.);
82  } else {
83  /*
84  * For frozen Fermi motion:
85  * If particles have not yet interacted and are the initial nucleons,
86  * perform action finding with beam momentum instead of Fermi motion
87  * corrected momentum. That is because the particles are propagated with
88  * the beam momentum until they interact.
89  */
90  if (p1.id() < 0 || p2.id() < 0) {
91  throw std::runtime_error("Invalid particle ID for Fermi motion");
92  }
93  const bool p1_has_no_prior_interactions =
94  (static_cast<uint64_t>(p1.id()) < // particle from
95  static_cast<uint64_t>(beam_momentum.size())) && // initial nucleus
96  (p1.get_history().collisions_per_particle == 0);
97 
98  const bool p2_has_no_prior_interactions =
99  (static_cast<uint64_t>(p2.id()) < // particle from
100  static_cast<uint64_t>(beam_momentum.size())) && // initial nucleus
101  (p2.get_history().collisions_per_particle == 0);
102 
103  const FourVector p1_mom = (p1_has_no_prior_interactions)
104  ? beam_momentum[p1.id()]
105  : p1.momentum();
106  const FourVector p2_mom = (p2_has_no_prior_interactions)
107  ? beam_momentum[p2.id()]
108  : p2.momentum();
116  const FourVector delta_x = p1.position() - p2.position();
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;
123 
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;
129  } else {
139  const ThreeVector dv_times_e1e2 =
140  p1_mom.threevec() * p2_mom.x0() - p2_mom.threevec() * p1_mom.x0();
141  const double dv_times_e1e2_sqr = dv_times_e1e2.sqr();
142  if (dv_times_e1e2_sqr < really_small) {
143  return -1.0;
144  }
145  const ThreeVector dr =
146  p1.position().threevec() - p2.position().threevec();
147  return -(dr * dv_times_e1e2) *
148  (p1_mom.x0() * p2_mom.x0() / dv_times_e1e2_sqr);
149  }
150  }
151  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_actions_in_cell()

ActionList smash::ScatterActionsFinder::find_actions_in_cell ( const ParticleList &  search_list,
double  dt,
const double  gcell_vol,
const std::vector< FourVector > &  beam_momentum 
) const
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.)

Parameters
[in]search_listA list of particles within one cell
[in]dtThe maximum time interval at the current time step [fm]
[in]gcell_volVolume of searched grid cell [fm^3]
[in]beam_momentum[GeV] List of beam momenta for each particle; only necessary for frozen Fermi motion
Returns
A list of possible scatter actions

Implements smash::ActionFinderInterface.

Definition at line 573 of file scatteractionsfinder.cc.

575  {
576  std::vector<ActionPtr> actions;
577  for (const ParticleData& p1 : search_list) {
578  for (const ParticleData& p2 : search_list) {
579  // Check for 2 particle scattering
580  if (p1.id() < p2.id()) {
581  ActionPtr act =
582  check_collision_two_part(p1, p2, dt, beam_momentum, gcell_vol);
583  if (act) {
584  actions.push_back(std::move(act));
585  }
586  }
587  if (incl_multi_set_.any()) {
588  // Also, check for 3 particle scatterings with stochastic criterion
589  for (const ParticleData& p3 : search_list) {
590  if (p1.id() < p2.id() && p2.id() < p3.id()) {
591  ActionPtr act =
592  check_collision_multi_part({p1, p2, p3}, dt, gcell_vol);
593  if (act) {
594  actions.push_back(std::move(act));
595  }
596  }
597  }
598  }
599  }
600  }
601 
602  return actions;
603 }
Here is the call graph for this function:

◆ find_actions_with_neighbors()

ActionList smash::ScatterActionsFinder::find_actions_with_neighbors ( const ParticleList &  search_list,
const ParticleList &  neighbors_list,
double  dt,
const std::vector< FourVector > &  beam_momentum 
) const
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.

Parameters
[in]search_listA list of particles within the current cell
[in]neighbors_listA list of particles within the neighboring cell
[in]dtThe 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
Returns
A list of possible scatter actions

Implements smash::ActionFinderInterface.

Definition at line 605 of file scatteractionsfinder.cc.

607  {
608  std::vector<ActionPtr> actions;
610  // Only search in cells
611  return actions;
612  }
613  for (const ParticleData& p1 : search_list) {
614  for (const ParticleData& p2 : neighbors_list) {
615  assert(p1.id() != p2.id());
616  // Check if a collision is possible.
617  ActionPtr act = check_collision_two_part(p1, p2, dt, beam_momentum);
618  if (act) {
619  actions.push_back(std::move(act));
620  }
621  }
622  }
623  return actions;
624 }
Here is the call graph for this function:

◆ find_actions_with_surrounding_particles()

ActionList smash::ScatterActionsFinder::find_actions_with_surrounding_particles ( const ParticleList &  search_list,
const Particles surrounding_list,
double  dt,
const std::vector< FourVector > &  beam_momentum 
) const
overridevirtual

Search for all the possible secondary collisions between the outgoing particles and the rest.

Parameters
[in]search_listA list of particles within the current cell
[in]surrounding_listThe whole particle list
[in]dtThe 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
Returns
A list of possible scatter actions

Implements smash::ActionFinderInterface.

Definition at line 626 of file scatteractionsfinder.cc.

628  {
629  std::vector<ActionPtr> actions;
631  // Only search in cells
632  return actions;
633  }
634  for (const ParticleData& p2 : surrounding_list) {
635  /* don't look for collisions if the particle from the surrounding list is
636  * also in the search list */
637  auto result = std::find_if(
638  search_list.begin(), search_list.end(),
639  [&p2](const ParticleData& p) { return p.id() == p2.id(); });
640  if (result != search_list.end()) {
641  continue;
642  }
643  for (const ParticleData& p1 : search_list) {
644  // Check if a collision is possible.
645  ActionPtr act = check_collision_two_part(p1, p2, dt, beam_momentum);
646  if (act) {
647  actions.push_back(std::move(act));
648  }
649  }
650  }
651  return actions;
652 }
Here is the call graph for this function:

◆ find_final_actions()

ActionList smash::ScatterActionsFinder::find_final_actions ( const Particles ,
bool  = false 
) const
inlineoverridevirtual

Find some final collisions at the end of the simulation.

Todo:
Seems to do nothing.

Implements smash::ActionFinderInterface.

Definition at line 206 of file scatteractionsfinder.h.

207  {
208  return ActionList();
209  }

◆ is_constant_elastic_isotropic()

bool smash::ScatterActionsFinder::is_constant_elastic_isotropic ( ) const
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.

Returns
A boolean indicating whether all the scatterings are elastic and isotropic

Definition at line 221 of file scatteractionsfinder.h.

221  {
222  return ParticleType::list_all().size() == 1 && !two_to_one_ && isotropic_ &&
223  elastic_parameter_ > 0.;
224  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ max_transverse_distance_sqr()

double smash::ScatterActionsFinder::max_transverse_distance_sqr ( int  testparticles) const
inline

The maximal distance over which particles can interact, related to the number of test particles and the maximal cross section.

Parameters
[in]testparticlesNumber of test particles.
Returns
Maximal transverse distance squared. [fm \(^{2}\)] Particle pairs whose transverse distance is larger than this are not checked for collisions.

Definition at line 236 of file scatteractionsfinder.h.

236  {
239  testparticles * fm2_mb * M_1_PI;
240  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump_reactions()

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 654 of file scatteractionsfinder.cc.

654  {
655  constexpr double time = 0.0;
656 
657  const size_t N_isotypes = IsoParticleType::list_all().size();
658  const size_t N_pairs = N_isotypes * (N_isotypes - 1) / 2;
659 
660  std::cout << N_isotypes << " iso-particle types." << std::endl;
661  std::cout << "They can make " << N_pairs << " pairs." << std::endl;
662  std::vector<double> momentum_scan_list = {0.1, 0.3, 0.5, 1.0,
663  2.0, 3.0, 5.0, 10.0};
664  for (const IsoParticleType& A_isotype : IsoParticleType::list_all()) {
665  for (const IsoParticleType& B_isotype : IsoParticleType::list_all()) {
666  if (&A_isotype > &B_isotype) {
667  continue;
668  }
669  bool any_nonzero_cs = false;
670  std::vector<std::string> r_list;
671  for (const ParticleTypePtr A_type : A_isotype.get_states()) {
672  for (const ParticleTypePtr B_type : B_isotype.get_states()) {
673  if (A_type > B_type) {
674  continue;
675  }
676  ParticleData A(*A_type), B(*B_type);
677  for (auto mom : momentum_scan_list) {
678  A.set_4momentum(A.pole_mass(), mom, 0.0, 0.0);
679  B.set_4momentum(B.pole_mass(), -mom, 0.0, 0.0);
680  ScatterActionPtr act = make_unique<ScatterAction>(
681  A, B, time, isotropic_, string_formation_time_);
682  if (strings_switch_) {
683  act->set_string_interface(string_process_interface_.get());
684  }
685  act->add_all_scatterings(
690  const double total_cs = act->cross_section();
691  if (total_cs <= 0.0) {
692  continue;
693  }
694  any_nonzero_cs = true;
695  for (const auto& channel : act->collision_channels()) {
696  const auto type = channel->get_type();
697  std::string r;
698  if (is_string_soft_process(type) ||
699  type == ProcessType::StringHard) {
700  r = A_type->name() + B_type->name() + std::string(" → strings");
701  } else {
702  std::string r_type =
703  (type == ProcessType::Elastic)
704  ? std::string(" (el)")
705  : (channel->get_type() == ProcessType::TwoToTwo)
706  ? std::string(" (inel)")
707  : std::string(" (?)");
708  r = A_type->name() + B_type->name() + std::string(" → ") +
709  channel->particle_types()[0]->name() +
710  channel->particle_types()[1]->name() + r_type;
711  }
712  isoclean(r);
713  r_list.push_back(r);
714  }
715  }
716  }
717  }
718  std::sort(r_list.begin(), r_list.end());
719  r_list.erase(std::unique(r_list.begin(), r_list.end()), r_list.end());
720  if (any_nonzero_cs) {
721  for (auto r : r_list) {
722  std::cout << r;
723  if (r_list.back() != r) {
724  std::cout << ", ";
725  }
726  }
727  std::cout << std::endl;
728  }
729  }
730  }
731 }
Here is the call graph for this function:

◆ dump_cross_sections()

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).

Parameters
[in]aThe specie of the first incoming particle.
[in]bThe specie of the second incoming particle.
[in]m_aMass of species a [GeV].
[in]m_bMass of species b [GeV].
[in]final_stateWhether the final state cross sections should be printed.
[in]plabOptional momenta in lab frame to be evaluated [GeV]. Ignored if empty.

Definition at line 1042 of file scatteractionsfinder.cc.

1044  {
1045  typedef std::vector<std::pair<double, double>> xs_saver;
1046  std::map<std::string, xs_saver> xs_dump;
1047  std::map<std::string, double> outgoing_total_mass;
1048 
1049  ParticleData a_data(a), b_data(b);
1050  int n_momentum_points = 200;
1051  constexpr double momentum_step = 0.02;
1052  /*
1053  // Round to output precision.
1054  for (auto& p : plab) {
1055  p = std::floor((p * 100000) + 0.5) / 100000;
1056  }
1057  */
1058  if (plab.size() > 0) {
1059  n_momentum_points = plab.size();
1060  // Remove duplicates.
1061  std::sort(plab.begin(), plab.end());
1062  plab.erase(std::unique(plab.begin(), plab.end()), plab.end());
1063  }
1064  for (int i = 0; i < n_momentum_points; i++) {
1065  double momentum;
1066  if (plab.size() > 0) {
1067  momentum = pCM_from_s(s_from_plab(plab.at(i), m_a, m_b), m_a, m_b);
1068  } else {
1069  momentum = momentum_step * (i + 1);
1070  }
1071  a_data.set_4momentum(m_a, momentum, 0.0, 0.0);
1072  b_data.set_4momentum(m_b, -momentum, 0.0, 0.0);
1073  const double sqrts = (a_data.momentum() + b_data.momentum()).abs();
1074  const ParticleList incoming = {a_data, b_data};
1075  ScatterActionPtr act = make_unique<ScatterAction>(
1076  a_data, b_data, 0., isotropic_, string_formation_time_);
1077  if (strings_switch_) {
1078  act->set_string_interface(string_process_interface_.get());
1079  }
1080  act->add_all_scatterings(elastic_parameter_, two_to_one_, incl_set_,
1084  decaytree::Node tree(a.name() + b.name(), act->cross_section(), {&a, &b},
1085  {&a, &b}, {&a, &b}, {});
1086  const CollisionBranchList& processes = act->collision_channels();
1087  for (const auto& process : processes) {
1088  const double xs = process->weight();
1089  if (xs <= 0.0) {
1090  continue;
1091  }
1092  if (!final_state) {
1093  std::stringstream process_description_stream;
1094  process_description_stream << *process;
1095  const std::string& description = process_description_stream.str();
1096  double m_tot = 0.0;
1097  for (const auto& ptype : process->particle_types()) {
1098  m_tot += ptype->mass();
1099  }
1100  outgoing_total_mass[description] = m_tot;
1101  if (!xs_dump[description].empty() &&
1102  std::abs(xs_dump[description].back().first - sqrts) <
1103  really_small) {
1104  xs_dump[description].back().second += xs;
1105  } else {
1106  xs_dump[description].push_back(std::make_pair(sqrts, xs));
1107  }
1108  } else {
1109  std::stringstream process_description_stream;
1110  process_description_stream << *process;
1111  const std::string& description = process_description_stream.str();
1112  ParticleTypePtrList initial_particles = {&a, &b};
1113  ParticleTypePtrList final_particles = process->particle_types();
1114  auto& process_node =
1115  tree.add_action(description, xs, std::move(initial_particles),
1116  std::move(final_particles));
1117  decaytree::add_decays(process_node, sqrts);
1118  }
1119  }
1120  xs_dump["total"].push_back(std::make_pair(sqrts, act->cross_section()));
1121  // Total cross-section should be the first in the list -> negative mass
1122  outgoing_total_mass["total"] = -1.0;
1123  if (final_state) {
1124  // tree.print();
1125  auto final_state_xs = tree.final_state_cross_sections();
1126  deduplicate(final_state_xs);
1127  for (const auto& p : final_state_xs) {
1128  // Don't print empty columns.
1129  //
1130  // FIXME(steinberg): The better fix would be to not have them in the
1131  // first place.
1132  if (p.name_ == "") {
1133  continue;
1134  }
1135  outgoing_total_mass[p.name_] = p.mass_;
1136  xs_dump[p.name_].push_back(std::make_pair(sqrts, p.cross_section_));
1137  }
1138  }
1139  }
1140  // Get rid of cross sections that are zero.
1141  // (This only happens if their is a resonance in the final state that cannot
1142  // decay with our simplified assumptions.)
1143  for (auto it = begin(xs_dump); it != end(xs_dump);) {
1144  // Sum cross section over all energies.
1145  const xs_saver& xs = (*it).second;
1146  double sum = 0;
1147  for (const auto& p : xs) {
1148  sum += p.second;
1149  }
1150  if (sum == 0.) {
1151  it = xs_dump.erase(it);
1152  } else {
1153  ++it;
1154  }
1155  }
1156 
1157  // Nice ordering of channels by summed pole mass of products
1158  std::vector<std::string> all_channels;
1159  for (const auto& channel : xs_dump) {
1160  all_channels.push_back(channel.first);
1161  }
1162  std::sort(all_channels.begin(), all_channels.end(),
1163  [&](const std::string& str_a, const std::string& str_b) {
1164  return outgoing_total_mass[str_a] < outgoing_total_mass[str_b];
1165  });
1166 
1167  // Print header
1168  std::cout << "# Dumping partial " << a.name() << b.name()
1169  << " cross-sections in mb, energies in GeV" << std::endl;
1170  std::cout << " sqrt_s";
1171  // Align everything to 16 unicode characters.
1172  // This should be enough for the longest channel name (7 final-state
1173  // particles).
1174  for (const auto& channel : all_channels) {
1175  std::cout << utf8::fill_left(channel, 16, ' ');
1176  }
1177  std::cout << std::endl;
1178 
1179  // Print out all partial cross-sections in mb
1180  for (int i = 0; i < n_momentum_points; i++) {
1181  double momentum;
1182  if (plab.size() > 0) {
1183  momentum = pCM_from_s(s_from_plab(plab.at(i), m_a, m_b), m_a, m_b);
1184  } else {
1185  momentum = momentum_step * (i + 1);
1186  }
1187  a_data.set_4momentum(m_a, momentum, 0.0, 0.0);
1188  b_data.set_4momentum(m_b, -momentum, 0.0, 0.0);
1189  const double sqrts = (a_data.momentum() + b_data.momentum()).abs();
1190  std::printf("%9.6f", sqrts);
1191  for (const auto& channel : all_channels) {
1192  const xs_saver energy_and_xs = xs_dump[channel];
1193  size_t j = 0;
1194  for (; j < energy_and_xs.size() && energy_and_xs[j].first < sqrts; j++) {
1195  }
1196  double xs = 0.0;
1197  if (j < energy_and_xs.size() &&
1198  std::abs(energy_and_xs[j].first - sqrts) < really_small) {
1199  xs = energy_and_xs[j].second;
1200  }
1201  std::printf("%16.6f", xs); // Same alignment as in the header.
1202  }
1203  std::printf("\n");
1204  }
1205 }
Here is the call graph for this function:

◆ get_process_string_ptr()

StringProcess* smash::ScatterActionsFinder::get_process_string_ptr ( )
inline
Returns
Pointer to the string process class object. If string is turned off, the null pointer is returned.

Definition at line 269 of file scatteractionsfinder.h.

269  {
270  if (strings_switch_) {
271  return string_process_interface_.get();
272  } else {
273  return NULL;
274  }
275  }

◆ check_collision_two_part()

ActionPtr smash::ScatterActionsFinder::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
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 [4] (3.27). 2. A stochastic collision criterion e.g. employed by BAMPS Xu:2004mz [53] (Sec.IIB).

More details on the stochastic collision criterion can be found here:

  • P. Danielewicz and G. F. Bertsch, Nucl. Phys. A533, 712 (1991).
  • A. Lang, H. Babovsky, W. Cassing, U. Mosel, H. G. Reusch, and K. Weber, J. Comp. Phys. 106, 391 (1993).
  • W. Cassing, Nucl. Phys. A700, 618 (2002).
Parameters
[in]data_aFirst incoming particle
[in]data_bSecond incoming particle
[in]dtMaximum 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
Returns
A null pointer if no collision happens or an action which contains the information of the outgoing particles.

Note: gcell_vol is optional, since only find_actions_in_cell has (and needs) this information for the stochastic collision criterion.

Definition at line 371 of file scatteractionsfinder.cc.

374  {
375  /* If the two particles
376  * 1) belong to the two colliding nuclei
377  * 2) are within the same nucleus
378  * 3) both of them have never experienced any collisons,
379  * then the collision between them are banned. */
380  assert(data_a.id() >= 0);
381  assert(data_b.id() >= 0);
382  if (data_a.id() < N_tot_ && data_b.id() < N_tot_ &&
383  ((data_a.id() < N_proj_ && data_b.id() < N_proj_) ||
384  (data_a.id() >= N_proj_ && data_b.id() >= N_proj_)) &&
385  !(nucleon_has_interacted_[data_a.id()] ||
386  nucleon_has_interacted_[data_b.id()])) {
387  return nullptr;
388  }
389 
390  // No grid or search in cell means no collision for stochastic criterion
392  gcell_vol < really_small) {
393  return nullptr;
394  }
395 
396  // Determine time of collision.
397  const double time_until_collision =
398  collision_time(data_a, data_b, dt, beam_momentum);
399 
400  // Check that collision happens in this timestep.
401  if (time_until_collision < 0. || time_until_collision >= dt) {
402  return nullptr;
403  }
404 
405  // Create ScatterAction object.
406  ScatterActionPtr act = make_unique<ScatterAction>(
407  data_a, data_b, time_until_collision, isotropic_, string_formation_time_,
408  box_length_);
409 
411  act->set_stochastic_pos_idx();
412  }
413 
414  if (strings_switch_) {
415  act->set_string_interface(string_process_interface_.get());
416  }
417 
418  // Distance squared calculation not needed for stochastic criterion
419  const double distance_squared =
421  ? act->transverse_distance_sqr()
423  ? act->cov_transverse_distance_sqr()
424  : 0.0;
425 
426  // Don't calculate cross section if the particles are very far apart.
427  // Not needed for stochastic criterion because of cell structure.
429  distance_squared >= max_transverse_distance_sqr(testparticles_)) {
430  return nullptr;
431  }
432 
433  // Add various subprocesses.
434  act->add_all_scatterings(elastic_parameter_, two_to_one_, incl_set_,
438 
439  double xs =
440  act->cross_section() * fm2_mb / static_cast<double>(testparticles_);
441 
442  // Take cross section scaling factors into account
443  xs *= data_a.xsec_scaling_factor(time_until_collision);
444  xs *= data_b.xsec_scaling_factor(time_until_collision);
445 
447  const double v_rel = act->relative_velocity();
448  /* Collision probability for 2-particle scattering, see e.g.
449  * \iref{Xu:2004mz}, eq. (11) */
450  const double prob = xs * v_rel * dt / gcell_vol;
451 
452  logg[LFindScatter].debug(
453  "Stochastic collison criterion parameters (2-particles):\nprob = ",
454  prob, ", xs = ", xs, ", v_rel = ", v_rel, ", dt = ", dt,
455  ", gcell_vol = ", gcell_vol, ", testparticles = ", testparticles_);
456 
457  if (prob > 1.) {
458  std::stringstream err;
459  err << "Probability larger than 1 for stochastic rates. ( P_22 = " << prob
460  << " )\nConsider using smaller timesteps.";
462  logg[LFindScatter].warn(err.str());
463  } else {
464  throw std::runtime_error(err.str());
465  }
466  }
467 
468  // probability criterion
469  double random_no = random::uniform(0., 1.);
470  if (random_no > prob) {
471  return nullptr;
472  }
473 
476  // just collided with this particle
477  if (data_a.id_process() > 0 && data_a.id_process() == data_b.id_process()) {
478  logg[LFindScatter].debug("Skipping collided particles at time ",
479  data_a.position().x0(), " due to process ",
480  data_a.id_process(), "\n ", data_a, "\n<-> ",
481  data_b);
482 
483  return nullptr;
484  }
485 
486  // Cross section for collision criterion
487  const double cross_section_criterion = xs * M_1_PI;
488 
489  // distance criterion according to cross_section
490  if (distance_squared >= cross_section_criterion) {
491  return nullptr;
492  }
493 
494  logg[LFindScatter].debug("particle distance squared: ", distance_squared,
495  "\n ", data_a, "\n<-> ", data_b);
496  }
497 
498  // Using std::move here is redundant with newer compilers, but required for
499  // supporting GCC 4.8. Once we drop this support, std::move should be removed.
500  return std::move(act);
501 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_collision_multi_part()

ActionPtr smash::ScatterActionsFinder::check_collision_multi_part ( const ParticleList &  plist,
double  dt,
const double  gcell_vol 
) const
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 e.g. employed by BAMPS Xu:2004mz [53] (Sec.IIB). Following the same general idea as for the 2-particle scatterings, probabilities for multi-particle scatterings can be derived.

Parameters
[in]plistList of incoming particles
[in]dtMaximum time interval within which a collision can happen
[in]gcell_volvolume of grid cell in which the collision is checked
Returns
A null pointer if no collision happens or an action which contains the information of the outgoing particles.

Definition at line 503 of file scatteractionsfinder.cc.

504  {
505  /* If the two particles
506  * 1) belong to the two colliding nuclei
507  * 2) are within the same nucleus
508  * 3) both of them have never experienced any collisons,
509  * then the collision between them are banned also for multi-particle
510  * interactions. */
511  if (std::all_of(
512  plist.begin(), plist.end(),
513  [&](const ParticleData& data) { return data.id() < N_tot_; }) &&
514  (std::all_of(
515  plist.begin(), plist.end(),
516  [&](const ParticleData& data) { return data.id() < N_proj_; }) ||
517  std::all_of(
518  plist.begin(), plist.end(),
519  [&](const ParticleData& data) { return data.id() >= N_proj_; })) &&
520  std::none_of(plist.begin(), plist.end(), [&](const ParticleData& data) {
521  return nucleon_has_interacted_[data.id()];
522  })) {
523  return nullptr;
524  }
525 
526  // No grid or search in cell
527  if (gcell_vol < really_small) {
528  return nullptr;
529  }
530 
531  /* Optimisation for later: Already check here at the beginning
532  * if collision with plist is possible before constructing actions. */
533 
534  // 1. Determine time of collision.
535  const double time_until_collision = dt * random::uniform(0., 1.);
536 
537  // 2. Create ScatterAction object.
538  ScatterActionMultiPtr act =
539  make_unique<ScatterActionMulti>(plist, time_until_collision);
540 
541  act->set_stochastic_pos_idx();
542 
543  // 3. Add possible final states (dt and gcell_vol for probability calculation)
544  act->add_possible_reactions(dt, gcell_vol, incl_multi_set_);
545 
546  /* 4. Return total collision probability
547  * Scales with 1 over the number of testpartciles to the power of the
548  * number of incoming particles - 1) */
549  const double prob =
550  act->get_total_weight() / std::pow(testparticles_, plist.size() - 1);
551 
552  // 5. Check that probability is smaller than one
553  if (prob > 1.) {
554  std::stringstream err;
555  err << "Probability larger than 1 for stochastic rates. ( P_nm = " << prob
556  << " )\nConsider using smaller timesteps.";
558  logg[LFindScatter].warn(err.str());
559  } else {
560  throw std::runtime_error(err.str());
561  }
562  }
563 
564  // 6. Perform probability decisions
565  double random_no = random::uniform(0., 1.);
566  if (random_no > prob) {
567  return nullptr;
568  }
569 
570  return std::move(act);
571 }
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ string_process_interface_

std::unique_ptr<StringProcess> smash::ScatterActionsFinder::string_process_interface_
private

Class that deals with strings, interfacing Pythia.

Definition at line 330 of file scatteractionsfinder.h.

◆ coll_crit_

const CollisionCriterion smash::ScatterActionsFinder::coll_crit_
private

Specifies which collision criterion is used.

Definition at line 332 of file scatteractionsfinder.h.

◆ elastic_parameter_

const double smash::ScatterActionsFinder::elastic_parameter_
private

Elastic cross section parameter (in mb).

Definition at line 334 of file scatteractionsfinder.h.

◆ testparticles_

const int smash::ScatterActionsFinder::testparticles_
private

Number of test particles.

Definition at line 336 of file scatteractionsfinder.h.

◆ isotropic_

const bool smash::ScatterActionsFinder::isotropic_
private

Do all collisions isotropically.

Definition at line 338 of file scatteractionsfinder.h.

◆ two_to_one_

const bool smash::ScatterActionsFinder::two_to_one_
private

Enable 2->1 processes.

Definition at line 340 of file scatteractionsfinder.h.

◆ incl_set_

const ReactionsBitSet smash::ScatterActionsFinder::incl_set_
private

List of included 2<->2 reactions.

Definition at line 342 of file scatteractionsfinder.h.

◆ incl_multi_set_

const MultiParticleReactionsBitSet smash::ScatterActionsFinder::incl_multi_set_
private

List of included multi-particle reactions.

Definition at line 344 of file scatteractionsfinder.h.

◆ scale_xs_

const double smash::ScatterActionsFinder::scale_xs_
private

Factor by which all (partial) cross sections are scaled.

Definition at line 346 of file scatteractionsfinder.h.

◆ additional_el_xs_

const double smash::ScatterActionsFinder::additional_el_xs_
private

Additional constant elastic cross section.

Definition at line 348 of file scatteractionsfinder.h.

◆ low_snn_cut_

const double smash::ScatterActionsFinder::low_snn_cut_
private

Elastic collsions between two nucleons with sqrt_s below low_snn_cut_ are excluded.

Definition at line 353 of file scatteractionsfinder.h.

◆ strings_switch_

const bool smash::ScatterActionsFinder::strings_switch_
private

Switch to turn off string excitation.

Definition at line 355 of file scatteractionsfinder.h.

◆ use_AQM_

const bool smash::ScatterActionsFinder::use_AQM_
private

Switch to control whether to use AQM or not.

Definition at line 357 of file scatteractionsfinder.h.

◆ strings_with_probability_

const bool smash::ScatterActionsFinder::strings_with_probability_
private

Decide whether to implement string fragmentation based on a probability.

Definition at line 359 of file scatteractionsfinder.h.

◆ nnbar_treatment_

const NNbarTreatment smash::ScatterActionsFinder::nnbar_treatment_
private

Switch for NNbar reactions.

Definition at line 361 of file scatteractionsfinder.h.

◆ box_length_

const double smash::ScatterActionsFinder::box_length_
private

Box length: needed to determine coordinates of collision correctly in case of collision through the wall.

Ignored if negative.

Definition at line 367 of file scatteractionsfinder.h.

◆ nucleon_has_interacted_

const std::vector<bool>& smash::ScatterActionsFinder::nucleon_has_interacted_
private

Parameter to record whether the nucleon has experienced a collision or not.

Definition at line 371 of file scatteractionsfinder.h.

◆ N_tot_

const int smash::ScatterActionsFinder::N_tot_
private

Record the total number of the nucleons in the two colliding nuclei.

Definition at line 373 of file scatteractionsfinder.h.

◆ N_proj_

const int smash::ScatterActionsFinder::N_proj_
private

Record the number of the nucleons in the projectile.

Definition at line 375 of file scatteractionsfinder.h.

◆ string_formation_time_

const double smash::ScatterActionsFinder::string_formation_time_
private

Parameter for formation time.

Definition at line 377 of file scatteractionsfinder.h.

◆ maximum_cross_section_

const double smash::ScatterActionsFinder::maximum_cross_section_
private
See also
input_collision_term_

Definition at line 379 of file scatteractionsfinder.h.

◆ only_warn_for_high_prob_

const bool smash::ScatterActionsFinder::only_warn_for_high_prob_
private

Switch to turn off throwing an exception for collision probabilities larger than 1.

In larger production runs it is ok, if the probability rarely slips over 1.

Definition at line 385 of file scatteractionsfinder.h.


The documentation for this class was generated from the following files:
smash::ScatterActionsFinder::low_snn_cut_
const double low_snn_cut_
Elastic collsions between two nucleons with sqrt_s below low_snn_cut_ are excluded.
Definition: scatteractionsfinder.h:353
smash::ProcessType::StringHard
hard string process involving 2->2 QCD process by PYTHIA.
smash::ScatterActionsFinder::string_formation_time_
const double string_formation_time_
Parameter for formation time.
Definition: scatteractionsfinder.h:377
smash::ScatterActionsFinder::elastic_parameter_
const double elastic_parameter_
Elastic cross section parameter (in mb).
Definition: scatteractionsfinder.h:334
smash::ScatterActionsFinder::string_process_interface_
std::unique_ptr< StringProcess > string_process_interface_
Class that deals with strings, interfacing Pythia.
Definition: scatteractionsfinder.h:330
smash::ScatterActionsFinder::additional_el_xs_
const double additional_el_xs_
Additional constant elastic cross section.
Definition: scatteractionsfinder.h:348
smash::s_from_plab
double s_from_plab(double plab, double m_P, double m_T)
Convert p_lab to Mandelstam-s for a fixed-target setup, with a projectile of mass m_P and momentum pl...
Definition: kinematics.h:224
smash::ScatterActionsFinder::testparticles_
const int testparticles_
Number of test particles.
Definition: scatteractionsfinder.h:336
smash::utf8::fill_left
std::string fill_left(const std::string &s, size_t width, char fill=' ')
Fill string with characters to the left until the given width is reached.
Definition: stringfunctions.cc:47
smash::is_string_soft_process
bool is_string_soft_process(ProcessType p)
Check if a given process type is a soft string excitation.
Definition: processbranch.cc:18
smash::ScatterActionsFinder::incl_set_
const ReactionsBitSet incl_set_
List of included 2<->2 reactions.
Definition: scatteractionsfinder.h:342
smash::ScatterActionsFinder::strings_with_probability_
const bool strings_with_probability_
Decide whether to implement string fragmentation based on a probability.
Definition: scatteractionsfinder.h:359
smash::ScatterActionsFinder::check_collision_multi_part
ActionPtr check_collision_multi_part(const ParticleList &plist, double dt, const double gcell_vol) const
Check for multiple i.e.
Definition: scatteractionsfinder.cc:503
smash::ScatterActionsFinder::two_to_one_
const bool two_to_one_
Enable 2->1 processes.
Definition: scatteractionsfinder.h:340
smash::LFindScatter
static constexpr int LFindScatter
Definition: scatteractionsfinder.cc:26
smash::ScatterActionsFinder::nucleon_has_interacted_
const std::vector< bool > & nucleon_has_interacted_
Parameter to record whether the nucleon has experienced a collision or not.
Definition: scatteractionsfinder.h:371
smash::ProcessType::TwoToTwo
2->2 inelastic scattering
smash::ScatterActionsFinder::max_transverse_distance_sqr
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...
Definition: scatteractionsfinder.h:236
smash::logg
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
smash::all_of
bool all_of(Container &&c, UnaryPredicate &&p)
Convenience wrapper for std::all_of that operates on a complete container.
Definition: algorithms.h:80
smash::deduplicate
static void deduplicate(std::vector< FinalStateCrossSection > &final_state_xs)
Deduplicate the final-state cross sections by summing.
Definition: scatteractionsfinder.cc:1023
smash::really_small
constexpr double really_small
Numerical error tolerance.
Definition: constants.h:37
smash::ScatterActionsFinder::incl_multi_set_
const MultiParticleReactionsBitSet incl_multi_set_
List of included multi-particle reactions.
Definition: scatteractionsfinder.h:344
Deuteron_3to2
Definition: forwarddeclarations.h:236
smash::ScatterActionsFinder::collision_time
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.
Definition: scatteractionsfinder.h:77
smash::isoclean
void isoclean(std::string &s)
Remove ⁺, ⁻, ⁰ from string.
Definition: stringfunctions.cc:92
smash::ScatterActionsFinder::nnbar_treatment_
const NNbarTreatment nnbar_treatment_
Switch for NNbar reactions.
Definition: scatteractionsfinder.h:361
CollisionCriterion::Stochastic
Stochastic Criteiron.
CollisionCriterion::Covariant
Covariant Criterion.
smash::ScatterActionsFinder::strings_switch_
const bool strings_switch_
Switch to turn off string excitation.
Definition: scatteractionsfinder.h:355
smash::decaytree::add_decays
static void add_decays(Node &node, double sqrts)
Add nodes for all decays possible from the given node and all of its children.
Definition: scatteractionsfinder.cc:961
smash::ScatterActionsFinder::is_constant_elastic_isotropic
bool is_constant_elastic_isotropic() const
If there is only one particle sort, no decays (only elastic scatterings are possible),...
Definition: scatteractionsfinder.h:221
smash::ScatterActionsFinder::only_warn_for_high_prob_
const bool only_warn_for_high_prob_
Switch to turn off throwing an exception for collision probabilities larger than 1.
Definition: scatteractionsfinder.h:385
NDeuteron_to_Ndprime
Definition: forwarddeclarations.h:227
smash::ScatterActionsFinder::maximum_cross_section_
const double maximum_cross_section_
Definition: scatteractionsfinder.h:379
smash::ScatterActionsFinder::isotropic_
const bool isotropic_
Do all collisions isotropically.
Definition: scatteractionsfinder.h:338
smash::ScatterActionsFinder::check_collision_two_part
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...
Definition: scatteractionsfinder.cc:371
smash::ScatterActionsFinder::use_AQM_
const bool use_AQM_
Switch to control whether to use AQM or not.
Definition: scatteractionsfinder.h:357
smash::fm2_mb
constexpr double fm2_mb
mb <-> fm^2 conversion factor.
Definition: constants.h:28
smash::ProcessType::Elastic
elastic scattering: particles remain the same, only momenta change
smash::ScatterActionsFinder::scale_xs_
const double scale_xs_
Factor by which all (partial) cross sections are scaled.
Definition: scatteractionsfinder.h:346
smash::pdg::p
constexpr int p
Proton.
Definition: pdgcode_constants.h:28
smash::random::uniform
T uniform(T min, T max)
Definition: random.h:88
PiDeuteron_to_pidprime
Definition: forwarddeclarations.h:226
smash::ScatterActionsFinder::N_tot_
const int N_tot_
Record the total number of the nucleons in the two colliding nuclei.
Definition: scatteractionsfinder.h:373
CollisionCriterion::Geometric
(Default) geometric criterion.
smash::ScatterActionsFinder::N_proj_
const int N_proj_
Record the number of the nucleons in the projectile.
Definition: scatteractionsfinder.h:375
smash::ScatterActionsFinder::coll_crit_
const CollisionCriterion coll_crit_
Specifies which collision criterion is used.
Definition: scatteractionsfinder.h:332
smash::IsoParticleType::list_all
static const IsoParticleTypeList & list_all()
Returns a list of all IsoParticleTypes.
Definition: isoparticletype.cc:42
smash::ParticleType::list_all
static const ParticleTypeList & list_all()
Definition: particletype.cc:51
smash::pCM_from_s
T pCM_from_s(const T s, const T mass_a, const T mass_b) noexcept
Definition: kinematics.h:66
smash::ScatterActionsFinder::box_length_
const double box_length_
Box length: needed to determine coordinates of collision correctly in case of collision through the w...
Definition: scatteractionsfinder.h:367