7 #ifndef SRC_INCLUDE_NUCLEUS_H_ 8 #define SRC_INCLUDE_NUCLEUS_H_ 39 Nucleus(
const std::map<PdgCode, int> &particle_list,
int nTest);
105 void boost(
double beta_scalar);
128 void shift(
double z_offset,
double x_offset,
double simulation_time);
158 "Number of test particles and test particles" 159 "per particle are incompatible");
178 p->set_4position(
p->position() - centerpoint);
184 using std::length_error::length_error;
209 inline std::vector<ParticleData>::iterator
begin() {
213 inline std::vector<ParticleData>::iterator
end() {
return particles_.end(); }
215 inline std::vector<ParticleData>::const_iterator
cbegin()
const {
219 inline std::vector<ParticleData>::const_iterator
cend()
const {
271 #endif // SRC_INCLUDE_NUCLEUS_H_ size_t size() const
Number of numerical (=test-)particles in the nucleus:
void set_diffusiveness(double diffuse)
Sets the diffusiveness of the nucleus.
The ThreeVector class represents a physical three-vector with the components .
double proton_radius_
Single proton radius in fm.
void shift(double z_offset, double x_offset, double simulation_time)
Shifts the nucleus to correct impact parameter and z displacement.
void set_nuclear_radius(double rad)
Sets the nuclear radius.
FourVector center() const
Calculate geometrical center of the nucleus.
Collection of useful constants that are known at compile time.
friend std::ostream & operator<<(std::ostream &, const Nucleus &)
Writes the state of the Nucleus object to the output stream.
A nucleus is a collection of particles that are initialized, before the beginning of the simulation a...
virtual void rotate()
Rotates the nucleus.
double get_nuclear_radius() const
Interface to the SMASH configuration files.
Nucleus(Configuration &config, int nTest)
Constructor for Nucleus, that needs the configuration parameters from the inputfile and the number of...
void boost(double beta_scalar)
Boosts the nuclei into the computational frame, such that the nucleons have the appropriate momentum ...
virtual ThreeVector distribute_nucleon() const
The distribution of return values from this function is according to a spherically symmetric Woods-Sa...
double saturation_density_
Saturation density of this nucleus.
std::vector< ParticleData >::const_iterator cend() const
For const iterators over the particle list:
void set_saturation_density(double density)
Sets the saturation density of the nucleus.
virtual void generate_fermi_momenta()
Generates momenta according to Fermi motion for the nucleons.
double woods_saxon(double x)
Woods-Saxon distribution.
std::vector< ParticleData >::const_iterator cbegin() const
For const iterators over the particle list:
double get_diffusiveness() const
double default_nuclear_radius()
double nuclear_radius_
Nuclear radius of this nucleus.
virtual ~Nucleus()=default
double diffusiveness_
Diffusiveness of Woods-Saxon distribution of this nucleus in fm (for diffusiveness_ == 0...
void fill_from_list(const std::map< PdgCode, int > &particle_list, int testparticles)
Adds particles from a map PDG code => Number_of_particles_with_that_PDG_code to the nucleus...
void arrange_nucleons()
Sets the positions of the nucleons inside a nucleus.
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3].
void copy_particles(Particles *particles)
Copies the particles from this nucleus into the particle list.
std::vector< ParticleData > particles_
Particles associated with this nucleus.
double get_saturation_density() const
std::vector< ParticleData >::iterator begin()
For iterators over the particle list:
The Particles class abstracts the storage and manipulation of particles.
virtual void set_parameters_automatic()
Sets the deformation parameters of the Woods-Saxon distribution according to the current mass number...
size_t testparticles_
Number of testparticles per physical particle.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
void align_center()
Shifts the nucleus so that its center is at (0,0,0)
std::vector< ParticleData >::iterator end()
For iterators over the particle list:
size_t number_of_particles() const
Number of physical particles in the nucleus:
virtual void set_parameters_from_config(Configuration &config)
Sets the parameters of the Woods-Saxon according to manually added values in the configuration file...