10 #ifndef SRC_INCLUDE_SMASH_ANGLES_H_ 
   11 #define SRC_INCLUDE_SMASH_ANGLES_H_ 
  135   bool add_to_theta(
const double delta, 
const bool reverse);
 
  163   double theta() 
const;
 
  170     using std::invalid_argument::invalid_argument;
 
  197   if (newphi < 0 || newphi >= 
twopi) {
 
  209     throw InvalidTheta(
"Wrong value for costheta (must be in [-1,1]): " +
 
  225   if (delta < -M_PI || delta > M_PI) {
 
  227                        std::to_string(delta));
 
  229   double theta_plus_delta = delta + 
theta();
 
  233   if (theta_plus_delta > M_PI) {
 
  239   } 
else if (theta_plus_delta < 0) {
 
  250   double plusminus_one = reverse ? -1.0 : +1.0;
 
  251   bool this_reverse = 
add_to_theta(plusminus_one * delta);
 
  256   return this_reverse ^ reverse;
 
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
 
ThreeVector threevec() const
 
void distribute_isotropically()
Populate the object with a new direction.
 
void set_costheta(const double cos)
Set the polar angle from its cosine.
 
bool add_to_theta(const double delta)
Advance polar angle.
 
Angles(double ph, double cost)
 
void set_phi(const double phi)
Sets the azimuthal angle.
 
void set_theta(const double theta)
Set the polar angle.
 
double phi_
Azimuthal angle .
 
double costheta_
Cosine of polar angle .
 
Angles()
Default constructor.
 
The ThreeVector class represents a physical three-vector  with the components .
 
Collection of useful constants that are known at compile time.
 
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
Convenience: dereferences the ActionPtr to Action.
 
std::basic_ostream< CharT, Traits > & field(std::basic_ostream< CharT, Traits > &s)
Stream modifier to align the next object to a specific width w.
 
constexpr double really_small
Numerical error tolerance.
 
Thrown for invalid values for theta.