Version: SMASH-1.6
smash::DeformedNucleus Class Reference

#include <deformednucleus.h>

DeformedNucleus: Child of nucleus for deformed nuclei.

All options from the nucleus will still apply. The deformed nucleus adds new or updated features which are outlined below.

Definition at line 27 of file deformednucleus.h.

Inheritance diagram for smash::DeformedNucleus:
[legend]
Collaboration diagram for smash::DeformedNucleus:
[legend]

Public Member Functions

 DeformedNucleus (const std::map< PdgCode, int > &particle_list, int nTest)
 Constructor for DeformedNucles which takes a particle list and the number of testparticles. More...
 
 DeformedNucleus (Configuration &config, int nTest)
 Constructor for DeformedNucleus, that needs the configuration parameters from the inputfile and the number of testparticles. More...
 
double deformed_woods_saxon (double r, double cosx) const
 Return the deformed Woods-Saxon probability for the given position. More...
 
ThreeVector distribute_nucleon () override
 Deformed Woods-Saxon sampling routine. More...
 
void set_deformation_parameters_automatic ()
 Sets the deformation parameters of the radius according to the current mass number. More...
 
void set_deformation_parameters_from_config (Configuration &config)
 Set parameters for spherical deformation of the nucleus from the values specified in the configuration file. More...
 
void rotate () override
 Rotates the nucleus according to members nucleus_polar_angle_ and nucleus_azimuthal_angle_ and updates nucleon positions. More...
 
void generate_fermi_momenta () override
 Does not allow to generate Fermi-momenta for a deformed nucleus. More...
 
double y_l_0 (int l, double cosx) const
 Spherical harmonics Y_2_0 and Y_4_0. More...
 
void set_beta_2 (double b2)
 Set deformation coefficient for Y_2_0. More...
 
void set_beta_4 (double b4)
 Set deformation coefficient for Y_4_0. More...
 
void set_polar_angle (double theta)
 Set the nucleus polar angle. More...
 
void set_azimuthal_angle (double phi)
 Set the nucleus azimuthal angle. 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)
 
virtual ~Nucleus ()=default
 
double mass () const
 
double woods_saxon (double x)
 Woods-Saxon distribution. More...
 
void arrange_nucleons ()
 Sets the positions of the nucleons inside a nucleus. 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...
 
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...
 
FourVector center () const
 Calculate geometrical center of the nucleus. More...
 
void align_center ()
 Shifts the nucleus so that its center is at (0,0,0) 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
 
void set_saturation_density (double density)
 Sets the saturation density of the nucleus. More...
 
double get_saturation_density () const
 
double default_nuclear_radius ()
 
void set_nuclear_radius (double rad)
 Sets the nuclear radius. More...
 
double get_nuclear_radius () const
 

Private Attributes

double beta2_ = 0.0
 Deformation parameter for angular momentum l=2. More...
 
double beta4_ = 0.0
 Deformation parameter for angular momentum l=4. More...
 
Angles nuclear_orientation_
 Nucleus orientation (initial profile in xz plane) in terms of a pair of angles (theta, phi) More...
 

Additional Inherited Members

- Protected Attributes inherited from smash::Nucleus
std::vector< ParticleDataparticles_
 Particles associated with this nucleus. More...
 

Constructor & Destructor Documentation

smash::DeformedNucleus::DeformedNucleus ( const std::map< PdgCode, int > &  particle_list,
int  nTest 
)

Constructor for DeformedNucles which takes a particle list and the number of testparticles.

This constructor is only used for testing purposes.

Parameters
[in]particle_listMap with PDGCode and number of particles which make up the nucleus
[in]nTestnumber of testparticles


Example: Configuring a deformed nucleus

To configure a fixed target heavy-ion collision with deformed nuclei, whose spherical deformation is explicitly declared, it can be done according to the following example. For explanatory (and not physics) reasons, the projectile's Woods Saxon distribution is initialized automatically and it's spherical deformation manually, while the target nucleus is configured just the opposite.

