Version: SMASH-1.7
scatteraction.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2015-2019
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SCATTERACTION_H_
11 #define SRC_INCLUDE_SCATTERACTION_H_
12 
13 #include <memory>
14 #include <set>
15 #include <string>
16 #include <utility>
17 
18 #include "action.h"
19 #include "cxx14compat.h"
20 #include "isoparticletype.h"
21 #include "kinematics.h"
22 #include "processstring.h"
23 
24 namespace smash {
25 
31 class ScatterAction : public Action {
32  public:
42  ScatterAction(const ParticleData& in_part1, const ParticleData& in_part2,
43  double time, bool isotropic = false,
44  double string_formation_time = 1.0);
45 
51  void add_collision(CollisionBranchPtr p);
52 
58  void add_collisions(CollisionBranchList pv);
59 
75  double transverse_distance_sqr() const;
76 
85  double mandelstam_s() const;
86 
94  void generate_final_state() override;
95 
101  double get_total_weight() const override;
102 
108  double get_partial_weight() const override;
109 
113  void sample_angles(std::pair<double, double> masses,
114  double kinetic_energy_cm) override;
115 
131  void add_all_scatterings(double elastic_parameter, bool two_to_one,
132  ReactionsBitSet included_2to2, double low_snn_cut,
133  bool strings_switch, bool use_AQM,
134  bool strings_with_probability,
135  NNbarTreatment nnbar_treatment);
136 
142  const CollisionBranchList& collision_channels() {
143  return collision_channels_;
144  }
145 
150  class InvalidScatterAction : public std::invalid_argument {
151  using std::invalid_argument::invalid_argument;
152  };
153 
163  string_process_ = str_proc;
164  }
165 
171  virtual double cross_section() const { return total_cross_section_; }
172 
173  protected:
180  double cm_momentum() const;
187  double cm_momentum_squared() const;
194  ThreeVector beta_cm() const;
201  double gamma_cm() const;
202 
204  void elastic_scattering();
205 
207  void inelastic_scattering();
208 
213  void string_excitation();
214 
219  void format_debug_output(std::ostream& out) const override;
220 
222  CollisionBranchList collision_channels_;
223 
226 
229 
231  bool isotropic_ = false;
232 
235 
236  private:
242  bool is_elastic() const;
243 
248  void resonance_formation();
249 
252 };
253 
254 } // namespace smash
255 
256 #endif // SRC_INCLUDE_SCATTERACTION_H_
void add_collisions(CollisionBranchList pv)
Add several new collision channels at once.
double transverse_distance_sqr() const
Calculate the transverse distance of the two incoming particles in their local rest frame...
void add_collision(CollisionBranchPtr p)
Add a new collision channel.
double partial_cross_section_
Partial cross-section to the chosen outgoing channel.
The ThreeVector class represents a physical three-vector with the components .
Definition: threevector.h:31
void generate_final_state() override
Generate the final-state of the scattering process.
String excitation processes used in SMASH.
Definition: processstring.h:46
Thrown when ScatterAction is called to perform with unknown ProcessType.
double string_formation_time_
Time fragments take to be fully formed in hard string excitation.
StringProcess * string_process_
Pointer to interface class for strings.
double get_partial_weight() const override
Get the partial cross section of the chosen channel.
void resonance_formation()
Perform a 2->1 resonance-formation process.
NNbarTreatment
Treatment of N Nbar Annihilation.
void set_string_interface(StringProcess *str_proc)
Set the StringProcess object to be used.
void string_excitation()
Todo(ryu): document better - it is not really UrQMD-based, isn&#39;t it? Perform the UrQMD-based string e...
bool is_elastic() const
Check if the scattering is elastic.
ScatterAction(const ParticleData &in_part1, const ParticleData &in_part2, double time, bool isotropic=false, double string_formation_time=1.0)
Construct a ScatterAction object.
double total_cross_section_
Total hadronic cross section.
const CollisionBranchList & collision_channels()
Get list of possible collision channels.
double gamma_cm() const
Get the gamma factor corresponding to a boost to the center of mass frame of the colliding particles...
double cm_momentum_squared() const
Get the squared momentum of the center of mass of the incoming particles in the calculation frame...
void add_all_scatterings(double elastic_parameter, bool two_to_one, ReactionsBitSet included_2to2, double low_snn_cut, bool strings_switch, bool use_AQM, bool strings_with_probability, NNbarTreatment nnbar_treatment)
Add all possible scattering subprocesses for this action object.
void elastic_scattering()
Perform an elastic two-body scattering, i.e. just exchange momentum.
Action is the base class for a generic process that takes a number of incoming particles and transfor...
Definition: action.h:34
std::bitset< 10 > ReactionsBitSet
Container for the 2 to 2 reactions in the code.
bool isotropic_
Do this collision isotropically?
virtual double cross_section() const
Get the total cross section of the scattering particles.
ThreeVector beta_cm() const
Get the velocity of the center of mass of the scattering particles in the calculation frame...
constexpr int p
Proton.
CollisionBranchList collision_channels_
List of possible collisions.
double get_total_weight() const override
Get the total cross section of scattering particles.
ScatterAction is a special action which takes two incoming particles and performs a scattering...
Definition: scatteraction.h:31
void sample_angles(std::pair< double, double > masses, double kinetic_energy_cm) override
Sample final-state angles in a 2->2 collision (possibly anisotropic).
ParticleData contains the dynamic information of a certain particle.
Definition: particledata.h:52
double cm_momentum() const
Get the momentum of the center of mass of the incoming particles in the calculation frame...
Definition: action.h:24
double mandelstam_s() const
Determine the Mandelstam s variable,.
void format_debug_output(std::ostream &out) const override
Writes information about this scatter action to the out stream.
void inelastic_scattering()
Perform an inelastic two-body scattering, i.e. new particles are formed.