#include <customnucleus.h>
Inheriting from Nucleus-Class using modified Nucleon configurations.
Configurations are read in from external lists.
Definition at line 41 of file customnucleus.h.
Public Member Functions | |
CustomNucleus (Configuration &config, int testparticles, bool same_file) | |
Constructor that needs configuration parameters from input file and the number of testparticles. More... | |
void | fill_from_list (const std::vector< Nucleoncustom > &vec) |
Fills Particlelist from vector containing data for one nucleus. More... | |
ThreeVector | distribute_nucleon () override |
Returns position of a nucleon as given in the external file. More... | |
void | arrange_nucleons () override |
Sets the positions of the nucleons inside a nucleus. More... | |
std::vector< Nucleoncustom > | readfile (std::ifstream &infile) const |
The returned vector contains Data for one nucleus given in the particlelist. More... | |
std::string | file_path (const std::string &file_directory, const std::string &file_name) |
Generates the name of the stream file. More... | |
void | generate_fermi_momenta () override |
Generates Fermi momenta as it is done in the mother class but in addition prints a warning that the Fermi momenta are generated accoriding to Woods-Saxon distributed nucleons. More... | |
Public Member Functions inherited from smash::Nucleus | |
Nucleus ()=default | |
default constructor More... | |
Nucleus (Configuration &config, int nTest) | |
Constructor for Nucleus, that needs the configuration parameters from the inputfile and the number of testparticles. More... | |
Nucleus (const std::map< PdgCode, int > &particle_list, int nTest) | |
Constructor which directly initializes the Nucleus with particles and respective counts. More... | |
virtual | ~Nucleus ()=default |
double | mass () const |
double | woods_saxon (double x) |
Woods-Saxon distribution. More... | |
virtual void | set_parameters_automatic () |
Sets the deformation parameters of the Woods-Saxon distribution according to the current mass number. More... | |
virtual void | set_parameters_from_config (Configuration &config) |
Sets the parameters of the Woods-Saxon according to manually added values in the configuration file. More... | |
void | boost (double beta_scalar) |
Boosts the nuclei into the computational frame, such that the nucleons have the appropriate momentum and the nuclei are lorentz-contracted. More... | |
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. More... | |
void | shift (double z_offset, double x_offset, double simulation_time) |
Shifts the nucleus to correct impact parameter and z displacement. More... | |
virtual void | rotate () |
Rotates the nucleus. More... | |
void | copy_particles (Particles *particles) |
Copies the particles from this nucleus into the particle list. More... | |
size_t | size () const |
Number of numerical (=test-)particles in the nucleus: More... | |
size_t | number_of_particles () const |
Number of physical particles in the nucleus: More... | |
size_t | number_of_protons () const |
Number of physical protons in the nucleus: More... | |
FourVector | center () const |
Calculate geometrical center of the nucleus. More... | |
void | set_label (BelongsTo label) |
Sets target / projectile labels on nucleons. More... | |
void | align_center () |
Shifts the nucleus so that its center is at (0,0,0) More... | |
virtual double | nucleon_density (double r, double, double) const |
Return the Woods-Saxon probability density for the given position. More... | |
virtual double | nucleon_density_unnormalized (double r, double, double) const |
Return the unnormalized Woods-Saxon distribution for the given position without deformation. More... | |
virtual double | calculate_saturation_density () const |
virtual void | set_saturation_density (double density) |
Sets the saturation density of the nucleus. More... | |
std::vector< ParticleData >::iterator | begin () |
For iterators over the particle list: More... | |
std::vector< ParticleData >::iterator | end () |
For iterators over the particle list: More... | |
std::vector< ParticleData >::const_iterator | cbegin () const |
For const iterators over the particle list: More... | |
std::vector< ParticleData >::const_iterator | cend () const |
For const iterators over the particle list: More... | |
void | set_diffusiveness (double diffuse) |
Sets the diffusiveness of the nucleus. More... | |
double | get_diffusiveness () const |
double | get_saturation_density () const |
double | default_nuclear_radius () |
Default nuclear radius calculated as: More... | |
void | set_nuclear_radius (double rad) |
Sets the nuclear radius. More... | |
double | get_nuclear_radius () const |
Private Attributes | |
std::unique_ptr< std::ifstream > | filestream_ |
Filestream variable used if projectile and target are read in from different files and they therefore use different streams. More... | |
std::unique_ptr< std::ifstream > * | used_filestream_ |
Pointer to the used filestream pointer. More... | |
int | number_of_nucleons_ = 0 |
Number of nucleons per nucleus Set initally to zero to be modified in the constructor. More... | |
int | number_of_protons_ = 0 |
Number of protons per nucleus. More... | |
int | number_of_neutrons_ = 0 |
Number of neutrons per nucleus. More... | |
std::vector< Nucleoncustom > | custom_nucleus_ |
Vector contianing Data for one nucleus given in the particlelist. More... | |
size_t | index_ = 0 |
Index needed to read out vector in distribute nucleon. More... | |
Static Private Attributes | |
static std::unique_ptr< std::ifstream > | filestream_shared_ = nullptr |
Filestream variable used if projectile and target are read in from the same file and they use the same static stream. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from smash::Nucleus | |
void | random_euler_angles () |
Randomly generate Euler angles. More... | |
Protected Attributes inherited from smash::Nucleus | |
std::vector< ParticleData > | particles_ |
Particles associated with this nucleus. More... | |
double | saturation_density_ = nuclear_density |
Saturation density of this nucleus. More... | |
double | euler_phi_ |
Euler angel phi. More... | |
double | euler_theta_ |
Euler angel theta. More... | |
double | euler_psi_ |
Euler angel psi. More... | |
smash::CustomNucleus::CustomNucleus | ( | Configuration & | config, |
int | testparticles, | ||
bool | same_file | ||
) |
Constructor that needs configuration parameters from input file and the number of testparticles.
[in] | config | contains the parameters from the inputfile on the numbers of particles with a certain PDG code and also the path where the external particle list is located |
[in] | testparticles | represents the number of testparticles |
[in] | same_file | specifies if target and projectile nucleus are read in from the same file, which is important for the ifstream |
Definition at line 24 of file customnucleus.cc.
void smash::CustomNucleus::fill_from_list | ( | const std::vector< Nucleoncustom > & | vec | ) |
Fills Particlelist from vector containing data for one nucleus.
The data contains everything that is written in struct Nucleoncustom.
[in] | vec | vector containing data from external list for one nucleus |
Definition at line 81 of file customnucleus.cc.
|
overridevirtual |
Returns position of a nucleon as given in the external file.
Reimplemented from smash::Nucleus.
Definition at line 104 of file customnucleus.cc.
|
overridevirtual |
Sets the positions of the nucleons inside a nucleus.
Reimplemented from smash::Nucleus.
Definition at line 125 of file customnucleus.cc.
std::vector< Nucleoncustom > smash::CustomNucleus::readfile | ( | std::ifstream & | infile | ) | const |
The returned vector contains Data for one nucleus given in the particlelist.
[in] | infile | is needed to read in from the external file |
Definition at line 162 of file customnucleus.cc.
std::string smash::CustomNucleus::file_path | ( | const std::string & | file_directory, |
const std::string & | file_name | ||
) |
Generates the name of the stream file.
[in] | file_directory | is the path to the external file |
[in] | file_name | is the name of the external file |
Definition at line 153 of file customnucleus.cc.
|
overridevirtual |
Generates Fermi momenta as it is done in the mother class but in addition prints a warning that the Fermi momenta are generated accoriding to Woods-Saxon distributed nucleons.
Reimplemented from smash::Nucleus.
Definition at line 145 of file customnucleus.cc.
|
staticprivate |
Filestream variable used if projectile and target are read in from the same file and they use the same static stream.
Definition at line 98 of file customnucleus.h.
|
private |
Filestream variable used if projectile and target are read in from different files and they therefore use different streams.
Definition at line 103 of file customnucleus.h.
|
private |
Pointer to the used filestream pointer.
Definition at line 105 of file customnucleus.h.
|
private |
Number of nucleons per nucleus Set initally to zero to be modified in the constructor.
Is obtained by adding the proton and neutron numbers specified in the config.yaml
Definition at line 112 of file customnucleus.h.
|
private |
Number of protons per nucleus.
Definition at line 114 of file customnucleus.h.
|
private |
Number of neutrons per nucleus.
Definition at line 116 of file customnucleus.h.
|
private |
Vector contianing Data for one nucleus given in the particlelist.
Definition at line 118 of file customnucleus.h.
|
private |
Index needed to read out vector in distribute nucleon.
Definition at line 120 of file customnucleus.h.