 |
Version: SMASH-1.8
|
|
Go to the documentation of this file.
51 " is pauli-blocked with f = ", f);
73 interaction_point += part.position();
76 return interaction_point;
92 return std::make_pair(UB, UI3);
96 assert(id_process != 0);
101 p.set_history(
p.get_history().collisions_per_particle + 1, id_process,
113 logg[
LAction].debug(
"Particle map now has ", particles->
size(),
" elements.");
127 double scale_B = 0.0;
130 double scale_I3 = 0.0;
135 : std::make_pair(0.0, 0));
136 scale_B += scale.first;
137 scale_I3 += scale.second * p_in.type().isospin3_rel();
143 : std::make_pair(0.0, 0));
144 scale_B -= scale.first;
151 potentials.second * scale_I3;
155 const double kinetic_energy_cm)
const {
159 std::pair<double, double> masses = {t_a.
mass(), t_b.
mass()};
166 reaction +
": not enough energy, " + std::to_string(kinetic_energy_cm) +
184 const double kinetic_energy_cm) {
188 const double pcm =
pCM(kinetic_energy_cm, masses.first, masses.second);
191 logg[
LAction].warn(
"Ektot: ", kinetic_energy_cm,
" m_a: ", masses.first,
192 " m_b: ", masses.second);
203 logg[
LAction].debug(
"p_a: ", *p_a,
"\np_b: ", *p_b);
210 const double cm_kin_energy = p_tot.abs();
212 const std::pair<double, double> masses =
sample_masses(cm_kin_energy);
222 const double sqrts =
sqrt_s();
225 double mab, r, probability, pcm_ab, pcm;
229 pcm =
pCM(sqrts, mab, m_c);
230 pcm_ab =
pCM(mab, m_a, m_b);
231 probability = pcm * pcm_ab * 4 / (sqrts * sqrts);
232 }
while (r > probability);
237 pcm * phitheta.
threevec() / std::sqrt(pcm * pcm + mab * mab);
249 if (before != after) {
250 std::stringstream particle_names;
252 particle_names <<
p.type().name();
254 particle_names <<
" vs. ";
256 particle_names <<
p.type().name();
258 particle_names <<
"\n";
260 logg[
LAction].error() << particle_names.str() << err_msg;
268 throw std::runtime_error(
"Conservation laws violated in photon process");
270 throw std::runtime_error(
"Conservation laws violated in process " +
271 std::to_string(id_process));
276 std::ostream &
operator<<(std::ostream &out,
const ActionList &actions) {
277 out <<
"ActionList {\n";
278 for (
const auto &a : actions) {
279 out <<
"- " << a <<
'\n';
virtual void sample_angles(std::pair< double, double > masses, double kinetic_energy_cm)
Sample final-state momenta in general X->2 processes (here: using an isotropical angular distribution...
ParticleList incoming_particles_
List with data of incoming particles.
hard string process involving 2->2 QCD process by PYTHIA.
virtual ~Action()
Virtual Destructor.
FourVector total_momentum() const
Sum of 4-momenta of incoming particles.
const double time_of_execution_
Time at which the action is supposed to be performed (absolute time in the lab frame in fm/c).
void sample_2body_phasespace()
Sample the full 2-body phase-space (masses, momenta, angles) in the center-of-mass frame for the fina...
static constexpr int LPauliBlocking
static std::pair< double, int > force_scale(const ParticleType &data)
Evaluates the scaling factor of the forces acting on the particles.
bool is_pauli_blocked(const Particles &particles, const PauliBlocker &p_bl) const
Check if the action is Pauli-blocked.
virtual void check_conservation(const uint32_t id_process) const
Check various conservation laws.
bool is_string_soft_process(ProcessType p)
Check if a given process type is a soft string excitation.
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
void distribute_isotropically()
Populate the object with a new direction.
PdgCode pdgcode() const
Get the pdgcode of the particle.
double phasespace_dens(const ThreeVector &r, const ThreeVector &p, const Particles &particles, const PdgCode pdg, const ParticleList &disregard) const
Calculate phase-space density of a particle species at the point (r,p).
void update_incoming(const Particles &particles)
Update the incoming particles that are stored in this action to the state they have in the global par...
void set_4momentum(const FourVector &momentum_vector)
Set the particle's 4-momentum directly.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
bool all_of(Container &&c, UnaryPredicate &&p)
Convenience wrapper for std::all_of that operates on a complete container.
T pCM(const T sqrts, const T mass_a, const T mass_b) noexcept
RectangularLattice< FourVector > * UI3_lat_pointer
Pointer to the symmmetry potential on the lattice.
A class that stores parameters needed for Pauli blocking, tabulates necessary integrals and computes ...
std::pair< double, double > sample_resonance_masses(const ParticleType &t2, const double cms_energy, int L=0) const
Resonance mass sampling for 2-particle final state with two resonances.
RectangularLattice< FourVector > * UB_lat_pointer
Pointer to the skyrme potential on the lattice.
void update(const ParticleList &old_state, ParticleList &new_state, bool do_replace)
Updates the Particles object, replacing the particles in old_state with the particles in new_state.
const ParticleType & type_of_pout(const ParticleData &p_out) const
Get the type of a given particle.
double sample_resonance_mass(const double mass_stable, const double cms_energy, int L=0) const
Resonance mass sampling for 2-particle final state with one resonance (type given by 'this') and one ...
double isospin3_rel() const
std::string report_deviations(const Particles &particles) const
Checks if the current particle list has still the same values and reports about differences.
ProcessType process_type_
type of process
bool is_valid(const Particles &particles) const
Check whether the action still applies.
const std::string & name() const
static constexpr int LAction
std::pair< FourVector, FourVector > get_potential_at_interaction_point() const
Get the skyrme and asymmetry potential at the interaction point.
virtual void perform(Particles *particles, uint32_t id_process)
Actually perform the action, e.g.
FourVector total_momentum_of_outgoing_particles() const
Calculate the total kinetic momentum of the outgoing particles.
const ParticleData & lookup(const ParticleData &old_state) const
Returns the particle that is currently stored in this object given an old copy of that particle.
ParticleList outgoing_particles_
Initially this stores only the PDG codes of final-state particles.
virtual void sample_3body_phasespace()
Sample the full 3-body phase-space (masses, momenta, angles) in the center-of-mass frame for the fina...
ThreeVector threevec() const
double sqrt_s() const
Determine the total energy in the center-of-mass frame [GeV].
bool is_valid(const ParticleData ©) const
Check whether the ParticleData copy is still a valid copy of the one stored in the Particles object.
elastic scattering: particles remain the same, only momenta change
FourVector get_interaction_point() const
Get the interaction point.
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
constexpr std::uint32_t ID_PROCESS_PHOTON
Process ID for any photon process.
double min_mass_kinematic() const
The minimum mass of the resonance that is kinematically allowed.
Potentials * pot_pointer
Pointer to a Potential class.
const ParticleList & incoming_particles() const
Get the list of particles that go into the action.
virtual std::pair< double, double > sample_masses(double kinetic_energy_cm) const
Sample final-state masses in general X->2 processes (thus also fixing the absolute c....
ThreeVector threevec() const