Version: SMASH-1.5
collidermodus.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2018
3  * SMASH Team
4  *
5  * GNU General Public License (GPLv3 or later)
6  */
7 #ifndef SRC_INCLUDE_COLLIDERMODUS_H_
8 #define SRC_INCLUDE_COLLIDERMODUS_H_
9 
10 #include <cstring>
11 #include <memory>
12 #include <utility>
13 
14 #include "deformednucleus.h"
15 #include "forwarddeclarations.h"
16 #include "fourvector.h"
17 #include "interpolation.h"
18 #include "modusdefault.h"
19 #include "nucleus.h"
20 #include "pdgcode.h"
21 
22 namespace smash {
23 
24 struct ExperimentParameters;
25 
42 class ColliderModus : public ModusDefault {
43  public:
64  explicit ColliderModus(Configuration modus_config,
65  const ExperimentParameters &parameters);
66 
79  double initial_conditions(Particles *particles,
80  const ExperimentParameters &parameters);
82  int total_N_number() const { return target_->size() + projectile_->size(); }
84  int proj_N_number() const { return projectile_->size(); }
90  double velocity_projectile() const { return velocity_projectile_; }
95  double velocity_target() const { return velocity_target_; }
99  bool cll_in_nucleus() { return cll_in_nucleus_; }
103  bool is_collider() const { return true; }
105  double impact_parameter() const { return impact_; }
111  using ModusDefault::BadInput::BadInput;
112  };
113 
114  private:
121  std::unique_ptr<Nucleus> projectile_;
129  std::unique_ptr<Nucleus> target_;
135  double total_s_;
141  double sqrt_s_NN_;
153  static std::unique_ptr<DeformedNucleus> create_deformed_nucleus(
154  Configuration &nucleus_cfg, const int ntest,
155  const std::string &nucleus_type);
163  double impact_ = 0.;
167  double imp_min_ = 0.0;
169  double imp_max_ = 0.0;
171  double yield_max_ = 0.0;
173  std::unique_ptr<InterpolateDataLinear<double>> impact_interpolation_ =
174  nullptr;
185  void sample_impact();
204  bool cll_in_nucleus_ = false;
208  double velocity_projectile_ = 0.0;
212  double velocity_target_ = 0.0;
223  std::pair<double, double> get_velocities(double mandelstam_s, double m_a,
224  double m_b);
225 
232  friend std::ostream &operator<<(std::ostream &, const ColliderModus &);
233 };
234 
235 } // namespace smash
236 
237 #endif // SRC_INCLUDE_COLLIDERMODUS_H_
double impact_parameter() const
FermiMotion
Option to use Fermi Motion.
double yield_max_
Maximum value of yield. Needed for custom impact parameter sampling.
int proj_N_number() const
Definition: collidermodus.h:84
double velocity_target_
Beam velocity of the target.
static std::unique_ptr< DeformedNucleus > create_deformed_nucleus(Configuration &nucleus_cfg, const int ntest, const std::string &nucleus_type)
Configure Deformed Nucleus.
double impact_
Impact parameter.
Interface to the SMASH configuration files.
std::unique_ptr< InterpolateDataLinear< double > > impact_interpolation_
Pointer to the impact parameter interpolation.
double imp_min_
Minimum value of impact parameter.
ColliderModus(Configuration modus_config, const ExperimentParameters &parameters)
Constructor.
double velocity_projectile() const
Definition: collidermodus.h:90
std::unique_ptr< Nucleus > projectile_
Projectile.
Base class for Modus classes that provides default function implementations.
Definition: modusdefault.h:44
Sampling sampling_
Method used for sampling of impact parameter.
Thrown when either projectile_ or target_ nuclei are empty.
FermiMotion fermi_motion()
CalculationFrame
The calculation frame.
BadInput is an error to throw if the configuration options are invalid.
Definition: modusdefault.h:161
std::pair< double, double > get_velocities(double mandelstam_s, double m_a, double m_b)
Get the frame dependent velocity for each nucleus, using the current reference frame.
FermiMotion fermi_motion_
An option to include Fermi motion ("off", "on", "frozen")
double initial_z_displacement_
Initial z-displacement of nuclei.
Sample from areal / quadratic distribution.
Don&#39;t use fermi motion.
ColliderModus: Provides a modus for colliding nuclei.
Definition: collidermodus.h:42
double sqrt_s_NN_
Center-of-mass energy of a nucleon-nucleon collision.
bool cll_in_nucleus_
An option to accept first collisions within the same nucleus.
double initial_conditions(Particles *particles, const ExperimentParameters &parameters)
Generates initial state of the particles in the system.
bool is_collider() const
std::unique_ptr< Nucleus > target_
Target.
double velocity_projectile_
Beam velocity of the projectile.
void sample_impact()
Sample impact parameter.
Sampling
Possible methods of impact parameter sampling.
int total_N_number() const
Definition: collidermodus.h:82
friend std::ostream & operator<<(std::ostream &, const ColliderModus &)
Writes the initial state for the ColliderModus to the output stream.
The Particles class abstracts the storage and manipulation of particles.
Definition: particles.h:33
double velocity_target() const
Definition: collidermodus.h:95
double imp_max_
Maximum value of impact parameter.
Helper structure for Experiment.
CalculationFrame frame_
Reference frame for the system, as specified from config.
Definition: action.h:24
double total_s_
Center-of-mass energy squared of the nucleus-nucleus collision.