14 #ifndef GEOMTOOLS_UTILS_H 15 #define GEOMTOOLS_UTILS_H 1 36 double start_position_,
double delta_position_,
37 double tolerance_ = 0.0,
38 bool bounds_excluded_ =
false);
42 double start_angle_,
double delta_angle_,
43 double angular_tolerance_ = 0.0,
44 bool bounds_excluded_ =
false);
106 bool parse(std::istream & in_,
vector_3d & position_,
bool nothing_more_ =
false);
421 const std::string &);
432 const std::string & title_ =
"",
433 const std::string & indent_ =
"");
475 void set(
vector_3d & vec_,
double x_,
double y_,
double z_);
545 #pragma GCC diagnostic push 546 #pragma GCC diagnostic ignored "-Wnoexcept-type" 548 template <
class ran_func>
560 double phi = 2. * M_PI * ran_();
561 double cos_theta = -1 + 2 * ran_();
562 double sin_theta = std::sqrt(1. - cos_theta * cos_theta);
563 double x = sin_theta * std::cos(phi);
564 double y = sin_theta * std::sin(phi);
565 double z = cos_theta;
566 ran_dir_.set(x, y, z);
569 #pragma GCC diagnostic pop 581 template <
class ran_func>
599 template <
class ran_func>
604 double theta = 2. * M_PI * ran_();
605 double dx = cos(theta);
606 double dy = sin(theta);
608 double dir_theta = dir_.theta();
609 double dir_phi = dir_.phi();
613 dir_inverse_rot = dir_rot.inverse();
615 ran_dir_ = v.transform(dir_inverse_rot);
629 template <
class ran_func>
654 const std::vector<double> & weights_,
662 const std::vector<double> & weights_);
669 double myx_,
double myy_,
double myz_,
670 double mzx_,
double mzy_,
double mzz_)
694 namespace serialization {
696 template<
class Archive>
697 void save(Archive & a_ar ,
699 const unsigned int a_version);
701 template<
class Archive>
702 void load(Archive & a_ar ,
704 const unsigned int a_version);
706 template<
class Archive>
709 const unsigned int a_version);
718 namespace serialization {
721 template<
class Archive>
722 void save(Archive & a_ar ,
724 const unsigned int a_version);
727 template<
class Archive>
728 void load(Archive & a_ar ,
730 const unsigned int a_version);
733 template<
class Archive>
736 const unsigned int a_version);
745 namespace serialization {
748 template<
class Archive>
749 void save(Archive & a_ar ,
751 const unsigned int a_version);
754 template<
class Archive>
755 void load(Archive & a_ar ,
757 const unsigned int a_version);
760 template<
class Archive>
763 const unsigned int a_version);
775 #endif // GEOMTOOLS_UTILS_H
void save(Archive &a_ar, const geomtools::vector_3d &v_, const unsigned int a_version)
Serialization stuff for CLHEP 'vector_3d'.
Definition: portable_archive_exception.hpp:27
void load(Archive &a_ar, geomtools::vector_3d &v_, const unsigned int a_version)
void serialize(Archive &a_ar, geomtools::vector_3d &v_, const unsigned int a_version)
#define DR_TYPE_INIT(Introspectable)
Definition: reflection_interface.h:165