Version: SMASH-1.7
hypersurfacecrossingaction.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2019-2019
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_HYPERSURFACECROSSINGACTION_H_
11 #define SRC_INCLUDE_HYPERSURFACECROSSINGACTION_H_
12 
13 #include "action.h"
14 #include "actionfinderfactory.h"
15 
16 namespace smash {
17 
26  public:
34  const ParticleData &out_part,
35  const double time_until)
36  : Action(in_part, out_part, time_until,
38  double get_total_weight() const override { return 0.0; };
39  double get_partial_weight() const override { return 0.0; };
40  void format_debug_output(std::ostream &out) const override {
41  out << "Hypersurface crossing of " << incoming_particles_;
42  }
43 
48  void generate_final_state() override;
49 
50  void check_conservation(const uint32_t id_process) const override;
51 };
52 
60  public:
65  explicit HyperSurfaceCrossActionsFinder(double tau) : prop_time_{tau} {};
66 
77  ActionList find_actions_in_cell(
78  const ParticleList &plist, double dt, const double,
79  const std::vector<FourVector> &beam_momentum) const override;
80 
83  const ParticleList &, const ParticleList &, double,
84  const std::vector<FourVector> &) const override {
85  return {};
86  }
87 
90  const ParticleList &, const Particles &, double,
91  const std::vector<FourVector> &) const override {
92  return {};
93  }
94 
96  ActionList find_final_actions(const Particles &, bool) const override {
97  return {};
98  }
99 
100  private:
102  const double prop_time_;
103 
114  bool crosses_hypersurface(ParticleData &pdata_before_propagation,
115  ParticleData &pdata_after_propagation,
116  const double tau) const;
117 
127  FourVector coordinates_on_hypersurface(ParticleData &pdata_before_propagation,
128  ParticleData &pdata_after_propagation,
129  const double tau) const;
130 };
131 
132 } // namespace smash
133 
134 #endif // SRC_INCLUDE_HYPERSURFACECROSSINGACTION_H_
void generate_final_state() override
Generate the final state of the hypersurface crossing particles.
ProcessType
Process Types are used to identify the type of the process.
Definition: processbranch.h:25
void check_conservation(const uint32_t id_process) const override
Check various conservation laws.
Hypersurface crossing Particles are removed from the evolution and printed to a separate output to se...
ActionList find_actions_with_neighbors(const ParticleList &, const ParticleList &, double, const std::vector< FourVector > &) const override
Ignore the neighbor searches for hypersurface crossing.
HypersurfacecrossingAction(const ParticleData &in_part, const ParticleData &out_part, const double time_until)
Construct hypersurfacecrossing action.
ParticleList incoming_particles_
List with data of incoming particles.
Definition: action.h:303
Action is the base class for a generic process that takes a number of incoming particles and transfor...
Definition: action.h:34
Hypersurfacecrossingaction is a special action which indicates that a particle has crossed a hypersur...
double get_partial_weight() const override
Return the specific weight for the chosen outgoing channel, which is mainly used for the partial weig...
HyperSurfaceCrossActionsFinder(double tau)
Construct hypersurfacecrossing action finder.
double get_total_weight() const override
Return the total weight value, which is mainly used for the weight output entry.
ActionFinderInterface is the abstract base class for all action finders, i.e.
The Particles class abstracts the storage and manipulation of particles.
Definition: particles.h:33
void format_debug_output(std::ostream &out) const override
Writes information about this action to the out stream.
ActionList find_final_actions(const Particles &, bool) const override
No final actions for hypersurface crossing.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
Definition: fourvector.h:33
Finder for hypersurface crossing actions.
ActionList find_actions_with_surrounding_particles(const ParticleList &, const Particles &, double, const std::vector< FourVector > &) const override
Ignore the surrounding searches for hypersurface crossing.
ParticleData contains the dynamic information of a certain particle.
Definition: particledata.h:52
const double prop_time_
Proper time of the hypersurface in fm.
Definition: action.h:24