Modi:
    Collider:
        Projectile:
            Particles:    {2212: 29, 2112: 34}
            Deformed:
                # Manually set deformation parameters
                Automatic: False
                Beta_2: 0.1
                Beta_4: 0.3
                Theta: 0.8
                Phi: 0.02
        Target:
            Particles:    {2212: 29, 2112: 34}
            # manually set woods saxon parameters
            Saturation_Density: 0.1968
            Diffusiveness: 0.8
            Radius: 2.0
            Deformed:
                # Automatically set deformation parameters
                Automatic: True
        E_kin: 1.2
        Calculation_Frame: "fixed target"

Definition at line 96 of file deformednucleus.cc.

98  : Nucleus(particle_list, nTest) {}
Nucleus()=default
default constructor
smash::DeformedNucleus::DeformedNucleus ( Configuration config,
int  nTest 
)

Constructor for DeformedNucleus, that needs the configuration parameters from the inputfile and the number of testparticles.

Parameters
[in]configcontains the parameters from the inputfile on the numbers of particles with a certain PDG code
[in]nTestnumber of testparticles

Definition at line 100 of file deformednucleus.cc.

101  : Nucleus(config, nTest) {
102  if (config.has_value({"Deformed", "Automatic"}) &&
103  config.take({"Deformed", "Automatic"})) {
105  } else {
107  }
108 }
void set_deformation_parameters_from_config(Configuration &config)
Set parameters for spherical deformation of the nucleus from the values specified in the configuratio...
void set_deformation_parameters_automatic()
Sets the deformation parameters of the radius according to the current mass number.
Nucleus()=default
default constructor

Here is the call graph for this function:

Member Function Documentation

double smash::DeformedNucleus::deformed_woods_saxon ( double  r,
double  cosx 
) const

Return the deformed Woods-Saxon probability for the given position.

Parameters
[in]rThe radius at which to sample
[in]cosxThe cosine of the polar angle at which to sample
Returns
The Woods-Saxon probability

Definition at line 110 of file deformednucleus.cc.

