17 LogArea::HyperSurfaceCrossing::id;
20 const ParticleList &plist,
double dt,
const double,
21 const std::vector<FourVector> &beam_momentum)
const {
27 double t0 =
p.position().x0();
28 double t_end = t0 + dt;
47 const bool no_prior_interactions =
48 (
static_cast<uint64_t
>(
p.id()) <
49 static_cast<uint64_t
>(beam_momentum.size())) &&
50 (
p.get_history().collisions_per_particle == 0);
52 if (no_prior_interactions) {
68 pdata_before_propagation, pdata_after_propagation,
prop_time_);
79 bool is_within_y_cut =
true;
82 const double rapidity =
83 0.5 * std::log((
p.momentum().x0() +
p.momentum().x3()) /
84 (
p.momentum().x0() -
p.momentum().x3()));
85 if (std::fabs(rapidity) >
rap_cut_) {
86 is_within_y_cut =
false;
90 bool is_within_pT_cut =
true;
93 const double transverse_momentum =
94 std::sqrt(
p.momentum().x1() *
p.momentum().x1() +
95 p.momentum().x2() *
p.momentum().x2());
96 if (transverse_momentum >
pT_cut_) {
97 is_within_pT_cut =
false;
101 if (hypersurface_is_crossed && is_within_y_cut && is_within_pT_cut) {
104 pdata_before_propagation, pdata_after_propagation,
prop_time_);
106 double time_until_crossing = crossing_position[0] - t0;
110 ActionPtr action = std::make_unique<FluidizationAction>(
111 p, outgoing_particle, time_until_crossing);
112 actions.emplace_back(std::move(action));
120 ParticleData &pdata_after_propagation,
const double tau)
const {
121 bool hypersurface_is_crossed =
false;
122 const bool t_greater_z_before_prop =
123 (std::fabs(pdata_before_propagation.
position().
x0()) >
124 std::fabs(pdata_before_propagation.
position().
x3())
127 const bool t_greater_z_after_prop =
128 (std::fabs(pdata_after_propagation.
position().
x0()) >
129 std::fabs(pdata_after_propagation.
position().
x3())
133 if (t_greater_z_before_prop && t_greater_z_after_prop) {
135 const double tau_before = pdata_before_propagation.
position().
tau();
136 const double tau_after = pdata_after_propagation.
position().
tau();
138 if (tau_before <= tau && tau <= tau_after) {
139 hypersurface_is_crossed =
true;
141 }
else if (!t_greater_z_before_prop && t_greater_z_after_prop) {
143 const double tau_after = pdata_after_propagation.
position().
tau();
144 if (tau_after >= tau) {
145 hypersurface_is_crossed =
true;
149 return hypersurface_is_crossed;
154 ParticleData &pdata_after_propagation,
const double tau)
const {
156 const double t1 = pdata_before_propagation.
position().
x0();
157 const double z1 = pdata_before_propagation.
position().
x3();
160 const double t2 = pdata_after_propagation.
position().
x0();
161 const double z2 = pdata_after_propagation.
position().
x3();
165 const double m = (z2 - z1) / (t2 - t1);
166 const double n = z1 - m * t1;
170 const double sol1 =
n * m / (1 - m * m) +
171 std::sqrt((1 - m * m) * tau * tau +
n *
n) / (1 - m * m);
172 [[maybe_unused]]
const double sol2 =
173 n * m / (1 - m * m) -
174 std::sqrt((1 - m * m) * tau * tau +
n *
n) / (1 - m * m);
176 assert((sol1 >= t1 && sol1 <= t2));
177 assert(!(sol2 >= t1 && sol2 <= t2));
183 crossing_position.
set_x0(sol1);
185 return crossing_position;
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
ThreeVector velocity() const
Get the velocity (3-vector divided by zero component).
double tau() const
calculate the proper time from the given four vector
const double prop_time_
Proper time of the hypersurface in fm.
FourVector coordinates_on_hypersurface(ParticleData &pdata_before_propagation, ParticleData &pdata_after_propagation, const double tau) const
Find the coordinates where particle crosses hypersurface.
const double rap_cut_
Rapidity (momentum space) cut for the particles contributing to the initial conditions for hydrodynam...
const double pT_cut_
Transverse momentum cut for the particles contributing to the initial conditions for hydrodynamics.
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...
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.
ParticleData contains the dynamic information of a certain particle.
void set_4position(const FourVector &pos)
Set the particle's 4-position directly.
ThreeVector velocity() const
Get the velocity 3-vector.
const FourVector & position() const
Get the particle's position in Minkowski space.
The ThreeVector class represents a physical three-vector with the components .
static constexpr int LHyperSurfaceCrossing