Version: SMASH-1.8
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_
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:52
smash
Definition: action.h:24
smash::Action::incoming_particles_
ParticleList incoming_particles_
List with data of incoming particles.
Definition: action.h:304
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:82
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:20
smash::HypersurfacecrossingAction::check_conservation
void check_conservation(const uint32_t id_process) const override
Check various conservation laws.
Definition: hypersurfacecrossingaction.cc:32
smash::HyperSurfaceCrossActionsFinder::prop_time_
const double prop_time_
Proper time of the hypersurface in fm.
Definition: hypersurfacecrossingaction.h:102
smash::HypersurfacecrossingAction
Definition: hypersurfacecrossingaction.h:25
action.h
smash::HypersurfacecrossingAction::HypersurfacecrossingAction
HypersurfacecrossingAction(const ParticleData &in_part, const ParticleData &out_part, const double time_until)
Construct hypersurfacecrossing action.
Definition: hypersurfacecrossingaction.h:33
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:120
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:39
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:154
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:96
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:89
smash::Action
Definition: action.h:35
smash::HyperSurfaceCrossActionsFinder
Definition: hypersurfacecrossingaction.h:59
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:38
smash::HypersurfacecrossingAction::format_debug_output
void format_debug_output(std::ostream &out) const override
Definition: hypersurfacecrossingaction.h:40
smash::HyperSurfaceCrossActionsFinder::HyperSurfaceCrossActionsFinder
HyperSurfaceCrossActionsFinder(double tau)
Construct hypersurfacecrossing action finder.
Definition: hypersurfacecrossingaction.h:65
smash::ProcessType
ProcessType
Process Types are used to identify the type of the process.
Definition: processbranch.h:25