110  {
112  (1 + std::exp((r - Nucleus::get_nuclear_radius() *
113  (1 + beta2_ * y_l_0(2, cosx) +
114  beta4_ * y_l_0(4, cosx))) /
116 }
double beta4_
Deformation parameter for angular momentum l=4.
double get_nuclear_radius() const
Definition: nucleus.h:266
double beta2_
Deformation parameter for angular momentum l=2.
double get_saturation_density() const
Definition: nucleus.h:248
double get_diffusiveness() const
Definition: nucleus.h:236
double y_l_0(int l, double cosx) const
Spherical harmonics Y_2_0 and Y_4_0.

Here is the call graph for this function:

Here is the caller graph for this function:

ThreeVector smash::DeformedNucleus::distribute_nucleon ( )
overridevirtual

Deformed Woods-Saxon sampling routine.

Returns
Spatial position from uniformly sampling the deformed woods-saxon distribution

Reimplemented from smash::Nucleus.

Definition at line 118 of file deformednucleus.cc.

118  {
119  double a_radius;
120  Angles a_direction;
121  // Set a sensible maximum bound for radial sampling.
122  double radius_max =
125 
126  // Sample the distribution.
127  do {
128  a_direction.distribute_isotropically();
129  // sample r**2 dr
130  a_radius = radius_max * std::cbrt(random::canonical());
131  } while (random::canonical() >
132  deformed_woods_saxon(a_radius, a_direction.costheta()) /
134 
135  // Update (x, y, z) positions.
136  return a_direction.threevec() * a_radius;
137 }
double get_nuclear_radius() const
Definition: nucleus.h:266
double deformed_woods_saxon(double r, double cosx) const
Return the deformed Woods-Saxon probability for the given position.
double get_saturation_density() const
Definition: nucleus.h:248
T canonical()
Definition: random.h:113
double get_diffusiveness() const
Definition: nucleus.h:236

Here is the call graph for this function:

void smash::DeformedNucleus::set_deformation_parameters_automatic ( )

Sets the deformation parameters of the radius according to the current mass number.

The deformation parameters are taken from Moller:1993ed. Corrections to the deformation parameter beta2 in Uranium come from Kuhlman:2005ts. For finite nucleon size corrections to the nuclear density and radius for copper and gold, see Hirano:2009ah, and Hirano:2010jg for uranium.

Definition at line 139 of file deformednucleus.cc.

139  {
140  // Set the deformation parameters extracted from \iref{Moller:1993ed}.
141  switch (Nucleus::number_of_particles()) {
142  case 238: // Uranium
143  set_beta_2(0.28);
144  set_beta_4(0.093);
145  break;
146  case 208: // Lead
147  set_beta_2(0.0);
148  set_beta_4(0.0);
149  break;
150  case 197: // Gold
151  set_beta_2(-0.131);
152  set_beta_4(-0.031);
153  break;
154  case 63: // Copper
155  set_beta_2(0.162);
156  set_beta_4(-0.006);
157  break;
158  default:
159  throw std::domain_error(
160  "Mass number not listed for automatically setting deformation "
161  "parameters. Please specify at least \"Beta_2\" and \"Beta_4\" "
162  "manually and set \"Automatic: False.\" ");
163  }
164 
165  // Set a random nuclear rotation.
167 }
void set_beta_4(double b4)
Set deformation coefficient for Y_4_0.
Angles nuclear_orientation_
Nucleus orientation (initial profile in xz plane) in terms of a pair of angles (theta, phi)
size_t number_of_particles() const
Number of physical particles in the nucleus:
Definition: nucleus.h:155
void distribute_isotropically()
Populate the object with a new direction.
Definition: angles.h:188
void set_beta_2(double b2)
Set deformation coefficient for Y_2_0.

Here is the call graph for this function:

Here is the caller graph for this function:

void smash::DeformedNucleus::set_deformation_parameters_from_config ( Configuration config)

Set parameters for spherical deformation of the nucleus from the values specified in the configuration file.

Parameters
configThe configuration for the deformation of this nucleus (projectile or target).

Definition at line 169 of file deformednucleus.cc.

170  {
171  // Deformation parameters.
172  if (config.has_value({"Deformed", "Beta_2"})) {
173  set_beta_2(static_cast<double>(config.take({"Deformed", "Beta_2"})));
174  }
175  if (config.has_value({"Deformed", "Beta_4"})) {
176  set_beta_4(static_cast<double>(config.take({"Deformed", "Beta_4"})));
177  }
178  if (config.has_value({"Deformed", "Theta"})) {
179  set_polar_angle(static_cast<double>(config.take({"Deformed", "Theta"})));
180  }
181  if (config.has_value({"Deformed", "Phi"})) {
182  set_azimuthal_angle(static_cast<double>(config.take({"Deformed", "Phi"})));
183  }
184 }
void set_polar_angle(double theta)
Set the nucleus polar angle.
void set_beta_4(double b4)
Set deformation coefficient for Y_4_0.
void set_azimuthal_angle(double phi)
Set the nucleus azimuthal angle.
void set_beta_2(double b2)
Set deformation coefficient for Y_2_0.

Here is the call graph for this function:

Here is the caller graph for this function:

void smash::DeformedNucleus::rotate ( )
overridevirtual

Rotates the nucleus according to members nucleus_polar_angle_ and nucleus_azimuthal_angle_ and updates nucleon positions.

Reimplemented from smash::Nucleus.

Definition at line 186 of file deformednucleus.cc.

186  {
187  for (auto &particle : *this) {
188  /* Rotate every vector by the nuclear azimuth phi and polar angle
189  * theta (the Euler angles). This means applying the matrix for a
190  * rotation of phi about z, followed by the matrix for a rotation
191  * theta about the rotated x axis. The third angle psi is 0 by symmetry.*/
192  ThreeVector three_pos = particle.position().threevec();
193  three_pos.rotate(nuclear_orientation_.phi(), nuclear_orientation_.theta(),
194  0.);
195  particle.set_3position(three_pos);
196  }
197 }
Angles nuclear_orientation_
Nucleus orientation (initial profile in xz plane) in terms of a pair of angles (theta, phi)
double phi() const
Definition: angles.h:260
double theta() const
Definition: angles.h:272

Here is the call graph for this function:

void smash::DeformedNucleus::generate_fermi_momenta ( )
overridevirtual

Does not allow to generate Fermi-momenta for a deformed nucleus.

Exceptions
domain_errorif this function is ever called

Reimplemented from smash::Nucleus.

Definition at line 199 of file deformednucleus.cc.

199  {
200  throw std::domain_error(
201  "Fermi momenta currently not implemented"
202  " for a deformed nucleus.");
203 }
double smash::DeformedNucleus::y_l_0 ( int  l,
double  cosx 
) const

Spherical harmonics Y_2_0 and Y_4_0.

Parameters
[in]lAngular momentum value (2 and 4 are supported)
[in]cosxCosine of the polar angle
Returns
Value of the corresponding spherical harmonic
Exceptions
domain_errorif unsupported l is encountered

Definition at line 205 of file deformednucleus.cc.

205  {
206  if (l == 2) {
207  return (1. / 4) * std::sqrt(5 / M_PI) * (3. * (cosx * cosx) - 1);
208  } else if (l == 4) {
209  return (3. / 16) * std::sqrt(1 / M_PI) *
210  (35. * (cosx * cosx) * (cosx * cosx) - 30. * (cosx * cosx) + 3);
211  } else {
212  throw std::domain_error(
213  "Not a valid angular momentum quantum number in"
214  "DeformedNucleus::y_l_0.");
215  }
216 }

Here is the caller graph for this function:

void smash::DeformedNucleus::set_beta_2 ( double  b2)
inline

Set deformation coefficient for Y_2_0.

Parameters
[in]b2deformation coefficient for l=2

Definition at line 108 of file deformednucleus.h.

108 { beta2_ = b2; }
double beta2_
Deformation parameter for angular momentum l=2.

Here is the caller graph for this function:

void smash::DeformedNucleus::set_beta_4 ( double  b4)
inline

Set deformation coefficient for Y_4_0.

Parameters
[in]b4deformation coefficient for l=4

Definition at line 113 of file deformednucleus.h.

113 { beta4_ = b4; }
double beta4_
Deformation parameter for angular momentum l=4.

Here is the caller graph for this function:

void smash::DeformedNucleus::set_polar_angle ( double  theta)
inline

Set the nucleus polar angle.

Parameters
[in]thetaPolar angle of position inside nucleus

Definition at line 118 of file deformednucleus.h.

118  {
120  }
Angles nuclear_orientation_
Nucleus orientation (initial profile in xz plane) in terms of a pair of angles (theta, phi)
void set_theta(const double theta)
Set the polar angle.
Definition: angles.h:218

Here is the call graph for this function:

Here is the caller graph for this function:

void smash::DeformedNucleus::set_azimuthal_angle ( double  phi)
inline

Set the nucleus azimuthal angle.

Parameters
[in]phiAzimuthal angle of position inside nucleus

Definition at line 125 of file deformednucleus.h.

125  {
127  }
Angles nuclear_orientation_
Nucleus orientation (initial profile in xz plane) in terms of a pair of angles (theta, phi)
void set_phi(const double phi)
Sets the azimuthal angle.
Definition: angles.h:194

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

double smash::DeformedNucleus::beta2_ = 0.0
private

Deformation parameter for angular momentum l=2.

Definition at line 131 of file deformednucleus.h.

double smash::DeformedNucleus::beta4_ = 0.0
private

Deformation parameter for angular momentum l=4.

Definition at line 133 of file deformednucleus.h.

Angles smash::DeformedNucleus::nuclear_orientation_
private

Nucleus orientation (initial profile in xz plane) in terms of a pair of angles (theta, phi)

Definition at line 138 of file deformednucleus.h.


The documentation for this class was generated from the following files: