#include <scatteraction.h>
ScatterAction is a special action which takes two incoming particles and performs a scattering, producing one or more final-state particles.
Definition at line 30 of file scatteraction.h.
Classes | |
| class | InvalidScatterAction |
| Thrown when ScatterAction is called to perform with unknown ProcessType. More... | |
Public Member Functions | |
| ScatterAction (const ParticleData &in_part1, const ParticleData &in_part2, double time, bool isotropic=false, double string_formation_time=1.0, double box_length=-1.0, bool is_total_parametrized=false, const SpinInteractionType spin_interaction_type=SpinInteractionType::Off) | |
| Construct a ScatterAction object. More... | |
| void | add_collision (CollisionBranchPtr p) |
| Add a new collision channel. More... | |
| void | add_collisions (CollisionBranchList pv) |
| Add several new collision channels at once. More... | |
| double | transverse_distance_sqr () const |
| Calculate the transverse distance of the two incoming particles in their local rest frame. More... | |
| double | cov_transverse_distance_sqr () const |
| Calculate the transverse distance of the two incoming particles in their local rest frame written in a covariant form. More... | |
| double | mandelstam_s () const |
| Determine the Mandelstam s variable,. More... | |
| double | relative_velocity () const |
| Get the relative velocity of the two incoming particles. More... | |
| void | generate_final_state () override |
| Generate the final-state of the scattering process. More... | |
| double | get_total_weight () const override |
| Get the total cross section of scattering particles. More... | |
| double | get_partial_weight () const override |
| Get the partial cross section of the chosen channel. More... | |
| void | sample_angles (std::pair< double, double > masses, double kinetic_energy_cm) override |
| Sample final-state angles in a 2->2 collision (possibly anisotropic). More... | |
| void | add_all_scatterings (const ScatterActionsFinderParameters &finder_parameters) |
| Add all possible scattering subprocesses for this action object. More... | |
| void | set_parametrized_total_cross_section (const ScatterActionsFinderParameters &finder_parameters) |
| Given the incoming particles, assigns the correct parametrization of the total cross section. More... | |
| const CollisionBranchList & | collision_channels () |
| Get list of possible collision channels. More... | |
| void | set_string_interface (StringProcess *str_proc) |
| Set the StringProcess object to be used. More... | |
| virtual double | cross_section () const |
| Get the total cross section of the scattering particles, either from a parametrization, or from the sum of partials. More... | |
Public Member Functions inherited from smash::Action | |
| Action (const ParticleList &in_part, double time) | |
| Construct an action object with incoming particles and relative time. More... | |
| Action (const ParticleData &in_part, const ParticleData &out_part, double time, ProcessType type) | |
| Construct an action object with the incoming particles, relative time, and the already known outgoing particles and type of the process. More... | |
| Action (const ParticleList &in_part, const ParticleList &out_part, double absolute_execution_time, ProcessType type) | |
| Construct an action object with the incoming particles, absolute time, and the already known outgoing particles and type of the process. More... | |
| Action (const Action &)=delete | |
| Copying is disabled. Use pointers or create a new Action. More... | |
| virtual | ~Action () |
| Virtual Destructor. More... | |
| bool | operator< (const Action &rhs) const |
| Determine whether one action takes place before another in time. More... | |
| virtual ProcessType | get_type () const |
| Get the process type. More... | |
| template<typename Branch > | |
| void | add_process (ProcessBranchPtr< Branch > &p, ProcessBranchList< Branch > &subprocesses, double &total_weight) |
| Add a new subprocess. More... | |
| template<typename Branch > | |
| void | add_processes (ProcessBranchList< Branch > pv, ProcessBranchList< Branch > &subprocesses, double &total_weight) |
| Add several new subprocesses at once. More... | |
| virtual double | perform (Particles *particles, uint32_t id_process) |
| Actually perform the action, e.g. More... | |
| bool | is_valid (const Particles &particles) const |
| Check whether the action still applies. More... | |
| bool | is_pauli_blocked (const std::vector< Particles > &ensembles, const PauliBlocker &p_bl) const |
| Check if the action is Pauli-blocked. More... | |
| const ParticleList & | incoming_particles () const |
| Get the list of particles that go into the action. More... | |
| void | update_incoming (const Particles &particles) |
| Update the incoming particles that are stored in this action to the state they have in the global particle list. More... | |
| const ParticleList & | outgoing_particles () const |
| Get the list of particles that resulted from the action. More... | |
| double | time_of_execution () const |
| Get the time at which the action is supposed to be performed. More... | |
| virtual double | check_conservation (const uint32_t id_process) const |
| Check various conservation laws. More... | |
| double | sqrt_s () const |
| Determine the total energy in the center-of-mass frame [GeV]. More... | |
| FourVector | total_momentum_of_outgoing_particles () const |
| Calculate the total kinetic momentum of the outgoing particles. More... | |
| FourVector | get_interaction_point () const |
| Get the interaction point. More... | |
| std::pair< FourVector, FourVector > | get_potential_at_interaction_point () const |
| Get the skyrme and asymmetry potential at the interaction point. More... | |
| void | set_stochastic_pos_idx () |
| Setter function that stores a random incoming particle index latter used to determine the interaction point. More... | |
| void | assign_unpolarized_spin_vector_to_outgoing_particles () |
| Assign an unpolarized spin vector to all outgoing particles. More... | |
Protected Member Functions | |
| double | cm_momentum () const |
| Get the momentum of the center of mass of the incoming particles in the calculation frame. More... | |
| double | cm_momentum_squared () const |
| Get the squared momentum of the center of mass of the incoming particles in the calculation frame. More... | |
| ThreeVector | beta_cm () const |
| Get the velocity of the center of mass of the scattering/incoming particles in the calculation frame. More... | |
| double | gamma_cm () const |
| Get the gamma factor corresponding to a boost to the center of mass frame of the colliding particles. More... | |
| void | elastic_scattering () |
| Perform an elastic two-body scattering, i.e. just exchange momentum. More... | |
| void | inelastic_scattering () |
| Perform an inelastic two-body scattering, i.e. new particles are formed. More... | |
| void | two_to_many_scattering () |
| Perform an inelastic two-to-many-body scattering (more than 2) More... | |
| void | create_string_final_state () |
| Creates the final states for string-processes after they are performed. More... | |
| void | string_excitation () |
| Todo(ryu): document better - it is not really UrQMD-based, isn't it? Perform the UrQMD-based string excitation and decay. More... | |
| void | spin_interaction () |
| Perform spin interaction in binary interactions. More... | |
| void | string_spin_interaction () |
| Perform spin interaction in string excitations. More... | |
| void | format_debug_output (std::ostream &out) const override |
Writes information about this scatter action to the out stream. More... | |
Protected Member Functions inherited from smash::Action | |
| FourVector | total_momentum () const |
| Sum of 4-momenta of incoming particles. More... | |
| template<typename Branch > | |
| const Branch * | choose_channel (const ProcessBranchList< Branch > &subprocesses, double total_weight) |
| Decide for a particular final-state channel via Monte-Carlo and return it as a ProcessBranch. More... | |
| virtual std::pair< double, double > | sample_masses (double kinetic_energy_cm) const |
| Sample final-state masses in general X->2 processes (thus also fixing the absolute c.o.m. More... | |
| virtual void | sample_2body_phasespace () |
| Sample the full 2-body phase-space (masses, momenta, angles) in the center-of-mass frame for the final state particles. More... | |
| virtual void | sample_manybody_phasespace () |
| Sample the full n-body phase-space (masses, momenta, angles) in the center-of-mass frame for the final state particles. More... | |
| void | assign_formation_time_to_outgoing_particles () |
| Assign the formation time to the outgoing particles. More... | |
Protected Attributes | |
| CollisionBranchList | collision_channels_ |
| List of possible collisions. More... | |
| double | sum_of_partial_cross_sections_ |
| Current sum of partial hadronic cross sections. More... | |
| double | partial_cross_section_ |
| Partial cross-section to the chosen outgoing channel. More... | |
| bool | isotropic_ = false |
| Do this collision isotropically? More... | |
| double | string_formation_time_ = 1.0 |
| Time fragments take to be fully formed in hard string excitation. More... | |
Protected Attributes inherited from smash::Action | |
| ParticleList | incoming_particles_ |
| List with data of incoming particles. More... | |
| ParticleList | outgoing_particles_ |
| Initially this stores only the PDG codes of final-state particles. More... | |
| const double | time_of_execution_ |
| Time at which the action is supposed to be performed (absolute time in the lab frame in fm). More... | |
| ProcessType | process_type_ |
| type of process More... | |
| double | box_length_ = -1.0 |
| Box length: needed to determine coordinates of collision correctly in case of collision through the wall. More... | |
| int | stochastic_position_idx_ = -1 |
| This stores a randomly-chosen index to an incoming particle. More... | |
Private Member Functions | |
| bool | is_elastic () const |
| Check if the scattering is elastic. More... | |
| void | resonance_formation () |
| Perform a 2->1 resonance-formation process. More... | |
| void | rescale_outgoing_branches () |
| Loop over the possible branches and rescales their weight according to the desired total cross section. More... | |
| ParticleTypePtr | try_find_pseudoresonance (const PseudoResonance method, const StringTransitionParameters &transition) const |
| Try to find a pseudo-resonance that can be created from the incoming particles using a given method. More... | |
Private Attributes | |
| StringProcess * | string_process_ = nullptr |
| Pointer to interface class for strings. More... | |
| bool | is_total_parametrized_ = false |
| Whether the total cross section is parametrized. More... | |
| std::optional< double > | parametrized_total_cross_section_ = std::nullopt |
| If cross section is parametrized, store the value. More... | |
| SpinInteractionType | spin_interaction_type_ = SpinInteractionType::Off |
| What kind of spin interaction to use. More... | |
| bool | were_processes_added_ = false |
| Lock for calling add_all_scatterings only once. More... | |
Static Private Attributes | |
| static std::set< std::set< ParticleTypePtr > > | warned_no_rescaling_available {} |
| Warn about zero cross section only once per particle type pair. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from smash::Action | |
| static double | lambda_tilde (double a, double b, double c) |
| Little helper function that calculates the lambda function (sometimes written with a tilde to better distinguish it) that appears e.g. More... | |
| static void | sample_manybody_phasespace_impl (double sqrts, const std::vector< double > &m, std::vector< FourVector > &sampled_momenta) |
| Implementation of the full n-body phase-space sampling (masses, momenta, angles) in the center-of-mass frame for the final state particles. More... | |
| smash::ScatterAction::ScatterAction | ( | const ParticleData & | in_part1, |
| const ParticleData & | in_part2, | ||
| double | time, | ||
| bool | isotropic = false, |
||
| double | string_formation_time = 1.0, |
||
| double | box_length = -1.0, |
||
| bool | is_total_parametrized = false, |
||
| const SpinInteractionType | spin_interaction_type = SpinInteractionType::Off |
||
| ) |
Construct a ScatterAction object.
| [in] | in_part1 | first scattering partner |
| [in] | in_part2 | second scattering partner |
| [in] | time | Time at which the action is supposed to take place |
| [in] | isotropic | if true, do the collision isotropically |
| [in] | string_formation_time | Time string fragments take to form |
| [in] | box_length | Passing box length to determine coordinate of the collision, in case it happened through the wall in a box. If negative, then there is no wrapping. |
| [in] | is_total_parametrized | Whether the total cross section used for collision finding is parametrized |
| [in] | spin_interaction_type | Which type of spin interaction to use |
Definition at line 28 of file scatteraction.cc.
| void smash::ScatterAction::add_collision | ( | CollisionBranchPtr | p | ) |
Add a new collision channel.
| [in] | p | Channel to be added. |
Definition at line 47 of file scatteraction.cc.
| void smash::ScatterAction::add_collisions | ( | CollisionBranchList | pv | ) |
Add several new collision channels at once.
| [in] | pv | list of channels to be added. |
Definition at line 52 of file scatteraction.cc.
| double smash::ScatterAction::transverse_distance_sqr | ( | ) | const |
Calculate the transverse distance of the two incoming particles in their local rest frame.
According to UrQMD criterion, Bass:1998ca [6] eq. (3.27):
\[ d^2_\mathrm{coll} = (\mathbf{x}_a - \mathbf{x}_b)^2 - \frac{\bigl[(\mathbf{x}_a - \mathbf{x}_b) \cdot (\mathbf{p}_a - \mathbf{p}_b)\bigr]^2 } {(\mathbf{p}_a - \mathbf{p}_b)^2} \]
Definition at line 366 of file scatteraction.cc.
| double smash::ScatterAction::cov_transverse_distance_sqr | ( | ) | const |
Calculate the transverse distance of the two incoming particles in their local rest frame written in a covariant form.
Equivalent to the UrQMD transverse distance. See Hirano:2012yy [28] (5.6)-(5.11).
Definition at line 402 of file scatteraction.cc.
| double smash::ScatterAction::mandelstam_s | ( | ) | const |
Determine the Mandelstam s variable,.
\[s = (p_a + p_b)^2\]
Equal to the square of CMS energy.
Definition at line 343 of file scatteraction.cc.
| double smash::ScatterAction::relative_velocity | ( | ) | const |
Get the relative velocity of the two incoming particles.
For a defintion see e.g. Seifert:2017oyb [55], eq. (5)
Definition at line 357 of file scatteraction.cc.
|
overridevirtual |
Generate the final-state of the scattering process.
Performs either elastic or inelastic scattering.
| InvalidScatterAction |
Implements smash::Action.
Reimplemented in smash::ScatterActionPhoton.
Definition at line 57 of file scatteraction.cc.
|
overridevirtual |
Get the total cross section of scattering particles.
Implements smash::Action.
Reimplemented in smash::ScatterActionPhoton.
Definition at line 324 of file scatteraction.cc.
|
overridevirtual |
Get the partial cross section of the chosen channel.
Implements smash::Action.
Definition at line 330 of file scatteraction.cc.
|
overridevirtual |
Sample final-state angles in a 2->2 collision (possibly anisotropic).
NN → NN: Choose angular distribution according to Cugnon parametrization, see Cugnon:1996kh [19].
NN → NΔ: Sample scattering angles in center-of-mass frame from an anisotropic angular distribution, using the same distribution as for elastic pp scattering, as suggested in Cugnon:1996kh [19].
NN → NR: Fit to HADES data, see Agakishiev:2014wqa [2].
Reimplemented from smash::Action.
Definition at line 486 of file scatteraction.cc.
| void smash::ScatterAction::add_all_scatterings | ( | const ScatterActionsFinderParameters & | finder_parameters | ) |
Add all possible scattering subprocesses for this action object.
This can only be called once per ScatterAction instance.
| [in] | finder_parameters | parameters for collision finding. |
Definition at line 139 of file scatteraction.cc.
| void smash::ScatterAction::set_parametrized_total_cross_section | ( | const ScatterActionsFinderParameters & | finder_parameters | ) |
Given the incoming particles, assigns the correct parametrization of the total cross section.
| [in] | finder_parameters | Parameters for collision finding. |
Definition at line 307 of file scatteraction.cc.
|
inline |
Get list of possible collision channels.
Definition at line 167 of file scatteraction.h.
|
inline |
Set the StringProcess object to be used.
The StringProcess object is used to handle string excitation and to generate final state particles.
| [in] | str_proc | String process object to be used. |
Definition at line 187 of file scatteraction.h.
|
inlinevirtual |
Get the total cross section of the scattering particles, either from a parametrization, or from the sum of partials.
Definition at line 197 of file scatteraction.h.
|
protected |
Get the momentum of the center of mass of the incoming particles in the calculation frame.
Definition at line 345 of file scatteraction.cc.
|
protected |
Get the squared momentum of the center of mass of the incoming particles in the calculation frame.
Definition at line 351 of file scatteraction.cc.
|
protected |
Get the velocity of the center of mass of the scattering/incoming particles in the calculation frame.
Note: Do not use this function to boost the outgoing particles. Use total_momentum_of_outgoing_particles(), which corrects for the effect of potentials on intial and final state.
Definition at line 335 of file scatteraction.cc.
|
protected |
Get the gamma factor corresponding to a boost to the center of mass frame of the colliding particles.
Definition at line 339 of file scatteraction.cc.
|
protected |
Perform an elastic two-body scattering, i.e. just exchange momentum.
Definition at line 619 of file scatteraction.cc.
|
protected |
Perform an inelastic two-body scattering, i.e. new particles are formed.
Definition at line 629 of file scatteraction.cc.
|
protected |
Perform an inelastic two-to-many-body scattering (more than 2)
Definition at line 638 of file scatteraction.cc.
|
protected |
Creates the final states for string-processes after they are performed.
Definition at line 674 of file scatteraction.cc.
|
protected |
Todo(ryu): document better - it is not really UrQMD-based, isn't it? Perform the UrQMD-based string excitation and decay.
Definition at line 690 of file scatteraction.cc.
|
protected |
Perform spin interaction in binary interactions.
At the moment, we include a spin-flip in the y component of elastic scatterings if enabled.
Definition at line 795 of file scatteraction.cc.
|
protected |
Perform spin interaction in string excitations.
At the moment, we assign unpolarized spin vectors to the outgoing particles, unless the process is single diffractive, in which case we copy the spin vector of the elastically scattered particle to the corresponding outgoing particle.
Definition at line 864 of file scatteraction.cc.
|
private |
Check if the scattering is elastic.
|
private |
Perform a 2->1 resonance-formation process.
| InvalidResonanceFormation |
Definition at line 649 of file scatteraction.cc.
|
private |
Loop over the possible branches and rescales their weight according to the desired total cross section.
In case the current sum of partials is close to 0, a warning is issued as this would not happen in an usual run, and an elastic process is added to match the total.
Definition at line 201 of file scatteraction.cc.
|
private |
Try to find a pseudo-resonance that can be created from the incoming particles using a given method.
| [in] | method | used to select the pseudo-resonance among possible candidates. See user guide description for more information. |
| [in] | transition | parameters for the string transition region, which are also used to determine when a pseudo-resonance can be created. |
Definition at line 239 of file scatteraction.cc.
|
protected |
List of possible collisions.
Definition at line 277 of file scatteraction.h.
|
protected |
Current sum of partial hadronic cross sections.
Definition at line 280 of file scatteraction.h.
|
protected |
Partial cross-section to the chosen outgoing channel.
Definition at line 283 of file scatteraction.h.
|
protected |
Do this collision isotropically?
Definition at line 286 of file scatteraction.h.
|
protected |
Time fragments take to be fully formed in hard string excitation.
Definition at line 289 of file scatteraction.h.
|
private |
Pointer to interface class for strings.
Definition at line 329 of file scatteraction.h.
|
private |
Whether the total cross section is parametrized.
Definition at line 332 of file scatteraction.h.
|
private |
If cross section is parametrized, store the value.
Definition at line 335 of file scatteraction.h.
|
private |
What kind of spin interaction to use.
Definition at line 338 of file scatteraction.h.
|
private |
Lock for calling add_all_scatterings only once.
Definition at line 341 of file scatteraction.h.
|
inlinestaticprivate |
Warn about zero cross section only once per particle type pair.
Definition at line 345 of file scatteraction.h.