Version: SMASH-1.5
scatteraction.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2015-2018
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 
84  void generate_final_state() override;
85 
91  double get_total_weight() const override;
92 
98  double get_partial_weight() const override;
99 
103  void sample_angles(std::pair<double, double> masses,
104  double kinetic_energy_cm) override;
105 
121  void add_all_scatterings(double elastic_parameter, bool two_to_one,
122  ReactionsBitSet included_2to2, double low_snn_cut,
123  bool strings_switch, bool use_AQM,
124  bool strings_with_probability,
125  NNbarTreatment nnbar_treatment);
126 
132  const CollisionBranchList& collision_channels() {
133  return collision_channels_;
134  }
135 
140  class InvalidScatterAction : public std::invalid_argument {
141  using std::invalid_argument::invalid_argument;
142  };
143 
153  string_process_ = str_proc;
154  }
155 
161  virtual double cross_section() const { return total_cross_section_; }
162 
163  protected:
172  double mandelstam_s() const;
179  double cm_momentum() const;
186  double cm_momentum_squared() const;
193  ThreeVector beta_cm() const;
200  double gamma_cm() const;
201 
203  void elastic_scattering();
204 
206  void inelastic_scattering();
207 
212  void string_excitation();
213 
218  void format_debug_output(std::ostream& out) const override;
219 
221  CollisionBranchList collision_channels_;
222 
225 
228 
230  bool isotropic_ = false;
231 
234 
235  private:
241  bool is_elastic() const;
242 
247  void resonance_formation();
248 
251 };
252 
253 } // namespace smash
254 
255 #endif // SRC_INCLUDE_SCATTERACTION_H_
void add_collisions(CollisionBranchList pv)
Add several new collision channels at once.
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:30
void generate_final_state() override
Generate the final-state of the scattering process.
String excitation processes used in SMASH.
Definition: processstring.h:46
double cm_momentum() const
Get the momentum of the center of mass of the incoming particles in the calculation frame...
double gamma_cm() const
Get the gamma factor corresponding to a boost to the center of mass frame of the colliding particles...
Thrown when ScatterAction is called to perform with unknown ProcessType.
ThreeVector beta_cm() const
Get the velocity of the center of mass of the scattering particles in the calculation frame...
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 mandelstam_s() const
Determine the Mandelstam s variable,.
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.
std::bitset< 6 > ReactionsBitSet
Container for the 2 to 2 reactions in the code.
Action is the base class for a generic process that takes a number of incoming particles and transfor...
Definition: action.h:34
bool isotropic_
Do this collision isotropically?
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.
virtual double cross_section() const
Get the total cross section of the 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).
double transverse_distance_sqr() const
Calculate the transverse distance of the two incoming particles in their local rest frame...
ParticleData contains the dynamic information of a certain particle.
Definition: particledata.h:52
Definition: action.h:24
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.