Version: SMASH-2.0
hypersurfacecrossingaction.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2019-2020
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_HYPERSURFACECROSSINGACTION_H_
11 #define SRC_INCLUDE_SMASH_HYPERSURFACECROSSINGACTION_H_
12 
13 #include <vector>
14 
15 #include "action.h"
16 #include "actionfinderfactory.h"
17 
18 namespace smash {
19 
28  public:
36  const ParticleData &out_part,
37  const double time_until)
38  : Action(in_part, out_part, time_until,
40  double get_total_weight() const override { return 0.0; };
41  double get_partial_weight() const override { return 0.0; };
42  void format_debug_output(std::ostream &out) const override {
43  out << "Hypersurface crossing of " << incoming_particles_;
44  }
45 
50  void generate_final_state() override;
51 
52  void check_conservation(const uint32_t id_process) const override;
53 };
54 
62  public:
67  explicit HyperSurfaceCrossActionsFinder(double tau) : prop_time_{tau} {};
68 
79  ActionList find_actions_in_cell(
80  const ParticleList &plist, double dt, const double,
81  const std::vector<FourVector> &beam_momentum) const override;
82 
85  const ParticleList &, const ParticleList &, double,
86  const std::vector<FourVector> &) const override {
87  return {};
88  }
89 
92  const ParticleList &, const Particles &, double,
93  const std::vector<FourVector> &) const override {
94  return {};
95  }
96 
98  ActionList find_final_actions(const Particles &, bool) const override {
99  return {};
100  }
101 
102  private:
104  const double prop_time_;
105 
116  bool crosses_hypersurface(ParticleData &pdata_before_propagation,
117  ParticleData &pdata_after_propagation,
118  const double tau) const;
119 
129  FourVector coordinates_on_hypersurface(ParticleData &pdata_before_propagation,
130  ParticleData &pdata_after_propagation,
131  const double tau) const;
132 };
133 
134 } // namespace smash
135 
136 #endif // SRC_INCLUDE_SMASH_HYPERSURFACECROSSINGACTION_H_
smash::HyperSurfaceCrossActionsFinder::find_actions_in_cell
ActionList find_actions_in_cell(const ParticleList &plist, double dt, const double, const std::vector< FourVector > &beam_momentum) const override
Find the next hypersurface crossings for each particle that occur within the timestepless propagation...
Definition: hypersurfacecrossingaction.cc:50
smash
Definition: action.h:24
smash::Action::incoming_particles_
ParticleList incoming_particles_
List with data of incoming particles.
Definition: action.h:326
smash::HyperSurfaceCrossActionsFinder::find_actions_with_neighbors
ActionList find_actions_with_neighbors(const ParticleList &, const ParticleList &, double, const std::vector< FourVector > &) const override
Ignore the neighbor searches for hypersurface crossing.
Definition: hypersurfacecrossingaction.h:84
smash::ParticleData
Definition: particledata.h:52
smash::HypersurfacecrossingAction::generate_final_state
void generate_final_state() override
Generate the final state of the hypersurface crossing particles.
Definition: hypersurfacecrossingaction.cc:18
smash::HypersurfacecrossingAction::check_conservation
void check_conservation(const uint32_t id_process) const override
Check various conservation laws.
Definition: hypersurfacecrossingaction.cc:30
smash::HyperSurfaceCrossActionsFinder::prop_time_
const double prop_time_
Proper time of the hypersurface in fm.
Definition: hypersurfacecrossingaction.h:104
smash::HypersurfacecrossingAction
Definition: hypersurfacecrossingaction.h:27
action.h
smash::HypersurfacecrossingAction::HypersurfacecrossingAction
HypersurfacecrossingAction(const ParticleData &in_part, const ParticleData &out_part, const double time_until)
Construct hypersurfacecrossing action.
Definition: hypersurfacecrossingaction.h:35
smash::HyperSurfaceCrossActionsFinder::crosses_hypersurface
bool crosses_hypersurface(ParticleData &pdata_before_propagation, ParticleData &pdata_after_propagation, const double tau) const
Determine whether particle crosses hypersurface within next timestep during propagation.
Definition: hypersurfacecrossingaction.cc:118
smash::HypersurfacecrossingAction::get_partial_weight
double get_partial_weight() const override
Return the specific weight for the chosen outgoing channel, which is mainly used for the partial weig...
Definition: hypersurfacecrossingaction.h:41
actionfinderfactory.h
smash::ActionFinderInterface
Definition: actionfinderfactory.h:27
smash::HyperSurfaceCrossActionsFinder::coordinates_on_hypersurface
FourVector coordinates_on_hypersurface(ParticleData &pdata_before_propagation, ParticleData &pdata_after_propagation, const double tau) const
Find the coordinates where particle crosses hypersurface.
Definition: hypersurfacecrossingaction.cc:152
smash::Particles
Definition: particles.h:33
smash::HyperSurfaceCrossActionsFinder::find_final_actions
ActionList find_final_actions(const Particles &, bool) const override
No final actions for hypersurface crossing.
Definition: hypersurfacecrossingaction.h:98
smash::HyperSurfaceCrossActionsFinder::find_actions_with_surrounding_particles
ActionList find_actions_with_surrounding_particles(const ParticleList &, const Particles &, double, const std::vector< FourVector > &) const override
Ignore the surrounding searches for hypersurface crossing.
Definition: hypersurfacecrossingaction.h:91
smash::Action
Definition: action.h:35
smash::HyperSurfaceCrossActionsFinder
Definition: hypersurfacecrossingaction.h:61
smash::ProcessType::HyperSurfaceCrossing
Hypersurface crossing Particles are removed from the evolution and printed to a separate output to se...
smash::FourVector
Definition: fourvector.h:33
smash::HypersurfacecrossingAction::get_total_weight
double get_total_weight() const override
Return the total weight value, which is mainly used for the weight output entry.
Definition: hypersurfacecrossingaction.h:40
smash::HypersurfacecrossingAction::format_debug_output
void format_debug_output(std::ostream &out) const override
Definition: hypersurfacecrossingaction.h:42
smash::HyperSurfaceCrossActionsFinder::HyperSurfaceCrossActionsFinder
HyperSurfaceCrossActionsFinder(double tau)
Construct hypersurfacecrossing action finder.
Definition: hypersurfacecrossingaction.h:67
smash::ProcessType
ProcessType
Process Types are used to identify the type of the process.
Definition: processbranch.h:25