Version: SMASH-3.4
deformednucleus.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2022,2024-2025
3  * SMASH Team
4  *
5  * GNU General Public License (GPLv3 or later)
6  */
7 #ifndef SRC_INCLUDE_SMASH_DEFORMEDNUCLEUS_H_
8 #define SRC_INCLUDE_SMASH_DEFORMEDNUCLEUS_H_
9 
10 #include <map>
11 
12 #include "angles.h"
13 #include "configuration.h"
14 #include "forwarddeclarations.h"
15 #include "nucleus.h"
16 #include "threevector.h"
17 
18 namespace smash {
19 
20 /**
21  * Spherical harmonics Y_2_0, Y_2_2, Y_3_0 and Y_4_0.
22  * \param[in] l Angular momentum value (2 and 4 are supported)
23  * \param[in] m projection value (l = 2 and m = 2 are supported)
24  * \param[in] cosx Cosine of the polar angle
25  * \param[in] phi Azimuthal angle
26  * \return Value of the corresponding spherical harmonic
27  * \throws domain_error if unsupported l is encountered
28  */
29 double y_l_m(int l, int m, double cosx, double phi);
30 
31 /**
32  * DeformedNucleus: Child of nucleus for deformed nuclei.
33  *
34  * All options from the nucleus will still apply. The deformed nucleus adds
35  * new or updated features which are outlined below.
36  */
37 
38 class DeformedNucleus : public Nucleus {
39  public:
40  /**
41  * Constructor for DeformedNucles which takes a particle list and the number
42  * of testparticles. This constructor is only used for testing purposes.
43  * \param[in] particle_list Map with PDGCode and number of particles which
44  * make up the nucleus
45  * \param[in] nTest number of testparticles
46  * \param[in] spin_interaction_type which type of spin interaction to use
47  */
49  const std::map<PdgCode, int> &particle_list, int nTest,
50  SpinInteractionType spin_interaction_type = SpinInteractionType::Off);
51  /**
52  * Constructor for DeformedNucleus, that needs the configuration parameters
53  * from the inputfile and the number of testparticles
54  * \param[in] config contains the parameters from the inputfile on the
55  * numbers of particles with a certain PDG code
56  * \param[in] nTest number of testparticles
57  * \param[in] auto_deformation whether or not deformation parameters
58  * should be set automatically
59  */
60  DeformedNucleus(Configuration &config, int nTest, bool auto_deformation);
61  /**
62  * Deformed Woods-Saxon sampling routine.
63  *
64  * \return Spatial position from uniformly sampling
65  * the deformed woods-saxon distribution
66  */
68 
69  /**
70  * Sets the deformation parameters of the radius according to the current
71  * mass number.
72  *
73  * The deformation parameters are taken from \iref{Moller:1993ed}.
74  * Corrections to the deformation parameter beta2 in Uranium come from
75  * \iref{Kuhlman:2005ts}. For finite nucleon size corrections to the nuclear
76  * density and radius for copper and gold, see \iref{Hirano:2009ah},
77  * and \iref{Hirano:2010jg} for uranium.
78  */
80 
81  /**
82  * Set parameters for spherical deformation of the nucleus from the values
83  * specified in the configuration file.
84  *
85  * \param config The configuration for the deformation of this nucleus
86  * (projectile or target).
87  */
89 
90  /**
91  * \return the saturation density of the deformed_nucleus
92  * \see saturation_density_
93  */
94  inline double get_saturation_density() const { return saturation_density_; }
95  /**
96  * Return the deformed Woods-Saxon probability density for the given position.
97  * This corresponds to the nuclear density at the very same position.
98  *
99  * \param[in] r The radius at which to sample
100  * \param[in] cosx The cosine of the polar angle at which to sample
101  * \param[in] phi The azimuthal angle at which to sample
102  * \return The Woods-Saxon density
103  */
104  double nucleon_density(double r, double cosx, double phi) const override;
105  /**
106  * Return the unnormalized deformed Woods-Saxon distribution for the given
107  * position.
108  *
109  * \param[in] r The radius
110  * \param[in] cosx The cosine of the polar angle
111  * \param[in] phi The azimuthal angle
112  * \return The unnormalized Woods-Saxon distribution
113  */
114  double nucleon_density_unnormalized(double r, double cosx,
115  double phi) const override;
116  /**
117  * Return the integral over the azimuthal angle phi
118  *
119  * \param[in] r The radius
120  * \param[in] cosx The cosine of the polar angle
121  * \return The unnormalized Woods-Saxon distribution integrated over dphi
122  */
123  double integrant_nucleon_density_phi(double r, double cosx) const;
124  /**
125  * \return the normalized ground state density for the corresponding
126  * Woods-Saxon parameter. This is done by integrating the Woods-Saxon
127  * distribution and setting the normalization such that the integral of the
128  * Woods-Saxon distribution yields the number of particles in the nucleus
129  * \f$\int\rho(r)d^3r = N_{particles}\f$.
130  *
131  */
132  double calculate_saturation_density() const override;
133  /**
134  * Set deformation coefficient for Y_2_0.
135  * \param[in] b2 deformation coefficient for l=2
136  */
137  inline void set_beta_2(double b2) { beta2_ = b2; }
138  /**
139  * Set the triaxiality coefficient gamma for Y_2_0 and Y_2_2.
140  * \param[in] ga triaxiality coefficient for l=2
141  */
142  inline void set_gamma(double ga) { gamma_ = ga; }
143  /**
144  * Set deformation coefficient for Y_3_0.
145  * \param[in] b3 deformation coefficient for l=3
146  */
147  inline void set_beta_3(double b3) { beta3_ = b3; }
148  /**
149  * Set deformation coefficient for Y_4_0.
150  * \param[in] b4 deformation coefficient for l=4
151  */
152  inline void set_beta_4(double b4) { beta4_ = b4; }
153  /**
154  * return the beta2 value.
155  */
156  inline double get_beta2() { return beta2_; }
157  /**
158  * return the beta3 value.
159  */
160  inline double get_beta3() { return beta3_; }
161  /**
162  * return the beta4 value.
163  */
164  inline double get_beta4() { return beta4_; }
165 
166  private:
167  /// Deformation parameter for angular momentum l=2.
168  double beta2_ = 0.0;
169  /// Triaxiality parameter for angular momentum l=2.
170  double gamma_ = 0.0;
171  /// Deformation parameter for angular momentum l=3.
172  double beta3_ = 0.0;
173  /// Deformation parameter for angular momentum l=4.
174  double beta4_ = 0.0;
175 };
176 
177 } // namespace smash
178 
179 #endif // SRC_INCLUDE_SMASH_DEFORMEDNUCLEUS_H_
Interface to the SMASH configuration files.
DeformedNucleus: Child of nucleus for deformed nuclei.
double get_beta3()
return the beta3 value.
double get_saturation_density() const
void set_gamma(double ga)
Set the triaxiality coefficient gamma for Y_2_0 and Y_2_2.
double get_beta2()
return the beta2 value.
void set_beta_3(double b3)
Set deformation coefficient for Y_3_0.
ThreeVector distribute_nucleon() override
Deformed Woods-Saxon sampling routine.
double nucleon_density_unnormalized(double r, double cosx, double phi) const override
Return the unnormalized deformed Woods-Saxon distribution for the given position.
double get_beta4()
return the beta4 value.
double integrant_nucleon_density_phi(double r, double cosx) const
Return the integral over the azimuthal angle phi.
double beta4_
Deformation parameter for angular momentum l=4.
double gamma_
Triaxiality parameter for angular momentum l=2.
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_beta_2(double b2)
Set deformation coefficient for Y_2_0.
double beta3_
Deformation parameter for angular momentum l=3.
DeformedNucleus(const std::map< PdgCode, int > &particle_list, int nTest, SpinInteractionType spin_interaction_type=SpinInteractionType::Off)
Constructor for DeformedNucles which takes a particle list and the number of testparticles.
double nucleon_density(double r, double cosx, double phi) const override
Return the deformed Woods-Saxon probability density for the given position.
void set_beta_4(double b4)
Set deformation coefficient for Y_4_0.
double beta2_
Deformation parameter for angular momentum l=2.
double calculate_saturation_density() const override
void set_deformation_parameters_automatic()
Sets the deformation parameters of the radius according to the current mass number.
A nucleus is a collection of particles that are initialized, before the beginning of the simulation a...
Definition: nucleus.h:27
double saturation_density_
Saturation density of this nucleus.
Definition: nucleus.h:293
The ThreeVector class represents a physical three-vector with the components .
Definition: threevector.h:31
SpinInteractionType
Possible spin interaction types.
@ Off
No spin interactions.
Definition: action.h:24
double y_l_m(int l, int m, double cosx, double phi)
Spherical harmonics Y_2_0, Y_2_2, Y_3_0 and Y_4_0.