 |
Version: SMASH-1.8
|
|
Go to the documentation of this file.
110 :
Nucleus(particle_list, nTest) {}
113 bool auto_deformation)
115 if (auto_deformation) {
121 if (config.
has_value({
"Deformed",
"Orientation"})) {
145 return a_direction.
threevec() * a_radius;
153 const std::map<int, std::string> A_map = {
154 {238,
"Uranium"}, {208,
"Lead"}, {197,
"Gold"}, {63,
"Copper"}};
155 const std::map<std::string, std::string> Z_map = {
156 {
"Uranium",
"92"}, {
"Lead",
"82"}, {
"Gold",
"79"}, {
"Copper",
"29"}};
196 }
else if (Z == 44) {
200 throw std::domain_error(
201 "Number of protons for nuclei with mass number A = 96 does not "
202 "match that of Zirconium or Ruthenium. The deformation parameters "
203 "for additional isobars are currently not implemented."
204 " Please specify at least \"Beta_2\" and \"Beta_4\" "
205 "manually and set \"Automatic: False.\" ");
209 throw std::domain_error(
210 "Mass number not listed for automatically setting deformation "
211 "parameters. Please specify at least \"Beta_2\" and \"Beta_4\" "
212 "manually and set \"Automatic: False.\" ");
215 throw std::domain_error(
"Mass number is listed under " + A_map.at(A) +
221 Z_map.at(A_map.at(A)) +
223 "Please specify at least \"Beta_2\" and \"Beta_4\" "
224 "manually and set \"Automatic: False.\" ");
231 if (config.
has_value({
"Deformed",
"Beta_2"})) {
232 set_beta_2(static_cast<double>(config.
take({
"Deformed",
"Beta_2"})));
234 if (config.
has_value({
"Deformed",
"Beta_4"})) {
235 set_beta_4(static_cast<double>(config.
take({
"Deformed",
"Beta_4"})));
244 if (orientation_config.
has_value({
"Theta"})) {
245 if (orientation_config.
has_value({
"Random_Rotation"}) &&
246 orientation_config.
take({
"Random_Rotation"})) {
247 throw std::domain_error(
248 "Random rotation of nuclei is activated although"
249 " theta is provided. Please specify only either of them. ");
255 if (orientation_config.
has_value({
"Phi"})) {
256 if (orientation_config.
has_value({
"Random_Rotation"}) &&
257 orientation_config.
take({
"Random_Rotation"})) {
258 throw std::domain_error(
259 "Random rotation of nuclei is activated although"
260 " phi is provided. Please specify only either of them. ");
263 static_cast<double>(orientation_config.
take({
"Phi"})));
267 if (orientation_config.
take({
"Random_Rotation"},
false)) {
280 for (
auto &particle : *
this) {
285 ThreeVector three_pos = particle.position().threevec();
288 particle.set_3position(three_pos);
294 return (1. / 4) * std::sqrt(5 / M_PI) * (3. * (cosx * cosx) - 1);
296 return (3. / 16) * std::sqrt(1 / M_PI) *
297 (35. * (cosx * cosx) * (cosx * cosx) - 30. * (cosx * cosx) + 3);
299 throw std::domain_error(
300 "Not a valid angular momentum quantum number in y_l_0.");
void random_euler_angles()
Randomly generate Euler angles.
A nucleus is a collection of particles that are initialized, before the beginning of the simulation a...
size_t number_of_protons() const
Number of physical protons in the nucleus:
double get_diffusiveness() const
void rotate(double phi, double theta, double psi)
Rotate vector by the given Euler angles phi, theta, psi.
double get_saturation_density() const
void distribute_isotropically()
Populate the object with a new direction.
double euler_theta_
Euler angel theta.
bool has_value(std::initializer_list< const char * > keys) const
Returns whether there is a non-empty value behind the requested keys.
size_t number_of_particles() const
Number of physical particles in the nucleus:
Interface to the SMASH configuration files.
double y_l_0(int l, double cosx)
Spherical harmonics Y_2_0 and Y_4_0.
ThreeVector threevec() const
double euler_phi_
Euler angel phi.
Value take(std::initializer_list< const char * > keys)
The default interface for SMASH to read configuration values.
double get_nuclear_radius() const
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...